xiaodai2022 2 years ago
parent
commit
c4f634a891

+ 9 - 9
src/views/sellOut/returnOrder/components/auditForm.vue

@@ -54,11 +54,11 @@
       </el-col>
 
       <el-col :span="16">
-        <el-form-item label="审核备注" prop="remark">
+        <el-form-item label="审核备注" prop="status_remark">
           <el-input
             type="textarea"
             placeholder="请输入审核备注"
-            v-model="ruleForm.remark"
+            v-model="ruleForm.status_remark"
             :disabled="
               !(status === '3' && powers.some((item) => item == '043'))
             "
@@ -330,7 +330,7 @@ export default {
         thNo: "",
         state: "1",
         rebut: "",
-        remark: "",
+        status_remark: "",
         companyNo: "",
         can_sell_num: "0",
         can_sell_wsm_com: [],
@@ -365,7 +365,7 @@ export default {
             message: "请选择驳回节点",
           },
         ],
-        remark: [
+        status_remark: [
           {
             required: true,
             trigger: "blur",
@@ -471,7 +471,7 @@ export default {
             can_sell_num,
             defective_num,
             defective_wsm_name,
-            remark,
+            status_remark,
             loss_num,
           } = this.sitem;
 
@@ -482,7 +482,7 @@ export default {
 
             state: status === "4" ? "1" : "1",
             rebut: "",
-            remark: remark || "",
+            status_remark: status_remark || "",
             companyNo: companyNo || "",
             can_sell_num: can_sell_num || "0",
             can_sell_wsm_com: can_sell_wsm_supplierNo
@@ -522,7 +522,7 @@ export default {
       this.rulesThis.defective_wsm[0].required = state === "1";
 
       this.rulesThis.rebut[0].required = state !== "1";
-      this.rulesThis.remark[0].required = state !== "1";
+      this.rulesThis.status_remark[0].required = state !== "1";
     },
     num_change(e, key) {
       this.ruleForm[key] = e + "";
@@ -535,7 +535,7 @@ export default {
           const {
             thNo,
             state,
-            remark,
+            status_remark,
             can_sell_wsm_code,
             can_sell_num,
             defective_wsm_code,
@@ -546,7 +546,7 @@ export default {
           let model = {
             thNo,
             status: state === "1" ? "4" : rebut,
-            remark,
+            status_remark,
             can_sell_wsm: can_sell_wsm_code,
             defective_wsm: defective_wsm_code,
             can_sell_num,

+ 41 - 35
src/views/sellOut/returnOrder/components/returnCheck.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-row class="addForm">
+  <el-row class="addForm" v-loading="loading">
     <el-col :span="24">
       <el-form
         :model="tableForm"
@@ -223,42 +223,48 @@ export default {
     },
 
     async submitForm() {
-      let index = -1;
-      this.tableForm.product_go.forEach((v, i) => {
-        if (v.edit && index === -1) {
-          index = i;
+      if (!this.loading) {
+        this.loading = true;
+
+        let index = -1;
+        this.tableForm.product_go.forEach((v, i) => {
+          if (v.edit && index === -1) {
+            index = i;
+          }
+        });
+        if (index !== -1) {
+          this.$message.warning("当前已有商品正在编辑!");
+          this.loading = false;
+          return;
         }
-      });
-      if (index !== -1) {
-        this.$message.warning("当前已有商品正在编辑!");
-        return;
-      }
-      let arr = [];
-      let model = JSON.parse(JSON.stringify(this.tableForm));
-      model.product_go.map((ele) => {
-        let obj = {
-          id: ele.id,
-          remark: ele.anomalous_remark,
-          status: ele.check_value,
-        };
-        arr.push(obj);
-      });
-      let _model = {
-        thNo: this.thNo,
-        errorlist: arr,
-        status: "3", //1待验货2待验货审核3待业务审核4完成 this.status + 1
-      };
-      const res = await asyncRequest.check(_model);
-      if (res && res.code === 0) {
-        this.$notify.success({
-          title: res.message,
-          message: "",
+        let arr = [];
+        let model = JSON.parse(JSON.stringify(this.tableForm));
+        model.product_go.map((ele) => {
+          let obj = {
+            id: ele.id,
+            remark: ele.anomalous_remark,
+            status: ele.check_value,
+          };
+          arr.push(obj);
         });
-        this.$emit("refresh");
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
+        let _model = {
+          thNo: this.thNo,
+          errorlist: arr,
+          status: "3", //1待验货2待验货审核3待业务审核4完成 this.status + 1
+        };
+        const res = await asyncRequest.check(_model);
+        this.loading = false;
+        if (res && res.code === 0) {
+          this.$notify.success({
+            title: res.message,
+            message: "",
+          });
+          this.$emit("refresh");
+        } else if (res && res.code >= 100 && res.code <= 104) {
+          await this.logout();
+        } else {
+          this.$message.warning(res.message);
+        }
       }
     },
     //异常原因筛选

+ 10 - 11
src/views/sellOut/sellReturn/components/addModel.vue

@@ -150,7 +150,7 @@
                     v-model="ruleForm.good_num"
                     :disabled="true"
                     placeholder="购买数量"
-                     maxlength="10"
+                    maxlength="10"
                   ></el-input>
                 </el-form-item>
               </el-col>
@@ -159,16 +159,16 @@
                   <el-input
                     v-model="ruleForm.returnT"
                     :disabled="true"
-                     maxlength="10"
+                    maxlength="10"
                     placeholder="可退数量"
                   ></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="6" v-show="ruleForm.return_type === '1'">
-                <el-form-item label="未发数量" prop="thnum">
+                <el-form-item label="退货数量" prop="thnum">
                   <digital-input
                     :values="ruleForm.thnum"
-                    :placeholder="'未发数量'"
+                    :placeholder="'退货数量'"
                     :min="0"
                     :disabled="false"
                     :max="ruleForm.returnT"
@@ -253,7 +253,7 @@ export default {
         thnum: [
           {
             required: true,
-            message: "请输入未发数量",
+            message: "请输入退货数量",
             trigger: "blur",
           },
         ],
@@ -304,14 +304,13 @@ export default {
       this.loading = false;
     },
     async number_change(e, key, index) {
-      if (index !== null) {
-        this.get_product_go[index][key] = e + "" || "0";
-        this.$set(this.get_product_go, index, this.get_product_go[index]);
-      } else {
+      if (index === undefined) {
         this.ruleForm[key] = e + "" || "0";
         this.$refs.ruleForm.validateField(key);
+      } else {
+        this.get_product_go[index][key] = e + "" || "0";
+        this.$set(this.get_product_go, index, this.get_product_go[index]);
       }
-      // this.get_product_go[index][key]=e + "" || "0"
     },
     return_type_change() {
       const { return_type } = this.ruleForm;
@@ -422,7 +421,7 @@ export default {
           this.loading = false;
           if (res && res.code === 0) {
             this.$notify.success({
-              title:"添加成功",
+              title: "添加成功",
               message: "",
             });
             this.showModelThis = false;