quwangxin 2 سال پیش
والد
کامیت
0c2cf5d7b4

+ 2 - 2
src/views/produceOrder/components/report/Common.vue

@@ -342,8 +342,8 @@
                 workReportDeviceList: [this.workReportDeviceList],
                 workReportCategoryList: [this.categoryMsg]
               }).then((res) => {
-                this.$message.success('报工成功!');
-                this.getReportCount();
+                // this.$message.success('报工成功!');
+                // this.getReportCount();
               });
             });
           } else {

+ 2 - 2
src/views/produceOrder/components/report/Drying.vue

@@ -351,8 +351,8 @@
                 workReportDeviceList: [this.workReportDeviceList],
                 workReportCategoryList: [this.categoryMsg]
               }).then((res) => {
-                this.$message.success('报工成功!');
-                this.getReportCount();
+                // this.$message.success('报工成功!');
+                // this.getReportCount();
               });
             });
           } else {

+ 2 - 2
src/views/produceOrder/components/report/Extrusion.vue

@@ -469,8 +469,8 @@
                 workReportCategoryList: [this.categoryMsg],
                 workReportDeviceList
               }).then(() => {
-                this.$message.success('报工成功!');
-                this.getReportCount();
+                // this.$message.success('报工成功!');
+                // this.getReportCount();
               });
             });
           } else {

+ 2 - 2
src/views/produceOrder/components/report/Furnace.vue

@@ -218,8 +218,8 @@
                 workReportDeviceList: [this.workReportDeviceList],
                 workReportCategoryList: [this.categoryMsg]
               }).then((res) => {
-                this.$message.success('报工成功!');
-                this.getReportCount();
+                // this.$message.success('报工成功!');
+                // this.getReportCount();
               });
             });
           } else {

+ 2 - 2
src/views/produceOrder/components/report/HalfAdded.vue

@@ -382,8 +382,8 @@
                 workReportDeviceList: [this.workReportDeviceList],
                 workReportCategoryList: [this.categoryMsg]
               }).then((res) => {
-                this.$message.success('报工成功!');
-                this.getReportCount();
+                // this.$message.success('报工成功!');
+                // this.getReportCount();
               });
             });
           } else {

+ 2 - 2
src/views/produceOrder/components/report/Heating.vue

@@ -391,8 +391,8 @@
                 workReportDeviceList: [this.workReportDeviceList],
                 workReportCategoryList: [this.categoryMsg]
               }).then((res) => {
-                this.$message.success('报工成功!');
-                this.getReportCount();
+                // this.$message.success('报工成功!');
+                // this.getReportCount();
               });
             });
           } else {

+ 2 - 2
src/views/produceOrder/components/report/Package.vue

@@ -351,8 +351,8 @@
                   this.categoryMsg
                 ]
               }).then((res) => {
-                this.$message.success('报工成功!');
-                this.getReportCount();
+                // this.$message.success('报工成功!');
+                // this.getReportCount();
               });
             });
           } else {

+ 2 - 2
src/views/produceOrder/components/report/Sinter.vue

@@ -185,8 +185,8 @@
                 workReport: this.workReport,
                 workReportDeviceList: [this.workReportDeviceList]
               }).then((res) => {
-                this.$message.success('报工成功!');
-                this.getMsg();
+                // this.$message.success('报工成功!');
+                // this.getMsg();
               });
             });
           }

+ 2 - 2
src/views/produceOrder/components/report/Warehousing.vue

@@ -197,8 +197,8 @@
                 workReport: this.workReport,
                 workReportCategoryList: [this.categoryMsg]
               }).then((res) => {
-                this.$message.success('报工成功!');
-                this.getReportCount();
+                // this.$message.success('报工成功!');
+                // this.getReportCount();
               });
             });
           } else {

+ 18 - 7
src/views/produceOrder/report.vue

@@ -120,7 +120,7 @@
         v-if="tabList.length"
         ref="reportRef"
         :is="componentName"
-        :key="activeName"
+        :key="activeName + isUpdate"
         :infoData="infoData"
         :taskInfo="{
           ...tabList[activeName],
@@ -162,6 +162,7 @@
     data () {
       return {
         infoData: {},
+        isUpdate: true,
         descriptionsShow: true,
         activeName: '0',
         tabList: [],
@@ -203,7 +204,7 @@
       }
     },
     created () {
-      this.getDetail(this.$route.query.id);
+      this.init();
     },
     methods: {
       handleReport () {
@@ -232,15 +233,25 @@
               ].code,
             ...data
           };
-          await report(params);
+          await report(params).then((res) => {
+            this.$message.success('报工成功!');
+            this.getDetail();
+            this.isUpdate = !this.isUpdate;
+            return res;
+          });
         });
       },
-      async getDetail (id) {
-        const res = await getById(id);
-
+      async init () {
+        await this.getDetail();
+        await this._getTaskListById();
+      },
+      async getDetail () {
+        const res = await getById(this.$route.query.id);
         this.infoData = res;
+      },
+      async _getTaskListById () {
         // 获取工序
-        const res1 = await getTaskListById(res.produceVersionId);
+        const res1 = await getTaskListById(this.infoData.produceVersionId);
 
         this.tabList = res1;
         this.activeName = '0';