Browse Source

Merge branch 'company' into v3.0

xiaodai2022 1 year ago
parent
commit
cbaf11a982
40 changed files with 5202 additions and 34 deletions
  1. 0 0
      dist/static/js/0.js
  2. 1 1
      src/components/addr-add-edit-modal/index.vue
  3. 1 1
      src/components/in-addr-model/index.vue
  4. 1 1
      src/components/in-address-modal/index.vue
  5. 1 1
      src/components/in-address-model/index.vue
  6. 25 14
      src/layout/components/Navbar.vue
  7. 18 1
      src/utils/validate.js
  8. 1 1
      src/views/goodStore/goodsCost/columns.js
  9. 1 1
      src/views/goodStore/supplierGoodsCost/columns.js
  10. 1 1
      src/views/sellOut/filing/config/columns.js
  11. 1 1
      src/views/sellOut/filing/config/rules.js
  12. 19 1
      src/views/sellOut/salesOrder/components/addForm.vue
  13. 1 1
      src/views/sellOut/sellAfterApply/components/supplier-confirm.vue
  14. 1 1
      src/views/sellOut/sellAfterApply/components/supplier_exam.vue
  15. 1 1
      src/views/sellOut/sellOutOrder/components/want-deliver.vue
  16. 1 1
      src/views/serviceParam/supplierAccount/columns.js
  17. 1 1
      src/views/serviceParam/supplierQuery/columns.js
  18. 338 0
      src/views/stock/combinedAdd/columns.js
  19. 298 0
      src/views/stock/combinedAdd/components/baseForm.vue
  20. 249 0
      src/views/stock/combinedAdd/components/columnsForm.js
  21. 600 0
      src/views/stock/combinedAdd/components/productModal.vue
  22. 357 0
      src/views/stock/combinedAdd/components/stockModal.vue
  23. 57 0
      src/views/stock/combinedAdd/components/waitApproval.vue
  24. 239 0
      src/views/stock/combinedAdd/detail.vue
  25. 482 0
      src/views/stock/combinedAdd/index.vue
  26. 0 0
      src/views/stock/combinedAdd/组合商品库存添加
  27. 162 0
      src/views/stock/combinedRemove/columns.js
  28. 365 0
      src/views/stock/combinedRemove/components/baseForm.vue
  29. 249 0
      src/views/stock/combinedRemove/components/columnsForm.js
  30. 600 0
      src/views/stock/combinedRemove/components/productModal.vue
  31. 355 0
      src/views/stock/combinedRemove/components/stockModal.vue
  32. 58 0
      src/views/stock/combinedRemove/components/waitApproval.vue
  33. 232 0
      src/views/stock/combinedRemove/detail.vue
  34. 481 0
      src/views/stock/combinedRemove/index.vue
  35. 0 0
      src/views/stock/combinedRemove/组合商品库存添加
  36. 1 1
      src/views/supplierSellOut/supplierFiling/config/columns.js
  37. 1 1
      src/views/supplierSellOut/supplierFiling/config/rules.js
  38. 1 1
      src/views/supplierSellOut/supplierSellAfterApply/components/supplier-confirm.vue
  39. 1 1
      src/views/supplierSellOut/supplierSellAfterApply/components/supplier_exam.vue
  40. 1 1
      src/views/supplierSellOut/supplierSellOutOrder/components/want-deliver.vue

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


+ 1 - 1
src/components/addr-add-edit-modal/index.vue

