zhangjinxing před 3 roky
rodič
revize
a932d03c01

+ 9 - 4
src/apis/service/sellOut/returnOrder/index.js

@@ -7,14 +7,19 @@ export default {
   // 删除
   // 删除
   delete: (data, params) => http(api + "delete", data, "post", params),
   delete: (data, params) => http(api + "delete", data, "post", params),
   // 分页查询
   // 分页查询
-  list: (data, params) => http(api + "list", data, "post", params),
+  list: (data, params) => http(api + "orderbacklist", data, "post", params),
   // 详情
   // 详情
-  detail: (data, params) => http(api + "detail", data, "post", params),
+  detail: (data, params) => http(api + "orderbackinfo", data, "post", params),
   // 更新
   // 更新
   update: (data, params) => http(api + "update", data, "post", params),
   update: (data, params) => http(api + "update", data, "post", params),
   // 修改状态
   // 修改状态
-  status: (data, params) => http(api + "accountstatus", data, "post", params),
-  // 异常原因
+  status: (data, params) => http(api + "orderbackexam", data, "post", params),
+  // 验货审核
+  check: (data, params) => http(api + "orderbce", data, "post", params),
+  // 退货验货
+  returnCheck: (data, params) => http(api + "orderbackcheck", data, "post", params),
+  // 获取异常原因
   resultlist: (data, params) => http(api + "resultlist", data, "post", params),
   resultlist: (data, params) => http(api + "resultlist", data, "post", params),
+
 };
 };
    
    

+ 1 - 1
src/apis/service/sellOut/sellReturnList/index.js

@@ -7,7 +7,7 @@ export default {
   // 删除
   // 删除
   delete: (data, params) => http(api + "delete", data, "post", params),
   delete: (data, params) => http(api + "delete", data, "post", params),
   // 分页查询
   // 分页查询
-  list: (data, params) => http(api + "list", data, "post", params),
+  list: (data, params) => http(api + "orderbacklist", data, "post", params),
   // 详情
   // 详情
   detail: (data, params) => http(api + "detail", data, "post", params),
   detail: (data, params) => http(api + "detail", data, "post", params),
   // 更新
   // 更新

+ 3 - 0
src/assets/js/btnList.js

@@ -39,6 +39,9 @@ const btnList = [
   { code: "038", name: "通知采购部门" },
   { code: "038", name: "通知采购部门" },
   { code: "039", name: "通知财务部门" },
   { code: "039", name: "通知财务部门" },
   { code: "040", name: "物流反馈" },
   { code: "040", name: "物流反馈" },
+  { code: "041", name: "退货业务审核" },
+  { code: "042", name: "退货验收审核" },
+
   
   
 ];
 ];
 export default btnList;
 export default btnList;

+ 8 - 6
src/views/sellOut/goodsService/columns.js

@@ -40,14 +40,19 @@ export default [
             prop:"error_msg",
             prop:"error_msg",
             label:"异常原因",
             label:"异常原因",
         },
         },
+        // {
+        //   prop:"error_img",
+        //   label:"异常图片",
+        // },
         {
         {
-          prop:"error_img",
-          label:"异常图片",
+            prop:"error_remark",
+            label:"备注"
         },
         },
         {
         {
             prop:"except_code",
             prop:"except_code",
             label:"期望意愿",
             label:"期望意愿",
           _slot_: "except_code",
           _slot_: "except_code",
+          width:100,
 
 
         },
         },
     
     
@@ -62,10 +67,7 @@ export default [
             label:"添加时间",
             label:"添加时间",
             width:150,
             width:150,
         },
         },
-        {
-            prop:"error_remark",
-            label:"备注"
-        },
+        
         // {
         // {
         //   prop:"good_name",
         //   prop:"good_name",
         //   label:"商品名称",
         //   label:"商品名称",

+ 0 - 10
src/views/sellOut/goodsService/components/addEditForm.vue

@@ -9,17 +9,7 @@
     style="width: 100%"
     style="width: 100%"
     class="demo-ruleForm"
     class="demo-ruleForm"
   >
   >
-    <p>{{ ruleForm }}</p>
-    <p>powers{{ powers }}</p>
-    <p>id{{ id }}</p>
-    <!-- {{ sitem.bum.outCode }}-- {{ sitem.bum.orderCode }} -->
     <el-row>
     <el-row>
-      <!-- <el-col :span="24">
-        <el-form-item label="出库单编号">
-          <el-input placeholder="出库单编号"></el-input>
-        </el-form-item>
-      </el-col> -->
-
       <el-row>
       <el-row>
         <el-col :span="12">
         <el-col :span="12">
           <el-form-item label="异常数量" prop="anomalous_numbers">
           <el-form-item label="异常数量" prop="anomalous_numbers">

+ 33 - 38
src/views/sellOut/goodsService/components/express_feedback.vue

@@ -9,31 +9,31 @@
     style="width: 100%"
     style="width: 100%"
     class="demo-ruleForm"
     class="demo-ruleForm"
   >
   >
-    <p>returnCode{{ returnCode }}</p>
     <el-row>
     <el-row>
-      <!-- <el-form-item label="供应商仓库" -->
-      <el-col :span="4" style="width: 370px; padding: 0 0 0 10px">
-        <search-supplier
-          :size="searchSize"
-          :value="wsm_supplierNo"
-          :placeholder="'入库公司名称'"
-          :disabled="false"
-          :isDetail="false"
-          @searchChange="supplierChange"
-        />
-      </el-col>
-      <el-col :span="4" style="width: 220px; padding: 0 0 0 10px">
-        <search-stock
-          :size="searchSize"
-          :value="wsm_code"
-          :placeholder="'入库仓库名称'"
-          :disabled="false"
-          :isDetail="false"
-          :isRelation="true"
-          :companyCode="ruleForm.wsm_supplierNo"
-          @searchChange="stockChange"
-        />
-      </el-col>
+      <el-form-item label="退回仓库" prop="return_stock">
+        <el-col :span="4" style="width: 370px; padding: 0 0 0 10px">
+          <search-supplier
+            :size="searchSize"
+            :value="wsm_supplierNo"
+            :placeholder="'入库公司名称'"
+            :disabled="false"
+            :isDetail="false"
+            @searchChange="supplierChange"
+          />
+        </el-col>
+        <el-col :span="4" style="width: 220px; padding: 0 0 0 10px">
+          <search-stock
+            :size="searchSize"
+            :value="wsm_code"
+            :placeholder="'入库仓库名称'"
+            :disabled="false"
+            :isDetail="false"
+            :isRelation="true"
+            :companyCode="ruleForm.wsm_supplierNo"
+            @searchChange="stockChange"
+          />
+        </el-col>
+      </el-form-item>
 
 
       <el-col :span="24" style="text-align: right">
       <el-col :span="24" style="text-align: right">
         <el-button type="primary" @click="submitForm" v-if="true"
         <el-button type="primary" @click="submitForm" v-if="true"
@@ -108,11 +108,11 @@ export default {
       rulesThis: this.rules,
       rulesThis: this.rules,
       // 验证规则
       // 验证规则
       rules: {
       rules: {
-        return_store: [
+        return_stock: [
           {
           {
             required: true,
             required: true,
             trigger: "change",
             trigger: "change",
-            message: "请选择退回仓库",
+            message: "",
           },
           },
         ],
         ],
       },
       },
@@ -202,24 +202,19 @@ export default {
           this.loading = true;
           this.loading = true;
           console.log(this.ruleForm);
           console.log(this.ruleForm);
           let model = {
           let model = {
-            returnCode:this.returnCode,
-            wsm_code:this.ruleForm.wsm_code
-          }
+            returnCode: this.returnCode,
+            wsm_code: this.ruleForm.wsm_code,
+          };
           const res = await asyncRequest.afterFeed(model);
           const res = await asyncRequest.afterFeed(model);
+
           this.loading = false;
           this.loading = false;
           if (res && res.code === 0) {
           if (res && res.code === 0) {
-            const title = this.id === "add" ? "添加成功!" : "修改成功!";
             this.$notify.success({
             this.$notify.success({
-              title,
+              title: "物流已反馈",
               message: "",
               message: "",
             });
             });
-
-            if (this.id === "add") {
-              this.showModelThis = false;
-              this.$emit("refresh", false);
-            } else {
-              this.initForm();
-            }
+            this.$emit("refresh", false);
+            //   this.initForm();
           } else if (res && res.code >= 100 && res.code <= 104) {
           } else if (res && res.code >= 100 && res.code <= 104) {
             await this.logout();
             await this.logout();
           } else {
           } else {

+ 0 - 2
src/views/sellOut/goodsService/components/returnExpress.vue

@@ -9,8 +9,6 @@
     style="width: 100%"
     style="width: 100%"
     class="demo-ruleForm"
     class="demo-ruleForm"
   >
   >
-    {{ ruleForm }}
-    <p>returnCode{{ returnCode }}</p>
     <el-row>
     <el-row>
       <el-col :span="12">
       <el-col :span="12">
         <el-form-item label="费用承担方" prop="express_bear">
         <el-form-item label="费用承担方" prop="express_bear">

+ 3 - 4
src/views/sellOut/goodsService/index.vue

@@ -315,10 +315,9 @@ export default {
       statusOptions: [
       statusOptions: [
         { id: "0", label: "待审核" },
         { id: "0", label: "待审核" },
         { id: "1", label: "待物流反馈" },
         { id: "1", label: "待物流反馈" },
-        { id: "2", label: "待退货" },
-        { id: "3", label: "已退货" },
-        { id: "4", label: "待客户验收" },
-        { id: "5", label: "" },
+        { id: "3", label: "待退货" },
+        { id: "4", label: "已退货" },
+        { id: "5", label: "待客户验收" },
       ],
       ],
       statusList: statusList,
       statusList: statusList,
       loading: true,
       loading: true,

+ 14 - 6
src/views/sellOut/goodsService/serviceDetail.vue

@@ -6,13 +6,14 @@
     >
     >
       <p>{{ powers }}</p>
       <p>{{ powers }}</p>
       <p>status{{ status }}</p>
       <p>status{{ status }}</p>
-      <div class="detail-page-title">
+      <!-- <div class="detail-page-title">
         <span class="title">售后申请详情</span>
         <span class="title">售后申请详情</span>
         <add-edit-form :sitem="sitem"></add-edit-form>
         <add-edit-form :sitem="sitem"></add-edit-form>
-      </div>
+      </div> -->
       <el-collapse v-model="activeNames">
       <el-collapse v-model="activeNames">
-        <!-- <p>status{{ sitem.status }}</p> -->
-
+        <el-collapse-item title="售后申请详情" name="1">
+          <add-edit-form :sitem="sitem"></add-edit-form>
+        </el-collapse-item>
         <el-collapse-item
         <el-collapse-item
           title="业务审核"
           title="业务审核"
           name="1"
           name="1"
@@ -33,7 +34,11 @@
           v-if="powers.some((item) => item == '040')"
           v-if="powers.some((item) => item == '040')"
         >
         >
           <!-- v-if="status == '2'" -->
           <!-- v-if="status == '2'" -->
-          <express-feedback :returnCode="returnCode"></express-feedback>
+          <express-feedback
+            @refresh="searchList"
+            :returnCode="returnCode"
+            v-if="status == '2' || status == '1'"
+          ></express-feedback>
         </el-collapse-item>
         </el-collapse-item>
         <!-- <el-collapse-item
         <!-- <el-collapse-item
           title="采购审核"
           title="采购审核"
@@ -47,7 +52,10 @@
           name="4"
           name="4"
           v-if="powers.some((item) => item == '040')"
           v-if="powers.some((item) => item == '040')"
         >
         >
-          <return-express :returnCode="returnCode"></return-express>
+          <return-express
+            :returnCode="returnCode"
+            v-if="status == '3'"
+          ></return-express>
         </el-collapse-item>
         </el-collapse-item>
       </el-collapse>
       </el-collapse>
     </div>
     </div>

+ 72 - 26
src/views/sellOut/returnOrder/columns.js

@@ -1,55 +1,101 @@
 export default [
 export default [
- 
         {
         {
-          prop: "nickname",
-          label: "退货单号",
+          prop: "orderCode",
+          label: "订单编号",
+          width:"160"
         },
         },
         {
         {
-          prop: "role_name",
-          label: "快递单号",
+          prop: "thNo",
+          label: "退货单编号",
+          width:"160"
         },
         },
+        // {确认单编号}
+        // {order_type类型}
+       
+
         {
         {
-          prop: "mobile",
-          label: "确认单号",
+          prop: "outCode",
+          label: "出库单编号",
+          width:"160"
+
+        },
+        {
+          prop: "returnCode",
+          label: "售后单编号",
+          width:"160"
+
+        },
+        {
+          prop: "return_wsm",   
+          label: "收货仓库",
+        },
+        {
+          prop: "return_num",
+          label: "退货数量",
+        },
+        {
+            prop:"normal_num",
+            label:"正常数量",
+        },
+        {
+            prop:"received_num",
+            label:"收货数量",
+        },
+        {
+          prop: "contactor",
+          label: "收货人",
         },
         },
         {
         {
           prop: "mobile",
           prop: "mobile",
-          label: "确认单类型",
+          label: "联系电话",
         },
         },
         {
         {
-            prop:"fee",
-            label:"金额",
+          prop: "addr",
+          label: "收货人地址",
         },
         },
+        // {地址code}
         {
         {
-            prop:"numbers",
-            label:"数量",
+          prop: "post_fee",
+          label: "邮费",
         },
         },
         {
         {
-            prop:"ad",
-            label:"收货仓库",
+          prop: "post_code",
+          label: "快递单号",
+          width:"160"
+        },
+         {
+          prop: "post_company",
+          label: "物流公司",
         },
         },
         {
         {
-            prop:"er",
-            label:"收货人",
+            prop:"remark",
+            label:"备注",
         },
         },
         {
         {
-            prop:"phone",
-            label:"联系电话",
+          prop: "return_code",
+          label: "退货原因",
         },
         },
         {
         {
-            prop:"addr",
-            label:"收货地址",
+            prop:"good_code",
+            label:"商品属性编号",
+            width:"150"
         },
         },
         {
         {
-            prop:"reason",
-            label:"退货原因",
+            prop:"good_name",
+            label:"商品名称",
+            width:"150"
         },
         },
-
         {
         {
           prop: "status",
           prop: "status",
-          label: "退货状态",
+          label: "状态",
           _slot_: "status",
           _slot_: "status",
-          width: "80px",
+          width: "130px",
+        },
+        {
+          prop: "addtime",
+          label: "申请时间",
+          sortable: true,
+          width:150
         },
         },
         {
         {
           prop: "",
           prop: "",
@@ -57,6 +103,6 @@ export default [
           fixed: "right",
           fixed: "right",
           _noset_: true,
           _noset_: true,
           _slot_: "operation",
           _slot_: "operation",
-          width:"50px",
         },
         },
+      
 ]
 ]

+ 2 - 2
src/views/sellOut/returnOrder/components/addEdit.vue

@@ -219,7 +219,7 @@ export default {
     // 异常原因
     // 异常原因
     async getReason() {
     async getReason() {
       let model = {
       let model = {
-        type: "2",
+        type: "5",
         page: 1,
         page: 1,
         size: 100,
         size: 100,
       };
       };
@@ -241,7 +241,7 @@ export default {
           this.ruleForm.name = item.result;
           this.ruleForm.name = item.result;
         }
         }
       });
       });
-      console.log(this.name);
+      console.log(this.ruleForm.name);
     },
     },
   },
   },
 };
 };

