huang_an vor 1 Jahr
Ursprung
Commit
601118d50b
1 geänderte Dateien mit 24 neuen und 6 gelöschten Zeilen
  1. 24 6
      src/views/bpm/outgoingManagement/outbound.vue

+ 24 - 6
src/views/bpm/outgoingManagement/outbound.vue

@@ -920,9 +920,7 @@
           let pData2 = {
             type: this.wwType,
             taskIds: this.extractedList.map((item) => item.taskId),
-            workOrderIds: this.extractedList.map((item) => item.workOrderId),
-            taskIds: this.form.productList.map((item) => item.taskId),
-            workOrderIds: this.form.productList.map((item) => item.workOrderId)
+            workOrderIds: this.extractedList.map((item) => item.workOrderId)
           };
           storageApi
             .getHierarchyFifo(this.wwType == 3 ? pData2 : pData)
@@ -955,9 +953,7 @@
           let pData2 = {
             type: this.wwType,
             taskIds: this.extractedList.map((item) => item.taskId),
-            workOrderIds: this.extractedList.map((item) => item.workOrderId),
-            taskIds: this.form.productList.map((item) => item.taskId),
-            workOrderIds: this.form.productList.map((item) => item.workOrderId)
+            workOrderIds: this.extractedList.map((item) => item.workOrderId)
           };
           storageApi
             .getHierarchyFifo(this.wwType == 3 ? pData2 : pData)
@@ -968,7 +964,29 @@
               console.log(err);
             });
         }
+        if (this.form.productList?.length > 0) {
+          this.getStaffList({ id: this.form.deptId }).then(() => {
+            this.formData.fromId = this.form.makerId;
+            this.formData.fromUser = this.form.makerName;
+            this.formData.extInfo.verifyDeptCode = this.form.deptId;
+            this.formData.extInfo.verifyDeptName = this.form.deptName;
+          });
+          let pData2 = {
+            type: 3,
+            taskIds: this.form.productList.map((item) => item.taskId),
+            workOrderIds: [this.form.sourceId]
+          };
+          storageApi
+            .getHierarchyFifo(pData2)
+            .then((data) => {
+              this.detailData(data, this.dimension);
+            })
+            .catch((err) => {
+              console.log(err);
+            });
+        }
       },
+
       // 初始化部门数据
       initDeptData() {
         return new Promise(async (resolve) => {