@@ -127,7 +127,7 @@ export default {
         callback(new Error("详细地址不能为空!"));
       } else {
         if (hasSpace(value)) {
-          callback(new Error("不能出现回车/换行符!"));
+          callback(new Error("系统不允许输入转义字符,请检查后重新输入!"));
         } else if (isSpecialSymbol(value)) {
           callback(new Error("不能使用英文特殊字符!"));
         } else if (isAddr(value)) {

+ 1 - 1
src/components/in-addr-model/index.vue

@@ -151,7 +151,7 @@ export default {
         callback(new Error('详细地址不能为空!'))
       } else {
         if (hasSpace(value)) {
-          callback(new Error('不能出现回车/换行符!'))
+          callback(new Error('系统不允许输入转义字符,请检查后重新输入!'))
         } else if (isSpecialSymbol(value)) {
           callback(new Error('不能使用英文特殊字符!'))
         } else if (isAddr(value)) {

+ 1 - 1
src/components/in-address-modal/index.vue

@@ -141,7 +141,7 @@ export default {
         callback(new Error('详细地址不能为空!'))
       } else {
         if (hasSpace(value)) {
-          callback(new Error('不能出现回车/换行符!'))
+          callback(new Error('系统不允许输入转义字符,请检查后重新输入!'))
         } else if (isSpecialSymbol(value)) {
           callback(new Error('不能使用英文特殊字符!'))
         } else if (isAddr(value)) {

+ 1 - 1
src/components/in-address-model/index.vue

@@ -151,7 +151,7 @@ export default {
         callback(new Error('详细地址不能为空!'))
       } else {
         if (hasSpace(value)) {
-          callback(new Error('不能出现回车/换行符!'))
+          callback(new Error('系统不允许输入转义字符,请检查后重新输入!'))
         } else if (isSpecialSymbol(value)) {
           callback(new Error('不能使用英文特殊字符!'))
         } else if (isAddr(value)) {

+ 25 - 14
src/layout/components/Navbar.vue

@@ -38,6 +38,29 @@
         />
       </el-tooltip>
 
+
+      <el-tooltip
+        v-if="device !== 'mobile'"
+        placement="bottom"
+        content="登录采销结算平台"
+      >
+        <i
+          class="el-icon-coin right-menu-item hover-effect"
+          style="height: 50px; width: 40px; line-height: 52px; font-size: 22px"
+          @click="openSettlementSystem(JSurl)"
+        />
+      </el-tooltip>
+      <el-tooltip
+        v-if="device !== 'mobile'"
+        placement="bottom"
+        content="登录采销数据统计"
+      >
+      <i
+          class="el-icon-data-line right-menu-item hover-effect"
+          style="height: 50px; width: 40px; line-height: 52px; font-size: 22px"
+          @click="openAlert"
+        />
+      </el-tooltip>
       <el-tooltip
         v-if="device !== 'mobile'"
         placement="bottom"
@@ -52,18 +75,6 @@
         </p>
       </el-tooltip>
 
-      <el-tooltip
-        v-if="device !== 'mobile'"
-        placement="bottom"
-        content="登录采销结算平台"
-      >
-        <i
-          class="el-icon-s-promotion right-menu-item hover-effect"
-          style="height: 50px; width: 40px; line-height: 52px; font-size: 22px"
-          @click="openSettlementSystem(JSurl)"
-        />
-      </el-tooltip>
-
       <template v-if="device !== 'mobile'">
         <i
           v-if="isShow"
@@ -291,7 +302,7 @@ export default {
       return chunks[0] + chunks[1] + '...'
     },
     openAlert() {
-      this.$alert('正在开发中', '提示', {
+      this.$alert('正在开发中,敬请期待!', '提示', {
         type: 'warning'
       })
     },
@@ -303,7 +314,7 @@ export default {
       )
       const encData = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(encJson))
       // 跳转至结算平台携带加密后的token
-      console.log(url + encData)
+      // console.log(url + encData)
       window.open(url + encData)
     },
     async openNotice(is) {

+ 18 - 1
src/utils/validate.js

@@ -519,7 +519,24 @@ export function isAddr(s) {
 }
 export function hasSpace(s) {
   // const str1 = s.replace(/\s/g, "");
-  const str2 = s.replace(/[\r\n]/g, "");
+  //   \a  007   响铃(BEL)
+  //   \b  008   退格(BS) ,将当前位置移到前一列
+  //   \f  012   换页(FF),将当前位置移到下页开头
+  //   \n  010   换行(LF) ,将当前位置移到下一行开头
+  //   \r  013   回车(CR) ,将当前位置移到本行开头
+  //   \t  009   水平制表(HT) (跳到下一个TAB位置)
+  //   \v  011   垂直制表(VT)
+  //   \\  092   代表一个反斜线字符''\'
+  //   \'  039   代表一个单引号(撇号)字符
+  //   \"  034   代表一个双引号字符
+  //   \?  063   代表一个问号
+  //   \0  000   空字符(NUL)
+  //   \ddd 三位八进制  1到3位八进制数所代表的任意字符 会把数字过滤掉
+  //   \xhh 十六进制  十六进制所代表的任意字符
+  // 
+  const str2 = s.replace(/[\a\b\f\n\r\t\v\\\'\"\?\0\xhh]/g, "");
+  console.log(s);
+  console.log(str2);
   return !(str2 === s);
 }
 function com1(str, arr) {

+ 1 - 1
src/views/goodStore/goodsCost/columns.js

@@ -202,7 +202,7 @@ const validate_good_name = (rule, value, callback) => {
   if (required && value.length == 0) {
     callback(new Error('不能为空!'))
   } else if (hasSpace(value)) {
-    callback(new Error('不能出现回车/换行符!'))
+    callback(new Error('系统不允许输入转义字符,请检查后重新输入!'))
   } else if (isSpecialSymbol(value)) {
     callback(new Error('不能使用英文特殊字符!'))
   } else {

+ 1 - 1
src/views/goodStore/supplierGoodsCost/columns.js

@@ -195,7 +195,7 @@ const validate_good_name = (rule, value, callback) => {
   if (required && value.length == 0) {
     callback(new Error('不能为空!'))
   } else if (hasSpace(value)) {
-    callback(new Error('不能出现回车/换行符!'))
+    callback(new Error('系统不允许输入转义字符,请检查后重新输入!'))
   } else if (isSpecialSymbol(value)) {
     callback(new Error('不能使用英文特殊字符!'))
   } else {

+ 1 - 1
src/views/sellOut/filing/config/columns.js

@@ -730,7 +730,7 @@ const validate_good_name = (rule, value, callback) => {
   if (required && value.length == 0) {
     callback(new Error("不能为空!"));
   } else if (hasSpace(value)) {
-    callback(new Error("不能出现回车/换行符!"));
+    callback(new Error("系统不允许输入转义字符,请检查后重新输入!"));
   } else if (isSpecialSymbol(value)) {
     callback(new Error("不能使用英文特殊字符!"));
   } else {

+ 1 - 1
src/views/sellOut/filing/config/rules.js

@@ -79,7 +79,7 @@ export const addressRules = {
           callback(new Error("详细地址不能为空!"));
         } else {
           if (hasSpace(value)) {
-            callback(new Error("不能出现回车/换行符!"));
+            callback(new Error("系统不允许输入转义字符,请检查后重新输入!"));
           } else if (isSpecialSymbol(value)) {
             callback(new Error("不能使用英文特殊字符!"));
           } else if (isAddr(value)) {

+ 19 - 1
src/views/sellOut/salesOrder/components/addForm.vue

@@ -690,6 +690,7 @@ export default {
       }
     };
     return {
+        isCombindChild: true,
       ShowDataTableColumns: addColumns,
       AddrAddEditModalIndex: -1,
       AddrAddEditModalSitem: {},
@@ -1012,7 +1013,8 @@ export default {
       this.showModel = false;
       if (e.length === 1) {
         let ssitem = JSON.parse(JSON.stringify(e[0]));
-        await this.get_goods_detail(ssitem.skuCode);
+        const result = await this.get_goods_detail(ssitem.skuCode);
+        console.log(result,"----")
         this.ruleForm.good_code = this.goods_sitem.skuCode;
       } else {
         this.goods_sitem = {};
@@ -1066,6 +1068,9 @@ export default {
         skuCode: skuCode
       });
       if (code === 0) {
+          const { is_combind_child } = data;
+          console.log((is_combind_child === false ? '是' : '不是') + "子商品")
+          this.isCombindChild = is_combind_child === false;
         this.goods_sitem = data;
         this.goods_sitem.good_info_img = this.goods_sitem.good_info_img.split(
           ","
@@ -1293,6 +1298,19 @@ export default {
       rows.splice(index, 1);
     },
     async submitForm() {
+        if(this.ruleForm.good_code && this.isCombindChild){
+          this.$confirm("当前商品为其他组合商品的子商品,请留意",{
+              title:'提示',
+              type:'warning',
+              confirmButtonText:"我已知晓!",
+              cancelButtonText:"取消"
+          }).then(() => {
+              this.isCombindChild = false
+          })
+          return
+        }
+
+
       await this.$refs.ruleForm.validate(async valid => {
         if (valid) {
           if (this.loading) {

+ 1 - 1
src/views/sellOut/sellAfterApply/components/supplier-confirm.vue

@@ -68,7 +68,7 @@ const validateAddr = (rule, value, callback) => {
     callback(new Error('详细地址不能为空!'))
   } else {
     if (hasSpace(value)) {
-      callback(new Error('不能出现回车/换行符!'))
+      callback(new Error('系统不允许输入转义字符,请检查后重新输入!'))
     } else if (isSpecialSymbol(value)) {
       callback(new Error('不能使用英文特殊字符!'))
     } else if (isAddr(value)) {

+ 1 - 1
src/views/sellOut/sellAfterApply/components/supplier_exam.vue

@@ -68,7 +68,7 @@ const validateAddr = (rule, value, callback) => {
     callback(new Error('详细地址不能为空!'))
   } else {
     if (hasSpace(value)) {
-      callback(new Error('不能出现回车/换行符!'))
+      callback(new Error('系统不允许输入转义字符,请检查后重新输入!'))
     } else if (isSpecialSymbol(value)) {
       callback(new Error('不能使用英文特殊字符!'))
     } else if (isAddr(value)) {

+ 1 - 1
src/views/sellOut/sellOutOrder/components/want-deliver.vue

@@ -151,7 +151,7 @@ export default {
       if (value === '') {
         callback(new Error('不能为空!'))
       } else if (hasSpace(value)) {
-        callback(new Error('不能出现回车/换行符!'))
+        callback(new Error('系统不允许输入转义字符,请检查后重新输入!'))
       } else if (isSpecialSymbol(value)) {
         callback(new Error('不能使用英文特殊字符!'))
       } else {

+ 1 - 1
src/views/serviceParam/supplierAccount/columns.js

@@ -177,7 +177,7 @@ const validate_good_name = (rule, value, callback) => {
   if (required && value.length == 0) {
     callback(new Error('不能为空!'))
   } else if (hasSpace(value)) {
-    callback(new Error('不能出现回车/换行符!'))
+    callback(new Error('系统不允许输入转义字符,请检查后重新输入!'))
   } else if (isSpecialSymbol(value)) {
     callback(new Error('不能使用英文特殊字符!'))
   } else {

+ 1 - 1
src/views/serviceParam/supplierQuery/columns.js

@@ -177,7 +177,7 @@ const validate_good_name = (rule, value, callback) => {
   if (required && value.length == 0) {
     callback(new Error('不能为空!'))
   } else if (hasSpace(value)) {
-    callback(new Error('不能出现回车/换行符!'))
+    callback(new Error('系统不允许输入转义字符,请检查后重新输入!'))
   } else if (isSpecialSymbol(value)) {
     callback(new Error('不能使用英文特殊字符!'))
   } else {

+ 338 - 0
src/views/stock/combinedAdd/columns.js

@@ -0,0 +1,338 @@
+const columns = [
+  {
+    prop: 'stockCode',
+    label: '库存申请编码',
+    fixed: 'left',
+    width: '160px'
+  },
+  {
+    prop: 'spuCode',
+    label: '商品编码',
+    width: '160px'
+  },
+  {
+    prop: 'good_name',
+    label: '商品名称',
+    minWidth: '125px',
+  },
+  {
+    label: '商品分类',
+    minWidth: '125px',
+    _slot_:'catinfo'
+  },
+  {
+    prop:'stock_num',
+    label:'本次申请数量',
+    width:'100px'
+  },
+  {
+    prop: 'specInfo',
+    label: '商品规格',
+    minWidth: '125px',
+    _slot_:'specInfo'
+  },
+  {
+    prop: 'status',
+    _slot_: 'status',
+    label: '状态',
+    width: '100px'
+  },
+  {
+    prop: 'TODO',
+    label: '业务公司',
+    width: '160px',
+    _slot_:'company'
+  },
+  {
+    prop: 'apply_name',
+    label: '申请人',
+    width: '90px'
+  },
+  {
+    prop: 'createtime',
+    label: '创建时间',
+    width: '155px'
+  },
+  {
+    prop: '',
+    label: '操作',
+    fixed: 'right',
+    _noset_: true,
+    width: '50px',
+    _slot_: 'operation'
+  }
+]
+const showColumns = [
+  {
+    prop: 'orderCode',
+    label: '订单编号',
+    span: 6
+  },
+  {
+    prop: 'order_type',
+    label: '订单来源',
+    _slot_: 'order_type',
+    span: 6
+  },
+  {
+    prop: 'status',
+    label: '工差单状态',
+    _slot_: 'status',
+    span: 6
+  },
+  {
+    prop: 'addtime',
+    label: '创建时间',
+    span: 6
+  },
+
+  {
+    prop: 'diff_weight',
+    label: '工差总重量',
+    span: 6
+  },
+  {
+    prop: 'diff_price',
+    label: '工差总金额',
+    span: 6
+  },
+  {
+    prop: 'gold_price',
+    label: '金价',
+    span: 6
+  },
+  {
+    prop: 'is_act',
+    label: '客户反馈',
+    _slot_: 'is_act',
+    span: 6
+  },
+  {
+    prop: 'customer_remark',
+    label: '客户意愿',
+    _slot_: 'customer_remark',
+    span: 6
+  },
+  {
+    prop: 'remark',
+    label: '业务审核备注',
+    span: 18
+  }
+]
+
+const detailColumns = [
+  {
+    prop: 'stockCode',
+    label: '库存申请编号',
+    span: 8
+  },
+  {
+    prop:'good_name',
+    label:'商品名称',
+    span:8
+  },
+  {
+    label: '状态',
+    prop: 'status',
+    span: 8,
+    _slot_: 'status'
+  },
+  {
+    label:'仓库名称',
+    prop:'wsm_name',
+    span:8
+  },
+  {
+    label:'添加库存数',
+    prop:'stock_num',
+    span:8
+  },
+  {
+    label:'创建时间',
+    prop:'createtime',
+    span:8
+  },
+  {
+    label: '备注',
+    prop: 'remark',
+    span: 24
+  }
+]
+
+
+export const productColumns = [
+  {
+    prop: "cat_info",
+    label: "商品分类",
+    span: 8,
+    _slot_: "cat_info",
+  },
+  {
+    prop: "good_img",
+    label: "商品主图",
+    _slot_: "good_img",
+    span: 8,
+  },
+  {
+    prop: "good_info_img",
+    _slot_: "good_info_img",
+    label: "详情图片",
+    span: 8,
+  },
+  {
+    prop: "good_name",
+    label: "商品名称",
+    _slot_: "good_name",
+    span: 24,
+  },
+  {
+    prop: "companyName",
+    label: "业务公司",
+    span: 12,
+  },
+  {
+    prop: "supplierName",
+    label: "供应商",
+    span: 12,
+  },
+  {
+    prop: "brand_name",
+    label: "商品品牌",
+    span: 6,
+  },
+  {
+    prop: "is_auth",
+    label: "销售权限",
+    _slot_: "is_auth",
+    span: 6,
+  },
+  {
+    prop: "unit",
+    label: "单位",
+    span: 6,
+  },
+  {
+    prop: "tax",
+    label: "税点",
+    _slot_: "tax",
+    span: 6,
+  },
+  {
+    prop: "is_exclusive",
+    label: "专属类型",
+    _slot_: "is_exclusive",
+    span: 6,
+  },
+  {
+    prop: "weight",
+    label: "商品总重量",
+    _slot_: "weight",
+    span: 6,
+  },
+  {
+    prop: "is_stock",
+    label: "是否库存品",
+    _slot_: "is_stock",
+    span: 6,
+  },
+  {
+    prop: "is_combind",
+    label: "组合类型",
+    _slot_: "is_combind",
+    span: 6,
+  },
+  {
+    prop: "noble",
+    _slot_: "noble",
+    label: "贵金属信息",
+    span: 24,
+  },
+  {
+    prop: "after_sales",
+    label: "售后说明",
+    span: 24,
+  },
+  {
+    prop: "good_remark",
+    label: "商品备注",
+    span: 24,
+  },
+  {
+    prop: "craft_desc",
+    label: "工艺说明",
+    span: 24,
+  },
+  {
+    prop: "packing_way",
+    label: "包装方式",
+    span: 6,
+  },
+  {
+    prop: "packing_spec",
+    label: "装箱规格",
+    span: 6,
+  },
+  {
+    prop: "packing_weight",
+    label: "装箱重量",
+    _slot_: "packing_weight",
+    span: 6,
+  },
+  {
+    prop: "packing_size",
+    label: "装箱尺寸",
+    span: 6,
+  },
+  {
+    prop: "good_size",
+    label: "装箱尺寸",
+    span: 6,
+  },
+  {
+    prop: "good_bar",
+    label: "商品条形码",
+    span: 6,
+  },
+  {
+    prop: "packing_list",
+    label: "商品清单",
+    span: 12,
+  },
+  {
+    prop: "packing_spec",
+    label: "供货区域",
+    span: 6,
+    _slot_: "packing_spec",
+  },
+  {
+    prop: "delivery_day",
+    label: "物流天数",
+    _slot_: "delivery_day",
+    span: 6,
+  },
+  {
+    prop: "lead_time",
+    label: "供货周期",
+    _slot_: "lead_time",
+    span: 6,
+  },
+  {
+    prop: "sample_day",
+    label: "调样周期",
+    _slot_: "sample_day",
+    span: 6,
+  },
+  {
+    prop: "delivery_place",
+    label: "发货地",
+    span: 12,
+    _slot_: "delivery_place",
+  },
+  {
+    prop: "origin_place",
+    label: "产地",
+    span: 12,
+    _slot_: "origin_place",
+  },
+];
+export { columns, showColumns, detailColumns }

+ 298 - 0
src/views/stock/combinedAdd/components/baseForm.vue

@@ -0,0 +1,298 @@
+<template>
+  <el-form
+    ref="ruleForm"
+    v-loading="loading.full"
+    label-width="90px"
+    size="mini"
+    :model="ruleForm"
+    :rules="rules"
+  >
+    <el-form-item v-loading="loading.product" label="组合商品" prop="spuCode">
+      <el-input v-if="!productinfo" placeholder="选择组合商品" @focus="pVisible = true" />
+
+      <el-collapse-transition>
+        <div v-if="productinfo" key="product" style="display:flex">
+          <show-goods-data-table
+            border
+            type="1"
+            v-if="newTime !== ''"
+            :iscgd="true"
+            :newTime="newTime"
+            :spucode="productinfo.spuCode"
+            :isStockInfo="true"
+          />
+
+          <el-tooltip v-if="type !== 'view'" content="重新选择组合商品" placement="top">
+            <i
+              class="el-icon-circle-close"
+              style="cursor:pointer;font-size:18px;margin-left:10px"
+              @click="resetProduct"
+            />
+          </el-tooltip>
+        </div>
+      </el-collapse-transition>
+    </el-form-item>
+
+    <el-form-item v-loading="loading.stock" label="所在仓库" prop="wsm_code">
+      <el-input
+        v-if="!stockinfo"
+        :disabled="!productinfo"
+        placeholder="选择所在仓库"
+        @focus="sVisible = true"
+      />
+
+      <el-collapse-transition>
+        <div v-if="stockinfo" key="stock" style="display:flex">
+          <show-data-table border :columns="stockColumns" :sitem="stockinfo" />
+          <el-tooltip content="重新选择仓库" placement="top">
+            <i
+              class="el-icon-circle-close"
+              style="cursor:pointer;font-size:18px;margin-left:10px"
+              @click="resetStock"
+            />
+          </el-tooltip>
+        </div>
+      </el-collapse-transition>
+    </el-form-item>
+
+    <el-row>
+      <el-col :span="24">
+        <el-form-item label="添加库存数" prop="stock_num" label-width="110px">
+          <digital-input
+            :values="ruleForm.stock_num"
+            :placeholder="'添加库存数'"
+            :min="0"
+            :max="100000000000"
+            :position="'right'"
+            :precision="0"
+            :size="'mini'"
+            :controls="false"
+            :append="''"
+            @reschange="number_change($event, 'stock_num')"
+          />
+        </el-form-item>
+      </el-col>
+    </el-row>
+
+    <el-form-item label="子商品库存情况" label-width="110px">
+      <el-table :data="productinfo ? productinfo.combind_list : []" size="mini" border>
+        <el-table-column label="子商品成本编号" prop="childCode" min-width="160px" />
+        <el-table-column label="子商品名称" prop="child_name" min-width="180px" show-overflow-tooltip />
+        <el-table-column label="组合比例" prop="child_num" />
+        <el-table-column label="本次添加库存数">
+          <template slot-scope="{ row }">{{ calcStockNum(row) }}</template>
+        </el-table-column>
+        <el-table-column label="剩余可用可用库存数">
+          <template slot-scope="{ row }">{{ row.usable_stock || 0}}</template>
+        </el-table-column>
+      </el-table>
+    </el-form-item>
+
+    <el-form-item>
+      <div class="flex-end" style="width:100%;display:flex;justify-content:flex-end">
+        <el-button size="mini" type="primary" @click="submit">保存</el-button>
+      </div>
+    </el-form-item>
+
+    <stock-modal
+      :visible.sync="sVisible"
+      :supplierNo="productinfo ? productinfo.supplierNo :''"
+      @selected="handleStockSelected"
+    />
+    <product-modal :visible.sync="pVisible" @selected="handleProductSelected" />
+  </el-form>
+</template>
+
+<script>
+import StockModal from "./stockModal.vue";
+import ProductModal from "./productModal.vue";
+import privateField from "@/mixins/privateField";
+import asyncRequest from "@/apis/service/sellOut/combindAdd";
+import { stockColumns, productColumns } from "./columnsForm";
+import { add_sum, isnumber, accMul } from "@/utils/validate";
+
+const validateNum = (_, value, callback) => {
+  if (value === "") {
+    callback(new Error("添加库存数不能为空!"));
+  } else {
+    const num = parseInt(value + "");
+    console.log(num);
+    if (!isnumber(value)) {
+      callback(new Error("添加库存数必须是整数!"));
+    } else if (num === NaN) {
+      callback(new Error("添加库存数必须是整数!"));
+    } else if (num === 0) {
+      callback(new Error("添加库存数不能为零!"));
+    } else {
+      callback();
+    }
+  }
+};
+
+export default {
+  name: "BaseForm",
+  components: { StockModal, ProductModal },
+  mixins: [privateField],
+  data() {
+    return {
+      stockColumns,
+      productColumns,
+      sVisible: false,
+      pVisible: false,
+      stockinfo: null,
+      productinfo: null,
+      loading: {
+        product: false,
+        stock: false,
+        full: false
+      },
+      ruleForm: {
+        spuCode: "",
+        wsm_code: "",
+        stock_num: 0,
+        usable_stock: 0
+      },
+      options6: [
+        { id: "1", name: "全国" },
+        { id: "2", name: "全国除偏远" }
+      ],
+      options3: [
+        { id: "0", name: "无销售权限" },
+        { id: "1", name: "有销售权限" }
+      ],
+      rules: {
+        spuCode: [
+          { required: true, trigger: "change", message: "请选择组合商品" }
+        ],
+        wsm_code: [
+          { required: true, trigger: "change", message: "请选择所在仓库" }
+        ],
+        stock_num: [
+          { required: true, trigger: "change", validator: validateNum }
+        ]
+      }
+    };
+  },
+  methods: {
+    async submit() {
+      try {
+        await this.$refs.ruleForm.validate();
+        const { usable_stock, ...params } = this.ruleForm;
+        for (let item of this.productinfo.combind_list) {
+          const { child_num, usable_stock, child_name } = item;
+          if (
+            parseInt(accMul(this.ruleForm.stock_num, child_num)) > usable_stock
+          ) {
+            this.$message.warning(
+              `子商品  ${child_name}  添加库存数不能超过可用库存数`
+            );
+            return;
+          }
+        }
+
+        this.loading.full = true;
+        const { code, message } = await asyncRequest.add({
+          ...params,
+          flag: "1"
+        });
+        this.loading.full = false;
+
+        if (Number(code) === 0) {
+          this.$router.push("/sellOut/combinedAdd");
+          return;
+        } else if (code === 1004) {
+          this.$message.warning(message);
+        }
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    number_change(e, key) {
+      this.ruleForm[key] = e;
+      this.$nextTick(() => {
+        this.$refs.ruleForm && this.$refs.ruleForm.validateField(key);
+      });
+    },
+    resetStock() {
+      this.stockinfo = null;
+      this.ruleForm.wsm_code = "";
+    },
+    resetProduct() {
+      this.productinfo = null;
+      this.stockinfo = null;
+      this.ruleForm.wsm_code = "";
+      this.ruleForm.spuCode = "";
+    },
+    calcStockNum(row) {
+      const { child_num } = row;
+      return parseInt(accMul(this.ruleForm.stock_num, child_num));
+    },
+    async handleStockSelected(evt) {
+      const { id } = evt;
+      this.loading.stock = true;
+      const { code, data } = await asyncRequest.stockinfo({ id });
+      if (code !== 0) return;
+      const { addr_code, addrs_code } = data;
+
+      const { city_code: sourceCodeL2, area_code: sourceCodeL3 } = addr_code;
+      const { city_code: targetCodeL2, area_code: targetCodeL3 } = addrs_code;
+
+      const { code: _co1, data: _d1 } = await asyncRequest.addrquery({
+        code: sourceCodeL2,
+        level: 3
+      });
+
+      const { code: _co2, data: _d2 } = await asyncRequest.addrquery({
+        code: targetCodeL2,
+        level: 3
+      });
+
+      this.loading.stock = false;
+
+      if (_co1 === 0) {
+        const d1 = _d1.find(item => item.code === sourceCodeL3);
+        const { area: _a1, city: _c1, province: _p1 } = (d1 || {}).info || {};
+        data.source = [_p1, _c1, _a1].map(({ name }) => name).join("");
+      }
+
+      if (_co2 === 0) {
+        const d2 = _d2.find(item => item.code === targetCodeL3);
+        const { area: _a2, city: _c2, province: _p2 } = (d2 || {}).info || {};
+        data.target = [_p2, _c2, _a2].map(({ name }) => name).join("");
+      }
+
+      this.stockinfo = data;
+      this.ruleForm.wsm_code = data.wsm_code;
+    },
+    async getArea(prop = "delivery_place") {
+      const chunks = this.productinfo[prop].split(",");
+      let { data: province } = await asyncRequest.province();
+      province = province.find(
+        ({ province_code }) => province_code === chunks[0]
+      );
+      let { data: city } = await asyncRequest.city({ code: chunks[0] });
+      city = city.find(({ city_code }) => city_code === chunks[1]);
+      let { data: area } = await asyncRequest.area({ code: chunks[1] });
+      area = area.find(({ area_code }) => area_code === chunks[2]) || {};
+      return [province, city, area].map(({ name }) => name).join("");
+    },
+    async handleProductSelected(spuCode) {
+      this.loading.product = true;
+      const { code, data } = await asyncRequest.productinfo({ spuCode });
+      if (code !== 0) return;
+      this.productinfo = data;
+
+      (data.combind_list || []).forEach(item => {
+        this.ruleForm.usable_stock = add_sum(
+          this.ruleForm.usable_stock || 0,
+          item.usable_stock || 0
+        );
+      });
+      this.ruleForm.spuCode = spuCode;
+      this.delivery_place = await this.getArea("delivery_place");
+      this.origin_place = await this.getArea("origin_place");
+      this.loading.product = false;
+    }
+  }
+};
+</script>

+ 249 - 0
src/views/stock/combinedAdd/components/columnsForm.js

@@ -0,0 +1,249 @@
+export const stockColumns = [
+  {
+    title:"仓库信息"
+  },
+  {
+    label: "仓库名称",
+    prop: "name",
+    span: "12",
+  },
+  {
+    label: "仓库负责人",
+    prop: "contactor_name",
+    span: "6",
+  },
+  {
+    label: "负责人电话",
+    prop: "mobile",
+    span: "6",
+  },
+  {
+    label: "所在业务公司",
+    prop: "companyName",
+    span: "12",
+  },
+  {
+    label: "所在供应商公司",
+    prop: "supplierName",
+    span: "12",
+  },
+  {
+    label: "仓库所在省市区",
+    prop: "source",
+    span: 12,
+  },
+  {
+    label: "仓库所在详细地址",
+    prop: "addr",
+    span: 6,
+  },
+  {
+    label: "仓库类型",
+    prop: "type_name",
+    span: 6,
+  },
+  {
+    title:"收发货信息"
+  },
+  {
+    label: "收发货联系人",
+    prop: "wsm_name",
+    span: 6,
+  },
+  {
+    label: "联系人职位",
+    prop: "position",
+    span: 6,
+  },
+  {
+    label: "联系人电话",
+    prop: "wsm_mobile",
+    span: 12,
+  },
+  {
+    label: "省市区",
+    prop: "target",
+    span: 12,
+  },
+  {
+    label: "详细地址",
+    prop: "wsm_addr",
+    span: 12,
+  },
+];
+
+export const productColumns = [
+  {
+    prop: "cat_info",
+    label: "商品分类",
+    span: 8,
+    _slot_: "cat_info",
+  },
+  {
+    prop: "good_img",
+    label: "商品主图",
+    _slot_: "good_img",
+    span: 8,
+  },
+  {
+    prop: "good_info_img",
+    _slot_: "good_info_img",
+    label: "详情图片",
+    span: 8,
+  },
+  {
+    prop: "good_name",
+    label: "商品名称",
+    _slot_: "good_name",
+    span: 24,
+  },
+  {
+    prop: "company",
+    label: "业务公司",
+    span: 12,
+  },
+  {
+    prop: "supplierName",
+    label: "供应商",
+    span: 12,
+  },
+  {
+    prop: "brand_name",
+    label: "商品品牌",
+    span: 6,
+  },
+  {
+    prop: "is_auth",
+    label: "销售权限",
+    _slot_: "is_auth",
+    span: 6,
+  },
+  {
+    prop: "unit",
+    label: "单位",
+    span: 6,
+  },
+  {
+    prop: "tax",
+    label: "税点",
+    _slot_: "tax",
+    span: 6,
+  },
+  {
+    prop: "is_exclusive",
+    label: "专属类型",
+    _slot_: "is_exclusive",
+    span: 6,
+  },
+  {
+    prop: "weight",
+    label: "商品总重量",
+    _slot_: "weight",
+    span: 6,
+  },
+  {
+    prop: "is_stock",
+    label: "是否库存品",
+    _slot_: "is_stock",
+    span: 6,
+  },
+  {
+    prop: "is_combind",
+    label: "组合类型",
+    _slot_: "is_combind",
+    span: 6,
+  },
+  {
+    prop: "noble",
+    _slot_: "noble",
+    label: "贵金属信息",
+    span: 24,
+  },
+  {
+    prop: "after_sales",
+    label: "售后说明",
+    span: 24,
+  },
+  {
+    prop: "good_remark",
+    label: "商品备注",
+    span: 24,
+  },
+  {
+    prop: "craft_desc",
+    label: "工艺说明",
+    span: 24,
+  },
+  {
+    prop: "packing_way",
+    label: "包装方式",
+    span: 6,
+  },
+  {
+    prop: "packing_spec",
+    label: "装箱规格",
+    span: 6,
+  },
+  {
+    prop: "packing_weight",
+    label: "装箱重量",
+    _slot_: "packing_weight",
+    span: 6,
+  },
+  {
+    prop: "packing_size",
+    label: "装箱尺寸",
+    span: 6,
+  },
+  {
+    prop: "good_size",
+    label: "装箱尺寸",
+    span: 6,
+  },
+  {
+    prop: "good_bar",
+    label: "商品条形码",
+    span: 6,
+  },
+  {
+    prop: "packing_list",
+    label: "商品清单",
+    span: 12,
+  },
+  {
+    prop: "packing_spec",
+    label: "供货区域",
+    span: 6,
+    _slot_: "packing_spec",
+  },
+  {
+    prop: "delivery_day",
+    label: "物流天数",
+    _slot_: "delivery_day",
+    span: 6,
+  },
+  {
+    prop: "lead_time",
+    label: "供货周期",
+    _slot_: "lead_time",
+    span: 6,
+  },
+  {
+    prop: "sample_day",
+    label: "调样周期",
+    _slot_: "sample_day",
+    span: 6,
+  },
+  {
+    prop: "delivery_place",
+    label: "发货地",
+    span: 12,
+    _slot_: "delivery_place",
+  },
+  {
+    prop: "origin_place",
+    label: "产地",
+    span: 12,
+    _slot_: "origin_place",
+  },
+];

+ 600 - 0
src/views/stock/combinedAdd/components/productModal.vue

@@ -0,0 +1,600 @@
+<template>
+  <el-dialog
+    center
+    title="选择组合商品"
+    :visible="_visible"
+    :close-on-click-modal="false"
+    :append-to-body="true"
+    width="1024px"
+    top="5vh"
+    class="child-product"
+    @close="handleClose"
+  >
+    <ex-table
+      v-loading="loading"
+      :table="table"
+      :data="tableData"
+      :columns="columns"
+      :page="pageInfo"
+      :size="size"
+      @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+      @screen-reset="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+      @screen-submit="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+      @selection="selectionChange"
+    >
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="padding: 0 0 10px 0px">
+            <el-col :span="6" style="width: 303px">
+              <period-date-picker
+                :type="1"
+                :width="'135px'"
+                :size="searchSize"
+                :start="parmValue.start"
+                :end="parmValue.end"
+                @timeReturned="handleTime"
+              />
+            </el-col>
+            <el-col :span="4" style="width: 135px">
+              <search-brand
+                :value="brandid"
+                :disabled="false"
+                :size="'mini'"
+                :is-detail="true"
+                :names="parmValue.supplierName"
+                :placeholder="'商品品牌'"
+                @searchChange="brandidsearchChange"
+              />
+            </el-col>
+            <el-col :span="6" style="width: 310px; padding: 0 0 0 10px">
+              <good-class
+                :value="parmValue.cat_id"
+                :disabled="false"
+                :size="searchSize"
+                :is-detail="false"
+                :placeholder="'分类'"
+                @handleChange="goods_class_change"
+              />
+            </el-col>
+
+            <el-col :span="3" class="fr" style="width: 66px; padding: 0 0 0 10px">
+              <el-button type="primary" :size="searchSize" @click="searchList">刷新</el-button>
+            </el-col>
+
+            <el-col :span="3" class="fr" style="width: 66px; padding: 0 0 0 10px">
+              <el-button type="warning" :size="searchSize" @click="restSearch">重置</el-button>
+            </el-col>
+          </el-row>
+          <el-row>
+            <!-- <el-col :span="4" style="width: 226px">
+              <el-select
+                v-model="parmValue.status"
+                filterable
+                clearable
+                :size="searchSize"
+                placeholder="状态"
+                style="width: 100%"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in statusList"
+                  :key="'status' + item.code"
+                  :label="item.name"
+                  :value="item.code"
+                />
+              </el-select>
+            </el-col>-->
+            <el-col :span="4" style="width: 145px; padding: 0 0 0 0px">
+              <el-select
+                v-model="parmValue.isonline"
+                filterable
+                clearable
+                :size="searchSize"
+                placeholder="是否上线"
+                style="width: 100%"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in isonlineoptions"
+                  :key="'isonline' + item.id"
+                  :label="item.name"
+                  :value="item.id"
+                />
+              </el-select>
+            </el-col>
+
+            <!-- <el-col :span="4" style="width: 135px;margin-left:10px">
+              <el-select
+                v-model="parmValue.is_stock"
+                size="mini"
+                style="width: 100%"
+                placeholder="商品类型"
+                clearable
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="opt in isStockOptions"
+                  :key="opt.value"
+                  :value="opt.value"
+                  :label="opt.label"
+                />
+              </el-select>
+            </el-col>-->
+            <el-col :span="4" style="margin: 0 10px">
+              <search-supplier
+                :size="'mini'"
+                style="width: 165px"
+                :value="supplierNo"
+                :disabled="false"
+                :placeholder="'供应商名称'"
+                :is-detail="false"
+                :no-disabled="true"
+                :names="''"
+                @searchChange="supplierChange"
+              />
+            </el-col>
+
+            <el-col :span="4" style="width: 420px">
+              <el-input
+                v-model="sinput"
+                :size="searchSize"
+                :maxlength="40"
+                placeholder="关键字"
+                @blur="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-select
+                  slot="prepend"
+                  v-model="select"
+                  style="width: 135px"
+                  placeholder="关键字类型"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-option label="商品编号" value="1" />
+                  <el-option label="商品名称" value="2" />
+                </el-select>
+              </el-input>
+            </el-col>
+          </el-row>
+        </div>
+      </template>
+
+      <template #spuCode="{ scope }">
+        <div style="display:flex;align-items:center">
+          <p>{{ scope.row.spuCode }}</p>
+        </div>
+      </template>
+
+      <template #good_thumb_img="{ scope }">
+        <div
+          v-if="scope.row.good_thumb_img"
+          v-viewer
+          style="width: 20px; height: 20px"
+          class="hover"
+        >
+          <img
+            :src="scope.row.good_thumb_img"
+            style="display: inline-block; width: 100%; height: 100%"
+            alt
+          >
+        </div>
+      </template>
+      <template #status="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="
+            (statusList.find((item) => item.code == scope.row.status) || {}).type || '--'
+          "
+          v-text="
+            (statusList.find((item) => item.code == scope.row.status) || {}).name || '--'
+          "
+        />
+      </template>
+      <template #has_account="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="
+            (
+              has_account_list.find((item) => item.code == scope.row.has_account + '') ||
+              {}
+            ).type || '--'
+          "
+          v-text="
+            (
+              has_account_list.find((item) => item.code == scope.row.has_account + '') ||
+              {}
+            ).name || '--'
+          "
+        />
+      </template>
+      <template #isonline="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="scope.row.is_online == '0' ? 'warning' : ''"
+          v-text="
+            (isonlineoptions.find((item) => item.id == scope.row.is_online) || {}).name ||
+              '--'
+          "
+        />
+      </template>
+      <template #is_stock="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="scope.row.is_stock == '0' ? 'warning' : ''"
+          v-text="
+            (options4.find((item) => item.id == scope.row.is_stock) || {}).name || '--'
+          "
+        />
+      </template>
+    </ex-table>
+
+    <div style="display:flex;justify-content:flex-end">
+      <el-button size="mini" type="primary" @click="onSave">保 存</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import { has_account_list, isStockOptions } from '@/assets/js/statusList'
+import asyncRequest from '@/apis/service/goodStore/goodsCost'
+import mixinPage from '@/mixins/elPaginationHandle'
+import resToken from '@/mixins/resToken'
+
+export default {
+  name: 'ProductListModal',
+  mixins: [mixinPage, resToken],
+  props: ['visible'],
+  data() {
+    return {
+      options1: [
+        { id: '0', name: '否' },
+        { id: '1', name: '是' }
+      ],
+      options4: [
+        { id: '0', name: '非库存品' },
+        { id: '1', name: '库存品' }
+      ],
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: []
+      },
+      loading: false,
+      selected: [],
+      size: 'mini',
+      searchSize: 'mini',
+      tablebtnSize: 'mini',
+      sinput: '',
+      select: '1',
+      parmValue: {
+        page: 1, // 页码
+        size: 10, // 每页显示条数
+        is_stock: '',
+        start: '',
+        end: '',
+        status: '',
+        good_name: '',
+        spucode: '',
+        cat_id: [],
+        brandid: '',
+        good_type: '',
+        companyNo: '',
+        supplierNo: '',
+        isonline: '',
+        company_name: '' // 创建人部门
+      },
+      has_account_list,
+      isStockOptions,
+      pageInfo: {
+        size: 10,
+        curr: 1,
+        total: 0
+      },
+      isonlineoptions: [
+        { id: '0', name: '未上线' },
+        { id: '1', name: '已上线' }
+      ],
+      statusList: [
+        {
+          code: '0',
+          name: '新建待审核',
+          type: ''
+        },
+        {
+          code: '1',
+          name: '审核通过',
+          type: 'success'
+        },
+        {
+          code: '2',
+          name: '基础修改待审核',
+          type: ''
+        },
+        {
+          code: '3',
+          name: '成本修改待审核',
+          type: ''
+        },
+        {
+          code: '4',
+          name: '基础修改驳回',
+          type: 'danger'
+        },
+        {
+          code: '5',
+          name: '成本修改驳回',
+          type: 'danger'
+        },
+        {
+          code: '6',
+          name: '新建审核驳回',
+          type: 'danger'
+        },
+        {
+          code: '7',
+          name: '复制商品待编辑',
+          type: 'info'
+        },
+        {
+          code: '8',
+          name: '竞价商品待编辑',
+          type: 'info'
+        }
+      ],
+      columns: [
+        { type: 'selection', fixed: 'left', _noset_: true },
+        {
+          prop: 'spuCode',
+          label: '编号',
+          width: '180px',
+          _slot_: 'spuCode'
+        },
+        {
+          prop: 'good_thumb_img',
+          label: '图片',
+          _slot_: 'good_thumb_img',
+          width: '45px'
+        },
+        {
+          prop: 'good_name',
+          label: '名称',
+          'min-width': '160px'
+        },
+        {
+          prop: 'cat_name',
+          label: '分类'
+        },
+        {
+          prop: 'brand_name',
+          label: '品牌'
+        },
+        {
+          prop: 'is_stock',
+          label: '库存类型',
+          _slot_: 'is_stock',
+          width: '85px'
+        },
+        // {
+        //   prop: "is_combind",
+        //   label: "是否组合商品",
+        //   width: "105px",
+        //   _slot_: "is_combind"
+        // },
+        {
+          prop: 'isonline',
+          label: '是否上线',
+          _slot_: 'isonline',
+          width: '70px'
+        },
+        {
+          prop: 'status',
+          label: '状态',
+          _slot_: 'status',
+          width: '118px'
+        },
+        {
+          prop: 'has_account',
+          label: '供应商账号',
+          _slot_: 'has_account',
+          width: '85px'
+        },
+        {
+          prop: 'supplierNo',
+          label: '供应商编号',
+          width: '110px'
+        },
+        {
+          prop: 'supplierName',
+          label: '供应商名称',
+          width: '110px'
+        },
+        {
+          prop: 'companyNo',
+          label: '业务公司编号',
+          width: '110px'
+        },
+        {
+          prop: 'companyName',
+          label: '业务公司名称',
+          width: '110px'
+        },
+        {
+          prop: 'charger_company_name',
+          label: '负责人部门',
+          minWidth: '150px'
+        },
+
+        {
+          prop: 'charger',
+          label: '负责人',
+          width: '70px'
+        },
+        {
+          prop: 'creater',
+          label: '创建人',
+          width: '70px'
+        },
+
+        {
+          prop: 'addtime',
+          label: '创建时间',
+          width: '140px'
+        }
+      ],
+      tableData: []
+    }
+  },
+  computed: {
+    _visible: {
+      get() {
+        return this.visible
+      },
+      set(nV) {
+        this.$emit('update:visible', nV)
+      }
+    }
+  },
+  watch: {
+    visible(v) {
+      if (!v) return
+      this.searchList()
+    }
+  },
+  methods: {
+    selectionChange(evt) {
+      const { list } = evt
+      this.selected = list
+    },
+    restSearch() {
+      this.select = '2'
+      this.sinput = ''
+      this.supplierNo = []
+      this.brandid = []
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0
+      }
+      this.parmValue = {
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+        start: '',
+        end: '',
+        status: '',
+        good_name: '',
+        company_name: '', // 创建人部门
+        spucode: '',
+        cat_id: [],
+        brandid: '',
+        good_type: '',
+        isonline: '',
+        companyNo: '',
+        supplierNo: ''
+      }
+      this.searchList()
+    },
+    handleClose() {
+      this.selected = []
+      this._visible = false
+    },
+    proportionChange(proportion) {
+      this.ruleForm.proportion = proportion
+    },
+    onSave() {
+      if (this.selected.length === 0 || this.selected.length > 1) {
+        const message =
+          this.selected.length === 0 ? '请选择一条商品' : '只能选择一条商品'
+        this.$message.warning(message)
+        return
+      }
+
+      const { spuCode, id } = this.selected[0]
+      this.$emit('selected', spuCode, id)
+      this._visible = false
+    },
+    async searchList() {
+      console.log(this.parmValue)
+      if (
+        (this.parmValue.start !== '' && this.parmValue.end === '') ||
+        (this.parmValue.start === '' && this.parmValue.end !== '')
+      ) {
+        this.$message.warning('时间区间不完整!')
+        return
+      }
+      this.loading = true
+      const item = JSON.parse(JSON.stringify(this.parmValue))
+      item.spucode = this.select === '1' ? this.sinput : ''
+      item.good_name = this.select === '2' ? this.sinput : ''
+      item.companyNo = this.select === '3' ? this.sinput : ''
+      item.supplierNo = this.select === '4' ? this.sinput : ''
+      item.company_name = this.select === '5' ? this.sinput : '' // 部门
+      item.cat_id =
+        item.cat_id.length > 0 ? item.cat_id[item.cat_id.length - 1] : ''
+      const res = await asyncRequest.copy_list({
+        ...item,
+        supplierNo: Array.isArray(this.supplierNo) ? this.supplierNo[0] : '',
+        needRela: true,
+        is_stock: '1',
+        status: '1',
+        is_combind: '1'
+      })
+
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list
+        this.tableData.forEach(a => {
+          a.cat_name = ''
+          const list = a.cat_info || []
+          list.forEach((b, i) => {
+            a.cat_name += i == 0 ? b.name : '/' + b.name
+          })
+        })
+        this.pageInfo.total = Number(res.data.count)
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout()
+      } else {
+        this.tableData = []
+        this.pageInfo.total = 0
+      }
+      // this.getresultlist();
+      this.loading = false
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.child-product {
+  /deep/ .el-pagination {
+    float: left !important;
+  }
+}
+</style>

+ 357 - 0
src/views/stock/combinedAdd/components/stockModal.vue

@@ -0,0 +1,357 @@
+<template>
+  <el-dialog
+    class="stock-dialog"
+    top="2vh"
+    title="选择仓库"
+    center
+    :visible="_visible"
+    @close="handleClose"
+    width="1024px"
+  >
+    <ex-table
+      style="margin-top:-20px"
+      v-loading="loading"
+      :table="table"
+      :data="tableData"
+      :columns="columns"
+      :page="pageInfo"
+      :size="size"
+      @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+      @selection="handleSelection"
+      @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+      @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+    >
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="padding: 0 0 10px 0px">
+            <!-- 创建时间 -->
+            <el-col :span="18" style="width: 303px; padding: 0">
+              <period-date-picker
+                :start="parmValue.start"
+                :end="parmValue.end"
+                :type="1"
+                :width="'135px'"
+                :title="'创建'"
+                :size="searchSize"
+                @numReturned="numReturned($event, 0)"
+              />
+            </el-col>
+            <el-col :span="18" style="width: 340px; padding: 0">
+              <search-supplier
+                :value="supplierNo"
+                :size="searchSize"
+                :code="parmValue.supplierNo"
+                :placeholder="'供应商公司名称'"
+                :is-detail="false"
+                :disabled="false"
+                :names="''"
+                @searchChange="supplierChange"
+              />
+              <!-- <search-customer
+                  :value="supplierNo"
+                  :size="searchSize"
+
+                  :placeholder="'供应商公司名称'"
+                  :disabled="false"
+                  @searchChange="supplierChange"
+              />-->
+            </el-col>
+
+            <el-col :span="3" style="width: 56px; margin-left: 10px" class="fr">
+              <el-button :size="searchSize" type="primary" @click="searchList">刷新</el-button>
+            </el-col>
+          </el-row>
+          <el-row style="padding: 0">
+            <el-col :span="4" style="width: 120px; padding: 0">
+              <el-select
+                v-model="parmValue.wsm_type"
+                style="width: 100%"
+                clearable
+                :size="searchSize"
+                @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                placeholder="仓库类型"
+              >
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                ></el-option>
+              </el-select>
+            </el-col>
+            <el-col :span="18" style="width: 420px; padding: 0 0 0 10px">
+              <el-input
+                placeholder="关键字"
+                v-model="input"
+                maxlength="40"
+                :size="searchSize"
+                class="input-with-select"
+              >
+                <el-select v-model="select" slot="prepend" style="width: 125px" placeholder="关键字类型">
+                  <el-option label="仓库编码" value="1"></el-option>
+                  <el-option label="负责人姓名" value="2"></el-option>
+                  <el-option label="负责人手机号" value="3"></el-option>
+                  <el-option label="负责人部门" value="4"></el-option>
+                </el-select>
+                <el-button slot="append" icon="el-icon-search" @click="searchList"></el-button>
+              </el-input>
+            </el-col>
+            <el-col :span="4" style="width: 66px; padding-left: 10px" class="fr">
+              <el-button type="warning" class="fl" :size="searchSize" @click="restSearch">重置</el-button>
+            </el-col>
+          </el-row>
+        </div>
+      </template>
+      <template #status="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="scope.row.status == '0' ? 'warning' : ''"
+          v-text="
+              (statusOptions.find((item) => item.id == scope.row.status) || {}).label ||
+              '--'
+            "
+        ></el-tag>
+      </template>
+
+      <template
+        #wsm_type="{scope}"
+      >{{(options.find((item) => item.value === String(scope.row.wsm_type)) || {}).label || '--'}}</template>
+    </ex-table>
+
+    <div style="display:flex;justify-content:flex-end">
+      <el-button size="mini" type="primary" @click="submit">保 存</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import asyncRequest from "@/apis/service/sellOut/combindAdd";
+import mixinPage from "@/mixins/elPaginationHandle";
+export default {
+  name: "StockModal",
+  props: ["visible", "supplierNo"],
+  mixins: [mixinPage],
+  computed: {
+    _visible: {
+      get() {
+        return this.visible;
+      },
+      set(nV) {
+        this.$emit("update:visible", nV);
+      }
+    }
+  },
+  data() {
+    return {
+      selected: [],
+      options: [
+        {
+          value: "5",
+          label: "销售仓"
+        },
+        {
+          value: "4",
+          label: "次品仓"
+        }
+      ],
+      searchSize: "mini",
+      select: "",
+      input: "",
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: []
+      },
+      pageInfo: {
+        size: 10,
+        curr: 1,
+        total: 0
+      },
+      loading: false,
+      parmValue: {
+        supplierNo: "", //供应商编码
+        wsm_code: "", //仓库编码
+        wsm_type: "",
+        start: "", //新建起始时间
+        end: "", //新建结束时间
+        mobile: "", //手机号
+        contactor_name: "", //联系人
+        size: 15,
+        page: 1
+      },
+      tablebtnSize: "mini",
+      statusOptions: [
+        { id: "0", label: "禁用" },
+        { id: "1", label: "启用" }
+      ],
+      columns: [
+        {
+          type: "selection",
+          width: "80px",
+          fixed: "left"
+        },
+        {
+          prop: "wsm_code",
+          label: "编号",
+          width: "170px"
+        },
+        {
+          prop: "name",
+          label: "仓库名称",
+          minWidth: "160px"
+        },
+        {
+          prop: "wsm_type",
+          label: "仓库类型",
+          width: "80px",
+          _slot_: "wsm_type"
+        },
+        {
+          prop: "companyNo",
+          label: "业务公司编码",
+          width: "140px"
+        },
+        {
+          prop: "company_name",
+          label: "业务公司",
+          "min-width": "140px"
+        },
+        {
+          prop: "status",
+          label: "状态",
+          width: "60px",
+          // ,
+          _slot_: "status"
+        },
+        {
+          prop: "contactor_name",
+          label: "负责人",
+          minWidth: "70px"
+        },
+        {
+          prop: "mobile",
+          label: "负责人电话",
+          width: "100px"
+        },
+        {
+          prop: "creater",
+          label: "创建人",
+          width: "70px"
+        },
+        {
+          prop: "addtime",
+          label: "创建时间",
+          width: "140px"
+        }
+      ]
+    };
+  },
+  watch: {
+    _visible(NV) {
+      if (!NV) return;
+      this.searchList();
+    }
+  },
+  methods: {
+    handleClose() {
+      this._visible = false;
+    },
+    submit() {
+      if (this.selected.length === 0 || this.selected.length > 1) {
+        const message =
+          this.selected.length === 0 ? "请选择一个仓库" : "只能选择一个仓库";
+        this.$message.warning(message);
+        return;
+      }
+
+      const { wsm_code, id } = this.selected[0];
+      this.$emit("selected", { code: wsm_code, id });
+      this._visible = false;
+    },
+    restSearch() {
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 10,
+        curr: 1,
+        total: 0
+      };
+      this.supplierNo = [];
+      this.input = "";
+      this.select = "1";
+      this.parmValue = {
+        supplierNo: "", //供应商编码
+        wsm_code: "", //仓库编码
+        wsm_type: "",
+        start: "", //新建起始时间
+        company_new_name: "", //负责人部门
+        end: "", //新建结束时间
+        mobile: "", //手机号
+        contactor_name: "", //联系人
+        page: 1, // 页码
+        size: 15 // 每页显示条数
+      };
+      this.searchList();
+    },
+    handleSelection(evt) {
+      const { list } = evt;
+      this.selected = list;
+    },
+    async searchList() {
+      if (
+        (this.parmValue.start !== "" && this.parmValue.end === "") ||
+        (this.parmValue.start == "" && this.parmValue.end != "")
+      ) {
+        this.$message.warning("开始时间和结束时间不能为空");
+        return;
+      }
+      this.loading = true;
+      this.parmValue.wsm_code = this.select === "1" ? this.input : "";
+      this.parmValue.contactor_name = this.select === "2" ? this.input : "";
+      this.parmValue.mobile = this.select === "3" ? this.input : "";
+      this.parmValue.company_new_name = this.select === "4" ? this.input : "";
+
+      const { code, data } = await asyncRequest.stock({
+        ...this.parmValue,
+        // supplierNo: this.supplierNo,
+        needRela: true
+      });
+
+      if (code === 0) {
+        const { list, count } = data ?? {};
+        console.log(list);
+        this.tableData = list;
+        this.pageInfo.total = Number(count ?? "0");
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.stock-dialog {
+  /deep/ .el-pagination {
+    float: left !important;
+  }
+}
+</style>

+ 57 - 0
src/views/stock/combinedAdd/components/waitApproval.vue

@@ -0,0 +1,57 @@
+<template>
+  <el-form ref="ruleForm" label-width="80px" size="mini" :model="ruleForm" :rules="rules">
+    <el-form-item label="状态" prop="status">
+      <el-select v-model="ruleForm.status" style="width:100%">
+        <el-option value="2" label="通过" />
+        <el-option value="3" label="驳回" />
+      </el-select>
+    </el-form-item>
+
+    <el-form-item label="备注" prop="remark">
+      <el-input placeholder="备注" v-model="ruleForm.remark" type="textarea" />
+    </el-form-item>
+
+    <el-form-item>
+      <div class="fr">
+        <el-button type="primary" @click="submit">保 存</el-button>
+      </div>
+    </el-form-item>
+  </el-form>
+</template>
+
+<script>
+export default {
+  name: "waitApproval",
+  computed: {
+    rules() {
+      return {
+        status: [{ required: true, message: "请选择状态", trigger: "change" }],
+        remark: [
+          {
+            required: this.ruleForm.status === "3",
+            message: "请输入备注",
+            trigger: "change"
+          }
+        ]
+      };
+    }
+  },
+  data() {
+    return {
+      ruleForm: {
+        status: "2",
+        remark: ""
+      }
+    };
+  },
+  methods: {
+    submit() {
+      this.$refs.ruleForm.validate(isValid => {
+        if(!isValid) return
+        const { status, remark } = this.ruleForm;
+        this.$emit("confirm", { status, remark });
+      })
+    }
+  }
+};
+</script>

+ 239 - 0
src/views/stock/combinedAdd/detail.vue

@@ -0,0 +1,239 @@
+<template>
+  <div class="zxDiffOrderDetail pagePadding">
+    <div style="width: 100%" v-if="powers.some((i) => i == '007')" v-loading="loading">
+      <el-tabs v-model="activeTabs">
+        <el-tab-pane label="业务详情" name="1">
+          <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
+            <el-collapse-item :title="title" name="1" v-if="type === 'add'">
+              <base-form />
+            </el-collapse-item>
+
+            <template v-else>
+              <el-collapse-item title="库存添加申请详情" name="2" v-if="sitem">
+                <show-data-table :sitem="sitem" :newTime="newTime" :columns="detailColumns">
+                  <template #status>
+                    <el-tag
+                      size="mini"
+                      :type="sitem.status == '1' ? 'warning' : ''"
+                    >{{(statusOptions.find((item) => item.id == String(sitem.status)) || {}).label || '--'}}</el-tag>
+                  </template>
+
+                  <template #wsmtype>
+                    <el-tag
+                      size="mini"
+                    >{{(wsm_options.find(({value}) => value === sitem.wsm_type) || {}).label || '--'}}</el-tag>
+                  </template>
+                </show-data-table>
+              </el-collapse-item>
+
+              <el-collapse-item title="组合商品详情" name="5" v-if="sitem && sitem.spuCode">
+                <show-goods-data-table
+                  v-if="newTime !== ''"
+                  type="1"
+                  :iscgd="true"
+                  :newTime="newTime"
+                  :spucode="sitem.spuCode"
+                  :isStockInfo="true"
+                />
+              </el-collapse-item>
+
+              <el-collapse-item title="子商品信息" name="4">
+                <el-table :data="sitem ? sitem.combindgood : []" size="mini" border>
+                  <el-table-column label="子商品成本编号" prop="childCode" min-width="160px" />
+                  <el-table-column
+                    label="子商品名称"
+                    prop="child_name"
+                    min-width="180px"
+                    show-overflow-tooltip
+                  />
+                  <el-table-column label="组合比例" prop="child_num" />
+                  <el-table-column label="本次添加库存数">
+                    <template
+                      slot-scope="{ row }"
+                    >{{ ((row.child_num || 0) * ( sitem.stock_num || 0)) || 0}}</template>
+                  </el-table-column>
+
+                  <el-table-column label="锁定库存总数">
+                    <template slot-scope="scope">{{ scope.row.stock || 0 }}</template>
+                  </el-table-column>
+                  <el-table-column label="锁定库存可用库存数">
+                    <template slot-scope="scope">{{ scope.row.usable_stock || 0 }}</template>
+                  </el-table-column>
+                </el-table>
+              </el-collapse-item>
+
+              <el-collapse-item
+                v-if="sitem && Number(sitem.status) === 1 && !isSupertube && ppowers.includes('1')"
+                title="待审核"
+                name="3"
+              >
+                <div style="width:600px">
+                  <wait-approval @confirm="setStatus" />
+                </div>
+              </el-collapse-item>
+            </template>
+          </el-collapse>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+<script>
+import { showColumns, detailColumns, productColumns } from "./columns";
+import ProductDetail from "@/components/details/src/product.vue";
+import { xs_order_type_options } from "@/assets/js/statusList";
+import asyncRequest from "@/apis/service/sellOut/combinedAdd";
+import StockDetail from "@/components/details/src/stock.vue";
+import WaitApproval from "./components/waitApproval";
+import mixinPage from "@/mixins/elPaginationHandle";
+import BaseForm from "./components/baseForm";
+import resToken from "@/mixins/resToken";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "combinedAddDetail",
+  mixins: [mixinPage, resToken],
+  components: { BaseForm, WaitApproval, ProductDetail, StockDetail },
+  computed: {
+    ...mapGetters(["isSupertube"]),
+    type() {
+      return this.$route.query.id;
+    },
+    title() {
+      const { query } = this.$route;
+      return query.id === "add" ? "新建组合商品库存申请" : "组合商品库存详情";
+    },
+    powers() {
+      const { btnList } = this.$store.getters;
+      const tran =
+        btnList.find(item => item.menu_route == "combinedAddDetail") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    },
+    ppowers() {
+      const tran =
+        this.$store.getters.roleProcess.find(i => i.process_type === "ZHTJ") ||
+        {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    }
+  },
+  data() {
+    return {
+      productinfo: null,
+      productColumns,
+      showModel: false,
+      showColumns: showColumns,
+      activeTabs: "1",
+      activeNames: ["-1", "0", "1", "2", "3", "4", "5", "10"],
+      statusOptions: [
+        { id: "1", label: "待审核" },
+        { id: "2", label: "审核通过" },
+        { id: "3", label: "审核驳回" }
+      ],
+      detailColumns,
+      xs_order_type_options,
+      customer_remark_options: [
+        {
+          value: "1",
+          label: "竞价订单减工差"
+        },
+        {
+          value: "2",
+          label: "竞价订单不减工差"
+        }
+      ],
+      wsm_options: [
+        {
+          value: "5",
+          label: "销售仓"
+        },
+        {
+          value: "4",
+          label: "次品仓"
+        }
+      ],
+      is_act_options: [
+        {
+          value: "1",
+          label: "接受工差"
+        },
+        {
+          value: "2",
+          label: "不接受工差-退回重做"
+        }
+      ],
+      loading: {
+        product: false
+      },
+      sitem: null,
+      status: "",
+      newTime: "",
+      loading: false,
+      queryId: ""
+    };
+  },
+  mounted() {
+    this.status = "";
+    this.queryId = this.$route.query.id;
+
+    if (this.queryId !== "add") {
+      this.initData();
+    }
+  },
+  methods: {
+    getNewTime() {
+      this.newTime = new Date().valueOf() + "";
+    },
+
+    async setStatus(param) {
+      if (!this.loading) {
+        this.loading = true;
+
+        let model = {
+          id: this.queryId,
+          flag: "1",
+          ...param
+        };
+
+        const res = await asyncRequest.status(model);
+        this.loading = false;
+        if (res && res.code === 0) {
+          this.initData();
+        } else if (res && res.code >= 100 && res.code <= 104) {
+          await this.logout();
+        } else {
+          this.$message.warning(res.message);
+        }
+      }
+    },
+    async initData() {
+      const res = await asyncRequest.detail({ id: this.queryId });
+      if (res && res.code === 0 && res.data) {
+        this.sitem = res.data;
+        const { can, status } = res.data;
+        this.status = status;
+        this.sitem.class_cat = "";
+        if (can && can.length > 0) {
+          can.forEach((x, i) => {
+            this.sitem.class_cat += i === 0 ? x.name : "/" + x.name;
+          });
+        }
+        this.getNewTime();
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.zxDiffOrderDetail {
+}
+</style>

+ 482 - 0
src/views/stock/combinedAdd/index.vue

@@ -0,0 +1,482 @@
+<template>
+  <div class="zxDiffOrder pagePadding">
+    <div v-if=" powers.some((i) => i == '001')">
+      <ex-table
+        :table="table"
+        v-loading="loading"
+        :data="tableData"
+        :columns="columns"
+        :page="pageInfo"
+        :size="size"
+        @page-curr-change="handlePageChange"
+        @page-size-change="handleSizeChange"
+        @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+        @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+      >
+        <template #table-header="{}">
+          <div style="width: 100%">
+            <el-row style="padding: 0 0 0 80px">
+              <el-col :span="24">
+                <el-col :span="6" style="width: 355px;">
+                  <period-date-picker
+                    :create_start="parmValue.create_start"
+                    :create_end="parmValue.create_end"
+                    :type="1"
+                    :width="'165px'"
+                    :size="searchSize"
+                    @timeReturned="timeReturned($event)"
+                  />
+                </el-col>
+
+                <el-col :span="4" style="margin-left: 10px">
+                  <el-select
+                    style="width:100%"
+                    placeholder="状态"
+                    v-model="parmValue.status"
+                    size="mini"
+                    clearable
+                    @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
+                  >
+                    <el-option
+                      v-for="s in statusOptions"
+                      :label="s.label"
+                      :value="s.id"
+                      :key="s.id"
+                    />
+                  </el-select>
+                </el-col>
+
+                <el-col :span="3" style="width: 66px; float: right">
+                  <el-button
+                    type="primary"
+                    :size="searchSize"
+                    @click="searchList"
+                    style="float: right; margin-left: 5px"
+                  >刷新</el-button>
+                </el-col>
+
+                <el-col :span="4" style="width: 66px; float: right">
+                  <el-button type="warning" class="fr" :size="searchSize" @click="restSearch">重置</el-button>
+                </el-col>
+              </el-col>
+            </el-row>
+            <el-row style="margin-top: 10px">
+              <el-col :span="6" style="width: 400px">
+                <el-input
+                  v-model="value"
+                  :size="searchSize"
+                  placeholder="关键字"
+                  clearable
+                  :maxlength="40"
+                  @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
+                >
+                  <template #prepend>
+                    <el-select
+                      v-model="parmValue.key"
+                      style="width:100px"
+                      @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
+                    >
+                      <el-option label="商品名称" value="spuCode" />
+                      <el-option label="商品编码" value="good_name" />
+                    </el-select>
+                  </template>
+
+                  <el-button
+                    slot="appcreate_end"
+                    icon="el-icon-search"
+                    @click="
+                        pageInfo.curr = 1;
+                        parmValue.page = 1;
+                        searchList();
+                      "
+                  ></el-button>
+                </el-input>
+              </el-col>
+
+              <el-button
+                v-if="powers.includes('003') && !isSupertube"
+                class="fr"
+                type="success"
+                size="mini"
+                @click="getRouter('combinedAddDetail', 'add' )"
+              >添加</el-button>
+            </el-row>
+          </div>
+        </template>
+
+        <template #company="{scope}">
+            <el-tooltip :content="'业务公司编码 : ' + scope.row.companyNo" placement="top">
+              <i class="el-icon-warning-outline" style="margin-right:2px;cursor:pointer" />
+            </el-tooltip>
+            {{scope.row.companyName}}
+        </template>
+
+        <template #status="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.status == '0' ? 'warning' : ''"
+            v-text="
+              (statusOptions.find((item) => item.id == scope.row.status) || {})
+                .label || '--'
+            "
+          ></el-tag>
+        </template>
+
+        <template #order_source="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            v-text="
+              (
+              xs_order_source_options.find(
+                  (item) => item.id == scope.row.order_source
+                ) || {}
+              ).label || '--'
+            "
+          ></el-tag>
+        </template>
+
+        <template #catinfo="{ scope }">{{scope.row.catInfo.map(({name}) => name).join("-")}}</template>
+
+        <template #specInfo="{ scope }">
+          <span
+            v-for="(si, sii) in scope.row.specInfo"
+            :key="sii + si.spec_value_id"
+          >{{ sii === 0 ? "" : "-" }}{{ si.spec_name }}[{{ si.spec_value }}]</span>
+        </template>
+
+        <template #order_type="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            v-text="
+              (
+              is_stock.find((item) => item.id == scope.row.is_stock) || {}
+              ).name || '--'
+            "
+          ></el-tag>
+        </template>
+
+        <template #operation="{ scope }">
+          <el-tooltip
+            v-if="powers.some((i) => i == '007')"
+            effect="dark"
+            content="详情"
+            placement="top"
+          >
+            <i class="el-icon-view tb-icon" @click="getRouter('combinedAddDetail', scope.row.id )"></i>
+          </el-tooltip>
+        </template>
+      </ex-table>
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+<script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import asyncRequest from "@/apis/service/sellOut/combinedAdd";
+import companyHelper from "@/mixins/companyHelper";
+import { mapGetters } from "vuex";
+import { columns } from "./columns";
+
+import {
+  xs_order_source_options,
+  xs_order_type_options
+} from "@/assets/js/statusList";
+
+export default {
+  name: "zxDiffOrder",
+  mixins: [mixinPage, resToken, companyHelper],
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      const { btnList } = this.$store.getters;
+      const tran = btnList.find(item => item.menu_route == "combinedAdd") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    }
+  },
+  data() {
+    return {
+      supplierNo: "",
+      xs_order_source_options,
+      xs_order_type_options,
+      select: "1",
+      input: "",
+      addShowModel: false,
+      addModelId: "",
+      addIsDetail: false,
+      customerCode: [],
+      sitem: null,
+      // 状态
+      statusOptions: [
+        { id: "1", label: "待审核" },
+        { id: "2", label: "审核通过" },
+        { id: "3", label: "审核驳回" }
+      ],
+      statusList: [
+        "样品竞价单",
+        "线上竞价",
+        "线上贵金属",
+        "线下竞价",
+        "线下贵金属",
+        "赠品竞价单",
+        "项目竞聘"
+      ],
+      is_stock: [
+        { id: "0", name: "非库存品" },
+        { id: "1", name: "库存品" }
+      ],
+      key: "",
+      value: "",
+      loading: true,
+      showModel: false,
+      isDetail: false,
+      modelId: 0,
+      parmValue: {
+        key: "spuCode",
+        value: "",
+        status: "",
+        create_start: "",
+        create_end: "",
+        page: 1, // 页码
+        size: 15 // 每页显示条数
+      },
+      tableData: [],
+      passwordModel: false,
+      passwordModelId: 0,
+      isPasswordDetail: false,
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"]
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0
+      },
+      // 表格 - 列参数
+      columns: columns
+    };
+  },
+  mounted() {
+    const { back } = this.$route.query;
+    if (back) {
+      this.parmValue = JSON.parse(back);
+      console.log(this.parmValue);
+      const { page, size } = this.parmValue;
+      // this.parmValue.create_start = create_start || last_create_start;
+      // this.parmValue.create_end = create_end || last_create_end;
+      // if(this.parmValue.companyNo.length>0){
+      //     this.customerCode = [this.parmValue.companyNo] ;
+      // }
+
+      this.pageInfo = {
+        size: size,
+        curr: page,
+        total: 0
+      };
+      //多选条件
+      this.select = this.parmValue.select;
+      // this.sselect = this.parmValue.sselect;
+      this.s_input = this.parmValue.s_input;
+    } else {
+      this.select = "1";
+      //  this.sselect = "创建时间"
+    }
+    this.searchList();
+  },
+
+  methods: {
+    async supplierChange(e) {
+      const { code, label } = e;
+      this.parmValue.supplierNo = code ? [code] : [];
+      this.parmValue.supplierName = label;
+      this.searchList();
+    },
+    getRouter(toRouter, queryId) {
+      if (toRouter && queryId) {
+        let model = {
+          id: queryId
+          // type: 'view',
+        };
+
+        //有多选框的条件
+        this.parmValue.select = this.select;
+        this.parmValue.s_input = this.s_input;
+        //
+        let routerModel = {
+          options: JSON.parse(JSON.stringify(this.parmValue)),
+          router: this.$route.path
+        };
+        model.preModel = JSON.stringify(routerModel);
+
+        this.routeGoto(toRouter, model);
+      } else {
+        this.$message.warning("暂未找到相关流程!");
+      }
+    },
+    async timeReturned(e) {
+      if (e.create_startTime !== "") {
+        this.parmValue.create_start = e.create_startTime;
+      } else {
+        this.parmValue.create_start = "";
+      }
+
+      if (e.create_endTime !== "") {
+        this.parmValue.create_end = e.create_endTime;
+      } else {
+        this.parmValue.create_end = "";
+      }
+      if (
+        this.parmValue.create_start !== "" &&
+        this.parmValue.create_end !== ""
+      ) {
+        this.parmValue.page = 1;
+        await this.searchList();
+      }
+    },
+    restSearch() {
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0
+      };
+      this.select = "1";
+      this.input = "";
+      this.parmValue = {
+        status: "",
+        key: "spuCode",
+        value: "",
+        create_start: "",
+        create_end: "",
+        page: 1, // 页码
+        size: 15 // 每页显示条数
+      };
+      this.searchList();
+    },
+    async customerChange(e) {
+      if (e && e.id) {
+        this.parmValue.customer_code = [e.code];
+        this.parmValue.customerName = e.label;
+      } else {
+        this.parmValue.customer_code = [];
+        this.parmValue.customerName = "";
+      }
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+    openModal(id, isDetail) {
+      this.showModel = true;
+      this.modelId = id;
+      this.isDetail = isDetail;
+    },
+    addModal(id, isDetail) {
+      this.addModelId = id;
+      this.addShowModel = true;
+      this.addIsDetail = isDetail;
+    },
+    async deleteById(id, status) {
+      await this.$confirm("确定要删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(async () => {
+          const model = {
+            id: id
+            // status: status === "1" ? "0" : "1",
+          };
+          const res = await asyncRequest.delete(model);
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "删除成功",
+              message: ""
+            });
+            this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    async searchList() {
+      if (
+        (this.parmValue.create_start !== "" &&
+          this.parmValue.create_end === "") ||
+        (this.parmValue.create_start == "" && this.parmValue.create_end != "")
+      ) {
+        this.$message.warning("开始时间和结束时间不能为空");
+        return;
+      }
+      this.loading = true;
+
+      const { key, value, ...rest } = this.parmValue;
+
+      const res = await asyncRequest.list({
+        needRela: true,
+        [key]: value,
+        flag: "1",
+        ...rest
+      });
+
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.tableData.map(v => {
+          v.sale_price = this.setNum(v.sale_price);
+          v.sale_fee = this.setNum(v.sale_fee);
+          v.class_cat = "";
+          if (v.can && v.can.length > 0) {
+            v.can.forEach((x, i) => {
+              v.class_cat += i === 0 ? x.name : "/" + x.name;
+            });
+          }
+          return v;
+        });
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    }
+  }
+};
+</script>
+   <style lang="scss" scoped>
+.zxDiffOrder {
+}
+</style>

+ 0 - 0
src/views/stock/combinedAdd/组合商品库存添加


+ 162 - 0
src/views/stock/combinedRemove/columns.js

@@ -0,0 +1,162 @@
+const columns = [
+  {
+    prop: 'stockCode',
+    label: '库存申请编码',
+    fixed: 'left',
+    width: '160px'
+  },
+  {
+    prop: 'spuCode',
+    label: '商品编码',
+    width: '160px'
+  },
+  {
+    prop: 'good_name',
+    label: '商品名称',
+    minWidth: '125px',
+  },
+  {
+    label: '商品分类',
+    minWidth: '125px',
+    _slot_:'catinfo'
+  },
+  {
+    prop:'stock_num',
+    label:'本次解除数量',
+    width:'100px'
+  },
+  {
+    prop: 'specInfo',
+    label: '商品规格',
+    minWidth: '125px',
+    _slot_:'specInfo'
+  },
+  {
+    prop: 'status',
+    _slot_: 'status',
+    label: '状态',
+    width: '100px'
+  },
+  {
+    prop: 'TODO',
+    label: '业务公司',
+    width: '160px',
+    _slot_:'company'
+  },
+  {
+    prop: 'apply_name',
+    label: '申请人',
+    width: '90px'
+  },
+  {
+    prop: 'createtime',
+    label: '创建时间',
+    width: '155px'
+  },
+  {
+    prop: '',
+    label: '操作',
+    fixed: 'right',
+    _noset_: true,
+    width: '50px',
+    _slot_: 'operation'
+  }
+]
+const showColumns = [
+  {
+    prop: 'orderCode',
+    label: '订单编号',
+    span: 6
+  },
+  {
+    prop: 'order_type',
+    label: '订单来源',
+    _slot_: 'order_type',
+    span: 6
+  },
+  {
+    prop: 'status',
+    label: '工差单状态',
+    _slot_: 'status',
+    span: 6
+  },
+  {
+    prop: 'addtime',
+    label: '创建时间',
+    span: 6
+  },
+
+  {
+    prop: 'diff_weight',
+    label: '工差总重量',
+    span: 6
+  },
+  {
+    prop: 'diff_price',
+    label: '工差总金额',
+    span: 6
+  },
+  {
+    prop: 'gold_price',
+    label: '金价',
+    span: 6
+  },
+  {
+    prop: 'is_act',
+    label: '客户反馈',
+    _slot_: 'is_act',
+    span: 6
+  },
+  {
+    prop: 'customer_remark',
+    label: '客户意愿',
+    _slot_: 'customer_remark',
+    span: 6
+  },
+  {
+    prop: 'remark',
+    label: '业务审核备注',
+    span: 18
+  }
+]
+
+const detailColumns = [
+  {
+    prop: 'stockCode',
+    label: '库存申请编号',
+    span: 8
+  },
+  {
+    prop:'good_name',
+    label:'商品名称',
+    span:8
+  },
+  {
+    label: '状态',
+    prop: 'status',
+    span: 8,
+    _slot_: 'status'
+  },
+  {
+    label:'仓库名称',
+    prop:'wsm_name',
+    span:8
+  },
+  {
+    label:'解除库存数',
+    prop:'stock_num',
+    span:8
+  },
+  {
+    label:'创建时间',
+    prop:'createtime',
+    span:8
+  },
+  {
+    label: '备注',
+    prop: 'remark',
+    span: 24
+  }
+]
+
+export { columns, showColumns, detailColumns }

+ 365 - 0
src/views/stock/combinedRemove/components/baseForm.vue

@@ -0,0 +1,365 @@
+<template>
+  <el-form
+    ref="ruleForm"
+    v-loading="loading.full"
+    label-width="90px"
+    size="mini"
+    :model="ruleForm"
+    :rules="rules"
+  >
+  <el-form-item v-loading="loading.product" label="组合商品" prop="spuCode">
+      <el-input v-if="!productinfo" placeholder="选择组合商品" @focus="pVisible = true" />
+
+      <div v-else key="product" style="display:flex">
+        <show-goods-data-table
+          border
+           v-if="newTime !== ''"
+           type="1"
+           :iscgd="true"
+           :newTime="newTime"
+           :spucode="productinfo.spuCode"
+           :isStockInfo="true"
+         />
+        
+        <!-- <show-data-table border :columns="productColumns" :sitem="productinfo">
+          <template slot="packing_spec">
+            <el-tag
+              size="mini"
+            >{{ ( options6.find(({id}) => id === productinfo.supply_area) || {}).name || '--' }}</el-tag>
+          </template>
+
+          <template slot="is_auth">
+            <el-tag
+              size="mini"
+            >{{ ( options3.find(({id}) => id === productinfo.is_auth) || {}).name || '--' }}</el-tag>
+          </template>
+
+          <template slot="good_info_img">
+            <div style="max-height: 24px; overflow: hidden">
+              <el-image
+                style="height: 24px; width: 24px"
+                :src="productinfo.good_info_img"
+                :preview-src-list="[productinfo.good_info_img]"
+              />
+            </div>
+          </template>
+
+          <template slot="cat_info">
+            {{
+            productinfo.cat_info
+            ? productinfo.cat_info.map(({ name }) => name).join("_")
+            : "--"
+            }}
+          </template>
+
+          <template slot="is_combind">
+            {{
+            String(productinfo.is_combind) === '1' ? '组合商品' : '非组合商品'
+            }}
+          </template>
+
+          <template slot="good_name">
+            <img
+              v-if="productinfo.good_thumb_img"
+              v-viewer
+              style="width: 23px; height: 23px; margin: 0 5px 0 0"
+              class="fl"
+              :src="productinfo.good_thumb_img"
+              alt
+            />
+            <span>{{ productinfo.good_name }}</span>
+            <span v-for="(si, i) in productinfo.speclist" :key="si.spec_id + i">
+              <span v-if="i !== 0">-</span>
+              <span v-else>_</span>
+              <span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
+            </span>
+            <el-popover placement="top" width="300" trigger="hover">
+              <ul>
+                <li v-if="newTime !== '' && isDisplayPrivateField('1')">
+                  <span>商品成本编号:</span>
+                  <span>{{ productinfo.spuCode }}</span>
+                </li>
+              </ul>
+              <i slot="reference" class="el-icon-warning-outline fr" />
+            </el-popover>
+          </template>
+
+          <template slot="noble">
+            <span v-if="productinfo.noble_metal">
+              {{ productinfo.noble_weight ? productinfo.noble_weight : "0" }}g-{{
+              productinfo.noble_name
+              }}-{{ productinfo.gold_price ? productinfo.gold_price : "0" }}元/g-{{
+              productinfo.is_gold_price + "" === "0" ? "不" : ""
+              }}启用实时金价-{{ productinfo.is_diff + "" === "1" ? "有" : "无" }}工差-{{
+              productinfo.config
+              }}-{{ productinfo.other_config }}
+            </span>
+          </template>
+
+          <template slot="weight">{{ productinfo.weight }}g</template>
+          <template slot="tax">{{ productinfo.tax }}%</template>
+          <template slot="is_stock">{{ String(productinfo.is_stock) === "0" ? "非库存品" : "库存品" }}</template>
+          <template
+            slot="is_exclusive"
+          >{{ String(productinfo.is_exclusive) === "0" ? "非泰康" : "泰康" }}</template>
+          <template slot="noble_weight">{{ productinfo.noble_weight }}g</template>
+          <template slot="is_gold_price">
+            {{
+            String(productinfo.is_gold_price) === "1" ? "是" : "否"
+            }}
+          </template>
+          <template slot="is_diff">
+            {{
+            String(productinfo.is_diff) === "1" ? "有公差" : "无工差"
+            }}
+          </template>
+
+          <template slot="packing_weight">{{ productinfo.packing_weight }}g</template>
+
+          <template slot="delivery_day">{{ productinfo.delivery_day }}天</template>
+          <template slot="lead_time">{{ productinfo.lead_time }}天</template>
+          <template slot="sample_day">{{ productinfo.sample_day }}天</template>
+          <template slot="delivery_place">{{ delivery_place }}</template>
+          <template slot="origin_place">{{ origin_place }}</template>
+        </show-data-table> -->
+
+        <el-tooltip v-if="type !== 'view'" content="重新选择组合商品" placement="top">
+          <i
+            class="el-icon-circle-close"
+            style="cursor:pointer;font-size:18px;margin-left:10px"
+            @click="resetProduct"
+          />
+        </el-tooltip>
+      </div>
+    </el-form-item>
+
+    <el-form-item label="所在仓库" prop="wsm_code" v-if="productinfo">
+      <el-table class="stock_table" row-key="id" ref="table" :data="productinfo.wsm_list" border size="mini" @select="handleSelection">
+        <el-table-column type="selection" width="40px">
+          <template slot="header">
+            <span></span>
+          </template>
+        </el-table-column>
+        <el-table-column label="仓库名称" prop="name" />
+        <el-table-column label="仓库编码" prop="wsm_code" />
+        <el-table-column label="可用库存" prop="usable_stock" />
+      </el-table>
+    </el-form-item>
+
+    <el-row>
+      <el-col :span="12">
+        <el-form-item label="解除库存数" prop="stock_num" label-width="110px">
+          <digital-input
+            :values="ruleForm.stock_num"
+            :placeholder="'添加库存数'"
+            :min="0"
+            :max="ruleForm.usable_stock"
+            :position="'right'"
+            :precision="0"
+            :size="'mini'"
+            :controls="false"
+            :append="''"
+            @reschange="number_change($event, 'stock_num')"
+          />
+        </el-form-item>
+      </el-col>
+
+      <el-col :span="12">
+        <el-form-item label="可解除库存数" prop="unstockTotal" label-width="110px">
+          <el-input placeholder="可解除库存数" v-model="ruleForm.usable_stock" disabled />
+        </el-form-item>
+      </el-col>
+    </el-row>
+
+    <el-form-item label="子商品库存情况" label-width="110px">
+      <el-table :data="productinfo ? productinfo.combind_list : []" size="mini" border>
+        <el-table-column label="子商品成本编号" prop="childCode" min-width="160px" />
+        <el-table-column label="子商品名称" prop="child_name" min-width="180px" show-overflow-tooltip />
+        <el-table-column label="组合比例" prop="child_num" />
+        <el-table-column label="剩余可解除库存数">
+          <template slot-scope="{ row }">{{ row.stock || 0 }}</template>
+        </el-table-column>
+      </el-table>
+    </el-form-item>
+
+    <el-form-item>
+      <div class="flex-end" style="width:100%;display:flex;justify-content:flex-end">
+        <el-button size="mini" type="primary" @click="submit">保存</el-button>
+      </div>
+    </el-form-item>
+
+    <stock-modal :visible.sync="sVisible" @selected="handleStockSelected" />
+    <product-modal :visible.sync="pVisible" @selected="handleProductSelected" />
+  </el-form>
+</template>
+
+<script>
+import StockModal from "./stockModal.vue";
+import ProductModal from "./productModal.vue";
+import asyncRequest from "@/apis/service/sellOut/combinedAdd";
+import { stockColumns, productColumns } from "./columnsForm";
+import privateField from "@/mixins/privateField";
+import { detailColumns } from "./../columns";
+import { isnumber, add_sum } from "@/utils/validate";
+
+const validateNum = (rule, value, callback) => {
+  if (value === "") {
+    callback(new Error("添加库存数不能为空!"));
+  } else {
+    const num = parseInt(value + "");
+    console.log(num);
+    if (!isnumber(value)) {
+      callback(new Error("添加库存数必须是整数!"));
+    } else if (num === NaN) {
+      callback(new Error("添加库存数必须是整数!"));
+    } else if (num === 0) {
+      callback(new Error("添加库存数不能为零!"));
+    } else {
+      callback();
+    }
+  }
+};
+
+export default {
+  name: "BaseForm",
+  components: { StockModal, ProductModal },
+  mixins: [privateField],
+  data() {
+    return {
+      detailColumns,
+      stockColumns,
+      productColumns,
+      sVisible: false,
+      pVisible: false,
+      stockinfo: null,
+      productinfo: null,
+      loading: {
+        product: false,
+        stock: false,
+        full: false
+      },
+      origin_place:"",
+      delivery_place:"",
+      ruleForm: {
+        spuCode: "",
+        wsm_code: "",
+        stock_num: 0,
+        usable_stock: 0
+      },
+      selected: [],
+      options6: [
+        { id: "1", name: "全国" },
+        { id: "2", name: "全国除偏远" }
+      ],
+      options3: [
+        { id: "0", name: "无销售权限" },
+        { id: "1", name: "有销售权限" }
+      ],
+      statusOptions: [
+        { id: "1", label: "待审核" },
+        { id: "2", label: "审核通过" },
+        { id: "3", label: "审核驳回" }
+      ],
+      rules: {
+        spuCode: [
+          { required: true, trigger: "change", message: "请选择组合商品" }
+        ],
+        wsm_code: [
+          { required: true, trigger: "change", message: "请选择所在仓库" }
+        ],
+        stock_num: [
+          { required: true, trigger: "change", validator: validateNum }
+        ]
+      }
+    };
+  },
+  methods: {
+    async submit() {
+      try {
+        await this.$refs.ruleForm.validate();
+        const { usable_stock, ...params } = this.ruleForm;
+
+        this.loading.full = true;
+        const { code, message } = await asyncRequest.add({
+          ...params,
+          wsm_code:this.productinfo.wsm_list[0].wsm_code,
+          flag: "0"
+        });
+        this.loading.full = false;
+
+        if (Number(code) === 0) {
+          this.$router.push("/sellOut/combinedRemove");
+          return;
+        } else if (code === 1004) {
+          this.$message.warning(message);
+        }
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    number_change(e, key) {
+      this.ruleForm[key] = e;
+      this.$nextTick(() => {
+        this.$refs.ruleForm && this.$refs.ruleForm.validateField(key);
+      });
+    },
+    handleSelection(selection, row){
+      // this.selected = list
+      this.$refs.table.clearSelection()
+      
+      if(selection.length === 0){
+        return
+      }
+
+      this.$refs.table.toggleRowSelection(row, true)
+      const { wsm_code = "" , usable_stock = 0} = row
+      this.ruleForm.wsm_code = wsm_code
+      this.ruleForm.usable_stock = usable_stock;
+      this.$refs.ruleForm.validate("wsm_code")
+    },
+    async getArea(prop = "delivery_place") {
+      const chunks = this.productinfo[prop].split(",");
+      let { data: province } = await asyncRequest.province();
+      province = province.find(
+        ({ province_code }) => province_code === chunks[0]
+      );
+      let { data: city } = await asyncRequest.city({ code: chunks[0] });
+      city = city.find(({ city_code }) => city_code === chunks[1]);
+      let { data: area } = await asyncRequest.area({ code: chunks[1] });
+      area = area.find(({ area_code }) => area_code === chunks[2]) || {};
+      return [province, city, area].map(({ name }) => name).join("");
+    },
+    resetProduct() {
+      this.productinfo = null;
+      this.ruleForm.spuCode = "";
+      // this.ruleForm.wsm_code = data.wsm_code;
+    },
+    async handleProductSelected(spuCode) {
+      this.loading.product = true;
+      const { code, data } = await asyncRequest.productinfo({ spuCode });
+
+      if (code !== 0) return;
+      this.productinfo = data;
+      this.ruleForm.spuCode = data.spuCode;
+      // this.ruleForm.wsm_code = data.wsm_code;
+      this.loading.product = false;
+
+      this.delivery_place = await this.getArea("delivery_place");
+      this.origin_place = await this.getArea("origin_place");
+    }
+  }
+};
+</script>
+
+
+<style scoped lang="scss">
+.stock_table{
+  /deep/ thead {
+    .el-table-column--selection{
+      .cell{
+        display: none;
+      }
+    }
+  }
+}
+</style>

+ 249 - 0
src/views/stock/combinedRemove/components/columnsForm.js

@@ -0,0 +1,249 @@
+export const stockColumns = [
+  {
+    title:"仓库信息"
+  },
+  {
+    label: "仓库名称",
+    prop: "name",
+    span: "12",
+  },
+  {
+    label: "仓库负责人",
+    prop: "contactor_name",
+    span: "6",
+  },
+  {
+    label: "负责人电话",
+    prop: "mobile",
+    span: "6",
+  },
+  {
+    label: "所在业务公司",
+    prop: "companyName",
+    span: "12",
+  },
+  {
+    label: "所在供应商公司",
+    prop: "supplierName",
+    span: "12",
+  },
+  {
+    label: "仓库所在省市区",
+    prop: "source",
+    span: 12,
+  },
+  {
+    label: "仓库所在详细地址",
+    prop: "addr",
+    span: 6,
+  },
+  {
+    label: "仓库类型",
+    prop: "type_name",
+    span: 6,
+  },
+  {
+    title:"收发货信息"
+  },
+  {
+    label: "收发货联系人",
+    prop: "wsm_name",
+    span: 6,
+  },
+  {
+    label: "联系人职位",
+    prop: "position",
+    span: 6,
+  },
+  {
+    label: "联系人电话",
+    prop: "wsm_mobile",
+    span: 12,
+  },
+  {
+    label: "省市区",
+    prop: "target",
+    span: 12,
+  },
+  {
+    label: "详细地址",
+    prop: "wsm_addr",
+    span: 12,
+  },
+];
+
+export const productColumns = [
+  {
+    prop: "cat_info",
+    label: "商品分类",
+    span: 8,
+    _slot_: "cat_info",
+  },
+  {
+    prop: "good_img",
+    label: "商品主图",
+    _slot_: "good_img",
+    span: 8,
+  },
+  {
+    prop: "good_info_img",
+    _slot_: "good_info_img",
+    label: "详情图片",
+    span: 8,
+  },
+  {
+    prop: "good_name",
+    label: "商品名称",
+    _slot_: "good_name",
+    span: 24,
+  },
+  {
+    prop: "companyName",
+    label: "业务公司",
+    span: 12,
+  },
+  {
+    prop: "supplierName",
+    label: "供应商",
+    span: 12,
+  },
+  {
+    prop: "brand_name",
+    label: "商品品牌",
+    span: 6,
+  },
+  {
+    prop: "is_auth",
+    label: "销售权限",
+    _slot_: "is_auth",
+    span: 6,
+  },
+  {
+    prop: "unit",
+    label: "单位",
+    span: 6,
+  },
+  {
+    prop: "tax",
+    label: "税点",
+    _slot_: "tax",
+    span: 6,
+  },
+  {
+    prop: "is_exclusive",
+    label: "专属类型",
+    _slot_: "is_exclusive",
+    span: 6,
+  },
+  {
+    prop: "weight",
+    label: "商品总重量",
+    _slot_: "weight",
+    span: 6,
+  },
+  {
+    prop: "is_stock",
+    label: "是否库存品",
+    _slot_: "is_stock",
+    span: 6,
+  },
+  {
+    prop: "is_combind",
+    label: "组合类型",
+    _slot_: "is_combind",
+    span: 6,
+  },
+  {
+    prop: "noble",
+    _slot_: "noble",
+    label: "贵金属信息",
+    span: 24,
+  },
+  {
+    prop: "after_sales",
+    label: "售后说明",
+    span: 24,
+  },
+  {
+    prop: "good_remark",
+    label: "商品备注",
+    span: 24,
+  },
+  {
+    prop: "craft_desc",
+    label: "工艺说明",
+    span: 24,
+  },
+  {
+    prop: "packing_way",
+    label: "包装方式",
+    span: 6,
+  },
+  {
+    prop: "packing_spec",
+    label: "装箱规格",
+    span: 6,
+  },
+  {
+    prop: "packing_weight",
+    label: "装箱重量",
+    _slot_: "packing_weight",
+    span: 6,
+  },
+  {
+    prop: "packing_size",
+    label: "装箱尺寸",
+    span: 6,
+  },
+  {
+    prop: "good_size",
+    label: "装箱尺寸",
+    span: 6,
+  },
+  {
+    prop: "good_bar",
+    label: "商品条形码",
+    span: 6,
+  },
+  {
+    prop: "packing_list",
+    label: "商品清单",
+    span: 12,
+  },
+  {
+    prop: "packing_spec",
+    label: "供货区域",
+    span: 6,
+    _slot_: "packing_spec",
+  },
+  {
+    prop: "delivery_day",
+    label: "物流天数",
+    _slot_: "delivery_day",
+    span: 6,
+  },
+  {
+    prop: "lead_time",
+    label: "供货周期",
+    _slot_: "lead_time",
+    span: 6,
+  },
+  {
+    prop: "sample_day",
+    label: "调样周期",
+    _slot_: "sample_day",
+    span: 6,
+  },
+  {
+    prop: "delivery_place",
+    label: "发货地",
+    span: 12,
+    _slot_: "delivery_place",
+  },
+  {
+    prop: "origin_place",
+    label: "产地",
+    span: 12,
+    _slot_: "origin_place",
+  },
+];

+ 600 - 0
src/views/stock/combinedRemove/components/productModal.vue

@@ -0,0 +1,600 @@
+<template>
+  <el-dialog
+    center
+    title="选择组合商品"
+    :visible="_visible"
+    :close-on-click-modal="false"
+    :append-to-body="true"
+    width="1024px"
+    top="5vh"
+    class="child-product"
+    @close="handleClose"
+  >
+    <ex-table
+      v-loading="loading"
+      :table="table"
+      :data="tableData"
+      :columns="columns"
+      :page="pageInfo"
+      :size="size"
+      @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+      @screen-reset="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+      @screen-submit="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+      @selection="selectionChange"
+    >
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="padding: 0 0 10px 0px">
+            <el-col :span="6" style="width: 303px">
+              <period-date-picker
+                :type="1"
+                :width="'135px'"
+                :size="searchSize"
+                :start="parmValue.start"
+                :end="parmValue.end"
+                @timeReturned="handleTime"
+              />
+            </el-col>
+            <el-col :span="4" style="width: 135px">
+              <search-brand
+                :value="brandid"
+                :disabled="false"
+                :size="'mini'"
+                :is-detail="true"
+                :names="parmValue.supplierName"
+                :placeholder="'商品品牌'"
+                @searchChange="brandidsearchChange"
+              />
+            </el-col>
+            <el-col :span="6" style="width: 310px; padding: 0 0 0 10px">
+              <good-class
+                :value="parmValue.cat_id"
+                :disabled="false"
+                :size="searchSize"
+                :is-detail="false"
+                :placeholder="'分类'"
+                @handleChange="goods_class_change"
+              />
+            </el-col>
+
+            <el-col :span="3" class="fr" style="width: 66px; padding: 0 0 0 10px">
+              <el-button type="primary" :size="searchSize" @click="searchList">刷新</el-button>
+            </el-col>
+
+            <el-col :span="3" class="fr" style="width: 66px; padding: 0 0 0 10px">
+              <el-button type="warning" :size="searchSize" @click="restSearch">重置</el-button>
+            </el-col>
+          </el-row>
+          <el-row>
+            <!-- <el-col :span="4" style="width: 226px">
+              <el-select
+                v-model="parmValue.status"
+                filterable
+                clearable
+                :size="searchSize"
+                placeholder="状态"
+                style="width: 100%"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in statusList"
+                  :key="'status' + item.code"
+                  :label="item.name"
+                  :value="item.code"
+                />
+              </el-select>
+            </el-col>-->
+            <el-col :span="4" style="width: 145px; padding: 0 0 0 0px">
+              <el-select
+                v-model="parmValue.isonline"
+                filterable
+                clearable
+                :size="searchSize"
+                placeholder="是否上线"
+                style="width: 100%"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in isonlineoptions"
+                  :key="'isonline' + item.id"
+                  :label="item.name"
+                  :value="item.id"
+                />
+              </el-select>
+            </el-col>
+
+            <!-- <el-col :span="4" style="width: 135px;margin-left:10px">
+              <el-select
+                v-model="parmValue.is_stock"
+                size="mini"
+                style="width: 100%"
+                placeholder="商品类型"
+                clearable
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="opt in isStockOptions"
+                  :key="opt.value"
+                  :value="opt.value"
+                  :label="opt.label"
+                />
+              </el-select>
+            </el-col>-->
+            <el-col :span="4" style="margin: 0 10px">
+              <search-supplier
+                :size="'mini'"
+                style="width: 165px"
+                :value="supplierNo"
+                :disabled="false"
+                :placeholder="'供应商名称'"
+                :is-detail="false"
+                :no-disabled="true"
+                :names="''"
+                @searchChange="supplierChange"
+              />
+            </el-col>
+
+            <el-col :span="4" style="width: 420px">
+              <el-input
+                v-model="sinput"
+                :size="searchSize"
+                :maxlength="40"
+                placeholder="关键字"
+                @blur="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-select
+                  slot="prepend"
+                  v-model="select"
+                  style="width: 135px"
+                  placeholder="关键字类型"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-option label="商品编号" value="1" />
+                  <el-option label="商品名称" value="2" />
+                </el-select>
+              </el-input>
+            </el-col>
+          </el-row>
+        </div>
+      </template>
+
+      <template #spuCode="{ scope }">
+        <div style="display:flex;align-items:center">
+          <p>{{ scope.row.spuCode }}</p>
+        </div>
+      </template>
+
+      <template #good_thumb_img="{ scope }">
+        <div
+          v-if="scope.row.good_thumb_img"
+          v-viewer
+          style="width: 20px; height: 20px"
+          class="hover"
+        >
+          <img
+            :src="scope.row.good_thumb_img"
+            style="display: inline-block; width: 100%; height: 100%"
+            alt
+          >
+        </div>
+      </template>
+      <template #status="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="
+            (statusList.find((item) => item.code == scope.row.status) || {}).type || '--'
+          "
+          v-text="
+            (statusList.find((item) => item.code == scope.row.status) || {}).name || '--'
+          "
+        />
+      </template>
+      <template #has_account="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="
+            (
+              has_account_list.find((item) => item.code == scope.row.has_account + '') ||
+              {}
+            ).type || '--'
+          "
+          v-text="
+            (
+              has_account_list.find((item) => item.code == scope.row.has_account + '') ||
+              {}
+            ).name || '--'
+          "
+        />
+      </template>
+      <template #isonline="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="scope.row.is_online == '0' ? 'warning' : ''"
+          v-text="
+            (isonlineoptions.find((item) => item.id == scope.row.is_online) || {}).name ||
+              '--'
+          "
+        />
+      </template>
+      <template #is_stock="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="scope.row.is_stock == '0' ? 'warning' : ''"
+          v-text="
+            (options4.find((item) => item.id == scope.row.is_stock) || {}).name || '--'
+          "
+        />
+      </template>
+    </ex-table>
+
+    <div style="display:flex;justify-content:flex-end">
+      <el-button size="mini" type="primary" @click="onSave">保 存</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import { has_account_list, isStockOptions } from '@/assets/js/statusList'
+import asyncRequest from '@/apis/service/goodStore/goodsCost'
+import mixinPage from '@/mixins/elPaginationHandle'
+import resToken from '@/mixins/resToken'
+
+export default {
+  name: 'ProductListModal',
+  mixins: [mixinPage, resToken],
+  props: ['visible'],
+  data() {
+    return {
+      options1: [
+        { id: '0', name: '否' },
+        { id: '1', name: '是' }
+      ],
+      options4: [
+        { id: '0', name: '非库存品' },
+        { id: '1', name: '库存品' }
+      ],
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: []
+      },
+      loading: false,
+      selected: [],
+      size: 'mini',
+      searchSize: 'mini',
+      tablebtnSize: 'mini',
+      sinput: '',
+      select: '1',
+      parmValue: {
+        page: 1, // 页码
+        size: 10, // 每页显示条数
+        is_stock: '',
+        start: '',
+        end: '',
+        status: '',
+        good_name: '',
+        spucode: '',
+        cat_id: [],
+        brandid: '',
+        good_type: '',
+        companyNo: '',
+        supplierNo: '',
+        isonline: '',
+        company_name: '' // 创建人部门
+      },
+      has_account_list,
+      isStockOptions,
+      pageInfo: {
+        size: 10,
+        curr: 1,
+        total: 0
+      },
+      isonlineoptions: [
+        { id: '0', name: '未上线' },
+        { id: '1', name: '已上线' }
+      ],
+      statusList: [
+        {
+          code: '0',
+          name: '新建待审核',
+          type: ''
+        },
+        {
+          code: '1',
+          name: '审核通过',
+          type: 'success'
+        },
+        {
+          code: '2',
+          name: '基础修改待审核',
+          type: ''
+        },
+        {
+          code: '3',
+          name: '成本修改待审核',
+          type: ''
+        },
+        {
+          code: '4',
+          name: '基础修改驳回',
+          type: 'danger'
+        },
+        {
+          code: '5',
+          name: '成本修改驳回',
+          type: 'danger'
+        },
+        {
+          code: '6',
+          name: '新建审核驳回',
+          type: 'danger'
+        },
+        {
+          code: '7',
+          name: '复制商品待编辑',
+          type: 'info'
+        },
+        {
+          code: '8',
+          name: '竞价商品待编辑',
+          type: 'info'
+        }
+      ],
+      columns: [
+        { type: 'selection', fixed: 'left', _noset_: true },
+        {
+          prop: 'spuCode',
+          label: '编号',
+          width: '180px',
+          _slot_: 'spuCode'
+        },
+        {
+          prop: 'good_thumb_img',
+          label: '图片',
+          _slot_: 'good_thumb_img',
+          width: '45px'
+        },
+        {
+          prop: 'good_name',
+          label: '名称',
+          'min-width': '160px'
+        },
+        {
+          prop: 'cat_name',
+          label: '分类'
+        },
+        {
+          prop: 'brand_name',
+          label: '品牌'
+        },
+        {
+          prop: 'is_stock',
+          label: '库存类型',
+          _slot_: 'is_stock',
+          width: '85px'
+        },
+        // {
+        //   prop: "is_combind",
+        //   label: "是否组合商品",
+        //   width: "105px",
+        //   _slot_: "is_combind"
+        // },
+        {
+          prop: 'isonline',
+          label: '是否上线',
+          _slot_: 'isonline',
+          width: '70px'
+        },
+        {
+          prop: 'status',
+          label: '状态',
+          _slot_: 'status',
+          width: '118px'
+        },
+        {
+          prop: 'has_account',
+          label: '供应商账号',
+          _slot_: 'has_account',
+          width: '85px'
+        },
+        {
+          prop: 'supplierNo',
+          label: '供应商编号',
+          width: '110px'
+        },
+        {
+          prop: 'supplierName',
+          label: '供应商名称',
+          width: '110px'
+        },
+        {
+          prop: 'companyNo',
+          label: '业务公司编号',
+          width: '110px'
+        },
+        {
+          prop: 'companyName',
+          label: '业务公司名称',
+          width: '110px'
+        },
+        {
+          prop: 'charger_company_name',
+          label: '负责人部门',
+          minWidth: '150px'
+        },
+
+        {
+          prop: 'charger',
+          label: '负责人',
+          width: '70px'
+        },
+        {
+          prop: 'creater',
+          label: '创建人',
+          width: '70px'
+        },
+
+        {
+          prop: 'addtime',
+          label: '创建时间',
+          width: '140px'
+        }
+      ],
+      tableData: []
+    }
+  },
+  computed: {
+    _visible: {
+      get() {
+        return this.visible
+      },
+      set(nV) {
+        this.$emit('update:visible', nV)
+      }
+    }
+  },
+  watch: {
+    visible(v) {
+      if (!v) return
+      this.searchList()
+    }
+  },
+  methods: {
+    selectionChange(evt) {
+      const { list } = evt
+      this.selected = list
+    },
+    restSearch() {
+      this.select = '2'
+      this.sinput = ''
+      this.supplierNo = []
+      this.brandid = []
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0
+      }
+      this.parmValue = {
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+        start: '',
+        end: '',
+        status: '',
+        good_name: '',
+        company_name: '', // 创建人部门
+        spucode: '',
+        cat_id: [],
+        brandid: '',
+        good_type: '',
+        isonline: '',
+        companyNo: '',
+        supplierNo: ''
+      }
+      this.searchList()
+    },
+    handleClose() {
+      this.selected = []
+      this._visible = false
+    },
+    proportionChange(proportion) {
+      this.ruleForm.proportion = proportion
+    },
+    onSave() {
+      if (this.selected.length === 0 || this.selected.length > 1) {
+        const message =
+          this.selected.length === 0 ? '请选择一条商品' : '只能选择一条商品'
+        this.$message.warning(message)
+        return
+      }
+
+      const { spuCode, id } = this.selected[0]
+      this.$emit('selected', spuCode, id)
+      this._visible = false
+    },
+    async searchList() {
+      console.log(this.parmValue)
+      if (
+        (this.parmValue.start !== '' && this.parmValue.end === '') ||
+        (this.parmValue.start === '' && this.parmValue.end !== '')
+      ) {
+        this.$message.warning('时间区间不完整!')
+        return
+      }
+      this.loading = true
+      const item = JSON.parse(JSON.stringify(this.parmValue))
+      item.spucode = this.select === '1' ? this.sinput : ''
+      item.good_name = this.select === '2' ? this.sinput : ''
+      item.companyNo = this.select === '3' ? this.sinput : ''
+      item.supplierNo = this.select === '4' ? this.sinput : ''
+      item.company_name = this.select === '5' ? this.sinput : '' // 部门
+      item.cat_id =
+        item.cat_id.length > 0 ? item.cat_id[item.cat_id.length - 1] : ''
+      const res = await asyncRequest.copy_list({
+        ...item,
+        supplierNo: Array.isArray(this.supplierNo) ? this.supplierNo[0] : '',
+        needRela: true,
+        is_combind: '1',
+        is_stock: '1',
+        status: '1'
+      })
+
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list
+        this.tableData.forEach(a => {
+          a.cat_name = ''
+          const list = a.cat_info || []
+          list.forEach((b, i) => {
+            a.cat_name += i == 0 ? b.name : '/' + b.name
+          })
+        })
+        this.pageInfo.total = Number(res.data.count)
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout()
+      } else {
+        this.tableData = []
+        this.pageInfo.total = 0
+      }
+      // this.getresultlist();
+      this.loading = false
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.child-product {
+  /deep/ .el-pagination {
+    float: left !important;
+  }
+}
+</style>

+ 355 - 0
src/views/stock/combinedRemove/components/stockModal.vue

@@ -0,0 +1,355 @@
+<template>
+  <el-dialog
+    class="stock-dialog"
+    top="8vh"
+    title="选择仓库"
+    center
+    :visible="_visible"
+    @close="handleClose"
+    width="1024px"
+  >
+    <ex-table
+      v-loading="loading"
+      :table="table"
+      :data="tableData"
+      :columns="columns"
+      :page="pageInfo"
+      :size="size"
+      @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+      @selection="handleSelection"
+      @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+      @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+    >
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="padding: 0 0 10px 0px">
+            <!-- 创建时间 -->
+            <el-col :span="18" style="width: 303px; padding: 0">
+              <period-date-picker
+                :start="parmValue.start"
+                :end="parmValue.end"
+                :type="1"
+                :width="'135px'"
+                :title="'创建'"
+                :size="searchSize"
+                @numReturned="numReturned($event, 0)"
+              />
+            </el-col>
+            <el-col :span="18" style="width: 340px; padding: 0">
+              <search-supplier
+                :value="supplierNo"
+                :size="searchSize"
+                :code="parmValue.supplierNo"
+                :placeholder="'供应商公司名称'"
+                :is-detail="false"
+                :disabled="false"
+                :names="''"
+                @searchChange="supplierChange"
+              />
+              <!-- <search-customer
+                  :value="supplierNo"
+                  :size="searchSize"
+
+                  :placeholder="'供应商公司名称'"
+                  :disabled="false"
+                  @searchChange="supplierChange"
+              />-->
+            </el-col>
+
+            <el-col :span="3" style="width: 56px; margin-left: 10px" class="fr">
+              <el-button :size="searchSize" type="primary" @click="searchList">刷新</el-button>
+            </el-col>
+          </el-row>
+          <el-row style="padding: 0">
+            <el-col :span="4" style="width: 120px; padding: 0">
+              <el-select
+                v-model="parmValue.wsm_type"
+                style="width: 100%"
+                clearable
+                :size="searchSize"
+                @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                placeholder="仓库类型"
+              >
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                ></el-option>
+              </el-select>
+            </el-col>
+            <el-col :span="18" style="width: 420px; padding: 0 0 0 10px">
+              <el-input
+                placeholder="关键字"
+                v-model="input"
+                maxlength="40"
+                :size="searchSize"
+                class="input-with-select"
+              >
+                <el-select v-model="select" slot="prepend" style="width: 125px" placeholder="关键字类型">
+                  <el-option label="仓库编码" value="1"></el-option>
+                  <el-option label="负责人姓名" value="2"></el-option>
+                  <el-option label="负责人手机号" value="3"></el-option>
+                  <el-option label="负责人部门" value="4"></el-option>
+                </el-select>
+                <el-button slot="append" icon="el-icon-search" @click="searchList"></el-button>
+              </el-input>
+            </el-col>
+            <el-col :span="4" style="width: 66px; padding-left: 10px" class="fr">
+              <el-button type="warning" class="fl" :size="searchSize" @click="restSearch">重置</el-button>
+            </el-col>
+          </el-row>
+        </div>
+      </template>
+      <template #status="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="scope.row.status == '0' ? 'warning' : ''"
+          v-text="
+              (statusOptions.find((item) => item.id == scope.row.status) || {}).label ||
+              '--'
+            "
+        ></el-tag>
+      </template>
+
+      <template
+        #wsm_type="{scope}"
+      >{{(options.find((item) => item.value === String(scope.row.wsm_type)) || {}).label || '--'}}</template>
+    </ex-table>
+
+    <div style="display:flex;justify-content:flex-end">
+      <el-button size="mini" type="primary" @click="submit">保 存</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import asyncRequest from "@/apis/service/sellOut/combindAdd";
+import mixinPage from "@/mixins/elPaginationHandle";
+export default {
+  name: "StockModal",
+  props: ["visible"],
+  mixins: [mixinPage],
+  computed: {
+    _visible: {
+      get() {
+        return this.visible;
+      },
+      set(nV) {
+        this.$emit("update:visible", nV);
+      }
+    }
+  },
+  data() {
+    return {
+      selected: [],
+      options: [
+        {
+          value: "5",
+          label: "销售仓"
+        },
+        {
+          value: "4",
+          label: "次品仓"
+        }
+      ],
+      searchSize: "mini",
+      select: "",
+      input: "",
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: []
+      },
+      pageInfo: {
+        size: 10,
+        curr: 1,
+        total: 0
+      },
+      loading: false,
+      parmValue: {
+        supplierNo: "", //供应商编码
+        wsm_code: "", //仓库编码
+        wsm_type: "",
+        start: "", //新建起始时间
+        end: "", //新建结束时间
+        mobile: "", //手机号
+        contactor_name: "", //联系人
+        size: 10,
+        page: 1
+      },
+      tablebtnSize: "mini",
+      statusOptions: [
+        { id: "0", label: "禁用" },
+        { id: "1", label: "启用" }
+      ],
+      columns: [
+        {
+          type: "selection",
+          width: "80px",
+          fixed: 'left'
+        },
+        {
+          prop: "wsm_code",
+          label: "编号",
+          width: "170px"
+        },
+        {
+          prop: "name",
+          label: "仓库名称",
+          minWidth: "160px"
+        },
+        {
+          prop: "wsm_type",
+          label: "仓库类型",
+          width: "80px",
+          _slot_: "wsm_type"
+        },
+        {
+          prop: "companyNo",
+          label: "业务公司编码",
+          width: "140px"
+        },
+        {
+          prop: "company_name",
+          label: "业务公司",
+          "min-width": "140px"
+        },
+        {
+          prop: "status",
+          label: "状态",
+          width: "60px",
+          // ,
+          _slot_: "status"
+        },
+        {
+          prop: "contactor_name",
+          label: "负责人",
+          minWidth: "70px"
+        },
+        {
+          prop: "mobile",
+          label: "负责人电话",
+          width: "100px"
+        },
+        {
+          prop: "creater",
+          label: "创建人",
+          width: "70px"
+        },
+        {
+          prop: "addtime",
+          label: "创建时间",
+          width: "140px"
+        }
+      ]
+    };
+  },
+  watch: {
+    _visible(NV) {
+      if (!NV) return;
+      this.searchList();
+    }
+  },
+  methods: {
+    handleClose() {
+      this._visible = false;
+    },
+    submit() {
+      if (this.selected.length === 0 || this.selected.length > 1) {
+        const message =
+          this.selected.length === 0 ? "请选择一个仓库" : "只能选择一个仓库";
+        this.$message.warning(message);
+        return;
+      }
+
+      const { wsm_code, id } = this.selected[0];
+      this.$emit("selected", { code: wsm_code, id });
+      this._visible = false;
+    },
+    restSearch() {
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 10,
+        curr: 1,
+        total: 0
+      };
+      this.supplierNo = [];
+      this.input = "";
+      this.select = "1";
+      this.parmValue = {
+        supplierNo: "", //供应商编码
+        wsm_code: "", //仓库编码
+        wsm_type: "",
+        start: "", //新建起始时间
+        company_new_name: "", //负责人部门
+        end: "", //新建结束时间
+        mobile: "", //手机号
+        contactor_name: "", //联系人
+        page: 1, // 页码
+        size: 10 // 每页显示条数
+      };
+      this.searchList();
+    },
+    handleSelection(evt) {
+      const { list } = evt;
+      this.selected = list;
+    },
+    async searchList() {
+      if (
+        (this.parmValue.start !== "" && this.parmValue.end === "") ||
+        (this.parmValue.start == "" && this.parmValue.end != "")
+      ) {
+        this.$message.warning("开始时间和结束时间不能为空");
+        return;
+      }
+      this.loading = true;
+      this.parmValue.wsm_code = this.select === "1" ? this.input : "";
+      this.parmValue.contactor_name = this.select === "2" ? this.input : "";
+      this.parmValue.mobile = this.select === "3" ? this.input : "";
+      this.parmValue.company_new_name = this.select === "4" ? this.input : "";
+
+      const { code, data } = await asyncRequest.stock({
+        ...this.parmValue,
+        needRela: true
+      });
+
+      if (code === 0) {
+        const { list, count } = data ?? {};
+        console.log(list);
+        this.tableData = list;
+        this.pageInfo.total = Number(count ?? "0");
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.stock-dialog {
+  /deep/ .el-pagination {
+    float: left !important;
+  }
+}
+</style>

+ 58 - 0
src/views/stock/combinedRemove/components/waitApproval.vue

@@ -0,0 +1,58 @@
+<template>
+  <el-form ref="ruleForm" label-width="80px" size="mini" :model="ruleForm" :rules="rules">
+    <el-form-item label="状态" prop="status">
+      <el-select v-model="ruleForm.status" style="width:100%">
+        <el-option value="2" label="通过" />
+        <el-option value="3" label="驳回" />
+      </el-select>
+    </el-form-item>
+
+    <el-form-item label="备注" prop="remark">
+      <el-input placeholder="备注" v-model="ruleForm.remark" type="textarea" />
+    </el-form-item>
+
+    <el-form-item>
+      <div class="fr">
+        <el-button type="primary" @click="submit">保 存</el-button>
+      </div>
+    </el-form-item>
+  </el-form>
+</template>
+
+
+<script>
+export default {
+  name: "waitApproval",
+  computed: {
+    rules() {
+      return {
+        status: [{ required: true, message: "请选择状态", trigger: "change" }],
+        remark: [
+          {
+            required: this.ruleForm.status === "3",
+            message: "请输入备注",
+            trigger: "change"
+          }
+        ]
+      };
+    }
+  },
+  data() {
+    return {
+      ruleForm: {
+        status: "2",
+        remark: ""
+      }
+    };
+  },
+  methods: {
+    submit() {
+      this.$refs.ruleForm.validate(isValid => {
+        if(!isValid) return
+        const { status, remark } = this.ruleForm;
+        this.$emit("confirm", { status, remark });
+      })
+    }
+  }
+};
+</script>

+ 232 - 0
src/views/stock/combinedRemove/detail.vue

@@ -0,0 +1,232 @@
+<template>
+  <div class="zxDiffOrderDetail pagePadding">
+    <div style="width: 100%" v-if="powers.some((i) => i == '007')" v-loading="loading">
+      <el-tabs v-model="activeTabs">
+        <el-tab-pane label="业务详情" name="1">
+          <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
+            <el-collapse-item :title="title" name="1" v-if="type === 'add'">
+              <base-form />
+            </el-collapse-item>
+
+            <template v-else>
+              <el-collapse-item title="库存解除申请详情" name="2" v-if="sitem">
+                <show-data-table :sitem="sitem" :newTime="newTime" :columns="detailColumns_j">
+                  <template #status>
+                    <el-tag
+                      size="mini"
+                      :type="sitem.status == '1' ? 'warning' : ''"
+                    >{{(statusOptions.find((item) => item.id == String(sitem.status)) || {}).label || '--'}}</el-tag>
+                  </template>
+
+                  <template #wsmtype>
+                    <el-tag
+                      size="mini"
+                    >{{(wsm_options.find(({value}) => value === sitem.wsm_type) || {}).label || '--'}}</el-tag>
+                  </template>
+                </show-data-table>
+              </el-collapse-item>
+
+              <el-collapse-item title="组合商品详情" name="5" v-if="sitem && sitem.spuCode">
+                <show-goods-data-table
+                  v-if="newTime !== ''"
+                  type="1"
+                  :iscgd="true"
+                  :newTime="newTime"
+                  :spucode="sitem.spuCode"
+                  :isStockInfo="true"
+                  :isRemoveStock="true"
+                />
+              </el-collapse-item>
+
+              <el-collapse-item title="子商品信息" name="4">
+                <el-table :data="sitem ? sitem.combindgood : []" size="mini" border>
+                  <el-table-column label="子商品成本编号" prop="childCode" min-width="160px" />
+                  <el-table-column
+                    label="子商品名称"
+                    prop="child_name"
+                    min-width="180px"
+                    show-overflow-tooltip
+                  />
+                  <el-table-column label="组合比例" prop="child_num" />
+                  <el-table-column label="本次解除库存数">
+                    <template
+                      slot-scope="{ row }"
+                    >{{ ((row.child_num || 0) * ( sitem.stock_num || 0)) || 0}}</template>
+                  </el-table-column>
+                  <!-- <el-table-column label="锁定库存总数">
+                    <template slot-scope="scope">{{ scope.row.stock || 0 }}</template>
+                  </el-table-column>
+                  <el-table-column label="锁定库存可用库存数">
+                    <template slot-scope="scope">{{ scope.row.usable_stock || 0 }}</template>
+                  </el-table-column> -->
+                </el-table>
+              </el-collapse-item>
+
+             <el-collapse-item
+                v-if="sitem && Number(sitem.status) === 1 && !isSupertube && ppowers.includes('1')"
+                title="待审核"
+                name="3"
+              >
+                <div style="width:600px">
+                  <wait-approval @confirm="setStatus" />
+                </div>
+              </el-collapse-item>
+            </template>
+          </el-collapse>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+<script>
+import ProductDetail from "@/components/details/src/product.vue";
+import asyncRequest from "@/apis/service/sellOut/combinedAdd";
+import { xs_order_type_options } from "@/assets/js/statusList";
+import { showColumns, detailColumns } from "./columns";
+import WaitApproval from "./components/waitApproval";
+import mixinPage from "@/mixins/elPaginationHandle";
+import BaseForm from "./components/baseForm";
+import resToken from "@/mixins/resToken";
+import { mapGetters } from "vuex";
+export default {
+  name: "combinedRemoveDetail",
+  mixins: [mixinPage, resToken],
+  components: { BaseForm, WaitApproval, ProductDetail },
+  computed: {
+    ...mapGetters(["isSupertube"]),
+    type() {
+      return this.$route.query.id;
+    },
+    title() {
+      const { query } = this.$route;
+      return query.id === "add"
+        ? "新建组合商品库存解除申请"
+        : "组合商品库存详情";
+    },
+    powers() {
+      const { btnList } = this.$store.getters;
+      const tran =
+        btnList.find(item => item.menu_route == "combinedRemoveDetail") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    },
+    ppowers() {
+      const tran =
+        this.$store.getters.roleProcess.find((i) => i.process_type === "ZHJC") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    }
+  },
+  data() {
+    return {
+      showModel: false,
+      showColumns: showColumns,
+      activeTabs: "1",
+      activeNames: ["-1", "0", "1", "2", "3", "4", "5", "10"],
+      statusOptions: [
+        { id: "1", label: "待审核" },
+        { id: "2", label: "审核通过" },
+        { id: "3", label: "审核驳回" }
+      ],
+      detailColumns_j:detailColumns,
+      xs_order_type_options,
+      customer_remark_options: [
+        {
+          value: "1",
+          label: "竞价订单减工差"
+        },
+        {
+          value: "2",
+          label: "竞价订单不减工差"
+        }
+      ],
+      wsm_options: [
+        {
+          value: "5",
+          label: "销售仓"
+        },
+        {
+          value: "4",
+          label: "次品仓"
+        }
+      ],
+      is_act_options: [
+        {
+          value: "1",
+          label: "接受工差"
+        },
+        {
+          value: "2",
+          label: "不接受工差-退回重做"
+        }
+      ],
+      sitem: {},
+      status: "",
+      newTime: "",
+      loading: false,
+      queryId: ""
+    };
+  },
+  mounted() {
+    this.status = "";
+    this.queryId = this.$route.query.id;
+
+    if (this.queryId !== "add") {
+      this.initData();
+    }
+  },
+  methods: {
+    getNewTime() {
+      this.newTime = new Date().valueOf() + "";
+    },
+
+    async setStatus(param) {
+      if (!this.loading) {
+        this.loading = true;
+
+        let model = {
+          id: this.queryId,
+          ...param
+        };
+
+        const res = await asyncRequest.status(model);
+        this.loading = false;
+        if (res && res.code === 0) {
+          this.initData();
+        } else if (res && res.code >= 100 && res.code <= 104) {
+          await this.logout();
+        } else {
+          this.$message.warning(res.message);
+        }
+      }
+    },
+    async initData() {
+      const res = await asyncRequest.detail({ id: this.queryId });
+      if (res && res.code === 0 && res.data) {
+        this.sitem = res.data;
+        const { can, status } = res.data;
+        this.status = status;
+        this.sitem.class_cat = "";
+        if (can && can.length > 0) {
+          can.forEach((x, i) => {
+            this.sitem.class_cat += i === 0 ? x.name : "/" + x.name;
+          });
+        }
+        this.getNewTime();
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.zxDiffOrderDetail {
+}
+</style>

+ 481 - 0
src/views/stock/combinedRemove/index.vue

@@ -0,0 +1,481 @@
+<template>
+  <div class="zxDiffOrder pagePadding">
+    <div v-if=" powers.some((i) => i == '001')">
+      <ex-table
+        :table="table"
+        v-loading="loading"
+        :data="tableData"
+        :columns="columns"
+        :page="pageInfo"
+        :size="size"
+        @page-curr-change="handlePageChange"
+        @page-size-change="handleSizeChange"
+        @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+        @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.pageß = 1;
+          searchList();
+        "
+      >
+        <template #table-header="{}">
+          <div style="width: 100%">
+            <el-row style="padding: 0 0 0 80px">
+              <el-col :span="24">
+                <el-col :span="6" style="width: 355px;">
+                  <period-date-picker
+                    :create_end="parmValue.create_end"
+                    :create_start="parmValue.create_start"
+                    :type="1"
+                    :width="'165px'"
+                    :size="searchSize"
+                    @timeReturned="timeReturned($event)"
+                  />
+                </el-col>
+
+                <el-col :span="4" style="margin-left: 10px">
+                  <el-select
+                    style="width:100%"
+                    placeholder="状态"
+                    v-model="parmValue.status"
+                    size="mini"
+                    clearable
+                    @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
+                  >
+                    <el-option
+                      v-for="s in statusOptions"
+                      :label="s.label"
+                      :value="s.id"
+                      :key="s.id"
+                    />
+                  </el-select>
+                </el-col>
+
+                <el-col :span="3" style="width: 66px; float: right">
+                  <el-button
+                    type="primary"
+                    :size="searchSize"
+                    @click="searchList"
+                    style="float: right; margin-left: 5px"
+                  >刷新</el-button>
+                </el-col>
+
+                <el-col :span="4" style="width: 66px; float: right">
+                  <el-button type="warning" class="fr" :size="searchSize" @click="restSearch">重置</el-button>
+                </el-col>
+              </el-col>
+            </el-row>
+            <el-row style="margin-top: 10px">
+              <el-col :span="6" style="width: 400px">
+                <el-input
+                  v-model="value"
+                  :size="searchSize"
+                  placeholder="关键字"
+                  clearable
+                  :maxlength="40"
+                  @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
+                >
+                  <template #prepend>
+                    <el-select
+                      v-model="parmValue.key"
+                      style="width:100px"
+                      @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
+                    >
+                      <el-option label="商品名称" value="spuCode" />
+                      <el-option label="商品编码" value="good_name" />
+                    </el-select>
+                  </template>
+
+                  <el-button
+                    slot="append"
+                    icon="el-icon-search"
+                    @click="
+                        pageInfo.curr = 1;
+                        parmValue.page = 1;
+                        searchList();
+                      "
+                  ></el-button>
+                </el-input>
+              </el-col>
+
+              <el-button
+                v-if="powers.includes('003') && !isSupertube"
+                class="fr"
+                type="success"
+                size="mini"
+                @click="getRouter('combinedRemoveDetail', 'add' )"
+              >添加</el-button>
+            </el-row>
+          </div>
+        </template>
+        <template #status="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.status == '0' ? 'warning' : ''"
+            v-text="
+              (statusOptions.find((item) => item.id == scope.row.status) || {})
+                .label || '--'
+            "
+          ></el-tag>
+        </template>
+
+        <template #company="{scope}">
+            <el-tooltip :content="'业务公司编码 : ' + scope.row.companyNo" placement="top">
+              <i class="el-icon-warning-outline" style="margin-right:2px;cursor:pointer" />
+            </el-tooltip>
+            {{scope.row.companyName}}
+        </template>
+
+        <template #order_source="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            v-text="
+              ( xs_order_source_options.find((item) => item.id === scope.row.order_source) || {}).label || '--'
+            "
+          ></el-tag>
+        </template>
+
+        <template #catinfo="{ scope }">{{scope.row.catInfo.map(({name}) => name).join("-")}}</template>
+
+        <template #specInfo="{ scope }">
+          <span
+            v-for="(si, sii) in scope.row.specInfo"
+            :key="sii + si.spec_value_id"
+          >{{ sii === 0 ? "" : "-" }}{{ si.spec_name }}[{{ si.spec_value }}]</span>
+        </template>
+
+        <template #order_type="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            v-text="
+              (
+              is_stock.find((item) => item.id == scope.row.is_stock) || {}
+              ).name || '--'
+            "
+          ></el-tag>
+        </template>
+
+        <template #operation="{ scope }">
+          <el-tooltip
+            v-if="powers.some((i) => i == '007')"
+            effect="dark"
+            content="详情"
+            placement="top"
+          >
+            <i
+              class="el-icon-view tb-icon"
+              @click="getRouter('combinedRemoveDetail', scope.row.id )"
+            ></i>
+          </el-tooltip>
+        </template>
+      </ex-table>
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+<script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import asyncRequest from "@/apis/service/sellOut/combinedAdd";
+import companyHelper from "@/mixins/companyHelper";
+import { mapGetters } from "vuex";
+import { columns } from "./columns";
+
+import {
+  xs_order_source_options,
+  xs_order_type_options
+} from "@/assets/js/statusList";
+
+export default {
+  name: "zxDiffOrder",
+  mixins: [mixinPage, resToken, companyHelper],
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      const { btnList } = this.$store.getters;
+      const tran =
+        btnList.find(item => item.menu_route == "combinedRemove") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    }
+  },
+  data() {
+    return {
+      supplierNo: "",
+      xs_order_source_options,
+      xs_order_type_options,
+      select: "1",
+      input: "",
+      addShowModel: false,
+      addModelId: "",
+      addIsDetail: false,
+      customerCode: [],
+      sitem: null,
+      // 状态
+      statusOptions: [
+        { id: "1", label: "待审核" },
+        { id: "2", label: "审核通过" },
+        { id: "3", label: "审核驳回" }
+      ],
+      statusList: [
+        "样品竞价单",
+        "线上竞价",
+        "线上贵金属",
+        "线下竞价",
+        "线下贵金属",
+        "赠品竞价单",
+        "项目竞聘"
+      ],
+      is_stock: [
+        { id: "0", name: "非库存品" },
+        { id: "1", name: "库存品" }
+      ],
+      key: "",
+      value: "",
+      loading: true,
+      showModel: false,
+      isDetail: false,
+      modelId: 0,
+      parmValue: {
+        key: "spuCode",
+        value: "",
+        status: "",
+        create_start: "",
+        create_end: "",
+        page: 1, // 页码
+        size: 15 // 每页显示条数
+      },
+      tableData: [],
+      passwordModel: false,
+      passwordModelId: 0,
+      isPasswordDetail: false,
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"]
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0
+      },
+      // 表格 - 列参数
+      columns: columns
+    };
+  },
+  mounted() {
+    const { back } = this.$route.query;
+    if (back) {
+      this.parmValue = JSON.parse(back);
+      const { page, size } = this.parmValue;
+
+      this.pageInfo = {
+        size: size,
+        curr: page,
+        total: 0
+      };
+
+      //多选条件
+      this.select = this.parmValue.select;
+      this.s_input = this.parmValue.s_input;
+    } else {
+      this.select = "1";
+    }
+    this.searchList();
+  },
+
+  methods: {
+    async supplierChange(e) {
+      const { code, label } = e;
+      this.parmValue.supplierNo = code ? [code] : [];
+      this.parmValue.supplierName = label;
+      this.searchList();
+    },
+    getRouter(toRouter, queryId) {
+      if (toRouter && queryId) {
+        let model = {
+          id: queryId
+          // type: 'view',
+        };
+
+        //有多选框的条件
+        this.parmValue.select = this.select;
+        this.parmValue.s_input = this.s_input;
+        //
+        let routerModel = {
+          options: JSON.parse(JSON.stringify(this.parmValue)),
+          router: this.$route.path
+        };
+        model.preModel = JSON.stringify(routerModel);
+
+        this.routeGoto(toRouter, model);
+      } else {
+        this.$message.warning("暂未找到相关流程!");
+      }
+    },
+    async timeReturned(e) {
+      if (e.create_startTime !== "") {
+        this.parmValue.create_start = e.create_startTime;
+      } else {
+        this.parmValue.create_start = "";
+      }
+
+      if (e.create_endTime !== "") {
+        this.parmValue.create_end = e.create_endTime;
+      } else {
+        this.parmValue.create_end = "";
+      }
+      if (
+        this.parmValue.create_start !== "" &&
+        this.parmValue.create_end !== ""
+      ) {
+        this.parmValue.page = 1;
+        await this.searchList();
+      }
+    },
+    restSearch() {
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0
+      };
+      this.select = "1";
+      this.input = "";
+      this.parmValue = {
+        status: "",
+        key: "spuCode",
+        value: "",
+        create_start: "",
+        create_end: "",
+        page: 1, // 页码
+        size: 15 // 每页显示条数
+      };
+      this.searchList();
+    },
+    async customerChange(e) {
+      if (e && e.id) {
+        this.parmValue.customer_code = [e.code];
+        this.parmValue.customerName = e.label;
+      } else {
+        this.parmValue.customer_code = [];
+        this.parmValue.customerName = "";
+      }
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+    openModal(id, isDetail) {
+      this.showModel = true;
+      this.modelId = id;
+      this.isDetail = isDetail;
+    },
+    addModal(id, isDetail) {
+      this.addModelId = id;
+      this.addShowModel = true;
+      this.addIsDetail = isDetail;
+    },
+    async deleteById(id, status) {
+      await this.$confirm("确定要删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(async () => {
+          const model = {
+            id: id
+            // status: status === "1" ? "0" : "1",
+          };
+          const res = await asyncRequest.delete(model);
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "删除成功",
+              message: ""
+            });
+            this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    async searchList() {
+      if (
+        (this.parmValue.create_start !== "" &&
+          this.parmValue.create_end === "") ||
+        (this.parmValue.create_start == "" && this.parmValue.create_end != "")
+      ) {
+        this.$message.warning("开始时间和结束时间不能为空");
+        return;
+      }
+      this.loading = true;
+
+      const { key, value, ...rest } = this.parmValue;
+
+      console.log({
+        needRela: true,
+        [key]: value,
+
+        ...rest
+      });
+
+      const res = await asyncRequest.list({
+        needRela: true,
+        [key]: value,
+        flag: "0",
+        ...rest
+      });
+
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.tableData.map(v => {
+          v.sale_price = this.setNum(v.sale_price);
+          v.sale_fee = this.setNum(v.sale_fee);
+          v.class_cat = "";
+          if (v.can && v.can.length > 0) {
+            v.can.forEach((x, i) => {
+              v.class_cat += i === 0 ? x.name : "/" + x.name;
+            });
+          }
+          return v;
+        });
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    }
+  }
+};
+</script>
+   <style lang="scss" scoped>
+.zxDiffOrder {
+}
+</style>

+ 0 - 0
src/views/stock/combinedRemove/组合商品库存添加


+ 1 - 1
src/views/supplierSellOut/supplierFiling/config/columns.js

@@ -737,7 +737,7 @@ const validate_good_name = (rule, value, callback) => {
   if (required && value.length == 0) {
     callback(new Error("不能为空!"));
   } else if (hasSpace(value)) {
-    callback(new Error("不能出现回车/换行符!"));
+    callback(new Error("系统不允许输入转义字符,请检查后重新输入!"));
   } else if (isSpecialSymbol(value)) {
     callback(new Error("不能使用英文特殊字符!"));
   } else {

+ 1 - 1
src/views/supplierSellOut/supplierFiling/config/rules.js

@@ -79,7 +79,7 @@ export const addressRules = {
           callback(new Error('详细地址不能为空!'))
         } else {
           if (hasSpace(value)) {
-            callback(new Error('不能出现回车/换行符!'))
+            callback(new Error('系统不允许输入转义字符,请检查后重新输入!'))
           } else if (isSpecialSymbol(value)) {
             callback(new Error('不能使用英文特殊字符!'))
           } else if (isAddr(value)) {

+ 1 - 1
src/views/supplierSellOut/supplierSellAfterApply/components/supplier-confirm.vue

@@ -68,7 +68,7 @@ const validateAddr = (rule, value, callback) => {
     callback(new Error('详细地址不能为空!'))
   } else {
     if (hasSpace(value)) {
-      callback(new Error('不能出现回车/换行符!'))
+      callback(new Error('系统不允许输入转义字符,请检查后重新输入!'))
     } else if (isSpecialSymbol(value)) {
       callback(new Error('不能使用英文特殊字符!'))
     } else if (isAddr(value)) {

+ 1 - 1
src/views/supplierSellOut/supplierSellAfterApply/components/supplier_exam.vue

@@ -68,7 +68,7 @@ const validateAddr = (rule, value, callback) => {
     callback(new Error('详细地址不能为空!'))
   } else {
     if (hasSpace(value)) {
-      callback(new Error('不能出现回车/换行符!'))
+      callback(new Error('系统不允许输入转义字符,请检查后重新输入!'))
     } else if (isSpecialSymbol(value)) {
       callback(new Error('不能使用英文特殊字符!'))
     } else if (isAddr(value)) {

+ 1 - 1
src/views/supplierSellOut/supplierSellOutOrder/components/want-deliver.vue

@@ -151,7 +151,7 @@ export default {
       if (value === '') {
         callback(new Error('不能为空!'))
       } else if (hasSpace(value)) {
-        callback(new Error('不能出现回车/换行符!'))
+        callback(new Error('系统不允许输入转义字符,请检查后重新输入!'))
       } else if (isSpecialSymbol(value)) {
         callback(new Error('不能使用英文特殊字符!'))
       } else {

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