Browse Source

Merge branch 'v3.0-dev-before' into v3.0

snow 1 year ago
parent
commit
cb86aa90c4
75 changed files with 4387 additions and 545 deletions
  1. 1 0
      dist/static/js/0.js
  2. 1 0
      dist/static/js/app.js
  3. 1 0
      dist/static/js/chunk-libs.js
  4. 10 9
      src/apis/service/sellOut/businessFiling/index.js
  5. 2 1
      src/apis/service/sellOut/zixunOrder/index.js
  6. 3 1
      src/apis/service/system/menu/index.js
  7. 5 3
      src/apis/service/youzan/othgoodsOnline/index.js
  8. 2 1
      src/assets/js/btnList.js
  9. 11 1
      src/assets/js/statusList.js
  10. 1 0
      src/components/globalComponents/search-terrace/main.vue
  11. 4 4
      src/components/globalComponents/show-goods-data-table/ShowDataTableColumns.js
  12. 1 1
      src/components/globalComponents/show-goods-data-table/main.vue
  13. 22 10
      src/components/good-online-platform-modal/main.vue
  14. 6 6
      src/config/env.development.js
  15. 2 2
      src/views/bbc/bbcOnline/columns.js
  16. 2 2
      src/views/bbc/bbcOnline/components/fixed-price-form-c.vue
  17. 1 1
      src/views/bbc/bbcOnline/components/fixed-price-form.vue
  18. 1 1
      src/views/businessReportQuery/businessPurchaseReport/components/columns.js
  19. 6 0
      src/views/goodStore/active/components/baseForm.vue
  20. 12 0
      src/views/goodStore/goodsCost/components/baseForm.vue
  21. 4 0
      src/views/goodStore/goodsCost/components/baseFormNormal.vue
  22. 2 2
      src/views/goodStore/goodsOnline/columns.js
  23. 1 1
      src/views/goodStore/goodsOnline/components/fixed-price-form-c.vue
  24. 4 0
      src/views/goodStore/supplierGoodsCost/components/baseForm.vue
  25. 4 0
      src/views/goodStore/supplierGoodsCost/components/baseFormNormal.vue
  26. 1 1
      src/views/orderEntry/orderConfirm/columns.js
  27. 2 2
      src/views/orderEntry/orderConfirm/index.vue
  28. 7 2
      src/views/purchaseIn/purchaseOrder/components/ShowDataTableColumns.js
  29. 6 1
      src/views/purchaseIn/purchaseOrder/detail.vue
  30. 1 1
      src/views/purchaseIn/recovery/columns.js
  31. 2 2
      src/views/purchaseIn/workbench/columns.js
  32. 2 2
      src/views/purchaseIn/workbench/components/baseForm.vue
  33. 1 1
      src/views/reportQuery/purchaseReport/components/columns.js
  34. 1 1
      src/views/sellOut/bargainList/columns.js
  35. 0 6
      src/views/sellOut/businessFiling/components/ShowDataTableColumns.js
  36. 32 8
      src/views/sellOut/businessFiling/components/complianceForm.vue
  37. 46 120
      src/views/sellOut/businessFiling/components/createBusinessForm.vue
  38. 19 39
      src/views/sellOut/businessFiling/components/waitTransferred.vue
  39. 58 92
      src/views/sellOut/businessFiling/config/columns.js
  40. 1 1
      src/views/sellOut/businessFiling/config/rules.js
  41. 120 10
      src/views/sellOut/businessFiling/detail.vue
  42. 65 120
      src/views/sellOut/businessFiling/index.vue
  43. 3 3
      src/views/sellOut/filing/config/columns.js
  44. 1 1
      src/views/sellOut/filing/config/rules.js
  45. 2 2
      src/views/sellOut/filing/cpns/baseForm.vue
  46. 0 4
      src/views/sellOut/filing/detail.vue
  47. 2 2
      src/views/sellOut/filing/source/columns.js
  48. 21 2
      src/views/sellOut/salesOrder/components/addForm.vue
  49. 1 0
      src/views/sellOut/zixunOrder/components/addEditForm.vue
  50. 1 0
      src/views/sellOut/zixunOrder/components/editForm.vue
  51. 68 31
      src/views/sellOut/zixunOrder/components/feedbackList.vue
  52. 1020 0
      src/views/sellOut/zixunOrder/components/transferGoodModal.vue
  53. 1 13
      src/views/sellOut/zixunOrder/detail.vue
  54. 3 2
      src/views/sellOut/zixunOrder/index.vue
  55. 3 3
      src/views/serviceParam/supplier/components/baseForm.vue
  56. 1 1
      src/views/standingBook/components/detail16/columns.js
  57. 1 1
      src/views/standingBook/components/detail8/columns.js
  58. 7 5
      src/views/supplierPurchaseIn/supplierPurchaseOrder/components/ShowDataTableColumns.js
  59. 8 2
      src/views/supplierPurchaseIn/supplierPurchaseOrder/detail.vue
  60. 1 1
      src/views/supplierPurchaseIn/supplierRecovery/columns.js
  61. 2 2
      src/views/supplierPurchaseIn/supplierWorkbench/columns.js
  62. 2 2
      src/views/supplierPurchaseIn/supplierWorkbench/components/baseForm.vue
  63. 3 3
      src/views/supplierSellOut/supplierFiling/config/columns.js
  64. 1 1
      src/views/supplierSellOut/supplierFiling/config/rules.js
  65. 2 2
      src/views/supplierSellOut/supplierFiling/cpns/baseForm.vue
  66. 2 2
      src/views/supplierSellOut/supplierFiling/source/columns.js
  67. 5 5
      src/views/system/menuOperator/addEdit.vue
  68. 73 0
      src/views/system/menuOperator/button-modal.vue
  69. 17 0
      src/views/system/menuOperator/index.vue
  70. 472 0
      src/views/youzan/othLiveGoods/columns.js
  71. 76 0
      src/views/youzan/othLiveGoods/components/activity-modal.vue
  72. 700 0
      src/views/youzan/othLiveGoods/components/online-exam-form.vue
  73. 559 0
      src/views/youzan/othLiveGoods/detail.vue
  74. 856 0
      src/views/youzan/othLiveGoods/index.vue
  75. 0 0
      src/views/youzan/othLiveGoods/泰行销直播商品

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


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


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


+ 10 - 9
src/apis/service/sellOut/businessFiling/index.js

@@ -2,16 +2,17 @@
 import http from '@/apis/axios'
 const api = 'admin/' 
 export default {
-  cancel: (data) => http(api + 'filingCancel', data, 'post'),
-  // 线上商品详情
-  goods_detail: (data, params) => http(api + 'goodinfo', data, 'post', params),
-  // 区编码获取省市区汉字
   addrall: (data, params) => http(api + 'addrall', data, 'post', params),
-  // 添加
-  add: (data, params) => http(api + 'salecreate', data, 'post', params),
-  // 验证售价
+  goods_detail: (data, params) => http(api + 'goodinfo', data, 'post', params),
   salegetprice: (data, params) => http(api + 'salegetprice', data, 'post', params),
+  // 列表
   list: (data, params) => http('/bbc/fill/list', data, 'post', params),
-  addrall: (data, params) => http(api + 'addrall', data, 'post', params),
-  transfer: (data) => http(api + 'filingTransfer', data, 'post')
+  // 转单
+  transfer: (data) => http('bbc/fill/transfer', data, 'post'),
+  // 获取详情
+  detail: (data, params) => http('bbc/fill/info', data, 'post', params),
+  // 是否合规
+  compliance: (data, params) => http('bbc/fill/compliance', data, 'post', params),
+  // 创建报备单
+  create: (data, params) => http('bbc/fill/create', data, 'post', params),
 }

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

@@ -41,5 +41,6 @@ export default {
   catinfo: (data, params) => http(api + 'catinfo', data, 'post', params),
   // 复制竞价单
   copy: (data, params) => http(api + 'zxcopy', data, 'post', params),
-  zxcopyedit: (data, params) => http(api + 'zxcopyedit', data, 'post', params)
+  zxcopyedit: (data, params) => http(api + 'zxcopyedit', data, 'post', params),
+  transferFilling: (data, params) => http('bbc/fill/zixunCreate', data, 'post', params),
 }

+ 3 - 1
src/apis/service/system/menu/index.js

@@ -21,6 +21,8 @@ export default {
   // 状态
   actionstatus: (data, params) =>
     http(api + 'menuactionstatus', data, 'post', params),
-      // 删除
+  // 删除
   actiondel: (data, params) => http(api + 'menuactiondel', data, 'post', params),
+
+  actionlistcreate: (data, params) => http(api + 'actionlistcreate', data, 'post', params)
 }

+ 5 - 3
src/apis/service/youzan/othgoodsOnline/index.js

@@ -40,8 +40,10 @@ export default {
   goodupreject: (data, params) => http(api + "goodupreject", data, "post", params),
   // 异常原因列表
   resultlist: (data, params) => http(api + "resultlist", data, "post", params),
-    //商品下线
+  //商品下线
   yz_goodoff: (data, params) => http("youzan/yz_goodoff", data, "post", params),
-    //获取全部标签
-    tag_list: (data, params) => http("youzan/yz_tag_list", data, "post", params),
+  //获取全部标签
+  tag_list: (data, params) => http("youzan/yz_tag_list", data, "post", params),
+   addCouponUrl: (data, params) => http("/txx/txGood/AddCouponUrl", data, "post", params),
+   txxList: (data, params) => http("/txx/txGood/list", data, "post", params),
 };

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