+ 91 - 40
src/views/sellOut/returnOrder/components/return-record.vue

@@ -9,6 +9,7 @@
     style="width: 100%"
     style="width: 100%"
     class="demo-ruleForm"
     class="demo-ruleForm"
   >
   >
+    <p>sitem{{ sitem }}</p>
     <el-row>
     <el-row>
       <el-col :span="12">
       <el-col :span="12">
         <el-form-item label="收货总数量" prop="get_goods_numbers">
         <el-form-item label="收货总数量" prop="get_goods_numbers">
@@ -45,9 +46,9 @@
           <el-row>
           <el-row>
             <el-col :span="24">
             <el-col :span="24">
               <el-form
               <el-form
-                :model="tableForm"
+                :model="ruleForm"
                 :rules="tableFormThis"
                 :rules="tableFormThis"
-                ref="tableForm"
+                ref="ruleForm"
                 :size="'mini'"
                 :size="'mini'"
                 class="demo-tableForm product_go"
                 class="demo-tableForm product_go"
               >
               >
@@ -55,7 +56,7 @@
 
 
                 <!-- {{ options }} -->
                 <!-- {{ options }} -->
                 <el-table
                 <el-table
-                  :data="tableForm.product_go"
+                  :data="ruleForm.product_go"
                   border
                   border
                   :size="'mini'"
                   :size="'mini'"
                   row-key="key"
                   row-key="key"
