695593266@qq.com 3 bulan lalu
induk
melakukan
5be3b1445f

+ 3 - 4
src/views/saleOrder/components/plan-submit.vue

@@ -136,7 +136,7 @@
         ></el-date-picker>
       </template>
       <template v-slot:requiredFormingNum="{ row }">
-        <span>{{ row.requiredFormingNum }} {{ row.measuringUnit }}</span>
+        <span>{{ row.requiredFormingNum }} {{ row.unit }}</span>
       </template>
       <template v-slot:action="{ row, $index }">
         <el-popconfirm
@@ -327,10 +327,9 @@
           produceRoutingName: m.produceRoutingName || '',
           productUnitWeight: m.productUnitWeight,
           requiredFormingNum: m.requiredFormingNum,
-          measuringUnit: m.measuringUnit,
           startTime: m.startTime || '',
           endTime: m.endTime || '',
-          unit: this.unit,
+          unit: m.measuringUnit,
           resourceType: 0
         };
         this.jhList.push(data);
@@ -346,7 +345,7 @@
       },
 
       submit: debounce(function (type) {
-        this.$emit('publish', type);
+        this.$emit('publish', type, this.jhList);
         this.visible = false;
       }, 800)
     }

+ 7 - 2
src/views/saleOrder/salesToProductionNewTwo.vue

@@ -1791,7 +1791,7 @@
         this.$set(this.form, 'sumOrderWeight', productWeight.toFixed(2));
       },
 
-      async publishData(type) {
+      async publishData(type, list) {
         const key = getRouteTabKey();
         let params = deepClone(this.form);
         params.categoryId = params.salesOrders[0]?.categoryId;
@@ -1823,6 +1823,7 @@
               const code = await getCode('product_order_code');
               const data = {
                 productionPlan: params,
+                addPOList: list,
                 workOrder: {
                   productionPlanCode: params.code,
                   code: code,
@@ -1902,8 +1903,12 @@
             this.$route.query.type == 'edit'
               ? updateSaleToPlan
               : saveSaleToPlan;
+          const data = {
+            ...params,
+            addPOList: list
+          };
 
-          request(params)
+          request(data)
             .then(async (res) => {
               // 提交
               this.$router.push({