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

退货单组件优化:完善商品列表数据处理逻辑,修复委托收货信息获取参数传递问题

yusheng пре 9 месеци
родитељ
комит
a5646af893

+ 14 - 7
src/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog.vue

@@ -506,10 +506,17 @@
         if (data) {
           this.productList = data.productList;
           if (type) {
+            this.$refs.inventoryTableDetailsRef &&
+              this.$refs.inventoryTableDetailsRef.putTableValue(
+                data.productList.map((item) => {
+                  item['extField'] = item.extField || [];
+                  return item;
+                })
+              );
             return;
           }
 
-        this.getOrderOption(data);
+          this.getOrderOption(data);
           this.$nextTick(() => {
             let { code, id, productList, contactId, contactName } = data;
             if (productList && productList.length > 0) {
@@ -530,12 +537,12 @@
               entrustedReceiveCode: code
             });
             this.handleSelectGoods();
-          
+
             this.$refs.inventoryTableDetailsRef &&
               this.$refs.inventoryTableDetailsRef.putTableValue(
-                data.productList.map(item=>{
-                  item['extField']=item.extField||[]
-                  return item
+                data.productList.map((item) => {
+                  item['extField'] = item.extField || [];
+                  return item;
                 })
               );
           });
@@ -655,7 +662,7 @@
       saveDate(data) {
         data.forEach((item, index) => {
           // item['totalCount'] = item.measureQuantity;
-          this.$set(data[index],'totalCount',item.measureQuantity)
+          this.$set(data[index], 'totalCount', item.measureQuantity);
           item['orderId'] = this.orderOption[0]?.orderId;
           item['orderNo'] = this.orderOption[0]?.orderNo;
 
@@ -726,7 +733,7 @@
             if (this.form.returnSourceType != 2) {
               this.getSendSaleOrderDetail(data.sendId, 1);
             } else {
-              this.getInfo(data.entrustedReceiveId, 1);
+              this.getInfo({ id: data.entrustedReceiveId }, 1);
             }
           });
         }