Răsfoiți Sursa

销售订单齐套性检查bug修改

jingshuyong 10 luni în urmă
părinte
comite
9361d667e4

+ 10 - 9
src/views/saleOrder/components/create-order.vue

@@ -1105,15 +1105,16 @@
           this.$message.warning('请输入订单数量且订单数量不能为0');
           return;
         }
-        if (row.productType == 2) {
-          let data = [];
-          data.push(row);
-          this.$refs.orderHomogeneityInspectDialog.open(data, this.form, 'new');
-        } else if (row.productType == 3) {
-          this.$refs.orderHomogeneityInspectInstallDialog.open([row.id]);
-        } else {
-          this.$message.warning('请确认生产类型!');
-        }
+         this.$refs.orderHomogeneityInspectDialog.open([row], {}, 'new');
+        // if (row.productType == 2) {
+        //   let data = [];
+        //   data.push(row);
+        //   this.$refs.orderHomogeneityInspectDialog.open(data, this.form, 'new');
+        // } else if (row.productType == 3) {
+        //   this.$refs.orderHomogeneityInspectInstallDialog.open([row.id]);
+        // } else {
+        //   this.$message.warning('请确认生产类型!');
+        // }
       },
 
       // 打开工艺路线

+ 7 - 10
src/views/saleOrder/components/orderHomogeneityInspectDialog.vue

@@ -11,7 +11,7 @@
     >
       <div v-loading="loading">
         <el-form label-width="80px" :model="orderInfo" class="order_form">
-          <el-row :gutter="20" type="flex" style="flex-wrap: wrap;">
+          <el-row :gutter="20" type="flex" style="flex-wrap: wrap">
             <el-col :span="8">
               <el-form-item label="销售单号:">
                 <el-input readonly v-model="orderInfo.code"></el-input>
@@ -153,7 +153,7 @@
                     {{ row.inTransitNum }}
                   </el-link>
                 </template>
-                <template v-slot:stockColor="{ row }">
+                <!-- <template v-slot:stockColor="{ row }">
                   <div :class="{ statusRed: row.stockStatus == '缺料' }">
                     {{ row.stockStatus }}
                   </div>
@@ -173,7 +173,7 @@
                     <div v-if="row.finishCount > 0">{{ row.finishCount }}</div>
                     <div v-else>-</div>
                   </div>
-                </template>
+                </template> -->
               </ele-pro-table>
             </div>
           </div>
@@ -422,14 +422,11 @@
       currentDetail(row) {
         this.$refs.currentDetailDialog.open({ bomCode: row.code });
       },
-      open(dataList, order, source = 'list') {
+      open(dataList, source = 'list') {
         this.source = source;
-        console.log(order, 'order order order 1');
-        console.log(dataList, 'dataList');
         this.visible = true;
         this.cardList = dataList.map((el) => {
           return {
-            ...order,
             ...el
           };
         });
@@ -487,7 +484,7 @@
           this.salesOrderId = data.id;
           const res = await findBomSalesorderCategoryId(data.categoryId);
           if (!res || res.length == 0) {
-               this.loading = false;
+            this.loading = false;
             this.bomListD = [];
             this.datasourceList = [];
             return;
@@ -614,8 +611,8 @@
     display: flex;
   }
 
-  .order_form{
-    .el-col{
+  .order_form {
+    .el-col {
       margin-bottom: 16px;
     }
   }

+ 60 - 57
src/views/saleOrder/index.vue

@@ -439,63 +439,65 @@
         console.log(111111333333);
 
         if (this.selection.length > 0) {
-          let codeList = [];
-          this.selection.map((ele) => {
-            if (ele.code) {
-              codeList.push(ele.code);
-            }
-          });
-          let res = await getByCodeList(codeList);
-          console.log(res,'0000000000000000');
-          let flag = true;
-          let type = 0;
-          let data = [];
-          let data2 = [];
-          let first = null;
-          let firstFlag = true;
-          if (res) {
-            for (let ele of res) {
-              let list = ele.productInfoList;
-              if (firstFlag) {
-                first = ele;
-                firstFlag = false;
-              }
-              if (list) {
-                let pre = null;
-                for (let item of list) {
-                  // if (!item.productType) {
-                  //   flag = false;
-                  //   this.$message.warning(
-                  //     '产品(' + item.productCode + ')未选择生产类型'
-                  //   );
-                  //   return;
-                  // }
-                  // type = item.productType;
-                  // if (!item.bomCategoryId) {
-                  //   flag = false;
-                  //   this.$message.warning(
-                  //     '产品(' + item.productCode + ')未选择BOM版本'
-                  //   );
-                  //   return;
-                  // }
-                  // if (pre) {
-                  //   if (pre.productType != item.productType) {
-                  //     flag = false;
-                  //     this.$message.warning('请选择生产类型相同的订单');
-                  //     return;
-                  //   }
-                  // }
-                  pre = item;
-                  // JSON.parse(JSON.stringify({}))
-                  data.push(item.id);
-                  item.code = ele.code;
-                  data2.push(item);
-                }
-              }
-            }
-          }
-          console.log(data2,'data2 333333')
-          this.$refs.orderHomogeneityInspectDialog.open(data2, first);
+          // let codeList = [];
+          // this.selection.map((ele) => {
+          //   if (ele.code) {
+          //     codeList.push(ele.code);
+          //   }
+          // });
+          // let res = await getByCodeList(codeList);
+          // console.log(res, '0000000000000000');
+          // let flag = true;
+          // let type = 0;
+          // let data = [];
+          // let data2 = [];
+          // let first = null;
+          // let firstFlag = true;
+          // if (res) {
+          //   for (let ele of res) {
+          //     let list = ele.productInfoList;
+          //     if (firstFlag) {
+          //       first = ele;
+          //       firstFlag = false;
+          //     }
+          //     if (list) {
+          //       let pre = null;
+          //       for (let item of list) {
+          //         if (!item.productType) {
+          //           flag = false;
+          //           this.$message.warning(
+          //             '产品(' + item.productCode + ')未选择生产类型'
+          //           );
+          //           return;
+          //         }
+          //         type = item.productType;
+          //         if (!item.bomCategoryId) {
+          //           flag = false;
+          //           this.$message.warning(
+          //             '产品(' + item.productCode + ')未选择BOM版本'
+          //           );
+          //           return;
+          //         }
+          //         if (pre) {
+          //           if (pre.productType != item.productType) {
+          //             flag = false;
+          //             this.$message.warning('请选择生产类型相同的订单');
+          //             return;
+          //           }
+          //         }
+          //         pre = item;
+          //         JSON.parse(JSON.stringify({}))
+          //         data.push(item.id);
+          //         item.code = ele.code;
+          //         data2.push(item);
+          //       }
+          //     }
+          //   }
+          // }
+          // console.log(this.selection, 'this.selection 333333');
+          // console.log(data2,'data2')
+          // console.log(first,'first 123')
+          this.$refs.orderHomogeneityInspectDialog.open(this.selection);
           // if (flag) {
           //   // 齐料
           //   if (type == 2) {
@@ -563,6 +565,7 @@
           ...this.sort
         };
         const data = await getPageList(params);
+        console.log(data,'data')
         return data;
       },