Browse Source

修改领料单取值的顺序

695593266@qq.com 8 tháng trước cách đây
mục cha
commit
d91db0fb69
1 tập tin đã thay đổi với 8 bổ sung5 xóa
  1. 8 5
      src/views/bpm/outgoingManagement/outbound.vue

+ 8 - 5
src/views/bpm/outgoingManagement/outbound.vue

@@ -150,8 +150,8 @@
           <el-col :span="6">
             <el-form-item label="客户名称">
               <span>{{ formData.clientName }}</span>
-            </el-form-item> </el-col
-          >
+            </el-form-item>
+          </el-col>
           <el-col :span="12">
             <el-form-item label="备注" prop="remark">
               <el-input
@@ -830,6 +830,8 @@
           ).values()
         ];
         this.productList = uniqueProducts;
+        console.log('111111111111111');
+        console.log(this.productList);
         // 排序
         this.productList.sort((a, b) => a.categoryCode - b.categoryCode);
 
@@ -1033,6 +1035,7 @@
         console.log(this.detailList, 'this.detailList');
         console.log(this.saleProductList, 'this.saleProductList');
         console.log(this.productList, 'this.productList');
+        console.log('11111111111111111111');
 
         if (this.detailList?.length > 0) {
           // 获取领料人列表
@@ -1064,7 +1067,7 @@
             builders: this.detailList.map((item) => {
               return {
                 categoryId:
-                  item.instanceId || item.categoryId || item.productId,
+                  item.categoryId || item.instanceId || item.productId,
                 num: item.demandQuantity || item.measurementCount,
                 warehouseId: this.bizType == 11 ? item.warehouseId : ''
               };
@@ -1107,8 +1110,8 @@
         }
         // 销售相关逻辑
         if (this.saleProductList?.length > 0) {
-          this.formData.clientName=this.form.contactName;
-          this.formData.clientCode=this.form.contactCode;
+          this.formData.clientName = this.form.contactName;
+          this.formData.clientCode = this.form.contactCode;
           // 获取领料人列表
           this.getStaffList({ id: this.form.deptId }).then(() => {
             // 获取领料人和领料部门