snow 2 年之前
父节点
当前提交
7cfc857657

文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/0.js


+ 2 - 1
src/apis/service/sellOut/returnGoodWorkOrder/index.js

@@ -7,5 +7,6 @@ export default {
   detail: (data, params) => http(api + 'order_return_child_info', data, 'post', params),
   express: (data, params) => http(api + 'child_send', data, 'post', params),
   list: (data, params) => http(api + 'order_return_child_list', data, 'post', params),
-  setAfterChildRecord: (data, params) => http(api + 'set_order_return_child_record', data, 'post', params)
+  setAfterChildRecord: (data, params) => http(api + 'set_order_return_child_record', data, 'post', params),
+  reorderool: (data, params) => http(api + 'reorderool', data, 'post', params)
 }

+ 2 - 1
src/apis/service/sellOut/sellReturn/index.js

@@ -19,6 +19,7 @@ export default {
   // 退货审核
   returnCheck: (data, params) => http(api + 'reorderexam', data, 'post', params),
   child_list: (data, params) => http(api + 'reorder_child_list', data, 'post', params),
-  reorderRool: (data, params) => http(api + 'reorderool', data, 'post', params)
+  reorderRool: (data, params) => http(api + 'reorderool', data, 'post', params),
+  orderCancel: (data, params) => http(api + 'reorder_cancel', data, 'post', params)
 }
 

+ 7 - 5
src/views/goodStore/supplierGoodsCost/components/baseForm.vue

@@ -34,18 +34,18 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="供应商" prop="supplierNo">
-              <!-- <search-supplier
+              <search-supplier
                 :value="ruleForm.supplierNo"
                 :placeholder="'供应商'"
-                :disabled="type === 'view' || type === 'editCoin'"
+                disabled
                 :size="'mini'"
                 :names="supplierName"
                 :isDetail="type !== 'add'"
                 :isp="this.type !== 'view'"
                 @searchChange="supplierNosearchChange"
-              /> -->
+              />
 
-                <el-input :value="getCompanyWithCode(ruleForm.companyNo).name" disabled />
+                <!-- <el-input :value="getCompanyWithCode(ruleForm.companyNo).name" disabled /> -->
             </el-form-item>
           </el-col>
 
