zhangjinxing 3 éve
szülő
commit
64b293c625

+ 5 - 1
src/apis/service/goodsService/index.js

@@ -13,9 +13,13 @@ export default {
   // 更新
   update: (data, params) => http(api + "update", data, "post", params),
   // 修改状态
-  status: (data, params) => http(api + "accountstatus", data, "post", params),
+  status: (data, params) => http(api + "afterstatus", data, "post", params),
   // 异常原因接口
   reasonList: (data, params) => http(api + "resultlist", data, "post", params),
+  // 物流反馈
+  afterFeed: (data, params) => http(api + "afterfeed", data, "post", params),  
+  
+
 
 };
    

+ 1 - 1
src/assets/js/btnList.js

@@ -38,7 +38,7 @@ const btnList = [
   { code: "037", name: "通知库管岗" },
   { code: "038", name: "通知采购部门" },
   { code: "039", name: "通知财务部门" },
-
+  { code: "040", name: "物流反馈" },
   
 ];
 export default btnList;

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

@@ -47,6 +47,8 @@ export default [
         {
             prop:"except_code",
             label:"期望意愿",
+          _slot_: "except_code",
+
         },
     
         {
@@ -55,10 +57,11 @@ export default [
           _slot_: "status",
           width: "80px",
         },
-        // {
-        //     prop:"result",
-        //     label:"处理结果",
-        // },
+        {
+            prop:"addtime",
+            label:"添加时间",
+            width:150,
+        },
         {
             prop:"error_remark",
             label:"备注"
@@ -107,7 +110,7 @@ export default [
         {
           prop:"customer_name",
           label:"客户名称",
-          width:"100"
+          width:"200"
         },
         {
           prop: "",

+ 49 - 55
src/views/sellOut/goodsService/components/addEditForm.vue

@@ -9,8 +9,10 @@
     style="width: 100%"
     class="demo-ruleForm"
   >
-    {{ ruleForm }}
-    {{ sitem.bum.outCode }}-- {{ sitem.bum.orderCode }}
+    <p>{{ ruleForm }}</p>
+    <p>powers{{ powers }}</p>
+    <p>id{{ id }}</p>
+    <!-- {{ sitem.bum.outCode }}-- {{ sitem.bum.orderCode }} -->
     <el-row>
       <!-- <el-col :span="24">
         <el-form-item label="出库单编号">
@@ -185,6 +187,7 @@ export default {
       resign_name: "", //离职人
       hand_name: "", //交接人
       ruleForm: {
+        order_type: "1", //售后类型 1销售2咨询,
         outCode: "", //
         stock_out_numbers: "", //出库单编号
         anomalous_numbers: "", //异常数量
@@ -306,36 +309,24 @@ export default {
       this.loading = false;
     },
     async initData() {
+      console.log(this.sitem);
       if (this.sitem) {
-        let {
-          anomalous_numbers,
-          anomalous_reason,
-          expect_wish,
-          remark,
-          image,
-        } = this.sitem;
-        this.ruleForm = {
-          stock_out_numbers: "", //出库单编号
-          anomalous_numbers: anomalous_numbers, //异常数量
-          anomalous_reason: anomalous_reason, //异常原因
-          expect_wish: expect_wish, //期望意愿
-          anomalous_images: [image],
-          anomalous_remark: remark, //异常备注
+        let { returnCode } = this.sitem;
+        let model = {
+          returnCode,
         };
-        const res = await asyncRequest.detail({ id: this.id });
+        const res = await asyncRequest.detail(model);
         if (res && res.code === 0 && res.data) {
-          let { hand_name, resign_name, hand_uid, resign_uid, status } =
+          let { error_num, error_img, error_remark, except_code, error_code } =
             res.data;
-          this.resign_name = resign_name;
-          this.hand_name = hand_name;
-          this.status = status;
+          console.log(res.data);
           this.ruleForm = {
             stock_out_numbers: "", //出库单编号
-            anomalous_numbers: this.sitem.anomalous_numbers, //异常数量
-            anomalous_reason: this.sitem.anomalous_reason, //异常原因
-            expect_wish: this.sitem.expect_wish, //期望意愿
-            anomalous_images: [],
-            anomalous_remark: this.sitem.remark, //异常备注
+            anomalous_numbers: 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();
@@ -354,19 +345,21 @@ export default {
         if (this.$refs.ruleForm) {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
-          console.log(this.sitem.bum[0].outCode);
+
           let { bum } = this.sitem;
-          let OutCode = "";
-          bum.map((ele) => {
-            OutCode = ele.outCode;
-          });
-          this.ruleForm = {
-            anomalous_numbers: "", //异常数量
-            anomalous_reason: "", //异常原因
-            expect_wish: "", //期望意愿
-            anomalous_images: [],
-            outCode: OutCode,
-          };
+          if (this.id === "add") {
+            let OutCode = "";
+            bum.map((ele) => {
+              OutCode = ele.outCode;
+            });
+            this.ruleForm = {
+              anomalous_numbers: "", //异常数量
+              anomalous_reason: "", //异常原因
+              expect_wish: "", //期望意愿
+              anomalous_images: [],
+              outCode: OutCode,
+            };
+          }
         }
       });
     },
@@ -382,6 +375,7 @@ export default {
 
           // console.log("调接口");
           let _model = {
+            order_type: "1",
             outCode: model.outCode,
             errorCode: model.anomalous_reason, //异常原因
             num: model.anomalous_numbers,
@@ -393,24 +387,24 @@ export default {
           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 (res && res.code === 0) {
+            const title = this.id === "add" ? "添加成功!" : "修改成功!";
+            this.$notify.success({
+              title,
+              message: "",
+            });
 
-          //   if (this.id === "add") {
-          //     this.showModelThis = false;
-          //     this.$emit("refresh", false);
-          //   } else {
-          //     this.initForm();
-          //   }
-          // } else if (res && res.code >= 100 && res.code <= 104) {
-          //   await this.logout();
-          // } else {
-          //   this.$message.warning(res.message);
-          // }
+            if (this.id === "add") {
+              this.showModelThis = false;
+              this.$emit("refresh", false);
+            } else {
+              this.initForm();
+            }
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
         } else {
           console.log("error submit!!");
           return false;

+ 51 - 132
src/views/sellOut/goodsService/components/express_feedback.vue

@@ -10,62 +10,29 @@
     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-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="parmValue.wsm_supplierNo"
+          @searchChange="stockChange"
+        />
       </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"
@@ -127,18 +94,14 @@ export default {
       }
     };
     return {
+      wsm_supplierNo: [],
       loading: false,
       status: "", //存储详情接口返的状态
       showModelThis: this.showModel,
       resign_name: "", //离职人
       hand_name: "", //交接人
       ruleForm: {
-        return_store: "", //退回仓库
-        return_goods_addr: [], //退货地址
-        addr_detail: "", //退货详细地址
-        addressee: "", //收件人
-        addressee_phone: "", //收件人电话
-        express_require: "", //物流要求
+        wsm_supplierNo: "",
       },
       rulesThis: this.rules,
       // 验证规则
@@ -150,73 +113,7 @@ export default {
             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: {
@@ -280,6 +177,7 @@ export default {
         if (this.$refs.ruleForm) {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
+          this.wsm_supplierNo = [];
           this.ruleForm = {
             return_store: "", //退回仓库
             return_goods_addr: [], //退货地址
@@ -348,12 +246,33 @@ export default {
       });
       this.ruleForm.return_store = e;
     },
-    //退货省市区
-    selectAreaAddr_code(e) {
+    async supplierChange(e) {
+      if (e && e.id) {
+        this.parmValue.wsm_supplierNo = e.code;
+        this.wsm_supplierNo = [e.code];
+      } else {
+        this.parmValue.wsm_supplierNo = "";
+        this.wsm_supplierNo = [];
+      }
+      this.parmValue.wsm_code = "";
+      this.wsm_code = [];
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
+    async stockChange(e) {
+      if (e && e.id) {
+        this.parmValue.wsm_code = e.code;
+        this.wsm_code = [e.code];
+      } else {
+        this.parmValue.wsm_code = "";
+        this.wsm_code = [];
+      }
+
       console.log(e);
-      this.ruleForm.return_goods_addr = e;
-      console.log(this.ruleForm);
-      this.$refs.ruleForm.validateField("return_goods_addr");
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
     },
   },
 };

+ 98 - 35
src/views/sellOut/goodsService/index.vue

@@ -121,8 +121,17 @@
               </el-col>
             </el-row>
             <el-row style="padding-top: 10px">
+              <!-- 客户公司 -->
+              <el-col :span="4" style="width: 420px; padding: 0px 0 0 0px">
+                <search-customer
+                  :value="customerCode"
+                  :size="searchSize"
+                  :placeholder="'客户公司名称'"
+                  @searchChange="customerChange"
+                />
+              </el-col>
               <!-- 商品名称 -->
-              <el-col :span="4" style="width: 180px">
+              <el-col :span="4" style="width: 180px; padding: 0 0 0 10px">
                 <el-input
                   clearable
                   :size="searchSize"
@@ -132,7 +141,7 @@
                 />
               </el-col>
               <!-- 商品编码 -->
-              <el-col :span="4" style="width: 180px; padding: 0 0 0 10px">
+              <el-col :span="4" style="width: 200px; padding: 0 0 0 10px">
                 <el-input
                   clearable
                   :size="searchSize"
@@ -140,8 +149,10 @@
                   placeholder="商品编号"
                 />
               </el-col>
+            </el-row>
+            <el-row style="padding: 10px 0 0 0">
               <!-- 确认单号 -->
-              <el-col :span="4" style="width: 200px; padding: 0 0 0 10px">
+              <el-col :span="4" style="width: 200px; padding: 0 0 0 0px">
                 <el-input
                   clearable
                   :size="searchSize"
@@ -190,13 +201,30 @@
             "
           ></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 || '--'
+              (
+                post_ownOptions.find((item) => item.id == scope.row.post_own) ||
+                {}
+              ).label || '--'
+            "
+          ></el-tag>
+        </template>
+        <!-- 期望意愿 -->
+        <template #except_code="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.status == '0' ? 'warning' : ''"
+            v-text="
+              (
+                except_codeOptions.find(
+                  (item) => item.id == scope.row.except_code
+                ) || {}
+              ).label || '--'
             "
           ></el-tag>
         </template>
@@ -271,16 +299,26 @@ export default {
   },
   data() {
     return {
-      post_ownOptions: [],
+      customerCode: [], //客户公司code
+      except_codeOptions: [
+        { id: "1", label: "退货" },
+        { id: "2", label: "换货" },
+        { id: "3", label: "改变售价" },
+      ],
+      post_ownOptions: [
+        { id: "1", label: "客户承担" },
+        { id: "2", label: "公司承担" },
+        { id: "3", label: "供应商承担" },
+      ],
       sitem: null,
       // 状态
       statusOptions: [
-        { id: "0", label: "取消" },
-        { id: "1", label: "发起" },
-        { id: "2", label: "反馈物流费" },
-        { id: "3", label: "同意下单" },
-        { id: "4", label: "发货中" },
-        { id: "5", label: "已发货" },
+        { id: "0", label: "待审核" },
+        { id: "1", label: "待物流反馈" },
+        { id: "2", label: "待退货" },
+        { id: "3", label: "已退货" },
+        { id: "4", label: "" },
+        { id: "5", label: "" },
       ],
       statusList: statusList,
       loading: true,
@@ -288,6 +326,7 @@ export default {
       isDetail: false,
       modelId: 0,
       parmValue: {
+        customer_code: "", //客户公司code
         start_time: "",
         end_time: "",
         returnCode: "", //售后单号
@@ -323,8 +362,8 @@ export default {
       serviceOptions: [
         //假数据
         {
-          value:"0",
-          label:"待审核"
+          value: "0",
+          label: "待审核",
         },
         {
           value: "1",
@@ -335,25 +374,25 @@ export default {
           label: "待退货",
         },
         {
-          value: "选项3",
-          label: "待采购反馈",
-        },
-        {
-          value: "选项4",
-          label: "待采购审核",
-        },
-        {
-          value: "选项5",
-          label: "处理已结束",
-        },
-        {
-          value: "d",
-          label: "业务已驳回",
-        },
-        {
-          value: "d",
-          label: "采购已驳回",
+          value: "3",
+          label: "已退货",
         },
+        // {
+        //   value: "选项4",
+        //   label: "待采购审核",
+        // },
+        // {
+        //   value: "选项5",
+        //   label: "处理已结束",
+        // },
+        // {
+        //   value: "d",
+        //   label: "业务已驳回",
+        // },
+        // {
+        //   value: "d",
+        //   label: "采购已驳回",
+        // },
       ],
       serviceValue: "", //售后申请处理状态
       expectOptions: [
@@ -398,10 +437,22 @@ export default {
 
   methods: {
     restSearch() {
+      this.customerCode = [];
+
       this.parmValue = {
-        name: "", // 业务员名字
-        username: "", // 账号
-        status: "", //
+        customer_code: "", //客户公司code
+        start_time: "",
+        end_time: "",
+        returnCode: "", //售后单号
+        apply_name: "", //申请人名称
+        sellNumbers: "", //销售单号
+        sellGoStock: "", //销售出库单号,
+        expressNumber: "", //物流编号
+        goodsNumber: "", //商品编号
+        goodsName: "", //商品名称
+        service_value: "", //售后申请单处理状态
+        expect_value: "", //期望意愿
+        result_value: "", //处理结果
         page: 1, // 页码
         size: 15, // 每页显示条数
       };
@@ -466,6 +517,7 @@ export default {
         apply_name: model.apply_name,
         start: model.start_time,
         end: model.end_time,
+        customer_code: model.customer_code, //客户公司code
       };
       console.log(_model);
       const res = await asyncRequest.list(_model);
@@ -547,6 +599,17 @@ export default {
     //   console.log(e, "resultChange");
     //   this.parmValue.result_value = e;
     // },
+    async customerChange(e) {
+      if (e && e.id) {
+        this.customerCode = [e.code];
+        this.parmValue.customer_code = e.code;
+      } else {
+        this.customerCode = [];
+        this.parmValue.customer_code = "";
+      }
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
   },
 };
 </script>

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

@@ -4,12 +4,14 @@
       style="width: 100%"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
+      <p>{{ powers }}</p>
       <div class="detail-page-title">
         <span class="title">售后申请详情</span>
         <add-edit-form :sitem="sitem"></add-edit-form>
       </div>
-      powers:{{ powers }}status{{ status }}id:{{ sitem }}
       <el-collapse v-model="activeNames">
+        <p>status{{ sitem.status }}</p>
+
         <el-collapse-item
           title="业务审核"
           name="1"
@@ -23,11 +25,7 @@
             @searchChange="examForm"
           />
         </el-collapse-item>
-        <el-collapse-item
-          title="物流反馈"
-          name="2"
-          v-if="powers.some((item) => item == '035')"
-        >
+        <el-collapse-item title="物流反馈" name="2">
           <express-feedback></express-feedback>
         </el-collapse-item>
         <!-- <el-collapse-item
@@ -40,7 +38,7 @@
         <el-collapse-item
           title="退货物流"
           name="4"
-          v-if="powers.some((item) => item == '032')"
+          v-if="powers.some((item) => item == '040')"
         >
           <return-express></return-express>
         </el-collapse-item>
@@ -55,6 +53,8 @@
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 // import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder/detail";
+import asyncRequest from "@/apis/service/goodsService";
+
 import addEditForm from "./components/addEditForm.vue";
 import ExpressFeedback from "./components/express_feedback.vue";
 
@@ -94,13 +94,54 @@ export default {
   },
   mounted() {
     this.sitem = this.$route.query.id;
+    console.log(this.sitem);
   },
   methods: {
     getNewTime() {
       this.newTime = new Date().valueOf();
     },
-    examForm(e) {
+    // 点击业务审核的保存按钮
+    async examForm(e) {
       console.log(e);
+      if (!this.loading) {
+        let type = e.state === "1" ? "2" : "0";
+        console.log(type);
+        await this.setstatus(type, "提交业务审核", e.remark);
+      }
+    },
+    //
+    async setstatus(type, detail, remark) {
+      await this.$confirm(`确定要${type === "2" ? "同意" : "驳回"}?`, {
+        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("取消");
+        });
     },
   },
 };

+ 1 - 1
src/views/sellOut/salesOrder/addEdit.vue

@@ -658,7 +658,7 @@ export default {
         const model = JSON.parse(JSON.stringify(this.ruleForm));
         console.log(model);
         console.log(this.noSendNum);
-        if (Number(model.return_num) > Number(this.noSendNum)) {
+        if (Number(model.get_return_num) > Number(this.noSendNum)) {
           this.$message.warning("退货数量不能大于未发货数量");
           return;
         }