Просмотр исходного кода

fix: 退货单对话框优化代码逻辑及错误提示格式

yusheng 9 месяцев назад
Родитель
Сommit
740631e72c

+ 11 - 8
src/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog.vue

@@ -696,12 +696,13 @@
         });
 
         if (type) return;
-        if (data.entrustedCode) {
-          await this.getInfo({ id: data.entrustedId });
-          this.form.returnSourceType = 2;
-          this.loading = false;
-          return;
-        }
+        // if (data.entrustedCode) {
+        //   this.form.returnSourceType = 2;
+        //   await this.getInfo({ id: data.entrustedId });
+
+        //   this.loading = false;
+        //   return;
+        // }
         this.loading = false;
         if (data) {
           this.$nextTick(() => {
@@ -859,9 +860,11 @@
               productListData.push(item.productName);
             }
           });
-          console.log(productListData)
+          console.log(productListData);
           if (productListData.length) {
-            return this.$message.error(productListData.toString() + ' 退货数量不能为空!');
+            return this.$message.error(
+              productListData.toString() + ' 退货数量不能为空!'
+            );
           }
           if (orderIds?.length) {
             commitData.orderIds = Array.from(new Set(orderIds)).toString();