Explorar o código

fix(销售管理): 优化退货商品弹窗逻辑,修复参数格式和条件判断

yusheng hai 7 meses
pai
achega
85dac802ff

+ 5 - 4
src/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog.vue

@@ -752,7 +752,7 @@
       },
 
       //打开新增编辑弹框
-      async open(type, row, sendId,isEntrustedReceive) {
+      async open(type, row, sendId, isEntrustedReceive) {
         this.title = type === 'add' ? '新增' : '修改';
         this.row = row;
         this.visible = true;
@@ -763,11 +763,12 @@
         if (row && row?.id) {
           await this.getReturnSaleOrderrecordDetail(row?.id);
         }
-        if (sendId&&!isEntrustedReceive) {
+        if (sendId && !isEntrustedReceive) {
           await this.getSendSaleOrderDetail(sendId);
-        }else{
+        }
+        if (sendId && isEntrustedReceive) {
           this.form.returnSourceType = 2;
-          await this.getInfo({id:sendId})
+          await this.getInfo({ id: sendId });
         }
         this.isUpdate = type != 'add';
       },