Sfoglia il codice sorgente

Merge commit '29ada2929add40c88e7b4d8bb4cbd90cb25ffe20' into HEAD

gitadmin 2 mesi fa
parent
commit
6ba0dca519
39 ha cambiato i file con 3373 aggiunte e 545 eliminazioni
  1. 1 1
      .env.practice
  2. BIN
      public/templ/抵扣产品导入模板.xlsx
  3. 1 1
      public/version.json
  4. 9 9
      src/App.vue
  5. 75 0
      src/api/rechargeRule.js
  6. 80 0
      src/api/shopProductSubsidy.js
  7. 58 0
      src/api/storeAccount.js
  8. 0 1
      src/components/Menu/SideMenu.vue
  9. 2 2
      src/components/global.less
  10. 20 0
      src/components/index.less
  11. 414 390
      src/config/router.config.js
  12. 1 1
      src/layouts/BasicLayout.vue
  13. 51 41
      src/views/bulkManagement/bulkWarehousingOrder/edit.vue
  14. 83 0
      src/views/common/mallCategory.js
  15. 19 21
      src/views/common/productType.js
  16. 1 1
      src/views/financialManagement/financialCollection/detailModal.vue
  17. 182 0
      src/views/numsGoodsShelves/customerAccount/clearRecordModal.vue
  18. 288 0
      src/views/numsGoodsShelves/customerAccount/list.vue
  19. 219 0
      src/views/numsGoodsShelves/customerAccount/transactionFlowModal.vue
  20. 120 0
      src/views/numsGoodsShelves/customerAccount/zeroClearingModal.vue
  21. 1 1
      src/views/numsGoodsShelves/shelfSet/basicInfoModal.vue
  22. 30 27
      src/views/numsGoodsShelves/shelfSet/list.vue
  23. 181 0
      src/views/promotionManagement/rechargeSettings/editModal.vue
  24. 278 0
      src/views/promotionManagement/rechargeSettings/list.vue
  25. 197 0
      src/views/promotionManagement/subsidizedProducts/chooseImportModal.vue
  26. 129 0
      src/views/promotionManagement/subsidizedProducts/editModal.vue
  27. 195 0
      src/views/promotionManagement/subsidizedProducts/importGuideModal.vue
  28. 378 0
      src/views/promotionManagement/subsidizedProducts/list.vue
  29. 250 0
      src/views/promotionManagement/subsidizedProducts/subsidyAddModal.vue
  30. 1 1
      src/views/purchasingManagement/purchaseOrder/basicInfoModal.vue
  31. 1 1
      src/views/purchasingManagement/purchaseOrderNew/basicInfoModal.vue
  32. 34 12
      src/views/salesManagement/onlinePayOrder/detail.vue
  33. 1 1
      src/views/salesManagement/onlinePayOrder/list.vue
  34. 24 9
      src/views/salesManagement/salesQuery/detail.vue
  35. 1 1
      src/views/salesManagement/salesQuery/list.vue
  36. 21 12
      src/views/salesManagement/salesQueryNew/chooseProductModal.vue
  37. 24 9
      src/views/salesManagement/salesQueryNew/detail.vue
  38. 1 1
      src/views/salesManagement/salesQueryNew/list.vue
  39. 2 2
      vue.config.js

+ 1 - 1
.env.practice

@@ -1,6 +1,6 @@
 NODE_ENV=production
 VUE_APP_PREVIEW=false
-VUE_APP_API_BASE_URL=http://192.168.2.100:88/qpls-md
+VUE_APP_API_BASE_URL=http://192.168.2.100:91/qpls-md
 VUE_APP_WX_BASE_URL=//t.iscm.360arrow.com/qpls-md/websocket/
 VUE_APP_VERSION=V1.0.1
 VUE_APP_ENVTIPS=练习环境(仅供测试)

BIN
public/templ/抵扣产品导入模板.xlsx


+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1742365839870
+  "version": 1742777899033
 }

+ 9 - 9
src/App.vue

@@ -8,17 +8,17 @@
 </template>
 
 <script>
-import zhCN from 'ant-design-vue/es/locale/zh_CN';
+import zhCN from 'ant-design-vue/es/locale/zh_CN'
 import { AppDeviceEnquire } from '@/utils/mixin'
 import { onTextSelected } from '@/utils/util'