@@ -241,9 +242,10 @@ import { isnumber } from "@/utils/validate.js";
 import addEdit from "./addEdit.vue";
 import addEdit from "./addEdit.vue";
 export default {
 export default {
   name: "returnRecord",
   name: "returnRecord",
-  props: ["id", "showModelThis", "newTime"],
+  props: ["id", "showModelThis", "newTime", "sitem"],
   mixins: [resToken],
   mixins: [resToken],
   components: { addEdit },
   components: { addEdit },
+  // props: ["sitem"],
   data() {
   data() {
     const validatenumbers = (rule, value, callback) => {
     const validatenumbers = (rule, value, callback) => {
       if (value === "") {
       if (value === "") {
@@ -257,6 +259,19 @@ export default {
       }
       }
     };
     };
     return {
     return {
+      sitemGetNumber: "", //详情总收货量
+      isShow: false, //用于情况1
+      returnNO: "", //退货编号
+      ruleForm: {
+        get_goods_numbers: "", //收货总数量
+        can_sell_numbers: "", //可销售数量
+        remark: "", //其他备注
+        product_go: [], //表格参数
+      },
+      anomalous_numbers: "", //异常数量
+      anomalous_reason_code: "", //异常原因
+      anomalous_remark: "", //异常备注
+      // --
       btn_code: "",
       btn_code: "",
       modelId: "",
       modelId: "",
       options: [],
       options: [],
@@ -264,24 +279,13 @@ export default {
       tableForm: {
       tableForm: {
         product_go: [],
         product_go: [],
       },
       },
-      voList: [
-        // {
-        //   anomalous_numbers: 99,
-        //   anomalous_reason: "",
-        //   anomalous_reason_code: "", //异常原因code
-        //   anomalous_remark: "111",
-        // },
-      ],
+      voList: [],
       edit: false, //默认不能提交
       edit: false, //默认不能提交
       totalNumber: 0, //全局保存数量
       totalNumber: 0, //全局保存数量
       loading: false,
       loading: false,
       status: "", //存储详情接口返的状态
       status: "", //存储详情接口返的状态
       showModel: null,
       showModel: null,
-      ruleForm: {
-        get_goods_numbers: "", //收货总数量
-        can_sell_numbers: "", //可销售数量
-        remark: "", //其他备注
-      },
+
       rulesThis: this.rules,
       rulesThis: this.rules,
       // 验证规则
       // 验证规则
       rules: {
       rules: {
@@ -361,32 +365,65 @@ export default {
         if (this.$refs.ruleForm) {
         if (this.$refs.ruleForm) {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
           this.$refs.ruleForm.clearValidate();
+          console.log(this.sitem);
           this.ruleForm = {
           this.ruleForm = {
             get_goods_numbers: "", //收货总数量
             get_goods_numbers: "", //收货总数量
             can_sell_numbers: "", //可销售数量
             can_sell_numbers: "", //可销售数量
             remark: "50", //其他备注
             remark: "50", //其他备注
+            product_go: [], //表格参数
           };
           };
-          // let list = JSON.parse(JSON.stringify(this.voList));
-          // list.forEach((v) => {
-          //   v.edit = false;
-          //   this.tableForm.product_go.push(v);
-          // });
         }
         }
       });
       });
     },
     },
+
     async submitForm() {
     async submitForm() {
       await this.$refs.ruleForm.validate(async (valid) => {
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
         if (valid) {
           this.loading = true;
           this.loading = true;
+          let model = JSON.parse(JSON.stringify(this.ruleForm));
+          console.log(model);
+          let thNo = "";
+          if (this.sitem) {
+            thNo = this.sitem.thNo;
+          }
+          let arr = [];
+          model.product_go.map((ele) => {
+            let obj = {
+              error_num: ele.anomalous_numbers,
+              error_code: ele.anomalous_reason,
+              error_remark: ele.anomalous_remark,
+            };
+            arr.push(obj);
+          });
+          let _model = {
+            thNo: thNo, //	退货编号
+            receive: model.get_goods_numbers, //收货数量
+            normal: model.can_sell_numbers, //正常数量
+            remark: model.remark, //
+            errorlist: arr, //
+          };
+
           const { get_goods_numbers, can_sell_numbers } = this.ruleForm;
           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) {
+          // 判断收获总数量是否等于可销售数量(情况1:没有异常数量)
+          if (Number(get_goods_numbers) === Number(can_sell_numbers)) {
+            const res = await asyncRequest.returnCheck(_model);
+            if (res && res.code === 0) {
+              console.log("submit");
+              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);
+            }
+          } else if (Number(get_goods_numbers) < Number(can_sell_numbers)) {
             console.log(+get_goods_numbers, +can_sell_numbers);
             console.log(+get_goods_numbers, +can_sell_numbers);
             this.$message.warning("可销售数量不能大于收货总数量!");
             this.$message.warning("可销售数量不能大于收货总数量!");
           } else {
           } else {
-            this.tableForm.product_go.forEach((item) => {
+            this.ruleForm.product_go.forEach((item) => {
               if (!item.edit) {
               if (!item.edit) {
                 this.edit = true;
                 this.edit = true;
               }
               }
@@ -394,8 +431,21 @@ export default {
             });
             });
             if (
             if (
               this.edit &&
               this.edit &&
-              +this.totalNumber + +can_sell_numbers == +get_goods_numbers
+              Number(this.totalNumber) + Number(can_sell_numbers) ==
+                Number(get_goods_numbers)
             ) {
             ) {
+              const res = await asyncRequest.returnCheck(_model);
+              if (res && res.code === 0) {
+                console.log("submit");
+                this.$notify.success({
+                  title: res.message,
+                  message: "",
+                });
+              } else if (res && res.code >= 100 && res.code <= 104) {
+                await this.logout();
+              } else {
+                this.$message.warning(res.message);
+              }
               console.log("submit");
               console.log("submit");
             } else {
             } else {
               this.$message.warning("异常数量不正确或者当前表格在编辑!");
               this.$message.warning("异常数量不正确或者当前表格在编辑!");
@@ -460,7 +510,7 @@ export default {
     //保存某一行
     //保存某一行
     checkRow(rowIndex) {
     checkRow(rowIndex) {
       const { anomalous_numbers, anomalous_reason_code, anomalous_remark } =
       const { anomalous_numbers, anomalous_reason_code, anomalous_remark } =
-        this.tableForm.product_go[rowIndex];
+        this.ruleForm.product_go[rowIndex];
       if (anomalous_numbers == "" && anomalous_remark == "") {
       if (anomalous_numbers == "" && anomalous_remark == "") {
         this.$message.warning("异常数量和异常备注不能为空!");
         this.$message.warning("异常数量和异常备注不能为空!");
         return;
         return;
@@ -485,7 +535,7 @@ export default {
       }
       }
       if (anomalous_numbers == 0) {
       if (anomalous_numbers == 0) {
         this.$message.info("异常数量为零,不用选择异常原因!");
         this.$message.info("异常数量为零,不用选择异常原因!");
-        this.tableForm.product_go[rowIndex].edit = false;
+        this.ruleForm.product_go[rowIndex].edit = false;
         return;
         return;
       }
       }
       if (anomalous_reason_code == "") {
       if (anomalous_reason_code == "") {
@@ -493,25 +543,25 @@ export default {
         return;
         return;
       }
       }
 
 
-      this.tableForm.product_go[rowIndex].edit = false;
+      this.ruleForm.product_go[rowIndex].edit = false;
     },
     },
     //编辑某一行
     //编辑某一行
     editRow(rowIndex) {
     editRow(rowIndex) {
-      let index = this.tableForm.product_go.findIndex((v) => v.edit);
+      let index = this.ruleForm.product_go.findIndex((v) => v.edit);
       console.log(index);
       console.log(index);
       if (index !== -1) {
       if (index !== -1) {
         this.$message.warning("请完成其他行的编辑!");
         this.$message.warning("请完成其他行的编辑!");
         return;
         return;
       } else {
       } else {
-        console.log(this.tableForm.product_go[rowIndex]);
-        this.tableForm.product_go[rowIndex].edit = true;
+        console.log(this.ruleForm.product_go[rowIndex]);
+        this.ruleForm.product_go[rowIndex].edit = true;
       }
       }
     },
     },
     //重置行内参数
     //重置行内参数
     resetRow(rowIndex) {
     resetRow(rowIndex) {
-      this.tableForm.product_go[rowIndex].anomalous_numbers = "";
-      this.tableForm.product_go[rowIndex].anomalous_reason_code = "";
-      this.tableForm.product_go[rowIndex].anomalous_remark = "";
+      this.ruleForm.product_go[rowIndex].anomalous_numbers = "";
+      this.ruleForm.product_go[rowIndex].anomalous_reason_code = "";
+      this.ruleForm.product_go[rowIndex].anomalous_remark = "";
     },
     },
     //
     //
     openModal(code, btn_code) {
     openModal(code, btn_code) {
@@ -528,22 +578,23 @@ export default {
         let v = {
         let v = {
           anomalous_numbers: numbers || "",
           anomalous_numbers: numbers || "",
           anomalous_reason: name || "",
           anomalous_reason: name || "",
-          anomalous_reason_code: name || "", //异常原因code
+          anomalous_reason_code: reason || "", //异常原因code
           anomalous_remark: remark || "",
           anomalous_remark: remark || "",
         };
         };
         let list = JSON.parse(JSON.stringify(this.voList));
         let list = JSON.parse(JSON.stringify(this.voList));
         list.forEach((v) => {
         list.forEach((v) => {
           v.edit = false;
           v.edit = false;
-          this.tableForm.product_go.push(v);
+          this.ruleForm.product_go.push(v);
         });
         });
         this.voList = [];
         this.voList = [];
         this.voList.push(v);
         this.voList.push(v);
       }
       }
       // this.initForm();
       // this.initForm();
       let list = JSON.parse(JSON.stringify(this.voList));
       let list = JSON.parse(JSON.stringify(this.voList));
+      console.log(this.ruleForm.product_go);
       list.forEach((v) => {
       list.forEach((v) => {
         v.edit = false;
         v.edit = false;
-        this.tableForm.product_go.push(v);
+        this.ruleForm.product_go.push(v);
       });
       });
       this.voList = [];
       this.voList = [];
     },
     },

+ 53 - 29
src/views/sellOut/returnOrder/components/returnCheck.vue

@@ -9,8 +9,7 @@
         class="demo-tableForm product_go"
         class="demo-tableForm product_go"
       >
       >
         <!-- {{ tableForm.product_go }} -->
         <!-- {{ tableForm.product_go }} -->
-
-        <!-- {{ options }} -->
+        <p>{{ s_sitem }}</p>
         <el-form-item label="入库情况">
         <el-form-item label="入库情况">
           <el-table
           <el-table
             :data="tableForm.product_go"
             :data="tableForm.product_go"
@@ -27,11 +26,6 @@
                   <p>
                   <p>
                     {{ scope.row.anomalous_numbers }}
                     {{ scope.row.anomalous_numbers }}
                   </p>
                   </p>
-                  <!-- <el-input
-                    :disabled="!scope.row.edit"
-                    v-model="scope.row.anomalous_numbers"
-                    placeholder="请输入异常数量"
-                  ></el-input> -->
                 </el-form-item>
                 </el-form-item>
               </template>
               </template>
             </el-table-column>
             </el-table-column>
@@ -41,21 +35,6 @@
                   :style="!scope.row.edit ? 'margin:0' : ''"
                   :style="!scope.row.edit ? 'margin:0' : ''"
                   :prop="'product_go.' + scope.$index + '.anomalous_reason'"
                   :prop="'product_go.' + scope.$index + '.anomalous_reason'"
                 >
                 >
-                  <!-- <el-select
-                    style="width: 100%"
-                    :disabled="!scope.row.edit"
-                    v-model="scope.row.anomalous_reason_code"
-                    placeholder="异常原因"
-                  >
-                    <el-option
-                      :disabled="item.status == 0"
-                      v-for="item in options"
-                      :key="item.id"
-                      :label="item.result"
-                      :value="item.result_code"
-                    >
-                    </el-option>
-                  </el-select> -->
                   <p>{{ scope.row.anomalous_reason }}</p>
                   <p>{{ scope.row.anomalous_reason }}</p>
                 </el-form-item>
                 </el-form-item>
               </template>
               </template>
@@ -74,7 +53,7 @@
               <template slot-scope="scope">
               <template slot-scope="scope">
                 <el-form-item
                 <el-form-item
                   :style="!scope.row.edit ? 'margin:0' : ''"
                   :style="!scope.row.edit ? 'margin:0' : ''"
-                  :prop="'product_go.' + scope.$index + '.anomalous_reason'"
+                  :prop="'product_go.' + scope.$index + '.check_value'"
                 >
                 >
                   <el-select
                   <el-select
                     :disabled="!scope.row.edit"
                     :disabled="!scope.row.edit"
@@ -97,7 +76,7 @@
               <template slot-scope="scope">
               <template slot-scope="scope">
                 <el-form-item
                 <el-form-item
                   :style="!scope.row.edit ? 'margin:0' : ''"
                   :style="!scope.row.edit ? 'margin:0' : ''"
-                  :prop="'product_go.' + scope.$index + '.anomalous_remark'"
+                  :prop="'product_go.' + scope.$index + '.check_remark'"
                   :rules="{
                   :rules="{
                     required: true,
                     required: true,
                     message: '审核备注不能为空',
                     message: '审核备注不能为空',
@@ -148,6 +127,16 @@
               </template>
               </template>
             </el-table-column>
             </el-table-column>
           </el-table>
           </el-table>
+          <!-- <el-col :span="24">
+            <exam-form
+              :statusList="statusList"
+              :newTime="newTime"
+              :disabled="false"
+              :isMust="false"
+              @searchChange="examForm"
+            />
+          </el-col> -->
+
           <el-col :span="24" style="text-align: right; padding: 30px 0 10px 0">
           <el-col :span="24" style="text-align: right; padding: 30px 0 10px 0">
             <el-button type="primary" :size="'mini'" @click="submitForm"
             <el-button type="primary" :size="'mini'" @click="submitForm"
               >保 存
               >保 存
@@ -159,19 +148,20 @@
   </el-row>
   </el-row>
 </template>
 </template>
    <script>
    <script>
-import asyncRequest from "@/apis/service/stock/allot/detail";
+import asyncRequest from "@/apis/service/sellOut/returnOrder";
 import resToken from "@/mixins/resToken";
 import resToken from "@/mixins/resToken";
 import { isnumber } from "@/utils/validate";
 import { isnumber } from "@/utils/validate";
 import config from "./columns"; //表格列参数
 import config from "./columns"; //表格列参数
 export default {
 export default {
-  name: "anomalousRecord",
-  props: ["id", "sitem", "newTime"],
+  name: "return-check",
+  props: ["id", "newTime", "s_sitem"],
+
   mixins: [resToken],
   mixins: [resToken],
   computed: {
   computed: {
     powers() {
     powers() {
       let tran =
       let tran =
         this.$store.getters.btnList.find(
         this.$store.getters.btnList.find(
-          (item) => item.menu_route == "anomalousRecord"
+          (item) => item.menu_route == "return-check"
         ) || {};
         ) || {};
       if (tran && tran.action && tran.action.length > 0) {
       if (tran && tran.action && tran.action.length > 0) {
         return tran.action;
         return tran.action;
@@ -182,6 +172,7 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
+      thNo: "",
       options: [
       options: [
         {
         {
           value: "agree",
           value: "agree",
@@ -208,7 +199,6 @@ export default {
           anomalous_remark: "111",
           anomalous_remark: "111",
         },
         },
       ],
       ],
-      value: "",
     };
     };
   },
   },
   watch: {
   watch: {
@@ -225,7 +215,10 @@ export default {
     async initForm() {
     async initForm() {
       this.loading = true;
       this.loading = true;
       this.columns = [];
       this.columns = [];
+      console.log(this.s_sitem);
       // await this.getresultlist();
       // await this.getresultlist();
+      // this.thNo = this.sitem.thNo;
+      // console.log(this.thNo);
       await this.resetForm();
       await this.resetForm();
       this.loading = false;
       this.loading = false;
     },
     },
@@ -235,6 +228,7 @@ export default {
         if (this.$refs.tableForm) {
         if (this.$refs.tableForm) {
           this.$refs.tableForm.resetFields();
           this.$refs.tableForm.resetFields();
           this.$refs.tableForm.clearValidate();
           this.$refs.tableForm.clearValidate();
+          console.log(this.s_sitem);
           let list = JSON.parse(JSON.stringify(this.voList));
           let list = JSON.parse(JSON.stringify(this.voList));
           list.forEach((v) => {
           list.forEach((v) => {
             v.edit = false;
             v.edit = false;
@@ -255,6 +249,36 @@ export default {
         this.$message.warning("当前已有商品正在编辑!");
         this.$message.warning("当前已有商品正在编辑!");
         return;
         return;
       }
       }
+      console.log(this.tableForm);
+      let arr = [];
+      let model = JSON.parse(JSON.stringify(this.tableForm));
+      model.product_go.map((ele) => {
+        let obj = {
+          id: "",
+          remark: ele.anomalous_remark,
+          status: "",
+        };
+        arr.push(obj);
+      });
+      let _model = {
+        thNo: this.thNo,
+        errorlist: arr,
+        status: "",
+      };
+      console.log(_model);
+      const res = await asyncRequest.check(_model);
+      if (res && res.code === 0) {
+        console.log("submit");
+        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);
+      }
     },
     },
     //异常原因筛选
     //异常原因筛选
     //保存某一行
     //保存某一行

+ 169 - 0
src/views/sellOut/returnOrder/detail.vue

@@ -0,0 +1,169 @@
+<template>
+  <div class="sellReturnDetail pagePadding">
+    <div
+      style="width: 100%"
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+    >
+      <p>sellReturnDetail页面{{ powers }}</p>
+      <p>status{{ status }}</p>
+      <p>{{ newTime }}</p>
+      <el-collapse v-model="activeNames">
+        <el-collapse-item title="退货验收记录" name="0">
+          <!-- <add-edit-form :sitem="sitem"></add-edit-form> -->
+          <return-record :sitem="s_sitem" @refresh="searchList"></return-record>
+        </el-collapse-item>
+
+        <el-collapse-item title="退货验收审核" name="1">
+          <!-- <return-check :sitem="sitem"></return-check> -->
+          <return-check :s_sitem="s_sitem" @refresh="searchList"></return-check>
+        </el-collapse-item>
+        <el-collapse-item
+          title="业务审核"
+          name="2"
+          v-if="powers.some((item) => item == '001')"
+        >
+          <exam-form
+            :statusList="statusList"
+            :newTime="newTime"
+            :disabled="false"
+            :isMust="true"
+            @searchChange="examForm"
+          />
+        </el-collapse-item>
+      </el-collapse>
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+// import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder/detail";
+import asyncRequest from "@/apis/service/sellOut/returnOrder";
+import ReturnRecord from "./components/return-record.vue";
+import ReturnCheck from "./components/returnCheck.vue";
+
+export default {
+  name: "sellReturnDetail",
+  mixins: [mixinPage, resToken],
+  components: {
+    ReturnRecord,
+    ReturnCheck,
+  },
+  computed: {
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "sellReturnDetail"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      s_sitem: null, //传给组件
+      // --
+      returnCode: "",
+      activeNames: ["0", "1", "2"],
+      sitem: null,
+      status: "", //存储详情接口状态
+      statusList: [
+        {
+          value: "1",
+          label: "待验货",
+        },
+        {
+          value: "2",
+          label: "待验货审核",
+        },
+        {
+          value: "3",
+          label: "待业务审核",
+        },
+      ],
+      newTime: "",
+      loading: false,
+    };
+  },
+  mounted() {
+    this.sitem = this.$route.query.id;
+    console.log(this.sitem);
+    this.searchList();
+    this.getNewTime();
+  },
+  methods: {
+    getNewTime() {
+      this.newTime = new Date().valueOf();
+    },
+    // 点击业务审核的保存按钮
+    async examForm(e) {
+      console.log(e);
+      if (!this.loading) {
+        let type = e.state === "1" ? "1" : "0";
+        console.log(type);
+        await this.setstatus(type, "提交业务审核", e.remark);
+      }
+    },
+    //
+    async setstatus(type, detail, remark) {
+      await this.$confirm(`确定要${type === "1" ? "同意" : "驳回"}?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          if (this.sitem) {
+            let { returnCode } = this.sitem;
+            const model = {
+              remark,
+              returnCode,
+              status: type,
+            };
+            let res = await asyncRequest.status(model);
+
+            if (res && res.code === 0) {
+              this.$notify.success({
+                title: "修改成功!",
+                message: "",
+              });
+              await this.searchList();
+            } else if (res && res.code >= 100 && res.code <= 104) {
+              await this.logout();
+            } else {
+              this.$message.warning(res.message);
+            }
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    async searchList() {
+      console.log(this.sitem);
+      if (this.sitem) {
+        let { thNo } = this.sitem;
+        let model = {
+          thNo,
+        };
+        const res = await asyncRequest.detail(model);
+        if (res && res.code === 0 && res.data) {
+          this.status = res.data.status;
+          this.s_sitem = res.data;
+        } else if (res && res.code >= 100 && res.code <= 104) {
+          await this.logout();
+        } else {
+          this.$message.warning(res.message);
+        }
+      }
+    },
+  },
+};
+</script>
+   
+   

+ 228 - 153
src/views/sellOut/returnOrder/index.vue

@@ -1,9 +1,10 @@
 <template>
 <template>
-  <div class="returnOrder pagePadding">
+  <div class="sellReturnList pagePadding">
     <div
     <div
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
     >
-      <!-- v-loading="loading" -->
+      <!-- loading -->
+      powers:{{ powers }}
       <ex-table
       <ex-table
         v-loading="false"
         v-loading="false"
         :table="table"
         :table="table"
@@ -28,56 +29,55 @@
           <div style="width: 100%">
           <div style="width: 100%">
             <el-row style="padding: 0 0 0 80px">
             <el-row style="padding: 0 0 0 80px">
               <el-col :span="24">
               <el-col :span="24">
-                <el-col :span="4" style="width: 160px">
+                <!-- 销售订单编号 -->
+                <el-col :span="4" style="width: 220px; padding: 0 0 0 0px">
                   <el-input
                   <el-input
-                    v-model="parmValue.return_numbers"
-                    placeholder="退货单号"
+                    clearable
                     :size="searchSize"
                     :size="searchSize"
+                    v-model="parmValue.sellOrderNumber"
+                    :maxlength="40"
+                    placeholder="订单编号"
+                    @blur="searchList"
                   />
                   />
                 </el-col>
                 </el-col>
-                <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
+                <!-- 退货编号 -->
+                <el-col :span="4" style="width: 220px; padding: 0 0 0 10px">
                   <el-input
                   <el-input
+                    clearable
                     :size="searchSize"
                     :size="searchSize"
-                    v-model="parmValue.express_numbers"
-                    placeholder="快递单号"
+                    v-model="parmValue.returnNumber"
+                    :maxlength="40"
+                    placeholder="退货单编号"
+                    @blur="searchList"
                   />
                   />
                 </el-col>
                 </el-col>
-                <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
+                <!-- 销售出库编号 -->
+                <el-col :span="4" style="width: 220px; padding: 0 0 0 10px">
                   <el-input
                   <el-input
+                    clearable
                     :size="searchSize"
                     :size="searchSize"
-                    v-model="parmValue.returner_phone"
-                    placeholder="退货人电话"
+                    v-model="parmValue.sellOutNumber"
+                    :maxlength="40"
+                    placeholder="出库单编号"
+                    @blur="searchList"
                   />
                   />
                 </el-col>
                 </el-col>
-                <el-col :span="6" style="width: 160px; padding: 0 0 0 10px">
-                  <search-express
-                    :size="searchSize"
-                    :value="parmValue.express_company"
-                    :placeholder="'退货物流'"
-                    :names="''"
-                    :disabled="false"
-                    :is-detail="false"
-                    @searchChange="handleCompany"
-                  />
-                </el-col>
-                <el-col :span="4" style="width: 54px">
-                  <el-button
-                    :size="searchSize"
-                    type="primary"
-                    class="fr"
-                    icon="el-icon-search"
-                    @click="searchList"
-                /></el-col>
-                <el-col :span="4" style="width: 66px">
+
+                <el-col
+                  :span="3"
+                  style="width: 66px; float: right"
+                  v-if="powers.some((item) => item == '003')"
+                >
                   <el-button
                   <el-button
-                    type="warning"
-                    class="fr"
+                    @click="openModal('add', false, {})"
                     :size="searchSize"
                     :size="searchSize"
-                    @click="restSearch"
+                    type="success"
+                    style="float: right; margin-left: 5px"
                   >
                   >
-                    重置
+                    添加
                   </el-button>
                   </el-button>
                 </el-col>
                 </el-col>
+
                 <el-col :span="3" style="width: 66px; float: right">
                 <el-col :span="3" style="width: 66px; float: right">
                   <el-button
                   <el-button
                     :size="searchSize"
                     :size="searchSize"
@@ -90,41 +90,107 @@
                 </el-col>
                 </el-col>
               </el-col>
               </el-col>
             </el-row>
             </el-row>
-            <el-row style="padding-top: 10px">
-              <el-col :span="5" style="width: 291px">
+            <el-row style="padding: 10px 0 0 0">
+              <!-- 售后申请编号 -->
+              <el-col :span="4" style="width: 200px; padding: 0 0 0 0px">
+                <el-input
+                  clearable
+                  :size="searchSize"
+                  v-model="parmValue.serviceNumber"
+                  :maxlength="40"
+                  placeholder="售后单编号"
+                  @blur="searchList"
+                />
+              </el-col>
+              <!-- 退回客户编号 -->
+              <el-col :span="4" style="width: 200px; padding: 0 0 0 10px">
+                <el-input
+                  clearable
+                  :size="searchSize"
+                  v-model="parmValue.clientNumber"
+                  :maxlength="40"
+                  placeholder="客户编号"
+                  @blur="searchList"
+                />
+              </el-col>
+              <!-- 时间区间 -->
+              <el-col :span="6" style="width: 303px; padding: 0 0 0 10px">
                 <period-date-picker
                 <period-date-picker
-                  :width="'134px'"
+                  :type="1"
+                  :width="'135px'"
                   :size="searchSize"
                   :size="searchSize"
+                  :start="parmValue.start"
+                  :end="parmValue.end"
                   @timeReturned="handleTime"
                   @timeReturned="handleTime"
                 />
                 />
               </el-col>
               </el-col>
-              <el-col :span="18" style="width: 340px; padding: 0 0 0 10px">
-                <search-customer
+            </el-row>
+
+            <el-row style="padding: 10px 0 0 0">
+              <!-- 快递公司 -->
+              <el-col :span="4" style="width: 180px; padding: 0 0 0 0px">
+                <search-express
                   :size="searchSize"
                   :size="searchSize"
-                  :code="supplierNo"
-                  :placeholder="'供应商公司名称'"
-                  :is-detail="false"
-                  :disabled="false"
+                  :value="parmValue.parmValue"
+                  :placeholder="'物流公司'"
                   :names="''"
                   :names="''"
-                  @searchChange="supplierChange"
+                  :is-detail="false"
+                  @searchChange="handleCompany"
                 />
                 />
               </el-col>
               </el-col>
-              <el-col :span="6" style="width: 160px; padding: 0 0 0 10px">
+              <!-- 快递单号 -->
+              <el-col :span="4" style="width: 200px; padding: 0 0 0 10px">
+                <el-input
+                  clearable
+                  :size="searchSize"
+                  v-model="parmValue.postNumber"
+                  :maxlength="40"
+                  placeholder="快递单号"
+                  @blur="searchList"
+                />
+              </el-col>
+
+              <!-- 节点查询 -->
+              <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
                 <el-select
                 <el-select
-                  @change="handleNode"
                   :size="searchSize"
                   :size="searchSize"
-                  v-model="parmValue.return_list_node"
-                  placeholder="退货单节点"
+                  v-model="parmValue.status"
+                  filterable
+                  clearable
+                  placeholder="状态"
+                  style="width: 100%"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
                 >
                 >
                   <el-option
                   <el-option
-                    v-for="item in return_node_options"
-                    :key="item.value"
+                    v-for="item in statusList"
+                    :key="'status' + item.value"
                     :label="item.label"
                     :label="item.label"
                     :value="item.value"
                     :value="item.value"
-                  >
-                  </el-option>
+                  />
                 </el-select>
                 </el-select>
               </el-col>
               </el-col>
+              <el-col :span="4" style="width: 54px">
+                <el-button
+                  :size="searchSize"
+                  type="primary"
+                  class="fr"
+                  icon="el-icon-search"
+                  @click="searchList"
+              /></el-col>
+              <el-col :span="4" style="width: 66px">
+                <el-button
+                  type="warning"
+                  class="fr"
+                  :size="searchSize"
+                  @click="restSearch"
+                >
+                  重置
+                </el-button>
+              </el-col>
             </el-row>
             </el-row>
           </div>
           </div>
         </template>
         </template>
@@ -159,8 +225,9 @@
           >
           >
             <i
             <i
               class="el-icon-view tb-icon"
               class="el-icon-view tb-icon"
-              @click="routeGoto('returnDetail', { id: scope.row })"
+              @click="routeGoto('sellReturnDetail', { id: scope.row })"
             ></i>
             ></i>
+            <!-- @click="openModal(scope.row.id, true, scope.row)" -->
           </el-tooltip>
           </el-tooltip>
           <el-tooltip
           <el-tooltip
             v-if="powers.some((item) => item == '005')"
             v-if="powers.some((item) => item == '005')"
@@ -201,14 +268,14 @@
           </el-tooltip>
           </el-tooltip>
         </template>
         </template>
       </ex-table>
       </ex-table>
-      <!-- <add-edit
+      <add-edit
         :id="modelId"
         :id="modelId"
         :sitem="sitem"
         :sitem="sitem"
         :show-model="showModel"
         :show-model="showModel"
         :is-detail="isDetail"
         :is-detail="isDetail"
         @refresh="searchList"
         @refresh="searchList"
         @cancel="showModel = false"
         @cancel="showModel = false"
-      /> -->
+      />
     </div>
     </div>
     <div v-else>
     <div v-else>
       <no-auth></no-auth>
       <no-auth></no-auth>
@@ -219,22 +286,23 @@
 import mixinPage from "@/mixins/elPaginationHandle";
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import resToken from "@/mixins/resToken";
 import statusList from "@/assets/js/statusList";
 import statusList from "@/assets/js/statusList";
+import columns from "./columns";
 import asyncRequest from "@/apis/service/sellOut/returnOrder";
 import asyncRequest from "@/apis/service/sellOut/returnOrder";
-// import addEdit from "./addEdit";
+import addEdit from "./addEdit";
 import { mapGetters } from "vuex";
 import { mapGetters } from "vuex";
-import columns from "./columns";
+
 export default {
 export default {
-  name: "returnOrder",
+  name: "sellReturnList",
   mixins: [mixinPage, resToken],
   mixins: [mixinPage, resToken],
-  // components: {
-  //   addEdit,
-  // },
+  components: {
+    addEdit,
+  },
   computed: {
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
     powers() {
       let tran =
       let tran =
         this.$store.getters.btnList.find(
         this.$store.getters.btnList.find(
-          (item) => item.menu_route == "returnOrder"
+          (item) => item.menu_route == "sellReturnList"
         ) || {};
         ) || {};
       if (tran && tran.action && tran.action.length > 0) {
       if (tran && tran.action && tran.action.length > 0) {
         return tran.action;
         return tran.action;
@@ -245,30 +313,43 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
+      statusList: [
+        { value: "0", label: "待申请" },
+        { value: "1", label: "待验收" },
+        { value: "2", label: "待验收审核" },
+        { value: "3", label: "待业务审核" },
+        { value: "4", label: "完成退货" },
+      ],
       sitem: null,
       sitem: null,
       // 状态
       // 状态
       statusOptions: [
       statusOptions: [
-        { id: "0", label: "禁用" },
-        { id: "1", label: "启用" },
+        { id: "0", label: "待申请" },
+        { id: "1", label: "待验收" },
+        { id: "2", label: "待验收审核" },
+        { id: "3", label: "待业务审核" },
+        { id: "4", label: "完成退货" },
       ],
       ],
-      supplierNo: [], //供应商
-      statusList: statusList,
+      // statusList: statusList,
       loading: true,
       loading: true,
       showModel: false,
       showModel: false,
       isDetail: false,
       isDetail: false,
       modelId: 0,
       modelId: 0,
       parmValue: {
       parmValue: {
-        return_numbers: "", //退货单号
-        express_numbers: "", //快递单号
-        returner_phone: "", //退货人电话
-        express_company: [], //快递公司
-        start: "",
-        end: "",
-        supplierNo: "", //供应商
-        return_list_node: "", //退货单节点
+        sellOrderNumber: "", //销售订单编号
+        returnNumber: "", //退货编号
+        sellOutNumber: "", //销售出库编号
+        serviceNumber: "", //售后申请编号
+        postCompany: "", //物流公司
+        postNumber: "", //物流单号
+        startTime: "", //
+        endTime: "", //
+        status: "", //状态节点
+        clientNumber: "", //退货客户编号
+        // --
         page: 1, // 页码
         page: 1, // 页码
         size: 15, // 每页显示条数
         size: 15, // 每页显示条数
       },
       },
+      tableData: [],
       passwordModel: false,
       passwordModel: false,
       passwordModelId: 0,
       passwordModelId: 0,
       isPasswordDetail: false,
       isPasswordDetail: false,
@@ -288,24 +369,6 @@ export default {
       },
       },
       // 表格 - 列参数
       // 表格 - 列参数
       columns: columns,
       columns: columns,
-      return_node_options: [
-        {
-          value: "value1",
-          label: "节点1",
-        },
-        {
-          value: "value2",
-          label: "节点2",
-        },
-        {
-          value: "value3",
-          label: "节点3",
-        },
-        {
-          value: "value4",
-          label: "节点4",
-        },
-      ],
     };
     };
   },
   },
   mounted() {
   mounted() {
@@ -315,9 +378,19 @@ export default {
   methods: {
   methods: {
     restSearch() {
     restSearch() {
       this.parmValue = {
       this.parmValue = {
-        name: "", // 业务员名字
-        username: "", // 账号
-        status: "", //
+        sellOrderNumber: "", //销售订单编号
+        returnNumber: "", //退货编号
+        sellOutNumber: "", //销售出库编号
+        serviceNumber: "", //售后申请编号
+        postCompany: "", //物流公司
+        postNumber: "", //物流单号
+        startTime: "", //
+        endTime: "", //
+        status: "", //状态节点
+
+        // --
+        page: 1, // 页码
+        size: 15, // 每页显示条数
         page: 1, // 页码
         page: 1, // 页码
         size: 15, // 每页显示条数
         size: 15, // 每页显示条数
       };
       };
@@ -336,26 +409,59 @@ export default {
       this.isDetail = isDetail;
       this.isDetail = isDetail;
       this.sitem = sitem;
       this.sitem = sitem;
     },
     },
+    async deleteById(id, status) {
+      await this.$confirm("确定要删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const model = {
+            id: id,
+            status: status === "1" ? "0" : "1",
+          };
+          const res = await asyncRequest.status(model);
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "删除成功",
+              message: "",
+            });
+            this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
     async searchList() {
     async searchList() {
       this.loading = true;
       this.loading = true;
-      this.tableData = [
-        {
-          nickname: "122222",
-          role_name: "333222",
-          mobile: "1212",
-          fee: "188",
-        },
-      ];
-      // const res = await asyncRequest.list(this.parmValue);
-      // if (res && res.code === 0 && res.data) {
-      //   this.tableData = res.data.list;
-      //   this.pageInfo.total = Number(res.data.count);
-      // } else if (res && res.code >= 100 && res.code <= 104) {
-      //   await this.logout();
-      // } else {
-      //   this.tableData = [];
-      //   this.pageInfo.total = 0;
-      // }
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      let _model = {
+        thNo: model.returnNumber, //退货编号
+        status: model.status, //节点状态
+        post_code: model.postNumber, //快递编码
+        post_compay: model.postCompany.toString(), //	快递公司
+        customer_code: model.clientNumber, //客户code
+        order_code: model.sellOrderNumber, //	确认单code
+        out_code: model.sellOutNumber, //	出库code
+        return_code: model.serviceNumber, //return_code
+        startTime: "",
+        endTime: "",
+      };
+      const res = await asyncRequest.list(_model);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
       this.loading = false;
       this.loading = false;
     },
     },
 
 
@@ -390,53 +496,22 @@ export default {
           console.log("取消");
           console.log("取消");
         });
         });
     },
     },
-    // 选择物流公司
-    handleCompany(e) {
-      console.log(e);
+    //物流公司查询
+    async handleCompany(e) {
+      console.log(e, "要求传快递简称,不传id"); //
       if (e && e.code) {
       if (e && e.code) {
-        this.parmValue.express_company = [e.code];
-        this.parmValue.page = 1;
-        // 调接口
-        console.log(this.parmValue.express_company);
-      }
-    },
-    // 时间
-    async handleTime(e) {
-      if (e.startTime !== "") {
-        this.parmValue.start = e.startTime;
-      } else {
-        this.parmValue.start = "";
-      }
-      if (e.endTime !== "") {
-        this.parmValue.end = e.endTime;
-      } else {
-        this.parmValue.end = "";
-      }
-      if (this.parmValue.start !== "" && this.parmValue.end !== "") {
+        // this.ruleForm.post_name = [e.code];
+        this.parmValue.postCompany = [e.shortName];
         this.parmValue.page = 1;
         this.parmValue.page = 1;
-        await this.searchList();
       }
       }
-    },
-    // 公司选择
-    supplierChange(e) {
-      if (e && e.id) {
-        this.parmValue.supplierNo = e.code; //供应商编码
-      } else {
-        this.parmValue.supplierNo = "";
-      }
-      this.parmValue.page = 1;
-      this.searchList();
-    },
-    // 选择退货单节点
-    handleNode(e) {
-      console.log(e);
-      this.parmValue.return_list_node = e;
+      console.log(this.parmValue.postCompany);
+      await this.searchList();
     },
     },
   },
   },
 };
 };
 </script>
 </script>
    <style lang="scss" scoped>
    <style lang="scss" scoped>
-.returnOrder {
+.sellReturnList {
 }
 }
 </style>
 </style>
    
    

+ 0 - 124
src/views/sellOut/returnOrder/returnDetail.vue

@@ -1,124 +0,0 @@
-<template>
-  <div class="returnDetail pagePadding">
-    <div
-      style="width: 100%"
-      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
-    >
-      <el-collapse v-model="activeNames">
-        <el-collapse-item title="退货验收记录" name="1">
-          <return-record @openModel="handleModel" />
-        </el-collapse-item>
-        <el-collapse-item title="退货验收审核" name="2">
-          <!-- <supplier-feedback></supplier-feedback> -->
-          <return-check></return-check>
-        </el-collapse-item>
-        <el-collapse-item title="退货业务审核" name="3">
-          <!-- <purchase-check></purchase-check> -->
-          <exam-form
-            :statusList="statusList"
-            :newTime="newTime"
-            :disabled="false"
-            :isMust="false"
-            @searchChange="examForm"
-          />
-        </el-collapse-item>
-      </el-collapse>
-      <add-edit
-        :id="modelId"
-        :sitem="sitem"
-        :show-model="showModel"
-        :is-detail="isDetail"
-        @refresh="searchList"
-        @cancel="showModel = false"
-      />
-    </div>
-    <div v-else>
-      <no-auth></no-auth>
-    </div>
-  </div>
-</template>
-   <script>
-import mixinPage from "@/mixins/elPaginationHandle";
-import resToken from "@/mixins/resToken";
-// import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder/detail";
-import ReturnRecord from "./components/return-record.vue";
-import returnCheck from "./components/returnCheck.vue";
-import addEdit from "./addEdit.vue";
-export default {
-  name: "returnDetail",
-  mixins: [mixinPage, resToken],
-  components: {
-    ReturnRecord,
-    addEdit,
-    returnCheck,
-  },
-  computed: {
-    powers() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "returnDetail"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-  },
-  data() {
-    return {
-      showModel: false,
-      activeNames: ["0", "1", "2", "3", "4"],
-      sitem: null,
-      statusList: [
-        // {
-        //   code: "0",
-        //   label: "待同意发货",
-        // },
-        // {
-        //   code: "1",
-        //   label: "待发货",
-        // },
-        // {
-        //   code: "2",
-        //   label: "部分发货",
-        // },
-        // {
-        //   code: "3",
-        //   label: "发货完成",
-        // },
-      ],
-      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();
-    },
-    handleModel() {
-      this.showModel = true;
-    },
-  },
-  examForm() {},
-};
-</script>
-   
-   

+ 108 - 0
src/views/sellOut/sellReturnList/columns.js

@@ -0,0 +1,108 @@
+export default [
+        {
+          prop: "orderCode",
+          label: "订单编号",
+          width:"160"
+        },
+        {
+          prop: "thNo",
+          label: "退货单编号",
+          width:"160"
+        },
+        // {确认单编号}
+        // {order_type类型}
+       
+
+        {
+          prop: "outCode",
+          label: "出库单编号",
+          width:"160"
+
+        },
+        {
+          prop: "returnCode",
+          label: "售后单编号",
+          width:"160"
+
+        },
+        {
+          prop: "return_wsm",   
+          label: "收货仓库",
+        },
+        {
+          prop: "return_num",
+          label: "退货数量",
+        },
+        {
+            prop:"normal_num",
+            label:"正常数量",
+        },
+        {
+            prop:"received_num",
+            label:"收货数量",
+        },
+        {
+          prop: "contactor",
+          label: "收货人",
+        },
+        {
+          prop: "mobile",
+          label: "联系电话",
+        },
+        {
+          prop: "addr",
+          label: "收货人地址",
+        },
+        // {地址code}
+        {
+          prop: "post_fee",
+          label: "邮费",
+        },
+        {
+          prop: "post_code",
+          label: "快递单号",
+          width:"160"
+        },
+         {
+          prop: "post_company",
+          label: "物流公司",
+        },
+        {
+            prop:"remark",
+            label:"备注",
+        },
+        {
+          prop: "return_code",
+          label: "退货原因",
+        },
+        {
+            prop:"good_code",
+            label:"商品属性编号",
+            width:"150"
+        },
+        {
+            prop:"good_name",
+            label:"商品名称",
+            width:"150"
+        },
+        {
+          prop: "status",
+          label: "状态",
+          _slot_: "status",
+          width: "80px",
+        },
+        {
+          prop: "addtime",
+          label: "申请时间",
+          sortable: true,
+          width:150
+        },
+        {
+          prop: "",
+          label: "操作",
+          fixed: "right",
+          _noset_: true,
+          _slot_: "operation",
+        },
+      
+]

+ 622 - 0
src/views/sellOut/sellReturnList/components/returnCheck copy.vue

@@ -0,0 +1,622 @@
+<template>
+  <el-form
+    ref="ruleForm"
+    :loading="loading"
+    :model="ruleForm"
+    status-icon
+    :rules="rulesThis"
+    label-width="100px"
+    style="width: 100%"
+    class="demo-ruleForm"
+  >
+    <el-row>
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="异常数量" prop="anomalous_numbers">
+            <el-input
+              :disabled="disabled"
+              v-model="ruleForm.anomalous_numbers"
+              placeholder="请输入异常数量"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="异常原因" prop="anomalous_reason">
+            <el-select
+              style="width: 100%"
+              :disabled="disabled"
+              v-model="ruleForm.anomalous_reason"
+              placeholder="请选择异常原因"
+            >
+              <el-option
+                v-for="item in reason_options"
+                :key="item.id"
+                :label="item.result"
+                :value="item.result_code"
+                :disabled="item.status == 0"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="期望意愿" prop="expect_wish">
+            <el-select
+              style="width: 100%"
+              :disabled="disabled"
+              v-model="ruleForm.expect_wish"
+              placeholder="请选择期望意愿"
+            >
+              <el-option
+                v-for="item in expect_options"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="异常备注" prop="anomalous_remark">
+            <el-input
+              type="textarea"
+              placeholder="请输入异常原因备注"
+              v-model="ruleForm.anomalous_remark"
+              :disabled="disabled"
+              maxlength="250"
+              show-word-limit
+            />
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+      <el-col :span="24">
+        <el-form-item label="异常图片" prop="anomalous_images">
+          <div class="el-form-item-error-img">
+            <ul>
+              <li
+                class="images_li"
+                :style="getMargin_li()"
+                v-for="(item, index) in ruleForm.anomalous_images"
+                :key="item"
+              >
+                <img :src="item" alt="" style="width: 254px; height: 164px" />
+                <i class="el-icon-close" @click="imgClose(index)"></i>
+              </li>
+            </ul>
+            <div
+              class="btnupload"
+              :style="getMargin()"
+              v-if="ruleForm.anomalous_images.length < 5 && isShow"
+              style="position: relative"
+              @click="open"
+            >
+              <i class="el-icon-plus avatar-uploader-icon"></i>
+              <file-upload
+                class="Upload"
+                :accept="'.jpg,.png,.bmp,.jpeg'"
+                :multiple="true"
+                :uploadcondition="beforeAvatarUpload"
+                @UploadErrorEvent="UploadErrorEvent"
+                @UploadSuccessEvent="UploadSuccessEvent"
+              />
+            </div>
+          </div>
+        </el-form-item>
+      </el-col>
+
+      <el-col :span="24" style="text-align: right">
+        <el-button
+          type="primary"
+          @click="submitForm"
+          v-if="
+            id === 'add' ||
+            (status === '0' && powers.some((item) => item == '005'))
+          "
+          >保 存</el-button
+        >
+        <el-button
+          type="primary"
+          @click="statusConfirm('1', '发起审核流程')"
+          v-if="status === '0' && powers.some((item) => item == '012')"
+          >发起审核流程
+        </el-button>
+        <el-button
+          @click="statusConfirm('0', '取消审核流程')"
+          plain
+          v-if="status === '1' && powers.some((item) => item == '014')"
+          >取消审核流程</el-button
+        >
+        <el-button
+          @click="statusConfirm('-1', '作废该条信息')"
+          type="danger"
+          plain
+          v-if="
+            (status === '0' || status === '1') &&
+            powers.some((item) => item == '015')
+          "
+          >作废该条信息</el-button
+        >
+        <el-button
+          @click="statusConfirm('2', '通过审核')"
+          type="primary"
+          v-if="status === '1' && powers.some((item) => item == '016')"
+          >通过审核</el-button
+        >
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+<script>
+import { isnumber } from "@/utils/validate.js";
+import asyncRequest from "@/apis/service/goodsService";
+import resToken from "@/mixins/resToken";
+export default {
+  name: "handover",
+  props: ["id", "sitem", "showModelThis", "newTime"],
+  mixins: [resToken],
+  data() {
+    const validatenumbers = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("异常数量不能为空!"));
+      } else {
+        if (!isnumber(value)) {
+          callback(new Error("异常数量必须为数字"));
+        } else {
+          callback();
+        }
+      }
+    };
+    return {
+      isShow: true,
+      loading: false,
+      disabled: true,
+      status: "", //存储详情接口返的状态
+      showModelThis: this.showModel,
+      resign_name: "", //离职人
+      hand_name: "", //交接人
+      ruleForm: {
+        order_type: "1", //售后类型 1销售2咨询,
+        outCode: "", //
+        stock_out_numbers: "", //出库单编号
+        anomalous_numbers: "", //异常数量
+        anomalous_reason: "", //异常原因
+        expect_wish: "", //期望意愿
+        anomalous_images: [],
+        anomalous_remark: "", //异常备注
+      },
+      rulesThis: this.rules,
+      // 验证规则
+      rules: {
+        anomalous_numbers: [
+          {
+            required: true,
+            trigger: "blur",
+            validator: validatenumbers,
+          },
+        ],
+        anomalous_reason: [
+          {
+            required: true,
+            message: "请选择异常原因",
+            trigger: "change",
+          },
+        ],
+        expect_wish: [
+          {
+            required: true,
+            message: "请选择期望意愿",
+            trigger: "change",
+          },
+        ],
+        anomalous_images: [
+          {
+            type: "array",
+            required: true,
+            message: "异常图片不能为空!",
+            trigger: "change",
+          },
+        ],
+        anomalous_remark: [
+          {
+            required: true,
+            message: "请输入异常原因备注",
+            trigger: "blur",
+          },
+        ],
+      },
+      reason_options: [],
+      reason_value: "", //异常原因
+      expect_options: [
+        {
+          value: "1",
+          label: "退货",
+        },
+        {
+          value: "2",
+          label: "换货",
+        },
+        {
+          value: "3",
+          label: "接受差异改变售价",
+        },
+      ],
+      expect_value: "", //期望意愿
+    };
+  },
+  computed: {
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "handoverDetail"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  created() {
+    this.getReason(); //获取异常原因
+    this.initForm();
+  },
+  watch: {
+    id: function (val) {
+      if (val) {
+        this.initForm();
+      }
+    },
+    newTime: function (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;
+        this.disabled = false;
+        await this.resetForm();
+      } else {
+        this.isShow = false;
+        this.rulesThis = this.rules;
+        await this.resetForm();
+        await this.initData();
+      }
+      this.loading = false;
+    },
+    async initData() {
+      console.log(this.sitem);
+      if (this.sitem) {
+        let { returnCode } = this.sitem;
+        let model = {
+          returnCode,
+        };
+        const res = await asyncRequest.detail(model);
+        if (res && res.code === 0 && res.data) {
+          let { error_num, error_img, error_remark, except_code, error_code } =
+            res.data;
+          console.log(res.data);
+          this.ruleForm = {
+            stock_out_numbers: "", //出库单编号
+            anomalous_numbers: error_num, //异常数量
+            anomalous_reason: error_code, //异常原因
+            expect_wish: except_code, //期望意愿
+            anomalous_images: [error_img],
+            anomalous_remark: error_remark, //异常备注
+          };
+        } else if (res && res.code >= 100 && res.code <= 104) {
+          await this.logout();
+        } else {
+          this.$message.warning(res.message);
+        }
+      }
+    },
+
+    async resetForm() {
+      this.resign_name = "";
+      this.hand_name = "";
+      this.status = "";
+      // 重置
+      await this.$nextTick(() => {
+        if (this.$refs.ruleForm) {
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+
+          let { bum } = this.sitem;
+          if (this.id === "add") {
+            let OutCode = "";
+            bum.map((ele) => {
+              OutCode = ele.outCode;
+            });
+            this.ruleForm = {
+              anomalous_numbers: "", //异常数量
+              anomalous_reason: "", //异常原因
+              expect_wish: "", //期望意愿
+              anomalous_images: [],
+              outCode: OutCode,
+            };
+          }
+        }
+      });
+    },
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          const { anomalous_numbers } = this.ruleForm;
+          if (this.sitem.send_num < anomalous_numbers) {
+            this.$message.warning("异常数量不能大于发货数量");
+            return false;
+          }
+          let model = JSON.parse(JSON.stringify(this.ruleForm));
+
+          // console.log("调接口");
+          let _model = {
+            order_type: "1",
+            outCode: model.outCode,
+            errorCode: model.anomalous_reason, //异常原因
+            num: model.anomalous_numbers,
+            remark: model.anomalous_remark,
+            except_code: model.expect_wish,
+            img: model.anomalous_images.toString(),
+          };
+
+          console.log(_model);
+          const res = await asyncRequest.add(_model);
+
+          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;
+        }
+      });
+    },
+    async statusConfirm(status, message) {
+      await this.$confirm(`确定要${message}?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          if (status === "-1") {
+            await this.deleteById(message);
+          } else {
+            await this.setStatus(status, message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+
+    async deleteById(message) {
+      const res = await asyncRequest.delete({ id: this.id });
+      if (res && res.code === 0) {
+        this.$notify.success({
+          title: message + "成功!",
+          message: "",
+        });
+
+        this.routeGoto("handover", {});
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+
+    async setStatus(status, message) {
+      let model = {
+        id: this.id,
+        remark: "",
+        status: status,
+      };
+      const res = await asyncRequest.status(model);
+      this.loading = false;
+      if (res && res.code === 0) {
+        this.$notify.success({
+          title: message + "成功!",
+          message: "",
+        });
+        this.initForm();
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+
+    open() {
+      this.show = true;
+    },
+    // 获取异常原因
+    async getReason() {
+      let model = {
+        type: "2",
+        page: 1,
+        size: 100,
+      };
+      const res = await asyncRequest.reasonList(model);
+      this.loading = false;
+      if (res && res.code === 0) {
+        this.reason_options = res.data.list;
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+    // 异常原因
+    handleAnomalousReason(e) {
+      console.log(e);
+      if (e) {
+        this.ruleForm.anomalous_reason = e;
+      } else {
+        this.ruleForm.anomalous_reason = "";
+      }
+      this.$refs.ruleForm.validateField("company_img");
+    },
+    //图片上传失败
+    UploadErrorEvent() {
+      this.$message.error("图片上传失败!");
+      this.$refs.ruleForm.validateField("anomalous_images");
+    },
+    //图片上传成功
+    UploadSuccessEvent(data) {
+      if (data && data.url && data.url !== "break") {
+        const { url } = data.url;
+        this.ruleForm.anomalous_images.push(url);
+        this.$message.success("图片上传成功!");
+        this.$refs.ruleForm.validateField("anomalous_images");
+      }
+    },
+    //判断图片规格
+    beforeAvatarUpload(file) {
+      let isJPG = false,
+        isLt2M = false;
+      if (file) {
+        if (
+          file.type === "image/jpg" ||
+          file.type === "image/png" ||
+          file.type === "image/bmp" ||
+          file.type === "image/jpeg"
+        ) {
+          isJPG = true;
+        }
+        isLt2M = file.size / 1024 / 1024 < 1;
+        if (!isJPG) {
+          this.$message.error("图片格式不正确!");
+        }
+        if (!isLt2M) {
+          this.$message.error("图片大小不能超过 1MB!");
+        }
+      }
+
+      return isJPG && isLt2M;
+    },
+    imgClose(index) {
+      this.ruleForm.anomalous_images.splice(index, 1);
+      this.$refs.ruleForm.validateField("anomalous_images");
+    },
+    getMargin() {
+      if (this.ruleForm.anomalous_images.length == 0) {
+        return "margin:0;";
+      } else if (this.ruleForm.anomalous_images.length < 3) {
+        return "margin:0px 0 0 10px";
+      } else {
+        return "margin:10px 0 0 10px";
+      }
+    },
+    getMargin_li() {
+      if (this.ruleForm.anomalous_images.length <= 3) {
+        return "margin:0 0 0 10px";
+      } else {
+        return "margin:10px 0 0 10px";
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.el-form-item-error-img {
+  width: 100%;
+  ul {
+    width: 100%;
+    li {
+      float: left;
+      border: 1px solid rgb(220, 223, 230);
+      // border-left: 0;
+      box-sizing: border-box;
+      width: 254px;
+      height: 164px;
+      line-height: 164px;
+      position: relative;
+      img {
+        display: inline-block;
+        width: 100%;
+        height: 100%;
+      }
+      .el-icon-close {
+        position: absolute;
+        top: 0;
+        right: 0;
+        z-index: 2;
+        width: 25px;
+        height: 25px;
+        text-align: center;
+        line-height: 25px;
+        font-size: 19px;
+        &:hover {
+          color: #63cbe7;
+        }
+      }
+    }
+  }
+}
+.images_li {
+  // width: 254px;
+  // height: 164px;
+  float: left;
+}
+.btnupload {
+  float: left;
+  border: 1px solid rgb(220, 223, 230);
+  // border-left: 0;
+  box-sizing: border-box;
+  width: 254px;
+  height: 164px;
+  line-height: 164px;
+  text-align: center;
+}
+.Upload {
+  width: 254px;
+  height: 164px;
+  line-height: 164px;
+  text-align: center;
+  position: absolute;
+  line-height: 0px;
+  top: 0;
+  left: 0;
+  z-index: 2;
+  line-height: 164px;
+}
+.avatar-uploader-icon {
+  font-size: 33px;
+  color: #8c939d;
+  width: 50px;
+  height: 50px;
+  line-height: 50px;
+  text-align: center;
+}
+</style>

+ 569 - 0
src/views/sellOut/sellReturnList/components/returnCheck.vue

@@ -0,0 +1,569 @@
+<template>
+  <el-form
+    ref="ruleForm"
+    :loading="loading"
+    :model="ruleForm"
+    status-icon
+    :rules="rulesThis"
+    label-width="100px"
+    style="width: 100%"
+    class="demo-ruleForm"
+  >
+    <p>sitem{{ sitem }}</p>
+    <el-row>
+      <el-row>
+        <!-- 收货商品数量 getGoods_numbers-->
+        <el-col :span="12">
+          <el-form-item label="收货数量" prop="getGoods_numbers">
+            <el-input
+              :disabled="disabled"
+              v-model="ruleForm.getGoods_numbers"
+              placeholder="请输入收货数量"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <!-- 正常销售商品数量 canSellGoods_numbers-->
+        <el-col :span="12">
+          <el-form-item label="可销售数量" prop="canSellGoods_numbers">
+            <el-input
+              :disabled="disabled"
+              v-model="ruleForm.getGoods_numbers"
+              placeholder="请输入可销售数量"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <!-- 其他备注 otherRemark-->
+        <el-col :span="12" offset="12">
+          <el-form-item label="其他备注" prop="otherRemark">
+            <el-input
+              type="textarea"
+              placeholder="请输入其他原因备注"
+              v-model="ruleForm.otherRemark"
+              :disabled="disabled"
+              maxlength="250"
+              show-word-limit
+            />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <!-- 异常情况记录  anomalousRecard-->
+        <el-col :span="12" offset="12">
+          <el-form-item label="异常情况记录" prop="anomalousRecard">
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-col :span="24" style="text-align: right">
+        <el-button
+          type="primary"
+          @click="submitForm"
+          v-if="
+            id === 'add' ||
+            (status === '0' && powers.some((item) => item == '005'))
+          "
+          >保 存</el-button
+        >
+        <el-button
+          type="primary"
+          @click="statusConfirm('1', '发起审核流程')"
+          v-if="status === '0' && powers.some((item) => item == '012')"
+          >发起审核流程
+        </el-button>
+        <el-button
+          @click="statusConfirm('0', '取消审核流程')"
+          plain
+          v-if="status === '1' && powers.some((item) => item == '014')"
+          >取消审核流程</el-button
+        >
+        <el-button
+          @click="statusConfirm('-1', '作废该条信息')"
+          type="danger"
+          plain
+          v-if="
+            (status === '0' || status === '1') &&
+            powers.some((item) => item == '015')
+          "
+          >作废该条信息</el-button
+        >
+        <el-button
+          @click="statusConfirm('2', '通过审核')"
+          type="primary"
+          v-if="status === '1' && powers.some((item) => item == '016')"
+          >通过审核</el-button
+        >
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+<script>
+import { isnumber } from "@/utils/validate.js";
+import asyncRequest from "@/apis/service/goodsService";
+import resToken from "@/mixins/resToken";
+export default {
+  name: "handover",
+  props: ["id", "sitem", "showModelThis", "newTime"],
+  mixins: [resToken],
+  data() {
+    const validatenumbers = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("异常数量不能为空!"));
+      } else {
+        if (!isnumber(value)) {
+          callback(new Error("异常数量必须为数字"));
+        } else {
+          callback();
+        }
+      }
+    };
+    return {
+      isShow: true,
+      loading: false,
+      disabled: true,
+      status: "", //存储详情接口返的状态
+      showModelThis: this.showModel,
+      resign_name: "", //离职人
+      hand_name: "", //交接人
+      ruleForm: {
+        order_type: "1", //售后类型 1销售2咨询,
+        outCode: "", //
+        stock_out_numbers: "", //出库单编号
+        anomalous_numbers: "", //异常数量
+        anomalous_reason: "", //异常原因
+        expect_wish: "", //期望意愿
+        anomalous_images: [],
+        anomalous_remark: "", //异常备注
+      },
+      rulesThis: this.rules,
+      // 验证规则
+      rules: {
+        anomalous_numbers: [
+          {
+            required: true,
+            trigger: "blur",
+            validator: validatenumbers,
+          },
+        ],
+        anomalous_reason: [
+          {
+            required: true,
+            message: "请选择异常原因",
+            trigger: "change",
+          },
+        ],
+        expect_wish: [
+          {
+            required: true,
+            message: "请选择期望意愿",
+            trigger: "change",
+          },
+        ],
+        anomalous_images: [
+          {
+            type: "array",
+            required: true,
+            message: "异常图片不能为空!",
+            trigger: "change",
+          },
+        ],
+        anomalous_remark: [
+          {
+            required: true,
+            message: "请输入异常原因备注",
+            trigger: "blur",
+          },
+        ],
+      },
+      reason_options: [],
+      reason_value: "", //异常原因
+      expect_options: [
+        {
+          value: "1",
+          label: "退货",
+        },
+        {
+          value: "2",
+          label: "换货",
+        },
+        {
+          value: "3",
+          label: "接受差异改变售价",
+        },
+      ],
+      expect_value: "", //期望意愿
+    };
+  },
+  computed: {
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "handoverDetail"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  created() {
+    this.getReason(); //获取异常原因
+    this.initForm();
+  },
+  watch: {
+    id: function (val) {
+      if (val) {
+        this.initForm();
+      }
+    },
+    newTime: function (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;
+        this.disabled = false;
+        await this.resetForm();
+      } else {
+        this.isShow = false;
+        this.rulesThis = this.rules;
+        await this.resetForm();
+        await this.initData();
+      }
+      this.loading = false;
+    },
+    async initData() {
+      console.log(this.sitem);
+      if (this.sitem) {
+        let { returnCode } = this.sitem;
+        let model = {
+          returnCode,
+        };
+        const res = await asyncRequest.detail(model);
+        if (res && res.code === 0 && res.data) {
+          let { error_num, error_img, error_remark, except_code, error_code } =
+            res.data;
+          console.log(res.data);
+          this.ruleForm = {
+            stock_out_numbers: "", //出库单编号
+            anomalous_numbers: error_num, //异常数量
+            anomalous_reason: error_code, //异常原因
+            expect_wish: except_code, //期望意愿
+            anomalous_images: [error_img],
+            anomalous_remark: error_remark, //异常备注
+          };
+        } else if (res && res.code >= 100 && res.code <= 104) {
+          await this.logout();
+        } else {
+          this.$message.warning(res.message);
+        }
+      }
+    },
+
+    async resetForm() {
+      this.resign_name = "";
+      this.hand_name = "";
+      this.status = "";
+      // 重置
+      await this.$nextTick(() => {
+        if (this.$refs.ruleForm) {
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+          
+          let { bum } = this.sitem;
+          if (this.id === "add") {
+            let OutCode = "";
+            bum.map((ele) => {
+              OutCode = ele.outCode;
+            });
+            this.ruleForm = {
+              anomalous_numbers: "", //异常数量
+              anomalous_reason: "", //异常原因
+              expect_wish: "", //期望意愿
+              anomalous_images: [],
+              outCode: OutCode,
+            };
+          }
+        }
+      });
+    },
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          const { anomalous_numbers } = this.ruleForm;
+          if (this.sitem.send_num < anomalous_numbers) {
+            this.$message.warning("异常数量不能大于发货数量");
+            return false;
+          }
+          let model = JSON.parse(JSON.stringify(this.ruleForm));
+
+          // console.log("调接口");
+          let _model = {
+            order_type: "1",
+            outCode: model.outCode,
+            errorCode: model.anomalous_reason, //异常原因
+            num: model.anomalous_numbers,
+            remark: model.anomalous_remark,
+            except_code: model.expect_wish,
+            img: model.anomalous_images.toString(),
+          };
+
+          console.log(_model);
+          const res = await asyncRequest.add(_model);
+
+          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;
+        }
+      });
+    },
+    async statusConfirm(status, message) {
+      await this.$confirm(`确定要${message}?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          if (status === "-1") {
+            await this.deleteById(message);
+          } else {
+            await this.setStatus(status, message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+
+    async deleteById(message) {
+      const res = await asyncRequest.delete({ id: this.id });
+      if (res && res.code === 0) {
+        this.$notify.success({
+          title: message + "成功!",
+          message: "",
+        });
+
+        this.routeGoto("handover", {});
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+
+    async setStatus(status, message) {
+      let model = {
+        id: this.id,
+        remark: "",
+        status: status,
+      };
+      const res = await asyncRequest.status(model);
+      this.loading = false;
+      if (res && res.code === 0) {
+        this.$notify.success({
+          title: message + "成功!",
+          message: "",
+        });
+        this.initForm();
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+
+    open() {
+      this.show = true;
+    },
+    // 获取异常原因
+    async getReason() {
+      let model = {
+        type: "2",
+        page: 1,
+        size: 100,
+      };
+      const res = await asyncRequest.reasonList(model);
+      this.loading = false;
+      if (res && res.code === 0) {
+        this.reason_options = res.data.list;
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+    // 异常原因
+    handleAnomalousReason(e) {
+      console.log(e);
+      if (e) {
+        this.ruleForm.anomalous_reason = e;
+      } else {
+        this.ruleForm.anomalous_reason = "";
+      }
+      this.$refs.ruleForm.validateField("company_img");
+    },
+    //图片上传失败
+    UploadErrorEvent() {
+      this.$message.error("图片上传失败!");
+      this.$refs.ruleForm.validateField("anomalous_images");
+    },
+    //图片上传成功
+    UploadSuccessEvent(data) {
+      if (data && data.url && data.url !== "break") {
+        const { url } = data.url;
+        this.ruleForm.anomalous_images.push(url);
+        this.$message.success("图片上传成功!");
+        this.$refs.ruleForm.validateField("anomalous_images");
+      }
+    },
+    //判断图片规格
+    beforeAvatarUpload(file) {
+      let isJPG = false,
+        isLt2M = false;
+      if (file) {
+        if (
+          file.type === "image/jpg" ||
+          file.type === "image/png" ||
+          file.type === "image/bmp" ||
+          file.type === "image/jpeg"
+        ) {
+          isJPG = true;
+        }
+        isLt2M = file.size / 1024 / 1024 < 1;
+        if (!isJPG) {
+          this.$message.error("图片格式不正确!");
+        }
+        if (!isLt2M) {
+          this.$message.error("图片大小不能超过 1MB!");
+        }
+      }
+
+      return isJPG && isLt2M;
+    },
+    imgClose(index) {
+      this.ruleForm.anomalous_images.splice(index, 1);
+      this.$refs.ruleForm.validateField("anomalous_images");
+    },
+    getMargin() {
+      if (this.ruleForm.anomalous_images.length == 0) {
+        return "margin:0;";
+      } else if (this.ruleForm.anomalous_images.length < 3) {
+        return "margin:0px 0 0 10px";
+      } else {
+        return "margin:10px 0 0 10px";
+      }
+    },
+    getMargin_li() {
+      if (this.ruleForm.anomalous_images.length <= 3) {
+        return "margin:0 0 0 10px";
+      } else {
+        return "margin:10px 0 0 10px";
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.el-form-item-error-img {
+  width: 100%;
+  ul {
+    width: 100%;
+    li {
+      float: left;
+      border: 1px solid rgb(220, 223, 230);
+      // border-left: 0;
+      box-sizing: border-box;
+      width: 254px;
+      height: 164px;
+      line-height: 164px;
+      position: relative;
+      img {
+        display: inline-block;
+        width: 100%;
+        height: 100%;
+      }
+      .el-icon-close {
+        position: absolute;
+        top: 0;
+        right: 0;
+        z-index: 2;
+        width: 25px;
+        height: 25px;
+        text-align: center;
+        line-height: 25px;
+        font-size: 19px;
+        &:hover {
+          color: #63cbe7;
+        }
+      }
+    }
+  }
+}
+.images_li {
+  // width: 254px;
+  // height: 164px;
+  float: left;
+}
+.btnupload {
+  float: left;
+  border: 1px solid rgb(220, 223, 230);
+  // border-left: 0;
+  box-sizing: border-box;
+  width: 254px;
+  height: 164px;
+  line-height: 164px;
+  text-align: center;
+}
+.Upload {
+  width: 254px;
+  height: 164px;
+  line-height: 164px;
+  text-align: center;
+  position: absolute;
+  line-height: 0px;
+  top: 0;
+  left: 0;
+  z-index: 2;
+  line-height: 164px;
+}
+.avatar-uploader-icon {
+  font-size: 33px;
+  color: #8c939d;
+  width: 50px;
+  height: 50px;
+  line-height: 50px;
+  text-align: center;
+}
+</style>

+ 121 - 99
src/views/sellOut/sellReturnList/index.vue

@@ -29,36 +29,37 @@
           <div style="width: 100%">
           <div style="width: 100%">
             <el-row style="padding: 0 0 0 80px">
             <el-row style="padding: 0 0 0 80px">
               <el-col :span="24">
               <el-col :span="24">
-                <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
+                <!-- 销售订单编号 -->
+                <el-col :span="4" style="width: 220px; padding: 0 0 0 0px">
                   <el-input
                   <el-input
+                    clearable
                     :size="searchSize"
                     :size="searchSize"
-                    v-model="parmValue.purchaseNum"
+                    v-model="parmValue.sellOrderNumber"
                     :maxlength="40"
                     :maxlength="40"
-                    placeholder="采购单编号"
+                    placeholder="订单编号"
+                    @blur="searchList"
                   />
                   />
                 </el-col>
                 </el-col>
-                <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
+                <!-- 退货编号 -->
+                <el-col :span="4" style="width: 220px; padding: 0 0 0 10px">
                   <el-input
                   <el-input
+                    clearable
                     :size="searchSize"
                     :size="searchSize"
-                    v-model="parmValue.returnNum"
+                    v-model="parmValue.returnNumber"
                     :maxlength="40"
                     :maxlength="40"
-                    placeholder="退货编号"
+                    placeholder="退货单编号"
+                    @blur="searchList"
                   />
                   />
                 </el-col>
                 </el-col>
-                <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
+                <!-- 销售出库编号 -->
+                <el-col :span="4" style="width: 220px; padding: 0 0 0 10px">
                   <el-input
                   <el-input
+                    clearable
                     :size="searchSize"
                     :size="searchSize"
-                    v-model="parmValue.returnStock"
+                    v-model="parmValue.sellOutNumber"
                     :maxlength="40"
                     :maxlength="40"
-                    placeholder="退货仓库编号"
-                  />
-                </el-col>
-                <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
-                  <el-input
-                    :size="searchSize"
-                    v-model="parmValue.returnCompany"
-                    :maxlength="40"
-                    placeholder="退货公司编号"
+                    placeholder="出库单编号"
+                    @blur="searchList"
                   />
                   />
                 </el-col>
                 </el-col>
 
 
@@ -90,14 +91,29 @@
               </el-col>
               </el-col>
             </el-row>
             </el-row>
             <el-row style="padding: 10px 0 0 0">
             <el-row style="padding: 10px 0 0 0">
-              <el-col :span="4" style="width: 160px; padding: 0px 0 0 0px">
+              <!-- 售后申请编号 -->
+              <el-col :span="4" style="width: 200px; padding: 0 0 0 0px">
+                <el-input
+                  clearable
+                  :size="searchSize"
+                  v-model="parmValue.serviceNumber"
+                  :maxlength="40"
+                  placeholder="售后单编号"
+                  @blur="searchList"
+                />
+              </el-col>
+              <!-- 退回客户编号 -->
+              <el-col :span="4" style="width: 200px; padding: 0 0 0 10px">
                 <el-input
                 <el-input
+                  clearable
                   :size="searchSize"
                   :size="searchSize"
-                  v-model="parmValue.returner"
+                  v-model="parmValue.clientNumber"
                   :maxlength="40"
                   :maxlength="40"
-                  placeholder="申请人"
+                  placeholder="客户编号"
+                  @blur="searchList"
                 />
                 />
               </el-col>
               </el-col>
+              <!-- 时间区间 -->
               <el-col :span="6" style="width: 303px; padding: 0 0 0 10px">
               <el-col :span="6" style="width: 303px; padding: 0 0 0 10px">
                 <period-date-picker
                 <period-date-picker
                   :type="1"
                   :type="1"
@@ -108,13 +124,40 @@
                   @timeReturned="handleTime"
                   @timeReturned="handleTime"
                 />
                 />
               </el-col>
               </el-col>
+            </el-row>
+
+            <el-row style="padding: 10px 0 0 0">
+              <!-- 快递公司 -->
+              <el-col :span="4" style="width: 180px; padding: 0 0 0 0px">
+                <search-express
+                  :size="searchSize"
+                  :value="parmValue.parmValue"
+                  :placeholder="'物流公司'"
+                  :names="''"
+                  :is-detail="false"
+                  @searchChange="handleCompany"
+                />
+              </el-col>
+              <!-- 快递单号 -->
+              <el-col :span="4" style="width: 200px; padding: 0 0 0 10px">
+                <el-input
+                  clearable
+                  :size="searchSize"
+                  v-model="parmValue.postNumber"
+                  :maxlength="40"
+                  placeholder="快递单号"
+                  @blur="searchList"
+                />
+              </el-col>
+
+              <!-- 节点查询 -->
               <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
               <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
                 <el-select
                 <el-select
                   :size="searchSize"
                   :size="searchSize"
                   v-model="parmValue.status"
                   v-model="parmValue.status"
                   filterable
                   filterable
                   clearable
                   clearable
-                  placeholder="退货节点"
+                  placeholder="节点"
                   style="width: 100%"
                   style="width: 100%"
                   @change="
                   @change="
                     pageInfo.curr = 1;
                     pageInfo.curr = 1;
@@ -182,8 +225,9 @@
           >
           >
             <i
             <i
               class="el-icon-view tb-icon"
               class="el-icon-view tb-icon"
-              @click="openModal(scope.row.id, true, scope.row)"
+              @click="routeGoto('sellReturnDetail', { id: scope.row })"
             ></i>
             ></i>
+            <!-- @click="openModal(scope.row.id, true, scope.row)" -->
           </el-tooltip>
           </el-tooltip>
           <el-tooltip
           <el-tooltip
             v-if="powers.some((item) => item == '005')"
             v-if="powers.some((item) => item == '005')"
@@ -242,6 +286,7 @@
 import mixinPage from "@/mixins/elPaginationHandle";
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import resToken from "@/mixins/resToken";
 import statusList from "@/assets/js/statusList";
 import statusList from "@/assets/js/statusList";
+import columns from "./columns";
 import asyncRequest from "@/apis/service/sellOut/sellReturnList";
 import asyncRequest from "@/apis/service/sellOut/sellReturnList";
 import addEdit from "./addEdit";
 import addEdit from "./addEdit";
 import { mapGetters } from "vuex";
 import { mapGetters } from "vuex";
@@ -269,8 +314,10 @@ export default {
   data() {
   data() {
     return {
     return {
       statusList: [
       statusList: [
-        { value: "0", label: "节点1" },
-        { value: "1", label: "节点2" },
+        { value: "0", label: "待验收" },
+        { value: "1", label: "待验收审核" },
+        { value: "1", label: "待业务审核" },
+        { value: "1", label: "完成退货" },
       ],
       ],
       sitem: null,
       sitem: null,
       // 状态
       // 状态
@@ -284,13 +331,17 @@ export default {
       isDetail: false,
       isDetail: false,
       modelId: 0,
       modelId: 0,
       parmValue: {
       parmValue: {
-        purchaseNum: "", //采购单编号
-        returnNum: "", //退货编号
-        returnStock: "", //退货仓库编号
-        returnCompany: "", //退货公司编号
-        returner: "", //申请人
-        start: "", //退货节点
-        end: "",
+        sellOrderNumber: "", //销售订单编号
+        returnNumber: "", //退货编号
+        sellOutNumber: "", //销售出库编号
+        serviceNumber: "", //售后申请编号
+        postCompany: "", //物流公司
+        postNumber: "", //物流单号
+        startTime: "", //
+        endTime: "", //
+        status: "", //状态节点
+        clientNumber: "", //退货客户编号
+        // --
         page: 1, // 页码
         page: 1, // 页码
         size: 15, // 每页显示条数
         size: 15, // 每页显示条数
       },
       },
@@ -313,70 +364,7 @@ export default {
         total: 0,
         total: 0,
       },
       },
       // 表格 - 列参数
       // 表格 - 列参数
-      columns: [
-        {
-          prop: "nickname",
-          label: "采购单编号",
-        },
-        {
-          prop: "role_name",
-          label: "退货单编号",
-        },
-        {
-          prop: "mobile",
-          label: "退货仓库编号",
-        },
-        {
-          prop: "email",
-          label: "退货仓库名称",
-        },
-        {
-          prop: "a",
-          label: "退货公司",
-        },
-        {
-          prop: "a",
-          label: "退货公司编号",
-        },
-        {
-          prop: "a",
-          label: "退货数量",
-        },
-        {
-          prop: "a",
-          label: "商品信息",
-        },
-        {
-          prop: "a",
-          label: "商品单价",
-        },
-        {
-          prop: "a",
-          label: "退货总金额",
-        },
-        {
-          prop: "a",
-          label: "申请人",
-        },
-        {
-          prop: "status",
-          label: "状态",
-          _slot_: "status",
-          width: "80px",
-        },
-        {
-          prop: "addtime",
-          label: "申请时间",
-          sortable: true,
-        },
-        {
-          prop: "",
-          label: "操作",
-          fixed: "right",
-          _noset_: true,
-          _slot_: "operation",
-        },
-      ],
+      columns: columns,
     };
     };
   },
   },
   mounted() {
   mounted() {
@@ -386,9 +374,19 @@ export default {
   methods: {
   methods: {
     restSearch() {
     restSearch() {
       this.parmValue = {
       this.parmValue = {
-        name: "", // 业务员名字
-        username: "", // 账号
-        status: "", //
+        sellOrderNumber: "", //销售订单编号
+        returnNumber: "", //退货编号
+        sellOutNumber: "", //销售出库编号
+        serviceNumber: "", //售后申请编号
+        postCompany: "", //物流公司
+        postNumber: "", //物流单号
+        startTime: "", //
+        endTime: "", //
+        status: "", //状态节点
+
+        // --
+        page: 1, // 页码
+        size: 15, // 每页显示条数
         page: 1, // 页码
         page: 1, // 页码
         size: 15, // 每页显示条数
         size: 15, // 每页显示条数
       };
       };
@@ -437,7 +435,20 @@ export default {
     },
     },
     async searchList() {
     async searchList() {
       this.loading = true;
       this.loading = true;
-      const res = await asyncRequest.list(this.parmValue);
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      let _model = {
+        thNo: model.returnNumber, //退货编号
+        status: model.status, //节点状态
+        post_code: model.postNumber, //快递编码
+        post_compay: model.postCompany.toString(), //	快递公司
+        customer_code: model.clientNumber, //客户code
+        order_code: model.sellOrderNumber, //	确认单code
+        out_code: model.sellOutNumber, //	出库code
+        return_code: model.serviceNumber, //return_code
+        startTime: "",
+        endTime: "",
+      };
+      const res = await asyncRequest.list(_model);
       if (res && res.code === 0 && res.data) {
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
         this.tableData = res.data.list;
         this.pageInfo.total = Number(res.data.count);
         this.pageInfo.total = Number(res.data.count);
@@ -481,6 +492,17 @@ export default {
           console.log("取消");
           console.log("取消");
         });
         });
     },
     },
+    //物流公司查询
+    async handleCompany(e) {
+      console.log(e, "要求传快递简称,不传id"); //
+      if (e && e.code) {
+        // this.ruleForm.post_name = [e.code];
+        this.parmValue.postCompany = [e.shortName];
+        this.parmValue.page = 1;
+      }
+      console.log(this.parmValue.postCompany);
+      await this.searchList();
+    },
   },
   },
 };
 };
 </script>
 </script>