Forráskód Böngészése

订单售后申请

zhangjinxing 3 éve
szülő
commit
c977985afb
28 módosított fájl, 2459 hozzáadás és 98 törlés
  1. 3 3
      src/apis/service/goodsService/index.js
  2. 21 0
      src/apis/service/sellOut/sellReturnList/index.js
  3. 6 6
      src/views/purchaseIn/purchaseOrder/columns.js
  4. 2 2
      src/views/purchaseIn/purchaseOrder/index.vue
  5. 77 23
      src/views/sellOut/goodsService/columns.js
  6. 25 6
      src/views/sellOut/goodsService/components/addEditForm.vue
  7. 363 0
      src/views/sellOut/goodsService/components/express_feedback.vue
  8. 40 13
      src/views/sellOut/goodsService/components/returnExpress.vue
  9. 49 28
      src/views/sellOut/goodsService/index.vue
  10. 108 0
      src/views/sellOut/goodsService/serviceDetail copy.vue
  11. 8 7
      src/views/sellOut/goodsService/serviceDetail.vue
  12. 717 0
      src/views/sellOut/salesOrder/addEdit.vue
  13. 2 1
      src/views/sellOut/salesOrder/components/order-out-table.vue
  14. 2 0
      src/views/sellOut/salesOrder/components/out-order-add-model.vue
  15. 61 8
      src/views/sellOut/salesOrder/detail.vue
  16. 383 0
      src/views/sellOut/sellReturnList/addEdit.vue
  17. 491 0
      src/views/sellOut/sellReturnList/index.vue
  18. 0 0
      src/views/sellOut/sellReturnList/销售退货单
  19. 0 0
      src/views/sellOut/销售管理
  20. 0 0
      src/views/serviceParam/expressSet/快递信息设置
  21. 21 1
      src/views/serviceParam/goodsAnomaly/index.vue
  22. 20 0
      src/views/serviceParam/goodsBack/index.vue
  23. 0 0
      src/views/serviceParam/goodsBack/售后退换货原因
  24. 20 0
      src/views/serviceParam/purchaseInReturn/index.vue
  25. 0 0
      src/views/serviceParam/purchaseInReturn/采购退货原因
  26. 20 0
      src/views/serviceParam/sellReturn/index.vue
  27. 20 0
      src/views/serviceParam/storeAnomaly/index.vue
  28. 0 0
      src/views/serviceParam/storeAnomaly/采购-入库验收异常

+ 3 - 3
src/apis/service/goodsService/index.js

@@ -3,13 +3,13 @@ import http from "@/apis/axios";
 const api = "admin/";
 export default {
   // 添加
-  add: (data, params) => http(api + "add", data, "post", params),
+  add: (data, params) => http(api + "aftercreate", 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 + "afterlist", data, "post", params),
   // 详情
-  detail: (data, params) => http(api + "detail", data, "post", params),
+  detail: (data, params) => http(api + "afterinfo", data, "post", params),
   // 更新
   update: (data, params) => http(api + "update", data, "post", params),
   // 修改状态

+ 21 - 0
src/apis/service/sellOut/sellReturnList/index.js

@@ -0,0 +1,21 @@
+// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 添加
+  add: (data, params) => http(api + "add", data, "post", params),
+  // 删除
+  delete: (data, params) => http(api + "delete", data, "post", params),
+  // 分页查询
+  list: (data, params) => http(api + "list", data, "post", params),
+  // 详情
+  detail: (data, params) => http(api + "detail", data, "post", params),
+  // 更新
+  update: (data, params) => http(api + "update", data, "post", params),
+  // 修改状态
+  status: (data, params) => http(api + "accountstatus", data, "post", params),
+  // 
+  getReason: (data, params) => http(api + "resultlist", data, "post", params),
+
+};
+   

+ 6 - 6
src/views/purchaseIn/purchaseOrder/columns.js

