YY 2 năm trước cách đây
mục cha
commit
5b27f2295b
2 tập tin đã thay đổi với 32 bổ sung36 xóa
  1. 16 18
      src/views/platmanag/sales/detail.vue
  2. 16 18
      src/views/selfShop/sales/detail.vue

+ 16 - 18
src/views/platmanag/sales/detail.vue

@@ -339,24 +339,22 @@ export default {
     },
     // 买家快递填写保存
     async customerSubmit(val) {
-      if (val.customer_transport_no && val.customer_transport_type) {
-        let info = this.info;
-        let res;
-        if (info.transport) {
-          info.transport = {
-            ...info.transport,
-            customer_transport_no: val.customer_transport_no,
-            customer_transport_type: val.customer_transport_type,
-          };
-        } else {
-          let transport = { customer_transport_no: val.customer_transport_no, customer_transport_type: val.customer_transport_type };
-          info.transport = transport;
-        }
-        if (info.id) res = await this.update(info);
-        if (this.$checkRes(res)) {
-          this.$message({ type: `success`, message: `维护信息成功` });
-          this.search();
-        }
+      let info = this.info;
+      let res;
+      if (info.transport) {
+        info.transport = {
+          ...info.transport,
+          customer_transport_no: val.customer_transport_no,
+          customer_transport_type: val.customer_transport_type,
+        };
+      } else {
+        let transport = { customer_transport_no: val.customer_transport_no, customer_transport_type: val.customer_transport_type };
+        info.transport = transport;
+      }
+      if (info.id) res = await this.update(info);
+      if (this.$checkRes(res)) {
+        this.$message({ type: `success`, message: `维护信息成功` });
+        this.search();
       }
     },
     // 保存

+ 16 - 18
src/views/selfShop/sales/detail.vue

@@ -339,24 +339,22 @@ export default {
     },
     // 买家快递填写保存
     async customerSubmit(val) {
-      if (val.customer_transport_no && val.customer_transport_type) {
-        let info = this.info;
-        let res;
-        if (info.transport) {
-          info.transport = {
-            ...info.transport,
-            customer_transport_no: val.customer_transport_no,
-            customer_transport_type: val.customer_transport_type,
-          };
-        } else {
-          let transport = { customer_transport_no: val.customer_transport_no, customer_transport_type: val.customer_transport_type };
-          info.transport = transport;
-        }
-        if (info.id) res = await this.update(info);
-        if (this.$checkRes(res)) {
-          this.$message({ type: `success`, message: `维护信息成功` });
-          this.search();
-        }
+      let info = this.info;
+      let res;
+      if (info.transport) {
+        info.transport = {
+          ...info.transport,
+          customer_transport_no: val.customer_transport_no,
+          customer_transport_type: val.customer_transport_type,
+        };
+      } else {
+        let transport = { customer_transport_no: val.customer_transport_no, customer_transport_type: val.customer_transport_type };
+        info.transport = transport;
+      }
+      if (info.id) res = await this.update(info);
+      if (this.$checkRes(res)) {
+        this.$message({ type: `success`, message: `维护信息成功` });
+        this.search();
       }
     },
     // 保存