zhouqi пре 1 година
родитељ
комит
d3e83b5bc0

+ 6 - 3
src/views/productionPlan/components/homogeneityInspectDialog.vue

@@ -231,10 +231,13 @@
        currentDetail(row) {
          this.$refs.currentDetailDialog.open(row);
        },
-      open(ids) {
+      open(dataList) {
          this.visible = true;
-         this.ids = ids;
-         // this.reload({planIds: ids});
+         if(dataList.length > 1){
+           this.leftShow = true;
+         } else {
+           this.leftShow = false;
+         }
       },
       cancel() {
         this.formData = {};

+ 13 - 7
src/views/productionPlan/index.vue

@@ -609,14 +609,20 @@
           this.$message.warning('请至少选择一条计划!');
           return;
         }
-        // for(let item of this.selection){
-        //   for(let )
-        // }
-        if(this.selection.length > 0){
-          this.$refs.homogeneityInspectDialog.open(this.selection);
-        } else {
-
+        let flag = false;
+        for(let item of this.selection){
+          for(let ele of this.selection){
+            if(item.produceType != ele.produceType){
+              flag = true;
+              break;
+            }
+          }
+        }
+        if(flag){
+          this.$message.warning('请选择加工方式相同的计划!');
+          return;
         }
+        this.$refs.homogeneityInspectDialog.open(this.selection);
       },
       statusFormatter(status) {
         const obj = this.statusOpt[this.activeName].find(