zhangjinxing 3 years ago
parent
commit
2fe6e6dfe9

+ 10 - 0
src/apis/components/search-express.js

@@ -0,0 +1,10 @@
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+    //省份列表
+    provinceList: (data, params) => http(api + "province", data, "post", params),
+    // 城市列表
+    cityList: (data, params) => http(api + "city", data, "post", params),
+    // 县级区级列表
+    areaList: (data, params) => http(api + "area", data, "post", params),
+};

+ 26 - 26
src/components/globalComponents/search-express/main.vue

@@ -26,7 +26,7 @@
 </template>
 
 <script>
-// import asyncRequest from "@/apis/components/search-customer";
+import asyncRequest from "@/apis/components/search-express";
 import resToken from "@/mixins/resToken";
 export default {
   name: "SearchExpress",
@@ -109,31 +109,31 @@ export default {
         this.$emit("searchChange", {});
       }
     },
-    // async remoteMethod(query) {
-    //   this.selectLoading = true;
-    //   if (query !== "") {
-    //     this.options = [];
-    //     let formValue = {//看接口入参字段
-    //       page: 1,
-    //       size: 100,
-    //       companyName: query,
-    //       companyNo: "",
-    //       itemid: "",
-    //     };
-    //     let res = await asyncRequest.list(formValue);
-    //     if (res && res.code === 0 && res.data) {
-    //       const { item } = res.data;
-    //       this.options = item;
-    //     } else if (res && res.code >= 100 && res.code <= 104) {
-    //       await this.logout();
-    //     } else {
-    //       this.$message.warning(res.message);
-    //     }
-    //   } else {
-    //     this.options = [];
-    //   }
-    //   this.selectLoading = false;
-    // },
+    async remoteMethod(query) {
+      this.selectLoading = true;
+      if (query !== "") {
+        this.options = [];
+        let formValue = {//看接口入参字段
+          page: 1,
+          size: 100,
+          companyName: query,
+          companyNo: "",
+          itemid: "",
+        };
+        let res = await asyncRequest.list(formValue);
+        if (res && res.code === 0 && res.data) {
+          const { item } = res.data;
+          this.options = item;
+        } else if (res && res.code >= 100 && res.code <= 104) {
+          await this.logout();
+        } else {
+          this.$message.warning(res.message);
+        }
+      } else {
+        this.options = [];
+      }
+      this.selectLoading = false;
+    },
   },
 };
 </script>

+ 1 - 0
src/views/sellOut/goodsService/columns.js