-import moment from 'moment';//引入moment 
-import 'moment/locale/zh-cn';
-moment.locale('zh-cn'); //设置语言 或 moment.lang('zh-cn'); 
+import moment from 'moment'// 引入moment
+import 'moment/locale/zh-cn'
+moment.locale('zh-cn') // 设置语言 或 moment.lang('zh-cn');
 export default {
   mixins: [AppDeviceEnquire],
   data () {
     return {
-      locale:zhCN,
+      locale: zhCN,
       envtips: '',
       moment
     }
@@ -26,10 +26,10 @@ export default {
   created () {
     const _this = this
     this.envtips = process.env.VUE_APP_ENVTIPS
-    
+
     // 获取所有数据字典
     this.$store.dispatch('getAllLookUp')
-    
+
     // 在页面加载时读取sessionStorage
     if (sessionStorage.getItem('store')) {
       const data = JSON.parse(sessionStorage.getItem('store'))
@@ -63,11 +63,11 @@ export default {
     // })
     // 选择文本后复制
     window.addEventListener('mouseup', (e) => {
-      onTextSelected(this.$copyText,this.$message)
+      onTextSelected(this.$copyText, this.$message)
     })
     window.addEventListener('mousedown', (e) => {
       const n = document.getElementsByClassName('copy-rect')
-      if(n[0]){
+      if (n[0]) {
         document.body.removeChild(n[0])
       }
     })

+ 75 - 0
src/api/rechargeRule.js

@@ -0,0 +1,75 @@
+import { axios } from '@/utils/request'
+
+// 充值设置  有分页
+export const rechargeRuleList = (params) => {
+  const url = `/rechargeRule/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+
+// 充值设置  新增
+export const rechargeRuleCreate = (params) => {
+  return axios({
+    url: '/rechargeRule/create',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('新增')
+    }
+  })
+}
+
+// 充值设置  编辑
+export const rechargeRuleModify = (params) => {
+  return axios({
+    url: '/rechargeRule/modify',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('编辑')
+    }
+  })
+}
+
+// 充值设置   获取详情
+export const rechargeRuleDetail = (params) => {
+  return axios({
+    url: `/rechargeRule/findBySn/${params.sn}`,
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('详情')
+    }
+  })
+}
+
+// 充值设置   修改状态
+export const rechargeRuleUpdateState = (params) => {
+  return axios({
+    url: '/rechargeRule/updateState',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('修改状态')
+    }
+  })
+}
+
+// 充值设置  删除
+export const rechargeRuleDel = (params) => {
+  return axios({
+    url: '/rechargeRule/delete',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('删除')
+    }
+  })
+}

+ 80 - 0
src/api/shopProductSubsidy.js

@@ -0,0 +1,80 @@
+import { axios } from '@/utils/request'
+
+//  补贴产品 列表  有分页
+export const subsidizedProductList = (params) => {
+  const url = `/shopProductSubsidy/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+
+// 补贴产品 批量删除
+export const subsidizedProductDel = (params) => {
+  return axios({
+    url: `/shopProductSubsidy/delBatch`,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('删除')
+    }
+  })
+}
+
+// 补贴产品  批量编辑
+export const subsidizedProductEdit = (params) => {
+  return axios({
+    url: '/shopProductSubsidy/editBatch',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('编辑')
+    }
+  })
+}
+
+// 补贴产品   新增  弹窗产品列表  有分页
+export const queryProductPageList = (params) => {
+  const url = `/shopProductSubsidy/queryProductPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+
+// 补贴产品 新增  批量保存
+export const subsidizedProductSave = (params) => {
+  return axios({
+    url: `/shopProductSubsidy/saveBatch`,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('保存')
+    }
+  })
+}
+
+// 补贴产品  错误项导出
+export const exportImportDetailError = (params) => {
+  return axios({
+    url: '/shopProductSubsidy/exportImportDetailError',
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers: {
+      'module': encodeURIComponent('导出错误项')
+    }
+  })
+}

+ 58 - 0
src/api/storeAccount.js

@@ -0,0 +1,58 @@
+import { axios } from '@/utils/request'
+
+// 修配易码通-商城  客户账户 列表  有分页
+export const storeAccountList = (params) => {
+  const url = `/storeAccount/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+
+// 修配易码通-商城  客户账户 统计
+export const storeAccountCount = (params) => {
+  return axios({
+    url: '/storeAccount/querySum',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 修配易码通-商城  客户账户  清零记录、交易流水列表   有分页
+export const storeAccountDetailList = (params) => {
+  const url = `/storeAccount/querydetailPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+
+// 修配易码通-商城  客户账户   清零
+export const storeAccountSetZero = (params) => {
+  return axios({
+    url: '/storeAccount/setZero',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 修配易码通-商城  交易流水 统计
+export const storeAccountDetailCount = (params) => {
+  return axios({
+    url: '/storeAccount/queryDetailSum',
+    data: params,
+    method: 'post'
+  })
+}

+ 0 - 1
src/components/Menu/SideMenu.vue

@@ -1,7 +1,6 @@
 <template>
   <a-layout-sider
     :class="['sider', isDesktop() ? null : 'shadow', theme, fixSiderbar ? 'ant-fixed-sidemenu' : null ]"
-    width="180px"
     :collapsible="collapsible"
     v-model="collapsed"
     :trigger="null">

+ 2 - 2
src/components/global.less

@@ -177,7 +177,7 @@ body {
       transition: width 0.2s;
 
       &.ant-header-side-opened {
-        width: calc(100% - 160px);
+        width: calc(100% - 180px);
       }
 
       &.ant-header-side-closed {
@@ -195,7 +195,7 @@ body {
       right:0;
       margin: auto;
       &.ant-header-side-opened {
-        width: calc(100% - 160px);
+        width: calc(100% - 180px);
       }
       
       &.ant-header-side-closed {

+ 20 - 0
src/components/index.less

@@ -409,6 +409,26 @@
     }
   }
 }
+// modal弹窗查询样式
+.edit-search-modal{
+  .table-page-search-wrapper{
+    margin-bottom: 6px;
+    .ant-form.ant-form-inline .ant-form-item .ant-input, .ant-form.ant-form-inline .ant-form-item .ant-select-selection{
+      border:0;
+      box-shadow: none !important;
+    }
+    .ant-form.ant-form-inline .ant-form-item{
+      border:1px solid #dadada;
+      border-radius: 3px;
+      overflow: hidden;
+      margin-bottom: 10px!important;
+      .ant-form-item-label{
+        padding-left: 11px;
+        padding-right: 0!important;
+      }
+    }
+  }
+}
 // 确认框居中
 .confirm-center{
   .ant-modal-confirm-body > .anticon + .ant-modal-confirm-title + .ant-modal-confirm-content{

+ 414 - 390
src/config/router.config.js

@@ -6,7 +6,7 @@ import {
   BlankLayout,
   PageView
 } from '@/layouts'
-
+// 菜单模块
 export const asyncRouterMap = [
   {
     path: '/',
@@ -419,13 +419,13 @@ export const asyncRouterMap = [
           }
         ]
       },
-      // 数字货架
+      // 修配易码通-数字货架
       {
         path: '/numsGoodsShelves',
-        redirect: '/numsGoodsShelves/shelfSet',
+        redirect: '/numsGoodsShelves/approveStore',
         component: PageView,
         meta: {
-          title: '数字货架',
+          title: '修配易码通-数字货架',
           icon: 'hdd',
           permission: 'M_numsGoodsShelves'
         },
@@ -474,7 +474,7 @@ export const asyncRouterMap = [
             meta: {
               title: '货架设置',
               icon: 'monitor',
-              permission: 'M_shelfSet'
+              permission: 'M_shelfSetList'
             },
             hideChildrenInMenu: true,
             children: [
@@ -485,8 +485,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '货架设置列表',
                   icon: 'monitor',
-                  hidden: true
-                  // permission: 'M_salesQueryList'
+                  hidden: true,
+                  permission: 'M_shelfSetList'
                 }
               },
               {
@@ -591,8 +591,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '货架订单列表',
                   icon: 'monitor',
-                  hidden: true
-                  // permission: 'M_shelfOrderList'
+                  hidden: true,
+                  permission: 'M_shelfOrderList'
                 }
               },
               {
@@ -602,8 +602,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '货架订单详情',
                   icon: 'monitor',
-                  hidden: true
-                  // permission: 'M_shelfOrderDetail'
+                  hidden: true,
+                  permission: 'M_shelfOrderDetail'
                 }
               }
             ]
@@ -627,8 +627,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '补货管理列表',
                   icon: 'monitor',
-                  hidden: true
-                  // permission: 'M_salesQueryList'
+                  hidden: true,
+                  permission: 'M_salesQueryList'
                 }
               }
             ]
@@ -652,8 +652,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '调回管理列表',
                   icon: 'monitor',
-                  hidden: true
-                  // permission: 'M_salesQueryList'
+                  hidden: true,
+                  permission: 'M_salesQueryList'
                 }
               }
             ]
@@ -677,8 +677,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '结算管理列表',
                   icon: 'monitor',
-                  hidden: true
-                  // permission: 'M_salesQueryList'
+                  hidden: true,
+                  permission: 'M_salesQueryList'
                 }
               },
               {
@@ -689,8 +689,8 @@ export const asyncRouterMap = [
                   title: '待结算明细',
                   icon: 'monitor',
                   hidden: true,
-                  replaceTab: true
-                  // permission: 'M_salesQueryList'
+                  replaceTab: true,
+                  permission: 'M_salesQueryList'
                 }
               },
               {
@@ -701,95 +701,8 @@ export const asyncRouterMap = [
                   title: '结算历史',
                   icon: 'monitor',
                   hidden: true,
-                  replaceTab: true
-                  // permission: 'M_salesQueryList'
-                }
-              }
-            ]
-          },
-          {
-            path: '/numsGoodsShelves/onlinePayInvoice',
-            redirect: '/numsGoodsShelves/onlinePayInvoice/list',
-            name: 'onlinePayInvoice',
-            component: BlankLayout,
-            meta: {
-              title: '线上支付账单',
-              icon: 'monitor',
-              permission: 'M_onlinePayInvoiceList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'onlinePayInvoiceList',
-                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/onlinePayInvoice/list.vue'),
-                meta: {
-                  title: '线上支付账单',
-                  icon: 'monitor',
-                  hidden: true,
-                  permission: 'M_onlinePayInvoiceList'
-                }
-              },
-              {
-                path: 'detail/:sn/:shelfSn/:shelfName',
-                name: 'onlinePayInvoiceDetail',
-                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/onlinePayInvoice/detail.vue'),
-                meta: {
-                  title: '线上支付明细',
-                  icon: 'monitor',
-                  hidden: true,
                   replaceTab: true,
-                  permission: 'M_onlinePayInvoiceDetail'
-                }
-              }
-            ]
-          },
-          {
-            path: '/numsGoodsShelves/withdrawalManagement',
-            redirect: '/numsGoodsShelves/withdrawalManagement/list',
-            name: 'ngsWithdrawalManagement',
-            component: BlankLayout,
-            meta: {
-              title: '提现管理',
-              icon: 'monitor',
-              permission: 'M_NGS_withdrawalManagement'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'ngsWithdrawalManagementList',
-                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/withdrawalManagement/list.vue'),
-                meta: {
-                  title: '提现管理列表',
-                  icon: 'monitor',
-                  hidden: true
-                  // permission: 'M_ngsWithdrawalManagementList'
-                }
-              }
-            ]
-          },
-          {
-            path: '/numsGoodsShelves/withdrawalManagementNew',
-            redirect: '/numsGoodsShelves/withdrawalManagementNew/list',
-            name: 'withdrawalManagementNew',
-            component: BlankLayout,
-            meta: {
-              title: '提现管理',
-              icon: 'monitor',
-              permission: 'M_withdrawalManagementNewList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'withdrawalManagementNewList',
-                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/withdrawalManagementNew/list.vue'),
-                meta: {
-                  title: '提现管理列表',
-                  icon: 'monitor',
-                  hidden: true,
-                  permission: 'M_withdrawalManagementNewList'
+                  permission: 'M_salesQueryList'
                 }
               }
             ]
@@ -878,31 +791,6 @@ export const asyncRouterMap = [
                 }
               }
             ]
-          },
-          {
-            path: '/numsGoodsShelves/easyPassShopping',
-            redirect: '/numsGoodsShelves/easyPassShopping/index',
-            name: 'easyPassShopping',
-            component: BlankLayout,
-            meta: {
-              title: '商城产品',
-              icon: 'monitor',
-              permission: 'M_easyPassShopping'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'index',
-                name: 'easyPassShoppingIndex',
-                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/easyPassShopping/index.vue'),
-                meta: {
-                  title: '商城产品列表',
-                  icon: 'monitor',
-                  hidden: true,
-                  permission: 'M_easyPassShoppingList'
-                }
-              }
-            ]
           }
           // {
           //   path: '/numsGoodsShelves/accountManagement',
@@ -930,6 +818,267 @@ export const asyncRouterMap = [
           // }
         ]
       },
+      // 修配易码通-商城
+      {
+        path: '/yimatongMall',
+        redirect: '/numsGoodsShelves/withdrawalManagementNew',
+        component: PageView,
+        meta: {
+          title: '修配易码通-商城',
+          icon: 'hdd',
+          permission: 'M_yimatongMall'
+        },
+        children: [
+          {
+            path: '/numsGoodsShelves/withdrawalManagementNew',
+            redirect: '/numsGoodsShelves/withdrawalManagementNew/list',
+            name: 'withdrawalManagementNew',
+            component: BlankLayout,
+            meta: {
+              title: '提现管理',
+              icon: 'monitor',
+              permission: 'M_withdrawalManagementNewList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'withdrawalManagementNewList',
+                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/withdrawalManagementNew/list.vue'),
+                meta: {
+                  title: '提现管理列表',
+                  icon: 'monitor',
+                  hidden: true,
+                  permission: 'M_withdrawalManagementNewList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/promotionManagement/couponDetails',
+            redirect: '/promotionManagement/couponDetails/list',
+            name: 'couponDetails',
+            component: BlankLayout,
+            meta: {
+              title: '优惠券核销',
+              icon: 'contacts',
+              permission: 'M_couponDetailsList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'couponDetailsList',
+                component: () => import(/* webpackChunkName: "promotionManagement" */ '@/views/promotionManagement/couponDetails/list.vue'),
+                meta: {
+                  title: '优惠券核销',
+                  icon: 'contacts',
+                  hidden: true,
+                  permission: 'M_couponDetailsList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/numsGoodsShelves/customerAccount',
+            redirect: '/numsGoodsShelves/customerAccount/list',
+            name: 'customerAccount',
+            component: BlankLayout,
+            meta: {
+              title: '客户账户',
+              icon: 'monitor',
+              permission: 'M_customerAccountList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'customerAccountList',
+                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/customerAccount/list.vue'),
+                meta: {
+                  title: '客户账户列表',
+                  icon: 'monitor',
+                  hidden: true,
+                  permission: 'M_customerAccountList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/numsGoodsShelves/onlinePayInvoice',
+            redirect: '/numsGoodsShelves/onlinePayInvoice/list',
+            name: 'onlinePayInvoice',
+            component: BlankLayout,
+            meta: {
+              title: '线上支付账单',
+              icon: 'monitor',
+              permission: 'M_onlinePayInvoiceList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'onlinePayInvoiceList',
+                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/onlinePayInvoice/list.vue'),
+                meta: {
+                  title: '线上支付账单',
+                  icon: 'monitor',
+                  hidden: true,
+                  permission: 'M_onlinePayInvoiceList'
+                }
+              },
+              {
+                path: 'detail/:sn/:shelfSn/:shelfName',
+                name: 'onlinePayInvoiceDetail',
+                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/onlinePayInvoice/detail.vue'),
+                meta: {
+                  title: '线上支付明细',
+                  icon: 'monitor',
+                  hidden: true,
+                  replaceTab: true,
+                  permission: 'M_onlinePayInvoiceDetail'
+                }
+              }
+            ]
+          },
+          {
+            path: '/promotionManagement/subsidizedProducts',
+            redirect: '/promotionManagement/subsidizedProducts/list',
+            name: 'subsidizedProducts',
+            component: BlankLayout,
+            meta: {
+              title: '抵扣产品',
+              icon: 'contacts',
+              permission: 'M_subsidizedProductsList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'subsidizedProductsList',
+                component: () => import(/* webpackChunkName: "promotionManagement" */ '@/views/promotionManagement/subsidizedProducts/list.vue'),
+                meta: {
+                  title: '抵扣产品列表',
+                  icon: 'contacts',
+                  hidden: true,
+                  permission: 'M_subsidizedProductsList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/promotionManagement/rechargeSettings',
+            redirect: '/promotionManagement/rechargeSettings/list',
+            name: 'rechargeSettings',
+            component: BlankLayout,
+            meta: {
+              title: '充值设置',
+              icon: 'contacts',
+              permission: 'M_rechargeSettingsList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'rechargeSettingsList',
+                component: () => import(/* webpackChunkName: "promotionManagement" */ '@/views/promotionManagement/rechargeSettings/list.vue'),
+                meta: {
+                  title: '充值设置',
+                  icon: 'contacts',
+                  hidden: true,
+                  permission: 'M_rechargeSettingsList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/numsGoodsShelves/easyPassShopping',
+            redirect: '/numsGoodsShelves/easyPassShopping/index',
+            name: 'easyPassShopping',
+            component: BlankLayout,
+            meta: {
+              title: '商城产品',
+              icon: 'monitor',
+              permission: 'M_easyPassShoppingList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'index',
+                name: 'easyPassShoppingIndex',
+                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/easyPassShopping/index.vue'),
+                meta: {
+                  title: '商城产品列表',
+                  icon: 'monitor',
+                  hidden: true,
+                  permission: 'M_easyPassShoppingList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/promotionManagement/promotionInfo',
+            redirect: '/promotionManagement/promotionInfo/list',
+            name: 'promotionInfo',
+            component: BlankLayout,
+            meta: {
+              title: '促销活动',
+              icon: 'contacts',
+              permission: 'M_promotionInfoList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'promotionInfoList',
+                component: () => import(/* webpackChunkName: "promotionManagement" */ '@/views/promotionManagement/promotionInfo/list.vue'),
+                meta: {
+                  title: '促销活动列表',
+                  icon: 'contacts',
+                  hidden: true,
+                  permission: 'M_promotionInfoList'
+                }
+              },
+              {
+                path: 'edit/:sn/:pageType',
+                name: 'promotionInfoEdit',
+                component: () => import(/* webpackChunkName: "promotionManagement" */ '@/views/promotionManagement/promotionInfo/edit.vue'),
+                meta: {
+                  title: '编辑促销',
+                  icon: 'contacts',
+                  hidden: true,
+                  permission: 'M_promotionInfoEdit'
+                }
+              }
+            ]
+          },
+          {
+            path: '/promotionManagement/promotionalProducts',
+            redirect: '/promotionManagement/promotionalProducts/list',
+            name: 'promotionalProducts',
+            component: BlankLayout,
+            meta: {
+              title: '促销产品',
+              icon: 'contacts',
+              permission: 'M_promotionalProductList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'promotionalProductsList',
+                component: () => import(/* webpackChunkName: "promotionManagement" */ '@/views/promotionManagement/promotionalProducts/list.vue'),
+                meta: {
+                  title: '促销产品列表',
+                  icon: 'contacts',
+                  hidden: true,
+                  permission: 'M_promotionalProductList'
+                }
+              }
+            ]
+          }
+        ]
+      },
       // 采购管理
       {
         path: '/purchasingManagement',
@@ -1227,129 +1376,30 @@ export const asyncRouterMap = [
               {
                 path: 'detail/:sn/:grabFlag',
                 name: 'purchaseReturnOutSyncDetail',
-                component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/purchaseReturnOutSync/detail.vue'),
-                meta: {
-                  title: '采购退货详情',
-                  icon: 'money-collect',
-                  hidden: true,
-                  replaceTab: true,
-                  permission: 'B_purchaseReturn_outSnycDetail'
-                }
-              }
-            ]
-          }
-        ]
-      },
-      // 出库管理
-      {
-        path: '/outboundOrderManagement',
-        redirect: '/outboundOrderManagement/outboundOrder',
-        component: PageView,
-        meta: {
-          title: '出库管理',
-          icon: 'export',
-          permission: 'M_outboundList'
-        },
-        children: [
-          {
-            path: '/outboundOrderManagement/outboundOrder',
-            redirect: '/outboundOrderManagement/outboundOrder/list',
-            name: 'outboundOrder',
-            component: BlankLayout,
-            meta: {
-              title: '出库',
-              icon: 'export',
-              permission: 'M_outboundList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'outboundOrderList',
-                component: () => import(/* webpackChunkName: "outboundOrderManagement" */ '@/views/outboundOrderManagement/outboundOrder/list.vue'),
-                meta: {
-                  title: '出库列表',
-                  icon: 'export',
-                  hidden: true,
-                  permission: 'M_outboundList'
-                }
-              }
-            ]
-          }
-        ]
-      },
-      // 财务管理
-      {
-        path: '/financialManagement',
-        redirect: '/financialManagement/warehousingAudit',
-        component: PageView,
-        meta: {
-          title: '财务管理',
-          icon: 'property-safety',
-          permission: 'M_financial'
-        },
-        children: [
-          {
-            path: '/financialManagement/warehousingAudit',
-            redirect: '/financialManagement/warehousingAudit/list',
-            name: 'warehousingAudit',
-            component: BlankLayout,
-            meta: {
-              title: '入库审核',
-              icon: 'pull-request',
-              permission: 'M_warehousingAuditList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'warehousingAuditList',
-                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/warehousingAudit/list.vue'),
-                meta: {
-                  title: '入库审核列表',
-                  icon: 'pull-request',
-                  hidden: true,
-                  permission: 'M_warehousingAuditList'
-                }
-              },
-              {
-                path: 'detail/:sn',
-                name: 'warehousingAuditDetail',
-                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/warehousingAudit/detail.vue'),
-                meta: {
-                  title: '入库审核详情',
-                  icon: 'pull-request',
-                  hidden: true,
-                  permission: 'M_warehousingAudit_detail'
-                }
-              }
-            ]
-          },
-          {
-            path: '/financialManagement/inventoryCheckAudit',
-            redirect: '/financialManagement/inventoryCheckAudit/list',
-            name: 'inventoryCheckAudit',
-            component: BlankLayout,
-            meta: {
-              title: '盘点审核',
-              icon: 'laptop',
-              permission: 'M_inventoryCheckAuditList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'inventoryCheckAuditList',
-                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/inventoryCheckAudit/list.vue'),
+                component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/purchaseReturnOutSync/detail.vue'),
                 meta: {
-                  title: '盘点审核列表',
-                  icon: 'laptop',
+                  title: '采购退货详情',
+                  icon: 'money-collect',
                   hidden: true,
-                  permission: 'M_inventoryCheckAuditList'
+                  replaceTab: true,
+                  permission: 'B_purchaseReturn_outSnycDetail'
                 }
               }
             ]
-          },
+          }
+        ]
+      },
+      // 财务管理
+      {
+        path: '/financialManagement',
+        redirect: '/financialManagement/warehousingAudit',
+        component: PageView,
+        meta: {
+          title: '财务管理',
+          icon: 'property-safety',
+          permission: 'M_financial'
+        },
+        children: [
           {
             path: '/financialManagement/financialPayment',
             redirect: '/financialManagement/financialPayment/list',
@@ -1911,6 +1961,67 @@ export const asyncRouterMap = [
           permission: 'M_inventory'
         },
         children: [
+          {
+            path: '/financialManagement/warehousingAudit',
+            redirect: '/financialManagement/warehousingAudit/list',
+            name: 'warehousingAudit',
+            component: BlankLayout,
+            meta: {
+              title: '入库审核',
+              icon: 'pull-request',
+              permission: 'M_warehousingAuditList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'warehousingAuditList',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/warehousingAudit/list.vue'),
+                meta: {
+                  title: '入库审核列表',
+                  icon: 'pull-request',
+                  hidden: true,
+                  permission: 'M_warehousingAuditList'
+                }
+              },
+              {
+                path: 'detail/:sn',
+                name: 'warehousingAuditDetail',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/warehousingAudit/detail.vue'),
+                meta: {
+                  title: '入库审核详情',
+                  icon: 'pull-request',
+                  hidden: true,
+                  permission: 'M_warehousingAudit_detail'
+                }
+              }
+            ]
+          },
+          {
+            path: '/outboundOrderManagement/outboundOrder',
+            redirect: '/outboundOrderManagement/outboundOrder/list',
+            name: 'outboundOrder',
+            component: BlankLayout,
+            meta: {
+              title: '出库',
+              icon: 'export',
+              permission: 'M_outboundList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'outboundOrderList',
+                component: () => import(/* webpackChunkName: "outboundOrderManagement" */ '@/views/outboundOrderManagement/outboundOrder/list.vue'),
+                meta: {
+                  title: '出库列表',
+                  icon: 'export',
+                  hidden: true,
+                  permission: 'M_outboundList'
+                }
+              }
+            ]
+          },
           {
             path: '/inventoryManagement/inventoryQuery',
             redirect: '/inventoryManagement/inventoryQuery/list',
@@ -2081,6 +2192,31 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/financialManagement/inventoryCheckAudit',
+            redirect: '/financialManagement/inventoryCheckAudit/list',
+            name: 'inventoryCheckAudit',
+            component: BlankLayout,
+            meta: {
+              title: '盘点审核',
+              icon: 'laptop',
+              permission: 'M_inventoryCheckAuditList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'inventoryCheckAuditList',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/inventoryCheckAudit/list.vue'),
+                meta: {
+                  title: '盘点审核列表',
+                  icon: 'laptop',
+                  hidden: true,
+                  permission: 'M_inventoryCheckAuditList'
+                }
+              }
+            ]
+          },
           {
             path: '/inventoryManagement/inventoryImport',
             redirect: '/inventoryManagement/inventoryImport/list',
@@ -3105,13 +3241,13 @@ export const asyncRouterMap = [
           }
         ]
       },
-      // 客户管理
+      // 客户与供应商
       {
         path: '/customerManagement',
         redirect: '/customerManagement/customerInfo',
         component: PageView,
         meta: {
-          title: '客户管理',
+          title: '客户与供应商',
           icon: 'idcard',
           permission: 'M_customerInfoList'
         },
@@ -3133,7 +3269,7 @@ export const asyncRouterMap = [
                 name: 'customerInfoList',
                 component: () => import(/* webpackChunkName: "customerManagement" */ '@/views/customerManagement/customerInfo/list.vue'),
                 meta: {
-                  title: '客户列表',
+                  title: '客户管理列表',
                   icon: 'idcard',
                   hidden: true,
                   permission: 'M_customerInfoList'
@@ -3187,6 +3323,31 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            path: '/supplierManagement/supplierInfo',
+            redirect: '/supplierManagement/supplierInfo/list',
+            name: 'supplierInfo',
+            component: BlankLayout,
+            meta: {
+              title: '供应商管理',
+              icon: 'contacts',
+              permission: 'M_supplierInfoList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'supplierInfoList',
+                component: () => import(/* webpackChunkName: "productManagement" */ '@/views/supplierManagement/supplierInfo/list.vue'),
+                meta: {
+                  title: '供应商列表',
+                  icon: 'contacts',
+                  hidden: true,
+                  permission: 'M_supplierInfoList'
+                }
+              }
+            ]
           }
         ]
       },
@@ -3437,143 +3598,6 @@ export const asyncRouterMap = [
           }
         ]
       },
-      //  供应商管理
-      {
-        path: '/supplierManagement',
-        redirect: '/supplierManagement/supplierInfo',
-        component: PageView,
-        meta: {
-          title: '供应商管理',
-          icon: 'contacts',
-          permission: 'M_supplierInfoList'
-        },
-        children: [
-          {
-            path: '/supplierManagement/supplierInfo',
-            redirect: '/supplierManagement/supplierInfo/list',
-            name: 'supplierInfo',
-            component: BlankLayout,
-            meta: {
-              title: '供应商管理',
-              icon: 'contacts',
-              permission: 'M_supplierInfoList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'supplierInfoList',
-                component: () => import(/* webpackChunkName: "productManagement" */ '@/views/supplierManagement/supplierInfo/list.vue'),
-                meta: {
-                  title: '供应商列表',
-                  icon: 'contacts',
-                  hidden: true,
-                  permission: 'M_supplierInfoList'
-                }
-              }
-            ]
-          }
-        ]
-      },
-      // 促销管理
-      {
-        path: '/promotionManagement',
-        redirect: '/promotionManagement/promotionInfo',
-        component: PageView,
-        meta: {
-          title: '促销管理',
-          icon: 'contacts',
-          permission: 'M_promotionInfo'
-        },
-        children: [
-          {
-            path: '/promotionManagement/promotionInfo',
-            redirect: '/promotionManagement/promotionInfo/list',
-            name: 'promotionInfo',
-            component: BlankLayout,
-            meta: {
-              title: '促销活动',
-              icon: 'contacts',
-              permission: 'M_promotionInfoList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'promotionInfoList',
-                component: () => import(/* webpackChunkName: "promotionManagement" */ '@/views/promotionManagement/promotionInfo/list.vue'),
-                meta: {
-                  title: '促销活动列表',
-                  icon: 'contacts',
-                  hidden: true,
-                  permission: 'M_promotionInfoList'
-                }
-              },
-              {
-                path: 'edit/:sn/:pageType',
-                name: 'promotionInfoEdit',
-                component: () => import(/* webpackChunkName: "promotionManagement" */ '@/views/promotionManagement/promotionInfo/edit.vue'),
-                meta: {
-                  title: '编辑促销',
-                  icon: 'contacts',
-                  hidden: true,
-                  permission: 'M_promotionInfoEdit'
-                }
-              }
-            ]
-          },
-          {
-            path: '/promotionManagement/promotionalProducts',
-            redirect: '/promotionManagement/promotionalProducts/list',
-            name: 'promotionalProducts',
-            component: BlankLayout,
-            meta: {
-              title: '促销产品',
-              icon: 'contacts',
-              permission: 'M_promotionalProduct'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'promotionalProductsList',
-                component: () => import(/* webpackChunkName: "promotionManagement" */ '@/views/promotionManagement/promotionalProducts/list.vue'),
-                meta: {
-                  title: '促销产品列表',
-                  icon: 'contacts',
-                  hidden: true,
-                  permission: 'M_promotionalProductList'
-                }
-              }
-            ]
-          },
-          {
-            path: '/promotionManagement/couponDetails',
-            redirect: '/promotionManagement/couponDetails/list',
-            name: 'couponDetails',
-            component: BlankLayout,
-            meta: {
-              title: '优惠券详情',
-              icon: 'contacts',
-              permission: 'M_couponDetailsList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'couponDetailsList',
-                component: () => import(/* webpackChunkName: "promotionManagement" */ '@/views/promotionManagement/couponDetails/list.vue'),
-                meta: {
-                  title: '优惠券详情',
-                  icon: 'contacts',
-                  hidden: true,
-                  permission: 'M_couponDetailsList'
-                }
-              }
-            ]
-          }
-        ]
-      },
       // 中心店/配送店管理
       {
         path: '/storeManagement',

+ 1 - 1
src/layouts/BasicLayout.vue

@@ -177,7 +177,7 @@ export default {
         return '0'
       }
       if (this.sidebarOpened) {
-        return '180px'
+        return '200px'
       }
       return '80px'
     },

+ 51 - 41
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -308,8 +308,16 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import { STable, VSelect } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
+import Print from '@/views/common/print.vue'
+import importGuideModal from './importGuideModal.vue'
+import newProduct from '@/views/productManagement/productInfo/edit.vue'
+import { hdPrint } from '@/libs/JGPrint'
+// 接口
 import {
   sparePartsPurDetail,
   sparePartsPurDetailList,
@@ -320,14 +328,8 @@ import {
   sparePartsPurDetailPrint,
   sparePartsPurDeleteAll,
   sparePartsPurDetailInsertBatch } from '@/api/sparePartsPur'
-import { bulkProductList } from '@/api/dealerProduct'
+import { bulkProductList, dealerProductList } from '@/api/dealerProduct'
 import { warehouseCascadeList } from '@/api/warehouse'
-import ProductType from '../../common/productType.js'
-import ProductBrand from '../../common/productBrand.js'
-import Print from '@/views/common/print.vue'
-import importGuideModal from './importGuideModal.vue'
-import newProduct from '@/views/productManagement/productInfo/edit.vue'
-import { hdPrint } from '@/libs/JGPrint'
 export default {
   name: 'BulkWarehousingEdit',
   components: { STable, VSelect, Print, ProductType, ProductBrand, newProduct, importGuideModal },
@@ -464,29 +466,33 @@ export default {
   },
   methods: {
     // 是否新增产品
-    isAddNewProduct (data) {
+    async isAddNewProduct (data) {
       const _this = this
       if (data.length == 0) {
-        _this.$confirm({
-          title: '提示',
-          content: '该产品信息不存在,是否马上新增?',
-          centered: true,
-          onOk () {
-            _this.paramsData = {
-              supplierName: _this.basicInfoData.supplierName,
-              code: _this.queryParam.code,
-              name: _this.queryParam.name,
-              origCode: _this.queryParam.origCode,
-              putCost: 0,
-              putQty: 1,
-              warehouse: []
+        const res = await dealerProductList({ code: _this.queryParam.code, enabledFlag: 0, pageNo: 1, pageSize: 50 })
+        const disableList = res.data.list
+        if (disableList && disableList.length == 0) {
+          _this.$confirm({
+            title: '提示',
+            content: '该产品信息不存在,是否马上新增?',
+            centered: true,
+            onOk () {
+              _this.paramsData = {
+                supplierName: _this.basicInfoData.supplierName,
+                code: _this.queryParam.code,
+                name: _this.queryParam.name,
+                origCode: _this.queryParam.origCode,
+                putCost: 0,
+                putQty: 1,
+                warehouse: []
+              }
+              _this.showNewProduct = true
+              _this.$nextTick(() => {
+                _this.$refs.newProduct.pageInit()
+              })
             }
-            _this.showNewProduct = true
-            _this.$nextTick(() => {
-              _this.$refs.newProduct.pageInit()
-            })
-          }
-        })
+          })
+        }
       } else {
         // 新添加的产品自动添加到已选产品中
         if (data.length == 1 && this.showNewProduct) {
@@ -552,33 +558,37 @@ export default {
     handleAdd (row, isEdit) {
       const _this = this
       if (!isEdit && !(row.putCost || row.putCost == 0)) {
-        this.$message.warning('请输入成本价后再添加!')
+        _this.$message.warning('请输入成本价后再添加!')
         return
       }
       if (!isEdit && !row.putQty) {
-        this.$message.warning('请输入数量后再添加!')
+        _this.$message.warning('请输入数量后再添加!')
         return
       }
       if (!isEdit && !row.warehouseSn) {
-        this.$message.warning('请选择仓库后再添加!')
+        _this.$message.warning('请选择仓库后再添加!')
         return
       }
       if (!isEdit && !row.warehouseLocationSn) {
-        this.$message.warning('请选择仓位后再添加!')
+        _this.$message.warning('请选择仓位后再添加!')
         return
       }
-      if (!isEdit && row.enabledFlag == '0') {
-        _this.$confirm({
-          title: '提示',
-          content: '该产品已禁用,确认继续添加吗?',
-          centered: true,
-          onOk () {
-            _this.saveFormData(row, isEdit)
-          }
-        })
+      if (!isEdit && row.enabledFlag == 0) {
+        _this.$message.warning('产品已禁用,不能添加!')
         return
       }
-      this.saveFormData(row, isEdit)
+      // if (!isEdit && row.enabledFlag == '0') {
+      //   _this.$confirm({
+      //     title: '提示',
+      //     content: '该产品已禁用,确认继续添加吗?',
+      //     centered: true,
+      //     onOk () {
+      //       _this.saveFormData(row, isEdit)
+      //     }
+      //   })
+      //   return
+      // }
+      _this.saveFormData(row, isEdit)
     },
     // 保存
     saveFormData (row, isEdit) {

+ 83 - 0
src/views/common/mallCategory.js

@@ -0,0 +1,83 @@
+import { queryExtList } from '@/api/shopProduct'
+const mallCategory = {
+  template: `
+      <a-cascader
+        @change="handleChange"
+        change-on-select 
+        :changeOnSelect="true"
+        :value="defaultVal"
+        expand-trigger="hover"
+        :options="categoryOptions"
+        :fieldNames="{ label: 'categoryName', value: 'categorySn', children: 'shopCategoryList' }"
+        :id="id"
+        placeholder="请选择商城类目"
+        allowClear />
+    `,
+  props: {
+    value: {
+      type: Array,
+      default: function () {
+        return []
+      }
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    level: {
+      type: Number,
+      default: 3
+    }
+  },
+  data () {
+    return {
+      defaultVal: this.value,
+      categoryOptions: []
+    }
+  },
+  watch: {
+    value (newValue, oldValue) {
+      this.defaultVal = newValue
+    }
+  },
+  mounted () {
+    this.getCategoryList()
+  },
+  methods: {
+    // change时间
+    handleChange (value) {
+      this.defaultVal = value
+      this.$emit('change', this.defaultVal)
+    },
+    // 格式化数据
+    formatData (data) {
+      if (this.level == 1) {
+        data.forEach(item => {
+          if (item.shopProductList) item.shopProductList = []
+        })
+      }
+      if (this.level == 2) {
+        data.forEach(item => {
+          if (item.shopProductList) {
+            item.shopProductList.forEach(child => {
+              if (child.shopProductList) child.shopProductList = []
+            })
+          }
+        })
+      }
+      return data
+    },
+    // 获取产品类目列表
+    getCategoryList () {
+      queryExtList({}).then(res => {
+        if (res.status == 200) {
+          this.categoryOptions = this.formatData(res.data)
+        } else {
+          this.categoryOptions = []
+        }
+      })
+    }
+  }
+}
+
+export default mallCategory

+ 19 - 21
src/views/common/productType.js

@@ -32,7 +32,7 @@ const ProductType = {
       type: String,
       default: ''
     },
-    level:{
+    level: {
       type: Number,
       default: 3
     }
@@ -47,7 +47,7 @@ const ProductType = {
     value (newValue, oldValue) {
       this.defaultVal = newValue
     },
-    tenantId(newValue, oldValue){
+    tenantId (newValue, oldValue) {
       console.log(newValue)
     }
   },
@@ -60,42 +60,41 @@ const ProductType = {
       this.$emit('change', this.defaultVal)
     },
     // 格式化数据
-    formatData(data){
-      if(this.level == 1){
-         data.forEach(item => {
-           if(item.children) item.children = []
-         })
+    formatData (data) {
+      if (this.level == 1) {
+        data.forEach(item => {
+          if (item.children) item.children = []
+        })
       }
-      if(this.level == 2){
-         data.forEach(item => {
-           if(item.children) {
-             item.children.forEach(child => {
-                if(child.children) child.children = []
-             })
-           }
-         })
+      if (this.level == 2) {
+        data.forEach(item => {
+          if (item.children) {
+            item.children.forEach(child => {
+              if (child.children) child.children = []
+            })
+          }
+        })
       }
       return data
     },
     //  产品分类列表 sysFlag: 1 箭冠 0 自建
     getProductType () {
       const params = {}
-      if(this.tenantId!="NONE"){
+      if (this.tenantId != 'NONE') {
         params.tenantId = this.tenantId
       }
-      if(this.tenantId=="NONE"){
+      if (this.tenantId == 'NONE') {
         params.sysFlag = '1'
       }
-      if(this.isDealer){
+      if (this.isDealer) {
         dealerProductTypeList(params).then(res => {
           if (res.status == 200) {
             this.productTypeList = this.formatData(res.data)
-            console.log(this.formatData(res.data))
           } else {
             this.productTypeList = []
           }
         })
-      }else{
+      } else {
         productTypeQuery(params).then(res => {
           if (res.status == 200) {
             this.productTypeList = this.formatData(res.data)
@@ -104,7 +103,6 @@ const ProductType = {
           }
         })
       }
-      
     }
   }
 }

+ 1 - 1
src/views/financialManagement/financialCollection/detailModal.vue

@@ -20,7 +20,7 @@
         <a-descriptions-item label="收款方式">{{ detailsData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
         <a-descriptions-item label="收款时间">{{ detailsData.settleTime || '--' }}</a-descriptions-item>
         <a-descriptions-item label="审核时间">{{ detailsData.auditTime || '--' }}</a-descriptions-item>
-        <template v-if="detailsData.refundType&&detailsData.refundType=='WECHAT_PAY'">
+        <template v-if="detailsData.refundType&&(detailsData.refundType=='WECHAT_PAY'||detailsData.refundType=='RECHARGE_BALANCE')">
           <a-descriptions-item label="退款金额">{{ detailsData.refundAmount || '--' }}</a-descriptions-item>
           <a-descriptions-item label="退款时间">{{ detailsData.refundData || '--' }}</a-descriptions-item>
           <a-descriptions-item label="退款方式">{{ detailsData.refundTypeDictValue || '--' }}{{ detailsData.refundTypeDictValue?'(1-3个工作日到账)':'' }}</a-descriptions-item>

+ 182 - 0
src/views/numsGoodsShelves/customerAccount/clearRecordModal.vue

@@ -0,0 +1,182 @@
+<template>
+  <a-modal
+    centered
+    class="clearRecord-modal edit-search-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="'清零记录'+ titName"
+    v-model="isShow"
+    @cancel="isShow = false"
+    width="55%">
+    <div ckass="jg-drawer-wrap">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 搜索条件 -->
+        <div ref="searchBox" class="table-page-search-wrapper">
+          <a-form
+            ref="ruleForm"
+            layout="inline"
+            :model="queryParam"
+            id="clearRecord-form"
+            @keyup.enter.native="$refs.table.refresh(true)" >
+            <a-row :gutter="5">
+              <a-col :md="10" :sm="24">
+                <a-form-item label="清零时间">
+                  <rangeDate id="clearRecord-time" ref="rangeDate" :value="time" @change="dateChange" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="8" :sm="24">
+                <a-form-item label="清零对象">
+                  <v-select
+                    v-model="queryParam.accountType"
+                    id="clearRecord-accountType"
+                    code="STORE_ACCOUNT_TYPE"
+                    placeholder="请选择清零对象"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24" style="margin-bottom: 10px">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="clearRecord-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="clearRecord-reset">重置</a-button>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: 300 }"
+          :defaultLoadData="false"
+          bordered>
+        </s-table>
+        <div class="btn-cont">
+          <a-button id="clearRecord-modal-close" @click="isShow = false">关闭</a-button>
+        </div>
+      </a-spin>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 组件
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+// 接口
+import { storeAccountDetailList } from '@/api/storeAccount' // 接口api
+export default {
+  name: 'ClearRecordModal',
+  components: { STable, VSelect, rangeDate },
+  mixins: [commonMixin],
+  props: {
+    openModal: {
+      //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    const _this = this
+    return {
+      spinning: false,
+      disabled: false, // 查询、重置按钮是否可操作
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {// label 样式设置
+        labelCol: { span: 3 },
+        wrapperCol: { span: 20 }
+      },
+      titName: null, // 弹窗标题
+      time: [], // 清零时间
+      rowInfo: null, // 回显行数据
+      // 查询条件
+      queryParam: {
+        beginDate: undefined, // 清零开始时间
+        endDate: undefined, // 清零结束时间
+        accountType: undefined // 清零对象
+      },
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
+        { title: '清零时间', dataIndex: 'createDate', width: '23%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '金额(¥)', dataIndex: 'tradeAmount', width: '23%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '清零对象', dataIndex: 'accountTypeDictValue', width: '23%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作人', dataIndex: 'operatorName', width: '23%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        const params = Object.assign(parameter, this.queryParam)
+        params.storeAccountSn = this.rowInfo.storeAccountSn
+        params.storeSn = this.rowInfo.storeSn
+        params.shelfSn = this.rowInfo.shelfSn
+        params.bizType = 'ZERO'
+        this.disabled = true
+        this.spinning = true
+        return storeAccountDetailList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    //  清零时间  change
+    dateChange (date) {
+      this.time = date
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    // 初始化加载标题和表格内容
+    pageInit (record) {
+      this.titName = '(' + record.customerName + ')' || ''
+      this.rowInfo = record
+      this.$nextTick(() => {
+        this.resetSearchForm()
+      })
+    },
+    resetSearchForm () {
+      this.time = []
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.beginDate = undefined
+      this.queryParam.endDate = undefined
+      this.queryParam.accountType = undefined
+      this.$refs.table.refresh(true)
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+.clearRecord-modal {
+	.ant-modal-body {
+		padding: 20px 40px 24px;
+	}
+	.btn-cont {
+		text-align: center;
+		margin: 35px 0 10px;
+	}
+}
+</style>

+ 288 - 0
src/views/numsGoodsShelves/customerAccount/list.vue

@@ -0,0 +1,288 @@
+<template>
+  <a-card size="small" :bordered="false" class="storeAccount-wrap jg-page-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="货架名称">
+                <shelfSList v-model="queryParam.shelfSn" id="storeAccount-shelfName"></shelfSList>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="关联客户">
+                <custList ref="custList" id="storeAccount-custList" @change="custChange" :isEnabled="true"></custList>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeAccount-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="storeAccount-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 统计 -->
+      <div class="table-operator" style="margin-bottom:10px;">
+        <div class="alert-message">
+          总充值:<strong>{{ totalData&&(totalData.totalRecharge || totalData.totalRecharge==0) ? toThousands(totalData.totalRecharge) : '--' }}</strong>;
+          已用充值:<strong>{{ totalData&&(totalData.usedRecharge || totalData.usedRecharge==0) ? toThousands(totalData.usedRecharge) : '--' }}</strong>;
+          充值余额:<strong>{{ totalData&&(totalData.rechargeBalance || totalData.rechargeBalance==0) ? toThousands(totalData.rechargeBalance) : '--' }}</strong>;
+          总抵扣:<strong>{{ totalData&&(totalData.totalGive || totalData.totalGive==0) ? toThousands(totalData.totalGive) : '--' }}</strong>;
+          已用抵扣:<strong>{{ totalData&&(totalData.usedDeduction || totalData.usedDeduction==0) ? toThousands(totalData.usedDeduction) : '--' }}</strong>;
+          抵扣余额:<strong>{{ totalData&&(totalData.giveBalance || totalData.giveBalance==0) ? toThousands(totalData.giveBalance) : '--' }}</strong>;
+        </div>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 充值余额 -->
+        <template slot="rechargeBalance" slot-scope="text, record">
+          <span class="table-td-link" :id="'storeAccount-recharge'+record.id" v-if="$hasPermissions('B_clearRecord')" @click="handleFlow(record,'1')">{{ (record.rechargeBalance||record.rechargeBalance==0)?toThousands(record.rechargeBalance):'--' }}</span>
+          <span v-else>{{ (record.rechargeBalance||record.rechargeBalance==0)?toThousands(record.rechargeBalance):'--' }}</span>
+        </template>
+        <!-- 抵扣余额 -->
+        <template slot="giveBalance" slot-scope="text, record">
+          <span class="table-td-link" :id="'storeAccount-give'+record.id" v-if="$hasPermissions('B_clearRecord')" @click="handleFlow(record,'2')">{{ (record.giveBalance||record.giveBalance==0)?toThousands(record.giveBalance):'--' }}</span>
+          <span v-else>{{ (record.giveBalance||record.giveBalance==0)?toThousands(record.giveBalance):'--' }}</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            :id="'storeAccount-clearRecord'+record.id"
+            v-if="$hasPermissions('B_clearRecord')"
+            size="small"
+            type="link"
+            class="button-primary"
+            @click="handleClearRecord(record)">清零记录</a-button>
+          <a-button
+            :id="'storeAccount-ZeroClear-'+record.id"
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_zeroClear')"
+            class="button-error"
+            @click="handleZeroClear(record)">清零</a-button>
+          <span v-if="!$hasPermissions('B_clearRecord')&&!$hasPermissions('B_zeroClear')">--</span>
+        </template>
+      </s-table>
+    </a-spin>
+    <!-- 交易流水 -->
+    <transaction-flow-modal :modalType="modalType" :itemInfo="itemInfo" :openModal="openFlowModal" @close="openFlowModal=false"></transaction-flow-modal>
+    <!-- 清零 -->
+    <zero-clearing-modal ref="zeroClearModal" :openModal="openZeroClearModal" @ok="$refs.table.refresh(true)" @close="openZeroClearModal=false"></zero-clearing-modal>
+    <!-- 清零记录 -->
+    <clear-record-modal ref="clearRecordModal" :openModal="openClearRecordModal" @close="openClearRecordModal=false"></clear-record-modal>
+  </a-card>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 组件
+import { STable } from '@/components'
+import custList from '@/views/common/custList.vue' // 客户列表组件
+import shelfSList from '@/views/common/shelfList' // 货架列表组件
+import transactionFlowModal from './transactionFlowModal.vue' // 交易流水弹框
+import zeroClearingModal from './zeroClearingModal.vue' // 清零弹框
+import clearRecordModal from './clearRecordModal.vue' // 清零记录弹框
+// 接口
+import { storeAccountList, storeAccountCount } from '@/api/storeAccount' // 接口api
+
+export default {
+  components: { STable, custList, shelfSList, transactionFlowModal, zeroClearingModal, clearRecordModal },
+  mixins: [commonMixin],
+  data () {
+    const _this = this
+    return {
+      spinning: false, // loading
+      tableHeight: 0, // 表格高度
+      disabled: false, //  查询、重置按钮是否可操作
+      queryParam: {
+        shelfSn: undefined, // 货架sn
+        customerSn: undefined, // 关联客户sn
+        customerName: undefined// 关联客户名称
+      },
+      time: [],
+      modalType: '1',
+      openFlowModal: false, // 打开 交易流水弹窗
+      openZeroClearModal: false, // 打开 清零弹窗
+      openClearRecordModal: false, // 打开 清零记录弹窗
+      totalData: null, // 统计数据
+      itemInfo: null, // 当前行数据
+      // 列定义
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '货架名称', dataIndex: 'shelfName', width: '23%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '关联客户', dataIndex: 'customerName', width: '23%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总充值', dataIndex: 'totalRecharge', width: '12%', align: 'right', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text, 2) : '--' } },
+        { title: '总抵扣', dataIndex: 'totalGive', width: '12%', align: 'right', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text, 2) : '--' } },
+        { title: '充值余额', dataIndex: 'rechargeBalance', width: '12%', align: 'right', scopedSlots: { customRender: 'rechargeBalance' } },
+        { title: '抵扣余额', dataIndex: 'giveBalance', width: '12%', align: 'right', scopedSlots: { customRender: 'giveBalance' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '16%', align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        return storeAccountList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.getCount(params)
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    // 统计
+    getCount (val) {
+      storeAccountCount(val).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    // 交易流水  1 充值余额  2抵扣余额
+    handleFlow (row, type) {
+      this.modalType = type
+      this.itemInfo = row
+      this.openFlowModal = true
+    },
+    // 打开清零记录弹窗
+    handleClearRecord (row) {
+      this.$refs.clearRecordModal.pageInit(row)
+      this.openClearRecordModal = true
+    },
+    // 打开清零弹窗
+    handleZeroClear (record) {
+      this.$refs.zeroClearModal.pageInit(record)
+      this.$nextTick(() => {
+        this.openZeroClearModal = true
+      })
+    },
+    // 选择关联客户
+    custChange (obj, row) {
+      if (row) {
+        this.queryParam.customerSn = row && row.customerSn || undefined
+        this.queryParam.customerName = undefined
+      } else {
+        this.queryParam.customerName = obj || undefined
+        this.queryParam.customerSn = undefined
+      }
+    },
+    // 是否设置完成更改
+    changeStatus (record) {
+      const params = {
+        shelfSn: record.shelfSn,
+        finishFlag: record.finishFlag == 1 ? '0' : '1'
+      }
+      this.spinning = true
+      modifFinishFlag(params).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.$refs.table.refresh()
+          this.spinning = false
+        } else {
+          this.spinning = false
+        }
+      })
+    },
+    // 启用禁用
+    enableShelf (record) {
+      const params = {
+        shelfSn: record.shelfSn,
+        state: record.state == 'ENABLE' ? 'DISABLED' : 'ENABLE'
+      }
+      const _this = this
+      _this.$confirm({
+        title: '提示',
+        content: <div style="text-align:center;">是否{(record.state == 'ENABLE' ? '停用' : '启用') + record.shelfName}</div>,
+        centered: true,
+        closable: true,
+        class: 'confirm-center',
+        onOk () {
+          _this.updateState(params)
+        }
+      })
+    },
+
+    // 更改货架状态
+    updateState (params) {
+      this.spinning = true
+      shelfModifState(params).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.$refs.table.refresh()
+          this.spinning = false
+        } else {
+          this.spinning = false
+        }
+        this.showTip = false
+      })
+    },
+    // 重置列表查询
+    resetSearchForm () {
+      this.queryParam.shelfSn = undefined
+      this.queryParam.customerSn = undefined
+      this.queryParam.customerName = undefined
+      this.$refs.custList.resetForm()
+      this.$refs.table.refresh(true)
+    },
+    // 计算表格高度
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 240
+    },
+    // 初始化页面
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  }
+}
+</script>

+ 219 - 0
src/views/numsGoodsShelves/customerAccount/transactionFlowModal.vue

@@ -0,0 +1,219 @@
+<template>
+  <a-drawer
+    :title="'交易流水('+(itemInfo.customerName ||'--')+(modalType==1?':充值金额':':抵扣金额')+')'"
+    placement="right"
+    :visible="isShow"
+    width="80%"
+    id="transaction-flow-modal"
+    :get-container="false"
+    :wrap-style="{ position: 'absolute' }"
+    @close="isShow = false"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="searchBox" class="table-page-search-wrapper">
+        <a-form-model
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :model="queryParam"
+          @keyup.enter.native="$refs.table.refresh(true)"
+          id="transactionFlow-form">
+          <a-row :gutter="5" type="flex" justify="center" align="center">
+            <a-col :md="8" :sm="24">
+              <a-form-model-item label="交易时间">
+                <rangeDate id="transactionFlow-time" ref="rangeDate" :value="time" @change="dateChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="关联单号">
+                <a-input id="transactionFlow-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单号"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="交易类型">
+                <v-select
+                  v-model="queryParam.bizType"
+                  id="transactionFlow-bizType"
+                  code="STORE_ACCOUNT_BIZ_TYPE"
+                  placeholder="请选择交易类型"
+                  allowClear></v-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col flex="auto" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" id="transactionFlow-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" id="transactionFlow-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+      <!-- 统计 -->
+      <div class="table-operator" style="margin-bottom: 10px;">
+        <div class="alert-message">
+          充值金额:<strong>{{ totalData&&(totalData.rechargeAmount || totalData.rechargeAmount==0) ?toThousands(Math.abs(totalData.rechargeAmount)) : '--' }}</strong>;
+          销售金额:<strong>{{ totalData&&(totalData.salesAmount || totalData.salesAmount==0) ? toThousands(Math.abs(totalData.salesAmount)) : '--' }}</strong>;
+          退款金额:<strong>{{ totalData&&(totalData.refundAmount || totalData.refundAmount==0) ? toThousands(Math.abs(totalData.refundAmount)) : '--' }}</strong>;
+          清零金额:<strong>{{ totalData&&(totalData.zeroAmount || totalData.zeroAmount==0) ? toThousands(Math.abs(totalData.zeroAmount)) : '--' }}</strong>;
+        </div>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+      </s-table>
+    </a-spin>
+  </a-drawer>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+// 组件
+import productType from '@/views/common/productType.js'
+import productBrand from '@/views/common/productBrand.js'
+import rangeDate from '@/views/common/rangeDate.vue'
+// 接口
+import { storeAccountDetailList, storeAccountDetailCount } from '@/api/storeAccount' // 接口api
+export default {
+  name: 'TransactionFlowModal',
+  components: { STable, VSelect, productType, productBrand, rangeDate },
+  mixins: [commonMixin],
+  props: {
+    openModal: {
+      //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    modalType: { // 1是充值交易流水  2是抵扣交易流水
+      type: String,
+      default: '1'
+    },
+    itemInfo: {// 当前行回显数据
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    const _this = this
+    return {
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      tableHeight: 0, // 表格高度
+      totalData: null, // 统计数据
+      time: [], // 交易时间
+      // 查询条件
+      queryParam: {
+        beginDate: undefined, // 交易开始时间
+        endDate: undefined, // 交易结束时间
+        bizNo: '', // 关联单号
+        bizType: undefined // 交易类型
+      },
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '交易时间', dataIndex: 'tradeDate', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单号', dataIndex: 'bizNo', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '金额(¥)', dataIndex: 'tradeAmount', width: '24%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '交易类型', dataIndex: 'bizTypeDictValue', width: '24%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        const params = Object.assign(parameter, this.queryParam)
+        params.storeAccountSn = this.itemInfo.storeAccountSn
+        params.storeSn = this.itemInfo.storeSn
+        params.shelfSn = this.itemInfo.shelfSn
+        params.accountType = this.modalType == 1 ? 'RECHARGE' : 'GIVE'
+        this.disabled = true
+        this.spinning = true
+        return storeAccountDetailList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+             for (var i = 0; i < data.list.length; i++) {
+               data.list[i].no = no + i + 1
+             }
+            this.getCount(params)
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    //  交易时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    // 统计
+    getCount (ajaxData) {
+      storeAccountDetailCount(ajaxData).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data || []
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    // 充值
+    resetSearchForm () {
+      this.time = []
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.beginDate = undefined
+      this.queryParam.endDate = undefined
+      this.queryParam.bizNo = undefined
+      this.queryParam.bizType = undefined
+      this.$refs.table.refresh(true)
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      } else {
+        this.$nextTick(() => {
+          this.resetSearchForm()
+        })
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+.outIndetail-modal {
+	.ant-drawer-body {
+		padding: 10px 20px;
+    .outIndetail-modal-table{
+      padding: 20px 0 0;
+    }
+    .baseInfo{
+      line-height: 24px;
+      font-size: 14px;
+    }
+	}
+}
+.table-operator{
+  .subsidyRequired{
+    margin-right: 5px;
+    color:#ED1c24;
+  }
+}
+
+</style>

+ 120 - 0
src/views/numsGoodsShelves/customerAccount/zeroClearingModal.vue

@@ -0,0 +1,120 @@
+<template>
+  <a-modal
+    centered
+    class="zero-clearing-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="'清零'+titName"
+    v-model="isShow"
+    @cancel="isShow = false"
+    :width="450">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="mainContent" v-if="conInfo">
+        <a-checkbox-group v-model="accountType" id="zero-clearing-checkbox">
+          <a-checkbox value="RECHARGE" id="zero-clearing-checkbox1">清空{{ (conInfo.rechargeBalance||conInfo.rechargeBalance==0)?toThousands(conInfo.rechargeBalance):'--' }}元【充值余额】</a-checkbox>
+          <br />
+          <a-checkbox value="GIVE" id="zero-clearing-checkbox2">清空{{ (conInfo.giveBalance||conInfo.giveBalance==0)?toThousands(conInfo.giveBalance):'--' }}元【抵扣余额】</a-checkbox>
+        </a-checkbox-group>
+        <div style="margin-top:10px;">注意:请慎重操作,一旦清空,不可变更</div>
+      </div>
+      <div class="btn-cont">
+        <a-button id="zero-clearing-modal-cancel" @click="isShow = false" style="margin-right: 15px;">取消</a-button>
+        <a-button type="primary" id="zero-clearing-modal-save" @click="handleSave">保存</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 接口
+import { storeAccountSetZero } from '@/api/storeAccount'
+export default {
+  name: 'ZeroClearingModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: {
+      //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      spinning: false, // 页面加载loading
+      isShow: this.openModal, //  是否打开弹框
+      titName: '', // 弹窗标题
+      accountType: undefined, // 清空目标
+      conInfo: null // 回显数据内容
+    }
+  },
+  methods: {
+    // 清零保存
+    handleSave () {
+      const _this = this
+      if (!_this.accountType || (_this.accountType && _this.accountType.length === 0)) {
+        _this.$message.warning('请选择清空目标')
+        return
+      }
+      const ajaxData = _this.accountType.map(con => {
+        const obj = {
+          accountType: con,
+          tradeAmount: con === 'RECHARGE' ? '-' + _this.conInfo.rechargeBalance : '-' + _this.conInfo.giveBalance,
+          storeAccountSn: _this.conInfo.storeAccountSn,
+          storeSn: _this.conInfo.storeSn,
+          shelfSn: _this.conInfo.shelfSn
+        }
+        return obj
+      })
+      _this.spinning = true
+      storeAccountSetZero(ajaxData).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$emit('ok', res.data)
+          _this.isShow = false
+        }
+        _this.spinning = false
+      })
+    },
+    // 初始化  获取页面回显数据
+    pageInit (row) {
+      this.titName = '(' + row.customerName + ')' || ''
+      this.conInfo = row
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.accountType = undefined
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+.zero-clearing-modal {
+	.ant-modal-body {
+		padding: 40px 40px 24px;
+	}
+  .mainContent{
+    width: 65%;
+    margin:0 auto;
+    .ant-checkbox-group{
+      .ant-checkbox-wrapper{
+        margin-bottom:10px;
+      }
+    }
+  }
+	.btn-cont {
+		text-align: center;
+		margin: 35px 0 10px;
+	}
+}
+</style>

+ 1 - 1
src/views/numsGoodsShelves/shelfSet/basicInfoModal.vue

@@ -31,7 +31,7 @@
           </template>
           <custList id="shelfSet-basicInfo-modal-custList" ref="custList" :isEnabled="true" @change="custChange"></custList>
         </a-form-model-item>
-        <a-form-model-item prop="showPrice">
+        <a-form-model-item prop="showPrice" v-if="$hasPermissions('B_shelfSet_priceSetting')">
           <template slot="label">
             <a-tooltip placement="top">
               <template slot="title">

+ 30 - 27
src/views/numsGoodsShelves/shelfSet/list.vue

@@ -15,7 +15,7 @@
                 <custList ref="custList" id="shelfSetList-custList" @change="custChange" :isEnabled="true"></custList>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <!--  <a-col :md="6" :sm="24">
               <a-form-item label="是否设置完成">
                 <v-select
                   v-model="queryParam.finishFlag"
@@ -25,7 +25,7 @@
                   placeholder="请选择"
                   allowClear></v-select>
               </a-form-item>
-            </a-col>
+            </a-col> -->
             <a-col :md="6" :sm="24" style="margin-bottom: 10px">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="shelfSetList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="shelfSetList-reset">重置</a-button>
@@ -64,7 +64,7 @@
           </p>
         </template>
         <!-- 是否设置完成 -->
-        <template slot="finishFlag" slot-scope="text, record">
+        <!--  <template slot="finishFlag" slot-scope="text, record">
           <a-switch
             checkedChildren="是"
             unCheckedChildren="否"
@@ -77,14 +77,14 @@
           <span v-else :style="{ color: record.finishFlag == 1 ? '#00aa00' : '#999' }">
             {{ record.finishFlag == 1 ? '是' : (record.finishFlag!=undefined?'否':'--') }}
           </span>
-        </template>
+        </template> -->
         <!-- 启用禁用 -->
         <template slot="enableFlag" slot-scope="text, record">
           <a-switch
             checkedChildren="启用"
             unCheckedChildren="停用"
             :disabled="record.state=='WRITE_OFF'||record.state=='SUSPEND'"
-            v-if="record.state!=undefined"
+            v-if="$hasPermissions('B_shelfSet_enable')&&record.state!=undefined"
             @change="enableShelf(record)"
             :checked="record.state == 'ENABLE'"
             :id="'shelfSetList-state-'+record.id"
@@ -96,13 +96,18 @@
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <div>
-            <a-button id="shelfSetList-setView" size="small" type="link" class="button-primary" @click="handleSet(record)">{{ record.state!='WRITE_OFF'&&record.state!='SUSPEND'?'货架设置':'查看' }}</a-button>
+            <a-button
+              id="shelfSetList-setView"
+              size="small"
+              type="link"
+              class="button-primary"
+              @click="handleSet(record)">{{ record.state!='WRITE_OFF'&&record.state!='SUSPEND'?'货架设置':'查看' }}</a-button>
             <a-button
               :id="'shelfSetList-cancel-'+record.id"
               size="small"
               type="link"
               class="button-primary"
-              v-if="record.state!='WRITE_OFF'&&record.state!='SUSPEND'"
+              v-if="$hasPermissions('B_shelfSet_logout')&&record.state!='WRITE_OFF'&&record.state!='SUSPEND'"
               @click="handleCancel(record)">注销</a-button>
           </div>
         </template>
@@ -152,7 +157,6 @@ export default {
       queryParam: {
         shelfSn: undefined, // 货架sn
         customerSn: undefined, // 关联客户sn
-        finishFlag: undefined, // 是否完成设置
         customerEntity: { // 关联客户名称
           customerName: undefined
         }
@@ -163,7 +167,7 @@ export default {
         { title: '货架名称', scopedSlots: { customRender: 'shelfName' }, width: '25%', align: 'left', ellipsis: true },
         { title: '关联客户', dataIndex: 'customerEntity.customerName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '货位数量', scopedSlots: { customRender: 'shelfPlaceNum' }, width: '15%', align: 'center' },
-        { title: '是否设置完成', scopedSlots: { customRender: 'finishFlag' }, width: '10%', align: 'center' },
+        // { title: '是否设置完成', scopedSlots: { customRender: 'finishFlag' }, width: '10%', align: 'center' },
         { title: '启用状态', scopedSlots: { customRender: 'enableFlag' }, width: '10%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
@@ -218,23 +222,23 @@ export default {
         this.queryParam.customerSn = undefined
       }
     },
-    // 是否设置完成更改
-    changeStatus (record) {
-      const params = {
-        shelfSn: record.shelfSn,
-        finishFlag: record.finishFlag == 1 ? '0' : '1'
-      }
-      this.spinning = true
-      modifFinishFlag(params).then(res => {
-        if (res.status == 200) {
-          this.$message.success(res.message)
-          this.$refs.table.refresh()
-          this.spinning = false
-        } else {
-          this.spinning = false
-        }
-      })
-    },
+    // // 是否设置完成更改
+    // changeStatus (record) {
+    //   const params = {
+    //     shelfSn: record.shelfSn,
+    //     finishFlag: record.finishFlag == 1 ? '0' : '1'
+    //   }
+    //   this.spinning = true
+    //   modifFinishFlag(params).then(res => {
+    //     if (res.status == 200) {
+    //       this.$message.success(res.message)
+    //       this.$refs.table.refresh()
+    //       this.spinning = false
+    //     } else {
+    //       this.spinning = false
+    //     }
+    //   })
+    // },
     // 启用禁用
     enableShelf (record) {
       const params = {
@@ -285,7 +289,6 @@ export default {
       this.queryParam.customerSn = undefined
       this.queryParam.customerEntity.customerName = undefined
       this.$refs.custList.resetForm()
-      this.queryParam.finishFlag = undefined
       this.$refs.table.refresh(true)
     },
     // 计算表格高度

+ 181 - 0
src/views/promotionManagement/rechargeSettings/editModal.vue

@@ -0,0 +1,181 @@
+<template>
+  <a-modal
+    centered
+    class="rechargeEdit-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="itemSn?'编辑':'新增'"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="750">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="rechargeEdit-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-form-model-item label="充值规则" prop="rechargeAmount">
+          <div>
+            充值<a-input-number
+              id="rechargeEdit-rechargeAmount"
+              v-model.trim="form.rechargeAmount"
+              style="width: 35%;margin:0 10px;"
+              :min="0.01"
+              :max="999999"
+              :precision="2"
+              :disabled="itemSn?true:false"
+              placeholder="请输入"/>元,送<a-input-number
+                id="rechargeEdit-giveAmount"
+                v-model.trim="form.giveAmount"
+                style="width: 35%;margin:0 10px;"
+                :min="0.01"
+                :max="999999"
+                :precision="2"
+                :disabled="itemSn?true:false"
+                placeholder="请输入"/>元抵扣
+          </div>
+        </a-form-model-item>
+        <a-form-model-item label="备注">
+          <a-textarea
+            :autosize="{minRows: 5, maxRows: 5}"
+            id="rechargeEdit-remarks"
+            :maxLength="50"
+            v-model="form.remarks"
+            placeholder="请输入易码通显示的充值备注(最多50个字符)"
+            allowClear />
+        </a-form-model-item>
+        <div class="tipWord">注意:请设置【抵扣产品】</div>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="rechargeEdit-save" @click="handleSave">保存</a-button>
+        <a-button id="rechargeEdit-cancel" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { rechargeRuleDetail, rechargeRuleCreate, rechargeRuleModify } from '@/api/rechargeRule'
+export default {
+  name: 'RechargeEditModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemSn: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {// form表单中label设置
+        labelCol: { span: 3 },
+        wrapperCol: { span: 18 }
+      },
+      // 提交数据
+      form: {
+        rechargeAmount: undefined, // 充值金额
+        giveAmount: undefined, // 赠送金额
+        remarks: undefined// 备注
+      },
+      // 必填项判断
+      rules: {
+        rechargeAmount: [{ required: true, message: '请输入充值金额', trigger: 'blur' }]
+      }
+    }
+  },
+  methods: {
+    //  保存
+    handleSave () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          if (!_this.form.giveAmount) {
+            _this.$message.warning('请输入赠送金额')
+            return
+          }
+          _this.spinning = true
+          const ajaxName = _this.itemSn ? rechargeRuleModify : rechargeRuleCreate
+          ajaxName(_this.form).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$emit('ok')
+              setTimeout(function () {
+                _this.isShow = false
+              }, 300)
+            }
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    // 获取详情
+    getDetail () {
+      const _this = this
+      _this.spinning = true
+      rechargeRuleDetail({ sn: _this.itemSn }).then(res => {
+        if (res.status == 200) {
+          _this.form = res.data
+        }
+        _this.spinning = false
+      })
+    },
+    // 重置
+    resetForm (obj) {
+      this.form.rechargeAmount = undefined
+      this.form.giveAmount = undefined
+      this.form.remarks = undefined
+      this.form.id = undefined
+      this.$refs.ruleForm.resetFields()
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.resetForm()
+      }
+    },
+    itemSn (newValue, oldValue) {
+      if (newValue) {
+        this.getDetail()
+      }
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .rechargeEdit-modal{
+    /deep/.ant-modal-body {
+    	padding: 40px 40px 24px;
+    }
+    .rechargeEdit-form{
+      text-align: center;
+    }
+    .tipWord{
+      margin:-10px 0  0 48px;
+      color:gray;
+    }
+    .btn-cont {
+    	text-align: center;
+    	margin: 50px 0 10px;
+    }
+  }
+
+</style>

+ 278 - 0
src/views/promotionManagement/rechargeSettings/list.vue

@@ -0,0 +1,278 @@
+<template>
+  <a-card size="small" :bordered="false" class="jg-page-wrap rechargeList-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)" id="rechargeList-form">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="创建时间">
+                <rangeDate id="rechargeList-time" ref="rangeDate" :value="time" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="充值规则">
+                <a-input id="rechargeList-ruleDesc" v-model.trim="queryParam.ruleDesc" allowClear placeholder="请输入充值规则"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="状态">
+                <v-select
+                  v-model="queryParam.state"
+                  ref="sourceType"
+                  id="rechargeList-state"
+                  code="ENABLE_FLAG"
+                  placeholder="请选择状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="rechargeList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="rechargeList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator-nobor">
+        <a-button id="rechargeList-add" type="primary" v-if="$hasPermissions('B_echargeSettings_add')" class="button-error" @click="handleEdit()">新增</a-button>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 状态 -->
+        <template slot="statusBox" slot-scope="text, record">
+          <a-switch
+            :id="'rechargeList-switch-'+record.id"
+            v-if="$hasPermissions('B_echargeSettings_enable')"
+            checkedChildren="启用"
+            unCheckedChildren="禁用"
+            :checked="record.state==1?true:false"
+            @change="handleStatus(record)"/>
+          <span v-else :style="{color:(record.state==1?'#00aa00':'#999')}"> {{ record.state==1? '已启用': '已禁用' }} </span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-primary"
+            v-if="record.state==0&&$hasPermissions('B_echargeSettings_edit')"
+            @click="handleEdit(record)"
+            :id="'rechargeList-editBtn-'+record.id">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            v-if="record.state==0&&$hasPermissions('B_echargeSettings_del')"
+            :id="'rechargeList-delBtn-'+record.id"
+            @click="handleDel(record)">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
+    <!-- 新增/编辑 -->
+    <recharge-edit-modal v-drag :itemSn="itemId" :openModal="openEditModal" @ok="addOrEditOk" @close="closeEditModal" />
+  </a-card>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 组件
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import rechargeEditModal from './editModal.vue'
+// 接口
+import { rechargeRuleList, rechargeRuleUpdateState, rechargeRuleDel } from '@/api/rechargeRule'
+export default {
+  name: 'RechargeSettingsList',
+  components: { STable, VSelect, rangeDate, rechargeEditModal },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      tableHeight: 0, // 表格高度
+      disabled: false, //  查询、重置按钮是否可操作
+      time: [], // 创建时间
+      //  查询条件
+      queryParam: {
+        beginDate: undefined, // 创建开始时间
+        endDate: undefined, // 创建结束时间
+        ruleDesc: undefined, //  充值规则
+        state: undefined// 状态
+      },
+      openEditModal: false, // 新增/编辑弹窗
+      itemId: null, // id值
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '充值规则', dataIndex: 'ruleDesc', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '备注', dataIndex: 'remarks', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '状态', scopedSlots: { customRender: 'statusBox' }, width: '15%', align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return rechargeRuleList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 计算表格序号
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    // 新增/编辑
+    handleEdit (row) {
+      this.itemId = row ? row.rechargeRuleSn : null
+      this.$nextTick(() => {
+        this.openEditModal = true
+      })
+    },
+    // 关闭  新增/编辑弹窗
+    closeEditModal () {
+      this.itemId = null
+      this.openEditModal = false
+    },
+    // 新增/编辑成功
+    addOrEditOk () {
+      this.closeEditModal()
+      this.$refs.table.refresh(true)
+    },
+    // 状态  启用禁用
+    handleStatus (row) {
+      const _this = this
+      const tipWord = (row.state == 1 ? '禁用' : '启用') + '后,易码通' + (row.state == 1 ? '不可以' : '可以') + '看到该充值规则'
+      this.$confirm({
+        title: '提示',
+        content: tipWord,
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          rechargeRuleUpdateState({ rechargeRuleSn: row.rechargeRuleSn, state: row.state == 1 ? '0' : '1' }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+            _this.spinning = false
+          })
+        }
+      })
+    },
+    //  删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确定删除【' + row.ruleDesc + '】的充值规则吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          rechargeRuleDel({ rechargeRuleSn: row.rechargeRuleSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+            _this.spinning = false
+          })
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.time = []
+      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.beginDate = undefined
+      this.queryParam.endDate = undefined
+      this.queryParam.ruleDesc = undefined
+      this.queryParam.state = undefined
+      this.$refs.table.refresh(true)
+    },
+    // 初始化
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    // 计算表格高度
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 243
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 只刷新列表
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style lang="less">
+  .rechargeList-wrap{
+    .red{
+      color: #ed1c24;
+    }
+    .green{
+      color: #19be6b;
+    }
+    .font1{
+     color:#39f;
+    }
+    .desc{
+      width: 100%;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      display: -webkit-box;
+      -webkit-line-clamp: 3;
+      -webkit-box-orient: vertical;
+    }
+  }
+</style>

+ 197 - 0
src/views/promotionManagement/subsidizedProducts/chooseImportModal.vue

@@ -0,0 +1,197 @@
+<template>
+  <a-modal
+    centered
+    class="chooseImportSubsidy-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="确认导入"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="80%">
+    <div class="chooseImportSubsidy-con">
+      <!-- 可导入数据 -->
+      <p class="">可导入数据{{ loadData.length }}条</p>
+      <a-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.allocateSn"
+        :columns="nowColumns"
+        :dataSource="loadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+      </a-table>
+      <a-divider />
+      <!-- 不可导入数据 -->
+      <p class="red">不可导入数据{{ unLoadData.length }}条</p>
+      <a-table
+        class="unTable"
+        ref="unTable"
+        size="small"
+        :rowKey="(record) => record.errorDesc"
+        :columns="nowUnColumns"
+        :dataSource="unLoadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+        <template slot="errorMsg" slot-scope="text,record">
+          <a-popover placement="topRight">
+            <template slot="content">
+              <p v-for="d in record.importErrorMsgSet">{{ d }}</p>
+            </template>
+            <a-button type="link">
+              查看
+            </a-button>
+          </a-popover>
+        </template>
+      </a-table>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="chooseImportSubsidy-submit"
+          size="large"
+          :class="loadData.length==0?'button-grey':'button-primary'"
+          @click="handleSubmit"
+          style="padding: 0 40px;">确认导入</a-button>
+        <a-button
+          id="chooseImportSubsidy-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 40px;margin-left: 15px;">取消</a-button>
+        <a-button
+          type="primary"
+          id="chooseImportSubsidy-error"
+          size="large"
+          class="button-error"
+          @click="handleError"
+          style="padding: 0 40px;margin-left: 15px;">导出错误项</a-button>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+import { exportImportDetailError } from '@/api/shopProductSubsidy'
+export default {
+  name: 'ChooseImportSubsidyModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    paramsData: { // 参数
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    const _this = this
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      // 正确数据
+      nowColumns: [
+        { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原售价', dataIndex: 'shopProductPrice', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '抵扣金额', dataIndex: 'subsidyAmount', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '抵扣后售价', dataIndex: 'subsidyedPrice', width: '14%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+      ],
+      loadData: [],
+      // 错误项
+      nowUnColumns: [
+        { title: '序号', dataIndex: 'no', width: '9%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原售价', dataIndex: 'shopProductPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '抵扣金额', dataIndex: 'subsidyAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '抵扣后售价', dataIndex: 'subsidyedPrice', width: '20%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '备注', scopedSlots: { customRender: 'errorMsg' }, width: '10%', align: 'center' }
+      ],
+      unLoadData: [],
+      loading: false
+    }
+  },
+  methods: {
+    // 获取数据
+    getData () {
+      const paramsData = JSON.parse(JSON.stringify(this.paramsData))
+      this.loadData = paramsData.rightList || []
+      this.unLoadData = paramsData.errorList || []
+      // 正确的
+      this.loadData.map((item, index) => {
+        item.no = index + 1
+      })
+      // 错误的
+      this.unLoadData.map((item, index) => {
+        item.no = index + 1
+      })
+    },
+    // 确认导入
+    handleSubmit () {
+      if (this.paramsData.rightList.length == 0) {
+        this.$message.warning('无可导入的产品!')
+      } else {
+        const data = this.paramsData.rightList
+        this.$emit('ok', data)
+        this.isShow = false
+      }
+    },
+    // 导出错误项
+    handleError () {
+      const _this = this
+      if (_this.paramsData.errorList.length < 1) {
+        _this.$message.info('暂无可导出错误项~')
+        return
+      }
+      _this.spinning = true
+      hdExportExcel(exportImportDetailError, _this.paramsData.errorList, '抵扣金额错误项', function () {
+        _this.spinning = false
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.loadData = []
+        this.unLoadData = []
+      } else {
+        this.getData()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .chooseImportSubsidy-modal{
+    .chooseImportSubsidy-con{
+      .red{
+        color: #f30;
+      }
+      .btn-con{
+        text-align: center;
+        margin: 30px 0 20px;
+        .button-cancel,.button-error{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 129 - 0
src/views/promotionManagement/subsidizedProducts/editModal.vue

@@ -0,0 +1,129 @@
+<template>
+  <a-modal
+    centered
+    class="subsidyEdit-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="编辑"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="500">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="subsidyEdit-form">
+        <span class="subsidyRequired">*</span>抵扣金额<a-input-number
+          id="subsidyEdit-subsidyAmount"
+          v-model.trim="subsidyAmount"
+          style="width: 40%;margin:0 10px;"
+          :min="0.01"
+          :max="99999999"
+          :precision="2"
+          placeholder="请输入"/>元
+      </div>
+      <div class="btn-cont">
+        <a-button id="subsidyEdit-modal-cancel" @click="isShow = false" style="margin-right: 15px;">取消</a-button>
+        <a-button type="primary" id="subsidyEdit-modal-save" @click="handleSave">保存</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+// 接口
+import { subsidizedProductEdit } from '@/api/shopProductSubsidy'
+export default {
+  name: 'SubsidyEditModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemSn: {// 抵扣产品sn
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+    itemAmount: {// 抵扣金额
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      subsidyAmount: undefined// 抵扣金额
+    }
+  },
+  methods: {
+    //  保存
+    handleSave () {
+      const _this = this
+      if (!_this.subsidyAmount) {
+        _this.$message.warning('请输入抵扣金额!')
+        return
+      }
+      _this.spinning = true
+      subsidizedProductEdit({ subsidyAmount: _this.subsidyAmount, productSns: _this.itemSn }).then(res => {
+        if (res.status == 200) {
+          if (res.data) {
+            _this.getErrorInfo(res.data)
+          } else {
+            _this.$message.success(res.message)
+            _this.$emit('ok')
+            setTimeout(function () {
+              _this.isShow = false
+            }, 300)
+          }
+        }
+        _this.spinning = false
+      })
+    },
+    // 报错弹窗
+    getErrorInfo (infoTip) {
+      const _this = this
+      this.$info({
+        title: '提示',
+        content: infoTip,
+        onOk () {
+          _this.$emit('ok')
+          console.log('我知道了')
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      } else {
+        // 单行编辑时,抵扣金额数据回显
+        this.subsidyAmount = this.itemAmount || undefined
+      }
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .subsidyEdit-modal{
+    /deep/.ant-modal-body {
+    	padding: 40px 40px 24px;
+    }
+    .subsidyEdit-form{
+      text-align: center;
+    }
+    .subsidyRequired{
+      margin-right: 5px;
+      color:#ED1c24;
+    }
+    .btn-cont {
+    	text-align: center;
+    	margin: 50px 0 10px;
+    }
+  }
+</style>

+ 195 - 0
src/views/promotionManagement/subsidizedProducts/importGuideModal.vue

@@ -0,0 +1,195 @@
+<template>
+  <a-modal
+    centered
+    class="importGuideSubsidy-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="导入"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="800">
+    <div class="importGuideSubsidy-con">
+      <div class="explain-con">
+        <div class="explain-item">
+          <div class="explain-tit">
+            <span>1</span>准备导入
+          </div>
+          <ul>
+            <li>1) 请先下载导入模板,模板中已标示出必填项</li>
+            <li>2) 产品必须是商城内已上架的产品</li>
+            <li>3) 列表页已存在的产品,不可导入</li>
+            <li>
+              <a :href="filePath" style="margin: 5px 0 0;display: block;">
+                <a-icon type="download" style="padding-right: 5px;" />下载导入模板
+              </a>
+            </li>
+          </ul>
+        </div>
+        <div class="explain-item">
+          <div class="explain-tit">
+            <span>2</span>上传数据文件
+          </div>
+          <p>目前支持的文件类型*.xls,*.xlsx.</p>
+          <div style="overflow: hidden;padding-left: 23px;">
+            <Upload
+              id="importGuideSubsidy-attachList"
+              ref="importUpload"
+              :maxNums="1"
+              fileType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
+              uploadType="attach"
+              :action="attachAction"
+              :uploadParams="uploadParams"
+              upText="添加文件"
+              @remove="resetSearchForm"
+              @change="changeImport"></Upload>
+          </div>
+        </div>
+      </div>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="importGuideSubsidy-nextStep"
+          size="large"
+          class="button-primary"
+          @click="handlerNextStep"
+          style="padding: 0 60px;">下一步</a-button>
+        <a-button
+          id="importGuideSubsidy-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 60px;margin-left: 15px;">取消</a-button>
+      </div>
+    </div>
+    <!-- 导入 -->
+    <chooseImportModal :openModal="openImportModal" :paramsData="paramsData" @close="handleClose" @ok="hanldeOk" />
+  </a-modal>
+</template>
+
+<script>
+import ChooseImportModal from './chooseImportModal.vue'
+import { Upload } from '@/components'
+export default {
+  name: 'ImportGuideSubsidyModal',
+  components: { ChooseImportModal, Upload },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    params: { // 参数
+      type: Object,
+      default: null
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      openImportModal: false, //  导入
+      attachAction: process.env.VUE_APP_API_BASE_URL + '/shopProductSubsidy/importForShopProductSubsidy', // 接口
+      paramsData: null, // 单据信息
+      uploadParams: { // 上传参数
+        savePathType: 'local'
+      },
+      filePath: location.protocol + '//' + location.host + '/templ/抵扣产品导入模板.xlsx' // 下载模板
+    }
+  },
+  methods: {
+    // 清空数据
+    resetSearchForm () {
+      this.$refs.importUpload.setFileList() //  清空导入文件
+      this.paramsData = null //  清空上传数据
+    },
+    // 下一步
+    handlerNextStep () {
+      if (this.paramsData) {
+        this.openImportModal = true
+      } else {
+        this.$message.warning('添加文件后再进行下一步操作!')
+      }
+    },
+    // 上传文件  change
+    changeImport (file) {
+      if (file && JSON.parse(file).length > 0) {
+        this.paramsData = Object.assign({}, JSON.parse(file)[0] || null, this.params)
+      } else {
+        this.paramsData = null
+      }
+    },
+    // 导入
+    hanldeOk (obj) {
+      if (obj && obj.length > 0) {
+        this.$emit('ok', obj)
+        this.isShow = false
+      }
+    },
+    // 关闭
+    handleClose () {
+      this.openImportModal = false
+      this.isShow = false
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.resetSearchForm()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .importGuideSubsidy-modal{
+    .importGuideSubsidy-con{
+      .explain-con{
+        .explain-item{
+          margin-bottom: 10px;
+          .explain-tit{
+            font-weight: bold;
+            span{
+              display: inline-block;
+              width: 18px;
+              height: 18px;
+              line-height: 16px;
+              text-align: center;
+              margin-right: 5px;
+              border-radius: 50%;
+              border: 1px solid rgba(0, 0, 0, 0.3);
+            }
+          }
+          p{
+            margin: 8px 0;
+            padding-left: 23px;
+          }
+          ul{
+            list-style: none;
+            padding: 0;
+            padding-left: 23px;
+            margin: 0;
+            li{
+              line-height: 26px;
+            }
+          }
+        }
+        #importGuideSubsidy-attachList{
+          width: 100%;
+        }
+      }
+      .btn-con{
+        margin: 10px 0 20px;
+        text-align: center;
+        .button-cancel{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 378 - 0
src/views/promotionManagement/subsidizedProducts/list.vue

@@ -0,0 +1,378 @@
+<template>
+  <a-card size="small" :bordered="false" class="subsidizedProducts-wrap searchBoxNormal">
+    <!-- 搜索条件 -->
+    <div ref="tableSearch" class="table-page-search-wrapper">
+      <a-form layout="inline" id="subsidizedProducts-form" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品名称">
+              <a-input id="subsidizedProducts-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品编码/原厂编码">
+              <a-input id="subsidizedProducts-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码/原厂编码"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品品牌">
+              <productBrand id="subsidizedProducts-productBrandSn" v-model="queryParam.productBrandSn"></productBrand>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品分类">
+                <productType id="subsidizedProducts-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></productType>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="商城类目">
+                <mallCategory id="subsidizedProducts-category" @change="changeProductsCategory" v-model="category"></mallCategory>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="促销产品">
+                <v-select
+                  v-model="queryParam.isPromoProduct"
+                  ref="sourceType"
+                  id="rechargeList-isPromoProduct"
+                  code="FLAG"
+                  placeholder="请选择是否是促销产品"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="subsidizedProducts-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="subsidizedProducts-reset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 操作按钮 -->
+    <div class="table-operator-nobor">
+      <a-button id="subsidizedProducts-add" v-if="$hasPermissions('B_subsidizedProducts_add')" type="primary" class="button-error" @click="openAddModal=true">新增</a-button>
+      <a-button id="subsidizedProducts-edit" v-if="$hasPermissions('B_subsidizedProducts_edit')" type="primary" class="button-info" @click="handleEdit()">批量编辑</a-button>
+      <a-button
+        id="subsidizedProducts-del"
+        v-if="$hasPermissions('B_subsidizedProducts_del')"
+        type="primary"
+        class="button-error"
+        ghost
+        @click="handleDel()">批量删除</a-button>
+      <a-button id="subsidizedProducts-import" v-if="$hasPermissions('B_subsidizedProducts_import')" style="margin-left:5px;" @click="openGuideModal=true">导入</a-button>
+      <span style="margin-left: 10px;" v-if="selectTotal">已选{{ selectTotal }}项</span>
+    </div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+70+'px' }"
+        size="small"
+        :rowKey="(record) => record.productSn"
+        rowKeyName="productSn"
+        :columns="columns"
+        :data="loadData"
+        :pageSize="20"
+        :scroll="{ y: tableHeight - 10 }"
+        :defaultLoadData="false"
+        :row-selection="{ columnWidth: 40 }"
+        @rowSelection="rowSelectionFun"
+        bordered>
+        <!-- 产品分类 -->
+        <template slot="productType" slot-scope="text, record">
+          <span v-if="record.productEntity&&(record.productEntity.productTypeName2 || record.productEntity.productTypeName3)">{{ record.productEntity.productTypeName2 }} {{ record.productEntity.productTypeName3 ? '>' : '' }} {{ record.productEntity.productTypeName3 }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 商城类目 -->
+        <template slot="categoryName" slot-scope="text, record">
+          <span v-if="record.indName || record.dirName">{{ record.indName }} {{ (record.indName&&record.dirName) ? '>' : '' }} {{ record.dirName }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            v-if="$hasPermissions('B_subsidizedProducts_edit')"
+            type="link"
+            class="button-primary"
+            @click="handleEdit(record)"
+            :id="'subsidizedProducts-btn-edit-'+record.productSn"
+          >
+            编辑
+          </a-button>
+          <a-button
+            v-if="$hasPermissions('B_subsidizedProducts_del')"
+            size="small"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+            :id="'subsidizedProducts-btn-del-'+record.productSn"
+          >
+            删除
+          </a-button>
+          <span v-if="!$hasPermissions('B_subsidizedProducts_edit') && !$hasPermissions('B_subsidizedProducts_del')">--</span>
+        </template>
+      </s-table>
+    </a-spin>
+    <!-- 新增 -->
+    <subsidyAddModal ref="partQuery" :openModal="openAddModal" @plAdd="subsidyAddOk" @close="openAddModal=false"></subsidyAddModal>
+    <!-- 编辑 -->
+    <subsidy-edit-modal :itemAmount="itemAmount" :itemSn="itemId" :openModal="openEditModal" @ok="clearChooseData" @close="closeEditModal" />
+    <!-- 导入产品 -->
+    <importGuideModal :openModal="openGuideModal" @close="openGuideModal=false" @ok="subsidyAddOk" />
+  </a-card>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 组件
+import { STable, VSelect } from '@/components'
+import productType from '@/views/common/productType.js'
+import productBrand from '@/views/common/productBrand.js'
+import mallCategory from '@/views/common/mallCategory.js'
+import subsidyAddModal from './subsidyAddModal.vue'
+import subsidyEditModal from './editModal.vue'
+import importGuideModal from './importGuideModal.vue'
+// 接口
+import { subsidizedProductList, subsidizedProductDel, subsidizedProductSave } from '@/api/shopProductSubsidy'
+export default {
+  name: 'SubsidizedProductsList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, productType, productBrand, mallCategory, subsidyAddModal, subsidyEditModal, importGuideModal },
+  data () {
+    const _this = this
+    return {
+      spinning: false,
+      advanced: true, // 高级搜索 展开/关闭
+      disabled: false, //  查询、重置按钮是否可操作
+      tableHeight: 0, // 表格高度
+      // form表单label布局
+      formItemLayout: {
+        labelCol: { span: 6 },
+        wrapperCol: { span: 16 }
+      },
+      productType: [], // 产品分类
+      category: [], // 商城类目
+      // 查询条件
+      queryParam: {
+        productName: '', // 产品名称
+        productCode: '', // 产品编码/原厂编码
+        productBrandSn: undefined, //  产品品牌
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '', //  产品三级分类
+        categorySn1: undefined, // 商城一级类目
+        categorySn2: undefined, // 商城二级类目
+        categoryStatus: '1', // 状态 默认值1
+        isPromoProduct: undefined // 是否是促销产品
+      },
+      openAddModal: false, // 打开新增弹窗
+      openEditModal: false, // 打开编辑弹窗
+      rowSelectionInfo: null, // 批量编辑、删除  选择数据
+      openGuideModal: false, // 导入弹窗
+      itemId: null, // 当前行抵扣产品sn
+      itemAmount: null, // 当前行抵扣金额
+      columns: [
+        { title: '序号', dataIndex: 'no', align: 'center', width: '50px' },
+        { title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productEntity.origCode', align: 'center', width: '13%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品品牌', dataIndex: 'productEntity.productBrandName', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', align: 'center', width: '15%', scopedSlots: { customRender: 'productType' } },
+        { title: '商城类目', scopedSlots: { customRender: 'categoryName' }, width: '13%', align: 'center' },
+        { title: '促销产品', dataIndex: 'promoProductSn', align: 'center', width: '10%', customRender: function (text) { return (!text ? '否' : '是') } },
+        { title: '原售价', dataIndex: 'shopProductPrice', width: '11%', align: 'right', customRender: text => { return (text || text == 0) ? _this.toThousands(text) : '--' } },
+        { title: '抵扣金额', dataIndex: 'subsidyAmount', align: 'right', width: '11%', customRender: text => { return (text || text == 0) ? _this.toThousands(text) : '--' } },
+        { title: '抵扣后售价', dataIndex: 'subsidyedPrice', align: 'right', width: '11%', customRender: text => { return (text || text == 0) ? _this.toThousands(text) : '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '11%', align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        return subsidizedProductList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  computed: {
+    // 已选数量
+    selectTotal () {
+      return this.rowSelectionInfo && this.rowSelectionInfo.selectedRows.length
+    }
+  },
+  methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
+    // 新增抵扣产品   确定导入产品
+    subsidyAddOk (list) {
+      this.spinning = true
+      subsidizedProductSave(list).then(res => {
+        if (res.status == 200) {
+          if (res.data) {
+            this.getErrorInfo(res.data)
+          } else {
+            this.openAddModal = false
+            this.$message.success(res.message)
+            this.$refs.table.refresh(true)
+          }
+        }
+        this.spinning = false
+      })
+    },
+    // 报错弹窗
+    getErrorInfo (infoTip) {
+      const _this = this
+      this.$info({
+        title: '提示',
+        content: infoTip,
+        centered: true,
+        onOk () {
+          console.log('我知道了')
+          _this.clearChooseData()
+        }
+      })
+    },
+    // 批量编辑、编辑
+    handleEdit (row) {
+      // 批量编辑
+      if (!row) {
+        if (!this.selectTotal) {
+          this.$message.warning('请先勾选产品!')
+          return
+        }
+        this.itemId = this.rowSelectionInfo.selectedRowKeys
+      } else {
+        this.itemId = [row.productSn]
+        this.itemAmount = row.subsidyAmount
+      }
+      this.$nextTick(() => {
+        this.openEditModal = true
+      })
+    },
+    // 关闭编辑/批量编辑 弹窗
+    closeEditModal () {
+      this.itemId = null
+      this.itemAmount = null
+      this.openEditModal = false
+    },
+    //  删除
+    handleDel (row) {
+      const _this = this
+      if (!row && !this.selectTotal) {
+        this.$message.warning('请先勾选产品!')
+        return
+      }
+      const snList = row ? [row.productSn] : _this.rowSelectionInfo.selectedRowKeys
+      _this.$confirm({
+        title: '提示',
+        content: '确定删除产品吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          subsidizedProductDel({ productSns: snList }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.clearChooseData()
+            }
+            _this.spinning = false
+          })
+        }
+      })
+    },
+    // 清空选择项,刷新列表页
+    clearChooseData () {
+      this.closeEditModal()
+      this.rowSelectionInfo = null
+      this.$refs.table.clearSelected()
+      this.$refs.table.refresh()
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.productName = ''
+      this.queryParam.productCode = ''
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.queryParam.categorySn1 = undefined
+      this.queryParam.categorySn2 = undefined
+      this.queryParam.categoryStatus = '1'
+      this.queryParam.isPromoProduct = undefined
+      this.productType = []
+      this.category = []
+      this.$refs.table.refresh()
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    // 商城类目
+    changeProductsCategory (val) {
+      this.queryParam.categorySn1 = val[0] ? val[0] : ''
+      this.queryParam.categorySn2 = val[1] ? val[1] : ''
+    },
+    // 初始化
+    pageInit () {
+      const _this = this
+      _this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    // 计算表格高度
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 225
+    }
+  },
+  watch: {
+    // 展开关闭  监听表格高度变化
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh(true)
+    }
+  }
+}
+</script>

+ 250 - 0
src/views/promotionManagement/subsidizedProducts/subsidyAddModal.vue

@@ -0,0 +1,250 @@
+<template>
+  <a-drawer
+    title="新增"
+    placement="right"
+    :visible="isShow"
+    width="80%"
+    :get-container="false"
+    :wrap-style="{ position: 'absolute' }"
+    @close="isShow = false"
+    wrapClassName="subsidyAdd-modal jg-page-wrap"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="searchBox" class="table-page-search-wrapper">
+        <a-form-model
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline">
+          <a-row :gutter="5" type="flex" justify="center">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品编码">
+                <a-input id="subsidyAdd-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="原厂编码">
+                <a-input id="subsidyAdd-productOrigCode" ref="productOrigCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入原厂编码"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input id="subsidyAdd-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品分类">
+                <productType id="subsidyAdd-productType" :isDealer="true" @change="changeProductType" v-model="productType"></productType>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品品牌">
+                <productBrand id="subsidyAdd-productBrandSn" v-model="queryParam.productBrandSn"></productBrand>
+              </a-form-model-item>
+            </a-col>
+            <a-col flex="auto" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" id="subsidyAdd-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" id="subsidyAdd-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+      <div class="subsidyAdd-modal-table">
+        <div class="table-operator">
+          <span class="subsidyRequired">*</span>产品抵扣<a-input-number
+            id="subsidyAdd-name"
+            v-model.trim="subsidyAmount"
+            style="width: 20%;margin:0 10px;"
+            :min="0.01"
+            :max="99999999"
+            :precision="2"
+            :step="1"
+            placeholder="请输入"/>元
+          <a-button id="subsidyAdd-handlePlAdd" style="margin:0 10px;" type="primary" @click="handlePlAdd">批量添加</a-button>
+          <span style="margin-left: 10px;" v-if="selectTotal">已选{{ selectTotal }}项</span>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: 580+'px' }"
+          :scroll="{ y: 530 }"
+          :defaultLoadData="false"
+          :row-selection="{ columnWidth: 40 }"
+          @rowSelection="rowSelectionFun"
+          bordered>
+          <!-- 产品分类 -->
+          <template slot="productType" slot-scope="text, record">
+            <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+            <span v-else>--</span>
+          </template>
+          <!-- 包装数 -->
+          <template slot="baozh" slot-scope="text, record">
+            {{ record.packQty||'--' }}{{ record.packQty ? record.unit : '' }}/{{ record.packQtyUnit||'--' }}
+          </template>
+        </s-table>
+      </div>
+    </a-spin>
+  </a-drawer>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable } from '@/components'
+// 组件
+import productType from '@/views/common/productType.js'
+import productBrand from '@/views/common/productBrand.js'
+// 接口
+import { queryProductPageList } from '@/api/shopProductSubsidy'
+export default {
+  name: 'SubsidyAddModal',
+  components: { STable, productType, productBrand },
+  mixins: [commonMixin],
+  props: {
+    openModal: {
+      //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    const _this = this
+    return {
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      productType: [], // 产品分类
+      category: [], // 商城类目val
+      // 查询条件
+      queryParam: {
+        productName: '', // 产品名称
+        productCode: '', // 产品编码
+        productOrigCode: '', // 原厂编码
+        productBrandSn: undefined, //  产品品牌
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
+      },
+      subsidyAmount: undefined, // 产品抵扣
+      rowSelectionInfo: null, // 已选产品
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商城售价', dataIndex: 'price', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '终端价', dataIndex: 'ocsPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '品牌', dataIndex: 'productBrandName', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', width: '15%', align: 'center', scopedSlots: { customRender: 'productType' } },
+        { title: '包装数', width: '10%', align: 'center', scopedSlots: { customRender: 'baozh' } },
+        { title: '单位', dataIndex: 'unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const queryParams = Object.assign(parameter, this.queryParam)
+        return queryProductPageList(queryParams).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  computed: {
+    // 已选数量
+    selectTotal () {
+      return this.rowSelectionInfo && this.rowSelectionInfo.selectedRows.length
+    }
+  },
+  methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    // 批量添加
+    handlePlAdd () {
+      if (!this.selectTotal) {
+        this.$message.info('请选择产品')
+        return
+      }
+      if (!this.subsidyAmount) {
+        this.$message.info('产品抵扣金额不能为空')
+        return
+      }
+      const chooseList = JSON.parse(JSON.stringify(this.rowSelectionInfo.selectedRows))
+      const newList = chooseList.map(item => {
+        item.subsidyAmount = this.subsidyAmount
+        delete item.id
+        return item
+      })
+      this.$emit('plAdd', newList)
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.productName = ''
+      this.queryParam.productCode = ''
+      this.queryParam.productOrigCode = ''
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.subsidyAmount = undefined
+      this.productType = []
+      this.category = []
+      this.rowSelectionInfo = null
+      this.$refs.table.clearSelected()
+      this.$refs.table.refresh()
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      } else {
+        this.resetSearchForm()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.subsidyAdd-modal {
+	.ant-drawer-body {
+		padding: 10px 20px;
+    .subsidyAdd-modal-table{
+      padding-top: 10px;
+    }
+	}
+  .table-operator{
+    .subsidyRequired{
+      margin-right: 5px;
+      color:#ED1c24;
+    }
+  }
+}
+</style>

+ 1 - 1
src/views/purchasingManagement/purchaseOrder/basicInfoModal.vue

@@ -39,7 +39,7 @@
         </a-form-model-item>
         <a-form-model-item label="支付方式" prop="settleStyleSn">
           <v-select
-            code="SETTLE_STYLE"
+            code="OFFLINE_SETTLE_STYLE"
             id="purchaseOrder-basicInfo-settleStyleSn"
             v-model="form.settleStyleSn"
             allowClear

+ 1 - 1
src/views/purchasingManagement/purchaseOrderNew/basicInfoModal.vue

@@ -39,7 +39,7 @@
         </a-form-model-item>
         <a-form-model-item label="支付方式" prop="settleStyleSn">
           <v-select
-            code="SETTLE_STYLE"
+            code="OFFLINE_SETTLE_STYLE"
             id="purchaseOrder-basicInfo-settleStyleSn"
             v-model="form.settleStyleSn"
             allowClear

+ 34 - 12
src/views/salesManagement/onlinePayOrder/detail.vue

@@ -11,7 +11,7 @@
             <a-icon :type="isShowBisiceInfo ? 'eye-invisible' : 'eye'"/>
             {{ isShowBisiceInfo?'隐藏':'查看' }}信息
           </a-button>
-          <a-button id="onlinePayDetail-back-btn" type="link" @click="handleBack" class="button-default"> <a-icon type="rollback" /> 返回列表</a-button>
+          <a-button id="onlinePayDetail-back-btn" type="link" @click="handleBack" class="button-default"> <a-icon type="rollback" />返回列表</a-button>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="outBizSn ? $hasPermissions('B_outboundOrderDetail') : $hasPermissions('B_onlinePayPrint')">
@@ -77,14 +77,16 @@
               急件总款数:<strong>{{ detailData&&(detailData.oosCategory || detailData.oosCategory==0) ? detailData.oosCategory : '--' }}</strong>;
               急件总数量:<strong>{{ detailData&&(detailData.oosQty || detailData.oosQty==0) ? detailData.oosQty : '--' }}</strong>;<br/>
               总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</strong>;
-              <template v-if="showCost">
+              <template v-if="!showCell.includes('totalCost')">
                 总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;
                 总毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit) : '--' }}</strong>;
               </template>
+              <span>实收总售价:<strong>{{ detailData&&(detailData.discountedAmount || detailData.discountedAmount==0) ? toThousands(detailData.discountedAmount) : '--' }}</strong>;</span>
               <span v-if="detailData&&detailData.sourceType&&detailData.sourceType==='XPRH_PURCHASE'"> 返券金额:<strong>{{ detailData&&(detailData.totalGiveAmount || detailData.totalGiveAmount==0) ? toThousands(detailData.totalGiveAmount) : '--' }}</strong>;</span>
+              <span>抵扣金额:<strong>{{ detailData&&(detailData.subsidyAmount || detailData.subsidyAmount==0) ? toThousands(detailData.subsidyAmount) : '--' }}</strong>;</span>
             </div>
             <div>
-              <a-checkbox v-model="showCost" v-if="$hasPermissions('M_ShowAllCost')" id="onlinePayDetail-cost">成本价</a-checkbox>
+              <hideCellMenus id="onlinePayOrderList-showCellMenus" placeholder="显示" :defHiddenKes="colsArr" v-model="showCell"></hideCellMenus>
             </div>
           </div>
           <!-- 列表 -->
@@ -152,12 +154,13 @@ import { STable, VSelect } from '@/components'
 import editRemarkModal from './editRemarkModal.vue'
 import PrintPanel from '@/views/common/printPanel.vue'
 import outInDetialModal from '../salesQueryNew/outInDetialModal.vue'
+import hideCellMenus from '@/views/common/hideCellMenus'
 // 接口
 import { salesDetailBySn, salesDetailPrint, salesDetailExport } from '@/api/sales'
 import { salesDetailList } from '@/api/salesDetail'
 export default {
   name: 'OnlinePayOrderDetail',
-  components: { STable, VSelect, PrintPanel, editRemarkModal, outInDetialModal },
+  components: { STable, VSelect, PrintPanel, editRemarkModal, outInDetialModal, hideCellMenus },
   mixins: [commonMixin],
   props: {
     outBizSn: { //  有值则为弹框,无值则为页面
@@ -170,7 +173,6 @@ export default {
       showPage: false, // 是否显示组件
       spinning: false,
       disabled: false,
-      showCost: false, // 是否显示成本价
       printOrgCode: false, // 是否打印原创编码
       printAllName: false, // 是否打印全部名称
       printRemarks: false, // 是否打印备注
@@ -209,7 +211,28 @@ export default {
       },
       localDataSource: [], // 原始列表数据
       detailData: null, //  详情数据
-      isShowBisiceInfo: false// 显示基础内容
+      isShowBisiceInfo: false, // 显示基础内容
+      colsArr: [// 需要显示的列
+        {
+          title: '成本价',
+          key: 'totalCost',
+          disabled: false,
+          checked: false
+        },
+        {
+          title: '抵扣金额',
+          key: 'subsidyAmount',
+          disabled: false,
+          checked: false
+        },
+        {
+          title: '返券金额',
+          key: 'giveAmount',
+          disabled: false,
+          checked: false
+        }
+      ],
+      showCell: []// 已选要显示的列
     }
   },
   computed: {
@@ -234,20 +257,19 @@ export default {
         { title: '单位', dataIndex: 'productOrigUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '售价小计', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ]
+      arr.push({ title: '抵扣金额', dataIndex: 'subsidyAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       if (this.detailData && this.detailData.sourceType && this.detailData.sourceType === 'XPRH_PURCHASE') {
-        arr.push({ title: <a-tooltip placement="bottom" title='返券金额以销售单完结时的活动规则为准'>返券金额&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'giveAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({ title: '返券金额', dataIndex: 'giveAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       // 实际总成本
-      if (this.showCost) {
-        arr.push({ slots: { title: 'costTitle' }, dataIndex: 'totalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-      }
+      arr.push({ slots: { title: 'costTitle' }, dataIndex: 'totalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       // 下级创建,不显示仓库仓位
       if (!this.isOwerEdit) {
         arr.push({ title: '库存数量', dataIndex: 'currentStockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       arr.push({ title: '是否急件', dataIndex: 'oosFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
       arr.push({ title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' })
-      return arr
+      return arr.filter(item => !this.showCell.includes(item.dataIndex))
     }
   },
   methods: {
@@ -278,7 +300,7 @@ export default {
     },
     //  返回
     handleBack () {
-      this.$router.push({ name: 'onlinePayOrderList' })
+      this.$router.push({ name: 'onlinePayOrder' })
     },
     //  详情
     getDetail () {

+ 1 - 1
src/views/salesManagement/onlinePayOrder/list.vue

@@ -79,7 +79,7 @@
               <a-col :md="6" :sm="24">
                 <a-form-item label="收款方式">
                   <v-select
-                    code="SETTLE_STYLE"
+                    code="ONLINE_SETTLE_STYLE"
                     id="onlinePayOrderList-settleStyleSn"
                     v-model="queryParam.settleStyleSn"
                     allowClear

+ 24 - 9
src/views/salesManagement/salesQuery/detail.vue

@@ -71,7 +71,7 @@
               <span v-if="detailData&&detailData.sourceType&&detailData.sourceType==='XPRH_PURCHASE'"> 返券金额:<strong>{{ detailData&&(detailData.totalGiveAmount || detailData.totalGiveAmount==0) ? toThousands(detailData.totalGiveAmount) : '--' }}</strong>;</span>
             </div>
             <div>
-              <a-checkbox v-model="showCost" v-if="$hasPermissions('M_ShowAllCost')" id="salesQuery-cost">成本价</a-checkbox>
+              <hideCellMenus placeholder="显示" :defHiddenKes="colsArr" v-model="showCell"></hideCellMenus>
             </div>
           </div>
         </a-alert>
@@ -131,12 +131,13 @@ import { hdPrint } from '@/libs/JGPrint'
 import { STable, VSelect } from '@/components'
 import outInDetialModal from '@/views/common/outInDetialModal.vue'
 import Print from '@/views/common/print.vue'
+import hideCellMenus from '@/views/common/hideCellMenus'
 // 接口
 import { salesDetailBySn, salesDetailPrint, salesDetailExport } from '@/api/sales'
 import { salesDetailList } from '@/api/salesDetail'
 export default {
   name: 'SalesDetail',
-  components: { STable, VSelect, Print, outInDetialModal },
+  components: { STable, VSelect, Print, outInDetialModal, hideCellMenus },
   mixins: [commonMixin],
   props: {
     outBizSn: { //  有值则为弹框,无值则为页面
@@ -183,10 +184,27 @@ export default {
         })
       },
       localDataSource: [], // 原始列表数据
-      detailData: null //  详情数据
+      detailData: null, //  详情数据
+      showCell: []// 已选要显示的列
     }
   },
   computed: {
+    colsArr () {
+      return [
+        {
+          title: '成本价',
+          key: 'totalCost',
+          disabled: false,
+          checked: false
+        },
+        {
+          title: '返券金额',
+          key: 'giveAmount',
+          disabled: !(this.detailData && this.detailData.sourceType && this.detailData.sourceType === 'XPRH_PURCHASE'),
+          checked: false
+        }
+      ]
+    },
     // 是否自建单据
     isOwerEdit () {
       return this.detailData && this.detailData.sourceType == 'SALES'
@@ -209,12 +227,9 @@ export default {
         { title: '单位', dataIndex: 'productOrigUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '售价小计', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '折后小计', dataIndex: 'discountedAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '折扣金额', dataIndex: 'discountAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        { title: '折扣金额', dataIndex: 'discountAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { slots: { title: 'costTitle' }, dataIndex: 'totalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ]
-      // 实际总成本
-      if (this.showCost) {
-        arr.push({ slots: { title: 'costTitle' }, dataIndex: 'totalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-      }
       if (this.detailData && this.detailData.sourceType && this.detailData.sourceType === 'XPRH_PURCHASE') {
         arr.push({ title: <a-tooltip placement="bottom" title='返券金额以销售单完结时的活动规则为准'>返券金额&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'giveAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
@@ -227,7 +242,7 @@ export default {
       }
       arr.push({ title: '是否急件', dataIndex: 'oosFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
       arr.push({ title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' })
-      return arr
+      return arr.filter(item => !_this.showCell.includes(item.dataIndex))
     }
   },
   methods: {

+ 1 - 1
src/views/salesManagement/salesQuery/list.vue

@@ -74,7 +74,7 @@
               <a-col :md="6" :sm="24">
                 <a-form-item label="收款方式">
                   <v-select
-                    code="SETTLE_STYLE"
+                    code="OFFLINE_SETTLE_STYLE"
                     id="salesManagementList-settleStyleSn"
                     v-model="queryParam.settleStyleSn"
                     allowClear

+ 21 - 12
src/views/salesManagement/salesQueryNew/chooseProductModal.vue

@@ -218,19 +218,27 @@
         :footer="null"
         centered
         @ok="showUploadImg=false">
-        <a-upload-dragger :before-upload="beforeUpload" accept="image/*" :showUploadList="false">
-          <div class="ant-upload-box">
-            <p class="ant-upload-drag-icon">
-              <a-icon type="inbox" />
-            </p>
-            <p class="ant-upload-text">
-              单击或拖动文件到此区域进行上传
-            </p>
-            <p class="ant-upload-hint">
-              最多一张图片,支持JPG、PNG、BMP格式,最大50M。
-            </p>
+        <div>
+          <a-upload-dragger :before-upload="beforeUpload" accept="image/*" :showUploadList="false">
+            <div class="ant-upload-box">
+              <p class="ant-upload-drag-icon">
+                <a-icon type="inbox" />
+              </p>
+              <p class="ant-upload-text">
+                单击或拖动文件到此区域进行上传
+              </p>
+              <p class="ant-upload-hint">
+                最多一张图片,支持JPG、PNG、BMP格式,最大50M。
+              </p>
+            </div>
+          </a-upload-dragger>
+          <div>
+            <p></p>
+            <p><strong>系统声明:</strong></p>
+            <p>1、本系统仅作为查询辅助工具,在使用中如有对数据与实车配件产品不匹配疑问时,请务必核实实车配件产品及原车维修保养手册所推荐产品标准;</p>
+            <p>2、本系统查询数据仅供参考,请以车辆用户手册为准,一切查询数据均不可作为任何法律和纠错依据或证据。</p>
           </div>
-        </a-upload-dragger>
+        </div>
       </a-modal>
     </a-spin>
   </a-drawer>
@@ -597,6 +605,7 @@ export default {
               // 移除表单项的校验结果
               _this.$refs.ruleForm.clearValidate('vinCode')
               _this.showUploadImg = false
+              _this.searchForm()
             } else {
               _this.$notification.error({
                 message: '提示',

+ 24 - 9
src/views/salesManagement/salesQueryNew/detail.vue

@@ -78,7 +78,7 @@
               <span v-if="detailData&&detailData.sourceType&&detailData.sourceType==='XPRH_PURCHASE'"> 返券金额:<strong>{{ detailData&&(detailData.totalGiveAmount || detailData.totalGiveAmount==0) ? toThousands(detailData.totalGiveAmount) : '--' }}</strong>;</span>
             </div>
             <div>
-              <a-checkbox v-model="showCost" v-if="$hasPermissions('M_ShowAllCost')" id="salesQuery-cost">成本价</a-checkbox>
+              <hideCellMenus placeholder="显示" :defHiddenKes="colsArr" v-model="showCell"></hideCellMenus>
             </div>
           </div>
           <!-- 列表 -->
@@ -138,12 +138,13 @@ import { hdPrint } from '@/libs/JGPrint'
 import { STable, VSelect } from '@/components'
 import outInDetialModal from './outInDetialModal.vue'
 import PrintPanel from '@/views/common/printPanel.vue'
+import hideCellMenus from '@/views/common/hideCellMenus'
 // 接口
 import { salesDetailBySn, salesDetailPrint, salesDetailExport } from '@/api/sales'
 import { salesDetailList } from '@/api/salesDetail'
 export default {
   name: 'SalesDetail',
-  components: { STable, VSelect, PrintPanel, outInDetialModal },
+  components: { STable, VSelect, PrintPanel, outInDetialModal, hideCellMenus },
   mixins: [commonMixin],
   props: {
     outBizSn: { //  有值则为弹框,无值则为页面
@@ -194,10 +195,27 @@ export default {
       },
       localDataSource: [], // 原始列表数据
       detailData: null, //  详情数据
-      isShowBisiceInfo: false// 显示基础内容
+      isShowBisiceInfo: false, // 显示基础内容
+      showCell: []// 已选要显示的列
     }
   },
   computed: {
+    colsArr () {
+      return [
+        {
+          title: '成本价',
+          key: 'totalCost',
+          disabled: false,
+          checked: false
+        },
+        {
+          title: '返券金额',
+          key: 'giveAmount',
+          disabled: !(this.detailData && this.detailData.sourceType && this.detailData.sourceType === 'XPRH_PURCHASE'),
+          checked: false
+        }
+      ]
+    },
     // 是否自建单据
     isOwerEdit () {
       return this.detailData && this.detailData.sourceType == 'SALES'
@@ -220,12 +238,9 @@ export default {
         { title: '单位', dataIndex: 'productOrigUnit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '售价小计', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '折后小计', dataIndex: 'discountedAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '折扣金额', dataIndex: 'discountAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        { title: '折扣金额', dataIndex: 'discountAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { slots: { title: 'costTitle' }, dataIndex: 'totalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ]
-      // 实际总成本
-      if (this.showCost) {
-        arr.push({ slots: { title: 'costTitle' }, dataIndex: 'totalCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-      }
       if (this.detailData && this.detailData.sourceType && this.detailData.sourceType === 'XPRH_PURCHASE') {
         arr.push({ title: <a-tooltip placement="bottom" title='返券金额以销售单完结时的活动规则为准'>返券金额&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'giveAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
@@ -238,7 +253,7 @@ export default {
       }
       arr.push({ title: '是否急件', dataIndex: 'oosFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
       arr.push({ title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' })
-      return arr
+      return arr.filter(item => !_this.showCell.includes(item.dataIndex))
     }
   },
   methods: {

+ 1 - 1
src/views/salesManagement/salesQueryNew/list.vue

@@ -74,7 +74,7 @@
               <a-col :md="6" :sm="24">
                 <a-form-item label="收款方式">
                   <v-select
-                    code="SETTLE_STYLE"
+                    code="OFFLINE_SETTLE_STYLE"
                     id="salesManagementList-settleStyleSn"
                     v-model="queryParam.settleStyleSn"
                     allowClear

+ 2 - 2
vue.config.js

@@ -209,8 +209,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.2.113:8550/qpls-md',
-        // target: 'https://p.iscm.360arrow.com/qpls-md',
+        // target: 'http://192.168.2.113:8550/qpls-md',
+        target: 'https://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,