Преглед изворни кода

添加出库自动带入领料人和领料部门

huang_an пре 1 година
родитељ
комит
0df864e1a1
1 измењених фајлова са 9 додато и 11 уклоњено
  1. 9 11
      src/views/bpm/outgoingManagement/outbound.vue

+ 9 - 11
src/views/bpm/outgoingManagement/outbound.vue

@@ -858,17 +858,15 @@
             this.formData.extInfo.verifyDeptName = this.form.executorDeptName;
           });
         }
-        // if (this.type == '销售发货出库') {
-        //   await storageApi.getHierarchyFifo({
-        //     type: this.dimension,
-        //     builders: this.selectionList.map((item) => {
-        //       return {
-        //         categoryId: item.categoryId,
-        //         num: item.outboundNum
-        //       };
-        //     })
-        //   });
-        // }
+        if (this.type == '销售发货出库') {
+          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;
+          });
+        }
         console.log('this.formData', this.formData);
       },
       // 初始化部门数据