Kaynağa Gözat

发布工单

quwangxin 2 yıl önce
ebeveyn
işleme
274bb99510

+ 4 - 2
src/views/productionPlan/index.vue

@@ -332,10 +332,12 @@
               const data = await release([
                 {
                   productionPlanCode: row.code,
+                  productionPlanId: row.id,
                   code,
                   formingNum: row.requiredFormingNum,
                   formingWeight: multiply(
-                    row.requiredFormingNum * row.productUnitWeight
+                    row.requiredFormingNum,
+                    row.productUnitWeight
                   ),
                   produceVersionId: row.produceVersionId,
                   status: 4,
@@ -351,7 +353,7 @@
               } else {
                 this.$message.error('发布失败,请重新发布!');
               }
-              this.back();
+              this.reload();
             } catch (error) {
               console.error(error);
             }

+ 1 - 2
src/views/saleOrder/salesToProduction.vue

@@ -559,6 +559,7 @@
       },
 
       async publishData(type) {
+        const key = getRouteTabKey();
         let params = deepClone(this.form);
         params.categoryId = params.salesOrders[0]?.categoryId;
         if (this.$route.query.type != 'edit') {
@@ -594,7 +595,6 @@
                   data.workOrder.productionPlanId = params.id;
                 }
 
-                const key = getRouteTabKey();
                 releaseSave(data)
                   .then(() => {
                     this.$message.success('发布成功!');
@@ -619,7 +619,6 @@
 
           request(params)
             .then(async (res) => {
-              reloadPageTab({ fullPath: '/saleOrder' });
               // 提交
               this.$router.push({
                 path: '/productionPlan'