@@ -2,6 +2,7 @@ export default [
     {
           prop: "service_list",
           label: "售后申请单",
+          
         },
         {
           prop: "confirm_numbers",

+ 5 - 1
src/views/sellOut/goodsService/components/addEdit.vue

@@ -12,10 +12,12 @@
     element-loading-background="rgba(0, 0, 0, 0.8)"
     @close="closeModel"
   >
+    <!-- {{ sitem }} -->
     <el-card style="margin-top: -20px" v-loading="loading">
       <add-edit-form
         v-if="showModel"
         :id="id"
+        :sitem="sitem"
         :show-model="showModel"
         :is-detail="isDetail"
         @closeModel="handClick"
@@ -28,12 +30,13 @@
 import addEditForm from "./addEditForm.vue";
 export default {
   name: "handover",
-  props: ["showModel", "id", "isDetail"],
+  props: ["showModel", "id", "isDetail", "sitem"],
   components: {
     addEditForm,
   },
   data() {
     return {
+      sitem: null,
       title: "",
       showModelThis: this.showModel,
     };
@@ -58,6 +61,7 @@ export default {
     async initForm() {
       this.loading = true;
       console.log(this.id);
+
       if (this.id === "add") {
         this.title = "新建售后申请";
         this.rulesThis = this.rules;

+ 57 - 74
src/views/sellOut/goodsService/components/addEditForm.vue

@@ -9,6 +9,7 @@
     style="width: 100%"
     class="demo-ruleForm"
   >
+    {{ ruleForm }}
     <el-row>
       <!-- <el-col :span="24">
         <el-form-item label="出库单编号">
@@ -262,22 +263,17 @@ export default {
       }
     },
   },
-  mounted() {
-    console.log(this.id);
-  },
   created() {
-    this.getReason();
+    this.getReason(); //获取异常原因
     this.initForm();
   },
   watch: {
     id: function (val) {
-      console.log(val);
       if (val) {
         this.initForm();
       }
     },
     newTime: function (val) {
-      console.log(val);
       if (val) {
         this.initForm();
       }
@@ -308,35 +304,42 @@ export default {
       this.loading = false;
     },
     async initData() {
-      console.log(this.sitem);
-      let { anomalous_numbers, anomalous_reason, expect_wish, remark, image } =
-        this.sitem;
-      this.ruleForm = {
-        stock_out_numbers: "", //出库单编号
-        anomalous_numbers: anomalous_numbers, //异常数量
-        anomalous_reason: anomalous_reason, //异常原因
-        expect_wish: expect_wish, //期望意愿
-        anomalous_images: [image],
-        anomalous_remark: remark, //异常备注
-      };
-      const res = await asyncRequest.detail({ id: this.id });
-      if (res && res.code === 0 && res.data) {
-        let { hand_name, resign_name, hand_uid, resign_uid, status } = res.data;
-        this.resign_name = resign_name;
-        this.hand_name = hand_name;
-        this.status = status;
+      if (this.sitem) {
+        let {
+          anomalous_numbers,
+          anomalous_reason,
+          expect_wish,
+          remark,
+          image,
+        } = this.sitem;
         this.ruleForm = {
           stock_out_numbers: "", //出库单编号
-          anomalous_numbers: this.sitem.anomalous_numbers, //异常数量
-          anomalous_reason: this.sitem.anomalous_reason, //异常原因
-          expect_wish: this.sitem.expect_wish, //期望意愿
-          anomalous_images: [],
-          anomalous_remark: this.sitem.remark, //异常备注
+          anomalous_numbers: anomalous_numbers, //异常数量
+          anomalous_reason: anomalous_reason, //异常原因
+          expect_wish: expect_wish, //期望意愿
+          anomalous_images: [image],
+          anomalous_remark: remark, //异常备注
+        };
+        const res = await asyncRequest.detail({ id: this.id });
+        if (res && res.code === 0 && res.data) {
+          let { hand_name, resign_name, hand_uid, resign_uid, status } =
+            res.data;
+          this.resign_name = resign_name;
+          this.hand_name = hand_name;
+          this.status = status;
+          this.ruleForm = {
+            stock_out_numbers: "", //出库单编号
+            anomalous_numbers: this.sitem.anomalous_numbers, //异常数量
+            anomalous_reason: this.sitem.anomalous_reason, //异常原因
+            expect_wish: this.sitem.expect_wish, //期望意愿
+            anomalous_images: [],
+            anomalous_remark: this.sitem.remark, //异常备注
+          };
+        } else if (res && res.code >= 100 && res.code <= 104) {
+          await this.logout();
+        } else {
+          this.$message.warning(res.message);
         };
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
       }
     },
 
@@ -361,46 +364,30 @@ export default {
     async submitForm() {
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
-          const { resign_uid, hand_uid } = this.ruleForm;
-          let rUid = resign_uid.toString(),
-            hUid = hand_uid.toString();
-          if (rUid === hUid) {
-            this.$message.error("离职人和接收人不能相同");
-            return;
-          }
-          this.loading = true;
-          const model = {
-            id: this.id,
-            resign_uid: rUid,
-            hand_uid: hUid,
-          };
-          let res = {};
-          if (this.id === "add") {
-            delete model["id"];
-            res = await asyncRequest.add(model);
-          } else {
-            res = await asyncRequest.update(model);
+          const { anomalous_numbers } = this.ruleForm;
+          if (this.sitem.send_num < anomalous_numbers) {
+            this.$message.warning("异常数量不能大于发货数量");
+            return false;
           }
+          console.log("调接口");
+          // if (res && res.code === 0) {
+          //   const title = this.id === "add" ? "添加成功!" : "修改成功!";
+          //   this.$notify.success({
+          //     title,
+          //     message: "",
+          //   });
 
-          this.loading = false;
-          if (res && res.code === 0) {
-            const title = this.id === "add" ? "添加成功!" : "修改成功!";
-            this.$notify.success({
-              title,
-              message: "",
-            });
-
-            if (this.id === "add") {
-              this.showModelThis = false;
-              this.$emit("refresh", false);
-            } else {
-              this.initForm();
-            }
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(res.message);
-          }
+          //   if (this.id === "add") {
+          //     this.showModelThis = false;
+          //     this.$emit("refresh", false);
+          //   } else {
+          //     this.initForm();
+          //   }
+          // } else if (res && res.code >= 100 && res.code <= 104) {
+          //   await this.logout();
+          // } else {
+          //   this.$message.warning(res.message);
+          // }
         } else {
           console.log("error submit!!");
           return false;
@@ -475,8 +462,6 @@ export default {
       const res = await asyncRequest.reasonList(model);
       this.loading = false;
       if (res && res.code === 0) {
-        console.log(res.data);
-
         this.reason_options = res.data.list;
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
@@ -501,10 +486,8 @@ export default {
     },
     //图片上传成功
     UploadSuccessEvent(data) {
-      console.log(data);
       if (data && data.url && data.url !== "break") {
         const { url } = data.url;
-        console.log(url);
         this.ruleForm.anomalous_images.push(url);
         this.$message.success("图片上传成功!");
         this.$refs.ruleForm.validateField("anomalous_images");

+ 1 - 8
src/views/sellOut/goodsService/components/purchase_check.vue

@@ -232,22 +232,17 @@ export default {
       }
     },
   },
-  // mounted() {
-  //   console.log(this.id);
-  //   this.initForm();
-  // },
+
   created() {
     this.initForm();
   },
   watch: {
     id: function (val) {
-      console.log(val);
       if (val) {
         this.initForm();
       }
     },
     newTime: function (val) {
-      console.log(val);
       if (val) {
         this.initForm();
       }
@@ -339,10 +334,8 @@ export default {
       });
     },
     handleStore(e) {
-      console.log(e);
       this.return_store_options.find((item) => {
         if (item.value === e) {
-          console.log(item);
           this.ruleForm.return_goods_addr = item.return_goods_addr;
           this.ruleForm.addr_detail = item.addr_detail;
           this.ruleForm.addressee = item.addressee;

+ 1 - 16
src/views/sellOut/goodsService/components/returnExpress.vue

@@ -90,7 +90,6 @@ export default {
       if (value === "") {
         callback(new Error("物流单号不能为空!"));
       } else {
-        console.log(value);
         if (!isAlphanumeric(value)) {
           callback(new Error("物流单号格式不正确!"));
         } else {
@@ -102,7 +101,6 @@ export default {
       if (value === "") {
         callback(new Error("物流费用不能为空!"));
       } else {
-        console.log(value);
         if (!isnumber(value)) {
           callback(new Error("物流费用只能为数字!"));
         } else {
@@ -183,22 +181,17 @@ export default {
       }
     },
   },
-  // mounted() {
-  //   console.log(this.id);
-  //   this.initForm();
-  // },
+
   created() {
     this.initForm();
   },
   watch: {
     id: function (val) {
-      console.log(val);
       if (val) {
         this.initForm();
       }
     },
     newTime: function (val) {
-      console.log(val);
       if (val) {
         this.initForm();
       }
@@ -294,7 +287,6 @@ export default {
       });
     },
     handleCompany(e) {
-      console.log(e);
       if (e && e.code) {
         this.ruleForm.express_company = [e.code];
         this.ruleForm.page = 1;
@@ -302,13 +294,6 @@ export default {
         console.log(this.ruleForm);
       }
     },
-    //退货省市区
-    selectAreaAddr_code(e) {
-      console.log(e);
-      this.ruleForm.return_goods_addr = e;
-      console.log(this.ruleForm);
-      this.$refs.ruleForm.validateField("return_goods_addr");
-    },
   },
 };
 </script>

+ 44 - 72
src/views/sellOut/goodsService/components/supplier_feedback.vue

@@ -90,8 +90,6 @@
         <el-button type="primary" @click="submitForm" v-if="true"
           >保 存</el-button
         >
-        <!-- id === 'add' ||
-            (status === '0' && powers.some((item) => item == '005')) -->
         <el-button
           type="primary"
           @click="statusConfirm('1', '发起审核流程')"
@@ -148,8 +146,6 @@ export default {
       loading: false,
       status: "", //存储详情接口返的状态
       showModelThis: this.showModel,
-      resign_name: "", //离职人
-      hand_name: "", //交接人
       ruleForm: {
         whether_back: "", //是否同意退回
         feedback_remark: "", //反馈备注
@@ -213,8 +209,6 @@ export default {
           },
         ],
       },
-      reason_options: [],
-      reason_value: "", //异常原因
       whether_back_options: [
         {
           value: "value1",
@@ -225,7 +219,6 @@ export default {
           label: "拒绝退回",
         },
       ],
-      expect_value: "", //期望意愿
     };
   },
   computed: {
@@ -241,40 +234,28 @@ export default {
       }
     },
   },
-  // mounted() {
-  //   console.log(this.id);
-  //   this.initForm();
-  // },
   created() {
     this.initForm();
   },
   watch: {
     id: function (val) {
-      console.log(val);
       if (val) {
         this.initForm();
       }
     },
     newTime: function (val) {
-      console.log(val);
       if (val) {
         this.initForm();
       }
     },
   },
   methods: {
-    //   关闭弹窗,直接隐藏表单
-    // async closeAddEdit() {
-    //   this.$emit("closeModel", false); //抛出一个事件,关闭弹窗
-    //
-    // },
     closeAdd() {
       this.showModelThis = false;
     },
     async initForm() {
       this.loading = true;
       if (this.id === "add") {
-        this.status = "";
         this.rulesThis = this.rules;
         await this.resetForm();
       } else {
@@ -303,9 +284,6 @@ export default {
     // },
 
     async resetForm() {
-      this.resign_name = "";
-      this.hand_name = "";
-      this.status = "";
       // 重置
       await this.$nextTick(() => {
         if (this.$refs.ruleForm) {
@@ -325,68 +303,62 @@ export default {
     },
     async submitForm() {
       await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          const { resign_uid, hand_uid } = this.ruleForm;
-          let rUid = resign_uid.toString(),
-            hUid = hand_uid.toString();
-          if (rUid === hUid) {
-            this.$message.error("离职人和接收人不能相同");
-            return;
-          }
-          this.loading = true;
-          const model = {
-            id: this.id,
-            resign_uid: rUid,
-            hand_uid: hUid,
-          };
-          let res = {};
-          if (this.id === "add") {
-            delete model["id"];
-            res = await asyncRequest.add(model);
-          } else {
-            res = await asyncRequest.update(model);
-          }
+        // if (valid) {
+        //   const { resign_uid, hand_uid } = this.ruleForm;
+        //   let rUid = resign_uid.toString(),
+        //     hUid = hand_uid.toString();
+        //   if (rUid === hUid) {
+        //     this.$message.error("离职人和接收人不能相同");
+        //     return;
+        //   }
+        //   this.loading = true;
+        //   const model = {
+        //     id: this.id,
+        //     resign_uid: rUid,
+        //     hand_uid: hUid,
+        //   };
+        //   let res = {};
+        //   if (this.id === "add") {
+        //     delete model["id"];
+        //     res = await asyncRequest.add(model);
+        //   } else {
+        //     res = await asyncRequest.update(model);
+        //   }
 
-          this.loading = false;
-          if (res && res.code === 0) {
-            const title = this.id === "add" ? "添加成功!" : "修改成功!";
-            this.$notify.success({
-              title,
-              message: "",
-            });
+        //   this.loading = false;
+        //   if (res && res.code === 0) {
+        //     const title = this.id === "add" ? "添加成功!" : "修改成功!";
+        //     this.$notify.success({
+        //       title,
+        //       message: "",
+        //     });
 
-            if (this.id === "add") {
-              this.showModelThis = false;
-              this.$emit("refresh", false);
-            } else {
-              this.initForm();
-            }
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(res.message);
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
+        //     if (this.id === "add") {
+        //       this.showModelThis = false;
+        //       this.$emit("refresh", false);
+        //     } else {
+        //       this.initForm();
+        //     }
+        //   } else if (res && res.code >= 100 && res.code <= 104) {
+        //     await this.logout();
+        //   } else {
+        //     this.$message.warning(res.message);
+        //   }
+        // } else {
+        //   console.log("error submit!!");
+        //   return false;
+        // }
       });
     },
     handleView(e) {
-      console.log(e);
       this.ruleForm.whether_back = e;
       this.$refs.ruleForm.validateField("return_goods_addr");
     },
     //退货省市区
     selectAreaAddr_code(e) {
-      console.log(e);
       this.ruleForm.return_goods_addr = e;
-      console.log(this.ruleForm);
       this.$refs.ruleForm.validateField("return_goods_addr");
     },
   },
 };
-</script>
-
-<style lang="scss" scoped>
-</style>
+</script>

+ 9 - 7
src/views/sellOut/goodsService/index.vue

@@ -86,7 +86,7 @@
                     </el-option>
                   </el-select>
                 </el-col>
-                <el-col :span="3" style="width: 66px; float: right">
+                <!-- <el-col :span="3" style="width: 66px; float: right">
                   <el-button
                     :size="searchSize"
                     type="primary"
@@ -95,7 +95,7 @@
                   >
                     新建
                   </el-button>
-                </el-col>
+                </el-col> -->
 
                 <el-col :span="3" style="width: 66px; float: right">
                   <el-button
@@ -256,8 +256,12 @@ export default {
       sitem: null,
       // 状态
       statusOptions: [
-        { id: "0", label: "禁用" },
-        { id: "1", label: "启用" },
+        { id: "0", label: "取消" },
+        { id: "1", label: "发起" },
+        { id: "2", label: "反馈物流费" },
+        { id: "3", label: "同意下单" },
+        { id: "4", label: "发货中" },
+        { id: "5", label: "已发货" },
       ],
       statusList: statusList,
       loading: true,
@@ -293,9 +297,6 @@ export default {
             "http://www.stock.com/storage/topic/20211110/微信图片_20210914181255_20211110195520.png",
         },
       ],
-      passwordModel: false,
-      passwordModelId: 0,
-      isPasswordDetail: false,
       // 表格 - 数据
       // tableData: [],
       // 表格 - 参数
@@ -432,6 +433,7 @@ export default {
           console.log("取消");
         });
     },
+    // 列表搜索
     async searchList() {
       // this.loading = true;
       // console.log(this.parmValue);

+ 5 - 35
src/views/sellOut/goodsService/serviceDetail.vue

@@ -6,7 +6,6 @@
     >
       <div class="detail-page-title">
         <span class="title">售后申请详情</span>
-
         <add-edit-form :sitem="sitem"></add-edit-form>
       </div>
       <el-collapse v-model="activeNames">
@@ -67,54 +66,25 @@ export default {
   },
   data() {
     return {
-      activeNames: ["0", "1", "2", "3", "4",],
+      activeNames: ["0", "1", "2", "3", "4"],
       sitem: null,
-      statusList: [
-        // {
-        //   code: "0",
-        //   label: "待同意发货",
-        // },
-        // {
-        //   code: "1",
-        //   label: "待发货",
-        // },
-        // {
-        //   code: "2",
-        //   label: "部分发货",
-        // },
-        // {
-        //   code: "3",
-        //   label: "发货完成",
-        // },
-      ],
+      statusList: [],
       sitem: null,
-      status: "",
       newTime: "",
       loading: false,
-      queryId: "",
-      options: [
-        {
-          value: "选项1",
-          label: "同意退回",
-        },
-        {
-          value: "选项2",
-          label: "拒绝退回",
-        },
-      ],
-      value: "",
     };
   },
   mounted() {
     this.sitem = this.$route.query.id;
-    
   },
   methods: {
     getNewTime() {
       this.newTime = new Date().valueOf();
     },
+    examForm(e) {
+      console.log(e);
+    },
   },
-  examForm(){},
 };
 </script>
    

+ 32 - 31
src/views/sellOut/returnOrder/components/return-record.vue

@@ -121,6 +121,7 @@
                         }"
                       >
                         <el-input
+                          placeholder="异常备注"
                           :disabled="!scope.row.edit"
                           v-model="scope.row.anomalous_remark"
                         ></el-input>
@@ -168,7 +169,12 @@
                           @click="checkRow(scope.$index)"
                         ></i>
                       </el-tooltip>
-                      <el-tooltip effect="dark" content="重置" placement="top">
+                      <el-tooltip
+                        v-if="scope.row.edit"
+                        effect="dark"
+                        content="重置"
+                        placement="top"
+                      >
                         <i
                           class="el-icon-refresh-left tb-icon"
                           @click="resetRow(scope.$index)"
@@ -185,7 +191,7 @@
     </el-row>
 
     <el-row>
-      <el-col :span="24" style="text-align: right; margin: 30px 0 10px 0">
+      <el-col :span="24" style="text-align: right; margin: 10px 0 20px 0">
         <el-button type="primary" class="fr" :size="'mini'" @click="submitForm"
           >保 存
         </el-button>
@@ -219,13 +225,12 @@
         >
       </el-col>
     </el-row>
-    showModel{{ showModel }}--
     <add-edit
       :id="modelId"
       :sitem="sitem"
       :show-model="showModel"
       @refresh="handleValue"
-      @cancel="handleCancel"
+      @cancel="showModel = false"
     />
   </el-form>
 </template>
@@ -272,7 +277,6 @@ export default {
       loading: false,
       status: "", //存储详情接口返的状态
       showModel: null,
-      // showModelThis: this.showModel,
       ruleForm: {
         get_goods_numbers: "", //收货总数量
         can_sell_numbers: "", //可销售数量
@@ -377,32 +381,28 @@ export default {
           const { get_goods_numbers, can_sell_numbers } = this.ruleForm;
           if (get_goods_numbers === can_sell_numbers) {
             // 直接提交
+            console.log("submit");
+          } else if (+get_goods_numbers < +can_sell_numbers) {
+            console.log(+get_goods_numbers, +can_sell_numbers);
+            this.$message.warning("可销售数量不能大于收货总数量!");
           } else {
             this.tableForm.product_go.forEach((item) => {
               if (!item.edit) {
                 this.edit = true;
               }
-              this.totalNumber += item.anomalous_numbers;
+              this.totalNumber += Number(item.anomalous_numbers);
             });
-            // 如果edit是true,就提交
-            console.log(
-              +this.totalNumber,
-              +can_sell_numbers,
-              +get_goods_numbers
-            );
-            console.log(this.edit);
-          }
-          console.log(this.edit);
-          console.log(+this.totalNumber, +can_sell_numbers, +get_goods_numbers);
-          console.log();
-          if (
-            this.edit &&
-            +this.totalNumber + +can_sell_numbers == +get_goods_numbers
-          ) {
-            console.log("submit");
-          } else {
-            this.$message.warning("请填写异常数量!");
+            if (
+              this.edit &&
+              +this.totalNumber + +can_sell_numbers == +get_goods_numbers
+            ) {
+              console.log("submit");
+            } else {
+              this.$message.warning("异常数量不正确或者当前表格在编辑!");
+            }
+            this.totalNumber = 0;
           }
+
           this.totalNumber = 0;
           // if (!this.tableForm.product_go.edit) {
           //   console.log(this.$refs.ruleForm);
@@ -461,6 +461,10 @@ export default {
     checkRow(rowIndex) {
       const { anomalous_numbers, anomalous_reason_code, anomalous_remark } =
         this.tableForm.product_go[rowIndex];
+      if (anomalous_numbers == "" && anomalous_remark == "") {
+        this.$message.warning("异常数量和异常备注不能为空!");
+        return;
+      }
       if (!isnumber(anomalous_numbers)) {
         this.$message.warning("异常数量必须为整数!");
         return;
@@ -480,7 +484,7 @@ export default {
         this.$message.warning("异常备注字数不能超过250个!");
       }
       if (anomalous_numbers == 0) {
-        this.$message.warning("异常数量为零,不用选择异常原因!");
+        this.$message.info("异常数量为零,不用选择异常原因!");
         this.tableForm.product_go[rowIndex].edit = false;
         return;
       }
@@ -505,8 +509,9 @@ export default {
     },
     //重置行内参数
     resetRow(rowIndex) {
-      console.log(rowIndex);
-      console.log(this.voList);
+      this.tableForm.product_go[rowIndex].anomalous_numbers = "";
+      this.tableForm.product_go[rowIndex].anomalous_reason_code = "";
+      this.tableForm.product_go[rowIndex].anomalous_remark = "";
     },
     //
     openModal(code, btn_code) {
@@ -514,7 +519,6 @@ export default {
       this.btn_code = btn_code;
       this.modelId = code;
       this.showModel = true;
-      console.log(this.showModel, "this.showModel");
     },
     // 获取弹窗的值
     handleValue(e) {
@@ -543,9 +547,6 @@ export default {
       });
       this.voList = [];
     },
-    handleCancel(e) {
-      this.showModel = false;
-    },
   },
 };
 </script>

+ 6 - 22
src/views/sellOut/returnOrder/components/returnCheck.vue

@@ -23,11 +23,6 @@
                 <el-form-item
                   :style="!scope.row.edit ? 'margin:0' : ''"
                   :prop="'product_go.' + scope.$index + '.anomalous_numbers'"
-                  :rules="{
-                    required: true,
-                    message: '异常数量不能为空',
-                    trigger: 'blur',
-                  }"
                 >
                   <p>
                     {{ scope.row.anomalous_numbers }}
@@ -70,11 +65,6 @@
                 <el-form-item
                   :style="!scope.row.edit ? 'margin:0' : ''"
                   :prop="'product_go.' + scope.$index + '.anomalous_remark'"
-                  :rules="{
-                    required: true,
-                    message: '异常备注不能为空',
-                    trigger: 'blur',
-                  }"
                 >
                   <p>{{ scope.row.anomalous_remark }}</p>
                 </el-form-item>
@@ -150,6 +140,7 @@
 
                 <el-tooltip effect="dark" content="重置" placement="top">
                   <i
+                    v-if="scope.row.edit"
                     class="el-icon-refresh-left tb-icon"
                     @click="resetRow(scope.$index)"
                   ></i>
@@ -228,7 +219,6 @@ export default {
     },
   },
   mounted() {
-    console.log(this.sitem);
     this.initForm();
   },
   methods: {
@@ -246,11 +236,8 @@ export default {
           this.$refs.tableForm.resetFields();
           this.$refs.tableForm.clearValidate();
           let list = JSON.parse(JSON.stringify(this.voList));
-          console.log(list);
           list.forEach((v) => {
             v.edit = false;
-            // console.log(this.tableForm.product_go);
-            // console.log(v);
             this.tableForm.product_go.push(v);
           });
         }
@@ -258,10 +245,7 @@ export default {
     },
 
     async submitForm() {
-      console.log(this.tableForm.product_go);
-      const {edit} = this.tableForm.product_go;
-      let index = -1,
-        good = [];
+      let index = -1;
       this.tableForm.product_go.forEach((v, i) => {
         if (v.edit && index === -1) {
           index = i;
@@ -275,8 +259,6 @@ export default {
     //异常原因筛选
     //保存某一行
     checkRow(rowIndex) {
-      //   console.log(rowIndex);
-      console.log(this.tableForm.product_go[rowIndex]);
       const { check_value, check_remark } = this.tableForm.product_go[rowIndex];
       if (check_value != "" && check_remark != "") {
         this.tableForm.product_go[rowIndex].edit = false;
@@ -287,15 +269,17 @@ export default {
     //编辑某一行
     editRow(rowIndex) {
       let index = this.tableForm.product_go.findIndex((v) => v.edit);
-      console.log(index);
       if (index !== -1) {
         this.$message.warning("请完成其他行的编辑!");
         return;
       } else {
-        console.log(this.tableForm.product_go[rowIndex]);
         this.tableForm.product_go[rowIndex].edit = true;
       }
     },
+    resetRow(rowIndex) {
+      this.tableForm.product_go[rowIndex].check_remark = "";
+      this.tableForm.product_go[rowIndex].check_value = "agree";
+    },
   },
 };
 </script>

+ 141 - 43
src/views/sellOut/salesOrder/components/order-out-table.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="outOrderTable">
     <el-table
+      ref="addrForm"
       :data="tableData"
       border
       :size="'mini'"
@@ -9,44 +10,115 @@
     >
       <el-table-column
         show-overflow-tooltip
-        prop="receipt_quantity"
-        label="收货总数"
-        width="110"
+        prop="orderCode"
+        label="出库订单号"
+        width="150"
       />
 
       <el-table-column
         show-overflow-tooltip
-        prop="arrive_time"
-        label="最晚收货日期"
-        width="145"
+        prop="outCode"
+        label="出库单号"
+        width="150"
       />
       <el-table-column
         show-overflow-tooltip
-        prop="contactor"
-        label="收件联系人"
+        prop="apply_name"
+        label="申请人名称"
         width="85"
       />
 
       <el-table-column
         show-overflow-tooltip
-        prop="mobile"
-        label="收货联系电话"
+        prop="post_name"
+        label="物流公司"
         width="110"
       />
       <el-table-column
         show-overflow-tooltip
-        prop="addr_code"
-        label="收货省市区"
-        min-width="230"
+        prop="post_code"
+        label="物流单号"
+        width="160"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="post_fee"
+        label="预计物流费"
+        width="100"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="status"
+        label="状态"
+        width="80"
+      >
+        <template slot-scope="scope">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.status == '0' ? 'warning' : ''"
+            v-text="
+              (statusOptions.find((item) => item.id == scope.row.status) || {})
+                .label || '--'
+            "
+          ></el-tag>
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        show-overflow-tooltip
+        prop="sendtime"
+        label="发货时间"
+        min-width="170"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="send_num"
+        label="	发货数量"
+        width="80"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="check_num"
+        label="验收数量"
+        width="80"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="addr_info"
+        label="省市区"
+        min-width="170"
       />
       <el-table-column
         show-overflow-tooltip
         prop="addr"
-        label="详细地址"
+        label="收货地址"
+        min-width="170"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="contact"
+        label="联系人"
+        width="80"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="mobile"
+        label="联系电话"
+        width="110"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="wsm_supplier"
+        label="供应商"
+        min-width="220"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="wsm_supplierNo"
+        label="仓库供应商"
         min-width="170"
       />
 
-      <el-table-column prop="post_fee" label="预计物流费用" min-width="170" />
       <!-- v-if="status === '0' && powers.some((item) => item == '005')" -->
       <el-table-column fixed="right" width="80">
         <template slot="header" slot-scope="scope">
@@ -63,8 +135,12 @@
               style="color: #63cbe7"
               @click="openHouseModal()"
             ></i>
+            <!-- @click="openModal('add', '028')"  -->
+
+            <!--  -->
           </el-tooltip>
         </template>
+
         <template slot-scope="scope">
           <el-tooltip
             effect="dark"
@@ -77,6 +153,18 @@
               @click="openHouseModal(scope.$index)"
             ></i>
           </el-tooltip>
+          <el-tooltip
+            v-if="sitem.status == '5'"
+            class="fr"
+            effect="dark"
+            content="新建售后申请"
+            placement="top"
+          >
+            <i
+              class="el-icon-warning tb-icon"
+              @click="openModal('add', scope.row)"
+            ></i>
+          </el-tooltip>
         </template>
       </el-table-column>
     </el-table>
@@ -85,6 +173,14 @@
       :id="modelId"
       :sitem="modelItem"
     />
+    <add-edit
+      :id="modelId"
+      :sitem="s_sitem"
+      :show-model="showModel"
+      :is-detail="isDetail"
+      @refresh="searchList"
+      @cancel="showModel = false"
+    />
   </div>
 </template>
    <script>
@@ -92,11 +188,14 @@ import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
 import outOrderAddModel from "./out-order-add-model";
+import addEdit from "@/views/sellOut/goodsService/components/addEdit.vue";
+import { mapGetters } from "vuex";
+
 export default {
   name: "salesOrderDetail",
   mixins: [mixinPage, resToken],
   props: ["newTime", "id", "sitem"],
-  components: { outOrderAddModel },
+  components: { addEdit, outOrderAddModel },
   watch: {
     newTime: function (val) {
       if (val) {
@@ -105,6 +204,8 @@ export default {
     },
   },
   computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+
     powers() {
       let tran =
         this.$store.getters.btnList.find(
@@ -120,15 +221,22 @@ export default {
 
   data() {
     return {
+      // 状态
+      statusOptions: [
+        { id: "1", label: "已出库" },
+        { id: "2", label: "验收中" },
+        { id: "3", label: "验收完成" },
+      ],
       showGoodsModel: false,
       stock_code: "",
       tableData: [],
       loading: false,
       queryId: "",
       status: "",
-      modelShowModel: false,
+      showModel: null,
       modelId: "",
       modelItem: null,
+      s_sitem: null,
     };
   },
   mounted() {
@@ -136,40 +244,25 @@ export default {
   },
   methods: {
     async initForm() {
+      console.log("12");
       this.status = "";
       this.queryId = this.$route.query.id;
       // this.rulesThis = this.rules;
       this.resetForm();
     },
-
     getNewTime() {
       this.newTime = new Date().valueOf();
     },
     async resetForm() {
       // 重置
       await this.$nextTick(() => {
-        if (this.$refs.addrForm) {
-          this.$refs.addrForm.resetFields();
-          this.$refs.addrForm.clearValidate();
-          const { item } = this.sitem;
-          this.tableData = [];
-          if (item && item.length > 0) {
-            item.forEach((v) => {
-              let model = {
-                edit: false,
-                arrive_time: v.arrive_time || "",
-                receipt_quantity: v.receipt_quantity || "",
-                contactor: v.contactor || "",
-                mobile: v.mobile || "",
-                addr_code: v.addr_code ? v.addr_code : [],
-                addr: v.addr || "",
-                id: v.id,
-                post_fee: v.post_fee || "0",
-              };
-              this.tableData.push(model);
-            });
-          }
-        }
+        console.log(this.$refs.addrForm);
+        // if (this.$refs.addrForm) {
+        //   this.$refs.addrForm.resetFields();
+        //   this.$refs.addrForm.clearValidate();
+        const { bum } = this.sitem;
+        this.tableData = bum;
+        // }
       });
     },
 
@@ -256,12 +349,17 @@ export default {
         }
       });
     },
+    openModal(code, btn_code) {
+      console.log(code, btn_code);
+      this.s_sitem = btn_code;
+      this.btn_code = btn_code;
+      this.modelId = code;
+      this.showModel = true;
+    },
   },
 };
 </script>
    <style lang="scss" scoped>
-.salesOrderDetail {
-}
+
 </style>
-   
    

+ 9 - 10
src/views/sellOut/salesOrder/index.vue

@@ -174,17 +174,12 @@
             "
           ></el-tag>
         </template>
-         <!-- v-if="powers.some((item) => item == '007')" -->
+        <!-- v-if="powers.some((item) => item == '007')" -->
         <template #operation="{ scope }">
-          <el-tooltip
-           
-            effect="dark"
-            content="详情"
-            placement="top"
-          >
+          <el-tooltip effect="dark" content="详情" placement="top">
             <i
               class="el-icon-view tb-icon"
-              @click="routeGoto('salesOrderDetail', { id:  scope.row.id})"
+              @click="routeGoto('salesOrderDetail', { id: scope.row.id })"
             ></i>
           </el-tooltip>
         </template>
@@ -246,8 +241,12 @@ export default {
       sselect: "创建时间",
       // 状态
       statusOptions: [
-        { id: "0", label: "禁用" },
-        { id: "1", label: "启用" },
+        { id: "0", label: "取消" },
+        { id: "1", label: "发起" },
+        { id: "2", label: "反馈物流费" },
+        { id: "3", label: "同意下单" },
+        { id: "4", label: "发货中" },
+        { id: "5", label: "已发货" },
       ],
       statusList: statusList,
       loading: false,