zhangjinxing vor 3 Jahren
Ursprung
Commit
51a91d05d5

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

@@ -13,7 +13,7 @@ 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 + "reorderexam", data, "post", params),
   // 
   getReason: (data, params) => http(api + "resultlist", data, "post", params),
   // 退货审核

+ 5 - 0
src/views/sellOut/goodsService/index.vue

@@ -305,6 +305,8 @@ export default {
       isDetail: false,
       modelId: 0,
       parmValue: {
+        order_type: "1", //订单类型1为销售 2为咨询
+
         customer_code: "", //客户公司code
         start_time: "",
         end_time: "",
@@ -418,6 +420,8 @@ export default {
       this.customerCode = [];
 
       this.parmValue = {
+        order_type: "1", //订单类型1为销售 2为咨询
+
         customer_code: "", //客户公司code
         start_time: "",
         end_time: "",
@@ -495,6 +499,7 @@ export default {
         start: model.start_time,
         end: model.end_time,
         customer_code: model.customer_code, //客户公司code
+        order_type: model.order_type, //订单类型1为销售 2为咨询
       };
       console.log(_model);
       const res = await asyncRequest.list(_model);

+ 5 - 0
src/views/sellOut/returnOrder/index.vue

@@ -300,6 +300,8 @@ export default {
       isDetail: false,
       modelId: 0,
       parmValue: {
+        order_type:"1",//订单类型1为销售 2为咨询
+
         sellOrderNumber: "", //销售订单编号
         returnNumber: "", //退货编号
         sellOutNumber: "", //销售出库编号
@@ -354,6 +356,7 @@ export default {
         status: "", //状态节点
 
         // --
+        order_type:"1",//订单类型1为销售 2为咨询
 
         page: 1, // 页码
         size: 15, // 每页显示条数
@@ -415,6 +418,8 @@ export default {
         return_code: model.serviceNumber, //return_code
         startTime: "",
         endTime: "",
+        order_type:model.order_type,//订单类型1为销售 2为咨询
+
       };
       const res = await asyncRequest.list(_model);
       if (res && res.code === 0 && res.data) {

+ 15 - 11
src/views/sellOut/salesOrder/addEditForm.vue

@@ -99,7 +99,7 @@
                 </el-form-item>
               </template>
             </el-table-column>
-            <el-table-column label="采购编码" width="180">
+            <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' : ''">
@@ -193,7 +193,7 @@
                 </el-form-item>
               </template>
             </el-table-column>
-            <el-table-column label="采购订单编号" width="170">
+            <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' : ''">
@@ -220,7 +220,7 @@
                 </el-form-item>
               </template>
             </el-table-column>
-            <el-table-column label="采购编码" width="170">
+            <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' : ''">
@@ -447,7 +447,7 @@
                 </el-form-item>
               </template>
             </el-table-column>
-            <el-table-column label="采购订单编号" width="170">
+            <el-table-column label="采购订单编号" width="180">
               <template slot-scope="scope">
                 <!-- :prop="'product_go.' + scope.$index + '.send_num'" -->
                 <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
@@ -622,6 +622,9 @@ export default {
       }
     };
     return {
+      totalReturnNum: "", //仓库总退货数量
+      totalReturnNumbers: "", //收货总退货数量
+
       noSendNumbers: "", //收货-未发货数量
       noSendNum: "", //销售-未发货数量
       reason_options: [], //退换货原因备选项
@@ -724,7 +727,7 @@ export default {
           };
           this.reason_options.push(obj);
         });
-        console.log(this.reason_options);
+        // console.log(this.reason_options);
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
       } else {
@@ -735,7 +738,7 @@ export default {
     },
     async initForm() {
       this.loading = true;
-      console.log("1212121");
+      // console.log("1212121");
       // await this.getRole();
       if (this.id === "add") {
         this.title = "添加销售退货单";
@@ -770,7 +773,7 @@ export default {
       };
       let { addrinfo, wsminfo } = model;
       //   let arr = []
-      console.log(addrinfo);
+      // console.log(addrinfo);
       this.tableForm.product_go = wsminfo;
       this.tableForm.get_product_go = addrinfo;
 
@@ -792,7 +795,7 @@ export default {
           this.$refs.ruleForm.clearValidate();
           console.log(this.sitem);
           this.outCode = this.sitem.orderCode;
-          console.log(this.outCode);
+          // console.log(this.outCode);
           const { info, addrs } = this.sitem;
           info.forEach((ele) => {
             this.noSendNum += ele.wsend_num;
@@ -804,7 +807,7 @@ export default {
           });
           this.tableForm.product_go = [].concat(...list);
 
-          console.log(list);
+          // console.log(list);
           addrs.forEach((ele) => {
             this.noSendNumbers += ele.wsend_num;
           });
@@ -814,7 +817,7 @@ export default {
             return ele;
           });
           this.tableForm.get_product_go = [].concat(...l_list);
-          console.log(l_list);
+          // console.log(l_list);
           this.ruleForm = {
             return_remark: "", //退货备注
             return_num: "", //退货数量
@@ -858,7 +861,8 @@ export default {
             addr,
           };
           console.log(_model);
-          if (model.return_num > this.noSendNum) {
+          console.log(this.noSendNum);
+          if (Number(model.return_num) > Number(this.noSendNum)) {
             this.$message.warning("退货数量不能大于未发货数量");
             return;
           }

+ 43 - 4
src/views/sellOut/salesOrder/components/addEdit.vue

@@ -50,15 +50,29 @@
                   />
                 </el-form-item>
               </el-col>
-              <el-col :span="24">
-                <el-form-item label="企业客户" prop="customer_code">
+              <el-col :span="12">
+                <el-form-item label="购买方" prop="customer_code">
                   <search-customer
                     :value="ruleForm.customer_code"
                     @searchChange="customer_code_change"
                   />
                 </el-form-item>
               </el-col>
-
+              <el-col :span="12">
+                <el-form-item label="销售方" prop="sell_code">
+                  <!-- <search-customer
+                    :value="ruleForm.sell_code"
+                    @searchChange="customer_code_change"
+                  /> -->
+                  <search-supplier
+                    :size="searchSize"
+                    :value="ruleForm.sell_code"
+                    :disabled="false"
+                    :isDetail="false"
+                    @searchChange="supplierChange"
+                  />
+                </el-form-item>
+              </el-col>
               <el-col :span="24">
                 <search-stock-good-modal
                   :once="true"
@@ -436,6 +450,7 @@ export default {
         good_name: "",
         good_code: "", // 商品选择
         customer_code: [], // 企业客户选择
+        sell_code: [], //销售方选择
       },
       rulesThis: this.rules,
       rules: {
@@ -462,6 +477,14 @@ export default {
             trigger: "change",
           },
         ],
+        sell_code: [
+          {
+            type: "array",
+            required: true,
+            message: "请选择供应商公司",
+            trigger: "change",
+          },
+        ],
       },
       addrForm: {
         order_addr: [], //收货地址
@@ -621,6 +644,7 @@ export default {
             goods_class: [],
             good_code: "", // 商品选择
             customer_code: [], // 企业客户选择
+            sell_code: [], //销售方公司
           };
         }
         if (this.$refs.stockForm) {
@@ -689,6 +713,20 @@ export default {
       }
       this.$refs.ruleForm.validateField("customer_code");
     },
+    supplierChange(e) {
+      if (e && e.id) {
+        this.ruleForm.sell_code = [e.code];
+        // this.wsm_supplierNo = [e.code];
+      } else {
+        this.ruleForm.sell_code = [];
+        // this.wsm_supplierNo = [];
+      }
+      // this.parmValue.wsm_code = "";
+      // this.wsm_code = [];
+      // this.parmValue.page = 1;
+      // this.pageInfo.curr = 1;
+      this.$refs.ruleForm.validateField("sell_code");
+    },
     openHouseModal(index) {
       let findex = this.addrForm.order_addr.findIndex((v) => v.edit === true);
       if (findex !== -1) {
@@ -733,13 +771,14 @@ export default {
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
           this.loading = true;
-          const { good_code, customer_code } = JSON.parse(
+          const { good_code, customer_code, sell_code } = JSON.parse(
             JSON.stringify(this.ruleForm)
           );
           const { good_stock } = JSON.parse(JSON.stringify(this.stockForm));
           const { order_addr } = JSON.parse(JSON.stringify(this.addrForm));
           let model = {
             good_code,
+            supplierNo: sell_code.join(","),
             customer_code: customer_code.join(","), // 账号
             order_addr: [],
             good_stock: [],

+ 4 - 1
src/views/sellOut/salesOrder/index.vue

@@ -254,6 +254,7 @@ export default {
       isDetail: false,
       modelId: 0,
       parmValue: {
+        order_type: "1", //订单类型1为销售 2为咨询
         bk_code: "", // 备库编码
         wsm_in_code: "", // 入库单号
         cgdNo: "", // 采购单编码
@@ -309,6 +310,8 @@ export default {
         end: "", // 结束时间
       };
       this.parmValue = {
+        order_type: "1", //订单类型1为销售 2为咨询
+
         bk_code: "", // 备库编码
         wsm_in_code: "", // 入库单号
         cgdNo: "", // 采购单编码
@@ -389,7 +392,7 @@ export default {
       this.parmValue.good_name = this.select === "5" ? this.input : ""; // 产品名称
       this.parmValue.apply_name = this.select === "6" ? this.input : ""; // 申请人
       this.parmValue.supplierNo = this.select === "7" ? this.input : ""; // 采购供应商编号
-
+      this.parmValue.order_type = "1"; //订单类型1为销售订单 2为咨询订单
       const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;

+ 56 - 41
src/views/sellOut/sellReturnList/detail.vue

@@ -32,11 +32,11 @@
         >
           {{ status }}
           <exam-form
-            v-if="status == '3'"
+            v-if="status == '1'"
             :statusList="statusList"
             :newTime="newTime"
             :disabled="false"
-            :isMust="true"
+            :isMust="false"
             @searchChange="examForm"
           />
         </el-collapse-item>
@@ -45,42 +45,33 @@
           name="1"
           v-if="powers.some((item) => item == '037')"
         >
-          <!-- <return-check :sitem="sitem"></return-check> -->
-          <!--  -->
-          <return-check
-            v-if="newTime != '' && status == '2'"
-            :newTime="newTime"
-            :sitem="s_sitem"
-            @refresh="initData"
-          ></return-check>
+          <div style="height: 60px; padding: 20px 0 0px 0">
+            <el-button
+              type="info"
+              class="fr"
+              size="mini"
+              @click="changeStatus('3')"
+              >我已知晓</el-button
+            >
+          </div>
         </el-collapse-item>
         <el-collapse-item
           title="通知采购部门"
           name="1"
           v-if="powers.some((item) => item == '038')"
         >
-          <!-- <return-check :sitem="sitem"></return-check> -->
-          <!--  -->
-          <return-check
-            v-if="newTime != '' && status == '2'"
-            :newTime="newTime"
-            :sitem="s_sitem"
-            @refresh="initData"
-          ></return-check>
+          <div style="height: 60px; padding: 20px 0 0px 0">
+            <el-button type="info" class="fr" size="mini">我已知晓</el-button>
+          </div>
         </el-collapse-item>
         <el-collapse-item
           title="通知财务部门"
           name="1"
           v-if="powers.some((item) => item == '039')"
         >
-          <!-- <return-check :sitem="sitem"></return-check> -->
-          <!--  -->
-          <return-check
-            v-if="newTime != '' && status == '2'"
-            :newTime="newTime"
-            :sitem="s_sitem"
-            @refresh="initData"
-          ></return-check>
+          <div style="height: 60px; padding: 20px 0 0px 0">
+            <el-button type="info" class="fr" size="mini">我已知晓</el-button>
+          </div>
         </el-collapse-item>
         <el-collapse-item title="审批记录" name="10">
           <process-time-line
@@ -129,12 +120,12 @@ export default {
   data() {
     return {
       statusOptions: [
-        { value: "0", label: "取消" },
-        { value: "1", label: "退货商品验收" },
+        { value: "0", label: "发起退货流程" },
+        { value: "1", label: "退货业务审核" },
         // { value: "2", label: "反馈物流费" },
-        { value: "2", label: "退货业务审核" },
-        { value: "3", label: "通知库管" },
-        { value: "4", label: "通知采购" },
+        { value: "2", label: "通知库管" },
+        { value: "3", label: "通知采购" },
+        { value: "4", label: "通知财务部门" },
         { value: "5", label: "退货完成" },
 
         // { id: "0", label: "待申请" },
@@ -181,14 +172,14 @@ export default {
     async examForm(e) {
       console.log(e);
       if (!this.loading) {
-        let type = e.state === "1" ? "4" : e.rebut;
+        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 === "4" ? "同意" : "驳回"}?`, {
+      await this.$confirm(`确定要${type === "2" ? "同意" : "驳回"}?`, {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
@@ -196,14 +187,8 @@ export default {
         .then(async () => {
           console.log(type);
           console.log(remark);
-          // let { returnCode } = this.sitem;
-          // const model = {
-          //   remark,
-          //   returnCode,
-          //   status: type,
-          // };
           let _model = {
-            thNo: this.qid,
+            returnCode: this.qid,
             status: type,
             remark: remark,
           };
@@ -236,7 +221,7 @@ export default {
         this.status = res.data.status;
         this.s_sitem = res.data;
         console.log(res.data);
-        this.orderCode = res.data.orderCode;
+        this.orderCode = res.data.returnCode;
         this.getNewTime();
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
@@ -245,6 +230,36 @@ export default {
       }
       // }
     },
+
+    async changeStatus(status) {
+      await this.$confirm("确定我已知晓并同意?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          console.log(type);
+          let _model = {
+            returnCode: this.qid,
+            status: status,
+          };
+          let res = await asyncRequest.status(_model);
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "修改成功!",
+              message: "",
+            });
+            await this.initData();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
   },
 };
 </script>

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

@@ -268,7 +268,13 @@ export default {
       statusOptions: [
         // { id: "0", label: "禁用" },
         { id: "1", label: "业务审核" },
+        { id: "1", label: "业务审核" },
         { id: "2", label: "通知财务" },
+        { id: "3", label: "业务审核" },
+
+        { id: "1", label: "业务审核" },
+        { id: "1", label: "业务审核" },
+
       ],
       // statusList: statusList,
       loading: true,
@@ -276,6 +282,8 @@ export default {
       isDetail: false,
       modelId: 0,
       parmValue: {
+        order_type: "1", //订单类型1为销售 2为咨询
+
         CG_numbers: "", //采购单号
         returnNumber: "", //退货单编号
         returnStoreNum: "", //退货仓库编号
@@ -320,6 +328,8 @@ export default {
       this.s_input = ""; //清除输入框内容
       this.select = ""; //清除下拉框选中项
       this.parmValue = {
+        order_type: "1", //订单类型1为销售 2为咨询
+
         CG_numbers: "", //采购单号
         returnNumber: "", //退货单编号
         returnStoreNum: "", //退货仓库编号
@@ -387,6 +397,7 @@ export default {
         customer_code: model.clientNumber, //客户code
         // order_code: model.sellOrderNumber, //	确认单code
         out_code: model.sellOutNumber, //	出库code
+        order_type: model.order_type, //订单类型1为销售 2为咨询
 
         cgdNo: "",
         //可用搜索条件