@@ -1145,7 +1145,8 @@ export default {
   },
   methods: {
     onCompanyChange(){
-      this.ruleForm.supplierNo = this.currentCompany
+      // this.ruleForm.supplierNo = this.currentCompany
+      this.supplierNosearchChange({code: this.currentCompany})
     },
     async initForm() {
       this.loading = true;
@@ -1156,6 +1157,7 @@ export default {
       this.good_type_change();
       await this.get_golpricelast();
       this.stock_change();
+      this.onCompanyChange()
       this.loading = false;
     },
     async number_change(e, key) {

+ 1 - 0
src/views/sellOut/returnGoodWorkOrder/detail.vue

@@ -188,6 +188,7 @@ export default {
       const { code, data, message } = await asyncRequest.detail({
         id: this.queryId,
       });
+
       if (code === 0) {
         const { is_stock, status } = data;
         this.is_stock = is_stock;

+ 5 - 2
src/views/sellOut/sellAfterApply/components/approval-results.vue

@@ -1,7 +1,7 @@
 <template>
   <el-form ref="formRef" class="supplier-form" size="mini" label-width="80px" :model="formData" :rules="rules">
     <el-form-item label="审核状态" prop="status">
-      <el-select v-model="formData.status" style="width:100%">
+      <el-select v-model="formData.status" style="width:100%" :disabled="disbaledStatus">
         <el-option label="不同意供应商审批结果,修改供应商审批结果" value="10" />
         <el-option label="同意供应商审批结果,由业务公司承担" value="11" />
       </el-select>
@@ -48,7 +48,7 @@ export default {
     return {
       company: '',
       formData: {
-        status: '10',
+        status: '11',
         remark: '',
         wsm_code: ''
       },
@@ -62,6 +62,9 @@ export default {
     displayExpressField() {
       return this.formData.status === '11'
     },
+    disbaledStatus() {
+      return this.sitem && this.sitem.order_type === '1'
+    },
     rules() {
       const { status } = this.formData
       return ({

+ 7 - 3
src/views/sellOut/sellAfterApply/detail.vue

@@ -155,7 +155,8 @@
               />
             </el-collapse-item>
 
-            <el-collapse-item title="业务审核" name="3" v-if="isHasPermission({status:'1', process:'1'})">
+            <!-- -->
+            <el-collapse-item title="业务审核" name="3"  v-if="isHasPermission({status:'1', process:'1'})">
               <exam-form
                 :statusList="statusList"
                 :newTime="newTime"
@@ -165,12 +166,13 @@
               />
             </el-collapse-item>
 
+            <!-- -->
             <el-collapse-item name="4" title="供应商驳回,待采购审核"  v-if="isHasPermission({status:'2', process:'2'})">
               <approval-results :sitem="sitem" @changeStatus="handlePurchaseConfirm" />
             </el-collapse-item>
 
             <el-collapse-item name="5" title="供应商审核"  v-if="isHasPermission({status:'9', process:'9'})">
-              <supplier-exam :sitem="sitem" @changeStatus="handleSupplierExam" />
+              <supplier-exam :sitem="sitem" @changeStatus="handleSupplierExam" />ff
             </el-collapse-item>
 
             <el-collapse-item name="6" title="待客户退货"  v-if="isHasPermission({status:'4', process:'4'})">
@@ -443,8 +445,10 @@ s    },
     // 点击业务审核的保存按钮
     async examForm(e) {
       if (!this.loading) {
-        //通过为9「待供应商审核」,不通过为6「业务已驳回」
         let type = e.state + '' === "1" ? "9" : "6";
+        const { order_type } = this.sitem;
+        const isStock = order_type === "1"
+        if(isStock && type === "9") type = "2"
         let message = e.state + '' === "1" ? "提交业务审核" : "提交业务审核";
         await this.statusConfirm(type, message, e.remark);
       }

+ 4 - 3
src/views/sellOut/sellOutOrder/components/addEditFormA.vue

@@ -14,8 +14,9 @@
       <el-col :span="24">
         <el-form-item  label="期望结果" prop="is_receive">
           <el-select
+            disabled
             style="width: 100%"
-            :disabled="disabled"
+            disabled
             v-model="ruleForm.is_receive"
             @change="is_receive_change"
             placeholder="期望结果"
@@ -203,7 +204,7 @@ export default {
       resign_name: "", //离职人
       hand_name: "", //交接人
       ruleForm: {
-        is_receive: "",
+        is_receive: "1",
         send_num: "",
         order_type: "",
         outCode: "", //
@@ -382,7 +383,7 @@ export default {
           this.$refs.ruleForm.clearValidate();
           let { send_num } = this.sitem;
           this.ruleForm = {
-            is_receive: "",
+            is_receive: "1",
             send_num: send_num || "",
             num: send_num || "", //异常数量
             errorCode: "", //异常原因

+ 0 - 1
src/views/sellOut/sellOutOrder/detail.vue

@@ -716,7 +716,6 @@ export default {
     },
 
     wellReturnCode() {
-      console.log(this.returnCode_type);
       if (
         this.returnCode_type + '' === "1" ||
         this.returnCode_type + '' === "2" ||

+ 1 - 1
src/views/sellOut/sellReturn/columns.js

@@ -118,7 +118,7 @@ export default [
   },
   {
     prop: '',
-    width: 50,
+    width: 80,
     label: '操作',
     fixed: 'right',
     _noset_: true,

+ 179 - 0
src/views/sellOut/sellReturn/components/child-list.vue

@@ -0,0 +1,179 @@
+<template>
+  <div class="outOrderTable">
+    <el-table
+      ref="addrForm"
+      :data="tableData"
+      border
+      :size="'mini'"
+      style="width: 100%"
+      row-key="key"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column
+        show-overflow-tooltip
+        prop="outCode"
+        label="发货单号"
+        width="160"
+      />s
+
+      <el-table-column
+        show-overflow-tooltip
+        prop="send_num"
+        label="发货数量"
+        width="80"
+      />
+
+
+      <el-table-column
+        show-overflow-tooltip
+        prop="orderCode"
+        label="退货数量"
+        width="80"
+      />
+
+      <el-table-column show-overflow-tooltip prop="contactor" label="联系人" width="120" />
+      <el-table-column show-overflow-tooltip prop="mobile" label="手机号" width="140" />
+      <el-table-column show-overflow-tooltip prop="addr_code_cn" label="省市区" min-width="140" />
+      <el-table-column show-overflow-tooltip prop="addr" label="详细地址" min-width="140" />
+    </el-table>
+    <div
+      v-if="tableData && tableData.length > 0"
+      class="Pagination"
+      style="text-align: right; margin-top: 10px"
+    >
+      <el-pagination
+        :current-page="parmValue.page"
+        :page-size="parmValue.size"
+        :size="'mini'"
+        layout="total,  prev, pager, next, jumper"
+        :total="pageInfo.total"
+        @size-change="page_size_change"
+        @current-change="page_curr_change"
+      />
+    </div>
+  </div>
+</template>
+<script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import asyncRequest from "@/apis/service/sellOut/sellReturn";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "salesOrderDetail",
+  mixins: [mixinPage, resToken],
+  props: ["newTime", "id", "sitem"],
+  watch: {
+    newTime: function (val) {
+      if (val) {
+        this.initForm();
+      }
+    },
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+
+    powers() {
+      const tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "salesOrderDetail"
+        ) || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    },
+  },
+
+  data() {
+    return {
+      orderCode: "",
+      outCode: "",
+      addr_res: 0,
+      batch_num: 0,
+      addrmodel: false,
+      // 状态
+      statusOptions: [
+        { id: "1", label: "待发货" },
+        { id: "2", label: "发货完成" },
+        { id: "3", label: "已收货" },
+        { id: "4", label: "已全部退货" },
+      ],
+      showGoodsModel: false,
+      stock_code: "",
+      tableData: [],
+      loading: false,
+      queryId: "",
+      status: "",
+      showModel: null,
+      modelId: "",
+      modelItem: null,
+      s_sitem: null,
+      returnId: "",
+      returnItem: null,
+      returnModel: false,
+      wsend_num: "",
+      orderCode: "",
+      returnAllId: "",
+      returnAllSitem: null,
+      returnAllShowModel: false,
+      parmValue: {},
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      multipleSelection: [],
+      resModel: null,
+    };
+  },
+  watch:{
+    sitem:{
+      handler(){
+        if(!this.sitem) return
+        this.initForm();
+      },
+      immediate:true
+    }
+  },
+  methods: {
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    closeModel() {
+      this.modelId = "";
+      this.modelShowModel = false;
+    },
+    refresh() {
+      this.$emit("refresh");
+      this.modelId = "";
+      this.modelShowModel = false;
+    },
+    async initForm() {
+      this.status = "";
+      this.queryId = this.$route.query.id;
+      // this.rulesThis = this.rules;
+      this.resetForm();
+    },
+    async resetForm() {
+      // 重置
+      await this.$nextTick(async () => {
+        await this.searchList();
+      });
+    },
+    // 列表搜索
+    async searchList() {
+      const { code, data } = await asyncRequest.reorderRool({returnCode: this.sitem.returnCode});
+      if (code === 0) {
+        const { list } = data;
+        this.tableData = list;
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+  },
+};
+</script>
+<style lang="scss" scoped></style>

+ 13 - 5
src/views/sellOut/sellReturn/detail.vue

@@ -135,6 +135,11 @@
                 </template>
               </show-data-table>
             </el-collapse-item>
+
+            <el-collapse-item title="发货信息" name="8">
+              <child-list :sitem="sitem" />
+            </el-collapse-item>
+            
             <el-collapse-item title="商品信息" name="2">
               <show-goods-data-table
                 :newTime="newTime"
@@ -216,6 +221,7 @@ import { xs_order_type_options } from "@/assets/js/statusList";
 import SetWorkOrder from "./components/set-work-order.vue"
 import { mapGetters } from "vuex";
 import ShowWorkOrder from "./components/show-work-order.vue"
+import childList from "./components/child-list.vue";
 export default {
   name: "sellReturnDetail",
   mixins: [mixinPage, resToken],
@@ -223,7 +229,8 @@ export default {
     comExamForm,
     ApprovalResults,
     SetWorkOrder,
-    ShowWorkOrder
+    ShowWorkOrder,
+    childList
   },
   computed: {
     ...mapGetters(['isSupertube']),
@@ -258,11 +265,12 @@ export default {
         { value: '9', label:'待供应商审核'},
         { value: '10', label:'业务公司修改,待供应商确认'},
         { value: '11', label:'待设置工单'},
-        { value: '12', label:'待库管收货'}
+        { value: '12', label:'待库管收货'},
+        { value: "13", label: "已取消申请" }
       ],
       xs_order_type_options,
       sitem: null, //传给组件
-      activeNames: ["0", "1", "2", "3", "4", "5", "6", "7",'10'],
+      activeNames: ["0", "1", "2", "3", "4", "5", "6", "7","8",'10'],
       sitem: null,
       status: "", //存储详情接口状态
       statusList: [
@@ -389,8 +397,8 @@ export default {
     
     async initData() {
       const { code, data, message } = await asyncRequest.detail({ returnCode: this.queryId });
-      // const {data:roolData} = await asyncRequest.reorderRool({returnCode: this.queryId});
-      // console.log(roolData)
+      const {data:roolData} = await asyncRequest.reorderRool({returnCode: data.returnCode});
+
       if (code === 0) {
         const { is_stock, status } = data;
         this.is_stock = is_stock;

+ 22 - 3
src/views/sellOut/sellReturn/index.vue

@@ -185,7 +185,7 @@
                     <el-option label="商品成本编号" value="good_code" />
                     <el-option label="上线商品编号" value="skuCode" />
                     <el-option label="申请人" value="apply_name" />
-                  </el-select>
+                  </el-select> 
                   <el-button
                     slot="append"
                     icon="el-icon-search"
@@ -280,6 +280,10 @@
               @click="getRouter('sellReturnDetail', scope.row.returnCode)"
             ></i>
           </el-tooltip>
+
+          <el-tooltip content="撤销" placement="top" v-if="cancelStatus.includes(scope.row.status)">
+             <i class="el-icon-refresh-right tb-icon"  @click="handleOrderCancel(scope.row)"  />
+          </el-tooltip>
         </template>
       </ex-table>
     </div>
@@ -302,6 +306,7 @@ import {
   has_account_list,
 } from "@/assets/js/statusList";
 import companyHelper from "@/mixins/companyHelper";
+import { MessageBox } from "element-ui";
 
 export default {
   name: "sellReturn",
@@ -325,6 +330,7 @@ export default {
       s_input: "", //搜索框内容
       select_list: [],
       sitem: null,
+      cancelStatus:['1','8', '9', '10'],
       // 状态
       statusOptions: [
         { value: "1", label: "待业务审批" },
@@ -339,6 +345,7 @@ export default {
         { value: "10", label: "业务公司修改,待供应商确认" },
         { value: "11", label: "待设置工单" },
         { value: "12", label: "待库管收货" },
+        { value: "13", label: "已取消申请" }
       ],
       loading: false,
       showModel: false,
@@ -410,6 +417,20 @@ export default {
   },
 
   methods: {
+    handleOrderCancel(row){
+      MessageBox.confirm("是否确认撤销该退货单?").then(async () => {
+          const { returnCode } = row;
+          const { code, message } = await asyncRequest.orderCancel({ returnCode:[returnCode] })
+          switch(code){
+            case 0:
+              this.searchList();
+              break;
+            default:
+              this.$message.warning(message);
+              break;
+          }
+      })
+    },
     async supplierChange(e) {
       const { code, label } = e;
       this.supplierNo = code ? [code] : [];
@@ -578,8 +599,6 @@ export default {
 
       let model = JSON.parse(JSON.stringify(this.parmValue));
 
-      console.log(model)
-
       const res = await asyncRequest.list({
         ...model,
         customer_code: Array.isArray(this.parmValue.customer_code)

+ 7 - 12
src/views/supplierSellOut/supplierSellAfterApply/components/approval-results.vue

@@ -1,7 +1,7 @@
 <template>
   <el-form ref="formRef" class="supplier-form" size="mini" label-width="80px" :model="formData" :rules="rules">
     <el-form-item label="审核状态" prop="status">
-      <el-select v-model="formData.status" style="width:100%">
+      <el-select v-model="formData.status" style="width:100%" :disabled="disbaledStatus">
         <el-option label="不同意供应商审批结果,修改供应商审批结果" value="10" />
         <el-option label="同意供应商审批结果,由业务公司承担" value="11" />
       </el-select>
@@ -48,7 +48,7 @@ export default {
     return {
       company: '',
       formData: {
-        status: '10',
+        status: '11',
         remark: '',
         wsm_code: ''
       },
@@ -62,6 +62,9 @@ export default {
     displayExpressField() {
       return this.formData.status === '11'
     },
+    disbaledStatus() {
+      return this.sitem && this.sitem.order_type === '1'
+    },
     rules() {
       const { status } = this.formData
       return ({
@@ -111,25 +114,17 @@ export default {
       this.formData.wsm_code = code ? [code] : []
       this.$refs.formRef.validateField('wsm_code')
     },
-
     submit() {
       this.$refs.formRef.validate(isValid => {
         if (!isValid) return
-
-        const { status } = this.formData
+        const { status, wsm_code } = this.formData
         let _status = status
-
-        if (this.sitem.is_receive === '0' && status === '11') {
-          _status = '5'
-        }
-
-        const { wsm_code } = this.formData
+        if (this.sitem.is_receive === '0' && status === '11') { _status = '5' }
         const params = {
           ...this.formData,
           status: _status,
           wsm_code: Array.isArray(wsm_code) ? wsm_code[0] : wsm_code
         }
-
         this.$emit('changeStatus', params)
       })
     }

+ 4 - 2
src/views/supplierSellOut/supplierSellAfterApply/detail.vue

@@ -375,10 +375,12 @@ export default {
     },
     // 点击业务审核的保存按钮
     async examForm(e) {
-      console.log(e);
       if (!this.loading) {
-        //通过为9「待供应商审核」,不通过为6「业务已驳回」
         let type = e.state + '' === "1" ? "9" : "6";
+        const { order_type } = this.sitem;
+        const isStock = order_type === "1"
+
+        if(isStock && type === "9") type = "2"
         let message = e.state + '' === "1" ? "提交业务审核" : "提交业务审核";
         await this.statusConfirm(type, message, e.remark);
       }

部分文件因为文件数量过多而无法显示