Jelajahi Sumber

售后,不填写单号,修改状态已退货

YY 2 tahun lalu
induk
melakukan
5f0e9f1b61

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

@@ -96,6 +96,7 @@
           <steps-2
             v-if="info.type == '2'"
             @exam="exam"
+            @exam_one="exam_one"
             :active="active"
             :customer="customer"
             :activit="activit"
@@ -313,6 +314,22 @@ export default {
         }
       });
     },
+    async exam_one(status) {
+      let info = this.info;
+      info.status = status;
+      let res;
+      this.$confirm('是否确认不填写单号修改售后状态', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(async () => {
+        if (info.id) res = await this.update(info);
+        if (this.$checkRes(res)) {
+          this.$message({ type: `success`, message: `维护信息成功` });
+          this.search();
+        }
+      });
+    },
     // 远程查询快递公司
     async querySearch(value) {
       let res = await this.dictQuery({ code: 'transport_company', label: value });
@@ -322,22 +339,24 @@ export default {
     },
     // 买家快递填写保存
     async customerSubmit(val) {
-      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();
+      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();
+        }
       }
     },
     // 保存

+ 6 - 0
src/views/platmanag/sales/parts/steps-2.vue

@@ -46,6 +46,9 @@
                   </el-select>
                 </template>
               </data-form>
+              <el-col :span="24" style="text-align: center; margin-top: 15px">
+                <el-button type="warning" style="margin: 10px 0" @click="exam_one('-2')" v-if="active == 2">已退货</el-button>
+              </el-col>
             </el-col>
             <el-col :span="24" style="text-align: center; margin-top: 15px">
               <el-button type="primary" style="margin: 10px 0" @click="exam('-2')" v-if="active == 3">已退货</el-button>
@@ -123,6 +126,9 @@ export default {
     exam(status) {
       this.$emit('exam', status);
     },
+    exam_one(status) {
+      this.$emit('exam_one', status);
+    },
     getCheck() {
       return _.get(this.activit, 'customer.is_check');
     },

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

@@ -96,6 +96,7 @@
           <steps-2
             v-if="info.type == '2'"
             @exam="exam"
+            @exam_one="exam_one"
             :active="active"
             :customer="customer"
             :activit="activit"
@@ -313,6 +314,22 @@ export default {
         }
       });
     },
+    async exam_one(status) {
+      let info = this.info;
+      info.status = status;
+      let res;
+      this.$confirm('是否确认不填写单号修改售后状态', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(async () => {
+        if (info.id) res = await this.update(info);
+        if (this.$checkRes(res)) {
+          this.$message({ type: `success`, message: `维护信息成功` });
+          this.search();
+        }
+      });
+    },
     // 远程查询快递公司
     async querySearch(value) {
       let res = await this.dictQuery({ code: 'transport_company', label: value });
@@ -322,22 +339,24 @@ export default {
     },
     // 买家快递填写保存
     async customerSubmit(val) {
-      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();
+      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();
+        }
       }
     },
     // 保存

+ 6 - 0
src/views/selfShop/sales/parts/steps-2.vue

@@ -46,6 +46,9 @@
                   </el-select>
                 </template>
               </data-form>
+              <el-col :span="24" style="text-align: center; margin-top: 15px">
+                <el-button type="warning" style="margin: 10px 0" @click="exam_one('-2')" v-if="active == 2">已退货</el-button>
+              </el-col>
             </el-col>
             <el-col :span="24" style="text-align: center; margin-top: 15px">
               <el-button type="primary" style="margin: 10px 0" @click="exam('-2')" v-if="active == 3">已退货</el-button>
@@ -123,6 +126,9 @@ export default {
     exam(status) {
       this.$emit('exam', status);
     },
+    exam_one(status) {
+      this.$emit('exam_one', status);
+    },
     getCheck() {
       return _.get(this.activit, 'customer.is_check');
     },