snow 2 years ago
parent
commit
311d11d134

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/0.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.js


+ 0 - 2
src/apis/service/sellOut/sellAfterApply/index.js

@@ -18,10 +18,8 @@ export default {
   reasonList: (data, params) => http(api + 'resultlist', data, 'post', params),
   // 设置退回仓库
   aftersetwsm: (data, params) => http(api + 'aftersetwsm', data, 'post', params),
-
   // 售后快递录入
   afterPost: (data, params) => http(api + 'afterpost ', data, 'post', params),
   express: (data, params) => http(api + 'setdelivery ', data, 'post', params)
-
 }
 

+ 6 - 3
src/components/globalComponents/search-stock/main.vue

@@ -41,7 +41,8 @@ export default {
     // "companyCode",
     'companyNo', // 业务公司
     'wsmtype',
-    'names'
+    'names',
+    'noRelation'
   ],
   /**
    * 属性集合
@@ -132,8 +133,10 @@ export default {
       // this.formValue.supplierNo = this.companyCode || "";
       this.formValue.companyNo = this.companyNo || ''
       this.formValue.wsm_type = this.wsmtype || ''
-
-      const { code, data, message } = await asyncRequest.list(this.formValue)
+      const { code, data, message } = await asyncRequest.list({
+        ...this.formValue,
+        noRelation: this.noRelation
+      })
 
       if (code === 0) {
         const { list } = data

+ 113 - 110
src/views/sellOut/salesOrder/components/out-order-add-model.vue

@@ -29,8 +29,8 @@
               <el-col :span="12">
                 <el-form-item label="无地址数" prop="wsend_num" required>
                   <el-input
-                    disabled
                     v-model="ruleForm.wsend_num"
+                    disabled
                     maxlength="10"
                     placeholder="无地址数"
                   />
@@ -87,10 +87,13 @@
                 </el-form-item>
               </el-col>
               <el-col :span="24" style="text-align: right">
-                <el-button type="primary" @click="submitForm" :size="'mini'"
-                  >保 存
+                <el-button
+                  type="primary"
+                  :size="'mini'"
+                  @click="submitForm"
+                >保 存
                 </el-button>
-                <el-button @click="showModelThis = false" :size="'mini'">{{
+                <el-button :size="'mini'" @click="showModelThis = false">{{
                   isDetail ? "关 闭" : "取 消"
                 }}</el-button>
               </el-col>
@@ -102,8 +105,8 @@
   </el-dialog>
 </template>
 <script>
-import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
-import resToken from "@/mixins/resToken";
+import asyncRequest from '@/apis/service/sellOut/salesOrder/detail'
+import resToken from '@/mixins/resToken'
 import {
   isnumber,
   isMobile,
@@ -111,71 +114,71 @@ import {
   isEmoticon,
   isSpecialSymbol,
   hasSpace,
-  isAddr,
-} from "@/utils/validate";
+  isAddr
+} from '@/utils/validate'
 export default {
-  name: "Account",
-  props: ["showModel", "id", "sitem"],
+  name: 'Account',
   mixins: [resToken],
+  props: ['showModel', 'id', 'sitem'],
   data() {
     const validateWeight = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("不能为空!"));
+      if (value === '') {
+        callback(new Error('不能为空!'))
       } else {
         if (!isnumber(value)) {
-          callback(new Error("仅支持整数!"));
+          callback(new Error('仅支持整数!'))
         } else {
-          callback();
+          callback()
         }
       }
-    };
+    }
     const validatemobile = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("手机号不能为空!"));
+      if (value === '') {
+        callback(new Error('手机号不能为空!'))
       } else {
         if (!isMobile(value)) {
-          callback(new Error("手机号格式不正确!"));
+          callback(new Error('手机号格式不正确!'))
         } else {
-          callback();
+          callback()
         }
       }
-    };
+    }
     const validatecontactor = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("联系人不能为空!"));
+      if (value === '') {
+        callback(new Error('联系人不能为空!'))
       } else {
         if (value.length < 2 || value.length > 10) {
-          callback(new Error("联系人规则为2~10位汉字!"));
+          callback(new Error('联系人规则为2~10位汉字!'))
         } else {
           if (!isChinese(value)) {
-            callback(new Error("联系人规则为2~10位汉字!"));
+            callback(new Error('联系人规则为2~10位汉字!'))
           } else if (isEmoticon(value)) {
-            callback(new Error("联系人规则为2~10位汉字!"));
+            callback(new Error('联系人规则为2~10位汉字!'))
           } else {
-            callback();
+            callback()
           }
         }
       }
-    };
+    }
     const validateAddr = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("详细地址不能为空!"));
+      if (value === '') {
+        callback(new Error('详细地址不能为空!'))
       } else {
         if (hasSpace(value)) {
-          callback(new Error("不能出现/回车/换行符!"));
+          callback(new Error('不能出现/回车/换行符!'))
         } else if (isSpecialSymbol(value)) {
-          callback(new Error("不能使用英文特殊字符!"));
+          callback(new Error('不能使用英文特殊字符!'))
         } else if (isAddr(value)) {
-          callback();
+          callback()
         } else {
-          callback(new Error("详细地址填写不规范!"));
+          callback(new Error('详细地址填写不规范!'))
         }
       }
-    };
+    }
     return {
       roleList: [],
       loading: false,
-      title: "新建发货申请单",
+      title: '新建发货申请单',
       showModelThis: this.showModel,
       rulesThis: {},
       rules: {
@@ -183,144 +186,144 @@ export default {
           {
             required: true,
             validator: validateWeight,
-            trigger: "blur",
-          },
+            trigger: 'blur'
+          }
         ],
 
         contactor: [
           {
             required: true,
-            trigger: "blur",
-            validator: validatecontactor,
-          },
+            trigger: 'blur',
+            validator: validatecontactor
+          }
         ],
         mobile: [
           {
             required: true,
             validator: validatemobile,
-            trigger: "blur",
-          },
+            trigger: 'blur'
+          }
         ],
 
         addr_code: [
           {
-            type: "array",
+            type: 'array',
             required: true,
-            message: "收货省市区不能为空",
-            trigger: "change",
-          },
+            message: '收货省市区不能为空',
+            trigger: 'change'
+          }
         ],
         addr: [
           {
             required: true,
             validator: validateAddr,
-            trigger: "blur",
-          },
-        ],
+            trigger: 'blur'
+          }
+        ]
       },
       ruleForm: {
-        orderCode: "",
-        wsend_num: "",
-        send_num: "",
-        contactor: "",
-        mobile: "",
+        orderCode: '',
+        wsend_num: '',
+        send_num: '',
+        contactor: '',
+        mobile: '',
         addr_code: [],
-        addr: "",
-        id: "",
-      },
-    };
+        addr: '',
+        id: ''
+      }
+    }
   },
   watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
+    showModel: function(val) {
+      this.showModelThis = val
       if (val) {
-        this.initForm();
+        this.initForm()
       }
     },
     showModelThis(val) {
       if (!val) {
-        this.$emit("cancel");
+        this.$emit('cancel')
       }
-    },
+    }
   },
   methods: {
     closeModel() {
-      console.log("closeModel!!");
-      this.showModelThis = false;
-      this.$emit("closeModel");
+      console.log('closeModel!!')
+      this.showModelThis = false
+      this.$emit('closeModel')
     },
 
     async initForm() {
-      this.loading = true;
-      this.rulesThis = this.rules;
-      await this.resetForm();
-      this.loading = false;
+      this.loading = true
+      this.rulesThis = this.rules
+      await this.resetForm()
+      this.loading = false
     },
 
-    //初始化表单
+    // 初始化表单
     async resetForm() {
       await this.$nextTick(() => {
         if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          const { orderCode, good_num, addr_sum } = this.sitem;
-          const sum = parseInt(good_num + "") - parseInt(addr_sum + "");
+          this.$refs.ruleForm.resetFields()
+          this.$refs.ruleForm.clearValidate()
+          const { orderCode, good_num, addr_sum } = this.sitem
+          const sum = parseInt(good_num + '') - parseInt(addr_sum + '')
           this.ruleForm = {
-            orderCode: orderCode || "",
-            wsend_num: sum || "0",
-            send_num: sum || "0",
-            contactor: "",
-            mobile: "",
-            addr: "",
-            addr_code: [],
-          };
+            orderCode: orderCode || '',
+            wsend_num: sum || '0',
+            send_num: sum || '0',
+            contactor: '',
+            mobile: '',
+            addr: '',
+            addr_code: []
+          }
         }
-      });
+      })
     },
-    //省市区选择
+    // 省市区选择
     async select_area_change(e) {
-      this.ruleForm.addr_code = e;
-      this.$refs.ruleForm.validateField("addr_code");
+      this.ruleForm.addr_code = e
+      this.$refs.ruleForm.validateField('addr_code')
     },
     // 保存更改
     async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
+      await this.$refs.ruleForm.validate(async(valid) => {
         if (valid) {
           if (this.loading) {
-            return;
+            return
           }
-          this.loading = true;
-          let model = JSON.parse(JSON.stringify(this.ruleForm));
-          model.addr_code = model.addr_code.toString();
-          const res = await asyncRequest.saleout(model);
-          this.loading = false;
+          this.loading = true
+          const model = JSON.parse(JSON.stringify(this.ruleForm))
+          model.addr_code = model.addr_code.toString()
+          const res = await asyncRequest.saleout(model)
+          this.loading = false
           if (res && res.code === 0) {
             this.$notify.success({
-              title: "添加成功",
-              message: "",
-            });
-            this.showModelThis = false;
-            this.$emit("refresh");
+              title: '添加成功',
+              message: ''
+            })
+            this.showModelThis = false
+            this.$emit('refresh')
           } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
+            await this.logout()
           } else {
-            this.$message.warning(res.message);
+            this.$message.warning(res.message)
           }
         } else {
-          console.log("error submit!!");
-          return false;
+          console.log('error submit!!')
+          return false
         }
-      });
+      })
     },
     handleCompany(e) {
-      console.log(e);
+      console.log(e)
       if (e && e.code) {
-        this.ruleForm.post_name = [e.shortName];
+        this.ruleForm.post_name = [e.shortName]
       }
-      this.$refs.ruleForm.validateField("post_name");
-    },
-  },
-};
+      this.$refs.ruleForm.validateField('post_name')
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>

+ 126 - 0
src/views/sellOut/sellAfterApply/components/wait-return.vue

@@ -0,0 +1,126 @@
+<template>
+  <el-form ref="formRef" class="supplier-form" size="mini" label-width="80px" :model="formData" :rules="rules">
+    <el-form-item label="是否退货" prop="is_th">
+      <el-select v-model="formData.is_th" style="width:100%">
+        <el-option label="是" value="1" />
+        <el-option label="否" value="2" />
+      </el-select>
+    </el-form-item>
+
+    <template v-if="displayExpressField">
+      <el-form-item label="物流公司" prop="company">
+        <search-express
+          :value="formData.company"
+          :placeholder="'物流公司'"
+          :names="''"
+          :order_source="order_source"
+          :is-detail="false"
+          size="mini"
+          @searchChange="handleCompany"
+        />
+      </el-form-item>
+
+      <el-form-item label="物流单号" prop="post_code">
+        <el-input v-model="formData.post_code" placeholder="物流单号" />
+      </el-form-item>
+
+      <el-form-item label="物流费用" prop="post_fee">
+        <el-input v-model="formData.post_fee" placeholder="物流费用" />
+      </el-form-item>
+    </template>
+
+    <el-form-item>
+      <div style="width:100%;display:flex;justify-content:flex-end">
+        <el-button type="primary" @click="submit">提交</el-button>
+      </div>
+    </el-form-item>
+  </el-form>
+</template>
+<script>
+export default {
+  name: 'SupplierExam',
+  mixins: [],
+  props: [],
+  data() {
+    return {
+      company: '',
+      formData: {
+        is_th: '1',
+        company: '',
+        post_fee: '',
+        post_code: ''
+      },
+      statusOptions: [
+        { value: '4', label: '通过' }, // -> 待客户退货
+        { value: '2', label: '驳回' } // -> 待采购审核
+      ]
+    }
+  },
+  computed: {
+    displayExpressField() {
+      return this.formData.is_th === '1'
+    },
+    rules() {
+      return ({
+        company: [
+          {
+            type: 'array',
+            required: true,
+            trigger: 'change',
+            message: '请选择物流公司'
+          }
+        ],
+        post_code: [
+          {
+            required: true,
+            trigger: 'change',
+            message: '请输入物流单号'
+          }
+        ],
+        post_fee: [
+          {
+            required: true,
+            trigger: 'change',
+            message: '请输入快递费用'
+          }
+        ]
+      })
+    }
+  },
+  mounted() {
+  },
+  methods: {
+    handleCompany(e) {
+      if (e && e.code) {
+        this.company = e.label
+        this.formData.company = [e.code]
+      }
+      this.$refs.formRef.validateField('company')
+    },
+    addr_selectChange(e) {
+      this.formData.addr_code = e || []
+      this.$refs.formRef.validateField('addr_code')
+    },
+    submit() {
+      this.$refs.formRef.validate(isValid => {
+        if (!isValid) return
+
+        const params = {
+          ...this.formData,
+          company: this.company
+        }
+
+        this.$emit('changeStatus', params)
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.supplier-form{
+  ::v-deep(.el-form-item){
+    width: 400px;
+  }
+}
+</style>

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

@@ -257,11 +257,13 @@ export default {
   },
   methods: {
     async handleSupplierExam(data){
-      let res = await asyncRequest.status({
-        ...data,
-        returnCode: this.code
-      });
-      
+      const model = {
+        remark,
+        returnCode: this.code,
+        status: type,
+      };
+      let res = await asyncRequest.status(model);
+
       if (res && res.code === 0) {
         this.$notify.success({
           title: "修改成功!",

+ 38 - 41
src/views/sellOut/sellReturn/columns.js

@@ -5,45 +5,45 @@ export default [
   //   width:"160"
   // },
   {
-    prop: "returnCode",
-    label: "退货单编号",
-    width: "160"
+    prop: 'returnCode',
+    label: '退货单编号',
+    width: '160'
   },
   {
-    prop: "orderCode",
-    label: "销售订单编号",
-    width: "160"
+    prop: 'orderCode',
+    label: '销售订单编号',
+    width: '160'
   },
   {
-    prop: "status",
-    label: "状态",
-    _slot_: "status",
-    width: "120px",
+    prop: 'status',
+    label: '状态',
+    _slot_: 'status',
+    width: '160px'
   },
   {
-    prop: "good_code",
-    label: "商品成本编码",
-    width: "160"
+    prop: 'good_code',
+    label: '商品成本编码',
+    width: '160'
   },
   {
-    prop: "skuCode",
-    label: "上线商品编码",
-    width: "160"
+    prop: 'skuCode',
+    label: '上线商品编码',
+    width: '160'
   },
   {
-    prop: "good_name",
-    label: "商品名称",
-    'min-width': "180"
+    prop: 'good_name',
+    label: '商品名称',
+    'min-width': '180'
   },
   {
-    prop: "num",
-    label: "退货数量",
-    width: "110"
+    prop: 'num',
+    label: '退货数量',
+    width: '110'
   },
   {
-    prop: "total_num",
-    label: "订单总数",
-    width: "110"
+    prop: 'total_num',
+    label: '订单总数',
+    width: '110'
   },
   // {
   //   prop: "error_msg",
@@ -51,38 +51,35 @@ export default [
   //   width: "160"
   // },
 
-
-
-
   // {
   //   prop: "return_total",
   //   label: "退货总金额",
   //   width: "120"
   // },
   {
-    prop: "company_name",
-    label: "申请人部门",
-    minWidth: "150px",
+    prop: 'company_name',
+    label: '申请人部门',
+    minWidth: '150px'
   },
   {
-    prop: "apply_name",
-    label: "申请人",
-    width: "70"
+    prop: 'apply_name',
+    label: '申请人',
+    width: '70'
   },
   {
-    prop: "addtime",
-    label: "申请时间",
+    prop: 'addtime',
+    label: '申请时间',
     sortable: true,
     width: 150
   },
   {
-    prop: "",
+    prop: '',
     width: 50,
-    label: "操作",
-    fixed: "right",
+    label: '操作',
+    fixed: 'right',
     _noset_: true,
-    _slot_: "operation",
-  },
+    _slot_: 'operation'
+  }
 
 ]
 // page	是	string	页码

+ 132 - 130
src/views/sellOut/sellReturn/components/addForm.vue

@@ -2,10 +2,10 @@
   <el-row :gutter="10">
     <el-col :span="24">
       <el-form
+        ref="ruleForm"
         :model="ruleForm"
         status-icon
         :rules="rulesThis"
-        ref="ruleForm"
         :size="'mini'"
         label-width="80px"
         class="demo-ruleForm"
@@ -20,18 +20,16 @@
                 :size="'mini'"
                 @searchChange="errorCode_change"
               />
-            </el-form-item> </el-col
-          ><el-col :span="16">
+            </el-form-item> </el-col><el-col :span="16">
             <el-form-item label="退货备注" prop="remark">
               <el-input
+                v-model="ruleForm.remark"
                 :disabled="isDetail"
                 type="textarea"
                 maxlength="250"
                 show-word-limit
                 placeholder="请填写备注"
-                v-model="ruleForm.remark"
-              /> </el-form-item></el-col
-        ></el-row>
+              /> </el-form-item></el-col></el-row>
 
         <el-form-item label="收货信息" :size="'mini'" required>
           <el-table
@@ -50,8 +48,7 @@
                 {{ scope.row.contactor }}-{{ scope.row.mobile }}-{{
                   scope.row.addr_info
                 }}{{ scope.row.addr }}
-              </template></el-table-column
-            >
+              </template></el-table-column>
             <el-table-column
               label="收货总数量"
               prop="receipt_quantity"
@@ -62,8 +59,8 @@
               <template slot-scope="scope">
                 <el-form-item style="margin: 0" :size="'mini'">
                   <el-input-number
-                    size="mini"
                     v-model="scope.row.return_num"
+                    size="mini"
                     :disabled="!scope.row.edit"
                     :min="0"
                     :max="scope.row.wsend_num"
@@ -78,27 +75,27 @@
             <el-table-column fixed="right" label="操作" width="50">
               <template slot-scope="scope">
                 <el-tooltip
+                  v-if="!scope.row.edit"
                   effect="dark"
                   content="编辑"
-                  v-if="!scope.row.edit"
                   placement="top"
                 >
                   <i
                     class="el-icon-edit tb-icon"
                     @click="editRow(scope.$index, 1)"
-                  ></i>
+                  />
                 </el-tooltip>
 
                 <el-tooltip
+                  v-if="scope.row.edit"
                   effect="dark"
                   content="保存"
-                  v-if="scope.row.edit"
                   placement="top"
                 >
                   <i
                     class="el-icon-circle-check tb-icon"
                     @click="checkRow(scope.$index, 1)"
-                  ></i>
+                  />
                 </el-tooltip>
               </template>
             </el-table-column>
@@ -107,206 +104,211 @@
       </el-form>
     </el-col>
     <el-col :span="24" style="text-align: right">
-      <el-button type="primary" @click="submitForm" :size="'mini'"
-        >保 存
+      <el-button
+        type="primary"
+        :size="'mini'"
+        @click="submitForm"
+      >保 存
       </el-button>
-      <el-button @click="showModelThis = false" v-if="!isDetail" :size="'mini'"
-        >关 闭</el-button
-      >
+      <el-button
+        v-if="!isDetail"
+        :size="'mini'"
+        @click="showModelThis = false"
+      >关 闭</el-button>
     </el-col>
   </el-row>
 </template>
 
-   <script>
-import asyncRequest from "@/apis/service/sellOut/sellReturn";
-import resToken from "@/mixins/resToken";
-import { isnumber } from "@/utils/validate";
+<script>
+import asyncRequest from '@/apis/service/sellOut/sellReturn'
+import resToken from '@/mixins/resToken'
+import { isnumber } from '@/utils/validate'
 export default {
-  name: "sellReturn",
-  props: ["showModel", "id", "isDetail", "sitem", "showModelThis", "newTime"],
+  name: 'SellReturn',
   mixins: [resToken],
+  props: ['showModel', 'id', 'isDetail', 'sitem', 'showModelThis', 'newTime'],
   data() {
     return {
       loading: false,
       showModelThis: this.showModel,
       ruleForm: {
-        orderCode: "", //发货申请单编号
-        remark: "", //退货备注
-        errorCode: "", //退货原因
+        orderCode: '', // 发货申请单编号
+        remark: '', // 退货备注
+        errorCode: '' // 退货原因
       },
       rulesThis: this.rules,
       rules: {
         errorCode: [
           {
             required: true,
-            message: "请选择退货原因",
-            trigger: "change",
-          },
+            message: '请选择退货原因',
+            trigger: 'change'
+          }
         ],
         remark: [
           {
             required: true,
-            message: "请输入退货备注",
-            trigger: "blur",
-          },
-        ],
+            message: '请输入退货备注',
+            trigger: 'blur'
+          }
+        ]
       },
       tableForm: {
-        get_product_go: [],
-      },
-    };
-  },
-  mounted() {
-    this.initForm();
+        get_product_go: []
+      }
+    }
   },
   watch: {
-    newTime: function (val) {
+    newTime: function(val) {
       if (val) {
-        this.initForm();
+        this.initForm()
       }
-    },
+    }
+  },
+  mounted() {
+    this.initForm()
   },
 
   methods: {
     errorCode_change(e) {
-      this.ruleForm.errorCode = e && e.code ? e.code : "";
-      this.$refs.ruleForm.validateField("errorCode");
+      this.ruleForm.errorCode = e && e.code ? e.code : ''
+      this.$refs.ruleForm.validateField('errorCode')
     },
     async initForm() {
-      this.loading = true;
-      this.rulesThis = this.rules;
-      await this.resetForm();
-      this.loading = false;
+      this.loading = true
+      this.rulesThis = this.rules
+      await this.resetForm()
+      this.loading = false
     },
     async resetForm() {
       // 重置
       await this.$nextTick(() => {
         if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          const { info, addrs, orderCode } = this.sitem;
-          console.log(this.sitem);
-          let list =
-            info && info.length > 0 ? JSON.parse(JSON.stringify(info)) : []; //
+          this.$refs.ruleForm.resetFields()
+          this.$refs.ruleForm.clearValidate()
+          const { info, addrs, orderCode } = this.sitem
+          console.log(this.sitem)
+          const list =
+            info && info.length > 0 ? JSON.parse(JSON.stringify(info)) : [] //
           list.map((v) => {
-            v.edit = false;
-            v.return_num = v.return_num || "0";
-            return v;
-          });
-          let l_list =
-            addrs && addrs.length > 0 ? JSON.parse(JSON.stringify(addrs)) : [];
+            v.edit = false
+            v.return_num = v.return_num || '0'
+            return v
+          })
+          const l_list =
+            addrs && addrs.length > 0 ? JSON.parse(JSON.stringify(addrs)) : []
           l_list.map((ele) => {
-            ele.edit = false;
-            ele.return_num = ele.return_num || "0";
-            return ele;
-          });
+            ele.edit = false
+            ele.return_num = ele.return_num || '0'
+            return ele
+          })
           this.ruleForm = {
-            orderCode: orderCode || "",
-            remark: "", //退货备注
-            errorCode: "", //退货原因
-          };
+            orderCode: orderCode || '',
+            remark: '', // 退货备注
+            errorCode: '' // 退货原因
+          }
           this.tableForm = {
-            get_product_go: [].concat(...l_list),
-          };
+            get_product_go: [].concat(...l_list)
+          }
         }
-      });
+      })
     },
 
     async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
+      await this.$refs.ruleForm.validate(async(valid) => {
         if (valid) {
           if (this.loading) {
-            return;
+            return
           }
-          this.loading = true;
-          let model = JSON.parse(JSON.stringify(this.ruleForm));
-          let arr1 = JSON.parse(JSON.stringify(this.tableForm.get_product_go));
-          let wsm_code_edit = false,
-            addr_edit = false,
-            wsm_code_total = 0,
-            addr_total = 0;
+          this.loading = true
+          const model = JSON.parse(JSON.stringify(this.ruleForm))
+          const arr1 = JSON.parse(JSON.stringify(this.tableForm.get_product_go))
+          const wsm_code_edit = false
+          let addr_edit = false
+          const wsm_code_total = 0
+          let addr_total = 0
 
-          let addr = [];
+          const addr = []
           arr1.forEach((e) => {
             if (e.edit) {
-              addr_edit = true;
+              addr_edit = true
             }
-            let obj = {
+            const obj = {
               addrid: e.id,
-              return_num: e.return_num,
-            };
-            addr_total += e.return_num;
-            addr.push(obj);
-          });
-          model.addr = addr;
+              return_num: e.return_num
+            }
+            addr_total += e.return_num
+            addr.push(obj)
+          })
+          model.addr = addr
           if (wsm_code_edit) {
-            this.$message.warning("仓库信息正在编辑,请保存后再试!");
-            this.loading = false;
-            return;
+            this.$message.warning('仓库信息正在编辑,请保存后再试!')
+            this.loading = false
+            return
           }
           if (addr_edit) {
-            this.$message.warning("地址信息正在编辑,请保存后再试!");
-            this.loading = false;
-            return;
+            this.$message.warning('地址信息正在编辑,请保存后再试!')
+            this.loading = false
+            return
           }
           if (wsm_code_total !== addr_total) {
-            this.$message.warning("仓库退货总数不等于收货地址总数!");
-            this.loading = false;
-            return;
+            this.$message.warning('仓库退货总数不等于收货地址总数!')
+            this.loading = false
+            return
           }
-          let res = await asyncRequest.add(model);
-          this.loading = false;
+          const res = await asyncRequest.add(model)
+          this.loading = false
           if (res && res.code === 0) {
-            const title = this.id === "add" ? "添加成功" : "修改成功";
+            const title = this.id === 'add' ? '添加成功' : '修改成功'
             this.$notify.success({
               title,
-              message: "",
-            });
-            this.showModelThis = false;
+              message: ''
+            })
+            this.showModelThis = false
             // 刷新
-            this.$emit("refresh", false);
+            this.$emit('refresh', false)
           } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
+            await this.logout()
           } else {
-            this.$message.warning(res.message);
+            this.$message.warning(res.message)
           }
         } else {
-          console.log("error submit!!");
-          return false;
+          console.log('error submit!!')
+          return false
         }
-      });
+      })
     },
-    //保存某一行
+    // 保存某一行
     checkRow(rowIndex, type) {
       if (type === 1) {
         const { wsend_num, return_num } =
-          this.tableForm.get_product_go[rowIndex];
+          this.tableForm.get_product_go[rowIndex]
         if (!isnumber(return_num)) {
-          this.$message.warning("退货数量不规范!");
-          return;
+          this.$message.warning('退货数量不规范!')
+          return
         }
         if (parseInt(wsend_num) < parseInt(return_num)) {
-          this.$message.warning("退货数量不能大于未发货总数量!");
-          return;
+          this.$message.warning('退货数量不能大于未发货总数量!')
+          return
         }
-        this.tableForm.get_product_go[rowIndex].edit = false;
+        this.tableForm.get_product_go[rowIndex].edit = false
       }
     },
-    //编辑某一行
+    // 编辑某一行
     editRow(rowIndex, type) {
-      let list = JSON.parse(JSON.stringify(this.tableForm.get_product_go));
-      let index = list.findIndex((v) => {
-        v.edit;
-      });
+      const list = JSON.parse(JSON.stringify(this.tableForm.get_product_go))
+      const index = list.findIndex((v) => {
+        v.edit
+      })
       if (index !== -1) {
-        this.$message.warning("请完成其他行的编辑!");
-        return;
+        this.$message.warning('请完成其他行的编辑!')
+        return
       }
-      this.tableForm.get_product_go[rowIndex].edit = true;
-    },
-  },
-};
+      this.tableForm.get_product_go[rowIndex].edit = true
+    }
+  }
+}
 </script>
 
 <style>
-</style>
+</style>

+ 135 - 0
src/views/sellOut/sellReturn/components/approval-results.vue

@@ -0,0 +1,135 @@
+<template>
+  <el-form ref="formRef" class="supplier-form" size="mini" label-width="130px" :model="formData" :rules="rules">
+    <el-form-item label="审核状态" prop="status">
+      <el-select v-model="formData.status" style="width:100%">
+        <el-option label="修改供应商审批结果,需供应商确认" value="10" />
+        <el-option label="认同供应商审批结果,并设置业务公司退回仓库" value="4" />
+      </el-select>
+    </el-form-item>
+
+    <el-form-item label="审核备注" prop="remark">
+      <el-input v-model="formData.remark" />
+    </el-form-item>
+
+    <template v-if="displayExpressField">
+      <el-form-item label="退回至" prop="return_wsm">
+        <search-stock
+          :size="'mini'"
+          :value="formData.return_wsm"
+          placeholder="退货仓库"
+          :is-detail="true"
+          :is-relation="true"
+          :names="wsm_code_name"
+          :company-no="currentCompany"
+          @searchChange="stockChange"
+        />
+      </el-form-item>
+
+      <el-form-item label="">
+        <el-input v-model="expressInfo" placeholder="退货仓库收货信息展示" disabled />
+      </el-form-item>
+    </template>
+
+    <el-form-item>
+      <div style="width:100%;display:flex;justify-content:flex-end">
+        <el-button type="primary" @click="submit">提交</el-button>
+      </div>
+    </el-form-item>
+  </el-form>
+</template>
+<script>
+import companyHelper from '@/mixins/companyHelper'
+export default {
+  name: 'ApprovalResults',
+  mixins: [companyHelper],
+  props: [],
+  data() {
+    return {
+      company: '',
+      formData: {
+        status: '10',
+        remark: '',
+        return_wsm: ''
+      },
+      wsm_code: '',
+      wsm_name: '',
+      expressInfo: ''
+    }
+  },
+  computed: {
+    displayExpressField() {
+      return this.formData.status === '4'
+    },
+    rules() {
+      const { status } = this.formData
+      return ({
+        return_wsm: [
+          {
+            type: 'array',
+            required: true,
+            trigger: 'change',
+            message: '请选择退货仓库'
+          }
+        ],
+        status: [
+          {
+            required: true,
+            trigger: 'change',
+            message: '请选择退货仓库'
+          }
+        ],
+        remark: [
+          {
+            required: status === '10',
+            trigger: 'change',
+            message: '请输入审核备注'
+          }
+        ]
+      })
+    }
+  },
+  watch: {
+    'formData.status'(status) {
+      // this
+      this.formData = {
+        status,
+        remark: '',
+        return_wsm: ''
+      }
+    }
+  },
+  mounted() {
+  },
+  methods: {
+    async stockChange(e) {
+      const { code, label, contactor, mobile, addr_cn } = e
+      this.expressInfo = `${contactor}-${mobile}-${addr_cn}`
+      this.wsm_name = label || ''
+      this.wsm_code = code || ''
+      this.formData.return_wsm = code ? [code] : []
+      this.$refs.formRef.validateField('return_wsm')
+    },
+    submit() {
+      this.$refs.formRef.validate(isValid => {
+        if (!isValid) return
+        const { return_wsm } = this.formData
+
+        const params = {
+          ...this.formData,
+          return_wsm: Array.isArray(return_wsm) ? return_wsm[0] : return_wsm
+        }
+
+        this.$emit('changeStatus', params)
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.supplier-form{
+  ::v-deep(.el-form-item){
+    width: 500px;
+  }
+}
+</style>

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

@@ -170,6 +170,35 @@
             </el-collapse-item>
 
             <el-collapse-item
+              title="供应商审核"
+              name="4"
+              v-if="
+                newTime !== '' &&
+                sitem &&
+                !(
+                  (sitem.order_type + '' === '1' || sitem.order_type + '' === '2') &&
+                  is_stock + '' === '1'
+                ) &&
+                ppowers.some((i) => i == '1') &&
+                status + '' === '9'
+              "
+            >
+              <exam-form
+                v-if="newTime"
+                :statusList="statusList"
+                :newTime="newTime"
+                :disabled="false"
+                :isMust="false"
+                @searchChange="examForm_supplier"
+              />
+            </el-collapse-item>
+
+
+            <el-collapse-item title="供应商已驳回,待采购审核" name="5" v-if="status + '' === '8'">
+              <approval-results />
+            </el-collapse-item>
+
+            <!-- <el-collapse-item
               title="采购专员审批"
               name="4"
               v-if="
@@ -194,7 +223,8 @@
                 :isMust="false"
                 @refresh="initData"
               />
-            </el-collapse-item>
+            </el-collapse-item> -->
+<!-- 
             <el-collapse-item
               title="采购主管审批"
               name="5"
@@ -216,7 +246,7 @@
                 :isMust="false"
                 @searchChange="dirExamForm"
               />
-            </el-collapse-item>
+            </el-collapse-item> -->
           </el-collapse>
         </el-tab-pane>
         <el-tab-pane label="审批记录" name="2">
@@ -244,6 +274,7 @@ import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/sellReturn";
 // import ReturnCheck from "./components/returnCheck";
 import comExamForm from "./components/comExamForm";
+import ApprovalResults from "./components/approval-results.vue";
 import { showColumns } from "./components/ShowDataTableColumns";
 import { xs_order_type_options } from "@/assets/js/statusList";
 export default {
@@ -251,6 +282,7 @@ export default {
   mixins: [mixinPage, resToken],
   components: {
     comExamForm,
+    ApprovalResults
     // ReturnCheck,
   },
   computed: {
@@ -274,12 +306,22 @@ export default {
       activeTabs: "1",
       showColumns: showColumns,
       statusOptions: [
+        // { value: "1", label: "待业务审批" },
+        // { value: "2", label: "待专员审批" },
+        // { value: "3", label: "待主管审批" },
+        // { value: "4", label: "退货完成" },
+        // { value: "5", label: "业务驳回" },
+        // { value: "6", label: "采购驳回" },
+        // { value: "7", label: "专员审批不通过" },
         { value: "1", label: "待业务审批" },
         { value: "2", label: "待专员审批" },
         { value: "3", label: "待主管审批" },
         { value: "4", label: "退货完成" },
         { value: "5", label: "业务驳回" },
-        { value: "6", label: "采购驳回" },
+        // { value: "6", label: "采购驳回" }, // 废弃
+        { value: '8', label:'供应商驳回,待采购审核'},
+        { value: '9', label:'待供应商确认'},
+        { value: '10', label:'业务公司修改待供应商确认'},
         { value: "7", label: "专员审批不通过" },
       ],
       xs_order_type_options,
@@ -331,7 +373,14 @@ export default {
     // 点击业务审核的保存按钮
     async examForm(e) {
       if (!this.loading) {
-        let type = e.state + '' === "1" ? "2" : "5";
+        let type = e.state + '' === "1" ? "9" : "5";
+        let message = e.state + '' === "1" ? "提交审核结果" : "提交审核结果";
+        await this.statusConfirm(type, message, e.remark);
+      }
+    },
+    async examForm_supplier(e){
+      if (!this.loading) {
+        let type = e.state + '' === "1" ? "4" : "8";
         let message = e.state + '' === "1" ? "提交审核结果" : "提交审核结果";
         await this.statusConfirm(type, message, e.remark);
       }
@@ -339,7 +388,7 @@ export default {
     // 点击采购主管审核的保存按钮
     async dirExamForm(e) {
       if (!this.loading) {
-        let type = e.state + '' === "1" ? "4" : "2";
+        let type = e.state + '' === "1" ? "4" : "8";
         let message = e.state + '' === "1" ? "提交审核结果" : "提交审核结果";
         await this.statusConfirm(type, message, e.remark);
       }

+ 18 - 8
src/views/sellOut/sellReturn/index.vue

@@ -128,7 +128,7 @@
             :size="tablebtnSize"
             :type="scope.row.status == '0' ? 'warning' : ''"
             v-text="
-              (statusOptions.find((item) => item.id == scope.row.status) || {})
+              (statusOptions.find((item) => item.value == scope.row.status) || {})
                 .label || '--'
             "
           ></el-tag>
@@ -181,13 +181,23 @@ export default {
       sitem: null,
       // 状态
       statusOptions: [
-        { id: "1", label: "待业务审批" },
-        { id: "2", label: "待专员审批" },
-        { id: "3", label: "待主管审批" },
-        { id: "4", label: "退货完成" },
-        { id: "5", label: "业务驳回" },
-        { id: "6", label: "采购驳回" },
-        { id: "7", label: "专员审批不通过" },
+        // { value: "1", label: "待业务审批" },
+        // { value: "2", label: "待专员审批" },
+        // { value: "3", label: "待主管审批" },
+        // { value: "4", label: "退货完成" },
+        // { value: "5", label: "业务驳回" },
+        // { value: "6", label: "采购驳回" },
+        // { value: "7", label: "专员审批不通过" },
+        { value: "1", label: "待业务审批" },
+        { value: "2", label: "待专员审批" },
+        { value: "3", label: "待主管审批" },
+        { value: "4", label: "退货完成" },
+        { value: "5", label: "业务驳回" },
+        { value: "6", label: "采购驳回" }, // 废弃
+        { value: "7", label: "专员审批不通过" },
+        { value: '8', label:'供应商驳回,待采购审核'},
+        { value: '9', label:'待供应商确认'},
+        { value: '10', label:'业务公司修改待供应商确认'},
       ],
       loading: false,
       showModel: false,

+ 2 - 1
src/views/stock/allot/components/addForm.vue

@@ -76,7 +76,7 @@
                 :is-detail="id !== 'add'"
                 :placeholder="'业务公司'"
                 @searchChange="supplierChange($event, 'in_companyNo')"
-              />
+              /> 
             </el-form-item>
             <!-- <el-form-item label="公司" prop="supplier_in_code">
               <search-supplier
@@ -95,6 +95,7 @@
               <search-stock
                 :value="ruleForm.stock_in_code"
                 :isDetail="id !== 'add'"
+                :noRelation="true"
                 :size="'mini'"
                 :disabled="
                   !(

+ 30 - 18
src/views/supplierSellOut/sellAfterApply/components/wait-return.vue

@@ -1,24 +1,33 @@
 <template>
   <el-form ref="formRef" class="supplier-form" size="mini" label-width="80px" :model="formData" :rules="rules">
-    <el-form-item label="物流公司" prop="company">
-      <search-express
-        :value="formData.company"
-        :placeholder="'物流公司'"
-        :names="''"
-        :order_source="order_source"
-        :is-detail="false"
-        size="mini"
-        @searchChange="handleCompany"
-      />
+    <el-form-item label="是否退货" prop="is_th">
+      <el-select v-model="formData.is_th" style="width:100%">
+        <el-option label="是" value="1" />
+        <el-option label="否" value="2" />
+      </el-select>
     </el-form-item>
 
-    <el-form-item label="物流单号" prop="post_code">
-      <el-input v-model="formData.post_code" placeholder="物流单号" />
-    </el-form-item>
+    <template v-if="displayExpressField">
+      <el-form-item label="物流公司" prop="company">
+        <search-express
+          :value="formData.company"
+          :placeholder="'物流公司'"
+          :names="''"
+          :order_source="order_source"
+          :is-detail="false"
+          size="mini"
+          @searchChange="handleCompany"
+        />
+      </el-form-item>
 
-    <el-form-item label="物流费用" prop="post_fee">
-      <el-input v-model="formData.post_fee" placeholder="物流费用" />
-    </el-form-item>
+      <el-form-item label="物流单号" prop="post_code">
+        <el-input v-model="formData.post_code" placeholder="物流单号" />
+      </el-form-item>
+
+      <el-form-item label="物流费用" prop="post_fee">
+        <el-input v-model="formData.post_fee" placeholder="物流费用" />
+      </el-form-item>
+    </template>
 
     <el-form-item>
       <div style="width:100%;display:flex;justify-content:flex-end">
@@ -34,7 +43,9 @@ export default {
   props: [],
   data() {
     return {
+      company: '',
       formData: {
+        is_th: '1',
         company: '',
         post_fee: '',
         post_code: ''
@@ -47,7 +58,7 @@ export default {
   },
   computed: {
     displayExpressField() {
-      return this.formData.status === '4'
+      return this.formData.is_th === '1'
     },
     rules() {
       return ({
@@ -81,6 +92,7 @@ export default {
   methods: {
     handleCompany(e) {
       if (e && e.code) {
+        this.company = e.label
         this.formData.company = [e.code]
       }
       this.$refs.formRef.validateField('company')
@@ -95,7 +107,7 @@ export default {
 
         const params = {
           ...this.formData,
-          company: this.formData.company[0]
+          company: this.company
         }
 
         this.$emit('changeStatus', params)

+ 2 - 1
src/views/supplierSellOut/sellAfterApply/detail.vue

@@ -266,7 +266,7 @@ export default {
     this.initData();
   },
   methods: {
-    async handleExpress(){
+    async handleExpress(data){
       let res = await asyncRequest.express({
         ...data,
         returnCode: this.code
@@ -284,6 +284,7 @@ export default {
         this.$message.warning(res.message);
       }
     },
+    
     async handleSupplierExam(data){
       let res = await asyncRequest.status({
         ...data,

+ 2 - 2
src/views/supplierSellOut/sellOutOrder/detail.vue

@@ -358,7 +358,7 @@
   </div>
 </template>
 <script>
-import mixinPage from "@/mixins/elPaginationHandle";
+import mixinPage from "@/mixins/elPaginationHandle";  
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/sellOutOrder";
 import { showColumns } from "./columns";
@@ -384,7 +384,7 @@ export default {
     powers() {
       const tran =
         this.$store.getters.btnList.find(
-          (item) => item.menu_route == "sellOutOrderDetail"
+          (item) => item.menu_route == "supplierSellOutOrderDetail"
         ) || {};
       const { action } = tran ?? {};
       return action ?? [];

+ 2 - 2
src/views/supplierSellOut/sellOutOrder/index.vue

@@ -225,7 +225,7 @@
           >
             <i
               class="el-icon-view tb-icon"
-              @click="getRouter('sellOutOrderDetail', scope.row.outCode)"
+              @click="getRouter('supplierSellOutOrderDetail', scope.row.outCode)"
             ></i>
           </el-tooltip>
           <el-tooltip
@@ -272,7 +272,7 @@ export default {
     ...mapGetters(["tablebtnSize", "searchSize", "size", "isSupertube"]),
     powers() {
       const tran =
-        this.$store.getters.btnList.find((item) => item.menu_route == "sellOutOrder") ||
+        this.$store.getters.btnList.find((item) => item.menu_route == "supplierSellOutOrder") ||
         {};
       const { action } = tran ?? {};
       return action ?? [];

Some files were not shown because too many files changed in this diff