@@ -98,7 +98,8 @@ const btnList = [
   { code: '097',name: '设置部门' },
   { code: '098',name: '关联采购单' },
   { code: '099',name: '解除关联' },
-  { code: '100',name: '业务经理修改导入' }
+  { code: '100',name: '业务经理修改导入' },
+  { code: '102',name: '设置活动url' }
   // { code: '098',name: '采购单情况表' },
   // { code: '099',name: '竞价单反馈情况表' },
   // { code: '100',name: '当日库存销售情况表' },

+ 11 - 1
src/assets/js/statusList.js

@@ -2,6 +2,14 @@ const statusList = [
   { name: "启用", code: 1 },
   { name: "禁用", code: 0 },
 ];
+
+export const payWayOptions = [
+  { value: '0', label: '现结' },
+  { value: '1', label: '月清' },
+  { value: '2', label: '双月清' }
+]
+
+
 const cg_order_type_options = [
   { id: "1", label: "库存商品" },
   { id: "2", label: "非库存商品" },
@@ -26,6 +34,7 @@ const cg_order_source_options = [
   // { id: "8", label: "支付渠道" }
   { id: "9", label: "采销录单" },
   // { id: "10", label: "结算录单" }
+  // { id: "11", label: "业务报备" }
 ];
 const xs_order_source_options = [
   // { id: "0", label: "备库单" },
@@ -38,7 +47,8 @@ const xs_order_source_options = [
   { id: "7", label: "报备转单" },
   // { id: "8", label: "支付渠道" },
   { id: "9", label: "采销录单" },
-  // { id: "10", label: "结算录单" }
+  // { id: "10", label: "结算录单" },
+  // { id: "11", label: "业务报备" }
 ];
 const has_account_list = [
   { code: "1", type: "", name: "已开通" },

+ 1 - 0
src/components/globalComponents/search-terrace/main.vue

@@ -90,6 +90,7 @@ export default {
     this.options = [];
     this.selectLoading = false;
     this.remoteMethod();
+    console.log("---search:" + this.disabled)
   },
   methods: {
     async selectChange(e) {

+ 4 - 4
src/components/globalComponents/show-goods-data-table/ShowDataTableColumns.js

@@ -46,7 +46,7 @@ const reColumns = [
   },
   {
     prop: 'pay_way',
-    label: '付方式',
+    label: '付方式',
     _slot_: 'pay_way',
     span: 4
   },
@@ -147,7 +147,7 @@ const coveColumns = [
   },
   {
     prop: 'pay_way',
-    label: '付方式',
+    label: '付方式',
     _slot_: 'pay_way',
     span: 4
   },
@@ -288,7 +288,7 @@ const onlineColumns = [
     span: 6
   },
   // {
-  //   prop: "platform_code_en",
+  //   prop: "plat_code",
   //   label: "平台商品编码",
   //   span: 6,
   // },
@@ -740,7 +740,7 @@ const options9 = [
   { id: '1', name: '月清' },
   { id: '2', name: '双月清' }
 ]
-// 付方式
+// 付方式
 const options10 = [
   { id: '0', name: '现结' },
   { id: '1', name: '月清' },

+ 1 - 1
src/components/globalComponents/show-goods-data-table/main.vue

@@ -64,7 +64,7 @@
             </li>
             <li>
               <span>平台商品编码:</span>
-              <span>{{ sitem.platform_code_en }}</span>
+              <span>{{ sitem.plat_code }}</span>
             </li>
           </ul>
           <i slot="reference" class="el-icon-warning-outline fr" />

+ 22 - 10
src/components/good-online-platform-modal/main.vue

@@ -148,6 +148,7 @@
 <script>
 import asyncRequest from '@/apis/components/search-good-online-modal'
 import asyncYZRequest from '@/apis/service/youzan/othgoodsOnline'
+import asyncBBCRequest from '@/apis/service/bbc'
 import resToken from '@/mixins/resToken'
 import mixinPage from '@/mixins/elPaginationHandle'
 import { mapGetters } from 'vuex'
@@ -298,19 +299,30 @@ export default {
       model.good_name = this.select === '1' ? this.sinput : '' // 商品名称
       model.plat_code = this.select === '3' ? this.sinput : ''
       model.skucode = this.select === '4' ? this.sinput : ''
-      // model.platform_code =
-      //   model.platform_code.length > 0
-      //     ? model.platform_code[model.platform_code.length - 1]
-      //     : "";
 
-      const apis = this.platform_type + '' === '1' ? asyncYZRequest : asyncRequest
 
-      const status = this.platform_type + '' === '1' ? '6' : '3'
+      // const apis = this.platform_type + '' === '1' ? asyncYZRequest : asyncRequest
+
+      
+      let api;
+      let status;
+      switch (this.platform_type) {
+        case '1': // 有赞
+          api = asyncYZRequest;
+          status = '6'
+          break;
+        case '2': // bbc
+          api = asyncBBCRequest
+          status = '3'
+          break;
+        default: // 无对接
+          api = asyncRequest
+          status = '3'
+          break;
+      }
+
+      const res = await api.list({ ...model, exam_status: status })
 
-      const res = await apis.list({
-        ...model,
-        exam_status: status
-      })
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list
         this.tableData.map((e) => {

+ 6 - 6
src/config/env.development.js

@@ -5,11 +5,11 @@ module.exports = {
   wechatUrl: "http://rep.test241.wanyuhengtong.com", // 微信授权地址
   backUrl: "http://webstock3.test241.wanyuhengtong.com", // 微信授权后重定向地址
   api: {
-    baseApi: 'http://stock.api.caixiao365.com/',
-    userApi: "http://user.api.caixiao365.com/"
+    baseApi: 'http://stocknew.test241.wanyuhengtong.com/',
+    userApi: "http://user.test241.wanyuhengtong.com/"
     // baseApi: 'http://stockwm.test241.wanyuhengtong.com/'
   },
-  webUrl: 'http://project.web.caixiao365.com/#/good-share?id=',
+  webUrl: 'http://project.web.caixiao365.com/#/test-good-share?id=',
   fileURL: `https://api2.edu.futurelab.tv`,
   shareWebUrl: 'http://post.web.caixiao365.com/?prod=1&outCode=',
   // 分仓
@@ -24,10 +24,10 @@ module.exports = {
   // 结算平台url
   // settlementPlatformUrl: 'http://127.0.0.1:8848',
   // 结算平台url
-  settlementPlatformUrl: 'http://fin.caixiao365.com/',
+  settlementPlatformUrl: 'http://webcx.test241.wanyuhengtong.com/',
   // 工单管理系统url
-  GDUrl: 'http://bug.caixiao365.com/',
-  dashboardUrl: 'http://web.report.caixiao365.com/',
+  GDUrl: 'http://http://bugweb.test241.wanyuhengtong.com/',
+  dashboardUrl:"http://web.report.caixiao365.com/",
   // token加密key
   secretKey: 'key123',
   loginTitle: '',

+ 2 - 2
src/views/bbc/bbcOnline/columns.js

@@ -75,8 +75,8 @@ const listCol = [
     'min-width': '160px'
   },
   // {
-  //   prop: "platform_code_en",
-  //   label: "平台编号",
+  //   prop: "plat_code",
+  //   label: "平台商品编号",
   //   width: "170px",
   // },
   // {

+ 2 - 2
src/views/bbc/bbcOnline/components/fixed-price-form-c.vue

@@ -601,7 +601,7 @@ export default {
         skuCode: "",
         numStatus: "",
         state: "1", //通过or驳回
-        proof_type: "1", //
+        proof_type: "2", //
         proof_url: "", //驳回至
         remark: "",
       },
@@ -908,7 +908,7 @@ export default {
             state: "1", // 通过or驳回
             remark: "",
             numStatus: "",
-            proof_type: proof && proof.proof_type ? proof.proof_type : "1", // 通过or驳回
+            proof_type: proof && proof.proof_type ? proof.proof_type : "2", // 通过or驳回
             proof_url: proof && proof.proof_url ? proof.proof_url : "", //驳回至
           };
           this.addrForm = {

+ 1 - 1
src/views/bbc/bbcOnline/components/fixed-price-form.vue

@@ -562,7 +562,7 @@ export default {
         skuCode: "",
         numStatus: "",
         state: "1", //通过or驳回
-        proof_type: "1", //
+        proof_type: "2", //
         proof_url: "", //驳回至
         remark: ""
       },

+ 1 - 1
src/views/businessReportQuery/businessPurchaseReport/components/columns.js

@@ -638,7 +638,7 @@ const table9 = [
   },
   {
     prop: 'pay_type',
-    label: '付方式',
+    label: '付方式',
     minWidth: '125px'
   },
   {

+ 6 - 0
src/views/goodStore/active/components/baseForm.vue

@@ -608,6 +608,12 @@ export default {
         this.$message.warning("请选择库存类型!");
         return;
       }
+      
+      if(this.platform_type === "2"){
+        this.$message.warning("当前业务不支持对接BBC平台的商品")
+        return
+      }
+
       this.showModel = true;
     },
     async submitForm() {

+ 12 - 0
src/views/goodStore/goodsCost/components/baseForm.vue

@@ -2150,7 +2150,10 @@ export default {
             noble_name,
           } = this.sitem;
 
+<<<<<<< HEAD
           console.log(good_img);
+=======
+>>>>>>> v3.0-dev-before
           this.createSource = create_source;
 
           if (this.type !== "add") {
@@ -2270,8 +2273,17 @@ export default {
             lead_time: lead_time || "",
             sample_day: sample_day || "",
             good_thumb_img: good_thumb_img || "",
+<<<<<<< HEAD
             good_img: good_img?!isArray(good_img || "") ? good_img.split(",") : []:[],
             good_info_img: good_info_img||[] ,
+=======
+            good_img: good_img
+              ? !isArray(good_img || "")
+                ? good_img.split(",")
+                : []
+              : [],
+            good_info_img: good_info_img || [],
+>>>>>>> v3.0-dev-before
             //固定阶梯成本
             demo_fee: demo_fee || "",
             open_fee: open_fee || "",

+ 4 - 0
src/views/goodStore/goodsCost/components/baseFormNormal.vue

@@ -2234,7 +2234,11 @@ export default {
             sample_day: sample_day || "",
             good_thumb_img: good_thumb_img || "",
             good_img: good_img?!isArray(good_img || "") ? good_img.split(",") : []:[],
+<<<<<<< HEAD
             good_info_img:good_info_img||[] ,
+=======
+            good_info_img: good_info_img || [],
+>>>>>>> v3.0-dev-before
             //固定阶梯成本
             demo_fee: demo_fee || "",
             open_fee: open_fee || "",

+ 2 - 2
src/views/goodStore/goodsOnline/columns.js

@@ -73,8 +73,8 @@ const listCol = [
     'min-width': '160px'
   },
   // {
-  //   prop: "platform_code_en",
-  //   label: "平台编号",
+  //   prop: "plat_code",
+  //   label: "平台商品编号",
   //   width: "170px",
   // },
   // {

+ 1 - 1
src/views/goodStore/goodsOnline/components/fixed-price-form-c.vue

@@ -908,7 +908,7 @@ export default {
             state: "1", // 通过or驳回
             remark: "",
             numStatus: "",
-            proof_type: proof && proof.proof_type ? proof.proof_type : "1", // 通过or驳回
+            proof_type: proof && proof.proof_type ? proof.proof_type : "2", // 通过or驳回
             proof_url: proof && proof.proof_url ? proof.proof_url : "", //驳回至
           };
           this.addrForm = {

+ 4 - 0
src/views/goodStore/supplierGoodsCost/components/baseForm.vue

@@ -2192,7 +2192,11 @@ export default {
             lead_time: lead_time || "",
             sample_day: sample_day || "",
             good_thumb_img: good_thumb_img || "",
+<<<<<<< HEAD
             good_img: good_img?!isArray(good_img || "") ? good_img.split(",") : []:[],
+=======
+            good_img: good_img ?!isArray(good_img || "") ? good_img.split(",") : []:[],
+>>>>>>> v3.0-dev-before
             good_info_img: good_info_img?!isArray(good_info_img || "") ? good_info_img.split(",") : []:[],
             //固定阶梯成本
             demo_fee: demo_fee || "",

+ 4 - 0
src/views/goodStore/supplierGoodsCost/components/baseFormNormal.vue

@@ -2184,7 +2184,11 @@ export default {
             lead_time: lead_time || "",
             sample_day: sample_day || "",
             good_thumb_img: good_thumb_img || "",
+<<<<<<< HEAD
             good_img: good_img?!isArray(good_img || "") ? good_img.split(",") : []:[],
+=======
+            good_img: good_img ?!isArray(good_img || "") ? good_img.split(",") : []:[],
+>>>>>>> v3.0-dev-before
             good_info_img: good_info_img?!isArray(good_info_img || "") ? good_info_img.split(",") : []:[],
             //固定阶梯成本
             demo_fee: demo_fee || "",

+ 1 - 1
src/views/orderEntry/orderConfirm/columns.js

@@ -299,7 +299,7 @@ const onlineColumns = [
     span: 24
   },
   // {
-  //   prop: "platform_code_en",
+  //   prop: "plat_code",
   //   label: "平台商品编码",
   //   span: 6,
   // },

+ 2 - 2
src/views/orderEntry/orderConfirm/index.vue

@@ -164,7 +164,7 @@
                             </li>
                             <!-- <li>
                               <span>平台商品编码:</span
-                              ><span>{{ conGoodData.platform_code_en }}</span>
+                              ><span>{{ conGoodData.plat_code }}</span>
                             </li> -->
                           </ul>
                           <i class="el-icon-warning-outline fr" slot="reference"></i>
@@ -280,7 +280,7 @@
                               </li>
                               <!-- <li>
                                 <span>平台商品编码:</span
-                                ><span>{{ subGoodData.platform_code_en }}</span>
+                                ><span>{{ subGoodData.plat_code }}</span>
                               </li> -->
                             </ul>
                             <i class="el-icon-warning-outline fr" slot="reference"></i>

+ 7 - 2
src/views/purchaseIn/purchaseOrder/components/ShowDataTableColumns.js

@@ -21,7 +21,6 @@ export default [
     label: "要求入库时间",
     span: 6
   },
- 
   {
     prop: "supplier_name",
     label: "销售方公司",
@@ -75,7 +74,13 @@ export default [
     prop: "gold_price",
     label: "当前实时金价",
     _slot_: "gold_price",
-    span: 12
+    span: 6
+  },
+  { 
+    prop:"pay_type",
+    label:"供应商支付方式",
+    span:6,
+    _slot_:"pay_type"
   },
   {
     prop: "customer",

+ 6 - 1
src/views/purchaseIn/purchaseOrder/detail.vue

@@ -129,6 +129,10 @@
                   </el-popover>
                 </template>
 
+                <template slot="pay_type">
+                  {{(payWayOptions.find(({value})=> value === sitem.pay_type) || {}).label || "--"}}
+                </template>
+
                 <template slot="gold_price">
                   <div
                     v-if="
@@ -242,7 +246,7 @@ import orderInTable from "./components/order-in-table";
 import workDiffTable from "./components/work-diff-table";
 import ShowDataTableColumns from "./components/ShowDataTableColumns";
 import { statusOptions } from "./columns";
-import { cg_order_type_options } from "@/assets/js/statusList";
+import { cg_order_type_options, payWayOptions } from "@/assets/js/statusList";
 import tolerance from "./components/tolerance";
 import urlConfig from "@/apis/url-config";
 import editPrice from "./components/editPrice";
@@ -288,6 +292,7 @@ export default {
       ShowDataTableColumns: ShowDataTableColumns,
       isMetal: false,
       finishStatus: "finish",
+      payWayOptions,
       activeNames: ["0", "1", "2", "3", "4", "5", "10"],
       sitem: null,
       statusOptions: statusOptions,

+ 1 - 1
src/views/purchaseIn/recovery/columns.js

@@ -206,7 +206,7 @@ const costColumns = [
   },
   {
     prop: 'pay_way',
-    label: '付方式',
+    label: '付方式',
     _slot_: 'pay_way',
     span: 5
   },

+ 2 - 2
src/views/purchaseIn/workbench/columns.js

@@ -42,7 +42,7 @@ const options8 = [
 ];
 //配置要求
 const options9 = ["证书", "包装盒", "绒布袋", "标签", "其他"];
-//付方式
+//付方式
 const options10 = [
   { id: "0", name: "现结" },
   { id: "1", name: "月清" },
@@ -393,7 +393,7 @@ const rules = {
   pay_way: [
     {
       required: true,
-      message: "请选择付方式",
+      message: "请选择付方式",
       trigger: "change",
     },
   ],

+ 2 - 2
src/views/purchaseIn/workbench/components/baseForm.vue

@@ -275,14 +275,14 @@
         </el-form-item>
       </el-col>
       <el-col :span="6">
-        <el-form-item label="付方式" prop="pay_way" class="clear">
+        <el-form-item label="付方式" prop="pay_way" class="clear">
           <el-select
             v-model="ruleForm.pay_way"
             filterable
             :disabled="type === 'view'"
             clearable
             style="width: 100%"
-            placeholder="付方式"
+            placeholder="付方式"
           >
             <el-option
               v-for="group in options10"

+ 1 - 1
src/views/reportQuery/purchaseReport/components/columns.js

@@ -556,7 +556,7 @@ const table9 = [
   },
   {
     prop: 'pay_type',
-    label: '付方式',
+    label: '付方式',
     minWidth: '125px'
   },
   {

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

@@ -42,7 +42,7 @@ const options8 = [
 ]
 // 配置要求
 const options9 = ['证书', '包装盒', '绒布袋', '标签', '其他']
-// 付方式
+// 付方式
 const options10 = [
   { id: '0', name: '现结' },
   { id: '1', name: '月清' },

+ 0 - 6
src/views/sellOut/businessFiling/components/ShowDataTableColumns.js

@@ -5,12 +5,6 @@ const addColumns = [
     _slot_: 'good_name',
     span: 24
   },
-  // {
-  //   prop: "good_info_img",
-  //   _slot_: "good_info_img",
-  //   label: "详情图",
-  //   span: 24,
-  // },
   {
     prop: 'cat',
     label: '分类',

+ 32 - 8
src/views/sellOut/businessFiling/components/complianceForm.vue

@@ -1,18 +1,18 @@
 <template>
-  <ElForm size="mini" label-width="110px" :model="formData" :rules="rules">
+  <ElForm size="mini" label-width="110px" :model="formData" :rules="rules" ref="formRef" v-loading="loading">
     <ElRow>
       <ElCol :span="12">
         <ElFormItem label="是否合规" prop="status">
           <ElSelect style="width:100%" v-model="formData.status">
             <ElOption label="合规" value="1" />
-            <ElOption label="不合规" value="0" />
+            <ElOption label="不合规" value="2" />
           </ElSelect>
         </ElFormItem>
       </ElCol>
 
       <ElCol :span="12">
         <ElFormItem label="平台商品编号" prop="platCode">
-          <ElInput v-model="formData.platCode" />
+          <ElInput v-model="formData.platCode" placeholder="平台商品编号" />
         </ElFormItem>
       </ElCol>
         
@@ -24,7 +24,7 @@
 
       <ElCol :span="24">
         <ElFormItem style="display:flex;justify-content:flex-end;width:100%">
-          <ElButton type="primary">保存</ElButton>
+          <ElButton type="primary" @click="onSubmit">保存</ElButton>
         </ElFormItem>
       </ElCol>
     </ElRow>
@@ -32,9 +32,12 @@
 </template>
 
 <script>
+import asyncRequest from "@/apis/service/sellOut/businessFiling";
 export default {
-  data(){
+  props: ["id"],
+  data() {
     return {
+      loading: false,
       formData:{
         status: "1",
         platCode: "",
@@ -42,15 +45,36 @@ export default {
       }
     }
   },
-  computed:{
+  computed: {
      rules(){
         const { status }  = this.formData;
-        return {
+        return { 
           status:[{required:true, message:"请选择是否合规", trigger: "change"}],
           platCode:[{required:status === "1", message:"请输入平台订单号", trigger: "change"}],
-          remark:[{required:status === "0", message: "请输入备注", trigger:"change" }]
+          remark:[{required:status === "2", message: "请输入备注", trigger:"change" }]
         }
       }
+  },
+  methods: {
+    async onSubmit(){
+      this.loading = true
+      try{
+        await this.$refs.formRef.validate();
+        const { status :is_compliance, platCode: plat_code, remark: compliance_remark } = this.formData;
+        const model = {is_compliance, plat_code, compliance_remark, id: this.id };
+        const response = await asyncRequest.compliance(model)
+        if(response.code === 0){
+          this.$emit("refresh")
+          this.formData = { status: "1", platCode: "", remark:"" }
+        }else{
+          this.$message.warning(response.message)
+        }
+      }catch(err){
+        console.error(err)
+      } finally{
+        this.loading = false;
+      }
+    }
   }
 }
 </script>

+ 46 - 120
src/views/sellOut/businessFiling/components/createBusinessForm.vue

@@ -259,8 +259,10 @@
               <search-good-online-modal
                 :once="true"
                 :sitem="addshowModel"
+                is_combind="0"
                 :active="true"
                 :show-model="showModel"
+                :platform_type="platformType"
                 @resultList="resultList"
                 @cancel="showModel = false"
               />
@@ -297,7 +299,7 @@ import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/businessFiling";
 import showVoucherModel from "@/components/show-voucher-model";
-import searchGoodOnlineModal from "@/components/search-good-online-modal";
+import searchGoodOnlineModal from "@/components/good-online-platform-modal";
 import inAddrModel from "@/components/in-addr-model";
 import { addColumns } from "./ShowDataTableColumns";
 import companyHelper from "@/mixins/companyHelper";
@@ -334,7 +336,7 @@ export default {
   },
   data() {
     return {
-        isCombindChild: true,
+      isCombindChild: true,
       ShowDataTableColumns: addColumns,
       AddrAddEditModalIndex: -1,
       AddrAddEditModalSitem: {},
@@ -349,6 +351,7 @@ export default {
           return time.getTime() < Date.now() - 1000 * 60 * 60 * 24;
         }
       },
+      platformType:"",
       ruleForm: {
         order_type: "1",
         supplierNo: "", //销售方编码
@@ -445,7 +448,6 @@ export default {
   },
   methods: {
     manageridChange(e) {
-      console.log(e);
       const { id, label } = e;
       this.ruleForm.managerid = id ? [id] : [];
       this.ruleForm.manager = label || "";
@@ -473,6 +475,7 @@ export default {
 
           this.ruleForm = {
             managerid: [],
+            manager:"",
             order_type: "1",
             companyNo: this.currentCompany || "", //销售方编码
             customer_code: [], // 企业客户选择
@@ -525,7 +528,6 @@ export default {
         item.code = item.areaCode ? [item.areaCode] : [];
         item.names = item.label ? [item.label] : [];
       });
-      console.log(list);
       this.addrForm.order_addr.push(...list);
     },
     async resultList(e) {
@@ -533,7 +535,6 @@ export default {
       if (e.length === 1) {
         let ssitem = JSON.parse(JSON.stringify(e[0]));
         const result = await this.get_goods_detail(ssitem.skuCode);
-        console.log(result,"----")
         this.ruleForm.good_code = this.goods_sitem.skuCode;
       } else {
         this.goods_sitem = {};
@@ -547,7 +548,6 @@ export default {
       });
       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(
@@ -614,8 +614,10 @@ export default {
 
       if (!this.priceLoding) {
         const { isok, price, stock } = await this.set_salegetprice();
+
+        console.log("商品:" , price, stock)
         this.ruleForm.good_price = isok ? price : 0;
-        this.ruleForm.good_stock = isok ? stock : 0;
+        this.ruleForm.activity_stock = isok ? stock : 0;
       }
     },
     change_good_code() {
@@ -624,10 +626,22 @@ export default {
         this.$message.warning("请选择销售方公司!");
         return;
       }
+      
       if (platform_id === "") {
         this.$message.warning("请选择所属平台!");
         return;
       }
+
+      if(this.platformType === "1"){
+        this.$message.warning("当前业务不支持对接有赞平台的商品")
+        return
+      }
+
+      if(this.platformType === "2"){
+        this.$message.warning("当前业务不支持对接BBC平台的商品")
+        return
+      }
+
       this.addshowModel = {
         company_id: supplierNo,
         platform_code: platform_id
@@ -657,6 +671,7 @@ export default {
       const { id, code, label } = e;
       this.ruleForm.platform_id = id || "";
       this.$refs.ruleForm.validateField("platform_id");
+      this.platformType = e.platform_type;
       this.ruleForm.good_code = "";
       this.goods_sitem = {};
     },
@@ -722,115 +737,31 @@ export default {
         }
       });
     },
-    // 删除收货地址操作
-    deleteRow(index, rows) {
-      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
-        }
-
 
+    async submitForm() {
       await this.$refs.ruleForm.validate(async valid => {
         if (valid) {
-          if (this.loading) {
-            return;
-          }
+          if (this.loading) { return; }
           this.loading = true;
-          const { sendtype, good_num, goodtype } = JSON.parse(
-            JSON.stringify(this.ruleForm)
-          );
-          const { order_addr } = JSON.parse(JSON.stringify(this.addrForm));
-
-          let key_0 = goodtype[0];
-          let key_1 = goodtype[1];
-          if (order_addr.length === 0 && sendtype === "1") {
-            this.$message.warning("至少填写一条地址信息!");
-            this.loading = false;
-            return;
-          }
-          let model = JSON.parse(JSON.stringify(this.ruleForm));
-          model.addrlist = [];
-          model.customer_code = model.customer_code.toString();
-          const { good_price, new_good_price } = model;
-          let a = accMul(good_price, "1"),
-            b = accMul(new_good_price, "1");
-          if (a !== b) {
-            model.good_price = model.new_good_price;
-          }
-          // if (model.new_good_price == model.good_price) {
-          // model.good_price = model.new_good_price;
-          // }
-          delete model["proof_type"];
-          delete model["proof_url"];
-          delete model["new_good_price"];
-          if (sendtype === "1") {
-            let addrT = 0,
-              isAEdit = false;
-
-            order_addr.forEach(v2 => {
-              if (v2.edit) {
-                isAEdit = true;
-              }
-              addrT += parseInt(v2.receipt_quantity);
-              let model2 = {
-                contactor: v2.contactor,
-                mobile: v2.mobile,
-                addr: v2.addr,
-                receipt_quantity: v2.receipt_quantity,
-                addr_code: v2.addr_code
-              };
-              model.addrlist.push(model2);
-            });
 
-            if (isAEdit) {
-              this.$message.warning("请保存地址信息!");
-              this.loading = false;
-              return;
-            }
-            if (good_num * 1 !== addrT) {
-              this.$message.warning("地址收货总数与销售总数量不一致!");
-              this.loading = false;
-              return;
-            }
+          const { companyNo, customer_code, platform_id, good_num,good_price, good_code: skuCode, managerid, manager ,remark: fill_remark } = this.ruleForm;
+          const model = { 
+            customerCode: Array.isArray(customer_code) ? customer_code[0] : customer_code, 
+            managerid: Array.isArray(managerid) ? managerid[0] : managerid,  
+            fill_remark, 
+            platform_id,
+            good_price, 
+            companyNo,
+            good_num, 
+            skuCode, 
+            manager 
           }
-          let priceres = await this.set_salegetprice();
-          if (!priceres.isok) {
-            this.loading = false;
-            return;
-          }
-          model.is_activity = key_0 === "is_activity_0" ? "0" : "1";
-          model.goodtype = key_0 === "is_activity_1" ? "1" : key_1;
-          model.act_code = key_0 === "is_activity_1" ? key_1 : "";
-
-          Object.keys(model).forEach(key => {
-            if (typeof model[key] === "string") {
-              model[key] = replaceTextWrapAndSpace(model[key]);
-            }
-          });
-
-          let res = await asyncRequest.add({
-            ...model,
-            managerid: Array.isArray(model.managerid) ? model.managerid[0] : model.managerid
-          });
 
+          let res = await asyncRequest.create(model);
           this.loading = false;
           if (res && res.code === 0) {
-            this.$notify.success({
-              title: "订单创建成功!",
-              message: ""
-            });
-
-            this.$emit("refresh");
+            this.$notify.success({ title: "订单创建成功!", message: "" });
+            this.$router.push("/sellOut/businessFiling")
           } else if (res && res.code >= 100 && res.code <= 104) {
             await this.logout();
           } else {
@@ -850,26 +781,21 @@ export default {
       const { good_num, good_code, goodtype } = this.ruleForm;
       let key_1 = goodtype[1];
       let key_0 = goodtype[0];
-      let model = {
-        skuCode: good_code,
-        sale_num: good_num,
-        is_activity: key_0 === "is_activity_0" ? "0" : "1",
+
+      let model = { 
+        skuCode: good_code, 
+        sale_num: good_num,  
+        is_activity: key_0 === "is_activity_0" ? "0" : "1", 
         act_code: key_0 === "is_activity_1" ? key_1 : ""
       };
+
       let { code, message, data } = await asyncRequest.salegetprice(model);
-      console.log(code, message, data);
+
       if (code === 0) {
         const { sale_price } = data;
         resModel.price = sale_price + "";
+        resModel.stock = data.stock;
 
-        let oldGood_type = goodtype.length === 2 ? goodtype[1] : "";
-
-        if (
-          key_0 === "is_activity_0" &&
-          (oldGood_type == 2 || oldGood_type == 3)
-        ) {
-          resModel.price = 0 + "";
-        }
       } else if (code >= 100 && code <= 104) {
         await this.logout();
       } else {

+ 19 - 39
src/views/sellOut/businessFiling/components/waitTransferred.vue

@@ -158,7 +158,7 @@ const defaultAddressData = {
 
 export default {
   components: { InAddressModal },
-  props: ["id", "num"],
+  props: ["id", "num", "waitNum"],
   data() {
     return {
       ruleForm: {
@@ -246,48 +246,31 @@ export default {
 
         const { addr_code } = this.editCacheData;
         const { data, code } = await asyncRequest.addrall({ code: addr_code[addr_code.length - 1] });
-
         if (Number(code) === 0) {
-          this.editCacheData.addr_code_name =
-            data.province.name + "/" + data.city.name + "/" + data.area.name;
+          this.editCacheData.addr_code_name = data.province.name + "/" + data.city.name + "/" + data.area.name;
         }
-
         this.$set(this.list, this.editIndex, this.editCacheData);
         this.editCacheData = { ...defaultAddressData };
         this.editIndex = -1;
       });
     },
 
+
     customerChange(evt) {
       const { code, label } = evt;
-
-      this.ruleForm = {
-        companyCode: code ? [code] : "",
-        companyName: label ? [label] : ""
-      };
+      this.ruleForm = { companyCode: code ? [code] : "", companyName: label ? [label] : "" };
     },
 
     handleRefresh(data) {
       const _data = data.list.map(
-        ({
-          addr,
-          addr_code,
-          contactor,
-          mobile,
-          receipt_quantity,
-          addr_code_name
-        }) => ({
-          addr,
-          addr_code,
-          contactor,
-          mobile,
-          receipt_quantity,
-          addr_code_name,
-          area_code: [addr_code[addr_code.length - 1]]
-        })
+        ({ addr, addr_code, contactor, mobile, receipt_quantity,  addr_code_name }) => 
+        ({ addr, addr_code, contactor, mobile, receipt_quantity,  addr_code_name, area_code: [addr_code[addr_code.length - 1]] })
       );
 
-      this.list = [...this.list, ..._data];
+      this.list = [
+        ...this.list, ..._data
+      ];
+
       this.showModal = false;
     },
 
@@ -336,29 +319,26 @@ export default {
         return;
       }
 
-      const currentNum = this.list.reduce((current, prev) => {
-        return Number(current) + Number(prev.receipt_quantity);
-      }, 0);
-
-      if (currentNum > Number(this.num)) {
-        this.$message.warning(
-          `未转单数量为${this.num},收货数量总和不能超过未转单数量!`
-        );
+      const currentNum = this.list.reduce((current, prev) => Number(current) + Number(prev.receipt_quantity), 0);
+      if (currentNum > Number(this.waitNum)) {
+        this.$message.warning( `未转单数量为${this.waitNum},收货数量总和为${currentNum},收货数量总和不能超过未转单数量!`);
         return;
       }
 
+      this.loading = true
       const { code, message } = await asyncRequest.transfer({
         id: this.id,
         addr_list: this.list,
-
-        customerCode: Array.isArray(this.ruleForm.companyCode)
-          ? this.ruleForm.companyCode[0]
-          : this.ruleForm.companyCode
+        customerCode: Array.isArray(this.ruleForm.companyCode) ? this.ruleForm.companyCode[0]  : this.ruleForm.companyCode,
+        poCode: this.ruleForm.platCode,
       });
 
+      this.loading = false
+
       if (Number(code) === 0) {
         this.list = [];
         this.ruleForm.companyCode = "";
+        this.ruleForm.platCode = "";
         this.$emit("refresh");
       } else {
         this.$message.error(message);

+ 58 - 92
src/views/sellOut/businessFiling/config/columns.js

@@ -5,25 +5,38 @@ const columns = [
     width: '155px'
   },
   {
-    prop: 'catinfo',
     label: '商品分类',
-    width: '158px'
+    width: '158px',
+    _slot_: "cat_info"
   },
   {
     prop: "good_name",
-    label:"商品名称"
+    label: "商品名称",
+    width: "150px"
   },
   {
+    label: "合规状态",
     prop:  "is_compliance",
     _slot_: "is_compliance"
   },
   {
-    label: "todo",
-    prop: "销售数量",
+    prop: 'status',
+    label: '状态',
+    width: '125px',
+    _slot_: 'status'
+  },
+  {
+    prop: "good_num",
+    label: "销售数量"
+  },
+  {
+    prop: 'transfer_num',
+    label: '已转单数量',
+    width: "100px"
   },
   {
-    prop: "todo",
     label: '商品主图',
+    _slot_: "good_img"
   },
   {
     prop: "origin_price",
@@ -34,27 +47,27 @@ const columns = [
     label: '销售价'
   },
   {
-    prop: 'todo',
-    label: '总服务费',
+    label: '业务公司',
+    _slot_: "company",
+    width: "180px"
   },
   {
-    prop: 'companyNo',
-    label: '企业客户',
-    _slot_: "company"
+    label: '供应商公司',
+    _slot_: "supplier",
+    width: "180px"
   },
   {
-    prop: 'status',
-    label: '状态',
-    width: '125px',
-    _slot_: 'status'
+    label: '企业客户',
+    _slot_: "customer",
+    width: "180px"
   },
   {
-    prop: 'todo',
+    prop: 'plat_code',
     label: '平台商品编号',
     'min-width': '145px'
   },
   {
-    prop: 'todo',
+    prop: 'platform_name',
     label: '所属平台',
     width: '110px'
   },
@@ -68,7 +81,7 @@ const columns = [
     label: '操作',
     fixed: 'right',
     _noset_: true,
-    width: '110px',
+    width:  '110px',
     _slot_: 'operation'
   }
 ]
@@ -85,25 +98,23 @@ export const options13 = [
 ]
 
 const statusOptions = [
-  { value: '0', label: '待审核是否合规' },
-  { value: '1', label: '审核不合规' },
-  { value: '2', label: '已合规待转单' },
-  { value: '3', label: '已部分转单' },
-  { value: '4', label: '已全部转单' },
-  { value: '5', label: '已取消转单' }
+  { value: '1', label: '待转单' },
+  { value: '2', label: '已部分转单' },
+  { value: '3', label: '转单成功' },
+  { value: '4', label: '已取消转单' }
 ]
 
 export const editColumns = [
   {
-    prop: 'filingCode',
+    prop: 'fillCode',
     label: '报备单编号',
     span: 6
   },
   {
     prop: 'status',
     label: '状态',
-    _slot_: 'status',
-    span: 6
+    span: 6,
+    _slot_:'status'
   },
   {
     prop: 'apply_name',
@@ -124,60 +135,25 @@ export const editColumns = [
   {
     prop: 'customerName',
     label: '业务公司名称',
-    _slot_: 'customerName',
+    _slot_: 'companyName',
     span: 12
   },
   {
     prop: 'companyName',
     label: '客户名称',
-    _slot_: 'companyName',
+    _slot_: 'customerName',
     span: 12
   },
   {
-    prop: 'num',
-    label: '销售数量',
-    span: 6
-  },
-
-  {
-    prop: 'is_determine_price',
-    label: '是否确认售价',
-    _slot_: 'is_determine_price',
-    span: 6
-  },
-
-  {
-    prop: 'cgd_charge',
+    prop: 'origin_price',
     label: '采购单价',
     span: 6
   },
   {
-    prop: 'price',
+    prop: 'good_price',
     label: '销售单价',
     span: 6
   },
-  {
-    prop: 'expect_service',
-    label: '期望服务费',
-    span: 6
-  },
-  {
-    prop: 'expect_service_proportion',
-    label: '期望服务费比例',
-    span: 6,
-    _slot_: 'expect_service_proportion'
-  },
-  {
-    prop: 'service_charge',
-    label: '最终服务费',
-    span: 6
-  },
-  {
-    prop: 'service_proportion',
-    label: '最终服务费比例',
-    _slot_: 'service_proportion',
-    span: 6
-  },
   {
     prop: 'transfer_num',
     label: '已转单数量',
@@ -201,23 +177,24 @@ export const editColumns = [
   {
     prop: 'platform_name',
     label: '所属平台',
-    span: 12
-  },
-  {
-    prop: '',
-    _slot_: 'annex',
-    label: '附件',
     span: 6
   },
   {
-    prop: 'plat_orderCode',
-    label: '供应商订单号',
+    prop: 'is_compliance',
+    label: '是否合规',
+    _slot_: 'is_compliance',
     span: 6
   },
   {
-    prop: 'orderCode',
-    label: '订单编号',
+    prop: 'fill_type',
+    label: '报备单类型',
+    _slot_: "fill_type",
     span: 12
+  },
+  {
+    prop: 'fill_remark',
+    label: '备注',
+    span: 24
   }
 ]
 
@@ -261,7 +238,7 @@ export const coveColumns = [
   },
   {
     prop: 'pay_way',
-    label: '付方式',
+    label: '付方式',
     _slot_: 'pay_way',
     span: 6
   },
@@ -305,12 +282,6 @@ export const coveColumns = [
     _slot_: 'good_img',
     span: 24
   },
-  // {
-  //   prop: "noble",
-  //   _slot_: "noble",
-  //   label: "贵金属信息",
-  //   span: 24,
-  // },
   {
     prop: 'cost_desc',
     label: '工艺说明',
@@ -431,13 +402,6 @@ const showColumns = [
     label: '购买方公司',
     _slot_: 'company'
   },
-
-  // {
-  //   prop: "wsm",
-  //   label: "仓库信息",
-  //   _slot_: "wsm",
-  // },
-
   {
     prop: 'total_fee',
     label: '采购总成本',
@@ -523,7 +487,7 @@ const options8 = [
 // 配置要求
 const options9 = ['证书', '包装盒', '绒布袋', '标签', '其他']
 
-// 付方式
+// 付方式
 const options10 = [
   { id: '0', name: '现结' },
   { id: '1', name: '月清' },
@@ -582,6 +546,8 @@ const statusList = [
     type: 'info'
   }
 ]
+
+
 const listCol = [
   { type: 'selection', fixed: 'left', _noset_: true },
   {
@@ -1015,7 +981,7 @@ const rules = {
   pay_way: [
     {
       required: true,
-      message: '请选择付方式',
+      message: '请选择付方式',
       trigger: 'change'
     }
   ],

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

@@ -197,7 +197,7 @@ export const createRules = {
   },
   pay_way:{
     required:true,
-    message:'请选择付方式',
+    message:'请选择付方式',
     trigger:'blur'
   },
   config:{

+ 120 - 10
src/views/sellOut/businessFiling/detail.vue

@@ -4,29 +4,106 @@
       <ElTabPane label="新建业务报备" v-if="isAdd">
         <CreateBusinessForm />
       </ElTabPane>
+
       <template v-else>
         <ElTabPane label="业务报备详情">
           <ElCollapse v-model="actives">
             <ElCollapseItem title="业务报备详情" name="0">
-            </ElCollapseItem>
+              <show-data-table 
+                style="padding: -5px 0 10px 0"
+                :sitem="sitem"
+                :columns="editColumns"
+              >
+
+                <template #status="{ scope }">
+                  <el-tag size="mini">
+                    {{ (statusOptions.find(({value}) => value === String(sitem.status)) || {}).label || '--' }}
+                  </el-tag>
+                </template>
+                <template #is_compliance="{ scope }">
+                 <el-tag size="mini">
+                  {{sitem.is_compliance === "0" ? "未填写" : sitem.is_compliance === "1" ? "合规" : "不合规"}}
+                </el-tag>
+               </template>
+
+               <template slot="supplierName">
+                 <span>{{ sitem.supplierName }}</span>
+                 <el-popover placement="top" width="300" trigger="hover">
+                   <ul>
+                    <li>
+                      <span>供应商编号:</span><span>{{ sitem.supplierNo }}</span>
+                    </li>
+                   </ul>
+                   <i slot="reference" class="el-icon-warning-outline fr" />
+                 </el-popover>
+                </template>
+
+                <template slot="customerName">
+                    <span>{{ sitem.customerName }}</span>
+                    <el-popover placement="top" width="300" trigger="hover">
+                      <ul>
+                       <li>
+                         <span>企业客户编号:</span><span>{{ sitem.customerCode }}</span>
+                       </li>
+                      </ul>
+                      <i slot="reference" class="el-icon-warning-outline fr" />
+                  </el-popover>
+                </template>
 
+                <template slot="companyName">
+                  <span>{{ sitem.companyName }}</span>
+                  <el-popover v-if="sitem.companyNo" placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li>
+                        <span>业务公司编号编号:</span><span>{{ sitem.companyNo }}</span>
+                      </li>
+                    </ul>
+                    <i slot="reference" class="el-icon-warning-outline fr" />
+                  </el-popover>
+                </template>
+
+                <template slot="fill_type">
+                  <el-tag size="mini">
+                    {{(fillTypeOptions.find( ({value}) => value === String(sitem.fill_type)) || {}).label || "--"}}
+                  </el-tag>
+                </template>
+              </show-data-table>
+            </ElCollapseItem>
+            
             <ElCollapseItem title="商品详情" name="1">
-              <ShowGoodsDataTable
-                :type="'4'"
-                :skucode="'SN2303222038477600'"
-                :spucode="'SKU2303222034205711'"
+              <show-goods-data-table
+                :newTime="newTime"
+                v-if="newTime !== '' && sitem"
+                :type="sitem.fill_type"
+                :skucode="sitem.skuCode"
+                :spucode="sitem.spuCode"
+                :iscgd="String(sitem.fill_type) === '3'"
+                :border="true"
               />
             </ElCollapseItem>
             
-            <ElCollapseItem title="是否合规设置" name="2">
-              <ComplianceForm />
+            <ElCollapseItem title="是否合规设置" name="2" v-if="String(sitem.is_compliance) === '0' && powers.includes('095')">
+              <ComplianceForm :id="id" @refresh="initialData" />
             </ElCollapseItem>
 
-            <ElCollapseItem title="待转单" name="3">
-              <WaitTransferred />
+            <ElCollapseItem title="待转单" name="3" v-if="(String(sitem.status) === '1' || String(sitem.status) === '2') && (ppowers.includes('1') || ppowers.includes('2'))">
+              <WaitTransferred :id="id" :waitNum="sitem.wait_num" @refresh="initialData" />
             </ElCollapseItem>
           </ElCollapse>
         </ElTabPane>
+
+        <ElTabPane label="审批记录">
+          <process-time-line
+            v-if="newTime !== ''"
+            :newTime="newTime"
+            :type="'YWBBD'"
+            :orderCode="id"
+          />
+        </ElTabPane>
+
+        <ElTabPane label="流程图">
+          <flow-chart process_id="32" type="YWBBD" :orderCode="id" />
+        </ElTabPane>
       </template>
     </ElTabs>
   </div>
@@ -36,6 +113,8 @@
 import CreateBusinessForm from './components/createBusinessForm'
 import WaitTransferred from "./components/waitTransferred.vue"
 import ComplianceForm from "./components/complianceForm.vue"
+import asyncRequest from "@/apis/service/sellOut/businessFiling"
+import { editColumns, coveColumns,statusOptions } from "./config/columns"
 
 export default {
   components: {
@@ -45,10 +124,26 @@ export default {
   },
   data(){
     return {
-      actives:["0", "1",  "2", "3"]
+      newTime: "",
+      actives: ["0", "1",  "2", "3"],
+      sitem: {},
+      editColumns,
+      coveColumns,
+      statusOptions,
+      fillTypeOptions: [
+        { value: "1", label: "库存" },
+        { value: "2", label: "非库存" },
+        { value: "3", label: "咨询商品" }
+      ]
     }
   },
+  mounted(){
+    this.initialData();
+  },
   computed:{
+    id(){
+      return this.$route.query.id;
+    },
     isAdd(){
       return this.$route.query.type === "add";
     },
@@ -57,6 +152,21 @@ export default {
       const tran = btnList.find(item => item.menu_route == "businessFilingDetail") || {};
       const { action } = tran ?? {};
       return action ?? [];
+    },
+    ppowers() {
+      const tran =
+        this.$store.getters.roleProcess.find((i) => i.process_type === "YWBBD") || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    }
+  },
+  methods:{
+    async initialData(){
+      const response = await asyncRequest.detail({ id: this.id})
+      if(response.code !== 0) return;
+      this.sitem = response.data;
+      this.sitem.wait_num = response.data.good_num - response.data.transfer_num;
+      this.newTime = (new Date()).valueOf();
     }
   }
 }

+ 65 - 120
src/views/sellOut/businessFiling/index.vue

@@ -29,8 +29,8 @@
                 :type="1"
                 :width="'135px'"
                 :size="searchSize"
-                :start_date="timeOBJ.start_date"
-                :end_date="timeOBJ.end_date"
+                :start="timeOBJ.start"
+                :end="timeOBJ.end"
                 @timeReturned="handleTime"
               />
             </el-col>
@@ -39,7 +39,7 @@
               <el-input
                 size="mini"
                 placeholder="报备单号"
-                v-model="parmValue.filingCode"
+                v-model="parmValue.fillCode"
                 @blur="
                   pageInfo.curr = 1;
                   parmValue.page = 1;
@@ -77,40 +77,24 @@
           <el-row>
             <el-col :span="3" class="fr" style="width: 66px; margin-top: 10px">
               <el-button
-                v-if="powers.includes('003')"
-                :size="searchSize"
-                type="success"
-                style="float: right"
-                @click="
-                  routeGoto('/sellOut/businessFilingDetail', { id: 'add', type: 'add' })
-                "
+                v-if="powers.includes('003')"  :size="searchSize" type="success" style="float: right"
+                @click="routeGoto('/sellOut/businessFilingDetail', { id: 'add', type: 'add' })"
               >添加</el-button>
             </el-col>
+
             <el-col :span="4" style="margin-top: 15px">
               <search-customer
                 size="mini"
                 :names="khName"
                 :is-detail="type !== 'add'"
-                :value="parmValue.companyCode"
+                :value="parmValue.customerCode"
                 placeholder="客户公司"
                 @searchChange="handleCustomerChange"
               />
             </el-col>
 
-            <el-col :span="4" style="margin-top: 15px;margin-left:10px">
-              <search-supplier
-                :size="'mini'"
-                :value="parmValue.supplierNo"
-                :disabled="false"
-                :placeholder="'供应商名称'"
-                :names="parmValue.supplierName"
-                :is-detail="true"
-                :no-disabled="true"
-                @searchChange="supplierChange"
-              />
-            </el-col>
-
             <el-col :span="4" style="margin-top: 15px; margin-left: 10px">
+
               <el-select
                 clearable
                 size="mini"
@@ -135,9 +119,23 @@
       </template>
 
       <template #is_compliance="{ scope }">
-        {{scope.row.is_compliance === "0" ? "未填写" : scope.row.is_compliance === "1" ? "合规" : "不合规"}}
+        <el-tag size="mini">
+          {{scope.row.is_compliance === "0" ? "未填写" : scope.row.is_compliance === "1" ? "合规" : "不合规"}}
+        </el-tag>
       </template>
 
+      <template #good_img="{ scope }">
+        <img
+          v-viewer
+          style="width: 23px; height: 23px; margin: 0 5px 0 0"
+          class="fl"
+          :src="scope.row.good_img"
+          alt
+        />
+      </template>
+      <template #cat_info="{ scope }">
+        {{ scope.row.cat.search }}
+      </template>
       <template #good_img="{ scope }">
         <div v-if="scope.row.good_img" style="width: 20px; height: 20px" class="hover" v-viewer>
           <img
@@ -147,38 +145,32 @@
           />
         </div>
       </template>
-
-      <template #company="{scope}">
-        <div style="display:flex;align-items:center">
-          <el-tooltip :content="'企业客户编码 : ' + (scope.row.companyCode || '--')" placement="top">
+      <template #customer="{ scope }">
+          <el-tooltip :content="'企业客户编码 : ' + (scope.row.customerCode || '--')" placement="top">
             <i
-              v-if="scope.row.companyName"
+              v-if="scope.row.customerName"
               class="el-icon-warning-outline"
               style="margin-right:2px;cursor:pointer"
             />
           </el-tooltip>
-          {{scope.row.companyName}}
-        </div>
+          {{scope.row.customerName}}
       </template>
-
-      <template #customer="{scope}">
-        <div style="display:flex;align-items: center">
-          <el-tooltip :content="'业务公司编码 : ' + (scope.row.customerCode || '--')" placement="top">
-            <i class="el-icon-warning-outline" style="margin-right:2px;cursor:pointer" />
+      <template #company="{ scope }">
+          <el-tooltip :content="'业务公司编码 : ' + (scope.row.companyNo || '--')" placement="top">
+            <i
+              v-if="scope.row.companyName"
+              class="el-icon-warning-outline"
+              style="margin-right:2px;cursor:pointer"
+            />
           </el-tooltip>
-          {{ scope.row.customerName }}
-        </div>
+          {{scope.row.companyName}}
       </template>
-
       <template #supplier="{scope}">
-        <div style="display:flex; align-items:center">
           <el-tooltip :content="'供应商公司编码 : ' + (scope.row.supplierNo || '--')" placement="top">
             <i class="el-icon-warning-outline" style="margin-right:2px;cursor:pointer" />
           </el-tooltip>
           {{scope.row.supplierName}}
-        </div>
       </template>
-
       <template #status="{ scope }">
         <el-tag
           :size="tablebtnSize"
@@ -187,31 +179,9 @@
           "
         ></el-tag>
       </template>
-
       <template #operation="{ scope }">
         <el-tooltip effect="dark" content="详情" placement="top">
-          <i class="el-icon-view tb-icon" @click="getRouter('/sellOut/filingDetail', scope.row.id)"></i>
-        </el-tooltip>
-
-        <el-tooltip effect="dark" content="修改" placement="top">
-          <i
-            v-if="String(scope.row.status) === '1' && !isSupertube && powers.includes('005') && Number(scope.row.wsm_has_account) === 0"
-            class="el-icon-edit tb-icon"
-            @click="getRouter('/sellOut/filingDetail', scope.row.id, 'edit')"
-          />
-        </el-tooltip>
-
-        <el-tooltip effect="dark" content="取消转单" placement="top">
-          <i
-            v-if="
-              String(scope.row.status) !== '4' 
-              && String(scope.row.status) !== '5' 
-              && Number(scope.row.wsm_has_account) === 0
-              && powers.includes('005')
-            "
-            class="el-icon-refresh-right tb-icon"
-            @click="handleCancel(scope.row.id)"
-          ></i>
+          <i class="el-icon-view tb-icon" @click="getRouter('/sellOut/businessFilingDetail', scope.row.id)"></i>
         </el-tooltip>
       </template>
     </ex-table>
@@ -227,6 +197,7 @@ import urlConfig from "@/apis/url-config";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
 
+
 export default {
   name: "purchaseOrder",
   mixins: [mixinPage, resToken, companyHelper],
@@ -274,8 +245,8 @@ export default {
       select: "1",
       input: "",
       timeOBJ: {
-        start_date: "", //起始时间
-        end_date: "" // 结束时间
+        start: "", //起始时间
+        end: "" // 结束时间
       },
       // 状态
       statusOptions: statusOptions,
@@ -286,10 +257,12 @@ export default {
       wsm_code: [],
       wsm_supplierNo: [],
       parmValue: {
-        supplierNo: [],
-        companyCode: [],
-        start_date: "", //新建起始时间
-        end_date: "" // 新建结束时间
+        fillCode: "",
+        good_name: "",
+        customerCode: [],
+        status: "",
+        start: "", //新建起始时间
+        end: "" // 新建结束时间
       },
       tableData: [],
       passwordModel: false,
@@ -318,7 +291,7 @@ export default {
     if (back) {
       this.parmValue = JSON.parse(back);
       console.log(this.parmValue);
-      const { page, size, start_date, end_date } = this.parmValue;
+      const { page, size, start, end } = this.parmValue;
 
       this.pageInfo = {
         size: this.pageInfo.size,
@@ -348,22 +321,13 @@ export default {
       this.searchList();
     },
     getRouter(toRouter, queryId, type) {
-      console.log(toRouter, queryId);
       if (toRouter && queryId) {
-        let model = {
-          id: queryId,
-          type
-        };
-
+        let model = { id: queryId, type };
         //有多选框的条件
         this.parmValue.select = this.select;
         this.parmValue.sselect = this.sselect;
         this.parmValue.input = this.input;
-
-        let routerModel = {
-          options: JSON.parse(JSON.stringify(this.parmValue)),
-          router: this.$route.path
-        };
+        let routerModel = { options: JSON.parse(JSON.stringify(this.parmValue)), router: this.$route.path };
         model.preModel = JSON.stringify(routerModel);
         this.routeGoto(toRouter, model);
       } else {
@@ -386,15 +350,9 @@ export default {
     },
     showal(list, message, code) {
       let htmlList = "<ul>";
-      list.forEach(v => {
-        htmlList += `<li>${code !== "" ? v[code] : v}</li>`;
-      });
+      list.forEach(v => { htmlList += `<li>${code !== "" ? v[code] : v}</li>`});
       htmlList += "</ul>";
-      this.$notify({
-        title: message,
-        dangerouslyUseHTMLString: true,
-        message: htmlList
-      });
+      this.$notify({ title: message, dangerouslyUseHTMLString: true, message: htmlList });
     },
     restSearch() {
       this.select = "1";
@@ -402,24 +360,16 @@ export default {
       this.wsm_code = [];
       this.wsm_supplierNo = [];
       this.timeOBJ = {
-        start_date: "", //起始时间
-        end_date: "" // 结束时间
+        start: "", //起始时间
+        end: "" // 结束时间
       };
       this.parmValue = {
-        filingCode: "", // 报备单编码
-        wsm_in_code: "", // 入库单号
-        cgdNo: "", // 销售订单编码
-        apply_name: "", // 申请人
+        start: "", //新建起始时间
+        end: "", // 新建结束时间
+        fillCode: "", // 报备单编码
         good_name: "", // 产品名称
-        good_code: "", // 产品属性编号
+        customerCode: [],
         status: "", //状态
-        wsm_code: "", //入货仓库编码
-        start_date: "", //新建起始时间
-        end_date: "", // 新建结束时间
-        last_start_date: "", //最后入库时间开始
-        last_end_date: "", //最后入库时间结束
-        orderCode: "", //订单编号
-        company_name: "", //部门
         page: 1, // 页码
         size: 15 // 每页显示条数
       };
@@ -432,7 +382,7 @@ export default {
       this.searchList();
     },
     handleCustomerChange(e) {
-      this.parmValue.companyCode = e.code ? [e.code] : "";
+      this.parmValue.customerCode = e.code ? [e.code] : "";
       this.customerName = e.label;
       this.searchList();
     },
@@ -440,27 +390,22 @@ export default {
       if (this.loading) return;
 
       if (
-        (this.timeOBJ.start_date !== "" && this.timeOBJ.end_date === "") ||
-        (this.timeOBJ.start_date === "" && this.timeOBJ.end_date !== "")
+        (this.timeOBJ.start !== "" && this.timeOBJ.end === "") ||
+        (this.timeOBJ.start === "" && this.timeOBJ.end !== "")
       ) {
         this.$message.warning("时间区间不完整!");
         return;
       }
 
       this.loading = true;
-
       const res = await asyncRequest.list({
         ...this.parmValue,
         ...this.timeOBJ,
         ...this.pageInfo,
-        customerCode: this.currentCompany,
-        supplierNo: Array.isArray(this.parmValue.supplierNo)
-          ? this.parmValue.supplierNo[0]
-          : this.parmValue.supplierNo,
-        companyCode: Array.isArray(this.parmValue.companyCode)
-          ? this.parmValue.companyCode[0]
-          : this.parmValue.companyCode,
-        noRelation: true
+        noRelation: true,
+        companyNo: this.currentCompany,
+        supplierNo: Array.isArray(this.parmValue.supplierNo) ? this.parmValue.supplierNo[0] : this.parmValue.supplierNo,
+        customerCode: Array.isArray(this.parmValue.customerCode) ? this.parmValue.customerCode[0] : this.parmValue.customerCode
       });
       const { code, data } = await this.useResHandle(res);
       if (code === 0) {
@@ -475,8 +420,8 @@ export default {
     },
     // 时间
     async handleTime(e) {
-      this.timeOBJ.start_date = e?.startTime ?? "";
-      this.timeOBJ.end_date = e?.endTime ?? "";
+      this.timeOBJ.start = e?.startTime ?? "";
+      this.timeOBJ.end = e?.endTime ?? "";
 
       if (e.startTime && e.endTime) {
         this.pageInfo.curr = 1;

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

@@ -288,7 +288,7 @@ export const coveColumns = [
   },
   {
     prop: 'pay_way',
-    label: '付方式',
+    label: '付方式',
     _slot_: 'pay_way',
     span: 6
   },
@@ -550,7 +550,7 @@ const options8 = [
 // 配置要求
 const options9 = ['证书', '包装盒', '绒布袋', '标签', '其他']
 
-// 付方式
+// 付方式
 const options10 = [
   { id: '0', name: '现结' },
   { id: '1', name: '月清' },
@@ -1042,7 +1042,7 @@ const rules = {
   pay_way: [
     {
       required: true,
-      message: '请选择付方式',
+      message: '请选择付方式',
       trigger: 'change'
     }
   ],

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

@@ -197,7 +197,7 @@ export const createRules = {
   },
   pay_way:{
     required:true,
-    message:'请选择付方式',
+    message:'请选择付方式',
     trigger:'blur'
   },
   config:{

+ 2 - 2
src/views/sellOut/filing/cpns/baseForm.vue

@@ -287,14 +287,14 @@
               </el-form-item>
             </el-col>
             <el-col :span="12">
-              <el-form-item label="付方式" prop="pay_way" class="clear">
+              <el-form-item label="付方式" prop="pay_way" class="clear">
                 <el-select
                   v-model="ruleForm.pay_way"
                   filterable
                   :disabled="type === 'view'"
                   clearable
                   style="width: 100%"
-                  placeholder="付方式"
+                  placeholder="付方式"
                 >
                   <el-option
                     v-for="group in options10"

+ 0 - 4
src/views/sellOut/filing/detail.vue

@@ -36,10 +36,6 @@
               <wait-transferred :id="id" :num="num" @refresh="handleRefresh" />
             </el-collapse-item>
           </tempalte>
-
-<!--          <el-collapse-item v-if="status === '3'" name="4" title="发货单"> -->
-<!--            <shipment-request :order-code="orderCode" /> -->
-<!--          </el-collapse-item> -->
         </el-collapse>
       </el-tab-pane>
 

+ 2 - 2
src/views/sellOut/filing/source/columns.js

@@ -41,7 +41,7 @@ const options8 = [
 ];
 //配置要求
 const options9 = ["证书", "包装盒", "绒布袋", "标签", "其他"];
-//付方式
+//付方式
 const options10 = [
   { id: "0", name: "现结" },
   { id: "1", name: "月清" },
@@ -214,7 +214,7 @@ const coveColumns = [
   },
   {
     prop: "pay_way",
-    label: "付方式",
+    label: "付方式",
     _slot_: "pay_way",
     span: 6,
   },

+ 21 - 2
src/views/sellOut/salesOrder/components/addForm.vue

@@ -25,6 +25,7 @@
                 />
               </el-form-item>
             </el-col>
+
             <el-col :span="12">
               <el-form-item label="企业客户" prop="customer_code">
                 <search-customer
@@ -38,6 +39,7 @@
                 />
               </el-form-item>
             </el-col>
+
             <el-col :span="6">
               <el-form-item label="所属平台" prop="platform_id">
                 <search-terrace
@@ -51,11 +53,13 @@
                 />
               </el-form-item>
             </el-col>
+            
             <el-col :span="6">
               <el-form-item label="平台订单号" prop="platform_order">
                 <el-input v-model="ruleForm.platform_order" placeholder="如:PO号" maxlength="100" />
               </el-form-item>
             </el-col>
+
             <el-col :span="6">
               <el-form-item label="回款时间" prop="paytime">
                 <el-date-picker
@@ -355,6 +359,7 @@
                 :sitem="addshowModel"
                 :active="true"
                 :show-model="showModel"
+                :platform_type="platformType"
                 @resultList="resultList"
                 @cancel="showModel = false"
               />
@@ -596,7 +601,7 @@ import {
   isAddr
 } from "@/utils/validate";
 import showVoucherModel from "@/components/show-voucher-model";
-import searchGoodOnlineModal from "@/components/search-good-online-modal";
+import searchGoodOnlineModal from "@/components/good-online-platform-modal";
 import inAddrModel from "@/components/in-addr-model";
 import { addColumns } from "./ShowDataTableColumns";
 import companyHelper from "@/mixins/companyHelper";
@@ -690,7 +695,8 @@ export default {
       }
     };
     return {
-        isCombindChild: true,
+      platformType:"",
+      isCombindChild: true,
       ShowDataTableColumns: addColumns,
       AddrAddEditModalIndex: -1,
       AddrAddEditModalSitem: {},
@@ -1195,6 +1201,18 @@ export default {
         this.$message.warning("请选择所属平台!");
         return;
       }
+
+      if(this.platformType === "1"){
+        this.$message.warning("当前业务不支持对接有赞平台的商品")
+        return
+      }
+
+      if(this.platformType === "2"){
+        this.$message.warning("当前业务不支持对接BBC平台的商品")
+        return
+      }
+
+
       this.addshowModel = {
         company_id: supplierNo,
         platform_code: platform_id
@@ -1225,6 +1243,7 @@ export default {
       this.ruleForm.platform_id = id || "";
       this.$refs.ruleForm.validateField("platform_id");
       this.ruleForm.good_code = "";
+      this.platformType = e.platform_type;
       this.goods_sitem = {};
     },
     openHouseModal(index) {

+ 1 - 0
src/views/sellOut/zixunOrder/components/addEditForm.vue

@@ -373,6 +373,7 @@ export default {
       options: [
         { value: "0", label: "非项目" },
         { value: "1", label: "项目" },
+        // { value: "2", label: "业务报备" }
       ],
       statusOptions: [
         { value: "1", label: "竞品" },

+ 1 - 0
src/views/sellOut/zixunOrder/components/editForm.vue

@@ -689,6 +689,7 @@ export default {
       options: [
         { value: "0", label: "非项目" },
         { value: "1", label: "项目" },
+        { value: "2", label: "业务报备" }
       ],
       statusOptions: [
         { value: "1", label: "竞品" },

+ 68 - 31
src/views/sellOut/zixunOrder/components/feedbackList.vue

@@ -79,7 +79,7 @@
         <el-tooltip
           v-if="
             powers.some((i) => i == '068') &&
-            is_project + '' === '0' &&
+            (is_project + '' === '0' || is_project + '' === '2') &&
             ((status + '' === '2' && ppowers.some((i) => i == '2')) ||
               (status + '' === '7' && ppowers.some((i) => i == '7')) ||
               (status + '' === '3' && ppowers.some((i) => i == '3'))) &&
@@ -109,7 +109,7 @@
         </el-tooltip>-->
         <el-tooltip
           v-if="
-            is_project === '0' &&
+            (is_project === '0') &&
             ((status + '' === '2' && ppowers.some((i) => i == '2')) ||
               (status + '' === '7' && ppowers.some((i) => i == '7')) ||
               (status + '' === '3' && ppowers.some((i) => i == '3')))
@@ -120,6 +120,18 @@
         >
           <i class="el-icon-shopping-cart-2 tb-icon" @click="buy_goods(scope.row)"></i>
         </el-tooltip>
+
+        <el-tooltip 
+          v-if="is_project === '2' &&
+           ((status + '' === '2' && ppowers.some((i) => i == '2')) ||
+              (status + '' === '7' && ppowers.some((i) => i == '7')) ||
+              (status + '' === '3' && ppowers.some((i) => i == '3')))
+          "
+          content="咨询转报备" 
+          placement="top"
+          >
+          <i class="el-icon-sort tb-icon" style="transform: rotate(90deg);" @click="transfer_goods(scope.row)" />
+        </el-tooltip>
       </template>
     </ex-table>
     <add-edit-bargain
@@ -128,6 +140,7 @@
       @cancel="wantBmodel = false"
       @refresh="(wantBmodel = false), $emit('resGoodOk')"
     />
+
     <buy-good-modal
       :showModel="bayGoodShowModel"
       :sitem="bayGoodItem"
@@ -135,6 +148,13 @@
       @refresh="(bayGoodShowModel = false), $emit('resGoodOk')"
     />
 
+    <transfer-goods-modal 
+      :showModel="transferGoodsShowModel"
+      :sitem="transferGoodsItem"
+      @cancel="transferGoodsShowModel = false"
+      @refresh="(transferGoodsShowModel = false), $emit('resGoodOk')"
+    />
+
     <show-goods-data-table-modal
       :showModel="visible"
       :type="'3'"
@@ -144,6 +164,7 @@
       :iscgd="true"
       @cancel="visible = false"
     />
+    
 
     <el-dialog
       title="上次议价驳回原因"
@@ -175,6 +196,7 @@ import { feedbackListCol } from "../columns";
 import { mapGetters } from "vuex";
 import addEditBargain from "./addEditBargain";
 import buyGoodModal from "./buyGoodModal";
+import TransferGoodsModal from "./transferGoodModal.vue";
 import showGoodsDataTableModal from "@/components/show-goods-data-table-modal";
 export default {
   name: "zixunOrder",
@@ -183,23 +205,18 @@ export default {
   components: {
     addEditBargain,
     buyGoodModal,
+    TransferGoodsModal,
     showGoodsDataTableModal
   },
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
-      const tran =
-        this.$store.getters.btnList.find(
-          item => item.menu_route == "zixunOrderDetail"
-        ) || {};
+      const tran = this.$store.getters.btnList.find(item => item.menu_route == "zixunOrderDetail") || {};
       const { action } = tran ?? {};
       return action ?? [];
     },
     ppowers() {
-      const tran =
-        this.$store.getters.roleProcess.find(
-          item => item.process_type === "ZXD"
-        ) || {};
+      const tran = this.$store.getters.roleProcess.find(item => item.process_type === "ZXD") || {};
       const { action } = tran ?? {};
       return action ?? [];
     }
@@ -226,7 +243,9 @@ export default {
       s_input: "",
       status: "",
       bayGoodShowModel: false,
+      transferGoodsShowModel:false,
       bayGoodItem: {},
+      transferGoodsItem: {},
       is_project: false,
       customerCode: [], //客户公司code
       baoptions: [
@@ -235,7 +254,6 @@ export default {
         { id: "2", label: "待财务专员审批", type: "warning" },
         { id: "3", label: "业务主管驳回", type: "danger" },
         { id: "4", label: "待财务主管审核", type: "warning" },
-        // { id: "5", label: "专员驳回", type: "" },
         { id: "6", label: "财务主管通过", type: "success" },
         { id: "7", label: "待BOSS审批", type: "warning" },
         { id: "8", label: "财务主管驳回", type: "danger" },
@@ -306,6 +324,45 @@ export default {
   },
 
   methods: {
+    transfer_goods(row){
+      const {
+        company,
+        companyNo,
+        khname,
+        platform_name,
+        arrival_time,
+        num
+      } = this.sitem;
+
+      this.transferGoodsItem = JSON.parse(JSON.stringify(row));
+      this.transferGoodsItem.in_company = company;
+      this.transferGoodsItem.in_companyNo = companyNo;
+      this.transferGoodsItem.in_khname = khname;
+      this.transferGoodsItem.in_platform_name = platform_name;
+      this.transferGoodsItem.in_arrival_time = arrival_time;
+      this.transferGoodsItem.in_num = num;
+      this.transferGoodsShowModel = true;
+    },
+    buy_goods(row) {
+      const {
+        company,
+        companyNo,
+        khname,
+        platform_name,
+        arrival_time,
+        num
+      } = this.sitem;
+      this.bayGoodItem = JSON.parse(JSON.stringify(row));
+      this.bayGoodItem.in_company = company;
+      this.bayGoodItem.in_companyNo = companyNo;
+      this.bayGoodItem.in_khname = khname;
+      this.bayGoodItem.in_platform_name = platform_name;
+      this.bayGoodItem.in_arrival_time = arrival_time;
+      this.bayGoodItem.in_num = num;
+      this.bayGoodShowModel = true;
+
+      // console.log(row);
+    },
     show_view(row) {
       this.row = row;
       this.visible = true;
@@ -420,26 +477,6 @@ export default {
           console.log("取消");
         });
     },
-    buy_goods(row) {
-      const {
-        company,
-        companyNo,
-        khname,
-        platform_name,
-        arrival_time,
-        num
-      } = this.sitem;
-      this.bayGoodItem = JSON.parse(JSON.stringify(row));
-      this.bayGoodItem.in_company = company;
-      this.bayGoodItem.in_companyNo = companyNo;
-      this.bayGoodItem.in_khname = khname;
-      this.bayGoodItem.in_platform_name = platform_name;
-      this.bayGoodItem.in_arrival_time = arrival_time;
-      this.bayGoodItem.in_num = num;
-      this.bayGoodShowModel = true;
-
-      // console.log(row);
-    },
     // 时间选择事件
     async handleTime(e) {
       const { startTime, endTime } = e;

+ 1020 - 0
src/views/sellOut/zixunOrder/components/transferGoodModal.vue

@@ -0,0 +1,1020 @@
+<template>
+  <el-dialog
+    v-loading="loading"
+    :title="'咨询单转报备'"
+    :center="true"
+    align="left"
+    top="5vh"
+    width="1040px"
+    :close-on-click-modal="false"
+    :visible.sync="showModelThis"
+    element-loading-text="拼命加载中"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0.8)"
+    append-to-body
+    @close="showModelThis = false"
+  >
+    <el-card style="margin-top: -20px">
+      <el-row>
+        <el-col :span="24">
+          <show-data-table
+            v-if="newTime !== '' && sitem"
+            style="margin: 0; padding: 0"
+            :new-time="newTime"
+            :sitem="sitem"
+            border
+            :columns="ShowDataTableColumns"
+          >
+            <template slot="good_name">
+              <span>{{ sitem.good_name }}</span>
+              <span v-for="(si, sii) in sitem.specinfo" :key="si.specid + sii">
+                <span v-if="sii !== 0">--</span>
+                <span>{{ si.spec_name }}[{{ si.spec_value_name }}]</span>
+              </span>
+            </template>
+            <template slot="is_noble">
+              <span v-if="sitem.is_noble">
+                {{ sitem.noble_weight }}g--{{ sitem.metal_name }}--{{
+                sitem.is_diff === "1" ? "有" : "无"
+                }}工差--{{ sitem.config }}--{{ sitem.other_config }}
+              </span>
+              <span v-else>非贵金属商品</span>
+            </template>
+            <template slot="in_num">
+              <span>{{ sitem.in_num }}{{ sitem.unit }}</span>
+            </template>
+          </show-data-table>
+        </el-col>
+        <el-col :span="24" style="padding: 18px 0 0 0">
+          <el-form
+            ref="ruleForm"
+            :model="ruleForm"
+            status-icon
+            :rules="rulesThis"
+            :size="'mini'"
+            label-width="85px"
+            class="demo-ruleForm"
+          >
+            <el-row>
+              <el-col :span="5">
+                <el-form-item label="报备数量" prop="good_num">
+                  <digital-input
+                    :values="ruleForm.good_num"
+                    :placeholder="'报备数量'"
+                    :min="1"
+                    :max="100000000000"
+                    :position="'right'"
+                    :precision="0"
+                    :size="'mini'"
+                    :controls="false"
+                    :disabled="false"
+                    :append="sitem.unit"
+                    @reschange="num_change($event, 'good_num')"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :span="6">
+                <el-form-item label="销售单价" prop="sale_price">
+                  <digital-input
+                    :values="ruleForm.sale_price"
+                    :placeholder="'商品单价'"
+                    :min="sitem.sale_price"
+                    :max="100000000000"
+                    :position="'right'"
+                    :precision="2"
+                    :size="'mini'"
+                    :controls="false"
+                    :disabled="false"
+                    :append="'元'"
+                    @reschange="num_change($event, 'sale_price')"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :span="11">
+                <el-form-item label="业务公司" prop="companyNo" label-width="85px">
+                  <search-work-company
+                    :value="ruleForm.companyNo"
+                    :placeholder="'业务公司'"
+                    :disabled="true"
+                    :size="'mini'"
+                    :is-detail="true"
+                    @searchChange="company_idsearchChange"
+                  />
+                </el-form-item>
+              </el-col>
+
+              <el-col :span="2" style="text-align: right">
+                <el-button :size="'mini'" type="primary" :disabled="loading" @click="submitForm">保 存</el-button>
+              </el-col>
+
+              <el-col :span="12">
+                <el-form-item label="订单备注" prop="remark" label-width="85px" style="margin-bottom:2px">
+                  <el-input v-model="ruleForm.remark" maxlength="500" placeholder="订单备注" />
+                </el-form-item>
+              </el-col>
+
+              <el-col :span="12">
+                <el-form-item label="业务经理" prop="managerid" label-width="115px">
+                  <project-manager
+                    :size="'mini'"
+                    v-model.value="ruleForm.managerid"
+                    @searchChange="managerChange"
+                    style="width: 100%"
+                  />
+                </el-form-item>
+              </el-col>
+
+              <el-col :span="24">
+                <el-row>
+                  <el-col :span="6">
+                    <el-form-item label="凭证类型" prop="proof_type" label-width="85px" v-model="proof_type">
+                      <el-select
+                        v-model="ruleForm.proof_type"
+                        placeholder="凭证类型"
+                        style="width: 100%"
+                        @change="set_proof_url()"
+                      >
+                        <el-option
+                          v-for="item in proof_options"
+                          :key="item.value"
+                          :label="item.label"
+                          :value="item.value"
+                        />
+                      </el-select>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="18">
+                    <el-form-item label="比价凭证" prop="proof_url" label-width="85px">
+                      <ul class="shangchuan-ul">
+                        <li v-if="ruleForm.proof_type + '' === '1'" class="shiping">
+                          <div v-if="video_url" class="clearfix">
+                            <el-popover placement="top" width="300" trigger="hover">
+                              <video width="275" controls class="fl">
+                                <source :src="video_url" type="video/mp4" />
+                                <source :src="video_url" type="video/avi" />您的浏览器不支持Video标签。
+                              </video>
+                              <i
+                                slot="reference"
+                                class="el-icon-video-camera-solid hover"
+                                style="font-size: 18px"
+                              />
+                            </el-popover>
+                            <el-link
+                              :underline="false"
+                              type="warning"
+                              style="margin: 0 0 0 16px"
+                              @click="deleteUrl('1')"
+                            >删除</el-link>
+                          </div>
+
+                          <div v-else class="activity-upload">
+                            <div class="btnupload" style="position: relative">
+                              <i class="el-icon-plus avatar-uploader-icon" />
+                              <video-upload
+                                class="Upload"
+                                :disabled="type === 'view' || type === 'editCoin'"
+                                :accept="'.mp4,.avi'"
+                                :multiple="false"
+                                :uploadcondition="beforeVideoUpload"
+                                @UploadErrorEvent="UploadVideoEventproof_url"
+                                @UploadSuccessEvent="UploadSuccessVideoproof_url"
+                              />
+                            </div>
+
+                            <div class="txt-tips fl">
+                              <p>建议大小:小于10MB</p>
+                              <p>文件格式:.mp4,.avi</p>
+                            </div>
+                          </div>
+                        </li>
+                        <li v-if="ruleForm.proof_type + '' === '2'" class="tupian">
+                          <div v-if="img_url" class="clearfix">
+                            <img style="width: 50px; height: 50px" :src="img_url" class="avatar fl" />
+                            <el-link
+                              :underline="false"
+                              type="warning"
+                              style="margin: 0 0 0 16px"
+                              @click="deleteUrl('2')"
+                            >删除</el-link>
+                          </div>
+
+                          <div v-else class="activity-upload">
+                            <div class="btnupload" style="position: relative">
+                              <i class="el-icon-plus avatar-uploader-icon" />
+                              <file-upload
+                                class="Upload"
+                                :disabled="type === 'view' || type === 'editCoin'"
+                                :accept="'.jpg,.png,.jpeg'"
+                                :multiple="false"
+                                :uploadcondition="beforeAvatarUpload"
+                                @UploadErrorEvent="UploadErrorEventproof_url"
+                                @UploadSuccessEvent="UploadSuccessEventproof_url"
+                              />
+                            </div>
+                            <div class="txt-tips fl">
+                              <p>建议大小:小于1MB</p>
+                              <p>文件格式:.jpg,.png,.jpeg</p>
+                            </div>
+                          </div>
+                        </li>
+                        <li v-if="ruleForm.proof_type + '' === '3'" class="qita">
+                          <div v-if="other_url" class="clearfix">
+                            <a :href="other_url" download="比价凭证">点击下载</a>
+
+                            <el-link
+                              :underline="false"
+                              type="warning"
+                              style="margin: 0 0 0 16px"
+                              @click="deleteUrl('3')"
+                            >删除</el-link>
+                          </div>
+
+                          <div v-else class="activity-upload">
+                            <div class="btnupload" style="position: relative">
+                              <i class="el-icon-plus avatar-uploader-icon" />
+                              <file-upload-pdf
+                                class="Upload"
+                                :accept="'.xlsx,.xls,.pdf,.zip,.rar,.7z'"
+                                :multiple="false"
+                                :uploadcondition="beforeOtherUpload"
+                                @UploadErrorEvent="UploadErrorOtherproof_url"
+                                @UploadSuccessEvent="UploadSuccessOtherproof_url"
+                              />
+                            </div>
+                            <div class="txt-tips fl">
+                              <p>建议大小:小于5MB</p>
+                              <p>文件格式:.xlsx,.xls,.pdf,.zip,.rar,.7z</p>
+                            </div>
+                          </div>
+                        </li>
+                      </ul>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-col>
+              <el-col :span="12"></el-col>
+            </el-row>
+          </el-form>
+        </el-col>
+        <el-col :span="24">
+          <in-addr-model
+            :show-model="addrmodel"
+            @cancel="addrmodel = false"
+            @refresh="addrRefresh"
+          />
+        </el-col>
+      </el-row>
+    </el-card>
+  </el-dialog>
+</template>
+<script>
+import resToken from "@/mixins/resToken";
+import asyncRequest from "@/apis/service/sellOut/zixunOrder";
+import SearchStockGoodModal from "@/components/search-stock-good-modal";
+import {
+  isnumber,
+  isMobile,
+  isChinese,
+  isEmoticon,
+  isSpecialSymbol,
+  hasSpace,
+  isAddr
+} from "@/utils/validate";
+import inAddrModel from "@/components/in-addr-model";
+import { ShowDataTableColumns } from "./ShowDataTableColumns";
+import { replaceTextWrapAndSpace } from "@/utils";
+export default {
+  name: "BuyGoodModal",
+  components: { SearchStockGoodModal, inAddrModel },
+  mixins: [resToken],
+  props: ["showModel", "sitem"],
+  data() {
+    const validatemobile = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("手机号不能为空!"));
+      } else {
+        if (!isMobile(value)) {
+          callback(new Error("手机号格式不正确!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    const validateWeight = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("收货总数不能为空!"));
+      } else {
+        if (!isnumber(value)) {
+          callback(new Error("收货总数仅支持整数!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    const validate_num_0 = (rule, value, callback) => {
+      const { required } = rule;
+      if (required && value === "") {
+        callback(new Error("不能为空!"));
+      } else if (
+        required &&
+        (value === "0" ||
+          value === "0." ||
+          value === "0.0" ||
+          value === "0.00" ||
+          value === "0.000")
+      ) {
+        // new Error('不能为零!')
+        callback();
+      } else {
+        callback();
+      }
+    };
+    const validatecontactor = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("联系人不能为空!"));
+      } else {
+        if (value.length < 2 || value.length > 10) {
+          callback(new Error("联系人规则为2~10位汉字!"));
+        } else {
+          if (!isChinese(value)) {
+            callback(new Error("联系人规则为2~10位汉字!"));
+          } else if (isEmoticon(value)) {
+            callback(new Error("联系人规则为2~10位汉字!"));
+          } else {
+            callback();
+          }
+        }
+      }
+    };
+    const validateAddr = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("详细地址不能为空!"));
+      } else {
+        if (hasSpace(value)) {
+          callback(new Error("不能出现/回车/换行符!"));
+        } else if (isSpecialSymbol(value)) {
+          callback(new Error("不能使用英文特殊字符!"));
+        } else if (isAddr(value)) {
+          callback();
+        } else {
+          callback(new Error("详细地址填写不规范!"));
+        }
+      }
+    };
+    return {
+      loading: false,
+      total_price: "0",
+      addrmodel: false,
+      showModelThis: this.showModel,
+      showGoodsModel: false,
+      ShowDataTableColumns: ShowDataTableColumns,
+      video_url: "",
+      img_url: "",
+      other_url: "",
+      goodTypes: [
+        { value: "1", label: "常规商品" },
+        { value: "2", label: "赠品" },
+        { value: "3", label: "样品" }
+      ],
+      proof_options: [
+        {
+          value: "1",
+          label: "视频"
+        },
+        {
+          value: "2",
+          label: "图片"
+        },
+        {
+          value: "3",
+          label: "其他"
+        }
+      ],
+      pickerOptions: {
+        disabledDate: time => {
+          return (
+            time.getTime() < new Date(this.sitem.in_arrival_time).getTime()
+          );
+        }
+      },
+
+      options: [
+        {
+          value: "1",
+          label: "有地址下单"
+        },
+        {
+          value: "2",
+          label: "无地址下单"
+        }
+      ],
+      stock_code: "",
+      cat_id: "",
+      ruleForm: {
+        managerid: [],
+        manager: "",
+        bidNo: "", // 竞价单反馈编号
+        good_num: "", // 商品数量
+        sale_price: "",
+        sendtype: "1", // 发货方式
+        arrtime: "", // 到货时间
+        remark: "", // 订单备注
+        platform_order: "", // 平台订单号
+        workNo: "", // 其他单号
+        companyNo: "",
+      },
+      manager_name: "",
+      rulesThis: this.rules,
+      rules: {
+        goodtype: [
+          {
+            required: true,
+            trigger: "change",
+            message: "请选择商品类型"
+          }
+        ],
+        good_num: [
+          {
+            required: true,
+            validator: validate_num_0,
+            trigger: "blur"
+          }
+        ],
+        sale_price: [
+          {
+            required: true,
+            validator: validate_num_0,
+            trigger: "blur"
+          }
+        ],
+        managerid: [
+          {
+            required: true,
+            message: "请选择业务经理",
+            trigger: "change"
+          }
+        ],
+        companyNo: [
+          {
+            required: true,
+            message: "请选择业务公司",
+            trigger: "change"
+          }
+        ],
+        sendtype: [
+          {
+            required: true,
+            message: "请选择发货方式",
+            trigger: "change"
+          }
+        ],
+        remark: [
+          {
+            required: true,
+            message: "输入订单备注",
+            trigger: "blur"
+          }
+        ],
+        arrtime: [
+          {
+            required: true,
+            message: "要求到货时间",
+            trigger: "change"
+          }
+        ],
+        proof_type: [
+          {
+            required: true,
+            message: "请选择凭证类型",
+            trigger: "change"
+          }
+        ],
+        proof_url: [
+          {
+            required: true,
+            message: "请上传比价凭证",
+            trigger: "blur,change"
+          }
+        ]
+      },
+      addrForm: {
+        order_addr: [] // 收货地址
+      },
+      addrRules: {
+        receipt_quantity: [
+          {
+            required: true,
+            validator: validateWeight,
+            trigger: "blur"
+          }
+        ],
+
+        contactor: [
+          {
+            required: true,
+            trigger: "blur",
+            validator: validatecontactor
+          }
+        ],
+        mobile: [
+          {
+            required: true,
+            validator: validatemobile,
+            trigger: "blur"
+          }
+        ],
+
+        addr_code: [
+          {
+            type: "array",
+            required: false,
+            trigger: "change"
+          }
+        ],
+        addr: [
+          {
+            required: true,
+            validator: validateAddr,
+            trigger: "blur"
+          }
+        ]
+      },
+
+      id: ""
+    };
+  },
+  watch: {
+    showModel: function(val) {
+      this.showModelThis = val;
+      if (val) {
+        // this.rulesThis = this.rules;
+        this.initForm();
+      }
+    },
+    showModelThis(val) {
+      if (!val) {
+        this.$emit("cancel");
+      }
+    },
+    "ruleForm.sale_price"(val) {
+      this.ruleForm.goodtype = Number(val) === 0 ? "2" : "1";
+    }
+  },
+  methods: {
+    managerChange(e) {
+      const { id, label } = e;
+      this.ruleForm.manager = label;
+      this.ruleForm.managerid = id ? [id] : []
+
+      console.log(this.ruleForm)
+      this.$refs.ruleForm.validateField("managerid");
+      // this.manager_name = label ?? "";
+    },
+    // 修改日期校验
+    mdDate() {
+      // 用户传递的到货时间不能大于要求到货的时间  对要求到货时间进行字符截取10位抹除时分秒
+      if (
+        Date.parse(this.ruleForm.arrtime) <
+        Date.parse(this.sitem.in_arrival_time.substring(0, 10))
+      ) {
+        this.$message.warning("到货时间不能小于要求到货日期");
+        this.ruleForm.arrtime = "";
+      }
+    },
+
+    // 销售方公司选择
+    company_idsearchChange(e) {
+      const { code } = e;
+      this.ruleForm.companyNo = code || "";
+      this.$refs.ruleForm && this.$refs.ruleForm.validateField("companyNo");
+    },
+
+    closeModel() {
+      console.log("closeModel!!");
+      this.showModelThis = false;
+    },
+    num_change(e, key) {
+      this.ruleForm[key] = e + "";
+      this.$refs.ruleForm && this.$refs.ruleForm.validateField(key);
+      this.set_total_price();
+    },
+    set_total_price() {
+      const { good_num, sale_price } = this.ruleForm;
+      const num = good_num * 1;
+      const price = sale_price * 1;
+      this.total_price = num * price + "";
+    },
+    async initForm() {
+      this.loading = true;
+      this.rulesThis = this.rules;
+
+      console.log(this.rulesThis)
+      const { can } = this.sitem;
+      this.sitem.can_name = "";
+      this.sitem.is_noble = false;
+      if (can && can.length > 0) {
+        can.forEach((a, ai) => {
+          this.sitem.is_noble = a.id + "" === "6";
+          this.sitem.can_name += `${ai !== 0 ? "_" : ""}${a.name}`;
+        });
+      }
+      await this.resetForm();
+      this.getNewTime();
+      this.set_total_price();
+      this.loading = false;
+    },
+    addrRefresh(e) {
+      const list = JSON.parse(JSON.stringify(e.list));
+      list.forEach(item => {
+        item.label = [item.label];
+        item.code = [item.areaCode];
+      });
+      this.addrForm.order_addr.push(...list);
+    },
+
+    getNewTime() {
+      this.newTime = new Date().valueOf();
+    },
+    async resetForm() {
+      // 重置
+      await this.$nextTick(() => {
+        if (this.$refs.ruleForm) {
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+          const {
+            bidNo,
+            in_num,
+            in_arrival_time,
+            sale_price,
+            in_companyNo
+          } = this.sitem;
+   
+          this.ruleForm = {
+            bidNo: bidNo || "", // 竞价单反馈编号
+            good_num: in_num || "0", // 商品数量
+            sale_price: sale_price || "",
+            sendtype: "1", // 发货方式
+            arrtime: in_arrival_time || "", // 到货时间
+            remark: "",
+            proof_type: "2", // 通过or驳回
+            proof_url: "", // 驳回至
+            companyNo: in_companyNo || "",
+            goodtype: Number(sale_price) === 0 ? "2" : "1",
+            managerid: [],
+            manager: ""
+          };
+        }
+
+        if (this.$refs.addrForm) {
+          this.$refs.addrForm.resetFields();
+          this.$refs.addrForm.clearValidate();
+          this.addrForm = {
+            order_addr: []
+          };
+        }
+      });
+    },
+    openHouseModal(index) {
+      const findex = this.addrForm.order_addr.findIndex(v => v.edit === true);
+      if (findex !== -1) {
+        this.$message.warning("当前已有地址在编辑,请保存后再试!");
+        return;
+      } else {
+        if (index === -1) {
+          this.addrForm.order_addr.push({
+            edit: true,
+            receipt_quantity: "",
+            contactor: "",
+            mobile: "",
+            addr_code: [],
+            addr: "",
+            code: [],
+            label: []
+          });
+        } else {
+          this.addrForm.order_addr[index].edit = true;
+        }
+      }
+    },
+    async areaChange(e, index) {
+      const { code, area_code, label, splitLabel } = e;
+      // this.addrForm.order_addr[index] = e
+      this.addrForm.order_addr[index].addr_code_name = splitLabel
+        ? splitLabel.split(",").join("/")
+        : "";
+      this.addrForm.order_addr[index].addr_code = code ? code.split(",") : [];
+      this.addrForm.order_addr[index].code = area_code ? [area_code] : [];
+      this.addrForm.order_addr[index].label = label ? [label] : [];
+    },
+    // 省市区选择
+    // async select_area_change(e, index) {
+    //   this.addrForm.order_addr[index].addr_code = e
+    //   const { addr_code } = this.addrForm.order_addr[index]
+    //   if (addr_code && addr_code.length === 3) {
+    //     const arrCode = addr_code[addr_code.length - 1]
+    //     // console.log(model);
+    //     const { code, data, message } = await asyncRequest.addrall({
+    //       code: arrCode
+    //     })
+    //     if (code === 0) {
+    //       const { province, city, area } = data
+    //       const province_name = province && province.name ? province.name : ''
+    //       const city_name = city && city.name ? city.name : ''
+    //       const area_name = area && area.name ? area.name : ''
+    //       this.addrForm.order_addr[index].addr_code_name =
+    //         province_name && city_name && area_name
+    //           ? `${province_name}/${city_name}/${area_name}`
+    //           : ''
+    //     } else if (code >= 100 && code <= 104) {
+    //       await this.logout()
+    //     } else {
+    //       this.$message.warning(message)
+    //     }
+    //   } else {
+    //     this.addrForm.order_addr[index].addr_code_name = ''
+    //   }
+    // },
+    // 省市区保存某一行
+    checkRow(rowIndex) {
+      this.$refs.addrForm.validate(valid => {
+        if (valid) {
+          this.addrForm.order_addr[rowIndex].edit = false;
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    // 省市区删除行操作
+    deleteRow(index, rows) {
+      rows.splice(index, 1);
+    },
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async valid => {
+        if (valid) {
+          if (this.loading) return;
+          this.loading = true;
+          const model = JSON.parse(JSON.stringify(this.ruleForm));
+       
+          model.manager = model.manager.toString();
+
+          const { remark, bidNo, sale_price, manager, managerid, good_num , proof_type, proof_url} = model;
+
+          const res = await asyncRequest.transferFilling({
+            remark, bidNo, sale_price, manager, managerid, good_num , proof_type, proof_url,
+            managerid:Array.isArray(managerid) ? managerid[0] : managerid
+          });
+
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "转单成功!",
+              message: ""
+            });
+            this.showModelThis = false;
+            // 刷新
+            this.$emit("refresh");
+            this.loading = false;
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            this.loading = false;
+            await this.logout();
+          } else {
+            this.loading = false;
+            this.$message.warning(res.message);
+          }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    // 图片上传成功
+    async UploadSuccessEventproof_url(data) {
+      const { url } = data;
+      if (url === "noToken") {
+        await this.logout();
+      } else {
+        this.img_url = url;
+        this.set_proof_url();
+        this.$message.success("图片上传成功!");
+      }
+    },
+
+    // 图片上传失败
+    UploadErrorEventproof_url(res) {
+      if (res !== "break") {
+        this.set_proof_url();
+        this.$message.error("图片上传失败!");
+      }
+    },
+
+    // 判断图片规格
+    beforeAvatarUpload(file) {
+      let isJPG = false;
+      if (
+        file.type === "image/jpg" ||
+        file.type === "image/png" ||
+        file.type === "image/jpeg"
+      ) {
+        isJPG = true;
+      }
+      const isLt2M = file.size / 1024 / 1024 < 1;
+      if (!isJPG) {
+        this.$message.error("图片格式不正确!");
+      }
+      if (!isLt2M) {
+        this.$message.error("图片大小不能超过 1MB!");
+      }
+      return isJPG && isLt2M;
+    },
+
+    // 视频上传成功
+    async UploadSuccessVideoproof_url(data) {
+      const { url } = data;
+      if (url === "noToken") {
+        await this.logout();
+      } else {
+        this.video_url = url;
+        this.set_proof_url();
+        this.$message.success("视频上传成功!");
+      }
+    },
+
+    // 视频上传失败
+    UploadErrorVideoproof_url(res) {
+      if (res !== "break") {
+        this.set_proof_url();
+        this.$message.error("视频上传失败!");
+      }
+    },
+
+    // 判断视频规格
+    beforeVideoUpload(file) {
+      let isJPG = false;
+      if (file.type === "video/mp4" || file.type === "video/avi") {
+        isJPG = true;
+      }
+      const isLt2M = file.size / 1024 / 1024 < 10;
+      if (!isJPG) {
+        this.$message.error("视频格式不正确!");
+      }
+      if (!isLt2M) {
+        this.$message.error("视频大小不能超过 10MB!");
+      }
+      return isJPG && isLt2M;
+    },
+
+    // 其他文件上传成功
+    async UploadSuccessOtherproof_url(data) {
+      const { url } = data;
+      if (url === "noToken") {
+        await this.logout();
+      } else {
+        this.other_url = url;
+        this.set_proof_url();
+        this.$message.success("文件成功!");
+      }
+    },
+
+    // 其他文件上传失败
+    UploadErrorOtherproof_url(res) {
+      if (res !== "break") {
+        this.set_proof_url();
+        this.$message.error("文件上传失败!");
+      }
+    },
+
+    // 判断其他文件规格
+    beforeOtherUpload(file) {
+      console.log(file);
+      let isJPG = false;
+      if (
+        file.type === "application/vnd.ms-excel" ||
+        file.type ===
+          "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
+        file.type === "application/pdf" ||
+        file.type === "application/x-zip-compressed"
+      ) {
+        isJPG = true;
+      }
+      const name = file.name;
+      const list = name.split(".");
+      if (list[list.length - 1] === "rar" || list[list.length - 1] === "7z") {
+        isJPG = true;
+      }
+
+      const isLt2M = file.size / 1024 / 1024 < 5;
+      if (!isJPG) {
+        this.$message.error("文件格式不正确!");
+      }
+      if (!isLt2M) {
+        this.$message.error("文件大小不能超过 5MB!");
+      }
+      return isJPG && isLt2M;
+    },
+
+    deleteUrl(type) {
+      switch (type) {
+        case "1":
+          this.video_url = "";
+          break;
+        case "2":
+          this.img_url = "";
+          break;
+        case "3":
+          this.other_url = "";
+          break;
+        default:
+          this.video_url = "";
+      }
+      this.set_proof_url();
+    },
+    set_proof_url() {
+      const { proof_type } = this.ruleForm;
+      switch (proof_type) {
+        case "1":
+          this.ruleForm.proof_url = this.video_url;
+          break;
+        case "2":
+          this.ruleForm.proof_url = this.img_url;
+          break;
+        case "3":
+          this.ruleForm.proof_url = this.other_url;
+          break;
+        default:
+          this.ruleForm.proof_url = this.video_url;
+      }
+      this.$refs.ruleForm.validateField("proof_url");
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+// .capitalClaim {
+.excelUploadBox {
+  position: relative;
+  width: 100%;
+  height: 120px;
+  line-height: 120px;
+  box-sizing: border-box;
+  &:hover {
+    cursor: pointer;
+  }
+  .el-icon-receiving {
+    width: 100%;
+    text-align: center;
+    height: 50px;
+    display: block;
+    font-size: 32px;
+    line-height: 90px;
+    color: #d3d4d6;
+  }
+  .boxM {
+    width: 100%;
+    display: block;
+    text-align: center;
+    line-height: 65px;
+    height: 60px;
+    color: #909399;
+  }
+}
+.excelUpload {
+  top: 0;
+  left: 0;
+  position: absolute;
+  z-index: 2;
+  width: 100%;
+  height: 120px;
+  line-height: 120px;
+  box-sizing: border-box;
+}
+.excelUploadRes {
+  width: 100%;
+  height: 120px;
+  line-height: 120px;
+  box-sizing: border-box;
+  i {
+    width: 55px;
+    height: 120px;
+    line-height: 120px;
+    text-align: center;
+    font-size: 20px;
+    &.fl {
+      padding-left: 16px;
+    }
+    &.fr {
+      padding-right: 16px;
+      &:hover {
+        cursor: pointer;
+      }
+    }
+  }
+  span {
+    width: 386px;
+    line-height: 16px;
+    margin: 52px 0 0 0;
+    font-size: 16px;
+  }
+}
+// }
+</style>

+ 1 - 13
src/views/sellOut/zixunOrder/detail.vue

@@ -79,18 +79,6 @@
             @resGoodOk="initForm()"
           />
         </el-tab-pane>
-        <!-- <el-tab-pane label="审批记录" name="3" v-if="queryType == 'view'">
-          <process-time-line
-            v-if="newTime !== ''"
-            :newTime="newTime"
-            :type="'ZXD'"
-            :orderCode="queryId"
-          />
-        </el-tab-pane> -->
-
-        <!-- <el-tab-pane label="流程图" name="3" v-if="queryType == 'view'">
-          <flow-chart process_id="24" type="ZXD" :orderCode="queryId" />
-       </el-tab-pane> -->
       </el-tabs>
     </div>
     <div v-else>
@@ -113,7 +101,7 @@ export default {
   components: {
     addForm,
     editForm,
-    feedbackList,
+    feedbackList
   },
 
   computed: {

+ 3 - 2
src/views/sellOut/zixunOrder/index.vue

@@ -172,11 +172,12 @@
                 ? "非项目竞价单"
                 : String(scope.row.is_project) === "1"
                 ? "项目竞价单"
+                : String(scope.row.is_project) === "2"
+                ? "业务报备"
                 : "--"
             }}</el-tag
           >
         </template>
-
         <template #operation="{ scope }">
           <el-tooltip
             v-if="powers.some((i) => i == '007')"
@@ -195,7 +196,7 @@
           placement="top"
           v-if="
             powers.some((i) => i == '010') &&
-            String(scope.row.is_project) === '0' &&
+            (String(scope.row.is_project) === '0' || String(scope.row.is_project) === '2') &&
             String(scope.row.status) !== '0' &&
             !isSupertube
           "

+ 3 - 3
src/views/serviceParam/supplier/components/baseForm.vue

@@ -130,12 +130,12 @@
         </el-form-item>
       </el-col>
       <el-col :span="6">
-        <el-form-item label="付方式" prop="pay_type">
+        <el-form-item label="付方式" prop="pay_type">
           <el-select
             v-model="ruleForm.pay_type"
             style="width: 100%"
             :disabled="type !== 'add' && type !== 'edit'"
-            placeholder="付方式"
+            placeholder="付方式"
           >
             <el-option
               v-for="item in pay_typeoptions"
@@ -566,7 +566,7 @@ export default {
           { required: true, message: '请选择供应商类型', trigger: 'change' }
         ],
         level: [{ required: true, message: '请选择供应商级别', trigger: 'change' }],
-        pay_type: [{ required: true, message: '请选择付方式', trigger: 'change' }],
+        pay_type: [{ required: true, message: '请选择付方式', trigger: 'change' }],
         prove_img: [
           {
             required: false,

+ 1 - 1
src/views/standingBook/components/detail16/columns.js

@@ -71,7 +71,7 @@ const columns = [
   },
   {
     prop: "pay_type",
-    label: "付方式",
+    label: "付方式",
     _slot_: "pay_type",
     span: 6,
   },

+ 1 - 1
src/views/standingBook/components/detail8/columns.js

@@ -228,7 +228,7 @@ const options8 = [
 ]
 // 配置要求
 const options9 = ['证书', '包装盒', '绒布袋', '标签', '其他']
-// 付方式
+// 付方式
 const options10 = [
   { id: '0', name: '现结' },
   { id: '1', name: '月清' },

+ 7 - 5
src/views/supplierPurchaseIn/supplierPurchaseOrder/components/ShowDataTableColumns.js

@@ -32,15 +32,11 @@ export default [
     label: "购买方公司",
     _slot_: "company",
   },
-
   {
     prop: "wsm",
     label: "仓库信息",
     _slot_: "wsm",
   },
- 
- 
- 
   {
     prop: "total_fee",
     label: "采购总成本",
@@ -75,8 +71,14 @@ export default [
     prop: "gold_price",
     label: "当前实时金价",
     _slot_: "gold_price",
-    span: 12
+    span: 6
   },
+    { 
+      prop:"pay_way",
+      label:"供应商支付方式",
+      span:6,
+      _slot_:"pay_type"
+    },
   {
     prop: "customer",
     label: "订单客户名称",

+ 8 - 2
src/views/supplierPurchaseIn/supplierPurchaseOrder/detail.vue

@@ -18,9 +18,9 @@
           <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
             <el-collapse-item title="采购单信息" name="1">
               <show-data-table
+                :sitem="sitem"
                 :newTime="newTime"
                 v-if="newTime !== ''"
-                :sitem="sitem"
                 :columns="ShowDataTableColumns"
               >
                 <template slot="supplier_name">
@@ -115,6 +115,11 @@
                   </el-popover>
                 </template>
 
+
+               <template slot="pay_type">
+                  {{(payWayOptions.find(({value})=> value === sitem.pay_type) || {}).label || "--"}}
+                </template>
+
                 <template slot="wsm">
                   <span><template v-if="sitem.wsm_supplier">{{ sitem.wsm_supplier }}/</template>{{ sitem.wsm_name }}</span>
                   <el-popover placement="top" width="300" trigger="hover">
@@ -243,7 +248,7 @@ import orderInTable from "./components/order-in-table";
 import workDiffTable from "./components/work-diff-table";
 import ShowDataTableColumns from "./components/ShowDataTableColumns";
 import { statusOptions } from "./columns";
-import { cg_order_type_options } from "@/assets/js/statusList";
+import { cg_order_type_options, payWayOptions } from "@/assets/js/statusList";
 import tolerance from "./components/tolerance";
 import urlConfig from "@/apis/url-config";
 import editPrice from "./components/editPrice";
@@ -282,6 +287,7 @@ export default {
       hasdiff: false,
       isCgd:true,
       activeTabs: "1",
+      payWayOptions,
       ShowDataTableColumns: ShowDataTableColumns,
       isMetal: false,
       finishStatus: "finish",

+ 1 - 1
src/views/supplierPurchaseIn/supplierRecovery/columns.js

@@ -205,7 +205,7 @@ const costColumns = [
   },
   {
     prop: "pay_way",
-    label: "付方式",
+    label: "付方式",
     _slot_: "pay_way",
     span: 5,
   },

+ 2 - 2
src/views/supplierPurchaseIn/supplierWorkbench/columns.js

@@ -42,7 +42,7 @@ const options8 = [
 ];
 //配置要求
 const options9 = ["证书", "包装盒", "绒布袋", "标签", "其他"];
-//付方式
+//付方式
 const options10 = [
   { id: "0", name: "现结" },
   { id: "1", name: "月清" },
@@ -393,7 +393,7 @@ const rules = {
   pay_way: [
     {
       required: true,
-      message: "请选择付方式",
+      message: "请选择付方式",
       trigger: "change",
     },
   ],

+ 2 - 2
src/views/supplierPurchaseIn/supplierWorkbench/components/baseForm.vue

@@ -274,14 +274,14 @@
         </el-form-item>
       </el-col>
       <el-col :span="6">
-        <el-form-item label="付方式" prop="pay_way" class="clear">
+        <el-form-item label="付方式" prop="pay_way" class="clear">
           <el-select
             v-model="ruleForm.pay_way"
             filterable
             :disabled="type === 'view'"
             clearable
             style="width: 100%"
-            placeholder="付方式"
+            placeholder="付方式"
           >
             <el-option
               v-for="group in options10"

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

@@ -288,7 +288,7 @@ export const coveColumns = [
   },
   {
     prop: 'pay_way',
-    label: '付方式',
+    label: '付方式',
     _slot_: 'pay_way',
     span: 6
   },
@@ -557,7 +557,7 @@ const options8 = [
 // 配置要求
 const options9 = ['证书', '包装盒', '绒布袋', '标签', '其他']
 
-// 付方式
+// 付方式
 const options10 = [
   { id: '0', name: '现结' },
   { id: '1', name: '月清' },
@@ -1057,7 +1057,7 @@ const rules = {
   pay_way: [
     {
       required: true,
-      message: '请选择付方式',
+      message: '请选择付方式',
       trigger: 'change'
     }
   ],

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

@@ -196,7 +196,7 @@ export const createRules = {
   },
   pay_way: {
     required: true,
-    message: '请选择付方式',
+    message: '请选择付方式',
     trigger: 'blur'
   },
   config: {

+ 2 - 2
src/views/supplierSellOut/supplierFiling/cpns/baseForm.vue

@@ -287,14 +287,14 @@
               </el-form-item>
             </el-col>
             <el-col :span="12">
-              <el-form-item label="付方式" prop="pay_way" class="clear">
+              <el-form-item label="付方式" prop="pay_way" class="clear">
                 <el-select
                   v-model="ruleForm.pay_way"
                   filterable
                   :disabled="type === 'view'"
                   clearable
                   style="width: 100%"
-                  placeholder="付方式"
+                  placeholder="付方式"
                 >
                   <el-option
                     v-for="group in options10"

+ 2 - 2
src/views/supplierSellOut/supplierFiling/source/columns.js

@@ -41,7 +41,7 @@ const options8 = [
 ];
 //配置要求
 const options9 = ["证书", "包装盒", "绒布袋", "标签", "其他"];
-//付方式
+//付方式
 const options10 = [
   { id: "0", name: "现结" },
   { id: "1", name: "月清" },
@@ -214,7 +214,7 @@ const coveColumns = [
   },
   {
     prop: "pay_way",
-    label: "付方式",
+    label: "付方式",
     _slot_: "pay_way",
     span: 6,
   },

+ 5 - 5
src/views/system/menuOperator/addEdit.vue

@@ -6,19 +6,19 @@
     align="left"
     top="10vh"
     width="750px"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    element-loading-text="拼命加载中"
     element-loading-spinner="el-icon-loading"
     element-loading-background="rgba(0, 0, 0, 0.8)"
-    append-to-body
+    element-loading-text="拼命加载中"
     @close="showModelThis = false"
+    :close-on-click-modal="false"
+    :visible.sync="showModelThis"
+    append-to-body
   >
     <el-card style="margin-top: -20px">
       <el-form
+        is_show-icon
         ref="ruleForm"
         :model="ruleForm"
-        is_show-icon
         :rules="rulesThis"
         label-width="100px"
         class="demo-ruleForm"

+ 73 - 0
src/views/system/menuOperator/button-modal.vue

@@ -0,0 +1,73 @@
+<template>
+  <el-dialog title="添加按钮" center :visible.sync="visible" @close="handleClose" :close-on-click-modal="false">
+    <el-form :model="formData" :rules="rules" ref="formRef" size="mini">
+      <el-form-item label="按钮编号" label-width="100px" prop="action_code">
+        <el-input v-model="formData.action_code" placeholder="按钮名称"></el-input>
+      </el-form-item>
+
+      <el-form-item label="按钮名称" label-width="100px" prop="action_name">
+        <el-input v-model="formData.action_name" placeholder="按钮名称"></el-input>
+      </el-form-item>
+
+      <el-form-item style="display:flex;justify-content: flex-end;">
+        <el-button type="primary" @click="handleSubmit" size="mini" :laoding="loading">确定</el-button>
+      </el-form-item>
+    </el-form>
+  </el-dialog>
+</template>
+
+<script>
+import asyncRequest from '@/apis/service/system/menu'
+export default {
+  props: ['visible'],
+  data() {
+    return {
+      loading: false,
+      formData: {
+        action_name: '',
+        action_code: ''
+      },
+      rules: {
+        action_name: [{ required: true, message: '请输入按钮名称', trigger: 'blur' }],
+        action_code: [{ required: true, message: '请输入按钮编号', trigger: 'blur' }]
+      }
+    }
+  },
+  computed: {
+    _visible: {
+      get() {
+        return this.visible
+      },
+      set(newVal) {
+        this.$emit('update:visible', newVal)
+      }
+    }
+  },
+  methods: {
+    handleClose() {
+      this._visible = false
+      this.formData.action_name = ''
+      this.formData.action_code = ''
+    },
+    async handleSubmit() {
+      this.laoding = true
+      try {
+        await this.$refs.formRef.validate()
+        const response = asyncRequest.actionlistcreate(this.formData)
+        if (Number(response.code) === 0) {
+          // this.$message.success('新增成功')
+          this.handleClose()
+        } else {
+          // this.$message.warning(response.messsage)
+        }
+
+        this._visible = false
+      } catch (err) {
+        console.log(err)
+      } finally {
+        this.laoding = false
+      }
+    }
+  }
+}
+</script>

+ 17 - 0
src/views/system/menuOperator/index.vue

@@ -2,6 +2,17 @@
   <div class="box pagePadding MenuOperator">
     <div class="MenuOperator-main" v-if="powers.some((i) => i == '001')">
       <el-row class="MenuOperator-search clear" style="padding: 10px 0">
+        <!-- <el-col :span="24" style="width: 90px; float: right">
+          <el-button
+            type="success"
+            :size="searchSize"
+            style="float: right"
+            @click="btnVisible = true"
+          >
+            添加按钮
+          </el-button>
+        </el-col> -->
+
         <el-col :span="24" style="width: 66px; float: right">
           <el-button
             v-if="powers.some((i) => i == '003')"
@@ -13,6 +24,7 @@
             添加
           </el-button>
         </el-col>
+
         <el-col :span="3" style="width: 66px; float: right">
           <el-button
             type="primary"
@@ -198,6 +210,8 @@
     <div v-else>
       <no-auth></no-auth>
     </div>
+
+    <ButtonModal :visible.sync="btnVisible" />
   </div>
 </template>
 
@@ -205,6 +219,7 @@
 import mixinPage from "@/mixins/elPaginationHandle";
 import asyncRequest from "@/apis/service/system/menu";
 import addEdit from "@/views/system/menuOperator/addEdit";
+import ButtonModal from "./button-modal.vue"
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
 
@@ -212,6 +227,7 @@ export default {
   name: "MenuOperator",
   components: {
     addEdit,
+    ButtonModal
   },
   mixins: [mixinPage, resToken],
   computed: {
@@ -225,6 +241,7 @@ export default {
   },
   data() {
     return {
+      btnVisible:false,
       // 状态
       statusOptions: [
         { id: 0, label: "禁用" },

+ 472 - 0
src/views/youzan/othLiveGoods/columns.js

@@ -0,0 +1,472 @@
+
+// 是否定制
+const options1 = [
+  { id: '0', name: '否' },
+  { id: '1', name: '是' }
+]
+// 专属类型
+const options2 = [
+  { id: '0', name: '非泰康' },
+  { id: '1', name: '泰康' }
+]
+// 销售权限
+const options3 = [
+  { id: '0', name: '无销售权限' },
+  { id: '1', name: '有销售权限' }
+]
+
+// 是否库存品
+const options4 = [
+  { id: '0', name: '非库存品' },
+  { id: '1', name: '库存品' }
+]
+// 是否启用实时金价
+const options5 = [
+  { id: '0', name: '否' },
+  { id: '1', name: '是' }
+]
+// 供货区域
+const options6 = [
+  { id: '1', name: '全国' },
+  { id: '2', name: '全国除偏远' }
+]
+// 是否启用阶梯
+const options7 = [
+  { id: '0', name: '否' },
+  { id: '1', name: '是' }
+]
+const options8 = [
+  { id: '0', name: '待产品审核' },
+  { id: '1', name: '待执行上线' },
+  { id: '2', name: '审核驳回' },
+  { id: '6', name: '上线成功' },
+  { id: '7', name: '上线失败' },
+  { id: '8', name: '已下线' }
+]
+const listCol = [
+  {
+    prop: 'skuCode',
+    label: '上线商品编号',
+    fixed: 'left',
+    width: '160px'
+  },
+  {
+    prop: 'spuCode',
+    label: '成本商品编号',
+    width: '160px'
+  },
+  {
+    prop: 'good_thumb_img',
+    label: '图片',
+    _slot_: 'good_thumb_img',
+    width: '45px'
+  },
+  {
+    prop: 'good_name',
+    label: '名称',
+    'min-width': '160px'
+  },
+  // {
+  //   prop: "platform_code_en",
+  //   label: "平台编号",
+  //   width: "170px",
+  // },
+  {
+    prop: 'platform_name',
+    label: '平台名称',
+    width: '100px'
+  },
+
+  {
+    prop: 'status',
+    label: '状态',
+    _slot_: 'status',
+    width: '118px'
+  },
+  {
+    prop: 'cat_name',
+    label: '分类',
+    width: '118px'
+  },
+  {
+    prop: 'good_type',
+    label: '是否定制',
+    _slot_: 'good_type',
+    width: '70px'
+  },
+  {
+    prop: 'brand_name',
+    label: '品牌'
+  },
+  {
+    prop: 'is_act_url',
+    label: '活动链接'
+  },
+  {
+    prop: 'companyNo',
+    label: '业务公司编号',
+    width: '160px'
+  },
+  {
+    prop: 'company',
+    label: '业务公司名称',
+    width: '150px'
+  },
+  {
+    prop: 'plat_code',
+    label: '平台商品编号',
+    width: '150px'
+  },
+  {
+    prop: 'purchase',
+    label: '成本创建人',
+    width: '95'
+  },
+  {
+    prop: 'company_name',
+    label: '创建人部门',
+    minWidth: '150px'
+  },
+  {
+    prop: 'creater',
+    label: '上线创建人',
+    width: '95px'
+  },
+  {
+    prop: 'addtime',
+    label: '创建时间',
+    width: '140px'
+  },
+  {
+    prop: '',
+    label: '操作',
+    fixed: 'right',
+    _noset_: true,
+    width: '110px',
+    _slot_: 'operation'
+  }
+]
+const rules = {
+  platform: [
+    {
+      required: true,
+      message: '请选择所属平台',
+      trigger: 'change'
+    }
+  ],
+  online_reason: [
+    {
+      required: true,
+      message: '上线原因不能为空',
+      trigger: 'blur'
+    }
+  ],
+  online_remark: [
+    {
+      required: true,
+      message: '上线备注不能为空',
+      trigger: 'blur'
+    }
+  ]
+
+}
+const public_listCol = [
+  {
+    prop: 'good_name',
+    label: '商品名称',
+    _slot_: 'good_name',
+    span: 24
+  },
+  {
+    prop: 'company',
+    label: '业务企业名称',
+    _slot_: 'company'
+  },
+  {
+    prop: 'good_info_img',
+    _slot_: 'good_info_img',
+    label: '详情图'
+  },
+  {
+    prop: 'cat',
+    label: '分类',
+    span: 8
+  },
+
+  {
+    prop: 'creater',
+    label: '申请人',
+    span: 4
+  },
+  {
+    prop: 'platform_name',
+    label: '上线平台',
+    span: 6
+  },
+  {
+    prop: 'online_time',
+    label: '上线时间',
+    span: 6
+  },
+  {
+    prop: 'online_reason',
+    label: '上线原因'
+  },
+
+  {
+    prop: 'online_remark',
+    label: '上线备注',
+    span: 12
+  },
+  {
+    prop: 'brand_name',
+    label: '品牌',
+    span: 6
+  },
+
+  {
+    prop: 'exclusive',
+    label: '专属类型',
+    _slot_: 'exclusive',
+    span: 6
+  },
+  {
+    prop: 'weight',
+    label: '商品总克重',
+    append: 'g',
+    span: 6
+  },
+
+  {
+    prop: 'packing_list',
+    label: '包装清单',
+    span: 6
+  },
+  {
+    prop: 'packing_way',
+    label: '包装方式',
+    span: 6
+  },
+  {
+    prop: 'packing_spec',
+    label: '装箱规格',
+    span: 6
+  },
+  {
+    prop: 'packing_weight',
+    label: '装箱重量',
+    append: 'g',
+    span: 6
+  },
+  {
+    prop: 'packing_size',
+    label: '装箱尺寸',
+    span: 6
+  },
+  {
+    prop: 'origin_place_cn',
+    label: '产地',
+    span: 8
+  },
+  {
+    prop: 'unit',
+    label: '单位',
+    span: 4
+  },
+  {
+    prop: 'good_bar',
+    label: '商品条形码',
+    span: 6
+  },
+  {
+    prop: 'supply_area',
+    label: '供货区域',
+    _slot_: 'supply_area',
+    span: 6
+  },
+  {
+    prop: 'delivery_place_cn',
+    label: '发货地',
+    span: 8
+  },
+  {
+    prop: 'is_stock',
+    label: '是否库存品',
+    _slot_: 'is_stock',
+    span: 4
+  },
+  {
+    prop: 'exam_status',
+    label: '状态',
+    _slot_: 'exam_status',
+    span: 6
+  },
+  {
+    prop: 'good_type',
+    label: '是否定制',
+    _slot_: 'good_type',
+    span: 6
+  },
+
+  {
+    prop: 'addtime',
+    label: '创建时间',
+    span: 8
+  },
+  {
+    prop: 'tax',
+    label: '税点',
+    append: '%',
+    span: 4
+  },
+
+  {
+    prop: 'delivery_day',
+    label: '物流时间',
+    append: '天',
+    span: 4
+  },
+  {
+    prop: 'lead_time',
+    label: '供货周期',
+    append: '天',
+    span: 4
+  },
+  {
+    prop: 'sample_day',
+    label: '调样周期',
+    append: '天',
+    span: 4
+  },
+
+  {
+    prop: 'noble',
+    label: '贵金属信息',
+    _slot_: 'noble',
+    span: 24
+  },
+  {
+    prop: 'good_remark',
+    label: '商品备注',
+    span: 24
+  },
+
+  {
+    prop: 'after_sales',
+    label: '售后说明',
+    span: 24
+  },
+  {
+    prop: 'craft_desc',
+    label: '工艺说明',
+    span: 24
+  }
+]
+const sale_listCol = [
+  {
+    prop: 'yz_cat_info',
+    label: '有赞公有分类',
+    _slot_: 'yz_cat_info',
+    span: 6
+  },
+  {
+    prop: 'is_support_barter',
+    label: '是否支持退货',
+    _slot_: 'is_support_barter',
+    span: 6
+  },
+  {
+    prop: 'reject_reason',
+    label: '驳回原因',
+    span: 12
+  },
+  {
+    prop: 'nakelist',
+    label: '销售起订量',
+    _slot_: 'nakelist',
+    span: 24
+  }
+]
+const is_support_barter_list = [
+  {
+    value: '1',
+    label: '支持'
+  },
+  {
+    value: '0',
+    label: '不支持'
+  }
+]
+const item_type_options = [
+  {
+    value: '0',
+    label: '普通商品',
+    status: '1'
+  },
+  {
+    value: '3',
+    label: 'UMP降价拍',
+    status: '0'
+  },
+  {
+    value: '5',
+    label: '外卖商品',
+    status: '0'
+  },
+  {
+    value: '10',
+    label: '分销商品',
+    status: '0'
+  },
+  {
+    value: '20',
+    label: '会员卡商品',
+    status: '0'
+  },
+  {
+    value: '21',
+    label: '礼品卡商品',
+    status: '0'
+  },
+  {
+    value: '22',
+    label: '团购券',
+    status: '0'
+  },
+  {
+    value: '25',
+    label: '批发商品',
+    status: '0'
+  },
+  {
+    value: '30',
+    label: '收银台商品',
+    status: '0'
+  },
+  {
+    value: '31',
+    label: '知识付费商品',
+    status: '0'
+  },
+  {
+    value: '35',
+    label: '酒店商品',
+    status: '0'
+  },
+  {
+    value: '40',
+    label: '美业商品',
+    status: '0'
+  },
+  {
+    value: '60',
+    label: '虚拟商品',
+    status: '0'
+  },
+  {
+    value: '61',
+    label: '电子卡券',
+    status: '0'
+  }
+]
+export { options1, options2, options3, options4, options5, options6, options7, options8, listCol, rules, public_listCol, sale_listCol, is_support_barter_list, item_type_options }

+ 76 - 0
src/views/youzan/othLiveGoods/components/activity-modal.vue

@@ -0,0 +1,76 @@
+<template>
+  <el-dialog title="设置活动链接" center :visible.sync="visible" @close="handleClose" :close-on-click-modal="false">
+    <el-form :model="formData" :rules="rules" ref="formRef" size="mini">
+      <el-form-item label="活动链接" label-width="100px" prop="activityUrl">
+        <el-input v-model="formData.activityUrl" placeholder="活动链接"></el-input>
+      </el-form-item>
+
+      <el-form-item style="display:flex;justify-content: flex-end;">
+        <el-button type="primary" @click="handleSubmit" size="mini" :loading="loading">确定</el-button>
+      </el-form-item>
+    </el-form>
+  </el-dialog>
+</template>
+
+<script>
+import asyncRequest from "@/apis/service/youzan/othgoodsOnline";
+
+export default {
+  props: ['visible', 'skuCode', 'actUrl'],
+  data() {
+    return {
+      loading: false,
+      formData: {
+        activityUrl: ''
+      },
+      rules: {
+        activityUrl: [{ required: true, message: '请输入活动链接', trigger: 'blur' }]
+      }
+    }
+  },
+  computed: {
+    _visible: {
+      get() {
+        return this.visible
+      },
+      set(newVal) {
+        this.$emit('update:visible', newVal)
+      }
+    }
+  },
+  watch: {
+    actUrl: {
+      handler() {
+        console.log(this.actUrl);
+        this.formData.activityUrl = this.actUrl
+      }
+    }
+  },
+  methods: {
+    handleClose() {
+      this._visible = false
+      this.formData.activityUrl = ''
+    },
+    async handleSubmit() {
+      this.laoding = true
+      try {
+        await this.$refs.formRef.validate()
+        this._visible = false
+        const response = await asyncRequest.addCouponUrl({
+          coupon_url: this.formData.activityUrl,
+          skuCode: this.skuCode
+        })
+        if (Number(response.code) === 0) {
+          this.$emit('refresh')
+        } else {
+          this.$message.warning(response.message)
+        }
+      } catch (err) {
+        console.log(err)
+      } finally {
+        this.laoding = false
+      }
+    }
+  }
+}
+</script>

+ 700 - 0
src/views/youzan/othLiveGoods/components/online-exam-form.vue

@@ -0,0 +1,700 @@
+<template>
+  <el-form
+    v-loading="loading"
+    ref="ruleForm"
+    :model="ruleForm"
+    status-icon
+    :rules="rulesThis"
+    :label-width="labelWidth || '100px'"
+    class="demo-ruleForm"
+    :size="size || 'medium'"
+  >
+    <el-row>
+      <el-col :span="24" style="padding: 0 0 20px 0">
+        <el-row>
+          <el-col :span="20">
+            <el-alert
+              title="特别关注:手动到对接平台修改商品信息,会被本系统强制覆盖,请谨慎操作!"
+              type="error"
+              show-icon
+              description=""
+              :size="'mini'"
+              :closable="false"
+            >
+            </el-alert
+          ></el-col>
+          <el-col :span="4">
+            <el-button
+              v-if="!isDetail"
+              :size="'mini'"
+              type="primary"
+              class="fr"
+              @click="submitForm()"
+              >保 存
+            </el-button>
+          </el-col>
+        </el-row>
+      </el-col>
+
+      <el-col :span="6"
+        ><el-form-item label="审核状态" prop="exam_status">
+          <el-radio-group
+            v-model="ruleForm.exam_status"
+            placeholder="请选择审核状态"
+            style="width: 100%"
+            :size="size || 'medium'"
+            @change="exam_statusChange"
+          >
+            <el-radio
+              v-for="item in exam_statusList"
+              :key="item.value"
+              :label="item.value"
+              >{{ item.label }}</el-radio
+            >
+          </el-radio-group>
+        </el-form-item>
+      </el-col>
+      
+      <el-col :span="18" v-if="String(ruleForm.exam_status) === '1'">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="有赞公用分类" prop="yz_cat_id" label-width="120px">
+              <good-class-youzan
+                :value="ruleForm.yz_cat_id"
+                :placeholder="'请选择分类'"
+                @handleChange="handleChange"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-col>
+
+      <el-col
+        :span="24"
+        v-show="String(ruleForm.exam_status) === '1'"
+        style="padding: 0 0 10px 0"
+      >
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="商品类型" prop="item_type">
+              <el-select
+                v-model="ruleForm.item_type"
+                placeholder="请选择商品类型"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in item_type_options"
+                  :key="item.label + item.value"
+                  :label="item.label"
+                  :value="item.value"
+                  :disabled="String(item.status) === '0'"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="10">
+            <el-form-item label="开始出售时间" prop="time" label-width="120px">
+              <ul class="item_auto_listing_time clearfix">
+                <li class="fl" style="width: 100px">
+                  <el-radio
+                    v-model="ruleForm.item_auto_listing_time"
+                    label="0"
+                    @change="item_auto_change"
+                    >立即出售</el-radio
+                  >
+                </li>
+                <li class="fl">
+                  <el-date-picker
+                    v-model="ruleForm.auto_listing_time"
+                    type="datetime"
+                    style="width: 100%"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    placeholder="选择开始出售时间"
+                    default-time="12:00:00"
+                    @change="time_change"
+                    :picker-options="pickerOptions"
+                  >
+                  </el-date-picker>
+                </li>
+              </ul>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="划线价" prop="origin">
+              <digital-input
+                :values="ruleForm.origin"
+                :placeholder="'起订量'"
+                :min="0"
+                :max="100000000000"
+                :position="'right'"
+                :precision="2"
+                :controls="false"
+                :append="''"
+                :newTime="''"
+                :size="''"
+                :disabled="false"
+                @reschange="num_change($event, 'origin', -1)"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-col>
+
+      <el-col :span="24">
+        <el-form-item label-width="140px" prop="distribution" label="支持的配送方式">
+          <el-checkbox-group v-model="ruleForm.distribution" @change="handleChange">
+            <el-checkbox label="1" key="1">快递发货</el-checkbox>
+            <el-checkbox label="2" key="2" >同城配送</el-checkbox>
+            <el-checkbox label="3" key="3">到店自提</el-checkbox>
+          </el-checkbox-group>
+        </el-form-item>
+      </el-col>
+
+      <el-col
+        :span="24"
+        v-show="String(ruleForm.exam_status) === '1'"
+        style="padding: 0 0 10px 0"
+      >
+        <!-- @current-change="handleCurrentChange" -->
+        <el-table
+          :data="nakelist"
+          :size="'mini'"
+          border
+          stripe
+          highlight-current-row
+          ref="singleTable"
+        >
+          <el-table-column label="系统阶梯" width="80px">
+            <template slot-scope="scope">
+              <i
+                v-if="currentRow && String(currentRow.id) === String(scope.row.id)"
+                class="el-icon-check"
+                style="color: #1890ff; font-size: 16px; font-weight: bolder"
+              /> </template
+          ></el-table-column>
+          <el-table-column prop="min_num" label="采购起订量" />
+          <el-table-column label="销售">
+            <el-table-column prop="start_sale_num" label="起订量">
+              <template slot-scope="scope">
+                <span>
+                  {{ scope.row.start_sale_num }}
+                </span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="sale_good_price" label="系统售价" />
+            <el-table-column prop="sale_cost_fee" label="系统工艺费" />
+            <el-table-column prop="final_price" label="最终售价">
+              <template slot-scope="scope">
+                <digital-input
+                  v-show="scope.row.edit"
+                  :values="scope.row.final_price"
+                  :placeholder="'最终售价'"
+                  :min="scope.row.sale_good_price"
+                  :max="9999999"
+                  :position="'right'"
+                  :precision="2"
+                  :controls="false"
+                  :append="''"
+                  :newTime="scope.row.newTime"
+                  :size="'mini'"
+                  :disabled="false"
+                  @reschange="num_change($event, 'final_price', scope.$index)"
+                />
+                <span v-show="!scope.row.edit">
+                  {{ scope.row.final_price }}
+                </span>
+              </template>
+            </el-table-column>
+          </el-table-column>
+        </el-table>
+      </el-col>
+      <el-col :span="18" v-show="ruleForm.exam_status + '' !== '1'">
+        <el-form-item label="审核备注" prop="reject_reason">
+          <el-input
+            type="textarea"
+            placeholder="审核备注"
+            v-model="ruleForm.reject_reason"
+            :disabled="disabled"
+            maxlength="250"
+            show-word-limit
+            :autosize="{ minRows: 3, maxRows: 3 }"
+          />
+        </el-form-item>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+import asyncRequest from "@/apis/service/youzan/othgoodsOnline";
+import { item_type_options } from "../columns";
+export default {
+  name: "exam-form",
+  props: ["size", "statusList", "disabled", "isMust", "labelWidth", "time", "sitem"],
+  /**
+   * 属性集合
+   * @param {String}        size             : 组件大小             非必填
+   * @param {Array}         statusList       : 驳回至备选项          必填
+   * @param {Boolean}       disabled         : 是否禁用              必填
+   * @param {Boolean}       isMust           : 是否需要展示驳回节点   必填
+   */
+  /**
+   * 事件集合
+   * @searchChange             : 选中值变化调用   抛出选中数据
+   */
+  data() {
+    const validatetime = (rule, value, callback) => {
+      const { item_auto_listing_time, auto_listing_time } = this.ruleForm;
+      const type = item_auto_listing_time ?? "";
+      const time = auto_listing_time ?? "";
+      // console.log(item_auto_listing_time, auto_listing_time);
+      if (type === "" && time === "") {
+        callback(new Error("请选择开始出售时间!"));
+      } else {
+        callback();
+      }
+    };
+    const validate_num_0 = (rule, value, callback) => {
+      const val = value ?? "";
+      const { required } = rule;
+      if (required && val === "") {
+        callback(new Error("不能为空!"));
+      } else if (
+        required &&
+        (val === "0" ||
+          val === "0." ||
+          val === "0.0" ||
+          val === "0.00" ||
+          val === "0.000")
+      ) {
+        callback(new Error("不能为零!"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      platform_id: "",
+      spuCode: "",
+      loading: true,
+      currentRow: null,
+      nakelist: [],
+      tags_options: [],
+      item_type_options,
+      exam_statusList: [
+        {
+          value: "1",
+          label: "通过",
+        },
+        {
+          value: "2",
+          label: "驳回",
+        },
+      ],
+      is_support_barter_list: [
+        {
+          value: "1",
+          label: "支持",
+        },
+        {
+          value: "0",
+          label: "不支持",
+        },
+      ],
+      showModelThis: this.showModel,
+      pickerOptions: {
+        disabledDate: (time) => {
+          return time.getTime() < new Date().valueOf() - 1000 * 60 * 60 * 24;
+        },
+      },
+      ruleForm: {
+        exam_status: "1", // 通过or驳回
+        yz_cat_id: [],
+        rebut: "", //驳回至
+        reject_reason: "",
+        tags: [],
+        item_type: "0",
+        item_auto_listing_time: "0",
+        auto_listing_time: "",
+        origin: "0",
+        time: "0",
+        distribution: ['1']
+      },
+      rulesThis: this.rules,
+      rules: {
+        exam_status: [
+          {
+            required: true,
+            message: "请选择审核状态",
+            trigger: "change",
+          },
+        ],
+
+        is_support_barter: [
+          {
+            required: false,
+            message: "请选择是否可退",
+            trigger: "change",
+          },
+        ],
+        tags: [
+          {
+            required: false,
+            type: "array",
+            trigger: "change",
+          },
+        ],
+        yz_cat_id: [
+          {
+            required: true,
+            type: "array",
+            message: "请选择有赞公用分类",
+            trigger: "change",
+          },
+        ],
+        reject_reason: [
+          { required: true, message: "请输入审核备注", trigger: "blur" },
+          {
+            min: 1,
+            max: 250,
+            message: "长度在 1 到 250 个字符",
+            trigger: "blur",
+          },
+        ],
+        origin: [
+          {
+            required: true,
+            validator: validate_num_0,
+            trigger: "blur",
+          },
+        ],
+        distribution:[
+          {
+            type:'array',
+            required: true,
+            trigger:'change',
+            message:'请选择支持的配送方式'
+          }
+        ],
+        time: [
+          {
+            required: true,
+            validator: validatetime,
+            trigger: "change,blur",
+          },
+        ],
+        item_type: [
+          {
+            required: true,
+            message: "请选择商品类型",
+            trigger: "change",
+          },
+        ],
+      },
+    };
+  },
+  watch: {
+    isDetail: function (val, old) {
+      if (this.isDetail !== val) {
+        this.options = [];
+        this.selectLoading = false;
+      }
+    },
+    newTime: function (val) {
+      if (val) {
+        this.initForm();
+      }
+    },
+  },
+  mounted() {
+    this.initForm();
+  },
+  methods: {
+    handleChange(values){
+      console.log(values)
+    },
+    async initForm() {
+      // this.loading = true;
+      this.rulesThis = this.rules;
+      await this.resetForm();
+      this.exam_statusChange();
+      await this.get_tags();
+      const { nakelist, spuCode, platform_id } = this.sitem;
+      this.spuCode = spuCode;
+      this.platform_id = platform_id;
+
+      const _nakelist = JSON.parse(JSON.stringify(nakelist));
+      let hasEdit = false
+      _nakelist.forEach(async (si, sii) => {
+        si.start_sale_num = si.min_num;
+        let { isok, price, sale_cost_fee } = await this.get_new(sii,si.min_num);
+        if (isok === 0) {
+          _nakelist[sii].sale_good_price = price;
+          _nakelist[sii].sale_cost_fee = sale_cost_fee;
+          _nakelist[sii].newTime = new Date().valueOf() + "";
+        } else if (isok >= 100 && isok <= 104) {
+          await this.logout();
+        } else {
+          _nakelist[sii].sale_good_price = price;
+          _nakelist[sii].sale_cost_fee = sale_cost_fee;
+          _nakelist[sii].newTime = new Date().valueOf() + "";
+        }
+        if(String(si.min_num) === "1" && !hasEdit){
+          this.currentRow = si
+          this.$set(this.nakelist, sii, {
+            ..._nakelist[sii],
+            edit:true
+          });
+          hasEdit = true
+        }else{
+          this.$set(this.nakelist, sii, {
+            ..._nakelist[sii],
+          });
+        }
+      });
+
+      // this.nakelist = _nakelist
+
+      // this.setCurrent(this.nakelist[0]);
+      // let index = _nakelist.findIndex((e) => e.min_num + "" === "1");
+      // if (index !== -1) {
+      //   this.handleCurrentChange(this.nakelist[index]);
+      // }
+
+      this.loading = false;
+    },
+    item_auto_change() {
+      const { item_auto_listing_time } = this.ruleForm;
+      if (String(item_auto_listing_time) === "0") {
+      }
+      this.ruleForm.auto_listing_time =
+        String(item_auto_listing_time) === "0" ? "" : this.ruleForm.auto_listing_time;
+      this.ruleForm.time =
+        this.ruleForm.item_auto_listing_time || this.ruleForm.auto_listing_time;
+      this.$refs.ruleForm.validateField("time");
+    },
+    time_change() {
+      const { auto_listing_time } = this.ruleForm;
+      this.ruleForm.item_auto_listing_time = String(auto_listing_time) === "" ? "0" : "";
+      this.ruleForm.time =
+        this.ruleForm.item_auto_listing_time || this.ruleForm.auto_listing_time;
+      this.$refs.ruleForm.validateField("time");
+    },
+    async get_tags() {
+      const { code, data, message } = await asyncRequest.tag_list({});
+      if (code === 0) {
+        this.tags_options = data;
+      } else if (code >= 100 && code <= 104) {
+        this.tags_options = [];
+        await this.logout();
+      } else {
+        this.tags_options = [];
+        this.$message.warning(message);
+      }
+    },
+    exam_statusChange() {
+      const { exam_status } = this.ruleForm;
+      const isok = String(exam_status) === "1";
+      // this.rulesThis.is_support_barter[0].required = isok;
+      this.rulesThis.yz_cat_id[0].required = isok;
+      this.rulesThis.item_type[0].required = isok;
+      this.rulesThis.time[0].required = isok;
+      this.rulesThis.origin[0].required = isok;
+      this.rulesThis.reject_reason[0].required = !isok;
+    },
+    num_change(e, key, index) {
+      if (index === -1) {
+        // console.log(key, e);
+        this.ruleForm[key] = e;
+        this.$refs.ruleForm.validateField(key);
+      } else {
+        this.nakelist[index][key] = e;
+        this.nakelist[index].newTime = new Date().valueOf() + "";
+        // this.$set(this.nakelist, index, this.nakelist[index]);
+      }
+    },
+    handleChange(e) {
+      this.ruleForm.yz_cat_id = e;
+      this.$refs.ruleForm.validateField("yz_cat_id");
+    },
+    // setCurrent(row) {
+    //   this.$refs.singleTable.setCurrentRow(row);
+    // },
+    async get_new(index,min_num) {
+      const { code, data, message } = await asyncRequest.goodupprice({
+        min_num: min_num,
+        platform_id: this.platform_id,
+        spuCode: this.spuCode,
+      });
+      const resModel = {
+        isok: code,
+        price: code === 0 ? data.sale_price : "0",
+        sale_cost_fee: code === 0 ? data.new_cost_fee : "0",
+        message: message,
+      };
+      return resModel;
+    },
+    handleCurrentChange(val) {
+      this.currentRow = val;
+      const { id } = val;
+      this.nakelist.forEach((si, sii) => {
+        this.nakelist[sii].edit = false;
+        if (id && id === si.id) {
+          this.nakelist[sii].edit = true;
+        }
+        this.$set(this.nakelist, sii, this.nakelist[sii]);
+      });
+    },
+    async resetForm() {
+      // 重置
+      await this.$nextTick(() => {
+        if (this.$refs.ruleForm) {
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+          this.ruleForm = {
+            exam_status: "1", // 通过or驳回
+            yz_cat_id: [],
+            is_support_barter: "1",
+            reject_reason: "",
+            tags: [],
+            item_type: "0",
+            item_auto_listing_time: "0",
+            auto_listing_time: "",
+            origin: "0",
+            time: "0",
+            distribution : ['1']
+          };
+        }
+      });
+    },
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          if (this.loading) return;
+          await this.$confirm(`确定要提交?`, {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+          })
+            .then(async () => {
+              this.loading = true;
+              let model = JSON.parse(JSON.stringify(this.ruleForm));
+              const {
+                yz_cat_id,
+                item_auto_listing_time,
+                auto_listing_time,
+                origin,
+              } = this.ruleForm;
+              // console.log(yz_cat_id);
+              model.platform_youzan_id = this.sitem.platform_youzan_id;
+              model.yz_cat_id = "";
+              model.good_ladder_id = "";
+              model.final_price = "";
+              model.start_sale_num = "";
+              const { exam_status } = this.ruleForm;
+              const isok = String(exam_status) === "1";
+              if (isok) {
+                const { id } = this.currentRow;
+                if (!id) {
+                  this.$message.warning("请选择一个系统阶梯!");
+                  this.loading = false;
+                  return;
+                }
+                let is_ok = true;
+                this.nakelist.forEach((e) => {
+                  if (e.sale_good_price + "" === "0" && e.sale_cost_fee + "" === "0") {
+                    is_ok = false;
+                  }
+                });
+                if (!is_ok) {
+                  this.$message.warning("暂无系统售价,请设置毛利率!");
+                  this.loading = false;
+                  return;
+                }
+
+                let index = this.nakelist.findIndex((si) => si.id === id);
+                const {
+                  min_num,
+                  start_sale_num,
+                  sale_good_price,
+                  sale_cost_fee,
+                  final_price,
+                } = this.nakelist[index];
+                if (parseInt(start_sale_num) < parseInt(min_num)) {
+                  this.$message.warning("销售起订量不小于采购起订量!");
+                  this.loading = false;
+                  return;
+                }
+                if (!final_price) {
+                  this.$message.warning("最终售价不能为空!");
+                  this.loading = false;
+                  return;
+                }
+                console.log(sale_good_price * 100,final_price * 100)
+                if (sale_good_price * 100 > final_price * 100) {
+                  console.log('join----')
+                  this.$message.warning("销售起订量不小于采购起订量!");
+                  this.loading = false;
+                  return;
+                }
+                let am = 0;
+                const m = auto_listing_time ?? "",
+                  nm = new Date().valueOf(),
+                  fp = final_price * 100,
+                  op = origin * 100;
+                if (m !== "0") {
+                  am = new Date(auto_listing_time).valueOf();
+                }
+                if (am !== 0 && nm >= am) {
+                  this.$message.warning("开始出售时间不能小于当前时间!");
+                  this.loading = false;
+                  return;
+                }
+                if (op < fp) {
+                  this.$message.warning("划线价不能小于最终售价!");
+                  this.loading = false;
+                  return;
+                }
+                model.platform_youzan_id = this.sitem.platform_youzan_id;
+                model.yz_cat_id = yz_cat_id[yz_cat_id.length - 1];
+                model.good_ladder_id = id;
+                model.final_price = final_price;
+                model.start_sale_num = start_sale_num;
+                model.auto_listing_time =
+                  model.time !== "0" ? new Date(model.time).valueOf() : "0";
+                delete model["time"];
+                delete model["item_auto_listing_time"];
+              }
+              const { code, message } = await asyncRequest.goodupexam(model);
+              if (code === 0) {
+                this.$notify.success({
+                  title: "提交成功!",
+                  message: "",
+                });
+                this.$emit("searchChange");
+              } else if (code >= 100 && code <= 104) {
+                await this.logout();
+              } else {
+                this.$message.warning(message);
+              }
+            })
+            .catch((err) => {
+              console.log(err)
+              console.log("取消");
+            });
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    async setstatus(model) {},
+  },
+};
+</script>
+
+<style>
+.item_auto_listing_time .fl:last-child {
+  width: calc(100% - 115px);
+}
+</style>

+ 559 - 0
src/views/youzan/othLiveGoods/detail.vue

@@ -0,0 +1,559 @@
+<template>
+  <div class="othgoodsOnlineDetail">
+    <div class="othgoodsOnlineDetail-main" v-if="powers.some((i) => i == '007')">
+      <el-tabs v-model="activeTabs">
+        <el-tab-pane label="商品上线详情" name="1" v-if="queryType !== 'add'">
+          <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
+            <el-collapse-item title="商品上线详情" name="0">
+              <show-data-table
+                :newTime="newTime"
+                v-if="newTime !== ''"
+                :sitem="sitem"
+                :columns="public_listCol"
+              >
+                <template slot="good_name">
+                  <img
+                    v-viewer
+                    style="width: 23px; height: 23px; margin: 0 5px 0 0"
+                    class="fl"
+                    v-if="sitem.good_thumb_img"
+                    :src="sitem.good_thumb_img"
+                    alt=""
+                  />
+                  <span>{{ sitem.good_name }}</span>
+                  <span v-for="(si, i) in sitem.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>
+                        <span>上线商品编号:</span><span>{{ sitem.skuCode }}</span>
+                      </li>
+                      <li
+                        v-if="
+                          newTime !== '' &&
+                          private_field &&
+                          private_field.length > 0 &&
+                          private_field.some((item) => item == '1')
+                        "
+                      >
+                        <span>成本商品编号:</span><span>{{ sitem.spuCode }}</span>
+                      </li>
+                      <li>
+                        <span>平台商品编码:</span><span>{{ sitem.plat_code }}</span>
+                      </li>
+                    </ul>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
+                  </el-popover>
+                </template>
+                <template slot="company">
+                  <span>{{ sitem.company }}</span>
+                  <el-popover placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li>
+                        <span>业务企业编号:</span><span>{{ sitem.companyNo }}</span>
+                      </li>
+                    </ul>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
+                  </el-popover>
+                </template>
+                <template slot="good_info_img">
+                  <img
+                    class="fl"
+                    style="width: 23px; height: 23px; margin: 0 5px 0 0"
+                    v-viewer
+                    v-for="(si, i) in sitem.good_info_img"
+                    :src="si"
+                    :key="si + i"
+                  />
+                </template>
+                <template slot="exclusive">
+                  <span v-for="(si, sii) in sitem.exclusive" :key="si.id">
+                    <span v-if="sii !== 0">/</span> <span>{{ si.name }}</span>
+                  </span>
+                </template>
+                <template slot="supply_area">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (options6.find((item) => item.id == sitem.supply_area) || {})
+                        .name || '--'
+                    "
+                  />
+                </template>
+                <template slot="is_stock">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (options4.find((item) => item.id == sitem.is_stock) || {}).name ||
+                      '--'
+                    "
+                  />
+                </template>
+                <template slot="exam_status">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (options8.find((item) => item.id == sitem.exam_status) || {})
+                        .name || '--'
+                    "
+                  />
+                </template>
+                <template slot="good_type">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (options1.find((item) => item.id == sitem.good_type) || {}).name ||
+                      '--'
+                    "
+                  />
+                  <span v-if="String(sitem.good_type) === '1'" style="padding: 0 0 0 5px"
+                    >{{ sitem.moq }}起订/工期{{ sitem.customized }}天</span
+                  >
+                </template>
+                <template slot="noble">
+                  <span v-if="sitem.noble_metal"
+                    >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
+                      sitem.noble_name
+                    }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
+                      String(sitem.is_gold_price) === "0" ? "不" : ""
+                    }}启用实时金价-{{ String(sitem.is_diff) === "1" ? "有" : "无" }}工差-{{
+                      sitem.config
+                    }}-{{ sitem.other_config }}</span
+                  >
+                </template>
+              </show-data-table>
+
+              <show-data-table
+                :newTime="newTime"
+                v-if="
+                  newTime !== '' &&
+                  private_field &&
+                  private_field.length > 0 &&
+                  private_field.some((item) => item == '2') &&
+                  nakelist &&
+                  nakelist.length > 0 &&
+                  status + '' !== '0'
+                "
+                :sitem="sitem"
+                :columns="sale_listCol"
+              >
+                <template slot="yz_cat_info">
+                  <span v-for="(si, sii) in sitem.yz_cat_info" :key="si.yz_cat_id">
+                    <span v-if="sii !== 0">/</span> <span>{{ si.yz_cat_name }}</span>
+                  </span>
+                </template>
+                <template slot="is_support_barter">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (
+                        is_support_barter_list.find(
+                          (item) => item.value == sitem.is_support_barter
+                        ) || {}
+                      ).label || '--'
+                    "
+                  />
+                </template>
+                <template slot="nakelist">
+                  <el-table
+                    :data="nakelist"
+                    :size="'mini'"
+                    border
+                    stripe
+                    style="width: 99%; margin: 10px 10px 10px 0"
+                  >
+                    <el-table-column label="系统阶梯" width="80px">
+                      <template slot-scope="scope">
+                        <i
+                          v-if="scope.row.min_num + '' === '1'"
+                          class="el-icon-check"
+                          style="color: #1890ff; font-size: 16px; font-weight: bolder"
+                        /> 
+                      </template>
+                      </el-table-column>
+                    <el-table-column prop="min_num" label="采购起订量" />
+                    <el-table-column label="销售">
+                      <el-table-column prop="start_sale_num" label="起订量">
+                        <template slot-scope="scope">
+                          <span v-if="sitem.good_ladder_id + '' === scope.row.id + ''">
+                            {{ sitem.start_sale_num }}
+                          </span>
+                        </template>
+                      </el-table-column>
+                      <el-table-column prop="sale_good_price" label="系统售价" />
+                      <el-table-column prop="sale_cost_fee" label="系统工艺费" />
+                      <el-table-column prop="final_price" label="最终售价">
+                        <template slot-scope="scope">
+                          <span v-if="sitem.good_ladder_id + '' === scope.row.id + ''">
+                            {{ sitem.final_price }}
+                          </span>
+                        </template></el-table-column
+                      >
+                    </el-table-column>
+                  </el-table>
+                </template>
+              </show-data-table>
+            </el-collapse-item>
+          </el-collapse>
+        </el-tab-pane>
+        <el-tab-pane label="审批记录" name="2">
+          <process-time-line
+            v-if="newTime !== ''"
+            :newTime="newTime"
+            :type="'YZSX'"
+            :orderCode="queryId"
+        /></el-tab-pane>
+
+        
+        <el-tab-pane label="流程图" name="3">
+          <flow-chart process_id="19" type="YZSX" :orderCode="queryId" />
+       </el-tab-pane>
+      </el-tabs>
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+<script>
+import asyncRequest from "@/apis/service/youzan/othgoodsOnline";
+import resToken from "@/mixins/resToken";
+import { mapGetters } from "vuex";
+import onlineExamForm from "./components/online-exam-form";
+import {
+  options1,
+  options2,
+  options3,
+  options4,
+  options5,
+  options6,
+  options7,
+  options8,
+  public_listCol,
+  sale_listCol,
+  is_support_barter_list,
+} from "./columns";
+import { isArray } from "@/utils/validate";
+export default {
+  name: "othgoodsOnlineDetail",
+  mixins: [resToken],
+  components: {
+    onlineExamForm,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size", "private_field"]),
+    powers() {
+      const tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "othLiveGoodsDetail"
+        ) || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    }
+  },
+  data() {
+    return {
+      platform_id: "",
+      public_listCol,
+      sale_listCol,
+      is_support_barter_list,
+      options1,
+      options2,
+      options3,
+      options4,
+      options5,
+      options6,
+      options7,
+      options8,
+      ladderlist: [],
+      nakelist: [],
+      spuCode: "",
+      size: "small",
+      activeTabs: "1",
+      activeNames: ["0", "1", "2", "3", "4", "5", "6", "7"],
+      newTime: "",
+      loading: false,
+      queryType: "",
+      queryId: "",
+      status: "",
+      sitem: null,
+    };
+  },
+  mounted() {
+    this.initForm();
+  },
+  methods: {
+    async initForm() {
+      const { id, type } = this.$route.query;
+      this.queryId = id;
+      this.queryType = type;
+      this.activeTabs = type === "add" ? "0" : "1";
+      this.loading = true;
+      if (this.queryType === "add") {
+        this.sitem = {};
+        this.getNewTime();
+      } else {
+        await this.initData();
+      }
+
+      this.loading = false;
+    },
+    // 点击业务审核的按钮
+    async examForm(e) {
+      console.log(e);
+      if (!this.loading) {
+        let model = {
+          skuCode: this.queryId,
+          exam_status: e.numStatus,
+          online_time: e.online_time,
+          remark: e.remark,
+        };
+
+        if ((e.numStatus ?? "") == "") {
+          //驳回重新审核
+          await this.setstatus("提交产品部门审核结果", model);
+        } else if (e.numStatus == "3") {
+          //点击保存
+          // return;
+          await this.setstatus("提交产品部门审核结果", model);
+        } else {
+          //驳回下线
+          await this.setstatus("驳回下线吗", model);
+        }
+      }
+    },
+    // 点击财务定价的驳回按钮
+    async examForm1(e) {
+      if ((e.numStatus ?? "") == "") {
+        if (!this.loading) {
+          let model = {
+            skuCode: this.queryId,
+            exam_status: e.numStatus,
+            remark: e.remark,
+          };
+          await this.setstatus("驳回重新审核吗", model);
+        }
+      } else {
+        // return;
+        if (!this.loading) {
+          let model = {
+            skuCode: this.queryId,
+            exam_status: e.numStatus,
+            remark: e.remark,
+          };
+          await this.setstatus("驳回下线吗", model);
+        }
+      }
+    },
+    // 财务审核的保存按钮
+    async examForm2(e) {
+      console.log(e);
+      if (!this.loading) {
+        let model = {
+          skuCode: this.queryId,
+          exam_status: e.numStatus,
+          remark: e.remark,
+        };
+
+        if ((e.numStatus ?? "") == "") {
+          //驳回重新审核
+          await this.setstatus("驳回重新审核吗", model);
+        } else if (e.numStatus == "5") {
+          //点击保存
+          // return;
+          await this.setstatus("提交财务审核结果", model);
+        } else {
+          //驳回下线
+          await this.setstatus("驳回下线吗", model);
+        }
+      }
+    },
+    // 操作上线的保存按钮
+    async examForm3(e) {
+      console.log(e);
+      if (!this.loading) {
+        let model = {
+          skuCode: this.queryId,
+          exam_status: e.numStatus,
+          plat_code: e.plat_code,
+          remark: e.remark || "",
+        };
+
+        if ((e.numStatus ?? "") == "") {
+          //驳回重新审核
+          await this.setstatus("驳回重新审核吗", model);
+        } else if (e.numStatus == "6") {
+          //点击保存
+          // return;
+          await this.setstatus("提交商品上线结果", model);
+        } else {
+          //驳回下线
+          await this.setstatus("驳回下线吗", model);
+        }
+      }
+    },
+
+    async setstatus(detail, model) {
+      await this.$confirm(`确定要${detail}?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          let res = null;
+          if (model.exam_status == "") {
+            res = await asyncRequest.goodupreject(model);
+          } else {
+            res = await asyncRequest.status(model);
+          }
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "提交成功!",
+              message: "",
+            });
+            await this.initForm();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+
+    refresh(e) {
+      const { spuCode } = e;
+      let model = {
+        id: this.queryType === "add" ? spuCode : this.queryId,
+        type: "view",
+      };
+      this.routeReGoto("othgoodsOnlineDetail", model);
+    },
+    async initData() {
+      this.loading = true;
+      const { code, message, data } = await asyncRequest.detail({
+        platform_youzan_id: this.queryId,
+      });
+      this.loading = false;
+      if (code === 0) {
+        this.sitem = JSON.parse(JSON.stringify(data));
+        const {
+          exam_status,
+          cat_info,
+          ladderlist,
+          nakelist,
+          spuCode,
+          platform_id,
+        } = this.sitem;
+        this.spuCode = spuCode;
+        this.platform_id = platform_id;
+        // this.ladderlist = JSON.parse(JSON.stringify(ladderlist));
+        const _nakelist = JSON.parse(JSON.stringify(nakelist));
+        // console.log(this.ladderlist);
+        let cat = "";
+        if (cat_info && cat_info.length > 0) {
+          cat_info.forEach((e, i) => {
+            cat += i === 0 ? e.name : "/" + e.name;
+          });
+        }
+        this.sitem.cat = cat;
+        this.sitem.platform_youzan_id = this.queryId;
+
+        if (!isArray(this.sitem.good_info_img)) {
+          this.sitem.good_info_img = this.sitem.good_info_img.split(",");
+        }
+
+        _nakelist.forEach(async (si, sii) => {
+          si.start_sale_num = si.min_num;
+          let { isok, price, sale_cost_fee } = await this.get_new(sii,si.min_num);
+          if (isok === 0) {
+            _nakelist[sii].sale_good_price = price;
+            _nakelist[sii].sale_cost_fee = sale_cost_fee;
+            _nakelist[sii].newTime = new Date().valueOf() + "";
+          } else if (isok >= 100 && isok <= 104) {
+            await this.logout();
+          } else {
+            _nakelist[sii].sale_good_price = price;
+            _nakelist[sii].sale_cost_fee = sale_cost_fee;
+            _nakelist[sii].newTime = new Date().valueOf() + "";
+          }
+          this.$set(this.nakelist, sii, _nakelist[sii]);
+        });
+
+      //  this.nakelist = _nakelist
+
+       console.log(this.nakelist)
+
+        this.status = exam_status;
+        this.getNewTime();
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(message);
+      }
+    },
+    async get_new(index,min_num) {
+      const { code, data, message } = await asyncRequest.goodupprice({
+        min_num: min_num,
+        platform_id: this.platform_id,
+        spuCode: this.spuCode,
+      });
+      const { sale_price, new_cost_fee } = data || {};
+      const resModel = {
+        isok: code,
+        price: code === 0 ? sale_price : "0",
+        sale_cost_fee: code === 0 ? new_cost_fee : "0",
+        message: message,
+      };
+      return resModel;
+    },
+    getNewTime() {
+      this.newTime = new Date().valueOf();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.othgoodsOnlineDetail {
+  width: 100%;
+  box-sizing: border-box;
+  .othgoodsOnlineDetail-main {
+    padding: 10px 16px 200px 16px;
+    width: 100%;
+  }
+  .othgoodsOnlineDetail-title {
+    border-top: 1px solid #ebeef5;
+    span {
+      height: 50px;
+      line-height: 50px;
+      font-family: "微软雅黑", sans-serif;
+      font-weight: 400;
+      font-style: normal;
+      font-size: 16fpx;
+      text-align: left;
+    }
+  }
+  /deep/ .ddiv {
+    border-top: 1px solid #dcdfe6;
+  }
+  /deep/ .dtitle {
+    width: 40px;
+    text-align: center;
+    height: 100%;
+    min-height: 100%;
+    ul {
+      padding: 12px 0 0 0;
+    }
+  }
+  /deep/ .dmain {
+    padding: 20px 0 0 0;
+    width: calc(100% - 40px);
+    border-left: 1px solid #dcdfe6;
+  }
+}
+</style>

+ 856 - 0
src/views/youzan/othLiveGoods/index.vue

@@ -0,0 +1,856 @@
+<template>
+  <div class="othgoodsOnline pagePadding">
+    <div v-if=" powers.some((i) => i == '001')">
+      <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();
+        "
+      >
+        <template #table-header="{}">
+          <div style="width: 100%">
+            <el-row style="padding: 0 0 10px 80px">
+              <el-col :span="4" style="width: 150px">
+                <el-select
+                  v-model="parmValue.exam_status"
+                  filterable
+                  clearable
+                  :size="searchSize"
+                  placeholder="状态"
+                  style="width: 100%"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-option
+                    v-for="item in options8"
+                    :key="'status' + item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-col>
+              <el-col :span="4" style="width: 130px; padding: 0 0 0 10px">
+                <el-select
+                  v-model="parmValue.good_type"
+                  filterable
+                  clearable
+                  :size="searchSize"
+                  placeholder="是否定制"
+                  style="width: 100%"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-option
+                    v-for="item in options1"
+                    :key="'good_type' + item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-col>
+              <el-col :span="6" style="width: 303px; padding: 0 0 0 10px">
+                <period-date-picker
+                  :type="1"
+                  :width="'135px'"
+                  :size="searchSize"
+                  :start="parmValue.start"
+                  :end="parmValue.end"
+                  @timeReturned="handleTime"
+                />
+              </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="6" style="width: 310px">
+                <good-class
+                  :value="parmValue.cat_id"
+                  @handleChange="goods_class_change"
+                  :disabled="false"
+                  :size="searchSize"
+                  :isDetail="false"
+                  :placeholder="'分类'"
+                />
+              </el-col>
+
+              <el-col :span="6" style="width: 240px; padding: 0 0 0 10px">
+                <search-terrace
+                  :value="parmValue.platform_code"
+                  :disabled="true"
+                  :size="'mini'"
+                  :isDetail="true"
+                  :is_show="'0'"
+                  :placeholder="'所属平台'"
+                  @searchChange="platform_codeChange"
+              /></el-col>
+              <el-col :span="4" style="width: 210px; padding: 0 0 0 10px">
+                <search-brand
+                  :value="brandid"
+                  :disabled="false"
+                  :size="'mini'"
+                  :isDetail="true"
+                  :names="parmValue.supplierName"
+                  :placeholder="'商品品牌'"
+                  @searchChange="brandidsearchChange"
+                />
+              </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-row>
+            <el-row style="padding: 10px 0 0 0">
+              <el-col :span="4" style="width: 450px">
+                <el-input
+                  :size="searchSize"
+                  v-model="sinput"
+                  :maxlength="40"
+                  @blur="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                  placeholder="关键字"
+                  ><el-select
+                    v-model="select"
+                    slot="prepend"
+                    :size="searchSize"
+                    style="width: 140px"
+                    @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
+                    placeholder="关键字类型"
+                  >
+                    <el-option label="商品名称" value="1" />
+                    <el-option label="成本商品编号" value="2" />
+                    <el-option label="上线商品编号" value="8" />
+                    <!-- <el-option label="平台编号" value="3" /> -->
+                    <!-- <el-option label="供应商编号" value="4" /> -->
+                    <el-option label="业务企业编号" value="5" />
+                    <el-option label="平台商品编号" value="6" />
+                    <el-option label="成本创建人" value="7" />
+                    <el-option label="上线创建人" value="10" />
+                    <el-option label="创建人部门" value="9" /> </el-select
+                ></el-input>
+              </el-col>
+              <el-col
+                :span="3"
+                class="fr"
+                style="width: 66px; padding: 0 0 0 10px"
+                v-if="powers.some((i) => i == '087')"
+              >
+                <el-button
+                  :size="searchSize"
+                  type="primary"
+                  style="float: right"
+                  @click="centerDialogVisible = true"
+                >
+                  导出上线商品
+                </el-button>
+              </el-col>
+            </el-row>
+          </div></template
+        >
+        <template #good_thumb_img="{ scope }">
+          <div
+            v-if="scope.row.good_thumb_img"
+            style="width: 20px; height: 20px"
+            class="hover"
+            v-viewer
+          >
+            <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="
+              scope.row.status == '6'
+                ? ''
+                : scope.row.status == '7'
+                ? 'danger'
+                : 'warning'
+            "
+            v-text="
+              (options8.find((item) => item.id == scope.row.status) || {}).name || '--'
+            "
+          ></el-tag>
+        </template>
+        <template #good_type="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.good_type == '0' ? 'warning' : ''"
+            v-text="
+              (options1.find((item) => item.id == scope.row.good_type) || {}).name || '--'
+            "
+          ></el-tag>
+        </template>
+
+        <template #operation="{ scope }">
+          <el-tooltip
+            v-if="powers.some((i) => i == '007')"
+            placement="top"
+            content="详情"
+            effect="dark"
+          >
+            <i
+              class="el-icon-view tb-icon"
+              @click="getRouter('othLiveGoodsDetail', scope.row.platform_youzan_id)"
+            ></i>
+          </el-tooltip>
+
+          <el-tooltip content="设置活动链接" placement="top" v-if="powers.some((i) => i == '102') && String(scope.row.exam_status) === '6'">
+            <i class="el-icon-setting tb-icon" @click="handleActivity(scope.row)"></i>
+          </el-tooltip>
+
+          <el-tooltip
+            v-if="
+             (
+              powers.some((i) => i == '078') &&
+              (String(scope.row.status) === '7' || String(scope.row.status) === '8')
+             ) && !isSupertube
+            "
+            effect="dark"
+            content="重新发起上线流程"
+            placement="top"
+          >
+            <i
+              class="el-icon-upload tb-icon"
+              @click="get_againonline(scope.row.platform_youzan_id)"
+            ></i>
+          </el-tooltip>
+          
+          <el-tooltip
+            v-if="(powers.some((i) => i == '079') && scope.row.status + '' !== '8') && !isSupertube"
+            effect="dark"
+            content="下线商品"
+            placement="top"
+          >
+            <i
+              class="el-icon-download tb-icon"
+              @click="showDonlineDlg(scope.row.platform_youzan_id)"
+            ></i>
+          </el-tooltip>
+        </template>
+      </ex-table>
+      <el-dialog title="下线原因" :visible.sync="dialogFormVisible" width="500px">
+        <el-form
+          :model="donline_form"
+          :rules="donline_rules"
+          ref="donline_Form"
+          class="demo-ruleForm"
+          label-width="80px"
+        >
+          <el-form-item label="下线原因" prop="offline_reason_id">
+            <el-select
+              style="width: 100%"
+              v-model="donline_form.offline_reason_id"
+              placeholder="请选择下线原因"
+            >
+              <el-option
+                :label="item.result"
+                :value="item.result_code"
+                v-for="item in donline_formStOps"
+                :key="item.result_code"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="下线备注" prop="offline_remark">
+            <el-input
+              v-model="donline_form.offline_remark"
+              type="textarea"
+              placeholder="请输入下线备注"
+              autocomplete="off"
+            ></el-input>
+          </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="dialogFormVisible = false">取 消</el-button>
+          <el-button type="primary" @click="donlineDlg">确 定</el-button>
+        </div>
+      </el-dialog>
+      <el-dialog
+        title="上线商品导出"
+        :visible.sync="centerDialogVisible"
+        width="500px"
+        center
+      >
+        <el-form
+          :model="ruleForm"
+          :rules="rules"
+          ref="ruleForm"
+          class="demo-ruleForm"
+          label-width="80px"
+        >
+          <el-form-item prop="start_date" label="日期: ">
+            <!-- <el-date-picker
+            value-format="yyyy-MM-dd"
+            v-model="ruleForm.date"
+            type="date"
+            placeholder="请选择"
+          >
+          </el-date-picker> -->
+
+            <periodDatePicker
+              :start="ruleForm.start_date"
+              :end="ruleForm.end_date"
+              :width="'165px'"
+              @timeReturned="time"
+            />
+          </el-form-item>
+          <el-form-item label="状态: " prop="status">
+            <el-select v-model="ruleForm.status" placeholder="请选择">
+              <el-option label="待上线" value="5"></el-option>
+              <el-option label="上线成功" value="6"></el-option>
+              <el-option label="已下线" value="8"></el-option>
+            </el-select>
+          </el-form-item>
+
+          <el-form-item label="平台id: " prop="platform_id">
+            <!-- <el-input
+            v-model="ruleForm.platform_id"
+            style="width: 300px"
+            placeholder="请输入"
+          ></el-input> -->
+            <search-terrace
+              :value="ruleForm.platform_id"
+              :disabled="true"
+              :isDetail="false"
+              :is_show="'0'"
+              :placeholder="'所属平台'"
+              @searchChange="platform_codesearchChange"
+            />
+          </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="centerDialogVisible = false">取 消</el-button>
+          <el-button type="primary" @click="goodsExport">导 出</el-button>
+        </span>
+      </el-dialog>
+      <!-- 弹窗 新增/修改 -->
+      <add-edit
+        :id="modelId"
+        :show-model="showModel"
+        :sitem="sitem"
+        @refresh="searchList"
+        @cancel="showModel = false"
+      />
+    </div>
+
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+
+    <activity-modal :skuCode="skuCode" :actUrl="actUrl" :visible.sync="activityVisible" @refresh="searchList" />
+  </div>
+</template>
+<script>
+import asyncRequest from "@/apis/service/youzan/othgoodsOnline";
+import mixinPage from "@/mixins/elPaginationHandle";
+import { mapGetters } from "vuex";
+import urlConfig from "@/apis/url-config";
+import resToken from "@/mixins/resToken";
+import { listCol, options1, options8 } from "./columns";
+import companyHelper from "@/mixins/companyHelper";
+import ActivityModal from "./components/activity-modal";
+
+export default {
+  name: "othgoodsOnline",
+  mixins: [mixinPage, resToken,companyHelper],
+  components: { ActivityModal },
+  computed: {
+    //组件SIZE设置
+    ...mapGetters(["tablebtnSize", "searchSize", "size", "isSupertube"]),
+    powers() {
+      const tran =
+        this.$store.getters.btnList.find((i) => i.menu_route == "othLiveGoods") ||
+        {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    },
+  },
+  data() {
+    const validate = (rule, value, callback) => {
+      if (value == "") {
+        return callback(new Error("必填项不能为空"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      actUrl:"",
+      dialogFormVisible: false,
+      activityVisible:false,
+      donline_formStOps: [],
+      donline_form: {
+        offline_reason_id: "",
+        offline_remark: "",
+        platform_youzan_id: "",
+      },
+      donline_rules: {
+        offline_reason_id: [
+          { message: "请选择下线原因", required: true, trigger: "change" },
+        ],
+        offline_remark: [{ message: "请输入下线备注", required: true, trigger: "blur" }],
+      },
+      fileUrl: urlConfig.baseURL,
+      ruleForm: {
+        // date: "",
+        platform_id: "",
+        status: "",
+        start_date: "",
+        end_date: "",
+      },
+      rules: {
+        start_date: [
+          {
+            validator: validate,
+            type: "date",
+            required: true,
+            trigger: "change",
+          },
+        ],
+        status: [{ validator: validate, required: true, trigger: "change" }],
+        platform_id: [{ validator: validate, required: true, trigger: "change" }],
+      },
+      centerDialogVisible: false,
+      options1: options1,
+      options8: options8,
+      loading: false,
+      skuCode: "",
+      parmValue: {
+        good_name: "", //商品名称
+        spucode: "", //商品编号
+        skucode: "", //商品编号
+        cat_id: "", //商品分类
+        start: "", //开始日期
+        end: "", //结束日期
+        platform_code: "37", //平台编码
+        is_stock: "", //是否库存品
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+        supplierNo: "", //供应商编号
+        good_type: "", //是否定制
+        brand_id: "", //品牌
+        companyNo: "", //业务企业编号
+        exam_status: "", //审核状态
+        plat_code: "", //平台商品编号
+        creater: "", //
+        company_name: "", //创建人部门
+      },
+
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: listCol,
+      cat_id: [],
+      brandid: [],
+      select: "1",
+      sinput: "",
+    };
+  },
+  mounted() {
+    const { back } = this.$route.query;
+    if (back) {
+      this.parmValue = JSON.parse(back);
+      const { page, size } = this.parmValue;
+      // this.parmValue.start = start || last_start;
+      // this.parmValue.end = end || last_end;
+      if (this.parmValue.brand_id.length > 0) {
+        this.brandid = [this.parmValue.brand_id];
+      }
+
+      this.pageInfo = {
+        size: size,
+        curr: page,
+        total: 0
+      };
+      
+      //多选条件
+      this.select = this.parmValue.select;
+      // this.sselect = this.parmValue.sselect;
+      this.sinput = this.parmValue.sinput;
+    } else {
+      this.select = "1";
+      //  this.sselect = "创建时间"
+    }
+    this.cat_id = [];
+    // this.brandid = [];
+    this.searchList();
+  },
+  methods: {
+    handleActivity(row){
+      this.skuCode = row.skuCode;
+      this.actUrl = row.is_act_url
+      this.activityVisible = true;
+    },
+    // 获取异常原因下拉列表
+    async getresultlist() {
+      const { code, data, message } = await asyncRequest.resultlist({
+        page: 1, size: 100, type: "8", status: "3"
+      });
+      if (code === 0) {
+        const { list } = data ?? [];
+        this.donline_formStOps = list;
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(message);
+      }
+    },
+    // 时间函数
+    async time(e) {
+      this.ruleForm.start_date = e.startTime || "";
+      this.ruleForm.end_date = e.endTime || "";
+    },
+    platform_codesearchChange(e) {
+      const { id } = e;
+      this.ruleForm.platform_id = id || "";
+      this.$refs.ruleForm.validateField("platform_id");
+    },
+    async platform_codeChange(e) {
+      const { id } = e;
+      this.parmValue.platform_code = id || "";
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+    //点击下线
+    async showDonlineDlg(platform_youzan_id) {
+      this.donline_form = {
+        offline_reason_id: "",
+        offline_remark: "",
+        platform_youzan_id: platform_youzan_id,
+      };
+      this.dialogFormVisible = true;
+    },
+    //商品下线原因 确定
+    async donlineDlg() {
+      await this.$refs.donline_Form.validate(async (valid) => {
+        if (valid) {
+          this.loading = true;
+          const obj = JSON.parse(JSON.stringify(this.donline_form));
+          const { code, data, message } = await asyncRequest.yz_goodoff(obj);
+          this.dialogFormVisible = false;
+          if (code === 0) {
+            this.loading = false;
+            this.$notify.success({
+              title: message,
+              message: "",
+            });
+            await this.searchList();
+          } else if (code >= 100 && code <= 104) {
+            await this.logout();
+          } else {
+            this.loading = false;
+            this.$message.warning(message);
+          }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    //导出
+    async goodsExport() {
+      if (
+        (this.ruleForm.start_date !== "" && this.ruleForm.end_date === "") ||
+        (this.ruleForm.start_date === "" && this.ruleForm.end_date !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          if (!this.loading) {
+            this.loading = true;
+            let httpType = `aplication/zip`;
+            axios({
+              method: "post", url: this.fileUrl + "admin/exportgood",
+              responseType: "blob", data: this.ruleForm,
+              headers: { Accept: httpType }
+            }).then((res) => {
+                if (res && res.status == 200 && res.data) {
+                  let url = window.URL.createObjectURL(
+                    new Blob([res.data], {
+                      type: httpType,
+                    })
+                  );
+                  let link = document.createElement("a");
+                  link.style.display = "none";
+                  link.href = url;
+                  let excelName = "商品.zip";
+                  link.setAttribute("download", excelName);
+                  document.body.appendChild(link);
+                  link.click();
+                  link.remove();
+                  window.URL.revokeObjectURL(url); //释放掉blob对象
+                  this.$message.success(`导出成功`);
+                  setTimeout(() => {
+                    this.loading = false;
+                  }, 500);
+                } else {
+                  this.$message.error(res.data.message);
+                  setTimeout(() => {
+                    this.loading = false;
+                  }, 500);
+                }
+              })
+              .catch((error) => {
+                console.log(error);
+                this.loading = false;
+              });
+          }
+          // this.loading = true;
+          // const res = await asyncRequest.exportgood(this.ruleForm);
+          // if (res && res.code === 0) {
+          //   this.$message.warning(res.message);
+          //   console.log(res);
+          //   this.loading = false;
+          // } else if (res && res.code >= 100 && res.code <= 104) {
+          //   await this.logout();
+          // } else {
+          //   this.loading = false;
+          //   this.$message.warning(res.message);
+          // }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    //点击详情
+    getRouter(toRouter, queryId) {
+      if (toRouter && queryId) {
+        let model = {
+          id: queryId,
+          type: "view",
+        };
+
+        //有多选框的条件
+        this.parmValue.select = this.select;
+        // this.parmValue.sselect = this.sselect ;
+        this.parmValue.sinput = this.sinput;
+        //
+        console.log(this.parmValue);
+        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("暂未找到相关流程!");
+      }
+    },
+    restSearch() {
+      this.select = "1";
+      this.sinput = "";
+      this.cat_id = [];
+      this.brandid = [];
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.parmValue = {
+        good_name: "", //商品名称
+        spucode: "", //商品编号
+        skucode: "", //商品编号
+        cat_id: "", //商品分类
+        start: "", //开始日期
+        end: "", //结束日期
+        platform_code: "37", //平台编码
+        is_stock: "", //是否库存品
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+        supplierNo: "", //供应商编号
+        good_type: "", //是否定制
+        brand_id: "", //品牌
+        companyNo: "", //业务企业编号
+        exam_status: "", //审核状态
+        plat_code: "", //平台商品编号
+        creater: "", //
+        company_name: "", //创建人部门
+      };
+      this.searchList();
+    },
+    //商品品牌选择
+    async brandidsearchChange(e) {
+      const { id, code, label } = e;
+      if (id) {
+        this.brandid = [id];
+        this.parmValue.brand_id = id;
+        this.parmValue.supplierName = label;
+      } else {
+        this.brandid = [];
+        this.parmValue.brand_id = "";
+        this.parmValue.supplierName = "";
+      }
+      this.parmValue.brand_id = this.brandid.toString();
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+    // 时间
+    async handleTime(e) {
+      this.parmValue.start = e.startTime || "";
+      this.parmValue.end = e.endTime || "";
+      if (
+        (this.parmValue.start !== "" && this.parmValue.end !== "") ||
+        (this.parmValue.start === "" && this.parmValue.end === "")
+      ) {
+        this.pageInfo.curr = 1;
+        this.parmValue.page = 1;
+        await this.searchList();
+      }
+    },
+    /**
+     * 商品重新上线
+     * @param {String} id id
+     * @param {String} status 0-禁用 1-启用
+     */
+    async get_againonline(platform_youzan_id) {
+      await this.$confirm(`确定要重新发起上线流程?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          this.loading = true;
+          const model = {
+            platform_youzan_id: platform_youzan_id,
+          };
+          const res = await asyncRequest.againonline(model);
+          if (res && res.code === 0) {
+            this.loading = false;
+            this.$notify.success({
+              title: "重新发起上线流程成功!",
+              message: "",
+            });
+            await this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.loading = false;
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+
+    /**
+     * 商品下线
+     * @param {String} id id
+     * @param {String} status 0-禁用 1-启用
+     */
+
+    // 刷新表格
+    async searchList() {
+      if (
+        (this.parmValue.start !== "" && this.parmValue.end === "") ||
+        (this.parmValue.start === "" && this.parmValue.end !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      this.loading = true;
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      model.good_name = this.select === "1" ? this.sinput : ""; //商品名称
+      model.spucode = this.select === "2" ? this.sinput : ""; //商品编号
+      model.skucode = this.select === "8" ? this.sinput : ""; //商品编号
+      // model.platform_code = this.select === "1" ? this.sinput : ""; //平台编码
+      // model.supplierNo = this.select === "1" ? this.sinput : ""; //供应商编号
+      model.companyNo = this.select === "5" ? this.sinput : ""; //业务企业编号
+      // model.exam_status = this.select === "1" ? this.sinput : ""; //审核状态
+      model.plat_code = this.select === "6" ? this.sinput : ""; //平台商品编号
+      model.creater = this.select === "7" ? this.sinput : ""; //
+      model.company_name = this.select === "9" ? this.sinput : ""; // 部门
+      model.online_creater = this.select === "10" ? this.sinput : ""; // 上线创建人
+
+      const { code, data, message } = await asyncRequest.list({
+        ...model,
+        needRela: true
+      });
+      if (code === 0) {
+        const { list, count } = data ?? {};
+        this.tableData = list ?? [];
+        this.tableData.forEach((a) => {
+          a.cat_name = "";
+          let list = a.cat_info || [];
+          list.forEach((b, i) => {
+            a.cat_name += i == 0 ? b.name : "/" + b.name;
+          });
+        });
+        this.pageInfo.total = Number(count ?? "0");
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.getresultlist();
+      this.loading = false;
+    },
+    //商品分类选择
+    async goods_class_change(e) {
+      this.cat_id = e;
+      this.parmValue.cat_id =
+        this.cat_id.length === 0 ? "" : this.cat_id[this.cat_id.length - 1];
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 0 - 0
src/views/youzan/othLiveGoods/泰行销直播商品


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