Explorar o código

详情 lastTaskCode

quwangxin %!s(int64=2) %!d(string=hai) anos
pai
achega
981f0c4d28
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      src/views/produceOrder/detail.vue

+ 8 - 0
src/views/produceOrder/detail.vue

@@ -1162,7 +1162,15 @@
         this.setData();
       },
       async getReportCount() {
+        const index = this.tabList.findIndex(
+          (item) => item.taskCode === this.taskCode
+        );
+        let lastTaskCode = this.taskCode;
+        if (index > 0) {
+          lastTaskCode = this.tabList[index - 1].taskCode;
+        }
         const res = await reportCount({
+          lastTaskCode,
           taskCode: this.taskCode,
           workOrderId: this.workOrderId
         });