@@ -1,10 +1,10 @@
 export default [
-  {
-    type: "expand",
-    _slot_: "expand",
-    fixed: "left",
-    _noset_: true,
-  },
+  // {
+  //   type: "expand",
+  //   _slot_: "expand",
+  //   fixed: "left",
+  //   _noset_: true,
+  // },
   {
     prop: "cgdNo",
     label: "采购单编号",

+ 2 - 2
src/views/purchaseIn/purchaseOrder/index.vue

@@ -179,7 +179,7 @@
             "
           ></el-tag>
         </template>
-        <template #expand="{ scope }">
+        <!-- <template #expand="{ scope }">
           <el-table
             :size="size"
             :data="scope.row.child"
@@ -221,7 +221,7 @@
               </template>
             </el-table-column>
           </el-table>
-        </template>
+        </template> -->
         <template #operation="{ scope }">
           <el-tooltip
             v-if="powers.some((item) => item == '007')"

+ 77 - 23
src/views/sellOut/goodsService/columns.js

@@ -1,59 +1,113 @@
 export default [
     {
-          prop: "service_list",
+          prop: "returnCode",
           label: "售后申请单",
-          
+          width:"160"
         },
         {
-          prop: "confirm_numbers",
+          prop:"apply_name",
+          label:"申请人",
+        },
+        {
+          prop: "orderCode",
           label: "确认单编号",
+          width:"160"
         },
         {
-          prop: "out_stock_numbers",
+          prop: "outCode",
           label: "销售出库单编号",
+          width:"160"
+        },
+        {
+          prop: "total_num",
+          label: "出库总数",
         },
         {
-          prop: "goods_numbers",
-          label: "商品编号",
+          prop: "good_code",
+          label: "商品属性code",
+          width:"140"
         },
         {
-            prop:"goods_name",
+            prop:"good_name",
             label:"商品名称",
+            width:"150"
         },
         {
-            prop:"anomalous_numbers",
+            prop:"error_num",
             label:"异常数量",
         },
         {
-            prop:"anomalous_reason",
+            prop:"error_msg",
             label:"异常原因",
         },
         {
-            prop:"expect_wish",
-            label:"期望意愿",
-        },
-        {
-            prop:"faf",
-            label:"企业客户编码",
+          prop:"error_img",
+          label:"异常图片",
         },
         {
-            prop:"fa",
-            label:"企业客户名称",
+            prop:"except_code",
+            label:"期望意愿",
         },
-        
+    
         {
           prop: "status",
-          label: "处理状态",
+          label: "状态",
           _slot_: "status",
           width: "80px",
         },
+        // {
+        //     prop:"result",
+        //     label:"处理结果",
+        // },
         {
-            prop:"result",
-            label:"处理结果",
+            prop:"error_remark",
+            label:"备注"
         },
+        // {
+        //   prop:"good_name",
+        //   label:"商品名称",
+        // },
         {
-            prop:"remark",
-            label:"备注"
+          prop:"return_wsm",
+          label:"退回仓库编码",
+          width:"120"
+        },
+        {
+          prop:"contactor",
+          label:"联系人",
+        },
+        {
+          prop:"mobile",
+          label:"联系方式",
+        },
+        {
+          prop:"addr",
+          label:"退货地址",
+        },
+        {
+          prop:"post_company",
+          label:"快递名称",
+        },
+        {
+          prop:"post_fee",
+          label:"物流费",
+        },
+        {
+          prop:"post_own",
+          label:"费用承担方",
+          width:"100",
+          _slot_: "post_own",
+
+        },
+        {
+          prop:"customer_code",
+          label:"客户编码",
+          width:"150"
+        },
+        {
+          prop:"customer_name",
+          label:"客户名称",
+          width:"100"
         },
         {
           prop: "",

+ 25 - 6
src/views/sellOut/goodsService/components/addEditForm.vue

@@ -9,7 +9,8 @@
     style="width: 100%"
     class="demo-ruleForm"
   >
-    <!-- {{ ruleForm }} -->
+    {{ ruleForm }}
+
     <el-row>
       <!-- <el-col :span="24">
         <el-form-item label="出库单编号">
@@ -184,6 +185,7 @@ export default {
       resign_name: "", //离职人
       hand_name: "", //交接人
       ruleForm: {
+        outCode: "", //
         stock_out_numbers: "", //出库单编号
         anomalous_numbers: "", //异常数量
         anomalous_reason: "", //异常原因
@@ -235,15 +237,15 @@ export default {
       reason_value: "", //异常原因
       expect_options: [
         {
-          value: "value1",
+          value: "1",
           label: "退货",
         },
         {
-          value: "value2",
+          value: "2",
           label: "换货",
         },
         {
-          value: "value3",
+          value: "3",
           label: "接受差异改变售价",
         },
       ],
@@ -339,7 +341,7 @@ export default {
           await this.logout();
         } else {
           this.$message.warning(res.message);
-        };
+        }
       }
     },
 
@@ -352,11 +354,14 @@ export default {
         if (this.$refs.ruleForm) {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
+          console.log(this.sitem.orderCode);
+
           this.ruleForm = {
             anomalous_numbers: "", //异常数量
             anomalous_reason: "", //异常原因
             expect_wish: "", //期望意愿
             anomalous_images: [],
+            outCode: this.sitem.orderCode,
           };
         }
       });
@@ -369,7 +374,21 @@ export default {
             this.$message.warning("异常数量不能大于发货数量");
             return false;
           }
-          console.log("调接口");
+          let model = JSON.parse(JSON.stringify(this.ruleForm));
+
+          // console.log("调接口");
+          let _model = {
+            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({

+ 363 - 0
src/views/sellOut/goodsService/components/express_feedback.vue

@@ -0,0 +1,363 @@
+<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-col :span="12">
+        <el-form-item label="退回仓库" prop="return_store">
+          <el-select
+            style="width: 100%"
+            v-model="ruleForm.return_value"
+            placeholder="请选择退回仓库"
+            @change="handleStore"
+          >
+            <el-option
+              v-for="item in return_store_options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-col>
+    </el-row>
+    <el-row>
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="退回地址" prop="return_goods_addr">
+            <select-area
+              :placeholder="'请选择省/市/区'"
+              :value="ruleForm.return_goods_addr"
+              :is-detail="id !== 'add'"
+              @selectChange="selectAreaAddr_code"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="详细地址" prop="addr_detail">
+            <el-input
+              v-model="ruleForm.addr_detail"
+              placeholder="请输入退货详细地址"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="收件人" prop="addressee">
+            <el-input
+              v-model="ruleForm.addressee"
+              placeholder="请输入收件人"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="收件人电话" prop="addressee_phone">
+            <el-input
+              v-model="ruleForm.addressee_phone"
+              placeholder="请输入收件人电话"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+      <el-col :span="24" style="text-align: right">
+        <el-button type="primary" @click="submitForm" v-if="true"
+          >保 存</el-button
+        >
+        <!-- id === 'add' ||
+            (status === '0' && powers.some((item) => item == '005')) -->
+        <el-button
+          type="primary"
+          @click="statusConfirm('1', '发起审核流程')"
+          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 { isMobile } from "@/utils/validate.js";
+import asyncRequest from "@/apis/service/goodsService";
+import resToken from "@/mixins/resToken";
+import { isnumber } from "@/utils/validate.js";
+export default {
+  name: "purchase_check",
+  props: ["id", "showModelThis", "newTime"],
+  mixins: [resToken],
+  data() {
+    const validatemobile = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("手机号不能为空!"));
+      } else {
+        if (!isMobile(value)) {
+          callback(new Error("手机号格式不正确!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    return {
+      loading: false,
+      status: "", //存储详情接口返的状态
+      showModelThis: this.showModel,
+      resign_name: "", //离职人
+      hand_name: "", //交接人
+      ruleForm: {
+        return_store: "", //退回仓库
+        return_goods_addr: [], //退货地址
+        addr_detail: "", //退货详细地址
+        addressee: "", //收件人
+        addressee_phone: "", //收件人电话
+        express_require: "", //物流要求
+      },
+      rulesThis: this.rules,
+      // 验证规则
+      rules: {
+        return_store: [
+          {
+            required: true,
+            trigger: "change",
+            message: "请选择退回仓库",
+          },
+        ],
+        addressee: [
+          {
+            required: true,
+            message: "请输入收件人",
+            trigger: "blur",
+          },
+        ],
+        return_goods_addr: [
+          {
+            type: "array",
+            required: true,
+            message: "请选择退回地址所在省/市/区",
+            trigger: "change",
+          },
+        ],
+        addr_detail: [
+          {
+            required: true,
+            message: "请输入详细退货地址",
+            trigger: "blur",
+          },
+        ],
+        addressee: [
+          {
+            required: true,
+            message: "请输入收件人",
+            trigger: "blur",
+          },
+        ],
+        addressee_phone: [
+          {
+            required: true,
+            trigger: "blur",
+            validator: validatemobile,
+          },
+        ],
+        express_require: [
+          {
+            required: true,
+            trigger: "blur",
+            message: "请输入物流信息",
+          },
+        ],
+      },
+      return_store_options: [
+        {
+          value: "value1",
+          label: "供应商仓库",
+          return_goods_addr: ["110000", "110100", "110101"],
+          addr_detail: "三河道",
+          addressee: "张三",
+          addressee_phone: "13223223230",
+        },
+        {
+          value: "value2",
+          label: "自建仓/部门仓1",
+        },
+        {
+          value: "value3",
+          label: "自建仓/部门仓2",
+        },
+        {
+          value: "value4",
+          label: "自建仓/部门仓3",
+        },
+      ],
+      return_value: "", //退回仓库
+    };
+  },
+  computed: {
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "purchase_check"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+
+  created() {
+    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;
+        await this.resetForm();
+      } else {
+        this.rulesThis = this.rules;
+        await this.resetForm();
+        // await this.initData();
+      }
+      this.loading = false;
+    },
+
+    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();
+          this.ruleForm = {
+            return_store: "", //退回仓库
+            return_goods_addr: [], //退货地址
+            addr_detail: "", //退货详细地址
+            addressee: "", //收件人
+            addressee_phone: "", //收件人电话
+            express_require: "", //物流要求
+          };
+        }
+      });
+    },
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          this.loading = true;
+          const model = {
+            id: this.id,
+            resign_uid: rUid,
+            hand_uid: hUid,
+          };
+          let res = {};
+          if (this.id === "add") {
+            delete model["id"];
+            res = await asyncRequest.add(model);
+          } else {
+            res = await asyncRequest.update(model);
+          }
+
+          this.loading = false;
+          if (res && res.code === 0) {
+            const title = this.id === "add" ? "添加成功!" : "修改成功!";
+            this.$notify.success({
+              title,
+              message: "",
+            });
+
+            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;
+        }
+      });
+    },
+    handleStore(e) {
+      this.return_store_options.find((item) => {
+        if (item.value === e) {
+          this.ruleForm.return_goods_addr = item.return_goods_addr;
+          this.ruleForm.addr_detail = item.addr_detail;
+          this.ruleForm.addressee = item.addressee;
+          this.ruleForm.addressee_phone = item.addressee_phone;
+          this.$refs.ruleForm.validateField("addressee");
+          this.$refs.ruleForm.validateField("return_goods_addr");
+          this.$refs.ruleForm.validateField("addr_detail");
+          this.$refs.ruleForm.validateField("addressee_phone");
+        }
+      });
+      this.ruleForm.return_store = e;
+    },
+    //退货省市区
+    selectAreaAddr_code(e) {
+      console.log(e);
+      this.ruleForm.return_goods_addr = e;
+      console.log(this.ruleForm);
+      this.$refs.ruleForm.validateField("return_goods_addr");
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 40 - 13
src/views/sellOut/goodsService/components/returnExpress.vue

@@ -12,6 +12,22 @@
     {{ ruleForm }}
     <el-row>
       <el-col :span="12">
+        <el-form-item label="费用承担方" prop="express_bear">
+          <el-select
+            clearable
+            v-model="ruleForm.express_bear"
+            placeholder="请选择"
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="物流公司" prop="express_company">
           <search-express
             :value="ruleForm.express_company"
@@ -110,12 +126,23 @@ export default {
       }
     };
     return {
+      options: [
+        {
+          value: "选项1",
+          label: "个人承担",
+        },
+        {
+          value: "选项2",
+          label: "xxx公司",
+        },
+      ],
       loading: false,
       status: "", //存储详情接口返的状态
       showModelThis: this.showModel,
       resign_name: "", //离职人
       hand_name: "", //交接人
       ruleForm: {
+        express_bear: "", //物流费用承担方
         express_company: [], //物流公司
         express_numbres: "", //物流单号
         express_fee: "", //物流费用
@@ -125,6 +152,14 @@ export default {
       rulesThis: this.rules,
       // 验证规则
       rules: {
+        express_bear: [
+          {
+            // type: "array",
+            required: true,
+            trigger: "change",
+            message: "请选择物流费用承担方",
+          },
+        ],
         express_company: [
           {
             type: "array",
@@ -212,6 +247,7 @@ export default {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
           this.ruleForm = {
+            express_bear: "",
             express_company: [], //物流公司
             express_numbres: "", //物流单号
             express_fee: "", //物流费用
@@ -224,19 +260,10 @@ export default {
     async submitForm() {
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
-          const { resign_uid, hand_uid } = this.ruleForm;
-          let rUid = resign_uid.toString(),
-            hUid = hand_uid.toString();
-          if (rUid === hUid) {
-            this.$message.error("离职人和接收人不能相同");
-            return;
-          }
-          this.loading = true;
-          const model = {
-            id: this.id,
-            resign_uid: rUid,
-            hand_uid: hUid,
-          };
+          console.log(this.ruleForm);
+          let model = JSON.parse(JSON.stringify(this.ruleForm));
+          model.post_company = model.express_company.toString();
+          
           let res = {};
           if (this.id === "add") {
             delete model["id"];

+ 49 - 28
src/views/sellOut/goodsService/index.vue

@@ -151,6 +151,13 @@
                   placeholder="商品编号"
                 />
               </el-col>
+              <el-col :span="4" style="width: 120px; padding: 0 0 0 10px">
+                <el-input
+                  :size="searchSize"
+                  v-model="parmValue.apply_name"
+                  placeholder="申请人"
+                ></el-input>
+              </el-col>
               <el-col :span="4" style="width: 54px">
                 <el-button
                   :size="searchSize"
@@ -182,6 +189,16 @@
             "
           ></el-tag>
         </template>
+        <template #post_own="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.status == '0' ? 'warning' : ''"
+            v-text="
+              (statusOptions.find((item) => item.id == scope.row.status) || {})
+                .label || '--'
+            "
+          ></el-tag>
+        </template>
         <template #operation="{ scope }">
           <el-tooltip
             v-if="powers.some((item) => item == '002')"
@@ -253,6 +270,7 @@ export default {
   },
   data() {
     return {
+      post_ownOptions:[],
       sitem: null,
       // 状态
       statusOptions: [
@@ -271,6 +289,8 @@ export default {
       parmValue: {
         start_time: "",
         end_time: "",
+        returnCode: "", //售后单号
+        apply_name: "", //申请人名称
         sellNumbers: "", //销售单号
         sellGoStock: "", //销售出库单号,
         expressNumber: "", //物流编号
@@ -282,21 +302,7 @@ export default {
         page: 1, // 页码
         size: 15, // 每页显示条数
       },
-      tableData: [
-        {
-          service_list: "121",
-          confirm_numbers: "111",
-          out_stock_numbers: "222",
-          goods_numbers: "333",
-          goods_name: "iphone",
-          anomalous_numbers: "1123",
-          anomalous_reason: "异常原因",
-          remark: "备注",
-          expect_wish: "退回",
-          image:
-            "http://www.stock.com/storage/topic/20211110/微信图片_20210914181255_20211110195520.png",
-        },
-      ],
+      tableData: [],
       // 表格 - 数据
       // tableData: [],
       // 表格 - 参数
@@ -435,19 +441,34 @@ export default {
     },
     // 列表搜索
     async searchList() {
-      // this.loading = true;
-      // console.log(this.parmValue);
-      // 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;
-      // }
-      // this.loading = false;
+      this.loading = true;
+      console.log(this.parmValue);
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      let _model = {
+        page: 1,
+        size: 15,
+        returnCode: model.returnCode,
+        outCode: model.sellGoStock,
+        status: model.service_value, //售后申请单处理状态
+        orderCode: model.sellNumbers,
+        good_code: model.goodsNumber,
+        except_code: model.expect_value,
+        apply_name: model.apply_name,
+        start: model.start_time,
+        end: model.end_time,
+      };
+      console.log(_model);
+      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;
     },
 
     async statusConfirm(id, status) {

+ 108 - 0
src/views/sellOut/goodsService/serviceDetail copy.vue

@@ -0,0 +1,108 @@
+<template>
+  <div class="purchaseOrderDetail pagePadding">
+    <div
+      style="width: 100%"
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+    >
+      <div class="detail-page-title">
+        <span class="title">售后申请详情</span>
+        <add-edit-form :sitem="sitem"></add-edit-form>
+      </div>
+      powers:{{ powers }}status{{ status }}
+      <el-collapse v-model="activeNames">
+        <el-collapse-item
+          title="业务审核"
+          name="1"
+          v-if="powers.some((item) => item == '034')"
+        >
+          <exam-form
+            :statusList="statusList"
+            :newTime="newTime"
+            :disabled="false"
+            :isMust="false"
+            @searchChange="examForm"
+          />
+        </el-collapse-item>
+        <el-collapse-item
+          title="供应商反馈"
+          name="2"
+          v-if="powers.some((item) => item == '035')"
+        >
+          <supplier-feedback></supplier-feedback>
+        </el-collapse-item>
+        <el-collapse-item
+          title="采购审核"
+          name="3"
+          v-if="powers.some((item) => item == '036')"
+        >
+          <purchase-check></purchase-check>
+        </el-collapse-item>
+        <el-collapse-item
+          title="退货物流"
+          name="4"
+          v-if="powers.some((item) => item == '032')"
+        >
+          <return-express></return-express>
+        </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 addEditForm from "./components/addEditForm.vue";
+import SupplierFeedback from "./components/supplier_feedback.vue";
+import PurchaseCheck from "./components/purchase_check";
+import ReturnExpress from "./components/returnExpress";
+export default {
+  name: "serviceDetail",
+  mixins: [mixinPage, resToken],
+  components: {
+    addEditForm,
+    SupplierFeedback,
+    PurchaseCheck,
+    ReturnExpress,
+  },
+  computed: {
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "serviceDetail"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      activeNames: ["0", "1", "2", "3", "4"],
+      sitem: null,
+      statusList: [],
+      sitem: null,
+      newTime: "",
+      loading: false,
+    };
+  },
+  mounted() {
+    this.sitem = this.$route.query.id;
+  },
+  methods: {
+    getNewTime() {
+      this.newTime = new Date().valueOf();
+    },
+    examForm(e) {
+      console.log(e);
+    },
+  },
+};
+</script>
+   
+   

+ 8 - 7
src/views/sellOut/goodsService/serviceDetail.vue

@@ -8,7 +8,7 @@
         <span class="title">售后申请详情</span>
         <add-edit-form :sitem="sitem"></add-edit-form>
       </div>
-      powers:{{ powers }}status{{ status }}
+      powers:{{ powers }}status{{ status }}id:{{ sitem }}
       <el-collapse v-model="activeNames">
         <el-collapse-item
           title="业务审核"
@@ -24,19 +24,19 @@
           />
         </el-collapse-item>
         <el-collapse-item
-          title="供应商反馈"
+          title="物流反馈"
           name="2"
           v-if="powers.some((item) => item == '035')"
         >
-          <supplier-feedback></supplier-feedback>
+          <express-feedback></express-feedback>
         </el-collapse-item>
-        <el-collapse-item
+        <!-- <el-collapse-item
           title="采购审核"
           name="3"
           v-if="powers.some((item) => item == '036')"
         >
           <purchase-check></purchase-check>
-        </el-collapse-item>
+        </el-collapse-item> -->
         <el-collapse-item
           title="退货物流"
           name="4"
@@ -56,7 +56,8 @@ import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 // import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder/detail";
 import addEditForm from "./components/addEditForm.vue";
-import SupplierFeedback from "./components/supplier_feedback.vue";
+import ExpressFeedback from "./components/express_feedback.vue";
+
 import PurchaseCheck from "./components/purchase_check";
 import ReturnExpress from "./components/returnExpress";
 export default {
@@ -64,7 +65,7 @@ export default {
   mixins: [mixinPage, resToken],
   components: {
     addEditForm,
-    SupplierFeedback,
+    ExpressFeedback,
     PurchaseCheck,
     ReturnExpress,
   },

+ 717 - 0
src/views/sellOut/salesOrder/addEdit.vue

@@ -0,0 +1,717 @@
+<template>
+  <el-dialog
+    :title="title"
+    :center="true"
+    align="left"
+    top="5vh"
+    width="1040px"
+    @close="closeModel"
+    :close-on-click-modal="false"
+    :visible.sync="showModelThis"
+    v-loading="loading"
+    element-loading-text="拼命加载中"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0.8)"
+  >
+    id:{{ id }} isDetail:{{ isDetail }},
+    <!-- sitem:{{ sitem }}, -->
+    入参:{{ ruleForm }}
+    <el-card>
+      <el-row :gutter="10">
+        <el-col :span="24">
+          <el-form
+            :model="ruleForm"
+            status-icon
+            :rules="rulesThis"
+            ref="ruleForm"
+            label-width="110px"
+            class="demo-ruleForm"
+          >
+            <el-form-item
+              label="退货原因"
+              prop="returnReason"
+              v-if="id === 'add' || isDetail"
+            >
+              <el-select
+                style="width: 100%"
+                v-model="ruleForm.returnReason"
+                placeholder="退换货原因"
+              >
+                <el-option
+                  v-for="item in reason_options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+
+            <el-form-item label="退货备注" prop="return_remark">
+              <!-- <el-input v-model="ruleForm.tel" :disabled="isDetail"></el-input> -->
+              <el-input
+                type="textarea"
+                maxlength="250"
+                show-word-limit
+                placeholder="请填写备注"
+                v-model="ruleForm.return_remark"
+              />
+            </el-form-item>
+            <el-form-item label="仓库信息">
+              <el-table
+                :data="tableForm.product_go"
+                border
+                :size="'mini'"
+                row-key="key"
+              >
+                <el-table-column label="商品总数量" width="100">
+                  <template slot-scope="scope">
+                    <!-- :prop="'product_go.' + scope.$index + '.wsend_num'" -->
+                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
+                      <p>{{ scope.row.num }}</p>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+                <el-table-column label="已发货数量" width="100">
+                  <template slot-scope="scope">
+                    <!-- :prop="'product_go.' + scope.$index + '.send_num'" -->
+                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
+                      <p>
+                        {{ scope.row.send_num }}
+                      </p>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+                <el-table-column label="未发货数量" width="100">
+                  <template slot-scope="scope">
+                    <!-- :prop="'product_go.' + scope.$index + '.wsend_num'" -->
+                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
+                      <p>{{ scope.row.wsend_num }}</p>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+                <el-table-column label="退货数量">
+                  <template slot-scope="scope">
+                    <!-- :prop="'product_go.' + scope.$index + '.return_num'" -->
+                    <el-form-item
+                      :style="!scope.row.edit ? 'margin:0' : ''"
+                      :rules="{
+                        required: true,
+                        message: '退货数量不能为空',
+                        trigger: 'blur',
+                      }"
+                    >
+                      <el-input
+                        :disabled="!scope.row.edit"
+                        v-model="ruleForm.return_num"
+                      ></el-input>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+                <el-table-column label="采购编码" width="180">
+                  <template slot-scope="scope">
+                    <!-- :prop="'product_go.' + scope.$index + '.wsend_num'" -->
+                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
+                      <p>{{ scope.row.orderCode }}</p>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+                <el-table-column label="仓库名称" width="150">
+                  <template slot-scope="scope">
+                    <!-- :prop="'product_go.' + scope.$index + '.wsm_name'" -->
+                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
+                      <p>{{ scope.row.wsm_name }}</p>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+                <el-table-column label="仓库供应商" width="220">
+                  <template slot-scope="scope">
+                    <!-- :prop="'product_go.' + scope.$index + '.wsend_num'" -->
+                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
+                      <p>{{ scope.row.wsm_supplier }}</p>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+                <el-table-column label="仓库编码" width="200">
+                  <template slot-scope="scope">
+                    <!-- :prop="'product_go.' + scope.$index + '.wsend_num'" -->
+                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
+                      <p>{{ scope.row.wsm_code }}</p>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+
+                <!-- <el-table-column label="仓库供应商">
+                  <template slot-scope="scope">
+                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
+                      <p>{{ scope.row.wsm_supplierNo }}</p>
+                    </el-form-item>
+                  </template>
+                </el-table-column> -->
+
+                <el-table-column fixed="right" label="操作" width="80">
+                  <template slot-scope="scope">
+                    <el-tooltip
+                      effect="dark"
+                      content="编辑"
+                      v-if="!scope.row.edit"
+                      placement="top"
+                    >
+                      <i
+                        class="el-icon-edit tb-icon"
+                        @click="editRow(scope.$index, 'return')"
+                      ></i>
+                    </el-tooltip>
+
+                    <el-tooltip
+                      effect="dark"
+                      content="保存"
+                      v-if="scope.row.edit"
+                      placement="top"
+                    >
+                      <i
+                        class="el-icon-circle-check tb-icon"
+                        @click="checkRow(scope.$index, 'return')"
+                      ></i>
+                    </el-tooltip>
+
+                    <el-tooltip effect="dark" content="重置" placement="top">
+                      <i
+                        v-if="scope.row.edit"
+                        class="el-icon-refresh-left tb-icon"
+                        @click="resetRow(scope.$index)"
+                      ></i>
+                    </el-tooltip>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <!-- <el-col
+                :span="24"
+                style="text-align: right; padding: 30px 0 10px 0"
+              >
+                <el-button type="primary" :size="'mini'" @click="submitForm"
+                  >保 存
+                </el-button>
+              </el-col> -->
+            </el-form-item>
+            <el-form-item label="收货信息">
+              <el-table
+                :data="tableForm.get_product_go"
+                border
+                :size="'mini'"
+                row-key="key"
+              >
+                <el-table-column label="已收货数量">
+                  <template slot-scope="scope">
+                    <!-- :prop="'product_go.' + scope.$index + '.send_num'" -->
+                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
+                      <p>
+                        {{ scope.row.receipt_quantity }}
+                      </p>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+                <el-table-column label="已发货数量">
+                  <template slot-scope="scope">
+                    <!-- :prop="'product_go.' + scope.$index + '.send_num'" -->
+                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
+                      <p>
+                        {{ scope.row.send_num }}
+                      </p>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+                <el-table-column label="未发货数量">
+                  <template slot-scope="scope">
+                    <!-- :prop="'product_go.' + scope.$index + '.wsend_num'" -->
+                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
+                      <p>{{ scope.row.wsend_num }}</p>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+                <el-table-column label="退货数量">
+                  <template slot-scope="scope">
+                    <!-- :prop="'product_go.' + scope.$index + '.return_num'" -->
+                    <el-form-item
+                      :style="!scope.row.edit ? 'margin:0' : ''"
+                      :rules="{
+                        required: true,
+                        message: '退货数量不能为空',
+                        trigger: 'blur',
+                      }"
+                    >
+                      <el-input
+                        :disabled="!scope.row.edit"
+                        v-model="ruleForm.get_return_num"
+                      ></el-input>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+                <el-table-column label="采购编码" width="200">
+                  <template slot-scope="scope">
+                    <!-- :prop="'product_go.' + scope.$index + '.send_num'" -->
+                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
+                      <p>
+                        {{ scope.row.orderCode }}
+                      </p>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+                <!-- <el-table-column label="仓库供应商">
+                  <template slot-scope="scope">
+                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
+                      <p>{{ scope.row.wsm_supplierNo }}</p>
+                    </el-form-item>
+                  </template>
+                </el-table-column> -->
+                <el-table-column label="收货联系人 ">
+                  <template slot-scope="scope">
+                    <!-- :prop="'product_go.' + scope.$index + '.wsm_name'" -->
+                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
+                      <p>{{ scope.row.contactor }}</p>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+                <el-table-column label="联系方式" width="120">
+                  <template slot-scope="scope">
+                    <!-- :prop="'product_go.' + scope.$index + '.wsm_name'" -->
+                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
+                      <p>{{ scope.row.mobile }}</p>
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+
+                <el-table-column fixed="right" label="操作" width="80">
+                  <template slot-scope="scope">
+                    <el-tooltip
+                      effect="dark"
+                      content="编辑"
+                      v-if="!scope.row.edit"
+                      placement="top"
+                    >
+                      <i
+                        class="el-icon-edit tb-icon"
+                        @click="editRow(scope.$index, 'get')"
+                      ></i>
+                    </el-tooltip>
+
+                    <el-tooltip
+                      effect="dark"
+                      content="保存"
+                      v-if="scope.row.edit"
+                      placement="top"
+                    >
+                      <i
+                        class="el-icon-circle-check tb-icon"
+                        @click="checkRow(scope.$index, 'get')"
+                      ></i>
+                    </el-tooltip>
+
+                    <el-tooltip effect="dark" content="重置" placement="top">
+                      <i
+                        v-if="scope.row.edit"
+                        class="el-icon-refresh-left tb-icon"
+                        @click="resetRow(scope.$index)"
+                      ></i>
+                    </el-tooltip>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <!-- <el-col
+                :span="24"
+                style="text-align: right; padding: 30px 0 10px 0"
+              >
+                <el-button type="primary" :size="'mini'" @click="submitForm"
+                  >保 存
+                </el-button>
+              </el-col> -->
+            </el-form-item>
+          </el-form>
+        </el-col>
+        <el-col :span="24" style="text-align: right">
+          <el-button type="primary" @click="submitForm" v-if="!isDetail"
+            >保 存
+          </el-button>
+          <el-button @click="showModelThis = false">{{
+            isDetail ? "关 闭" : "取 消"
+          }}</el-button>
+        </el-col>
+      </el-row>
+    </el-card>
+  </el-dialog>
+</template>
+   <script>
+import asyncRequest from "@/apis/service/sellOut/sellReturnList";
+import resToken from "@/mixins/resToken";
+import {
+  isnumber,
+  isMobile,
+  validEmail,
+  isAlphanumeric,
+  isChinese,
+  isEmoticon,
+  validAlphabets,
+} from "@/utils/validate";
+export default {
+  name: "sellReturnList",
+  props: ["showModel", "id", "isDetail", "sitem"],
+  mixins: [resToken],
+  data() {
+    const validateusername = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("账号不能为空!"));
+      } else {
+        if (value.length < 6 || value.length > 18) {
+          callback(new Error("账号规则为6~18位数字与字母组合!"));
+        } else {
+          if (isnumber(value)) {
+            callback(new Error("账号规则为6~18位数字与字母组合!"));
+          } else if (validAlphabets(value)) {
+            callback(new Error("账号规则为6~18位数字与字母组合!"));
+          } else if (!isAlphanumeric(value)) {
+            callback(new Error("账号规则为6~18位数字与字母组合!"));
+          } else {
+            callback();
+          }
+        }
+      }
+    };
+    const validatename = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("真实姓名不能为空!"));
+      } else {
+        if (value.length < 2 || value.length > 12) {
+          callback(new Error("真实姓名规则为2~12位汉字!"));
+        } else {
+          if (!isChinese(value)) {
+            console.log(9999);
+            callback(new Error("真实姓名规则为2~12位汉字!"));
+          } else if (isEmoticon(value)) {
+            console.log(2345);
+            callback(new Error("真实姓名规则为2~12位汉字!"));
+          } else {
+            callback();
+          }
+        }
+      }
+    };
+    const validatemobile = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("手机号不能为空!"));
+      } else {
+        if (!isMobile(value)) {
+          callback(new Error("手机号格式不正确!"));
+        } else {
+          callback();
+        }
+      }
+    };
+
+    const validateEmail = (rule, value, callback) => {
+      if (value === "") {
+        callback();
+      } else {
+        if (!validEmail(value)) {
+          callback(new Error("邮箱格式不正确!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    return {
+      noSendNumbers: "", //收货-未发货数量
+      noSendNum: "", //销售-未发货数量
+      reason_options: [], //退换货原因备选项
+      loading: false,
+      title: "添加销售退货单",
+      showModelThis: this.showModel,
+      ruleForm: {
+        get_return_num: "",
+        outCode: "", //出库单编号
+        return_remark: "", //退货备注
+        return_num: "", //退货数量
+        returnReason: [], //退货原因
+        // email: "",
+        // role_id: "",
+        // status: "1",
+        // item: [],
+      },
+      rulesThis: this.rules,
+      rules: {
+        returnReason: [
+          {
+            required: true,
+            message: "请选择退货原因",
+            // type: "array",
+            trigger: "change",
+          },
+        ],
+        return_num: [
+          {
+            required: true,
+            validator: validatemobile,
+            trigger: "blur",
+          },
+        ],
+        return_remark: [
+          {
+            required: true,
+            message: "请输入退货备注",
+            trigger: "blur",
+          },
+        ],
+      },
+      tableForm: {
+        product_go: [],
+        get_product_go: [],
+      },
+    };
+  },
+  watch: {
+    showModel: function (val) {
+      this.showModelThis = val;
+      if (val) {
+        this.initForm();
+      }
+    },
+    showModelThis(val) {
+      if (!val) {
+        this.$emit("cancel");
+      }
+    },
+  },
+
+  methods: {
+    closeModel() {
+      console.log("closeModel!!");
+    },
+    // 获取退换货原因
+    async getReason() {
+      this.loading = true;
+      let model = {
+        page: 1,
+        size: 15,
+        type: "5",
+      };
+      const res = await asyncRequest.getReason(model);
+      if (res && res.code === 0 && res.data) {
+        // this.tableData = res.data.list;
+        // console.log(this.tableData);
+        // this.pageInfo.total = Number(res.data.count);
+        // this.reason_options =
+        res.data.list.forEach((element) => {
+          let obj = {
+            value: element.result_code,
+            label: element.result,
+            id: element.id,
+          };
+          this.reason_options.push(obj);
+        });
+        console.log(this.reason_options);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+    async initForm() {
+      this.loading = true;
+      // await this.getRole();
+      if (this.id === "add") {
+        this.title = "添加销售退货单";
+        this.rulesThis = this.rules;
+        await this.resetForm();
+      } else {
+        if (this.isDetail) {
+          this.title = "添加销售退货单详情";
+          this.rulesThis = {};
+        } else {
+          this.title = "修改添加销售退货单";
+          this.rulesThis = this.rules;
+        }
+        await this.resetForm(this.sitem);
+        // await this.initData()
+      }
+      this.getReason(); //获取退还货原因
+
+      this.loading = false;
+    },
+    async initData() {
+      // const res = await asyncRequest.detail({ id: this.id });
+      // if (res && res.code === 0 && res.data) {
+      //   this.ruleForm = res.data;
+      //   this.ruleForm.role_id = this.ruleForm.role;
+      // } else if (res && res.code >= 100 && res.code <= 104) {
+      //   await this.logout();
+      // } else {
+      //   this.$message.warning(res.message);
+      // }
+    },
+    async resetForm(sitem) {
+      // 重置
+      await this.$nextTick(() => {
+        if (this.$refs.ruleForm) {
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+          this.outCode = this.sitem.orderCode;
+          console.log(this.outCode);
+          const { info, addrs } = this.sitem;
+          info.forEach((ele) => {
+            this.noSendNum += ele.wsend_num;
+          });
+          let list = JSON.parse(JSON.stringify(info)); //
+          list.map((v) => {
+            v.edit = false;
+            return v;
+          });
+          this.tableForm.product_go = [].concat(...list);
+
+          console.log(list);
+          addrs.forEach((ele) => {
+            this.noSendNumbers += ele.wsend_num;
+          });
+          let l_list = JSON.parse(JSON.stringify(addrs));
+          l_list.map((ele) => {
+            ele.edit = false;
+            return ele;
+          });
+          this.tableForm.get_product_go = [].concat(...l_list);
+          console.log(l_list);
+          this.ruleForm = {
+            return_remark: "", //退货备注
+            return_num: "", //退货数量
+            returnReason: [], //退货原因
+            // email: "",
+            // role_id: "",
+            // status: "1",
+            // item: [],
+          };
+        }
+      });
+    },
+
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          this.loading = true;
+          console.log(this.ruleForm);
+          const model = JSON.parse(JSON.stringify(this.ruleForm));
+          console.log(model);
+          model.errorCode = model.returnReason.toString();
+          model.num = model.return_num;
+          model.remark = model.return_remark;
+          model.outCode = this.outCode;
+          console.log(model);
+          if (model.return_num > this.noSendNum) {
+            this.$message.warning("退货数量不能大于未发货数量");
+            return;
+          }
+          let res = {};
+          if (this.id === "add") {
+            delete model["id"];
+            res = await asyncRequest.add(model);
+          } else {
+            res = await asyncRequest.update(model);
+          }
+          this.loading = false;
+          if (res && res.code === 0) {
+            const title = this.id === "add" ? "添加成功" : "修改成功";
+            this.$notify.success({
+              title,
+              message: "",
+            });
+            this.showModelThis = false;
+            // 刷新
+            this.$emit("refresh");
+          } 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;
+        }
+      });
+    },
+    //异常原因筛选
+    //保存某一行
+    checkRow(rowIndex, name) {
+      if (name == "return") {
+        const model = JSON.parse(JSON.stringify(this.ruleForm));
+        console.log(model);
+        console.log(this.noSendNum);
+        if (model.return_num > this.noSendNum) {
+          this.$message.warning("退货数量不能大于未发货数量");
+          return;
+        }
+        const { check_value, check_remark } =
+          this.tableForm.product_go[rowIndex];
+        if (check_value != "" && check_remark != "") {
+          this.tableForm.product_go[rowIndex].edit = false;
+        } else {
+          this.$message.warning("审核情况或审核备注不能为空");
+        }
+      } else if (name == "get") {
+        const model = JSON.parse(JSON.stringify(this.ruleForm));
+        console.log(model);
+        console.log(this.noSendNum);
+        if (model.return_num > this.noSendNum) {
+          this.$message.warning("退货数量不能大于未发货数量");
+          return;
+        }
+        const { check_value, check_remark } =
+          this.tableForm.get_product_go[rowIndex];
+        if (check_value != "" && check_remark != "") {
+          this.tableForm.get_product_go[rowIndex].edit = false;
+        } else {
+          this.$message.warning("审核情况或审核备注不能为空");
+        }
+      }
+    },
+    //编辑某一行
+    editRow(rowIndex, name) {
+      // console.log(this.tableForm.product_go[rowIndex].edit);
+      // console.log(rowIndex);
+      // console.log(this.tableForm.product_go);
+      if (name == "return") {
+        let index = this.tableForm.product_go.findIndex((v) => {
+          v.edit;
+        });
+        console.log(index);
+        if (index !== -1) {
+          this.$message.warning("请完成其他行的编辑!");
+          return;
+        } else {
+          this.tableForm.product_go[rowIndex].edit = true;
+        }
+        console.log(this.tableForm.product_go[rowIndex].edit);
+      } else if (name == "get") {
+        let index = this.tableForm.product_go.findIndex((v) => {
+          v.edit;
+        });
+        console.log(index);
+        if (index !== -1) {
+          this.$message.warning("请完成其他行的编辑!");
+          return;
+        } else {
+          this.tableForm.get_product_go[rowIndex].edit = true;
+        }
+        console.log(this.tableForm.get_product_go[rowIndex].edit);
+      }
+    },
+    resetRow(rowIndex) {
+      this.tableForm.product_go[rowIndex].check_remark = "";
+      this.tableForm.product_go[rowIndex].check_value = "agree";
+    },
+  },
+};
+</script>
+
+   <style lang="scss" scoped>
+.sellReturnList {
+}
+</style>
+   

+ 2 - 1
src/views/sellOut/salesOrder/components/order-out-table.vue

@@ -172,6 +172,7 @@
       :showModel="modelShowModel"
       :id="modelId"
       :sitem="modelItem"
+      @refresh="searchList"
     />
     <add-edit
       :id="modelId"
@@ -240,6 +241,7 @@ export default {
     };
   },
   mounted() {
+    console.log(this.sitem.bum);
     this.initForm();
   },
   methods: {
@@ -360,6 +362,5 @@ export default {
 };
 </script>
    <style lang="scss" scoped>
-
 </style>
    

+ 2 - 0
src/views/sellOut/salesOrder/components/out-order-add-model.vue

@@ -313,6 +313,8 @@ export default {
             return;
           }
           this.loading = true;
+          console.log(item);
+          item.post_name = item.post_name.toString();
           const res = await asyncRequest.saleout(item);
           this.loading = false;
           if (res && res.code === 0) {

+ 61 - 8
src/views/sellOut/salesOrder/detail.vue

@@ -4,9 +4,28 @@
       style="width: 100%"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
-      <div class="tl" style="padding: 10px 0">
+      <div class="tl" style="padding: 10px 0 50px 0">
         <!-- <span> {{ status }}----{{ powers }}</span> -->
 
+        <el-button
+          style="margin: 0 0 0 10px"
+          class="fr"
+          type="primary"
+          plain
+          :size="'mini'"
+          @click="openModal('add', false, 'sell')"
+          >新建销售退货单
+        </el-button>
+
+        <el-button
+          class="fr"
+          type="primary"
+          plain
+          :size="'mini'"
+          @click="openModal('add', false, 'service')"
+          >新建售后申请单
+        </el-button>
+
         <el-button
           type="primary"
           plain
@@ -44,12 +63,12 @@
           >作废该条信息</el-button
         >
       </div>
-  <status-bar
-            v-if="newTime !== ''"
-            :newTime="newTime"
-            :options="statusOptions"
-            :status="status"
-          />
+      <status-bar
+        v-if="newTime !== ''"
+        :newTime="newTime"
+        :options="statusOptions"
+        :status="status"
+      />
       <el-collapse v-model="activeNames">
         <!-- <el-collapse-item title="审批节点" name="-1">
         
@@ -90,6 +109,22 @@
           />
         </el-collapse-item>
       </el-collapse>
+      <add-edit
+        :id="modelId"
+        :sitem="s_sitem"
+        :show-model="showModel"
+        :is-detail="isDetail"
+        @refresh="searchList"
+        @cancel="showModel = false"
+      />
+      <edit-add
+        :id="modelId"
+        :sitem="sitem"
+        :show-model="showModell"
+        :is-detail="isDetail"
+        @refresh="searchList"
+        @cancel="showModel = false"
+      />
     </div>
     <div v-else>
       <no-auth></no-auth>
@@ -103,14 +138,17 @@ import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
 import addForm from "./components/addForm";
 import feedbackForm from "./components/feedback-form";
 import orderOutTable from "./components/order-out-table";
-
+import addEdit from "./addEdit.vue";
+import editAdd from "@/views/sellOut/goodsService/components/addEdit.vue";
 export default {
   name: "salesOrderDetail",
   mixins: [mixinPage, resToken],
   components: {
+    addEdit,
     addForm,
     feedbackForm,
     orderOutTable,
+    editAdd,
   },
   computed: {
     powers() {
@@ -141,6 +179,7 @@ export default {
         { value: "5", label: "已发货" },
       ],
       sitem: null,
+      s_sitem: null,
       orderCode: "",
       status: "",
       newTime: "",
@@ -234,6 +273,20 @@ export default {
       }
       this.loading = false;
     },
+    openModal(id, isDetail, sitem) {
+      if (sitem == "sell") {
+        this.showModel = true;
+      } else {
+        this.showModell = true;
+      }
+      console.log(id, isDetail, sitem);
+
+      this.modelId = id;
+      this.isDetail = isDetail;
+      // this.sitem = sitem;
+      // this.sitem.info[0].edit = false;
+      this.s_sitem = this.sitem;
+    },
   },
 };
 </script>

+ 383 - 0
src/views/sellOut/sellReturnList/addEdit.vue

@@ -0,0 +1,383 @@
+<template>
+  <el-dialog
+    :title="title"
+    :center="true"
+    align="left"
+    top="5vh"
+    width="1040px"
+    @close="closeModel"
+    :close-on-click-modal="false"
+    :visible.sync="showModelThis"
+    v-loading="loading"
+    element-loading-text="拼命加载中"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0.8)"
+  >
+    id:{{ id }}isDetail:{{ isDetail }},sitem:{{ sitem }},入参:{{ ruleForm }}
+    <el-card>
+      <el-row :gutter="10">
+        <el-col :span="24">
+          <el-form
+            :model="ruleForm"
+            status-icon
+            :rules="rulesThis"
+            ref="ruleForm"
+            label-width="110px"
+            class="demo-ruleForm"
+          >
+            <el-form-item
+              label="退货原因"
+              prop="returnReason"
+              v-if="id === 'add' || isDetail"
+            >
+              <el-select
+                style="width: 100%"
+                v-model="ruleForm.returnReason"
+                placeholder="退换货原因"
+                @change="handleSelect"
+              >
+                <el-option
+                  v-for="item in reason_options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+
+            <el-form-item label="退货备注" prop="return_remark">
+              <!-- <el-input v-model="ruleForm.tel" :disabled="isDetail"></el-input> -->
+              <el-input
+                type="textarea"
+                maxlength="250"
+                show-word-limit
+                placeholder="请填写备注"
+                v-model="ruleForm.return_remark"
+              />
+            </el-form-item>
+            <el-form-item label="密码" prop="password" v-if="id === 'add'">
+              <el-input
+                type="password"
+                placeholder="密码"
+                :maxlength="20"
+                v-model="ruleForm.password"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="确认密码" prop="password2" v-if="id === 'add'">
+              <el-input
+                type="password"
+                placeholder="再次输入密码"
+                :maxlength="20"
+                v-model="ruleForm.password2"
+              ></el-input>
+            </el-form-item>
+          </el-form>
+        </el-col>
+        <el-col :span="24" style="text-align: right">
+          <el-button type="primary" @click="submitForm" v-if="!isDetail"
+            >保 存
+          </el-button>
+          <el-button @click="showModelThis = false">{{
+            isDetail ? "关 闭" : "取 消"
+          }}</el-button>
+        </el-col>
+      </el-row>
+    </el-card>
+  </el-dialog>
+</template>
+   <script>
+import asyncRequest from "@/apis/service/sellOut/sellReturnList";
+import resToken from "@/mixins/resToken";
+import {
+  isnumber,
+  isMobile,
+  validEmail,
+  isAlphanumeric,
+  isChinese,
+  isEmoticon,
+  validAlphabets,
+} from "@/utils/validate";
+export default {
+  name: "sellReturnList",
+  props: ["showModel", "id", "isDetail", "sitem"],
+  mixins: [resToken],
+  data() {
+    const validateusername = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("账号不能为空!"));
+      } else {
+        if (value.length < 6 || value.length > 18) {
+          callback(new Error("账号规则为6~18位数字与字母组合!"));
+        } else {
+          if (isnumber(value)) {
+            callback(new Error("账号规则为6~18位数字与字母组合!"));
+          } else if (validAlphabets(value)) {
+            callback(new Error("账号规则为6~18位数字与字母组合!"));
+          } else if (!isAlphanumeric(value)) {
+            callback(new Error("账号规则为6~18位数字与字母组合!"));
+          } else {
+            callback();
+          }
+        }
+      }
+    };
+    const validatename = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("真实姓名不能为空!"));
+      } else {
+        if (value.length < 2 || value.length > 12) {
+          callback(new Error("真实姓名规则为2~12位汉字!"));
+        } else {
+          if (!isChinese(value)) {
+            console.log(9999);
+            callback(new Error("真实姓名规则为2~12位汉字!"));
+          } else if (isEmoticon(value)) {
+            console.log(2345);
+            callback(new Error("真实姓名规则为2~12位汉字!"));
+          } else {
+            callback();
+          }
+        }
+      }
+    };
+    const validatemobile = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("手机号不能为空!"));
+      } else {
+        if (!isMobile(value)) {
+          callback(new Error("手机号格式不正确!"));
+        } else {
+          callback();
+        }
+      }
+    };
+
+    const validateEmail = (rule, value, callback) => {
+      if (value === "") {
+        callback();
+      } else {
+        if (!validEmail(value)) {
+          callback(new Error("邮箱格式不正确!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    return {
+      reason_options: [], //退换货原因备选项
+      loading: false,
+      title: "添加账号",
+      showModelThis: this.showModel,
+      ruleForm: {
+        return_remark: "", //退货备注
+        return_num: "", //退货数量
+        returnReason: [], //退货原因
+        email: "",
+        role_id: "",
+        status: "1",
+        item: [],
+      },
+      rulesThis: this.rules,
+      rules: {
+        returnReason: [
+          {
+            required: true,
+            message: "请选择退货原因",
+            type: "array",
+            trigger: "change",
+          },
+        ],
+        return_num: [
+          {
+            required: true,
+            validator: validatemobile,
+            trigger: "blur",
+          },
+        ],
+        return_remark: [
+          {
+            required: true,
+            message: "请输入退货备注",
+            trigger: "blur",
+          },
+        ],
+      },
+    };
+  },
+  watch: {
+    showModel: function (val) {
+      this.showModelThis = val;
+      if (val) {
+        this.initForm();
+      }
+    },
+    showModelThis(val) {
+      if (!val) {
+        this.$emit("cancel");
+      }
+    },
+  },
+
+  methods: {
+    closeModel() {
+      console.log("closeModel!!");
+    },
+    // 获取退换货原因
+    async getReason() {
+      this.loading = true;
+      let model = {
+        page: 1,
+        size: 15,
+        type: "5",
+      };
+      const res = await asyncRequest.getReason(model);
+      if (res && res.code === 0 && res.data) {
+        // this.tableData = res.data.list;
+        // console.log(this.tableData);
+        // this.pageInfo.total = Number(res.data.count);
+        // this.reason_options =
+        res.data.list.forEach((element) => {
+          let obj = {
+            value: element.result_code,
+            label: element.result,
+            id: element.id,
+          };
+          this.reason_options.push(obj);
+        });
+        console.log(this.reason_options);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+    async initForm() {
+      this.loading = true;
+      // await this.getRole();
+      if (this.id === "add") {
+        this.title = "添加账号";
+        this.rulesThis = this.rules;
+        await this.resetForm();
+      } else {
+        if (this.isDetail) {
+          this.title = "账号详情";
+          this.rulesThis = {};
+        } else {
+          this.title = "修改账号";
+          this.rulesThis = this.rules;
+        }
+        await this.resetForm(this.sitem);
+        // await this.initData()
+      }
+      this.getReason(); //获取退还货原因
+
+      this.loading = false;
+    },
+    // async getRole() {
+    //   const model = {
+    //     status: "", // 状态
+    //     level: "", // 姓名
+    //     role_name: "",
+    //   };
+    //   const res = await asyncRequest.getRole(model);
+    //   if (res && res.code === 0 && res.data) {
+    //     this.roleList = res.data;
+    //     this.roleList.map((v1) => {
+    //       v1.id += "";
+    //       v1.status += "";
+    //       return v1;
+    //     });
+    //   }
+    // },
+    async initData() {
+      const res = await asyncRequest.detail({ id: this.id });
+      if (res && res.code === 0 && res.data) {
+        this.ruleForm = res.data;
+        this.ruleForm.role_id = this.ruleForm.role;
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+    async resetForm(sitem) {
+      // 重置
+      await this.$nextTick(() => {
+        if (this.$refs.ruleForm) {
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+          const { username, nickname, mobile, email, roleid, status, item } =
+            sitem;
+          this.ruleForm = {
+            returnReason: [],
+            username: username || "", // 账号
+            name: nickname || "", // 真实姓名
+            mobile: mobile || "",
+            email: email || "",
+            role_id: roleid || "",
+            status: status || "",
+            item: item || [],
+          };
+          if (this.id === "add" || this.isDetail) {
+            this.rules.username[0].required = false;
+          }
+        }
+      });
+    },
+
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          this.loading = true;
+          const { username, name, mobile, email, role_id, status } = JSON.parse(
+            JSON.stringify(this.ruleForm)
+          );
+          const model = {
+            id: this.id,
+            username: username || "", // 账号
+            nickname: name || "", // 真实姓名
+            mobile: mobile || "",
+            email: email || "",
+            role: role_id || "",
+            status: status || "",
+          };
+          let res = {};
+          if (this.id === "add") {
+            delete model["id"];
+            res = await asyncRequest.add(model);
+          } else {
+            res = await asyncRequest.update(model);
+          }
+          this.loading = false;
+          if (res && res.code === 0) {
+            const title = this.id === "add" ? "添加成功" : "修改成功";
+            this.$notify.success({
+              title,
+              message: "",
+            });
+            this.showModelThis = false;
+            // 刷新
+            this.$emit("refresh");
+          } 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;
+        }
+      });
+    },
+  },
+};
+</script>
+
+   <style lang="scss" scoped>
+.sellReturnList {
+}
+</style>
+   

+ 491 - 0
src/views/sellOut/sellReturnList/index.vue

@@ -0,0 +1,491 @@
+<template>
+  <div class="sellReturnList pagePadding">
+    <div
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+    >
+      <!-- loading -->
+      powers:{{ powers }}
+      <ex-table
+        v-loading="false"
+        :table="table"
+        :data="tableData"
+        :columns="columns"
+        :page="pageInfo"
+        :size="size"
+        @page-curr-change="handlePageChange"
+        @page-size-change="handleSizeChange"
+        @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+        @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+      >
+        <template #table-header="{}">
+          <div style="width: 100%">
+            <el-row style="padding: 0 0 0 80px">
+              <el-col :span="24">
+                <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
+                  <el-input
+                    :size="searchSize"
+                    v-model="parmValue.purchaseNum"
+                    :maxlength="40"
+                    placeholder="采购单编号"
+                  />
+                </el-col>
+                <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
+                  <el-input
+                    :size="searchSize"
+                    v-model="parmValue.returnNum"
+                    :maxlength="40"
+                    placeholder="退货编号"
+                  />
+                </el-col>
+                <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
+                  <el-input
+                    :size="searchSize"
+                    v-model="parmValue.returnStock"
+                    :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="退货公司编号"
+                  />
+                </el-col>
+
+                <el-col
+                  :span="3"
+                  style="width: 66px; float: right"
+                  v-if="powers.some((item) => item == '003')"
+                >
+                  <el-button
+                    @click="openModal('add', false, {})"
+                    :size="searchSize"
+                    type="success"
+                    style="float: right; margin-left: 5px"
+                  >
+                    添加
+                  </el-button>
+                </el-col>
+
+                <el-col :span="3" style="width: 66px; float: right">
+                  <el-button
+                    :size="searchSize"
+                    type="primary"
+                    style="float: right; margin-left: 5px"
+                    @click="searchList"
+                  >
+                    刷新
+                  </el-button>
+                </el-col>
+              </el-col>
+            </el-row>
+            <el-row style="padding: 10px 0 0 0">
+              <el-col :span="4" style="width: 160px; padding: 0px 0 0 0px">
+                <el-input
+                  :size="searchSize"
+                  v-model="parmValue.returner"
+                  :maxlength="40"
+                  placeholder="申请人"
+                />
+              </el-col>
+              <el-col :span="6" style="width: 303px; padding: 0 0 0 10px">
+                <period-date-picker
+                  :type="1"
+                  :width="'135px'"
+                  :size="searchSize"
+                  :start="parmValue.start"
+                  :end="parmValue.end"
+                  @timeReturned="handleTime"
+                />
+              </el-col>
+              <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
+                <el-select
+                  :size="searchSize"
+                  v-model="parmValue.status"
+                  filterable
+                  clearable
+                  placeholder="退货节点"
+                  style="width: 100%"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-option
+                    v-for="item in statusList"
+                    :key="'status' + item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </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>
+          </div>
+        </template>
+        <template #status="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.status == '0' ? 'warning' : ''"
+            v-text="
+              (statusOptions.find((item) => item.id == scope.row.status) || {})
+                .label || '--'
+            "
+          ></el-tag>
+        </template>
+        <template #operation="{ scope }">
+          <el-tooltip
+            v-if="powers.some((item) => item == '002')"
+            effect="dark"
+            content="重置密码"
+            placement="top"
+          >
+            <i
+              class="el-icon-refresh-left tb-icon"
+              @click="openPasswordModal(scope.row.id, false)"
+            ></i>
+          </el-tooltip>
+
+          <el-tooltip
+            v-if="powers.some((item) => item == '007')"
+            effect="dark"
+            content="详情"
+            placement="top"
+          >
+            <i
+              class="el-icon-view tb-icon"
+              @click="openModal(scope.row.id, true, scope.row)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="powers.some((item) => item == '005')"
+            effect="dark"
+            content="修改"
+            placement="top"
+          >
+            <i
+              class="el-icon-edit tb-icon"
+              @click="openModal(scope.row.id, false, scope.row)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="
+              powers.some((item) => item == '004') && scope.row.status === '1'
+            "
+            effect="dark"
+            content="禁用"
+            placement="top"
+          >
+            <i
+              class="el-icon-video-pause tb-icon"
+              @click="statusConfirm(scope.row.id, scope.row.status)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="
+              powers.some((item) => item == '004') && scope.row.status === '0'
+            "
+            effect="dark"
+            content="启用"
+            placement="top"
+          >
+            <i
+              class="el-icon-video-play tb-icon"
+              @click="statusConfirm(scope.row.id, scope.row.status)"
+            ></i>
+          </el-tooltip>
+        </template>
+      </ex-table>
+      <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 statusList from "@/assets/js/statusList";
+import asyncRequest from "@/apis/service/sellOut/sellReturnList";
+import addEdit from "./addEdit";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "sellReturnList",
+  mixins: [mixinPage, resToken],
+  components: {
+    addEdit,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "sellReturnList"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      statusList: [
+        { value: "0", label: "节点1" },
+        { value: "1", label: "节点2" },
+      ],
+      sitem: null,
+      // 状态
+      statusOptions: [
+        { id: "0", label: "禁用" },
+        { id: "1", label: "启用" },
+      ],
+      // statusList: statusList,
+      loading: true,
+      showModel: false,
+      isDetail: false,
+      modelId: 0,
+      parmValue: {
+        purchaseNum: "", //采购单编号
+        returnNum: "", //退货编号
+        returnStock: "", //退货仓库编号
+        returnCompany: "", //退货公司编号
+        returner: "", //申请人
+        start: "", //退货节点
+        end: "",
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      tableData: [],
+      passwordModel: false,
+      passwordModelId: 0,
+      isPasswordDetail: false,
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        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",
+        },
+      ],
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+
+  methods: {
+    restSearch() {
+      this.parmValue = {
+        name: "", // 业务员名字
+        username: "", // 账号
+        status: "", //
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      };
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.searchList();
+    },
+
+    openModal(id, isDetail, sitem) {
+      this.showModel = true;
+      this.modelId = id;
+      this.isDetail = isDetail;
+      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() {
+      this.loading = true;
+      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;
+      }
+      this.loading = false;
+    },
+
+    async statusConfirm(id, status) {
+      let str = status === "1" ? "禁用" : "启用";
+      await this.$confirm("确定要改为" + str + "?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          this.loading = true;
+          const model = {
+            id: id,
+            status: status === "1" ? "0" : "1",
+          };
+          const res = await asyncRequest.status(model);
+          if (res && res.code === 0) {
+            this.loading = false;
+            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("取消");
+        });
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.sellReturnList {
+}
+</style>
+   

+ 0 - 0
src/views/serviceParam/goodsBack/销售出库退换货原因 → src/views/sellOut/sellReturnList/销售退货单


+ 0 - 0
src/views/serviceParam/purchaseInReturn/采购退货异常原因 → src/views/sellOut/销售管理


+ 0 - 0
src/views/serviceParam/storeAnomaly/采购入库验收异常 → src/views/serviceParam/expressSet/快递信息设置


+ 21 - 1
src/views/serviceParam/goodsAnomaly/index.vue

@@ -31,6 +31,26 @@
                   :size="searchSize"
                   type="primary"
                   style="float: right; margin-left: 5px"
+                  @click="searchList"
+                >
+                  刷新
+                </el-button>
+              </el-col>
+              <el-col :span="4" style="width: 66px; float: right">
+                <el-button
+                  type="warning"
+                  class="fr"
+                  :size="searchSize"
+                  @click="restSearch"
+                >
+                  重置
+                </el-button>
+              </el-col>
+              <el-col :span="3" style="width: 66px; float: right">
+                <el-button
+                  :size="searchSize"
+                  type="success"
+                  style="float: right; margin-left: 5px"
                   @click="openModal('add', false)"
                 >
                   新建
@@ -192,7 +212,7 @@ export default {
       // 表格 - 列参数
       columns: [
         {
-         prop: "result_code",
+          prop: "result_code",
           label: "原因编号",
           width: "80px",
         },

+ 20 - 0
src/views/serviceParam/goodsBack/index.vue

@@ -31,6 +31,26 @@
                   :size="searchSize"
                   type="primary"
                   style="float: right; margin-left: 5px"
+                  @click="searchList"
+                >
+                  刷新
+                </el-button>
+              </el-col>
+              <el-col :span="4" style="width: 66px; float: right">
+                <el-button
+                  type="warning"
+                  class="fr"
+                  :size="searchSize"
+                  @click="restSearch"
+                >
+                  重置
+                </el-button>
+              </el-col>
+              <el-col :span="3" style="width: 66px; float: right">
+                <el-button
+                  :size="searchSize"
+                  type="success"
+                  style="float: right; margin-left: 5px"
                   @click="openModal('add', false)"
                 >
                   新建

+ 0 - 0
src/views/serviceParam/goodsBack/售后退换货原因


+ 20 - 0
src/views/serviceParam/purchaseInReturn/index.vue

@@ -31,6 +31,26 @@
                   :size="searchSize"
                   type="primary"
                   style="float: right; margin-left: 5px"
+                  @click="searchList"
+                >
+                  刷新
+                </el-button>
+              </el-col>
+              <el-col :span="4" style="width: 66px; float: right">
+                <el-button
+                  type="warning"
+                  class="fr"
+                  :size="searchSize"
+                  @click="restSearch"
+                >
+                  重置
+                </el-button>
+              </el-col>
+              <el-col :span="3" style="width: 66px; float: right">
+                <el-button
+                  :size="searchSize"
+                  type="success"
+                  style="float: right; margin-left: 5px"
                   @click="openModal('add', false)"
                 >
                   新建

+ 0 - 0
src/views/serviceParam/purchaseInReturn/采购退货原因


+ 20 - 0
src/views/serviceParam/sellReturn/index.vue

@@ -31,6 +31,26 @@
                   :size="searchSize"
                   type="primary"
                   style="float: right; margin-left: 5px"
+                  @click="searchList"
+                >
+                  刷新
+                </el-button>
+              </el-col>
+              <el-col :span="4" style="width: 66px; float: right">
+                <el-button
+                  type="warning"
+                  class="fr"
+                  :size="searchSize"
+                  @click="restSearch"
+                >
+                  重置
+                </el-button>
+              </el-col>
+              <el-col :span="3" style="width: 66px; float: right">
+                <el-button
+                  :size="searchSize"
+                  type="success"
+                  style="float: right; margin-left: 5px"
                   @click="openModal('add', false)"
                 >
                   新建

+ 20 - 0
src/views/serviceParam/storeAnomaly/index.vue

@@ -31,6 +31,26 @@
                   :size="searchSize"
                   type="primary"
                   style="float: right; margin-left: 5px"
+                  @click="searchList"
+                >
+                  刷新
+                </el-button>
+              </el-col>
+              <el-col :span="4" style="width: 66px; float: right">
+                <el-button
+                  type="warning"
+                  class="fr"
+                  :size="searchSize"
+                  @click="restSearch"
+                >
+                  重置
+                </el-button>
+              </el-col>
+              <el-col :span="3" style="width: 66px; float: right">
+                <el-button
+                  :size="searchSize"
+                  type="success"
+                  style="float: right; margin-left: 5px"
                   @click="openModal('add', false)"
                 >
                   新建

+ 0 - 0
src/views/serviceParam/storeAnomaly/采购-入库验收异常