Browse Source

Merge branch 'deploy' of jianguan-web/qpls-md-html into master

陈瑞 4 years ago
parent
commit
047032fd2f
100 changed files with 7789 additions and 1054 deletions
  1. 3 2
      .env
  2. 2 1
      .env.development
  3. 3 2
      .env.preview
  4. 47 0
      public/adapter.js
  5. 50 0
      public/index.html
  6. BIN
      public/logo.png
  7. 0 42
      src/api/accessoryInfo.js
  8. 0 10
      src/api/accessoryType.js
  9. 0 77
      src/api/active.js
  10. 112 0
      src/api/allocLinkageOut.js
  11. 70 0
      src/api/allocLinkagePut.js
  12. 107 0
      src/api/allocWarehouse.js
  13. 0 41
      src/api/bannerSetting.js
  14. 28 0
      src/api/costType.js
  15. 48 0
      src/api/custType.js
  16. 73 0
      src/api/customer.js
  17. 11 2
      src/api/data.js
  18. 61 0
      src/api/dealerProduct.js
  19. 41 0
      src/api/dealerProductBrand.js
  20. 29 0
      src/api/dealerProductType.js
  21. 0 35
      src/api/editionSetting.js
  22. 13 0
      src/api/giftsDetail.js
  23. 0 45
      src/api/job.js
  24. 54 0
      src/api/jxsorg.js
  25. 0 62
      src/api/manage.js
  26. 0 86
      src/api/menu.js
  27. 0 40
      src/api/menuSet.js
  28. 0 33
      src/api/notice.js
  29. 36 0
      src/api/noticeUser.js
  30. 13 0
      src/api/oos.js
  31. 13 0
      src/api/oosDetail.js
  32. 17 7
      src/api/power-user.js
  33. 68 0
      src/api/powerRole-md.js
  34. 42 0
      src/api/product.js
  35. 10 0
      src/api/productBrand.js
  36. 18 0
      src/api/productType.js
  37. 135 0
      src/api/purchase.js
  38. 54 0
      src/api/purchaseDetail.js
  39. 94 0
      src/api/purchaseReturn.js
  40. 63 0
      src/api/receiving.js
  41. 141 0
      src/api/sales.js
  42. 64 0
      src/api/salesDetail.js
  43. 170 0
      src/api/salesReturn.js
  44. 29 0
      src/api/salesReturnDetail.js
  45. 110 0
      src/api/satelliteWH.js
  46. 0 61
      src/api/serviceItems.js
  47. 93 0
      src/api/settle.js
  48. 61 0
      src/api/settleExpense.js
  49. 71 0
      src/api/settlePay.js
  50. 71 0
      src/api/settleReceipt.js
  51. 10 0
      src/api/settleStyle.js
  52. 33 0
      src/api/shippingAddress.js
  53. 110 0
      src/api/sparePartsPur.js
  54. 39 0
      src/api/sparePartsPutType.js
  55. 24 0
      src/api/sparePartsRet.js
  56. 70 0
      src/api/stock.js
  57. 22 0
      src/api/stockFlow.js
  58. 21 0
      src/api/stockOut.js
  59. 21 0
      src/api/stockWarn.js
  60. 109 0
      src/api/storeCallOut.js
  61. 39 0
      src/api/storeCallOutType.js
  62. 45 0
      src/api/supplier.js
  63. 0 31
      src/api/tenants.js
  64. 0 48
      src/api/theme.js
  65. 0 39
      src/api/tpl.js
  66. 63 0
      src/api/urgent.js
  67. 43 0
      src/api/userOrg.js
  68. 0 80
      src/api/videoSetting.js
  69. 86 0
      src/api/warehouse.js
  70. 1 0
      src/components/GlobalHeader/GlobalHeader.vue
  71. 27 19
      src/components/MultiTab/MultiTab.vue
  72. 55 12
      src/components/NoticeIcon/NoticeIcon.vue
  73. 1 1
      src/components/PageHeader/PageHeader.vue
  74. 6 11
      src/components/Select/index.js
  75. 26 6
      src/components/Table/index.js
  76. 201 3
      src/components/global.less
  77. 44 23
      src/components/tools/UserMenu.vue
  78. 2 2
      src/config/defaultSettings.js
  79. 1900 153
      src/config/router.config.js
  80. 7 3
      src/layouts/BasicLayout.vue
  81. 3 2
      src/layouts/PageView.vue
  82. 5 4
      src/layouts/RouteView.vue
  83. 95 61
      src/libs/getDate.js
  84. 5 0
      src/libs/tools.js
  85. 3 0
      src/store/getters.js
  86. 3 1
      src/store/index.js
  87. 25 1
      src/store/modules/user.js
  88. 121 0
      src/store/modules/websocketStore.js
  89. 3 1
      src/utils/mixin.js
  90. 5 4
      src/utils/request.js
  91. 32 3
      src/views/Home.vue
  92. 184 0
      src/views/allocationManagement/chainTransferIn/detail.vue
  93. 367 0
      src/views/allocationManagement/chainTransferIn/edit.vue
  94. 236 0
      src/views/allocationManagement/chainTransferIn/list.vue
  95. 147 0
      src/views/allocationManagement/chainTransferOut/basicInfoModal.vue
  96. 188 0
      src/views/allocationManagement/chainTransferOut/detail.vue
  97. 550 0
      src/views/allocationManagement/chainTransferOut/edit.vue
  98. 296 0
      src/views/allocationManagement/chainTransferOut/list.vue
  99. 204 0
      src/views/allocationManagement/storeTransferOut/basicInfoModal.vue
  100. 187 0
      src/views/allocationManagement/storeTransferOut/detail.vue

+ 3 - 2
.env

@@ -1,9 +1,10 @@
 NODE_ENV=production
 NODE_ENV=production
 VUE_APP_PREVIEW=false
 VUE_APP_PREVIEW=false
-VUE_APP_API_BASE_URL=https://it.zyucgj.com/zyit/
+VUE_APP_API_BASE_URL=http://qpls-md.360arrow.com/qpls-md
+VUE_APP_WX_BASE_URL=//qpls-md.360arrow.com/qpls-md/websocket/
 VUE_APP_VERSION=V1.0.1
 VUE_APP_VERSION=V1.0.1
 VUE_APP_PRO_NAME=箭冠汽配连锁系统
 VUE_APP_PRO_NAME=箭冠汽配连锁系统
 VUE_APP_LOGO=@/assets/logo.png
 VUE_APP_LOGO=@/assets/logo.png
-VUE_APP_THEME_COLOR=#fa541c
+VUE_APP_THEME_COLOR=#ed1c24
 VUE_APP_COM_NAME=广州市箭冠网络科技有限公司
 VUE_APP_COM_NAME=广州市箭冠网络科技有限公司
 VUE_APP_ICP=粤ICP备10216726号
 VUE_APP_ICP=粤ICP备10216726号

+ 2 - 1
.env.development

@@ -1,9 +1,10 @@
 NODE_ENV=development
 NODE_ENV=development
 VUE_APP_PREVIEW=true
 VUE_APP_PREVIEW=true
 VUE_APP_API_BASE_URL=/api
 VUE_APP_API_BASE_URL=/api
+VUE_APP_WX_BASE_URL=//192.168.16.103:8503/qpls-md/websocket/
 VUE_APP_VERSION=V1.0.1
 VUE_APP_VERSION=V1.0.1
 VUE_APP_PRO_NAME=箭冠汽配连锁系统-dev
 VUE_APP_PRO_NAME=箭冠汽配连锁系统-dev
 VUE_APP_LOGO=@/assets/logo.png
 VUE_APP_LOGO=@/assets/logo.png
-VUE_APP_THEME_COLOR=#fa541c
+VUE_APP_THEME_COLOR=#ed1c24
 VUE_APP_COM_NAME=广州市箭冠网络科技有限公司
 VUE_APP_COM_NAME=广州市箭冠网络科技有限公司
 VUE_APP_ICP=粤ICP备10216726号
 VUE_APP_ICP=粤ICP备10216726号

+ 3 - 2
.env.preview

@@ -1,9 +1,10 @@
 NODE_ENV=production
 NODE_ENV=production
 VUE_APP_PREVIEW=true
 VUE_APP_PREVIEW=true
-VUE_APP_API_BASE_URL=http://it.test.zyucgj.com/zyit
+VUE_APP_API_BASE_URL=http://qpls-md.360arrow.com.cn/qpls-md
+VUE_APP_WX_BASE_URL=//qpls-md.360arrow.com.cn/qpls-md/websocket/
 VUE_APP_VERSION=V1.0.1
 VUE_APP_VERSION=V1.0.1
 VUE_APP_PRO_NAME=箭冠汽配连锁系统-pre
 VUE_APP_PRO_NAME=箭冠汽配连锁系统-pre
 VUE_APP_LOGO=@/assets/logo.png
 VUE_APP_LOGO=@/assets/logo.png
-VUE_APP_THEME_COLOR=#1890FF
+VUE_APP_THEME_COLOR=#ed1c24
 VUE_APP_COM_NAME=广州市箭冠网络科技有限公司
 VUE_APP_COM_NAME=广州市箭冠网络科技有限公司
 VUE_APP_ICP=粤ICP备10216726号
 VUE_APP_ICP=粤ICP备10216726号

+ 47 - 0
public/adapter.js

@@ -0,0 +1,47 @@
+//  非谷歌浏览器或非IE11时,则提示下载谷歌浏览器进行访问
+function BrowserType () {
+  var userAgent = navigator.userAgent // 取得浏览器的userAgent字符串
+  var isOpera = userAgent.indexOf('Opera') > -1 // 判断是否Opera浏览器
+  // var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器
+  var isIE = window.ActiveXObject || 'ActiveXObject' in window
+  // var isEdge = userAgent.indexOf("Windows NT 6.1; Trident/7.0;") > -1 && !isIE; //判断是否IE的Edge浏览器
+  var isEdge = userAgent.indexOf('Edge') > -1 // 判断是否IE的Edge浏览器
+  var isFF = userAgent.indexOf('Firefox') > -1 // 判断是否Firefox浏览器
+  var isSafari = userAgent.indexOf('Safari') > -1 && userAgent.indexOf('Chrome') == -1 // 判断是否Safari浏览器
+  var isChrome = userAgent.indexOf('Chrome') > -1 && userAgent.indexOf('Safari') > -1 && !isEdge // 判断Chrome浏览器
+
+  if (isIE) {
+    var reIE = new RegExp('MSIE (\\d+\\.\\d+);')
+    reIE.test(userAgent)
+    var fIEVersion = parseFloat(RegExp['$1'])
+    if (userAgent.indexOf('MSIE 6.0') != -1) {
+      return 'IE6'
+    } else if (fIEVersion == 7) {
+      return 'IE7'
+    } else if (fIEVersion == 8) {
+      return 'IE8'
+    } else if (fIEVersion == 9) {
+      return 'IE9'
+    } else if (fIEVersion == 10) {
+      return 'IE10'
+    } else if (userAgent.toLowerCase().match(/rv:([\d.]+)\) like gecko/)) {
+      return 'IE11'
+    } else { // IE版本过低
+      return '0'
+    }
+  } // isIE end
+
+  if (isFF) { return 'FF' }
+  if (isOpera) { return 'Opera' }
+  if (isSafari) { return 'Safari' }
+  if (isChrome) { return 'Chrome' }
+  if (isEdge) { return 'Edge' }
+} // myBrowser() end
+
+if (BrowserType() != 'Chrome' && BrowserType() != 'IE11') {
+  var con = alert('当前浏览器版本过低,为保证更好体验请下载谷歌浏览器进行操作, 点击【确定】升级,如不升级您将不能正常浏览网页!' + '\n' + '下载地址:“https://www.google.cn/chrome”') // 在页面上弹出对话框
+  if (con == true) {} else {
+    window.location = 'https://www.google.cn/chrome'
+  }
+}
+//  升级ie  https://support.microsoft.com/zh-cn/help/17621/internet-explorer-downloads

+ 50 - 0
public/index.html

@@ -11,6 +11,56 @@
     <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
     <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
     <link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
     <link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
     <% } %>
     <% } %>
+    <!-- <script src="./adapter.js" type="text/javascript"></script> -->
+    <script>
+      //  非谷歌浏览器或非IE11时,则提示下载谷歌浏览器进行访问
+      function BrowserType () {
+        var userAgent = navigator.userAgent // 取得浏览器的userAgent字符串
+        var isOpera = userAgent.indexOf('Opera') > -1 // 判断是否Opera浏览器
+        // var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器
+        var isIE = window.ActiveXObject || 'ActiveXObject' in window
+        // var isEdge = userAgent.indexOf("Windows NT 6.1; Trident/7.0;") > -1 && !isIE; //判断是否IE的Edge浏览器
+        var isEdge = userAgent.indexOf('Edge') > -1 // 判断是否IE的Edge浏览器
+        var isFF = userAgent.indexOf('Firefox') > -1 // 判断是否Firefox浏览器
+        var isSafari = userAgent.indexOf('Safari') > -1 && userAgent.indexOf('Chrome') == -1 // 判断是否Safari浏览器
+        var isChrome = userAgent.indexOf('Chrome') > -1 && userAgent.indexOf('Safari') > -1 && !isEdge // 判断Chrome浏览器
+      
+        if (isIE) {
+          var reIE = new RegExp('MSIE (\\d+\\.\\d+);')
+          reIE.test(userAgent)
+          var fIEVersion = parseFloat(RegExp['$1'])
+          if (userAgent.indexOf('MSIE 6.0') != -1) {
+            return 'IE6'
+          } else if (fIEVersion == 7) {
+            return 'IE7'
+          } else if (fIEVersion == 8) {
+            return 'IE8'
+          } else if (fIEVersion == 9) {
+            return 'IE9'
+          } else if (fIEVersion == 10) {
+            return 'IE10'
+          } else if (userAgent.toLowerCase().match(/rv:([\d.]+)\) like gecko/)) {
+            return 'IE11'
+          } else { // IE版本过低
+            return '0'
+          }
+        } // isIE end
+      
+        if (isFF) { return 'FF' }
+        if (isOpera) { return 'Opera' }
+        if (isSafari) { return 'Safari' }
+        if (isChrome) { return 'Chrome' }
+        if (isEdge) { return 'Edge' }
+      } // myBrowser() end
+      
+      if (BrowserType() != 'Chrome' && BrowserType() != 'IE11') {
+        var con = alert('当前浏览器版本过低,为保证更好体验请下载谷歌浏览器进行操作, 点击【确定】升级,如不升级您将不能正常浏览网页!' + '\n' + '下载地址:“https://www.google.cn/chrome”') // 在页面上弹出对话框
+        if (con == true) {} else {
+          window.location = 'https://www.google.cn/chrome'
+        }
+      }
+      //  升级ie  https://support.microsoft.com/zh-cn/help/17621/internet-explorer-downloads
+    </script>
   </head>
   </head>
   <body>
   <body>
     <noscript>
     <noscript>

BIN
public/logo.png


+ 0 - 42
src/api/accessoryInfo.js

@@ -1,42 +0,0 @@
-import { axios } from '@/utils/request'
-// 获取配件的标签
-export const getPartLabels = (params) => {
-  return axios.request({
-    url: 'label/queryList',
-    data: { lableBizKey: '', lableBizType: 'PART' },
-    method: 'post'
-  })
-}
-// 配件信息, labels = [{id:id},...]
-export const getAccessoryInfoData = (params) => {
-  return axios.request({
-    url: `part/queryLike/${params.pageNo}/${params.pageSize}`,
-    data: {
-      queryWord: params.queryWord,
-      partsClsId: params.partsClsId,
-      labels: params.labels
-    },
-    method: 'post'
-  })
-}
-// 添加
-export const addAccessoryInfo = (params) => {
-  return axios.request({
-    url: 'part/save',
-    data: params,
-    method: 'post'
-  })
-}
-export const getAccessoryInfoById = (params) => {
-  return axios.request({
-    url: `part/${params.id}`,
-    method: 'get'
-  })
-}
-// 删除
-export const deleteAccessoryInfo = (params) => {
-  return axios.request({
-    url: `part/del/${params.id}`,
-    method: 'get'
-  })
-}

+ 0 - 10
src/api/accessoryType.js

@@ -1,10 +0,0 @@
-import { axios } from '@/utils/request'
-
-// 配件分类操作
-export const getPartsList = formData => {
-  return axios.request({
-    url: '/partCls/findAll',
-    method: 'post',
-    data: {}
-  })
-}

+ 0 - 77
src/api/active.js

@@ -1,77 +0,0 @@
-import { axios } from '@/utils/request'
-
-// 活动统计查询
-export const activeList = params => {
-  const url = `/active/queryLike/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-
-  return axios.request({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-
-// 活动总数统计及参与客户总数
-export const totalActive = params => {
-  return axios.request({
-    url: '/active/getSum',
-    data: params,
-    method: 'post'
-  })
-}
-
-// 查看详情
-export const activeDetails = params => {
-  const url = `/active/mould/${params.id}/${params.pageNo}/${params.pageSize}`
-  return axios.request({
-    url: url,
-    data: {},
-    method: 'get'
-  })
-}
-
-// 保存新建的活动
-export const saveActive = params => {
-  return axios.request({
-    url: '/active/save',
-    data: params,
-    method: 'post'
-  })
-}
-
-// 预览scan
-export const scanActive = params => {
-  return axios.request({
-    url: '/active/scan',
-    data: params,
-    method: 'post'
-  })
-}
-
-// 查看活动详细
-export const activeViews = params => {
-  const url = `/active/${params.id}`
-  return axios.request({
-    url: url,
-    method: 'get'
-  })
-}
-// 删除活动模版
-export const delActive = params => {
-  const url = `/active/delete/${params.id}`
-  return axios.request({
-    url: url,
-    method: 'get'
-  })
-}
-
-// 启用禁用活动
-export const enableActive = params => {
-  const url = `/active/enable/${params.id}/${params.flag}`
-  return axios.request({
-    url: url,
-    method: 'get'
-  })
-}

+ 112 - 0
src/api/allocLinkageOut.js

@@ -0,0 +1,112 @@
+import { axios } from '@/utils/request'
+
+//  连锁调拨调出 列表  分页
+export const allocLinkageOutList = (params) => {
+  const url = `/allocLinkageOut/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  连锁调拨调出   保存
+export const allocLinkageOutSave = (params) => {
+  return axios({
+    url: '/allocLinkageOut/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  连锁调拨调出   提交
+export const allocLinkageOutSubmit = (params) => {
+  return axios({
+    url: `/allocLinkageOut/submit/${params.sn}`,
+    method: 'get'
+  })
+}
+//  连锁调拨调出 详情 列表  分页
+export const allocLinkageOutDetailList = (params) => {
+  const url = `/allocLinkageOut/detail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  连锁调拨调出 详情  根据sn查
+export const allocLinkageOutDetailSn = (params) => {
+  return axios({
+    url: `/allocLinkageOut/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}
+//  连锁调拨调出  审核
+export const allocLinkageAudit = (params) => {
+  return axios({
+    url: `/allocLinkageOut/audit/${params.sn}`,
+    method: 'get'
+  })
+}
+//  连锁调拨调出  出库
+export const allocLinkageOutStock = (params) => {
+  return axios({
+    url: `/allocLinkageOut/outStock/${params.sn}`,
+    method: 'get'
+  })
+}
+//  连锁调拨调出  删除
+export const allocLinkageOutDel = (params) => {
+  return axios({
+    url: `/allocLinkageOut/delete/${params.sn}`,
+    method: 'get'
+  })
+}
+//  连锁调拨调出  详情  添加
+export const allocLinkageOutDetailSave = (params) => {
+  return axios({
+    url: '/allocLinkageOut/detail/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  连锁调拨调出  详情  删除
+export const allocLinkageOutDetailDel = (params) => {
+  return axios({
+    url: `/allocLinkageOut/detail/delete/${params.id}`,
+    method: 'get'
+  })
+}
+//  连锁调拨调出  详情  整单删除
+export const allocLinkageOutDetailDelAll = (params) => {
+  return axios({
+    url: `/allocLinkageOut/detail/deleteAll/${params.sn}`,
+    method: 'get'
+  })
+}
+//  连锁调拨调出  详情  合计
+export const allocLinkageOutDetailCount = (params) => {
+  return axios({
+    url: '/allocLinkageOut/detail/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
+//  连锁调拨调出   调往对象
+export const getTenantList = (params) => {
+  return axios({
+    url: '/allocLinkageOut/getTenantList',
+    method: 'get'
+  })
+}
+// 连锁调拨调出 详情  打印
+export const allocLinkageOutDetailPrint = params => {
+  return axios.request({
+    url: `allocLinkageOut/print/${params.sn}/${params.type}`,
+    method: 'get',
+    responseType: 'blob'
+  })
+}

+ 70 - 0
src/api/allocLinkagePut.js

@@ -0,0 +1,70 @@
+import { axios } from '@/utils/request'
+
+//  连锁调拨调入 列表  分页
+export const allocLinkagePutList = (params) => {
+  const url = `/allocLinkagePut/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  连锁调拨调入  审核
+export const allocLinkagePutAudit = (params) => {
+  return axios({
+    url: `/allocLinkagePut/audit/${params.sn}`,
+    method: 'get'
+  })
+}
+//  连锁调拨调入  入库
+export const allocLinkagePutSubmit = (params) => {
+  return axios({
+    url: `/allocLinkagePut/submit/${params.sn}`,
+    method: 'get'
+  })
+}
+//  连锁调拨调入 详情 合计
+export const allocLinkagePutDetailCount = (params) => {
+  return axios({
+    url: '/allocLinkagePut/detail/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
+//  连锁调拨调出 详情  根据sn查
+export const allocLinkagePutDetailSn = (params) => {
+  return axios({
+    url: `/allocLinkagePut/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}
+//  连锁调拨调入 详情 列表  分页
+export const allocLinkagePutDetailList = (params) => {
+  const url = `/allocLinkagePut/detail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  连锁调拨调入 详情 编辑
+export const allocLinkagePutDetailUpdate = (params) => {
+  const url = `/allocLinkagePut/detail/update/${params.id}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 连锁调拨调入 详情  打印
+export const allocLinkagePutDetailPrint = params => {
+  return axios.request({
+    url: `allocLinkagePut/print/${params.sn}/${params.type}`,
+    method: 'get',
+    responseType: 'blob'
+  })
+}

+ 107 - 0
src/api/allocWarehouse.js

@@ -0,0 +1,107 @@
+import { axios } from '@/utils/request'
+
+//  仓库调拨 列表  分页
+export const allocWarehouseList = (params) => {
+  const url = `/allocWarehouse/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 仓库调拨  审核
+export const allocWarehouseAudit = params => {
+  return axios({
+    url: '/allocWarehouse/audit',
+    data: params,
+    method: 'post'
+  })
+}
+// 仓库调拨  删除
+export const allocWarehouseDel = params => {
+  return axios({
+    url: `/allocWarehouse/delete/${params.id}`,
+    method: 'get'
+  })
+}
+// 仓库调拨 详情  合计
+export const allocWarehouseDetailCount = params => {
+  return axios({
+    url: '/allocWarehouse/detail/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
+// 仓库调拨 详情 列表  分页
+export const allocWarehouseDetailList = params => {
+  const url = `/allocWarehouse/detail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 仓库调拨  详情  添加/编辑
+export const allocWarehouseDetailSave = params => {
+  return axios({
+    url: '/allocWarehouse/detail/save',
+    data: params,
+    method: 'post'
+  })
+}
+// 仓库调拨  详情  删除
+export const allocWarehouseDetailDel = params => {
+  return axios({
+    url: '/allocWarehouse/detail/delete',
+    data: params,
+    method: 'post'
+  })
+}
+// 仓库调拨  保存
+export const allocWarehouseSave = params => {
+  return axios({
+    url: '/allocWarehouse/save',
+    data: params,
+    method: 'post'
+  })
+}
+// 选择产品
+export const productQuery = params => {
+  const url = `/stock/detail/queryStockProductPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 仓库调拨 详情
+export const allocWarehouseDetail = params => {
+  const url = `/allocWarehouse/findById/${params.id}`
+  delete params.id
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  仓库调拨 详情  根据sn查
+export const allocWarehouseDetailSn = (params) => {
+  return axios({
+    url: `/allocWarehouse/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}
+// 仓库调拨 提交
+export const allocWarehouseSubmit = params => {
+  return axios({
+    url: '/allocWarehouse/submit',
+    data: params,
+    method: 'post'
+  })
+}

+ 0 - 41
src/api/bannerSetting.js

@@ -1,41 +0,0 @@
-import { axios } from '@/utils/request'
-
-// 列表查询
-export const getBannerSettingList = (params) => {
-  const url = `/zycar-mgr/banner/query`
-  return axios({
-    url: url,
-    data: {bannerType:params.bannerType},
-    method: 'post'
-  })
-}
-
-// 更改状态
-export const changeStatus = (params) => {
-  const url = `/zycar-mgr/banner/enable/${params.id}/${params.flag}`
-  return axios({
-    url: url,
-    data: {},
-    method: 'get'
-  })
-}
-
-// 确认保存
-export const saveItem = (params) => {
-  const url = `/zycar-mgr/banner/save`
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-
-// 删除
-export const deleteItem = (params) => {
-  const url = `/zycar-mgr/banner/del/${params.id}`
-  return axios({
-    url: url,
-    data: {},
-    method: 'get'
-  })
-}

+ 28 - 0
src/api/costType.js

@@ -0,0 +1,28 @@
+import { axios } from '@/utils/request'
+
+//  费用类型 列表
+export const costTypeAllQuery = (params) => {
+  return axios({
+    url: `/costType/query`,
+    data: {},
+    method: 'post'
+  })
+}
+
+// 新增/编辑 费用类型
+export const costTypeSave = params => {
+  return axios({
+    url: '/costType/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 删除 费用类型
+export const costTypeDel = params => {
+  return axios({
+    url: `/costType/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}

+ 48 - 0
src/api/custType.js

@@ -0,0 +1,48 @@
+import { axios } from '@/utils/request'
+
+//  客户类型列表  分页
+export const custTypeList = (params) => {
+  const url = `/custType/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+//  客户类型列表  不分页
+export const custTypeAllList = (params) => {
+  return axios({
+    url: `/custType/queryList`,
+    data: {},
+    method: 'post'
+  })
+}
+//  客户类型列表  下拉
+export const custTypeFindAllList = (params) => {
+  return axios({
+    url: `/custType/findAll`,
+    data: {},
+    method: 'post'
+  })
+}
+
+// 新增/编辑客户类型
+export const custTypeSave = params => {
+  return axios({
+    url: '/custType/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 删除客户类型
+export const custTypeDel = params => {
+  return axios({
+    url: `/custType/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}

+ 73 - 0
src/api/customer.js

@@ -0,0 +1,73 @@
+import { axios } from '@/utils/request'
+
+//  客户列表  分页
+export const custList = (params) => {
+  const url = `/cust/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  客户列表  不分页
+export const custAllList = (params) => {
+  return axios({
+    url: `/cust/queryList`,
+    data: {},
+    method: 'post'
+  })
+}
+// 新增/编辑客户
+export const custSave = params => {
+  return axios({
+    url: '/cust/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 根据sn修改客户信息
+export const updateByCustomerSn = params => {
+  return axios({
+    url: '/cust/updateByCustomerSn',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 客户详情
+export const custFindById = params => {
+  return axios({
+    url: `/cust/findById/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 删除客户
+export const custDel = params => {
+  return axios({
+    url: `/cust/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}
+//  收款方式  下拉
+export const settleStyleFindAllList = (params) => {
+  return axios({
+    url: `/settleStyle/findAll`,
+    data: {},
+    method: 'post'
+  })
+}
+
+// 启用禁用
+export const updateEnableStatus = params => {
+  return axios({
+    url: `/cust/enable/${params.id}/${params.flag}`,
+    data: {},
+    method: 'get'
+  })
+}

+ 11 - 2
src/api/data.js

@@ -9,7 +9,7 @@ export function login (parameter) {
 }
 }
 
 
 export const listLookUp = params => {
 export const listLookUp = params => {
-  let url = `/lookup/queryLike`
+  const url = `/lookup/queryLike`
   return axios({
   return axios({
     url: url,
     url: url,
     data: params,
     data: params,
@@ -18,7 +18,7 @@ export const listLookUp = params => {
 }
 }
 
 
 export const getLookUpData = (params) => {
 export const getLookUpData = (params) => {
-  let url = `/lookupItem/query/${params.pageNo}/${params.pageSize}`
+  const url = `/lookupItem/query/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageNo
   delete params.pageSize
   delete params.pageSize
   return axios({
   return axios({
@@ -103,3 +103,12 @@ function randomStr (len) {
   }
   }
   return pwd
   return pwd
 }
 }
+
+// 查询省/市/区
+export const getArea = (params) => {
+  return axios({
+    url: `/area/queryList`,
+    data: params,
+    method: 'post'
+  })
+}

+ 61 - 0
src/api/dealerProduct.js

@@ -0,0 +1,61 @@
+import { axios } from '@/utils/request'
+
+//  经销商产品 列表  分页  (自建产品)
+export const dealerProductList = (params) => {
+  const url = `/dealerProduct/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 新增/编辑 经销商产品
+export const dealerProductSave = params => {
+  return axios({
+    url: '/dealerProduct/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 经销商产品 更改状态
+export const dealerProductUpdate = params => {
+  return axios({
+    url: '/dealerProduct/updateStatus',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 经销商产品 导出
+export const dealerProductExport = params => {
+  return axios({
+    url: '/dealerProduct/export',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
+//  经销商产品  详情
+export const dealerProductDetail = (params) => {
+  return axios({
+    url: `/dealerProduct/findById/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}
+//  赠品 列表  分页
+export const giftsDetailList = (params) => {
+  const url = `/giftsDetail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 41 - 0
src/api/dealerProductBrand.js

@@ -0,0 +1,41 @@
+import { axios } from '@/utils/request'
+
+//  产品品牌列表  分页
+export const dealerProductBrandList = (params) => {
+  const url = `/dealerProductBrand/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+//  产品品牌列表  无分页
+export const dealerProductBrandQuery = (params) => {
+  const url = `/dealerProductBrand/queryList`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 新增/编辑产品品牌
+export const dealerProductBrandSave = params => {
+  return axios({
+    url: '/dealerProductBrand/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 产品品牌 更改状态
+export const dealerProductBrandUpdate = params => {
+  return axios({
+    url: '/dealerProductBrand/updateStatus',
+    data: params,
+    method: 'post'
+  })
+}

+ 29 - 0
src/api/dealerProductType.js

@@ -0,0 +1,29 @@
+import { axios } from '@/utils/request'
+
+//  产品分类 列表  无分页
+export const dealerProductTypeList = (params) => {
+  const url = `/dealerProductType/query`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 新增/编辑 产品分类
+export const dealerProductTypeSave = params => {
+  return axios({
+    url: '/dealerProductType/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 删除 产品分类
+export const dealerProductTypeDel = params => {
+  return axios({
+    url: `/dealerProductType/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}

+ 0 - 35
src/api/editionSetting.js

@@ -1,35 +0,0 @@
-import { axios } from '@/utils/request'
-
-// 列表查询
-export const getEditionSettingList = (params) => {
-  const url = `/zycar-mgr/sysVersion/query/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-  return axios({
-    url: url,
-    data: {applyCode:params.applyCode},
-    method: 'post'
-  })
-}
-
-
-
-// 新建保存
-export const saveItem = (params) => {
-  const url = `/zycar-mgr/sysVersion/save`
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-
-// 根据id查询
-export const editItem = (params) => {
-  const url = `/zycar-mgr/sysVersion/${params.id}`
-  return axios({
-    url: url,
-    data: params,
-    method: 'get'
-  })
-}

+ 13 - 0
src/api/giftsDetail.js

@@ -0,0 +1,13 @@
+import { axios } from '@/utils/request'
+
+//  赠品详情列表  分页
+export const giftsDetailList = (params) => {
+  const url = `/giftsDetail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 0 - 45
src/api/job.js

@@ -1,45 +0,0 @@
-import { axios } from '@/utils/request'
-
-export const listJob = (params) => {
-  let url = `/job/queryJob/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-export const pauseJob = (params) => {
-  return axios({
-    url: '/job/pauseJob',
-    data: params,
-    method: 'post'
-  })
-}
-export const resumeJob = (params) => {
-  return axios({
-    url: '/job/resumeJob',
-    data: params,
-    method: 'post'
-  })
-}
-export const delJob = (params) => {
-  return axios({
-    url: `job/delJob/${params.id}`,
-    method: 'get'
-  })
-}
-export const addJob = (params) => {
-  return axios({
-    url: '/job/addJob',
-    data: params,
-    method: 'post'
-  })
-}
-export const callJob = (params) => {
-  return axios({
-    url: `job/callJob/${params.id}`,
-    method: 'get'
-  })
-}

+ 54 - 0
src/api/jxsorg.js

@@ -0,0 +1,54 @@
+import { axios } from '@/utils/request'
+
+//  经销商 中心店/配送店绑定 列表 有分页
+export const jxsorgRelationList = (params) => {
+  const url = `/jxsorg/relation/queryOrgPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  经销商 中心店/配送店绑定 列表 无分页
+export const jxsorgRelationQueryList = (params) => {
+  return axios({
+    url: '/jxsorg/relation/queryOrg',
+    data: params,
+    method: 'post'
+  })
+}
+// 经销商  中心店/配送店绑定  保存
+export const jxsorgRelationSave = (params) => {
+  return axios({
+    url: `/jxsorg/relation/saveOrg`,
+    data: params,
+    method: 'post'
+  })
+}
+// 经销商  中心店/配送店绑定  删除
+export const jxsorgRelationDel = (params) => {
+  return axios({
+    url: `/jxsorg/relation/deleteOrg/${params.sn}`,
+    method: 'get'
+  })
+}
+// 经销商  中心店/配送店绑定  详情
+export const jxsorgRelationDetail = (params) => {
+  return axios({
+    url: `/jxsorg/relation/findOrgBySn/${params.sn}`,
+    method: 'get'
+  })
+}
+//  经销商机构 列表 有分页
+export const jsxorgList = (params) => {
+  const url = `/jsxorg/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 0 - 62
src/api/manage.js

@@ -1,62 +0,0 @@
-import { axios } from '@/utils/request'
-
-const api = {
-  user: '/user',
-  role: '/role',
-  service: '/service',
-  permission: '/permission',
-  permissionNoPager: '/permission/no-pager',
-  orgTree: '/org/tree'
-}
-
-export default api
-
-export function getUserList (parameter) {
-  return axios({
-    url: api.user,
-    method: 'get',
-    params: parameter
-  })
-}
-
-export function getRoleList (parameter) {
-  return axios({
-    url: api.role,
-    method: 'get',
-    params: parameter
-  })
-}
-
-export function getServiceList (parameter) {
-  return axios({
-    url: api.service,
-    method: 'get',
-    params: parameter
-  })
-}
-
-export function getPermissions (parameter) {
-  return axios({
-    url: api.permissionNoPager,
-    method: 'get',
-    params: parameter
-  })
-}
-
-export function getOrgTree (parameter) {
-  return axios({
-    url: api.orgTree,
-    method: 'get',
-    params: parameter
-  })
-}
-
-// id == 0 add     post
-// id != 0 update  put
-export function saveService (parameter) {
-  return axios({
-    url: api.service,
-    method: parameter.id === 0 ? 'post' : 'put',
-    data: parameter
-  })
-}

+ 0 - 86
src/api/menu.js

@@ -1,86 +0,0 @@
-import { axios } from '@/utils/request'
-
-// 获取菜单树数据
-export const getMenuList = params => {
-  const url = `/menu/findAll`
-  return axios({
-    url: url,
-    data: params,
-    method: 'POST'
-  })
-}
-
-// 保存
-export const saveMenu = params => {
-  const url = `/menu/save`
-  return axios({
-    url: url,
-    data: params,
-    method: 'POST'
-  })
-}
-
-// 删除
-export const deleteMenu = params => {
-  const url = `/menu/delete/${params.id}`
-  return axios({
-    url: url,
-    method: 'get'
-  })
-}
-
-// 获取门店菜单树数据
-export const getMdMenuList = params => {
-  const url = `/mdmenu/findAll`
-  return axios({
-    url: url,
-    data: params,
-    method: 'POST'
-  })
-}
-
-// 门店菜单保存
-export const saveMdMenu = params => {
-  const url = `/mdmenu/save`
-  return axios({
-    url: url,
-    data: params,
-    method: 'POST'
-  })
-}
-// 门店菜单删除
-export const deleteMdMenu = params => {
-  const url = `/mdmenu/delete/${params.id}`
-  return axios({
-    url: url,
-    method: 'get'
-  })
-}
-
-// 获取运营菜单树数据
-export const getYyMenuList = params => {
-  const url = `/yymenu/findAll`
-  return axios({
-    url: url,
-    data: params,
-    method: 'POST'
-  })
-}
-
-// 运营菜单保存
-export const saveYyMenu = params => {
-  const url = `/yymenu/save`
-  return axios({
-    url: url,
-    data: params,
-    method: 'POST'
-  })
-}
-// 运营菜单删除
-export const deleteYyMenu = params => {
-  const url = `/yymenu/delete/${params.id}`
-  return axios({
-    url: url,
-    method: 'get'
-  })
-}

+ 0 - 40
src/api/menuSet.js

@@ -1,40 +0,0 @@
-import { axios } from '@/utils/request'
-
-// 获取连锁菜单树数据
-export const findLsMenu = params => {
-  const url = `/mould/findLsMenu`
-  return axios({
-    url: url,
-    data: params,
-    method: 'POST'
-  })
-}
-
-// 保存连锁菜单
-export const saveLsMouldMenu = params => {
-  const url = `/mould/saveLsMouldMenu`
-  return axios({
-    url: url,
-    data: params,
-    method: 'POST'
-  })
-}
-// 获取连锁菜单树数据
-export const findDdMenu = params => {
-  const url = `/mould/findDdMenu`
-  return axios({
-    url: url,
-    data: params,
-    method: 'POST'
-  })
-}
-
-// 保存连锁菜单
-export const saveDdMouldMenu = params => {
-  const url = `/mould/saveDdMouldMenu`
-  return axios({
-    url: url,
-    data: params,
-    method: 'POST'
-  })
-}

+ 0 - 33
src/api/notice.js

@@ -1,33 +0,0 @@
-import { axios } from '@/utils/request'
-
-// 列表查询
-export const getNoticeList = (params) => {
-  const url = `notice/queryLike/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-
-// 新建保存
-export const saveItem = (params) => {
-  const url = `notice/save`
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-
-// 删除
-export const deleteItem = (params) => {
-  const url = `notice/delete/${params.id}`
-  return axios({
-    url: url,
-    data: {},
-    method: 'get'
-  })
-}

+ 36 - 0
src/api/noticeUser.js

@@ -0,0 +1,36 @@
+import { axios } from '@/utils/request'
+
+//  公告 列表  有分页
+export const noticeUserList = (params) => {
+  const url = `/noticeUser/queryLike/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  公告 详情
+export const noticeUserDetail = (params) => {
+  const url = `/notice/findById/${params.id}`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}
+
+// 获取通知消息未读数
+export const getUnreadCount = params => {
+  return axios({
+    url: 'noticeUser/queryNotReadCount',
+    method: 'post'
+  })
+}
+// 设置已读消息
+export const hasRead = id => {
+  return axios({
+    url: `noticeUser/setRead/${id}`,
+    method: 'get'
+  })
+}

+ 13 - 0
src/api/oos.js

@@ -0,0 +1,13 @@
+import { axios } from '@/utils/request'
+
+//  缺货列表  分页
+export const oosList = (params) => {
+  const url = `/oos/findPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 13 - 0
src/api/oosDetail.js

@@ -0,0 +1,13 @@
+import { axios } from '@/utils/request'
+
+//  缺货详情列表  分页
+export const oosDetailList = (params) => {
+  const url = `/oosDetail/findPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 17 - 7
src/api/power-user.js

@@ -3,7 +3,7 @@ import { axios } from '@/utils/request'
 // 重置密码
 // 重置密码
 export const resetPSD = params => {
 export const resetPSD = params => {
   return axios({
   return axios({
-    url: '/user/resetPwd',
+    url: '/mduser/resetPwd',
     data: params,
     data: params,
     method: 'POST'
     method: 'POST'
   })
   })
@@ -11,7 +11,7 @@ export const resetPSD = params => {
 
 
 // 获取列表数据
 // 获取列表数据
 export const getPowerUserList = params => {
 export const getPowerUserList = params => {
-  const url = `/user/queryLike/${params.pageNo}/${params.pageSize}`
+  const url = `/mduser/queryLike/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageNo
   delete params.pageSize
   delete params.pageSize
   return axios({
   return axios({
@@ -21,10 +21,20 @@ export const getPowerUserList = params => {
   })
   })
 }
 }
 
 
+// 获取所有用户
+export const getUserAllList = params => {
+  const url = `/mduser/findAll`
+  return axios({
+    url: url,
+    data: params,
+    method: 'POST'
+  })
+}
+
 // 改变权限状态接口
 // 改变权限状态接口
 export const updateEnableStatus = params => {
 export const updateEnableStatus = params => {
   return axios({
   return axios({
-    url: `/user/enable/${params.id}/${params.flag}`,
+    url: `/mduser/enable/${params.id}/${params.flag}`,
     data: {},
     data: {},
     method: 'get'
     method: 'get'
   })
   })
@@ -33,7 +43,7 @@ export const updateEnableStatus = params => {
 // 删除用户接口
 // 删除用户接口
 export const delectUserPower = params => {
 export const delectUserPower = params => {
   return axios({
   return axios({
-    url: `/user/delete/${params.id}`,
+    url: `/mduser/delete/${params.id}`,
     data: {},
     data: {},
     method: 'get'
     method: 'get'
   })
   })
@@ -42,7 +52,7 @@ export const delectUserPower = params => {
 // 新增/编辑保存接口
 // 新增/编辑保存接口
 export const saveUserPower = params => {
 export const saveUserPower = params => {
   return axios({
   return axios({
-    url: '/user/save',
+    url: '/mduser/save',
     data: params,
     data: params,
     method: 'POST'
     method: 'POST'
   })
   })
@@ -51,8 +61,8 @@ export const saveUserPower = params => {
 // 获取角色列表接口
 // 获取角色列表接口
 export const getRoleList = params => {
 export const getRoleList = params => {
   return axios({
   return axios({
-    url: '/role/findAll',
+    url: '/mdrole/findAll',
     data: params,
     data: params,
     method: 'POST'
     method: 'POST'
   })
   })
-}
+}

+ 68 - 0
src/api/powerRole-md.js

@@ -0,0 +1,68 @@
+import { axios } from '@/utils/request'
+
+// 获取列表数据
+export const getPowerRoleList = params => {
+  const url = `/mdrole/queryLike/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'POST'
+  })
+}
+
+// 改变权限状态接口 flag 0:禁用 1:启用
+export const updateEnableStatus = params => {
+  return axios({
+    url: `/mdrole/enable/${params.id}/${params.flag}`,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 删除用户接口
+export const delectRolePower = params => {
+  return axios({
+    url: `/mdrole/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 新增/编辑保存接口
+export const saveRolePower = params => {
+  return axios({
+    url: '/mdrole/save',
+    data: params,
+    method: 'POST'
+  })
+}
+
+// 获取菜单树数据
+export const getMenuList = params => {
+  const url = `/mdrole/findAllMenu/${params.id}`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}
+
+// 保存权限分配
+export const addMenuPower = params => {
+  const url = `/mdrole/saveRoleMenu`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 获取角色列表接口
+export const getRoleList = params => {
+  return axios({
+    url: '/mdrole/findAll',
+    data: params,
+    method: 'POST'
+  })
+}

+ 42 - 0
src/api/product.js

@@ -0,0 +1,42 @@
+import { axios } from '@/utils/request'
+
+//  箭冠 产品 列表  分页  采购
+export const productListPurchase = (params) => {
+  const url = `/dealerProduct/queryPageForPurchase/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  箭冠 产品 列表  分页
+export const productList = (params) => {
+  const url = `/product/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  产品  价格变更记录  列表  分页
+export const productPriceChangeList = (params) => {
+  const url = `/product/priceChange/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  查找当前经销商信息
+export const getCurrentDealer = (params) => {
+  return axios({
+    url: `/dealer/findCurrentDealer`,
+    method: 'get'
+  })
+}

+ 10 - 0
src/api/productBrand.js

@@ -0,0 +1,10 @@
+import { axios } from '@/utils/request'
+
+//  箭冠 产品品牌 列表
+export const productBrandQuery = (params) => {
+  return axios({
+    url: '/productBrand/queryList',
+    data: params,
+    method: 'post'
+  })
+}

+ 18 - 0
src/api/productType.js

@@ -0,0 +1,18 @@
+import { axios } from '@/utils/request'
+
+//  箭冠 产品分类 列表   一层分类查询   无分页
+export const productTypeQueryList = (params) => {
+  return axios({
+    url: '/productType/queryList',
+    data: params,
+    method: 'post'
+  })
+}
+//  箭冠 产品分类 列表  多层分类查询   无分页
+export const productTypeQuery = (params) => {
+  return axios({
+    url: '/productType/query',
+    data: params,
+    method: 'post'
+  })
+}

+ 135 - 0
src/api/purchase.js

@@ -0,0 +1,135 @@
+import { axios } from '@/utils/request'
+
+//  采购 列表  有分页
+export const purchaseList = (params) => {
+  const url = `/purchase/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 采购入库子单列表
+export const receivingQuery = (params) => {
+  return axios({
+    url: `/receiving/query`,
+    data: params,
+    method: 'post'
+  })
+}
+// 采购入库详细列表
+export const receivingDetail = (params) => {
+  return axios({
+    url: `/receivingDetail/queryPage/${params.pageNo}/${params.pageSize}`,
+    data: params,
+    method: 'post'
+  })
+}
+
+//  采购 详情
+export const purchaseDetail = (params) => {
+  return axios({
+    url: `/purchase/findById/${params.id}`,
+    data: params,
+    method: 'get'
+  })
+}
+
+//  采购 详情
+export const purchaseDetailBySn = (params) => {
+  return axios({
+    url: `/purchase/findBySn/${params.sn}`,
+    data: params,
+    method: 'get'
+  })
+}
+//  采购明细 统计
+export const purchaseCount = (params) => {
+  return axios({
+    url: `/purchase/queryCount`,
+    data: params,
+    method: 'post'
+  })
+}
+//  采购 打印
+export const purchasePrint = (params) => {
+  return axios({
+    url: '/purchase/print',
+    data: params,
+    method: 'post'
+  })
+}
+//  采购 打印预览
+export const purchasePrintPreview = (params) => {
+  return axios({
+    url: '/purchase/printPreview',
+    data: params,
+    method: 'post'
+  })
+}
+//  采购 付款
+export const purchaseWritePay = (params) => {
+  return axios({
+    url: '/purchase/pay',
+    data: params,
+    method: 'post'
+  })
+}
+//  采购 入库
+export const purchaseWriteStockIn = (params) => {
+  return axios({
+    url: '/receiving/stockIn',
+    data: params,
+    method: 'post'
+  })
+}
+//  采购 提交
+export const purchaseWriteSubmit = (params) => {
+  return axios({
+    url: `/purchase/submit/${params.id}`,
+    method: 'get'
+  })
+}
+//  采购 保存
+export const purchaseSave = (params) => {
+  return axios({
+    url: '/purchase/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+//  采购 删除
+export const purchaseDel = (params) => {
+  return axios({
+    url: `/purchase/delete/${params.id}`,
+    method: 'get'
+  })
+}
+//  采购 导出
+export const purchaseExport = (params) => {
+  return axios({
+    url: '/purchase/export',
+    data: params,
+    method: 'post'
+  })
+}
+
+//  采购 查询上级经销商名称
+export const getParentDealer = (params) => {
+  return axios({
+    url: `/dealer/findParentDealer`,
+    method: 'get'
+  })
+}
+// 采购 详情  打印
+export const purchaseDetailPrint = params => {
+  return axios.request({
+    url: `purchase/print/${params.sn}/${params.type}`,
+    method: 'get',
+    responseType: 'blob'
+  })
+}

+ 54 - 0
src/api/purchaseDetail.js

@@ -0,0 +1,54 @@
+import { axios } from '@/utils/request'
+
+//  采购详情 列表  分页
+export const purchaseDetailList = (params) => {
+  const url = `/purchaseDetail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  采购详情 保存
+export const purchaseDetailSave = (params) => {
+  return axios({
+    url: '/purchaseDetail/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  采购详情 删除
+export const purchaseDetailDel = (params) => {
+  return axios({
+    url: `/purchaseDetail/delete/${params.id}`,
+    method: 'get'
+  })
+}
+//  采购详情 整单删除
+export const purchaseDetailDelAll = (params) => {
+  return axios({
+    url: `/purchaseDetail/deleteAll/${params.id}`,
+    data: params,
+    method: 'post'
+  })
+}
+
+//  采购明细 统计
+export const purchaseDetailCount = (params) => {
+  return axios({
+    url: `/purchaseDetail/queryCount`,
+    data: params,
+    method: 'post'
+  })
+}
+
+//  采购入库 修改仓库仓位
+export const purchaseUpdateWarehouse = (params) => {
+  return axios({
+    url: `/receivingDetail/updateWarehouse`,
+    data: params,
+    method: 'post'
+  })
+}

+ 94 - 0
src/api/purchaseReturn.js

@@ -0,0 +1,94 @@
+import { axios } from '@/utils/request'
+
+//  采购退货列表  分页
+export const purchaseReturnList = (params) => {
+  const url = `/purchaseReturn/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  采购退货  新增
+export const purchaseReturnSave = (params) => {
+  return axios({
+    url: '/purchaseReturn/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  采购退货 删除
+export const purchaseReturnDel = (params) => {
+  return axios({
+    url: `/purchaseReturn/delete/${params.id}`,
+    method: 'get'
+  })
+}
+//  采购退货 详情 删除
+export const purchaseReturnDelAll = (params) => {
+  return axios({
+    url: `/purchaseReturn/detail/deleteAll/${params.purchaseReturnSn}`,
+    method: 'get'
+  })
+}
+//  采购退货  提交
+export const purchaseReturnSubmit = (params) => {
+  return axios({
+    url: '/purchaseReturn/submit',
+    data: params,
+    method: 'post'
+  })
+}
+//  采购退货 详情
+export const purchaseReturnDetail = (params) => {
+  return axios({
+    url: `/purchaseReturn/findById/${params.id}`,
+    method: 'get'
+  })
+}
+//  采购退货 详情  根据sn查
+export const purchaseReturnDetailSn = (params) => {
+  return axios({
+    url: `/purchaseReturn/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}
+//  采购退货 详情 选择产品 列表  分页
+export const purchaseReturnPurchaseBillDetailList = (params) => {
+  const url = `/purchaseReturn/detail/queryPurchaseBillDetailPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  采购退货 详情列表  分页
+export const purchaseReturnDetailList = (params) => {
+  const url = `/purchaseReturn/detail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  采购退货 详情 添加产品
+export const purchaseReturnDetailSave = (params) => {
+  return axios({
+    url: '/purchaseReturn/detail/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  采购退货 详情 删除
+export const purchaseReturnDetailDel = (params) => {
+  return axios({
+    url: `/purchaseReturn/detail/delete/${params.id}`,
+    method: 'get'
+  })
+}

+ 63 - 0
src/api/receiving.js

@@ -0,0 +1,63 @@
+import { axios } from '@/utils/request'
+
+//  入库 列表  有分页
+export const receivingList = (params) => {
+  const url = `/receiving/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  入库 列表  合计
+export const receivingCount = (params) => {
+  return axios({
+    url: '/receiving/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
+//  入库 详情
+export const receivingDetailSn = (params) => {
+  return axios({
+    url: `/receiving/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}
+//  入库 入库
+export const receivingStockIn = (params) => {
+  return axios({
+    url: '/receiving/stockIn',
+    data: params,
+    method: 'post'
+  })
+}
+//  入库 入库审核
+export const receivingStockInAudit = (params) => {
+  return axios({
+    url: '/receiving/stockInAudit',
+    data: params,
+    method: 'post'
+  })
+}
+//  入库 详情  有分页
+export const receivingDetailList = (params) => {
+  const url = `/receivingDetail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 入库审核 详情  打印
+export const receivingDetailPrint = params => {
+  return axios.request({
+    url: `receiving/print/${params.sn}/${params.type}`,
+    method: 'get',
+    responseType: 'blob'
+  })
+}

+ 141 - 0
src/api/sales.js

@@ -0,0 +1,141 @@
+import { axios } from '@/utils/request'
+
+//  销售 列表  有分页
+export const salesList = (params) => {
+  const url = `/sales/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 详情
+export const salesDetail = (params) => {
+  return axios({
+    url: `/sales/findById/${params.id}`,
+    data: params,
+    method: 'get'
+  })
+}
+//  销售 详情bysn
+export const salesDetailBySn = (params) => {
+  return axios({
+    url: `/sales/findBySn`,
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 打印
+export const salesPrint = (params) => {
+  return axios({
+    url: '/sales/print',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 打印预览
+export const salesPrintPreview = (params) => {
+  return axios({
+    url: '/sales/printPreview',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 冲减
+export const salesWriteDown = (params) => {
+  return axios({
+    url: '/sales/writeDown',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 审核
+export const salesWriteAudit = (params) => {
+  return axios({
+    url: '/sales/audit',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 折扣
+export const salesWriteDiscount = (params) => {
+  return axios({
+    url: '/sales/discount',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 备货审核
+export const salesWritePrepareAudit = (params) => {
+  return axios({
+    url: '/sales/prepareAudit',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 收款
+export const salesWriteReceipt = (params) => {
+  return axios({
+    url: '/sales/receipt',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 出库
+export const salesWriteStockOut = (params) => {
+  return axios({
+    url: `/sales/stockOut/${params.salesBillSn}`,
+    method: 'get'
+  })
+}
+//  销售 提交
+export const salesWriteSubmit = (params) => {
+  return axios({
+    url: '/sales/submit',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售 新增或编辑
+export const salesSave = (params) => {
+  return axios({
+    url: '/sales/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+//  销售 删除
+export const salesDel = (params) => {
+  return axios({
+    url: `/sales/delete/${params.id}`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 销售 统计
+export const salesCount = (params) => {
+  return axios({
+    url: `/sales/queryCount`,
+    data: params,
+    method: 'post'
+  })
+}
+// 车架号
+export const supperCodeByVin = (params) => {
+  return axios({
+    url: `/supper/queryPartCodeByVin/${params.vin}`,
+    method: 'get'
+  })
+}
+// 销售 详情  打印
+export const salesDetailPrint = params => {
+  return axios.request({
+    url: `sales/print/${params.sn}/${params.type}`,
+    method: 'get',
+    responseType: 'blob'
+  })
+}

+ 64 - 0
src/api/salesDetail.js

@@ -0,0 +1,64 @@
+import { axios } from '@/utils/request'
+
+//  销售详情 列表  分页
+export const salesDetailList = (params) => {
+  const url = `/salesDetail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  销售详情 新增配件
+export const salesDetailInsert = (params) => {
+  return axios({
+    url: '/salesDetail/insert',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售详情 修改价格
+export const salesDetailUpdatePrice = (params) => {
+  return axios({
+    url: '/salesDetail/updatePrice',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售详情 修改数量
+export const salesDetailUpdateQty = (params) => {
+  return axios({
+    url: '/salesDetail/updateQty',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售详情 删除
+export const salesDetailDel = (params) => {
+  return axios({
+    url: `/salesDetail/delete/${params.id}`,
+    method: 'get'
+  })
+}
+//  销售详情 整单删除
+export const salesDetailDelAll = (params) => {
+  return axios({
+    url: `/salesDetail/deleteBySalesBillSn/${params.salesBillSn}`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 销售记录
+export const salesRecordlList = (params) => {
+  const url = `/salesDetail/querySalesRecord/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 170 - 0
src/api/salesReturn.js

@@ -0,0 +1,170 @@
+import { axios } from '@/utils/request'
+
+//  销售退货 审核
+export const salesReturnAudit = (params) => {
+  return axios({
+    url: `/salesReturn/audit/${params.sn}`,
+    method: 'get'
+  })
+}
+//  销售退货 删除
+export const salesReturnDel = (params) => {
+  return axios({
+    url: `/salesReturn/delete/${params.sn}`,
+    method: 'get'
+  })
+}
+
+//  销售退货明细 删除
+export const salesReturnDetailDel = (params) => {
+  return axios({
+    url: `/salesReturn/detail/delete/${params.id}`,
+    method: 'get'
+  })
+}
+
+//  销售退货明细 整单删除
+export const salesReturnDelAll = (params) => {
+  return axios({
+    url: `/salesReturn/detail/deleteAll/${params.sn}`,
+    method: 'get'
+  })
+}
+// 销售退货  列表  统计
+export const salesReturnCount = (params) => {
+  const url = `/salesReturn/queryCount`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 明细列表统计,不传sn 是所有统计
+export const salesReturnQueryCount = (params) => {
+  const url = `/salesReturn/detail/queryCount`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+//  销售退货 分页查询销售退货明细
+export const salesReturnDetailList = (params) => {
+  const url = `/salesReturn/detail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  销售退货 分页查询产品
+export const salesReturnProductList = (params) => {
+  const url = `/salesReturn/detail/querySalesBillDetailPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  产品添加和修改
+export const salesReturnSaveProduct = (params) => {
+  return axios({
+    url: '/salesReturn/detail/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 退货打折
+export const salesReturnDiscount = (params) => {
+  return axios({
+    url: '/salesReturn/discount',
+    data: params,
+    method: 'post'
+  })
+}
+
+//  销售退货 导出
+export const salesReturnExport = (params) => {
+  return axios({
+    url: '/salesReturn/export',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 根据SN查询销售退货单
+export const salesReturnDetail = (params) => {
+  return axios({
+    url: `/salesReturn/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}
+
+//  销售退货 付款
+export const salesReturnPay = (params) => {
+  return axios({
+    url: '/salesReturn/pay',
+    data: params,
+    method: 'post'
+  })
+}
+
+//  销售退货 打印
+export const salesReturnPrint = (params) => {
+  return axios({
+    url: '/salesReturn/print',
+    data: params,
+    method: 'post'
+  })
+}
+
+//  销售退货 打印预览
+export const salesReturnprintPreview = (params) => {
+  return axios({
+    url: '/salesReturn/printPreview',
+    data: params,
+    method: 'post'
+  })
+}
+
+//  销售退货 列表分页
+export const salesReturnList = (params) => {
+  const url = `/salesReturn/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+//  销售退货单保存
+export const salesReturnSave = (params) => {
+  return axios({
+    url: '/salesReturn/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售退货 提交
+export const salesReturnSubmit = (params) => {
+  return axios({
+    url: `/salesReturn/submit/${params.sn}`,
+    method: 'get'
+  })
+}
+// 销售退货 详情  打印
+export const salesReturnDetailPrint = params => {
+  return axios.request({
+    url: `salesReturn/print/${params.sn}/${params.type}`,
+    method: 'get',
+    responseType: 'blob'
+  })
+}

+ 29 - 0
src/api/salesReturnDetail.js

@@ -0,0 +1,29 @@
+import { axios } from '@/utils/request'
+
+//  销售退货详情 列表  分页
+export const salesReturnDetailList = (params) => {
+  const url = `/salesReturnDetail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  销售退货详情 保存
+export const salesReturnDetailSave = (params) => {
+  return axios({
+    url: '/salesReturnDetail/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售退货详情 删除
+export const salesReturnDetailDel = (params) => {
+  return axios({
+    url: `/salesReturnDetail/delete/${params.id}`,
+    data: params,
+    method: 'post'
+  })
+}

+ 110 - 0
src/api/satelliteWH.js

@@ -0,0 +1,110 @@
+import { axios } from '@/utils/request'
+
+//  卫星仓库存  列表  有分页
+export const satelliteWHStockList = (params) => {
+  const url = `/satelliteWHStock/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  卫星仓库存  补货清单  列表
+export const satelliteWHSupplyList = (params) => {
+  const url = `/satelliteWHSupply/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  卫星仓库存  补货清单  新增
+export const satelliteWHSupplyInsert = (params) => {
+  return axios({
+    url: `/satelliteWHSupply/insert/${params.sn}`,
+    data: params.satelliteWarehouseSupply,
+    method: 'post'
+  })
+}
+//  卫星仓库存  补货清单  更新产品数量
+export const satelliteWHSupplyUpdate = (params) => {
+  return axios({
+    url: '/satelliteWHSupply/updateQty',
+    data: params,
+    method: 'post'
+  })
+}
+//  卫星仓库存  补货清单  移除产品
+export const satelliteWHSupplyDel = (params) => {
+  const url = `/satelliteWHSupply/deleteBySn/${params.sn}`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}
+//  卫星仓库存  补货清单  校验库存
+export const satelliteWHSupplyValidateStock = (params) => {
+  const url = `/satelliteWHSupply/validateStock/${params.sn}`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}
+//  卫星仓库存  补货清单  创建销售单
+export const satelliteWHSupplyAddSales = (params) => {
+  const url = `/satelliteWHSupply/createSalesBill/${params.sn}`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}
+//  提现  列表  有分页
+export const satelliteWHWithdrawalList = (params) => {
+  const url = `/satelliteWHWithdrawal/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  提现  账户信息
+export const satelliteWHWithdrawalAccount = (params) => {
+  return axios({
+    url: '/satelliteWHWithdrawal/queryAccount',
+    method: 'get'
+  })
+}
+//  提现  申请提现
+export const satelliteWHWithdrawalApply = (params) => {
+  return axios({
+    url: '/satelliteWHWithdrawal/applyWithdrawal',
+    data: params,
+    method: 'post'
+  })
+}
+
+//  分账  列表  有分页
+export const satelliteWHSeparateList = (params) => {
+  const url = `/satelliteWHSeparate/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  分账  列表  合计
+export const satelliteWHSeparateTotal = (params) => {
+  return axios({
+    url: '/satelliteWHSeparate/findTotalSeparate',
+    data: params,
+    method: 'post'
+  })
+}

+ 0 - 61
src/api/serviceItems.js

@@ -1,61 +0,0 @@
-import { axios } from '@/utils/request'
-
-// 服务项目
-export const getServiceItemData = (params) => {
-  const url = `item/queryLike/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-  return axios.request({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-export const getServiceItemById = (params) => {
-  return axios.request({
-    url: `item/${params.id}`,
-    method: 'get'
-  })
-}
-export const deleteServiceItem = (params) => {
-  return axios.request({
-    url: `item/del/${params.id}`,
-    method: 'get'
-  })
-}
-// 添加
-export const addServiceItems = (params) => {
-  return axios.request({
-    url: 'item/save',
-    data: params,
-    method: 'post'
-  })
-}
-// 获取某个服务类型下单服务标签
-export const getServiceLabels = (params) => {
-  return axios.request({
-    url: 'label/queryList',
-    data: { lableBizKey: params.clsId, lableBizType: 'SERVICE' },
-    method: 'post'
-  })
-}
-// 根据标签查询服务列表
-export const getServerByLabelId = (params) => {
-  return axios.request({
-    url: `item/queryByLabelId/${params.pageNo}/${params.pageSize}`,
-    data: {
-      name: params.queryWord,
-      itemClsId: params.itemClsId,
-      labelId: params.labelId
-    },
-    method: 'post'
-  })
-}
-// 根据服务类别获取标签
-export const getMarkData = (params) => {
-  return axios.request({
-    url: '/label/getLabelName',
-    data: params,
-    method: 'post'
-  })
-}

+ 93 - 0
src/api/settle.js

@@ -0,0 +1,93 @@
+import { axios } from '@/utils/request'
+
+//  单位收付款 列表  分页
+export const settleUnitClientList = (params) => {
+  const url = `/settle/unit/queryClientUnSettlePage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  单位收付款记录 列表 结算记录 分页
+export const settleUnitList = (params) => {
+  const url = `/settle/unit/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  单位收付款 提交收付款
+export const settleUnitSave = (params) => {
+  return axios({
+    url: '/settle/unit/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  单位收付款记录  详情 列表 结算记录 分页
+export const settleUnitDetailList = (params) => {
+  const url = `/settle/unit/detail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  单位收付款记录  详情
+export const settleUnitDetail = (params) => {
+  return axios({
+    url: `/settle/unit/findById/${params.id}`,
+    method: 'get'
+  })
+}
+//  单位收付款记录  合计
+export const settleUnitQuerySum = (params) => {
+  return axios({
+    url: '/settle/unit/querySum',
+    data: params,
+    method: 'post'
+  })
+}
+//  单位收付款 全部单据
+export const settleInfoAllList = (params) => {
+  return axios({
+    url: '/settle/info/queryList',
+    data: params,
+    method: 'post'
+  })
+}
+//  单位收付款 列表 分页
+export const settleInfoList = (params) => {
+  const url = `/settle/info/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  单位收付款  详情 合计
+export const settleInfoQueryReceiptOrPaySum = (params) => {
+  return axios({
+    url: '/settle/info/queryReceiptOrPaySum',
+    data: params,
+    method: 'post'
+  })
+}
+//  单位收付款  列表 合计
+export const settleInfoQuerySum = (params) => {
+  return axios({
+    url: '/settle/info/querySum',
+    data: params,
+    method: 'post'
+  })
+}

+ 61 - 0
src/api/settleExpense.js

@@ -0,0 +1,61 @@
+import { axios } from '@/utils/request'
+
+// 列表
+export const settleExpenseQuery = (params) => {
+  return axios({
+    url: `settle/expense/queryPage/${params.pageNo}/${params.pageSize}`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 不带分页列表
+export const settleExpenseQueryAll = (params) => {
+  return axios({
+    url: `settle/expense/queryList`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 新建
+export const settleExpenseSave = (params) => {
+  return axios({
+    url: `settle/expense/save`,
+    data: params,
+    method: 'post'
+  })
+}
+ 
+// 费用列表汇总
+export const settleExpenseQuerySum = (params) => {
+  return axios({
+    url: `settle/expense/querySum`,
+    data: params,
+    method: 'post'
+  })
+}
+ 
+// 详情
+export const findExpenseDetail = (params) => {
+  return axios({
+    url: `settle/expense/findById/${params.id}`,
+    method: 'get'
+  })
+}
+
+// 删除
+export const delExpense = (params) => {
+  return axios({
+    url: `settle/expense/delete/${params.id}`,
+    method: 'get'
+  })
+}
+
+// 审核
+export const auditExpense = (params) => {
+  return axios({
+    url: `settle/expense/audit/${params.id}`,
+    method: 'get'
+  })
+}

+ 71 - 0
src/api/settlePay.js

@@ -0,0 +1,71 @@
+import { axios } from '@/utils/request'
+
+// 列表
+export const settlePayQuery = (params) => {
+  return axios({
+    url: `settle/pay/queryPage/${params.pageNo}/${params.pageSize}`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 不带分页列表
+export const settlePayQueryAll = (params) => {
+  return axios({
+    url: `settle/pay/queryList`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 新建付款
+export const settlePaySave = (params) => {
+  return axios({
+    url: `settle/pay/save`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 查询总计
+export const settlePayQuerySum = (params) => {
+  return axios({
+    url: `settle/pay/querySum`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 根据类型查询总计
+export const queryByTypeSum = (params) => {
+  return axios({
+    url: `settle/pay/queryByType`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 付款
+export const settlePayMoney = (params) => {
+  return axios({
+    url: `settle/pay/payBatch`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 付款详情(凭证查询)
+export const findPayDetail = (params) => {
+  return axios({
+    url: `settle/pay/findById/${params.id}`,
+    method: 'get'
+  })
+}
+
+// 删除付款
+export const delPay = (params) => {
+  return axios({
+    url: `settle/pay/delete/${params.id}`,
+    method: 'get'
+  })
+}

+ 71 - 0
src/api/settleReceipt.js

@@ -0,0 +1,71 @@
+import { axios } from '@/utils/request'
+
+// 列表
+export const settleReceiptQuery = (params) => {
+  return axios({
+    url: `settle/receipt/queryPage/${params.pageNo}/${params.pageSize}`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 不带分页列表
+export const settleReceiptQueryAll = (params) => {
+  return axios({
+    url: `settle/receipt/queryList`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 新建收款
+export const settleReceiptSave = (params) => {
+  return axios({
+    url: `settle/receipt/save`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 查询总计
+export const settleReceiptQuerySum = (params) => {
+  return axios({
+    url: `settle/receipt/querySum`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 根据类型查询总计
+export const queryByTypeSum = (params) => {
+  return axios({
+    url: `settle/receipt/queryByType`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 付款
+export const settleReceiptMoney = (params) => {
+  return axios({
+    url: `settle/receipt/receiptBatch`,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 付款详情(凭证查询)
+export const findReceiptDetail = (params) => {
+  return axios({
+    url: `settle/receipt/findById/${params.id}`,
+    method: 'get'
+  })
+}
+
+// 删除付款
+export const delReceipt = (params) => {
+  return axios({
+    url: `settle/receipt/delete/${params.id}`,
+    method: 'get'
+  })
+}

+ 10 - 0
src/api/settleStyle.js

@@ -0,0 +1,10 @@
+import { axios } from '@/utils/request'
+
+//  结算方式列表
+export const settleStyleQueryAll = (params) => {
+  return axios({
+    url: '/settleStyle/findAll',
+    data: params,
+    method: 'post'
+  })
+}

+ 33 - 0
src/api/shippingAddress.js

@@ -0,0 +1,33 @@
+import { axios } from '@/utils/request'
+
+//  收货地址 列表
+export const shippingAddressQuery = (params) => {
+  return axios({
+    url: '/shippingAddress/queryList',
+    data: params,
+    method: 'post'
+  })
+}
+//  收货地址 保存
+export const shippingAddressSave = (params) => {
+  return axios({
+    url: '/shippingAddress/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  收货地址 设置默认
+export const shippingAddressSet = (params) => {
+  return axios({
+    url: `/shippingAddress/setDefault/${params.id}`,
+    method: 'get'
+  })
+}
+//  收货地址 删除
+export const shippingAddressDel = (params) => {
+  return axios({
+    url: `/shippingAddress/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}

+ 110 - 0
src/api/sparePartsPur.js

@@ -0,0 +1,110 @@
+import { axios } from '@/utils/request'
+
+//  散件采购(入库)列表  分页
+export const sparePartsPurList = (params) => {
+  const url = `/sparePartsPur/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  散件采购(入库) 列表 合计
+export const sparePartsPurCount = (params) => {
+  return axios({
+    url: '/sparePartsPur/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
+//  散件采购(入库) 新增
+export const sparePartsPurSave = (params) => {
+  return axios({
+    url: '/sparePartsPur/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  散件采购(入库) 提交
+export const sparePartsPurSubmit = (params) => {
+  return axios({
+    url: '/sparePartsPur/submit',
+    data: params,
+    method: 'post'
+  })
+}
+//  散件采购(入库) 入库
+export const sparePartsPurPut = (params) => {
+  return axios({
+    url: '/sparePartsPur/put',
+    data: params,
+    method: 'post'
+  })
+}
+//  散件采购(入库) 删除
+export const sparePartsPurDel = (params) => {
+  return axios({
+    url: `/sparePartsPur/delete/${params.id}`,
+    method: 'get'
+  })
+}
+//  散件采购(入库) 导出
+export const sparePartsPurExport = (params) => {
+  return axios({
+    url: '/sparePartsPur/exportExcel',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+//  散件采购(入库) 详情
+export const sparePartsPurDetail = (params) => {
+  return axios({
+    url: `/sparePartsPur/findById/${params.id}`,
+    method: 'get'
+  })
+}
+//  散件采购(入库)详情列表  分页
+export const sparePartsPurDetailList = (params) => {
+  const url = `/sparePartsPur/detail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  散件采购(入库) 详情列表 合计
+export const sparePartsPurDetailCount = (params) => {
+  return axios({
+    url: '/sparePartsPur/detail/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
+//  散件采购(入库) 详情列表 保存
+export const sparePartsPurDetailSave = (params) => {
+  return axios({
+    url: '/sparePartsPur/detail/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  散件采购(入库) 详情列表 删除
+export const sparePartsPurDetailDel = (params) => {
+  return axios({
+    url: `/sparePartsPur/detail/delete/${params.id}`,
+    method: 'get'
+  })
+}
+// 散件采购(入库) 详情  打印
+export const sparePartsPurDetailPrint = params => {
+  return axios.request({
+    url: `sparePartsPur/print/${params.sn}/${params.type}`,
+    method: 'get',
+    responseType: 'blob'
+  })
+}

+ 39 - 0
src/api/sparePartsPutType.js

@@ -0,0 +1,39 @@
+import { axios } from '@/utils/request'
+
+//  散件入库类型类型 列表  分页
+export const sparePartsPutTypeList = (params) => {
+  const url = `/sparePartsPutType/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  散件入库类型类型 列表  不分页
+export const sparePartsPutTypeAllList = (params) => {
+  return axios({
+    url: `/sparePartsPutType/queryList`,
+    data: {},
+    method: 'post'
+  })
+}
+
+// 新增/编辑 散件入库类型类型
+export const sparePartsPutTypeSave = params => {
+  return axios({
+    url: '/sparePartsPutType/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 删除 散件入库类型类型
+export const sparePartsPutTypeDel = params => {
+  return axios({
+    url: `/sparePartsPutType/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}

+ 24 - 0
src/api/sparePartsRet.js

@@ -0,0 +1,24 @@
+import { axios } from '@/utils/request'
+
+//  散件退货列表  分页
+export const sparePartsRetList = (params) => {
+  const url = `/sparePartsRet/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  散件退货详情列表  分页
+export const sparePartsRetDetailList = (params) => {
+  const url = `/sparePartsRet/queryDetailPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 70 - 0
src/api/stock.js

@@ -0,0 +1,70 @@
+import { axios } from '@/utils/request'
+
+//  库存列表  分页
+export const stockList = (params) => {
+  const url = `/stock/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  库存 列表 合计
+export const stockCount = (params) => {
+  return axios({
+    url: '/stock/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
+//  库存 导出
+export const stockExport = (params) => {
+  return axios({
+    url: '/stock/exportExcel',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+//  库存 详情列表  分页
+export const stockDetailList = (params) => {
+  const url = `/stock/detail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  库存 详情列表 合计
+export const stockDetailCount = (params) => {
+  return axios({
+    url: '/stock/detail/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
+
+//  库存 详情列表  分页
+export const querySumByProductLocation = (params) => {
+  const url = `/stock/detail/querySumByProductLocation/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  出入库明细  列表  合计
+export const stockByProductSn = (params) => {
+  const url = `/stock/findByProductSn/${params.productSn}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 22 - 0
src/api/stockFlow.js

@@ -0,0 +1,22 @@
+import { axios } from '@/utils/request'
+
+//  库存流水(出入库明细) 列表  有分页
+export const stockFlowList = (params) => {
+  const url = `/stockFlow/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+//  库存流水(出入库明细)  合计
+export const stockFlowCount = (params) => {
+  return axios({
+    url: '/stockFlow/queryPageCount',
+    data: params,
+    method: 'post'
+  })
+}

+ 21 - 0
src/api/stockOut.js

@@ -0,0 +1,21 @@
+import { axios } from '@/utils/request'
+
+//  出库 列表  有分页
+export const stockOutList = (params) => {
+  const url = `/stockOut/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  出库 出库
+export const stockOutOut = (params) => {
+  return axios({
+    url: '/stockOut/out',
+    data: params,
+    method: 'post'
+  })
+}

+ 21 - 0
src/api/stockWarn.js

@@ -0,0 +1,21 @@
+import { axios } from '@/utils/request'
+
+//  库存预警 列表  分页
+export const stockWarnList = (params) => {
+  const url = `/stockWarn/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  库存预警 保存
+export const stockWarnSaveBatch = (params) => {
+  return axios({
+    url: '/stockWarn/saveBatch',
+    data: params,
+    method: 'post'
+  })
+}

+ 109 - 0
src/api/storeCallOut.js

@@ -0,0 +1,109 @@
+import { axios } from '@/utils/request'
+
+//  店内调出 列表  分页
+export const storeCallOutList = (params) => {
+  const url = `/storeCallOut/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  店内调出 新增
+export const storeCallOutSave = (params) => {
+  return axios({
+    url: '/storeCallOut/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  店内调出 审核
+export const storeCallOutAudit = (params) => {
+  return axios({
+    url: '/storeCallOut/audit',
+    data: params,
+    method: 'post'
+  })
+}
+//  店内调出 出库
+export const storeCallOutOut = (params) => {
+  return axios({
+    url: '/storeCallOut/out',
+    data: params,
+    method: 'post'
+  })
+}
+//  店内调出 删除
+export const storeCallOutDel = (params) => {
+  return axios({
+    url: `/storeCallOut/delete/${params.id}`,
+    method: 'get'
+  })
+}
+//  店内调出 详情
+export const storeCallOutDetail = (params) => {
+  return axios({
+    url: `/storeCallOut/findById/${params.id}`,
+    method: 'get'
+  })
+}
+//  店内调出 详情  根据sn查
+export const storeCallOutDetailSn = (params) => {
+  return axios({
+    url: `/storeCallOut/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}
+//  店内调出  提交
+export const storeCallOutSubmit = (params) => {
+  return axios({
+    url: '/storeCallOut/submit',
+    data: params,
+    method: 'post'
+  })
+}
+//  店内调出详情 列表  分页
+export const storeCallOutDetailList = (params) => {
+  const url = `/storeCallOut/detail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  店内调出详情 合计
+export const storeCallOutDetailCount = (params) => {
+  return axios({
+    url: '/storeCallOut/detail/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
+//  店内调出详情 保存
+export const storeCallOutDetailSave = (params) => {
+  return axios({
+    url: '/storeCallOut/detail/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  店内调出详情 删除
+export const storeCallOutDetailDel = (params) => {
+  return axios({
+    url: '/storeCallOut/detail/delete',
+    data: params,
+    method: 'post'
+  })
+}
+// 店内调出 详情  打印
+export const storeCallOutDetailPrint = params => {
+  return axios.request({
+    url: `storeCallOut/print/${params.sn}/${params.type}/${params.costFlag}`,
+    method: 'get',
+    responseType: 'blob'
+  })
+}

+ 39 - 0
src/api/storeCallOutType.js

@@ -0,0 +1,39 @@
+import { axios } from '@/utils/request'
+
+//  店内调出类型 列表  分页
+export const storeCallOutTypeList = (params) => {
+  const url = `/storeCallOutType/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  店内调出类型 列表  不分页
+export const storeCallOutTypeAllList = (params) => {
+  return axios({
+    url: `/storeCallOutType/queryList`,
+    data: {},
+    method: 'post'
+  })
+}
+
+// 新增/编辑 店内调出类型
+export const storeCallOutTypeSave = params => {
+  return axios({
+    url: '/storeCallOutType/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 删除 店内调出类型
+export const storeCallOutTypeDel = params => {
+  return axios({
+    url: `/storeCallOutType/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}

+ 45 - 0
src/api/supplier.js

@@ -0,0 +1,45 @@
+import { axios } from '@/utils/request'
+
+//  供应商 列表  有分页
+export const supplierList = (params) => {
+  const url = `/supplier/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  供应商 列表  无分页
+export const supplierAllList = (params) => {
+  return axios({
+    url: '/supplier/queryList',
+    data: {},
+    method: 'post'
+  })
+}
+//  供应商 详情
+export const supplierDetail = (params) => {
+  return axios({
+    url: `/supplier/findById/${params.id}`,
+    data: params,
+    method: 'get'
+  })
+}
+//  供应商 保存
+export const supplierSave = (params) => {
+  return axios({
+    url: '/supplier/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  供应商 删除
+export const supplierDel = (params) => {
+  return axios({
+    url: `/supplier/delete/${params.id}`,
+    data: params,
+    method: 'post'
+  })
+}

+ 0 - 31
src/api/tenants.js

@@ -1,31 +0,0 @@
-import { axios } from '@/utils/request'
-
-// 获取列表数据
-export const getTenantsList = params => {
-  const url = `/org/apply/queryLike/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-  return axios({
-    url: url,
-    data: params,
-    method: 'POST'
-  })
-}
-
-// 启用禁用
-export const enable = params => {
-  return axios({
-    url: '/org/apply/enable',
-    data: params,
-    method: 'POST'
-  })
-}
-
-// 授权
-export const saveAuth = params => {
-  return axios({
-    url: '/org/apply/auth',
-    data: params,
-    method: 'POST'
-  })
-}

+ 0 - 48
src/api/theme.js

@@ -1,48 +0,0 @@
-import { axios } from '@/utils/request'
-
-// 活动主题 根据模板id查询模板主题
-export const getThemeByMouldId = (params) => {
-  return axios.request({
-    url: `static/mould/theme/queryByMouldId/${params.staticMouldId}`,
-    method: 'get',
-    data: {}
-  })
-}
-// 带分页
-export const getThemeList = (params) => {
-  const url = `/static/mould/theme/queryLike/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-export const saveTheme = (params) => {
-  return axios({
-    url: '/static/mould/theme/save',
-    data: params,
-    method: 'post'
-  })
-}
-export const delTheme = (params) => {
-  return axios({
-    url: `/static/mould/theme/delete/${params.id}`,
-    method: 'get'
-  })
-}
-// 改变状态接口
-export const updateEnableStatus = params => {
-  return axios({
-    url: `/static/mould/theme/enable/${params.id}/${params.flag}`,
-    method: 'get'
-  })
-}
-// 查详细
-export const getThemeDetail = (params) => {
-  return axios({
-    url: `/static/mould/theme/${params.id}`,
-    method: 'get'
-  })
-}

+ 0 - 39
src/api/tpl.js

@@ -1,39 +0,0 @@
-import { axios } from '@/utils/request'
-
-export const getTplList = (params) => {
-  const url = `/static/mould/queryLike/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-export const saveTpl = (params) => {
-  return axios({
-    url: '/static/mould/save',
-    data: params,
-    method: 'post'
-  })
-}
-export const delTpl = (params) => {
-  return axios({
-    url: `/static/mould/delete/${params.id}`,
-    method: 'get'
-  })
-}
-// 改变状态接口
-export const updateEnableStatus = params => {
-  return axios({
-    url: `/static/mould/enable/${params.id}/${params.flag}`,
-    method: 'get'
-  })
-}
-// 查详细
-export const getTplDetail = (params) => {
-  return axios({
-    url: `/static/mould/${params.id}`,
-    method: 'get'
-  })
-}

+ 63 - 0
src/api/urgent.js

@@ -0,0 +1,63 @@
+import { axios } from '@/utils/request'
+
+//  急件 列表  有分页
+export const urgentList = (params) => {
+  const url = `/urgent/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  急件 打印
+export const urgentPrint = (params) => {
+  return axios({
+    url: '/urgent/print',
+    data: params,
+    method: 'post'
+  })
+}
+//  急件 打印预览
+export const urgentPrintPreview = (params) => {
+  return axios({
+    url: '/urgent/printPreview',
+    data: params,
+    method: 'post'
+  })
+}
+//  急件 冲减
+export const urgentWriteDown = (params) => {
+  return axios({
+    url: `/urgent/writeDownBySn/${params.urgentBillSn}`,
+    data: {},
+    method: 'get'
+  })
+}
+//  急件 详情
+export const urgentDetail = (params) => {
+  return axios({
+    url: `/urgent/findById/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}
+//  急件 详情  根据sn查
+export const urgentDetailSn = (params) => {
+  return axios({
+    url: `/urgent/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}
+//  急件详情列表  有分页
+export const urgentDetailList = (params) => {
+  const url = `/urgentDetail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 43 - 0
src/api/userOrg.js

@@ -0,0 +1,43 @@
+import { axios } from '@/utils/request'
+
+//  中心店用户授权 列表  有分页
+export const userOrgList = (params) => {
+  const url = `/userOrg/queryUserPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 中心店用户授权  删除
+export const userOrgDel = (params) => {
+  return axios({
+    url: `/userOrg/deleteByUserSn/${params.sn}`,
+    method: 'get'
+  })
+}
+// 中心店用户授权  保存
+export const userOrgSave = (params) => {
+  return axios({
+    url: '/userOrg/saveUserOrg',
+    data: params,
+    method: 'post'
+  })
+}
+// 中心店用户授权  详情
+export const userOrgDetail = (params) => {
+  return axios({
+    url: `/userOrg/findByUserSn/${params.sn}`,
+    method: 'get'
+  })
+}
+//  中心店用户授权 账号  有分页
+export const userOrgUserList = (params) => {
+  return axios({
+    url: '/userOrg/queryUserByOrgSn',
+    data: params,
+    method: 'post'
+  })
+}

+ 0 - 80
src/api/videoSetting.js

@@ -1,80 +0,0 @@
-import { axios } from '@/utils/request'
-
-// 列表查询
-export const getSettingList = (params) => {
-  const url = `zycar-mgr/business/experience/queryLike/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-
-// 状态改变
-export const changeStatus = (params) => {
-  const url = `zycar-mgr/business/experience/enable/${params.id}/${params.flag}`
-  return axios({
-    url: url,
-    data: {},
-    method: 'get'
-  })
-}
-
-// 删除
-export const deleteItem = (params) => {
-  const url = `zycar-mgr/business/experience/delete/${params.id}`
-  return axios({
-    url: url,
-    data: {},
-    method: 'get'
-  })
-}
-
-// 保存
-export const saveItem = (params) => {
-  const url = `zycar-mgr/business/experience/save`
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-
-// 查详情
-export const searchDetail = (params) => {
-  const url = `zycar-mgr/business/experience/${params.id}`
-  return axios({
-    url: url,
-    data: params,
-    method: 'get'
-  })
-}
-
-// 关联广告图
-export const aboutaDvertisementImg = (params) => {
-  return axios.request({
-    url: `zycar-mgr/banner/query`,
-    data: { position: params.position },
-    method: 'post'
-  })
-}
-// 排序 上移 下移
-export const setSort = (params) => {
-  const url = `zycar-mgr/business/experience/setSort/${params.idThis}/${params.idThat}`
-  return axios({
-    url: url,
-    data: {},
-    method: 'get'
-  })
-}
-// 排序 置顶
-export const setTop = (params) => {
-  const url = `zycar-mgr/business/experience/setTop/${params.id}`
-  return axios({
-    url: url,
-    data: {},
-    method: 'get'
-  })
-}

+ 86 - 0
src/api/warehouse.js

@@ -0,0 +1,86 @@
+import { axios } from '@/utils/request'
+
+//  仓库列表  有分页
+export const warehouseList = (params) => {
+  const url = `/warehouse/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  仓库列表  无分页
+export const warehouseAllList = (params) => {
+  const url = '/warehouse/queryList'
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  仓库仓位  级联数据
+export const warehouseCascadeList = (params) => {
+  const url = '/warehouse/queryListWithExt'
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 新增/编辑仓库
+export const warehouseSave = params => {
+  return axios({
+    url: '/warehouse/save',
+    data: params,
+    method: 'post'
+  })
+}
+// 删除仓库
+export const warehouseDel = params => {
+  return axios({
+    url: `/warehouse/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}
+
+//  仓位列表  有分页
+export const warehouseLocList = (params) => {
+  const url = `/warehouseLoc/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  仓位列表  无分页
+export const warehouseLocAllList = (params) => {
+  const url = '/warehouseLoc/queryList'
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 新增/编辑仓位
+export const warehouseLocSave = params => {
+  return axios({
+    url: '/warehouseLoc/save',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 删除仓位
+export const warehouseLocDel = params => {
+  return axios({
+    url: `/warehouseLoc/delete/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}

+ 1 - 0
src/components/GlobalHeader/GlobalHeader.vue

@@ -74,6 +74,7 @@ export default {
   },
   },
   mounted () {
   mounted () {
     document.addEventListener('scroll', this.handleScroll, { passive: true })
     document.addEventListener('scroll', this.handleScroll, { passive: true })
+    console.log(this.multiTab)
   },
   },
   methods: {
   methods: {
     handleScroll () {
     handleScroll () {

+ 27 - 19
src/components/MultiTab/MultiTab.vue

@@ -6,6 +6,7 @@ export default {
   data () {
   data () {
     return {
     return {
       fullPathList: [],
       fullPathList: [],
+      tabsList: [],
       pages: [],
       pages: [],
       activeKey: '',
       activeKey: '',
       newTabIndex: 0
       newTabIndex: 0
@@ -35,7 +36,7 @@ export default {
     })
     })
 
 
     this.pages.push(this.$route)
     this.pages.push(this.$route)
-    this.fullPathList.push(this.$route.fullPath)
+    this.tabsList.push(this.$route.name)
     this.selectedLastPath()
     this.selectedLastPath()
   },
   },
   methods: {
   methods: {
@@ -43,30 +44,30 @@ export default {
       this[action](targetKey)
       this[action](targetKey)
     },
     },
     remove (targetKey) {
     remove (targetKey) {
-      this.pages = this.pages.filter(page => page.fullPath !== targetKey)
-      this.fullPathList = this.fullPathList.filter(path => path !== targetKey)
+      this.pages = this.pages.filter(page => page.name !== targetKey)
+      this.tabsList = this.tabsList.filter(name => name !== targetKey)
       // 判断当前标签是否关闭,若关闭则跳转到最后一个还存在的标签页
       // 判断当前标签是否关闭,若关闭则跳转到最后一个还存在的标签页
-      if (!this.fullPathList.includes(this.activeKey)) {
+      if (!this.tabsList.includes(this.activeKey)) {
         this.selectedLastPath()
         this.selectedLastPath()
       }
       }
     },
     },
     selectedLastPath () {
     selectedLastPath () {
-      this.activeKey = this.fullPathList[this.fullPathList.length - 1]
+      this.activeKey = this.tabsList[this.tabsList.length - 1]
     },
     },
 
 
     // content menu
     // content menu
     closeThat (e) {
     closeThat (e) {
       // 判断是否为最后一个标签页,如果是最后一个,则无法被关闭
       // 判断是否为最后一个标签页,如果是最后一个,则无法被关闭
-      if (this.fullPathList.length > 1) {
+      if (this.tabsList.length > 1) {
         this.remove(e)
         this.remove(e)
       } else {
       } else {
         this.$message.info('这是最后一个标签了, 无法被关闭')
         this.$message.info('这是最后一个标签了, 无法被关闭')
       }
       }
     },
     },
     closeLeft (e) {
     closeLeft (e) {
-      const currentIndex = this.fullPathList.indexOf(e)
+      const currentIndex = this.tabsList.indexOf(e)
       if (currentIndex > 0) {
       if (currentIndex > 0) {
-        this.fullPathList.forEach((item, index) => {
+        this.tabsList.forEach((item, index) => {
           if (index < currentIndex) {
           if (index < currentIndex) {
             this.remove(item)
             this.remove(item)
           }
           }
@@ -76,9 +77,9 @@ export default {
       }
       }
     },
     },
     closeRight (e) {
     closeRight (e) {
-      const currentIndex = this.fullPathList.indexOf(e)
-      if (currentIndex < (this.fullPathList.length - 1)) {
-        this.fullPathList.forEach((item, index) => {
+      const currentIndex = this.tabsList.indexOf(e)
+      if (currentIndex < (this.tabsList.length - 1)) {
+        this.tabsList.forEach((item, index) => {
           if (index > currentIndex) {
           if (index > currentIndex) {
             this.remove(item)
             this.remove(item)
           }
           }
@@ -88,8 +89,8 @@ export default {
       }
       }
     },
     },
     closeAll (e) {
     closeAll (e) {
-      const currentIndex = this.fullPathList.indexOf(e)
-      this.fullPathList.forEach((item, index) => {
+      const currentIndex = this.tabsList.indexOf(e)
+      this.tabsList.forEach((item, index) => {
         if (index !== currentIndex) {
         if (index !== currentIndex) {
           this.remove(item)
           this.remove(item)
         }
         }
@@ -121,14 +122,21 @@ export default {
   },
   },
   watch: {
   watch: {
     '$route': function (newVal) {
     '$route': function (newVal) {
-      this.activeKey = newVal.fullPath
-      if (this.fullPathList.indexOf(newVal.fullPath) < 0) {
-        this.fullPathList.push(newVal.fullPath)
+      this.activeKey = newVal.name
+      const index = this.tabsList.indexOf(newVal.name)
+      // 不存在
+      if (index < 0) {
+        this.tabsList.push(newVal.name)
         this.pages.push(newVal)
         this.pages.push(newVal)
+      } else {
+        // 已存在
+        this.pages.splice(index, 1, newVal)
       }
       }
     },
     },
     activeKey: function (newPathKey) {
     activeKey: function (newPathKey) {
-      this.$router.push({ path: newPathKey })
+      const row = this.pages.find(item => item.name == newPathKey)
+      console.log(row.fullPath)
+      this.$router.push({ path: row.fullPath })
     }
     }
   },
   },
   render () {
   render () {
@@ -137,10 +145,10 @@ export default {
       return (
       return (
         <a-tab-pane
         <a-tab-pane
           style={{ height: 0 }}
           style={{ height: 0 }}
-          key={page.fullPath} closable={pages.length > 1}
+          key={page.name} closable={pages.length > 1}
         >
         >
           <span slot="tab">
           <span slot="tab">
-            {this.renderTabPane(page.meta.customTitle || page.meta.title, page.fullPath)}
+            {this.renderTabPane(page.meta.customTitle || page.meta.title, page.name)}
           </span>
           </span>
         </a-tab-pane>)
         </a-tab-pane>)
     })
     })

+ 55 - 12
src/components/NoticeIcon/NoticeIcon.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <a-popover
+  <!-- <a-popover
     v-model="visible"
     v-model="visible"
     trigger="click"
     trigger="click"
     placement="bottomRight"
     placement="bottomRight"
@@ -12,7 +12,7 @@
     <template slot="content">
     <template slot="content">
       <a-spin :spinning="loading">
       <a-spin :spinning="loading">
         <a-tabs>
         <a-tabs>
-          <a-tab-pane tab="通知" key="1">
+          <a-tab-pane tab="公告" key="1">
             <a-list>
             <a-list>
               <a-list-item>
               <a-list-item>
                 <a-list-item-meta title="你收到了 14 份新周报" description="一年前">
                 <a-list-item-meta title="你收到了 14 份新周报" description="一年前">
@@ -45,10 +45,16 @@
         <a-icon style="font-size: 16px; padding: 4px" type="bell" />
         <a-icon style="font-size: 16px; padding: 4px" type="bell" />
       </a-badge>
       </a-badge>
     </span>
     </span>
-  </a-popover>
+  </a-popover> -->
+  <span @click="fetchNotice" class="header-notice" ref="noticeRef">
+    <a-badge :count="unreadCount">
+      <a-icon style="font-size: 16px; padding: 0 5px" type="bell" />
+    </a-badge>
+  </span>
 </template>
 </template>
 
 
 <script>
 <script>
+import { mapGetters, mapActions } from 'vuex'
 export default {
 export default {
   name: 'HeaderNotice',
   name: 'HeaderNotice',
   data () {
   data () {
@@ -57,17 +63,54 @@ export default {
       visible: false
       visible: false
     }
     }
   },
   },
+  computed: {
+    ...mapGetters([
+      'unreadCount'
+    ]),
+    unreadCount () {
+      return this.$store.getters.unreadCount
+    },
+    // 接受到ws消息
+    wsMessage () {
+      return this.$store.getters.wsMessageData()
+    }
+  },
+  mounted () {
+    // webSocket 连接
+    this.WEBSOCKET_INIT()
+  },
+  destroyed () {
+    this.WEBSOCKET_CLOSE()
+  },
   methods: {
   methods: {
+    ...mapActions([
+      'WEBSOCKET_INIT',
+      'WEBSOCKET_CLOSE',
+      'updateUnreadcount'
+    ]),
     fetchNotice () {
     fetchNotice () {
-      if (!this.visible) {
-        this.loading = true
-        setTimeout(() => {
-          this.loading = false
-        }, 2000)
-      } else {
-        this.loading = false
+      // if (!this.visible) {
+      //   this.loading = true
+      //   setTimeout(() => {
+      //     this.loading = false
+      //   }, 2000)
+      // } else {
+      //   this.loading = false
+      // }
+      // this.visible = !this.visible
+      this.$router.push({ path: '/notice' })
+    }
+  },
+  watch: {
+    // 监听ws消息通知
+    wsMessage (a, b) {
+      if (a !== b && a) {
+        console.log(a)
+        // 新未读消息
+        if (a.type == 'no_read_count') {
+          this.updateUnreadcount(a.data.no_read_count)
+        }
       }
       }
-      this.visible = !this.visible
     }
     }
   }
   }
 }
 }
@@ -82,7 +125,7 @@ export default {
   .header-notice{
   .header-notice{
     display: inline-block;
     display: inline-block;
     transition: all 0.3s;
     transition: all 0.3s;
-
+    margin: 0 10px;
     span {
     span {
       vertical-align: initial;
       vertical-align: initial;
     }
     }

+ 1 - 1
src/components/PageHeader/PageHeader.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <div class="page-header">
   <div class="page-header">
     <div class="page-header-index-wide">
     <div class="page-header-index-wide">
-      <s-breadcrumb />
+      <!-- <s-breadcrumb /> -->
       <div class="detail">
       <div class="detail">
         <div class="main" v-if="!$route.meta.hiddenHeaderContent">
         <div class="main" v-if="!$route.meta.hiddenHeaderContent">
           <!-- <div class="row">
           <!-- <div class="row">

+ 6 - 11
src/components/Select/index.js

@@ -29,19 +29,14 @@ export default {
   }),
   }),
   created () {
   created () {
     const _this = this
     const _this = this
-    console.log(_this.code, '_this.code')
-    Promise.all([listLookUp({ code: '' }), getLookUpData({
+    // console.log(_this.code, '_this.code')
+    getLookUpData({
       pageNo: 1,
       pageNo: 1,
       pageSize: 1000,
       pageSize: 1000,
       lookupCode: _this.code
       lookupCode: _this.code
-    })]).then(results => {
-      const _all = results[0]
-      const _data = results[1]
-      if (_all.status + '' === '200' && _data.status + '' === '200') {
-        _this.dataList = _data.data.list
-        const a = _.find(_all.data, ['code', _this.code])
-        console.log(a)
-        _this.placeholderText = '请选择' + (a != undefined ? a.name : '')
+    }).then(res => {
+      if (res.status == 200) {
+        _this.dataList = res.data.list
       }
       }
     })
     })
   },
   },
@@ -79,8 +74,8 @@ export default {
 
 
     const on = {
     const on = {
       change: obj => {
       change: obj => {
-        this.$emit('change', obj, _.find(this.dataList, ['code', obj]))
         this.$emit('input', obj)
         this.$emit('input', obj)
+        this.$emit('change', obj, _.find(this.dataList, ['code', obj]))
       }
       }
     }
     }
     if (this.showType === 'tabs') {
     if (this.showType === 'tabs') {

+ 26 - 6
src/components/Table/index.js

@@ -19,6 +19,10 @@ export default {
       type: [String, Function],
       type: [String, Function],
       default: 'key'
       default: 'key'
     },
     },
+    rowClassName: {
+      type: [String, Function],
+      default: ''
+    },
     data: {
     data: {
       type: Function,
       type: Function,
       required: true
       required: true
@@ -74,6 +78,19 @@ export default {
     pageURI: {
     pageURI: {
       type: Boolean,
       type: Boolean,
       default: false
       default: false
+    },
+    /** 是否首次加载数据 */
+    defaultLoadData: {
+      type: Boolean,
+      default: true
+    },
+    tableId: {
+      type: String,
+      default: ''
+    },
+    index: {
+      type: [String,Number],
+      default: ''
     }
     }
   }),
   }),
   watch: {
   watch: {
@@ -112,7 +129,9 @@ export default {
     }) || false
     }) || false
     console.log('this.localPagination', this.localPagination)
     console.log('this.localPagination', this.localPagination)
     this.needTotalList = this.initTotalList(this.columns)
     this.needTotalList = this.initTotalList(this.columns)
-    this.loadData()
+    if(this.defaultLoadData){
+      this.loadData()
+    }
   },
   },
   methods: {
   methods: {
     /**
     /**
@@ -138,7 +157,9 @@ export default {
         pageNo: (pagination && pagination.current) ||
         pageNo: (pagination && pagination.current) ||
           this.showPagination && this.localPagination.current || this.pageNum,
           this.showPagination && this.localPagination.current || this.pageNum,
         pageSize: (pagination && pagination.pageSize) ||
         pageSize: (pagination && pagination.pageSize) ||
-          this.showPagination && this.localPagination.pageSize || this.pageSize
+          this.showPagination && this.localPagination.pageSize || this.pageSize,
+        tableId: this.tableId,
+        index: this.index
       },
       },
       (sorter && sorter.field && {
       (sorter && sorter.field && {
         sortField: sorter.field
         sortField: sorter.field
@@ -155,11 +176,11 @@ export default {
       // eslint-disable-next-line
       // eslint-disable-next-line
       if ((typeof result === 'object' || typeof result === 'function') && typeof result.then === 'function') {
       if ((typeof result === 'object' || typeof result === 'function') && typeof result.then === 'function') {
         result.then(r => {
         result.then(r => {
-          let list = r.list || r.data || r
+          const list = r.list || r.data || r
           console.log(r,'rrrrrrrrrr')
           console.log(r,'rrrrrrrrrr')
           this.localPagination = this.showPagination && Object.assign({}, this.localPagination, {
           this.localPagination = this.showPagination && Object.assign({}, this.localPagination, {
             current: r.pageNo, // 返回结果中的当前分页数
             current: r.pageNo, // 返回结果中的当前分页数
-            total: r.count, // 返回结果中的总记录数
+            total: Number(r.count), // 返回结果中的总记录数
             showSizeChanger: this.showSizeChanger,
             showSizeChanger: this.showSizeChanger,
             pageSize: (pagination && pagination.pageSize) ||
             pageSize: (pagination && pagination.pageSize) ||
               this.localPagination.pageSize
               this.localPagination.pageSize
@@ -175,12 +196,11 @@ export default {
           // 当情况满足时,表示数据不满足分页大小,关闭 table 分页功能
           // 当情况满足时,表示数据不满足分页大小,关闭 table 分页功能
           try {
           try {
             if ((['auto', true].includes(this.showPagination) && r.count <= (r.pageNo * this.localPagination.pageSize))) {
             if ((['auto', true].includes(this.showPagination) && r.count <= (r.pageNo * this.localPagination.pageSize))) {
-              this.localPagination.hideOnSinglePage = true
+              // this.localPagination.hideOnSinglePage = true
             }
             }
           } catch (e) {
           } catch (e) {
             this.localPagination = false
             this.localPagination = false
           }
           }
-          console.log('loadData -> this.localPagination', this.localPagination)
           this.localDataSource = list // 返回结果中的数组数据
           this.localDataSource = list // 返回结果中的数组数据
           this.localLoading = false
           this.localLoading = false
         })
         })

+ 201 - 3
src/components/global.less

@@ -477,7 +477,8 @@ body {
   padding: 4px 0;
   padding: 4px 0;
 
 
   .ant-dropdown-menu-item {
   .ant-dropdown-menu-item {
-    width: 160px;
+    // width: 160px;
+    width: 100%;
   }
   }
 
 
   .ant-dropdown-menu-item > .anticon:first-child,
   .ant-dropdown-menu-item > .anticon:first-child,
@@ -527,10 +528,207 @@ body {
 
 
 .content {
 .content {
   .table-operator {
   .table-operator {
-    margin-bottom: 18px;
-
+    padding: 15px 0;
+    border-top: 1px solid #eee;
+    button {
+      margin-right: 8px;
+    }
+  }
+  .table-operator-nobor{
+    padding: 0 0 15px 0;
     button {
     button {
       margin-right: 8px;
       margin-right: 8px;
     }
     }
   }
   }
 }
 }
+
+/* 扩展ant design pro按钮组件颜色 */
+.ant-btn-primary.button-primary {
+  background-color: #39f;
+  border-color: #39f;
+  margin: 0 5px;
+  font-size: 12px;
+  &:hover, &:focus {
+    background-color: #52a6fb;
+    border-color: #52a6fb;
+  }
+ 
+  &:active, &.active {
+    background-color: #3d80bf;
+    border-color: #3d80bf;
+  }
+}
+ 
+.ant-btn-primary.button-info {
+  background-color: #2db7f5;
+  border-color: #2db7f5;
+  margin: 0 5px;
+  font-size: 12px;
+  &:hover, &:focus {
+    background-color: #32c8f5;
+    border-color: #32c8f5;
+  }
+ 
+  &:active, &.active {
+    background-color: #27a3d8;
+    border-color: #27a3d8;
+  }
+}
+ 
+.ant-btn-primary.button-success {
+  background-color: #0c6;
+  border-color: #0c6;
+  margin: 0 5px;
+  font-size: 12px;
+  &:hover, &:focus {
+    background-color: #01dc8c;
+    border-color: #01dc8c;
+  }
+ 
+  &:active, &.active {
+    background-color: #00af57;
+    border-color: #00af57;
+  }
+}
+ 
+.ant-btn-primary.button-warning {
+  background-color: #f90;
+  border-color: #f90;
+  margin: 0 5px;
+  font-size: 12px;
+  &:hover, &:focus {
+    background-color: #ffb60a;
+    border-color: #ffb60a;
+  }
+ 
+  &:active, &.active {
+    background-color: #dd8500;
+    border-color: #dd8500;
+  }
+}
+ 
+.ant-btn-primary.button-error {
+  background-color: #f30;
+  border-color: #f30;
+  margin: 0 5px;
+  font-size: 12px;
+  &:hover, &:focus {
+    background-color: #ff6666;
+    border-color: #ff6666;
+  }
+ 
+  &:active, &.active {
+    background-color: #d62a00;
+    border-color: #d62a00;
+  }
+}
+ 
+.ant-btn-primary.button-geekblue {
+  background-color: #2F54EB;
+  border-color: #2F54EB;
+  margin: 0 5px;
+  font-size: 12px;
+  &:hover, &:focus {
+    background-color: #1d39c4;
+    border-color: #1d39c4;
+  }
+ 
+  &:active, &.active {
+    background-color: #597ef7;
+    border-color: #597ef7;
+  }
+}
+ 
+.ant-btn-primary.button-purple {
+  background-color: #722ED1;
+  border-color: #722ED1;
+  margin: 0 5px;
+  font-size: 12px;
+  &:hover, &:focus {
+    background-color: #9254de;
+    border-color: #9254de;
+  }
+ 
+  &:active, &.active {
+    background-color: #531dab;
+    border-color: #531dab;
+  }
+}
+
+// btn-link
+.ant-btn-link.button-primary {
+  color: #39f;
+  &:hover, &:focus {
+    color: #52a6fb;
+  }
+ 
+  &:active, &.active {
+    color: #3d80bf;
+  }
+}
+ 
+.ant-btn-link.button-info {
+  color: #2db7f5;
+  &:hover, &:focus {
+    color: #32c8f5;
+  }
+ 
+  &:active, &.active {
+    color: #27a3d8;
+  }
+}
+ 
+.ant-btn-link.button-success {
+  color: #0c6;
+  &:hover, &:focus {
+    color: #01dc8c;
+  }
+ 
+  &:active, &.active {
+    color: #00af57;
+  }
+}
+ 
+.ant-btn-link.button-warning {
+  color: #e89105;
+  &:hover, &:focus {
+    color: #ffb60a;
+  }
+ 
+  &:active, &.active {
+    color: #dd8500;
+  }
+}
+ 
+.ant-btn-link.button-error {
+  color: #f30;
+  &:hover, &:focus {
+    color: #ff6666;
+  }
+ 
+  &:active, &.active {
+    color: #d62a00;
+  }
+}
+ 
+.ant-btn-link.button-geekblue {
+  color: #2F54EB;
+  &:hover, &:focus {
+    color: #1d39c4;
+  }
+ 
+  &:active, &.active {
+    color: #597ef7;
+  }
+}
+ 
+.ant-btn-link.button-purple {
+  color: #722ED1;
+  &:hover, &:focus {
+    color: #9254de;
+  }
+ 
+  &:active, &.active {
+    color: #531dab;
+  }
+}

+ 44 - 23
src/components/tools/UserMenu.vue

@@ -1,38 +1,27 @@
 <template>
 <template>
   <div class="user-wrapper">
   <div class="user-wrapper">
     <div class="content-box">
     <div class="content-box">
-      <!-- <a href="https://pro.loacg.com/docs/getting-started" target="_blank">
-        <span class="action">
-          <a-icon type="question-circle-o"></a-icon>
-        </span>
-      </a> -->
-      <!-- <notice-icon class="action"/> -->
+      <notice-icon class="action"/>
       <a-dropdown>
       <a-dropdown>
         <span class="action ant-dropdown-link user-dropdown-menu">
         <span class="action ant-dropdown-link user-dropdown-menu">
           <!-- <a-avatar class="avatar" size="small" :src="avatar==''?defaultAvatar:avatar"/> -->
           <!-- <a-avatar class="avatar" size="small" :src="avatar==''?defaultAvatar:avatar"/> -->
           <a-icon type="user" />
           <a-icon type="user" />
-          <span style="margin: 0 5px;">{{ nickname }}</span>
+          <span style="margin: 0 5px;">{{ nickname }} - 【{{ userInfo.orgName || '--' }}】</span>
           <a-icon type="down" />
           <a-icon type="down" />
         </span>
         </span>
         <a-menu slot="overlay" class="user-dropdown-menu-wrapper">
         <a-menu slot="overlay" class="user-dropdown-menu-wrapper">
-          <a-menu-item key="0">
+          <a-menu-item v-for="(item, index) in authOrgsList" :key="index" @click="changeRoles(item.orgSn)">
+            <a-icon type="link" style="vertical-align: super;"/>
+            <span style="display: inline-block;white-space: nowrap;width: 100%;overflow: hidden;text-overflow:ellipsis;">{{ item.orgName }}</span>
+          </a-menu-item>
+          <a-menu-divider/>
+          <a-menu-item key="5">
             <router-link :to="{ name: 'changePwd' }">
             <router-link :to="{ name: 'changePwd' }">
               <a-icon type="user"/>
               <a-icon type="user"/>
               <span>修改密码</span>
               <span>修改密码</span>
             </router-link>
             </router-link>
           </a-menu-item>
           </a-menu-item>
-          <!-- <a-menu-item key="1">
-            <router-link :to="{ name: 'settings' }">
-              <a-icon type="setting"/>
-              <span>账户设置</span>
-            </router-link>
-          </a-menu-item>
-          <a-menu-item key="2" disabled>
-            <a-icon type="setting"/>
-            <span>测试</span>
-          </a-menu-item> -->
-          <a-menu-divider/>
-          <a-menu-item key="3">
+          <a-menu-item key="6">
             <a href="javascript:;" @click="handleLogout">
             <a href="javascript:;" @click="handleLogout">
               <a-icon type="logout"/>
               <a-icon type="logout"/>
               <span>退出登录</span>
               <span>退出登录</span>
@@ -54,7 +43,19 @@ export default {
     NoticeIcon
     NoticeIcon
   },
   },
   computed: {
   computed: {
-    ...mapGetters(['nickname', 'avatar'])
+    ...mapGetters(['nickname', 'avatar', 'authOrgs', 'userInfo']),
+    authOrgsList () { //  过滤掉当前登录账户(不可由自己切换为自己)
+      const _this = this
+      const arr = []
+      if (this.authOrgs && this.authOrgs.length > 0) {
+        this.authOrgs.map(item => {
+          if (item.orgSn != _this.userInfo.orgSn) {
+            arr.push(item)
+          }
+        })
+      }
+      return arr
+    }
   },
   },
   data () {
   data () {
     return {
     return {
@@ -62,11 +63,12 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
-    ...mapActions(['Logout']),
+    ...mapActions(['Logout', 'SetOrgSn', 'Login']),
     handleLogout () {
     handleLogout () {
       this.$confirm({
       this.$confirm({
         title: '提示',
         title: '提示',
-        content: '真的要注销登录吗 ?',
+        content: '真的要退出登录吗 ?',
+        centered: true,
         onOk: () => {
         onOk: () => {
           return this.Logout({}).then(() => {
           return this.Logout({}).then(() => {
             setTimeout(() => {
             setTimeout(() => {
@@ -83,6 +85,25 @@ export default {
         onCancel () {
         onCancel () {
         }
         }
       })
       })
+    },
+    // 切换角色
+    changeRoles (sn) {
+      return this.SetOrgSn(sn).then(() => {
+        // 重新登录
+        const params = { username: '', password: '' }
+        return this.Login(params).then(() => {
+          window.location.reload() //  刷新页面
+        }).catch(err => this.requestFailed(err))
+      })
+    },
+    requestFailed (err) {
+      console.log(err, 'error')
+      this.isLoginError = true
+      this.$notification['error']({
+        message: '提示',
+        description: ((err.response || {}).data || {}).message || err.message || '请求出现错误,请稍后再试',
+        duration: 4
+      })
     }
     }
   }
   }
 }
 }

+ 2 - 2
src/config/defaultSettings.js

@@ -14,12 +14,12 @@
  */
  */
 
 
 export default {
 export default {
-  primaryColor: '#fa541c', // primary color of ant design
+  primaryColor: '#ed1c24', // primary color of ant design
   navTheme: 'dark', // theme for nav menu
   navTheme: 'dark', // theme for nav menu
   layout: 'sidemenu', // nav menu position: sidemenu or topmenu
   layout: 'sidemenu', // nav menu position: sidemenu or topmenu
   contentWidth: 'Fluid', // layout of content: Fluid or Fixed, only works when layout is topmenu
   contentWidth: 'Fluid', // layout of content: Fluid or Fixed, only works when layout is topmenu
   fixedHeader: true, // sticky header
   fixedHeader: true, // sticky header
-  fixSiderbar: false, // sticky siderbar
+  fixSiderbar: true, // sticky siderbar
   autoHideHeader: false, //  auto hide header
   autoHideHeader: false, //  auto hide header
   colorWeak: false,
   colorWeak: false,
   multiTab: true,
   multiTab: true,

+ 1900 - 153
src/config/router.config.js

@@ -7,174 +7,1921 @@ import {
   PageView
   PageView
 } from '@/layouts'
 } from '@/layouts'
 
 
-export const asyncRouterMap = [{
-  path: '/',
-  name: 'index',
-  component: BasicLayout,
-  meta: {
-    title: '首页'
-  },
-  redirect: '/home',
-  children: [{
-    path: '/home',
-    name: 'home',
+export const asyncRouterMap = [
+  {
+    path: '/',
+    name: 'index',
+    component: BasicLayout,
+    meta: { title: '首页' },
     redirect: '/home',
     redirect: '/home',
-    component: PageView,
-    meta: {
-      title: '首页',
-      icon: 'home'
-    },
-    hideChildrenInMenu: true,
-    children: [{
-      path: '/home',
-      name: 'home',
-      component: () => import(/* webpackChunkName: "home" */ '@/views/Home'),
-      meta: {
-        title: '首页',
-        icon: 'home',
-        hide: true
+    children: [
+      {
+        path: '/home',
+        name: 'home',
+        redirect: '/home',
+        component: PageView,
+        meta: {
+          title: '首页',
+          icon: 'home'
+        },
+        hideChildrenInMenu: true,
+        children: [
+          {
+            path: '/home',
+            name: 'home',
+            component: () => import(/* webpackChunkName: "home" */ '@/views/Home'),
+            meta: {
+              title: '首页',
+              icon: 'home',
+              hide: true
+            }
+          }
+        ]
+      },
+      {
+        path: '/changePwd',
+        name: 'changePwd',
+        component: () => import(/* webpackChunkName: "home" */ '@/views/user/ChangePwd'),
+        meta: {
+          title: '修改密码',
+          icon: 'home'
+        },
+        hidden: true
+      },
+      // 销售管理
+      {
+        path: '/salesManagement',
+        redirect: '/salesManagement/salesQuery',
+        component: PageView,
+        meta: {
+          title: '销售管理',
+          icon: 'account-book',
+          permission: 'M_salesManage'
+        },
+        children: [
+          {
+            path: '/salesManagement/salesQuery',
+            redirect: '/salesManagement/salesQuery/list',
+            name: 'salesQuery',
+            component: RouteView,
+            meta: {
+              title: '销售单查询',
+              icon: 'monitor',
+              permission: 'M_salesQueryList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'salesQueryList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/list.vue'),
+                meta: {
+                  title: '销售单列表',
+                  icon: 'monitor',
+                  hidden: true
+                  // permission: 'M_salesQueryList'
+                }
+              },
+              {
+                path: 'detail/:sn',
+                name: 'salesDetail',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/detail.vue'),
+                meta: {
+                  title: '销售单详情',
+                  icon: 'monitor',
+                  hidden: true
+                }
+              },
+              {
+                path: 'add/:id/:sn/:priceType',
+                name: 'salesAdd',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/edit.vue'),
+                meta: {
+                  title: '新增销售单',
+                  icon: 'monitor',
+                  hidden: true
+                }
+              },
+              {
+                path: 'edit/:id/:sn/:priceType',
+                name: 'salesEdit',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/edit.vue'),
+                meta: {
+                  title: '编辑销售单',
+                  icon: 'monitor',
+                  hidden: true
+                }
+              }
+            ]
+          },
+          {
+            path: '/salesManagement/outboundOrder',
+            redirect: '/salesManagement/outboundOrder/list',
+            name: 'outboundOrder',
+            component: RouteView,
+            meta: {
+              title: '出库',
+              icon: 'export',
+              permission: 'M_outboundList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'outboundOrderList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/outboundOrder/list.vue'),
+                meta: {
+                  title: '出库列表',
+                  icon: 'export',
+                  hidden: true,
+                  permission: 'M_outboundList'
+                }
+              },
+              {
+                path: 'detail/:id',
+                name: 'outboundOrderDetail',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/outboundOrder/detail.vue'),
+                meta: {
+                  title: '出库明细',
+                  icon: 'export',
+                  hidden: true
+                }
+              }
+            ]
+          },
+          {
+            path: '/salesManagement/urgentItemsOffset',
+            redirect: '/salesManagement/urgentItemsOffset/list',
+            name: 'urgentItemsOffset',
+            component: RouteView,
+            meta: {
+              title: '急件冲减',
+              icon: 'rocket',
+              permission: 'M_urgentItemsOffsetList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'urgentItemsOffsetList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/urgentItemsOffset/list.vue'),
+                meta: {
+                  title: '急件冲减列表',
+                  icon: 'rocket',
+                  hidden: true,
+                  permission: 'M_urgentItemsOffsetList'
+                }
+              },
+              {
+                path: 'detail/:sn',
+                name: 'urgentItemsOffsetDetail',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/urgentItemsOffset/detail.vue'),
+                meta: {
+                  title: '急件冲减详情',
+                  icon: 'rocket',
+                  hidden: true
+                }
+              }
+            ]
+          },
+          {
+            path: '/salesManagement/salesReturn',
+            redirect: '/salesManagement/salesReturn/list',
+            name: 'salesReturn',
+            component: RouteView,
+            meta: {
+              title: '销售退货',
+              icon: 'fund',
+              permission: 'M_salesReturnList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'salesReturnList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesReturn/list.vue'),
+                meta: {
+                  title: '退货单列表',
+                  icon: 'fund',
+                  hidden: true
+                  // permission: 'M_salesReturn_list'
+                }
+              },
+              {
+                path: 'detail/:id/:sn',
+                name: 'salesReturnDetail',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesReturn/detail.vue'),
+                meta: {
+                  title: '退货单详情',
+                  icon: 'fund',
+                  hidden: true
+                  // permission: 'M_salesReturn'
+                }
+              },
+              {
+                path: 'salesReturnGrabEdit/:id/:sn/:buyerSn',
+                name: 'salesReturnGrabEdit',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesReturn/salesReturnGrabEdit.vue'),
+                meta: {
+                  title: '编辑退货单(抓单)',
+                  icon: 'fund',
+                  hidden: true
+                  // permission: 'M_salesReturnGrabEdit'
+                }
+              },
+              {
+                path: 'salesReturnEdit/:id/:sn/:buyerSn',
+                name: 'salesReturnEdit',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesReturn/salesReturnEdit.vue'),
+                meta: {
+                  title: '编辑退货单(不抓单)',
+                  icon: 'fund',
+                  hidden: true
+                  // permission: 'M_salesReturnEdit'
+                }
+              }
+            ]
+          },
+          // {    二期
+          //   path: '/salesManagement/quotation',
+          //   redirect: '/salesManagement/quotation/list',
+          //   name: 'quotation',
+          //   component: RouteView,
+          //   meta: {
+          //     title: '报价单',
+          //     icon: 'idcard'
+          //     // permission: 'M_goodsManage_list'
+          //   },
+          //   hideChildrenInMenu: true,
+          //   children: [
+          //     {
+          //       path: 'list',
+          //       name: 'quotationList',
+          //       component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/quotation/list.vue'),
+          //       meta: {
+          //         title: '报价单列表',
+          //         icon: 'idcard',
+          //         hidden: true
+          //         // permission: 'M_goodsManage_list'
+          //       }
+          //     },
+          //     {
+          //       path: 'add',
+          //       name: 'quotationAdd',
+          //       component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/quotation/edit.vue'),
+          //       meta: {
+          //         title: '新增报价单',
+          //         icon: 'idcard',
+          //         hidden: true
+          //         // permission: 'M_goodsManage_list'
+          //       }
+          //     },
+          //     {
+          //       path: 'edit/:id',
+          //       name: 'quotationEdit',
+          //       component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/quotation/edit.vue'),
+          //       meta: {
+          //         title: '编辑报价单',
+          //         icon: 'idcard',
+          //         hidden: true
+          //         // permission: 'M_goodsManage_list'
+          //       }
+          //     },
+          //     {
+          //       path: 'detail/:id',
+          //       name: 'quotationDetail',
+          //       component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/quotation/detail.vue'),
+          //       meta: {
+          //         title: '报价单详情',
+          //         icon: 'idcard',
+          //         hidden: true
+          //         // permission: 'M_goodsManage_list'
+          //       }
+          //     }
+          //   ]
+          // },
+          {
+            path: '/salesManagement/giftRecord',
+            redirect: '/salesManagement/giftRecord/list',
+            name: 'giftRecord',
+            component: RouteView,
+            meta: {
+              title: '赠品记录',
+              icon: 'file-search',
+              permission: 'M_giftRecordList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'giftRecordList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/giftRecord/list.vue'),
+                meta: {
+                  title: '赠品记录列表',
+                  icon: 'file-search',
+                  hidden: true,
+                  permission: 'M_giftRecordList'
+                }
+              }
+            ]
+          }
+        ]
+      },
+      // 采购管理
+      {
+        path: '/purchasingManagement',
+        redirect: '/purchasingManagement/purchaseOrder',
+        component: PageView,
+        meta: {
+          title: '采购管理',
+          icon: 'money-collect',
+          permission: 'M_purchasingManagement'
+        },
+        children: [
+          {
+            path: '/purchasingManagement/purchaseOrder',
+            redirect: '/purchasingManagement/purchaseOrder/list',
+            name: 'purchaseOrder',
+            component: RouteView,
+            meta: {
+              title: '采购单管理',
+              icon: 'money-collect',
+              permission: 'M_purchasingList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'purchaseOrderList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/list.vue'),
+                meta: {
+                  title: '采购单列表',
+                  icon: 'money-collect',
+                  hidden: true
+                  // permission: 'M_goodsManage_list'
+                }
+              },
+              {
+                path: 'add/:sn',
+                name: 'purchaseOrderAdd',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/edit.vue'),
+                meta: {
+                  title: '新增采购单',
+                  icon: 'money-collect',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              },
+              {
+                path: 'edit/:sn',
+                name: 'purchaseOrderEdit',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/edit.vue'),
+                meta: {
+                  title: '编辑采购单',
+                  icon: 'money-collect',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              },
+              {
+                path: 'detail/:sn',
+                name: 'purchaseOrderDetail',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/detail.vue'),
+                meta: {
+                  title: '采购单详情',
+                  icon: 'money-collect',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              },
+              {
+                path: 'warehousing/:sn',
+                name: 'purchaseOrderWarehousing',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseOrder/warehousing.vue'),
+                meta: {
+                  title: '采购入库',
+                  icon: 'money-collect',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              }
+            ]
+          },
+          {
+            path: '/purchasingManagement/purchaseReturn',
+            redirect: '/purchasingManagement/purchaseReturn/list',
+            name: 'purchaseReturn',
+            component: RouteView,
+            meta: {
+              title: '采购退货',
+              icon: 'money-collect',
+              permission: 'M_purchaseReturnList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'purchaseReturnList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/list.vue'),
+                meta: {
+                  title: '采购退货列表',
+                  icon: 'money-collect',
+                  hidden: true
+                  // permission: 'M_goodsManage_list'
+                }
+              },
+              {
+                path: 'add/:id/:sn',
+                name: 'purchaseReturnAdd',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/edit.vue'),
+                meta: {
+                  title: '新增采购退货单',
+                  icon: 'money-collect',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              },
+              {
+                path: 'edit/:id/:sn',
+                name: 'purchaseReturnEdit',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/edit.vue'),
+                meta: {
+                  title: '编辑采购退货单',
+                  icon: 'money-collect',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              },
+              {
+                path: 'detail/:sn',
+                name: 'purchaseReturnDetail',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/purchasingManagement/purchaseReturn/detail.vue'),
+                meta: {
+                  title: '采购退货详情',
+                  icon: 'money-collect',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              }
+            ]
+          }
+        ]
+      },
+      // 调拨管理
+      {
+        path: '/allocationManagement',
+        redirect: '/allocationManagement/warehouseAllocation',
+        component: PageView,
+        meta: {
+          title: '调拨管理',
+          icon: 'cluster',
+          permission: 'M_allocationManagement'
+        },
+        children: [
+          {
+            path: '/allocationManagement/warehouseAllocation',
+            redirect: '/allocationManagement/warehouseAllocation/list',
+            name: 'warehouseAllocation',
+            component: RouteView,
+            meta: {
+              title: '仓库调拨',
+              icon: 'gateway',
+              permission: 'M_warehouseAllocationList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'warehouseAllocationList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/warehouseAllocation/list.vue'),
+                meta: {
+                  title: '仓库调拨列表',
+                  icon: 'gateway',
+                  hidden: true,
+                  permission: 'M_warehouseAllocationList'
+                }
+              },
+              {
+                path: 'add',
+                name: 'warehouseAllocationAdd',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/warehouseAllocation/edit.vue'),
+                meta: {
+                  title: '新增仓库调拨',
+                  icon: 'gateway',
+                  hidden: true
+                }
+              },
+              {
+                path: 'edit/:id/:sn',
+                name: 'warehouseAllocationEdit',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/warehouseAllocation/edit.vue'),
+                meta: {
+                  title: '编辑仓库调拨',
+                  icon: 'gateway',
+                  hidden: true
+                }
+              },
+              {
+                path: 'detail/:sn',
+                name: 'warehouseAllocationDetail',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/warehouseAllocation/detail.vue'),
+                meta: {
+                  title: '仓库调拨详情',
+                  icon: 'gateway',
+                  hidden: true
+                }
+              }
+            ]
+          },
+          {
+            path: '/allocationManagement/chainTransferIn',
+            redirect: '/allocationManagement/chainTransferIn/list',
+            name: 'chainTransferIn',
+            component: RouteView,
+            meta: {
+              title: '连锁调入',
+              icon: 'cluster',
+              permission: 'M_chainTransferInList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'chainTransferInList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/chainTransferIn/list.vue'),
+                meta: {
+                  title: '连锁调入列表',
+                  icon: 'cluster',
+                  hidden: true
+                  // permission: 'M_chainTransferInList'
+                }
+              },
+              {
+                path: 'edit/:id/:sn',
+                name: 'chainTransferInEdit',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/chainTransferIn/edit.vue'),
+                meta: {
+                  title: '编辑连锁调入',
+                  icon: 'cluster',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              },
+              {
+                path: 'detail/:sn',
+                name: 'chainTransferInDetail',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/chainTransferIn/detail.vue'),
+                meta: {
+                  title: '连锁调入详情',
+                  icon: 'cluster',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              }
+            ]
+          },
+          {
+            path: '/allocationManagement/chainTransferOut',
+            redirect: '/allocationManagement/chainTransferOut/list',
+            name: 'chainTransferOut',
+            component: RouteView,
+            meta: {
+              title: '连锁调出',
+              icon: 'pull-request',
+              permission: 'M_chainTransferOutList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'chainTransferOutList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/chainTransferOut/list.vue'),
+                meta: {
+                  title: '连锁调出列表',
+                  icon: 'pull-request',
+                  hidden: true
+                  // permission: 'M_chainTransferOutList'
+                }
+              },
+              {
+                path: 'add/:id/:sn',
+                name: 'chainTransferOutAdd',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/chainTransferOut/edit.vue'),
+                meta: {
+                  title: '新增连锁调出',
+                  icon: 'pull-request',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              },
+              {
+                path: 'edit/:id/:sn',
+                name: 'chainTransferOutEdit',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/chainTransferOut/edit.vue'),
+                meta: {
+                  title: '编辑连锁调出',
+                  icon: 'pull-request',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              },
+              {
+                path: 'detail/:sn',
+                name: 'chainTransferOutDetail',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/chainTransferOut/detail.vue'),
+                meta: {
+                  title: '连锁调出详情',
+                  icon: 'pull-request',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              }
+            ]
+          },
+          {
+            path: '/allocationManagement/storeTransferOut',
+            redirect: '/allocationManagement/storeTransferOut/list',
+            name: 'storeTransferOut',
+            component: RouteView,
+            meta: {
+              title: '店内调出',
+              icon: 'interaction',
+              permission: 'M_storeTransferOutList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'storeTransferOutList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/storeTransferOut/list.vue'),
+                meta: {
+                  title: '店内调出列表',
+                  icon: 'interaction',
+                  hidden: true,
+                  permission: 'M_storeTransferOutList'
+                }
+              },
+              {
+                path: 'add/:id/:sn',
+                name: 'storeTransferOutAdd',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/storeTransferOut/edit.vue'),
+                meta: {
+                  title: '新增店内调出',
+                  icon: 'interaction',
+                  hidden: true
+                }
+              },
+              {
+                path: 'edit/:id/:sn',
+                name: 'storeTransferOutEdit',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/storeTransferOut/edit.vue'),
+                meta: {
+                  title: '编辑店内调出',
+                  icon: 'interaction',
+                  hidden: true
+                }
+              },
+              {
+                path: 'detail/:sn',
+                name: 'storeTransferOutDetail',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/allocationManagement/storeTransferOut/detail.vue'),
+                meta: {
+                  title: '店内调出详情',
+                  icon: 'interaction',
+                  hidden: true
+                }
+              }
+            ]
+          }
+        ]
+      },
+      // 库存管理
+      {
+        path: '/inventoryManagement',
+        redirect: '/inventoryManagement/inventoryQuery',
+        component: PageView,
+        meta: {
+          title: '库存管理',
+          icon: 'shop',
+          permission: 'M_inventory'
+        },
+        children: [
+          {
+            path: '/inventoryManagement/inventoryQuery',
+            redirect: '/inventoryManagement/inventoryQuery/list',
+            name: 'inventoryQuery',
+            component: RouteView,
+            meta: {
+              title: '库存查询',
+              icon: 'monitor',
+              permission: 'M_inventoryInventoryQueryList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'inventoryQueryList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryQuery/list.vue'),
+                meta: {
+                  title: '库存列表',
+                  icon: 'monitor',
+                  hidden: true,
+                  permission: 'M_inventoryInventoryQueryList'
+                }
+              },
+              {
+                path: 'warehouseDetail/:sn',
+                name: 'inventoryQueryWarehouseDetail',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryQuery/warehouseDetail.vue'),
+                meta: {
+                  title: '出入库明细',
+                  icon: 'monitor',
+                  hidden: true
+                }
+              }
+            ]
+          },
+          {
+            path: '/inventoryManagement/inventoryWarning',
+            name: 'inventoryWarningList',
+            component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryWarning/list.vue'),
+            meta: {
+              title: '库存预警',
+              icon: 'alert',
+              permission: 'M_inventoryWarningList'
+            }
+          },
+          {
+            path: '/inventoryManagement/satelliteWarehouseInventory',
+            name: 'satelliteWarehouseInventoryList',
+            component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/satelliteWarehouseInventory/list.vue'),
+            meta: {
+              title: '卫星仓库存',
+              icon: 'flag',
+              permission: 'M_satelliteWarehouseInventoryList'
+            }
+          },
+          {
+            path: '/inventoryManagement/warehouse',
+            redirect: '/inventoryManagement/warehouse/list',
+            name: 'warehouse',
+            component: RouteView,
+            meta: {
+              title: '仓库管理',
+              icon: 'deployment-unit',
+              permission: 'M_inventoryWarehouseList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'warehouseList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/warehouse/list.vue'),
+                meta: {
+                  title: '仓库列表',
+                  icon: 'deployment-unit',
+                  hidden: true,
+                  permission: 'M_inventoryWarehouseList'
+                }
+              },
+              {
+                path: '/inventoryManagement/storingLocation/:sn',
+                name: 'storingLocationList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/warehouse/storingLocation/list.vue'),
+                meta: {
+                  title: '仓位列表',
+                  icon: 'deployment-unit',
+                  hidden: true,
+                  permission: 'M_inventoryWarehouseStoringLocationList'
+                }
+              }
+            ]
+          }
+          // 二期
+          // {
+          //   path: '/inventoryManagement/inventoryChecking',
+          //   redirect: '/inventoryManagement/inventoryChecking/list',
+          //   name: 'inventoryChecking',
+          //   component: RouteView,
+          //   meta: {
+          //     title: '库存盘点',
+          //     icon: 'reconciliation'
+          //     // permission: 'M_goodsManage_list'
+          //   },
+          //   hideChildrenInMenu: true,
+          //   children: [
+          //     {
+          //       path: 'list',
+          //       name: 'inventoryCheckingList',
+          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryChecking/list.vue'),
+          //       meta: {
+          //         title: '库存盘点列表',
+          //         icon: 'reconciliation',
+          //         hidden: true
+          //         // permission: 'M_goodsManage_list'
+          //       }
+          //     },
+          //     {
+          //       path: 'overall/:id',
+          //       name: 'inventoryCheckingOverall',
+          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryChecking/overall.vue'),
+          //       meta: {
+          //         title: '盘点人盘点【全盘】',
+          //         icon: 'reconciliation',
+          //         hidden: true
+          //         // permission: 'B_goodsManage_edit'
+          //       }
+          //     },
+          //     {
+          //       path: 'selfDisk/:id',
+          //       name: 'inventoryCheckingSelfDisk',
+          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryChecking/selfDisk.vue'),
+          //       meta: {
+          //         title: '盘点人盘点【自选盘点】',
+          //         icon: 'reconciliation',
+          //         hidden: true
+          //         // permission: 'B_goodsManage_edit'
+          //       }
+          //     },
+          //     {
+          //       path: 'detail/:id',
+          //       name: 'inventoryCheckingDetail',
+          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryChecking/detail.vue'),
+          //       meta: {
+          //         title: '库存盘点详情',
+          //         icon: 'reconciliation',
+          //         hidden: true
+          //         // permission: 'B_goodsManage_edit'
+          //       }
+          //     },
+          //     {
+          //       path: 'makeInventory/:id',
+          //       name: 'inventoryCheckingMakeInventory',
+          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryChecking/makeInventory.vue'),
+          //       meta: {
+          //         title: '待盘点【盘点】',
+          //         icon: 'reconciliation',
+          //         hidden: true
+          //         // permission: 'B_goodsManage_edit'
+          //       }
+          //     },
+          //     {
+          //       path: 'makeInventory/detail/:id', /* 待盘点【盘点】详情  */
+          //       name: 'inventoryCheckingMakeInventoryDetail',
+          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryChecking/makeInventoryDetail.vue'),
+          //       meta: {
+          //         title: '库存盘点详情',
+          //         icon: 'reconciliation',
+          //         hidden: true
+          //         // permission: 'B_goodsManage_edit'
+          //       }
+          //     },
+          //     {
+          //       path: 'financialAudit/detail/:id', /* 财务审核详情  */
+          //       name: 'inventoryCheckingFinancialAuditDetail',
+          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryChecking/financialAuditDetail.vue'),
+          //       meta: {
+          //         title: '库存盘点详情',
+          //         icon: 'reconciliation',
+          //         hidden: true
+          //         // permission: 'B_goodsManage_edit'
+          //       }
+          //     }
+          //   ]
+          // }
+        ]
+      },
+      // 客户管理
+      {
+        path: '/customerManagement',
+        redirect: '/customerManagement/customerInfo',
+        component: PageView,
+        meta: {
+          title: '客户管理',
+          icon: 'idcard',
+          permission: 'M_customer'
+        },
+        children: [
+          {
+            path: '/customerManagement/customerInfo',
+            redirect: '/customerManagement/customerInfo/list',
+            name: 'customerInfo',
+            component: RouteView,
+            meta: {
+              title: '客户管理',
+              icon: 'idcard',
+              permission: 'M_customerInfoList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'customerInfoList',
+                component: () => import(/* webpackChunkName: "customerManagement" */ '@/views/customerManagement/customerInfo/list.vue'),
+                meta: {
+                  title: '客户列表',
+                  icon: 'idcard',
+                  hidden: true,
+                  permission: 'M_customerInfoList'
+                }
+              },
+              {
+                path: 'add',
+                name: 'customerInfoAdd',
+                component: () => import(/* webpackChunkName: "customerManagement" */ '@/views/customerManagement/customerInfo/edit.vue'),
+                meta: {
+                  title: '新增客户',
+                  icon: 'idcard',
+                  hidden: true,
+                  permission: 'B_customer_customerInfo_add'
+                }
+              },
+              {
+                path: 'edit/:id',
+                name: 'customerInfoEdit',
+                component: () => import(/* webpackChunkName: "customerManagement" */ '@/views/customerManagement/customerInfo/edit.vue'),
+                meta: {
+                  title: '编辑客户',
+                  icon: 'idcard',
+                  hidden: true,
+                  permission: 'B_customer_customerInfo_edit'
+                }
+              }
+            ]
+          }
+        ]
+      },
+      // 产品管理
+      {
+        path: '/productManagement',
+        redirect: '/productManagement/productInfo',
+        component: PageView,
+        meta: {
+          title: '产品管理',
+          icon: 'shopping',
+          permission: 'M_product'
+        },
+        children: [
+          {
+            path: '/productManagement/productInfo',
+            redirect: '/productManagement/productInfo/list',
+            name: 'productInfo',
+            component: RouteView,
+            meta: {
+              title: '产品信息管理(自建)',
+              icon: 'file-text',
+              permission: 'M_dealerProductList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'productInfoList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productInfo/list.vue'),
+                meta: {
+                  title: '产品信息列表',
+                  icon: 'file-text',
+                  hidden: true,
+                  permission: 'M_dealerProductList'
+                }
+              },
+              {
+                path: 'add',
+                name: 'productInfoAdd',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productInfo/edit.vue'),
+                meta: {
+                  title: '新增产品',
+                  icon: 'file-text',
+                  hidden: true,
+                  permission: 'B_product_dealerProduct_add'
+                }
+              },
+              {
+                path: 'edit/:id',
+                name: 'productInfoEdit',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productInfo/edit.vue'),
+                meta: {
+                  title: '编辑产品',
+                  icon: 'file-text',
+                  hidden: true,
+                  permission: 'B_product_dealerProduct_edit'
+                }
+              }
+            ]
+          },
+          {
+            path: '/productManagement/productInfoJg',
+            redirect: '/productManagement/productInfoJg/list',
+            name: 'productInfoJg',
+            component: RouteView,
+            meta: {
+              title: '产品信息管理(箭冠)',
+              icon: 'file-text',
+              permission: 'M_productInfoList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'productInfoJgList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productInfoJg/list.vue'),
+                meta: {
+                  title: '产品信息列表',
+                  icon: 'file-text',
+                  hidden: true,
+                  permission: 'M_productInfoList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/productManagement/productBrand',
+            redirect: '/productManagement/productBrand/list',
+            name: 'productBrand',
+            component: RouteView,
+            meta: {
+              title: '产品品牌管理',
+              icon: 'sketch',
+              permission: 'M_dealerProductBrandList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'productBrandList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productBrand/list.vue'),
+                meta: {
+                  title: '产品品牌列表',
+                  icon: 'sketch',
+                  hidden: true,
+                  permission: 'M_dealerProductBrandList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/productManagement/productCategory',
+            redirect: '/productManagement/productCategory/list',
+            name: 'productCategory',
+            component: RouteView,
+            meta: {
+              title: '产品分类管理',
+              icon: 'sliders',
+              permission: 'M_dealerProductTypeList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'productCategoryList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productCategory/list.vue'),
+                meta: {
+                  title: '产品分类列表',
+                  icon: 'sliders',
+                  hidden: true,
+                  permission: 'M_dealerProductTypeList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/productManagement/priceChangeRecord',
+            redirect: '/productManagement/priceChangeRecord/list',
+            name: 'priceChangeRecord',
+            component: RouteView,
+            meta: {
+              title: '价格变更记录',
+              icon: 'sketch',
+              permission: 'M_priceChangeRecordList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'priceChangeRecordList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/priceChangeRecord/list.vue'),
+                meta: {
+                  title: '价格变更记录列表',
+                  icon: 'sketch',
+                  hidden: true,
+                  permission: 'M_priceChangeRecordList'
+                }
+              }
+            ]
+          }
+        ]
+      },
+      //  供应商管理
+      {
+        path: '/supplierManagement',
+        redirect: '/supplierManagement/supplierInfo',
+        component: PageView,
+        meta: {
+          title: '供应商管理',
+          icon: 'team',
+          permission: 'M_supplierInfoList'
+        },
+        children: [
+          {
+            path: '/supplierManagement/supplierInfo',
+            redirect: '/supplierManagement/supplierInfo/list',
+            name: 'supplierInfo',
+            component: RouteView,
+            meta: {
+              title: '供应商管理',
+              icon: 'team',
+              permission: 'M_supplierInfoList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'supplierInfoList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/supplierManagement/supplierInfo/list.vue'),
+                meta: {
+                  title: '供应商列表',
+                  icon: 'team',
+                  hidden: true,
+                  permission: 'M_supplierInfoList'
+                }
+              }
+            ]
+          }
+        ]
+      },
+      // 散件管理
+      {
+        path: '/bulkManagement',
+        redirect: '/bulkManagement/purchaseOrder',
+        component: PageView,
+        meta: {
+          title: '散件管理',
+          icon: 'gold',
+          permission: 'M_bulkWarehousingOrderList'
+        },
+        children: [
+          {
+            path: '/bulkManagement/bulkWarehousingOrder',
+            redirect: '/bulkManagement/bulkWarehousingOrder/list',
+            name: 'bulkWarehousingOrder',
+            component: RouteView,
+            meta: {
+              title: '散件入库',
+              icon: 'gold',
+              permission: 'M_bulkWarehousingOrderList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'bulkWarehousingOrderList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/bulkManagement/bulkWarehousingOrder/list.vue'),
+                meta: {
+                  title: '散件入库单列表',
+                  icon: 'gold',
+                  hidden: true,
+                  permission: 'M_bulkWarehousingOrderList'
+                }
+              },
+              {
+                path: 'add/:id/:sn',
+                name: 'bulkWarehousingOrderAdd',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/bulkManagement/bulkWarehousingOrder/edit.vue'),
+                meta: {
+                  title: '新增散件入库单',
+                  icon: 'gold',
+                  hidden: true
+                }
+              },
+              {
+                path: 'edit/:id/:sn',
+                name: 'bulkWarehousingOrderEdit',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/bulkManagement/bulkWarehousingOrder/edit.vue'),
+                meta: {
+                  title: '编辑散件入库单',
+                  icon: 'gold',
+                  hidden: true
+                }
+              },
+              {
+                path: 'detail/:id/:sn',
+                name: 'bulkWarehousingOrderDetail',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/bulkManagement/bulkWarehousingOrder/detail.vue'),
+                meta: {
+                  title: '散件入库单详情',
+                  icon: 'gold',
+                  hidden: true
+                }
+              }
+            ]
+          }
+          // {
+          //   path: '/bulkManagement/bulkReturnGoods',
+          //   redirect: '/bulkManagement/bulkReturnGoods/list',
+          //   name: 'bulkReturnGoods',
+          //   component: RouteView,
+          //   meta: {
+          //     title: '散件退货',
+          //     icon: 'frown'
+          //     // permission: 'M_goodsManage_list'
+          //   },
+          //   hideChildrenInMenu: true,
+          //   children: [
+          //     {
+          //       path: 'list',
+          //       name: 'bulkReturnGoodsList',
+          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/bulkManagement/bulkReturnGoods/list.vue'),
+          //       meta: {
+          //         title: '散件退货列表',
+          //         icon: 'frown',
+          //         hidden: true
+          //         // permission: 'M_goodsManage_list'
+          //       }
+          //     },
+          //     {
+          //       path: 'add',
+          //       name: 'bulkReturnGoodsAdd',
+          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/bulkManagement/bulkReturnGoods/edit.vue'),
+          //       meta: {
+          //         title: '新增散件退货单',
+          //         icon: 'frown',
+          //         hidden: true
+          //         // permission: 'B_goodsManage_edit'
+          //       }
+          //     },
+          //     {
+          //       path: 'edit/:id',
+          //       name: 'bulkReturnGoodsEdit',
+          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/bulkManagement/bulkReturnGoods/edit.vue'),
+          //       meta: {
+          //         title: '编辑散件退货单',
+          //         icon: 'frown',
+          //         hidden: true
+          //         // permission: 'B_goodsManage_edit'
+          //       }
+          //     },
+          //     {
+          //       path: 'detail/:id',
+          //       name: 'bulkReturnGoodsDetail',
+          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/bulkManagement/bulkReturnGoods/detail.vue'),
+          //       meta: {
+          //         title: '散件退货单详情',
+          //         icon: 'frown',
+          //         hidden: true
+          //         // permission: 'B_goodsManage_edit'
+          //       }
+          //     }
+          //   ]
+          // }
+        ]
+      },
+      // 财务管理
+      {
+        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: RouteView,
+            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: 'B_goodsManage_edit'
+                }
+              }
+            ]
+          },
+          // {
+          //   path: '/financialManagement/inventoryReview',
+          //   redirect: '/financialManagement/inventoryReview/list',
+          //   name: 'inventoryReview',
+          //   component: RouteView,
+          //   meta: {
+          //     title: '盘点审核',
+          //     icon: 'laptop'
+          //     // permission: 'M_goodsManage_list'
+          //   },
+          //   hideChildrenInMenu: true,
+          //   children: [
+          //     {
+          //       path: 'list',
+          //       name: 'inventoryReviewList',
+          //       component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/inventoryReview/list.vue'),
+          //       meta: {
+          //         title: '盘点审核列表',
+          //         icon: 'laptop',
+          //         hidden: true
+          //         // permission: 'M_goodsManage_list'
+          //       }
+          //     },
+          //     {
+          //       path: 'detail/:id',
+          //       name: 'inventoryReviewDetail',
+          //       component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/inventoryReview/detail.vue'),
+          //       meta: {
+          //         title: '盘点审核详情',
+          //         icon: 'laptop',
+          //         hidden: true
+          //         // permission: 'B_goodsManage_edit'
+          //       }
+          //     }
+          //   ]
+          // },
+          {
+            path: '/financialManagement/financialPayment',
+            redirect: '/financialManagement/financialPayment/list',
+            name: 'financialPayment',
+            component: RouteView,
+            meta: {
+              title: '财务付款',
+              icon: 'pay-circle',
+              permission: 'M_financialPaymentList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'financialPaymentList',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/financialPayment/list.vue'),
+                meta: {
+                  title: '财务付款列表',
+                  icon: 'pay-circle',
+                  hidden: true,
+                  permission: 'M_financialPaymentList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/financialManagement/financialCollection',
+            redirect: '/financialManagement/financialCollection/list',
+            name: 'financialCollection',
+            component: RouteView,
+            meta: {
+              title: '财务收款',
+              icon: 'money-collect',
+              permission: 'M_financialCollectionList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'financialCollectionList',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/financialCollection/list.vue'),
+                meta: {
+                  title: '财务收款列表',
+                  icon: 'money-collect',
+                  hidden: true,
+                  permission: 'M_financialCollectionList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/financialManagement/expenseManagement',
+            redirect: '/financialManagement/expenseManagement/list',
+            name: 'expenseManagement',
+            component: RouteView,
+            meta: {
+              title: '费用管理',
+              icon: 'pound',
+              permission: 'M_expenseManagementList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'expenseManagementList',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/expenseManagement/list.vue'),
+                meta: {
+                  title: '费用单列表',
+                  icon: 'pound',
+                  hidden: true,
+                  permission: 'M_expenseManagementList'
+                }
+              },
+              {
+                path: 'add',
+                name: 'expenseManagementAdd',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/expenseManagement/edit.vue'),
+                meta: {
+                  title: '新增费用单',
+                  icon: 'pound',
+                  hidden: true
+                }
+              },
+              {
+                path: 'edit/:id',
+                name: 'expenseManagementEdit',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/expenseManagement/edit.vue'),
+                meta: {
+                  title: '编辑费用单',
+                  icon: 'pound',
+                  hidden: true
+                }
+              }
+            ]
+          },
+          {
+            path: '/financialManagement/companyReceivablePayable',
+            redirect: '/financialManagement/companyReceivablePayable/list',
+            name: 'companyReceivablePayable',
+            component: RouteView,
+            meta: {
+              title: '单位应收应付管理',
+              icon: 'transaction',
+              permission: 'M_companyReceivablePayableList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'companyReceivablePayableList',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyReceivablePayable/list.vue'),
+                meta: {
+                  title: '单位应收应付列表',
+                  icon: 'transaction',
+                  hidden: true,
+                  permission: 'M_companyReceivablePayableList'
+                }
+              },
+              {
+                path: 'collectionPayment/:sn/:name',
+                name: 'companyReceivablePayableCollectionPayment',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyReceivablePayable/collectionPayment.vue'),
+                meta: {
+                  title: '单位应收应付',
+                  icon: 'transaction',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              },
+              {
+                path: 'detail/:sn/:name',
+                name: 'companyReceivablePayableDetail',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyReceivablePayable/detail.vue'),
+                meta: {
+                  title: '单位应收应付详情',
+                  icon: 'transaction',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              }
+            ]
+          },
+          {
+            path: '/financialManagement/companyCollectionPayment',
+            redirect: '/financialManagement/companyCollectionPayment/list',
+            name: 'companyCollectionPayment',
+            component: RouteView,
+            meta: {
+              title: '单位收付款记录',
+              icon: 'file-protect',
+              permission: 'M_companyCollectionPaymentList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'companyCollectionPaymentList',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyCollectionPayment/list.vue'),
+                meta: {
+                  title: '单位收付款记录列表',
+                  icon: 'file-protect',
+                  hidden: true,
+                  permission: 'M_companyCollectionPaymentList'
+                }
+              },
+              {
+                path: 'detail/:id/:sn',
+                name: 'companyCollectionPaymentDetail',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyCollectionPayment/detail.vue'),
+                meta: {
+                  title: '单位收付款记录详情',
+                  icon: 'file-protect',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              }
+            ]
+          },
+          {
+            path: '/financialManagement/withdrawalManagement',
+            redirect: '/financialManagement/withdrawalManagement/list',
+            name: 'withdrawalManagement',
+            component: RouteView,
+            meta: {
+              title: '提现管理',
+              icon: 'dollar',
+              permission: 'M_withdrawalManagementList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'withdrawalManagementList',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/withdrawalManagement/list.vue'),
+                meta: {
+                  title: '提现管理列表',
+                  icon: 'dollar',
+                  hidden: true,
+                  permission: 'M_withdrawalManagementList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/financialManagement/ledgerRecord',
+            redirect: '/financialManagement/ledgerRecord/list',
+            name: 'ledgerRecord',
+            component: RouteView,
+            meta: {
+              title: '分账记录',
+              icon: 'profile',
+              permission: 'M_ledgerRecordList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'ledgerRecordList',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/ledgerRecord/list.vue'),
+                meta: {
+                  title: '分账记录列表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_ledgerRecordList'
+                }
+              }
+            ]
+          }
+        ]
+      },
+      // 中心店/配送店管理
+      {
+        path: '/storeManagement',
+        redirect: '/storeManagement/bind',
+        component: PageView,
+        meta: {
+          title: '中心店/配送店管理',
+          icon: 'bank',
+          permission: 'M_storeManagement'
+        },
+        children: [
+          {
+            path: '/storeManagement/bind',
+            redirect: '/storeManagement/bind/list',
+            name: 'storeManagementBind',
+            component: RouteView,
+            meta: {
+              title: '中心店/配送店绑定',
+              icon: 'link',
+              permission: 'M_storeManagementBindList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'storeManagementBindList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/storeManagement/bind/list.vue'),
+                meta: {
+                  title: '中心店/配送店绑定列表',
+                  icon: 'link',
+                  hidden: true,
+                  permission: 'M_storeManagementBindList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/storeManagement/userAuthorization',
+            redirect: '/storeManagement/userAuthorization/list',
+            name: 'storeManagementUserAuth',
+            component: RouteView,
+            meta: {
+              title: '中心店用户授权',
+              icon: 'link',
+              permission: 'M_storeManagementUserAuthList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'storeManagementUserAuthList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/storeManagement/userAuthorization/list.vue'),
+                meta: {
+                  title: '中心店用户授权列表',
+                  icon: 'link',
+                  hidden: true,
+                  permission: 'M_storeManagementUserAuthList'
+                }
+              }
+            ]
+          }
+        ]
+      },
+      // 基础设置
+      {
+        path: '/basicData',
+        redirect: '/basicData/storeTransferOutTypeManagement',
+        component: PageView,
+        meta: {
+          title: '基础设置',
+          icon: 'pushpin',
+          permission: 'M_basicData'
+        },
+        children: [
+          {
+            path: '/basicData/storeTransferOutTypeManagement',
+            redirect: '/basicData/storeTransferOutTypeManagement/list',
+            name: 'storeTransferOutTypeManagement',
+            component: RouteView,
+            meta: {
+              title: '店内调出类型管理',
+              icon: 'interaction',
+              permission: 'M_storeTransferOutTypeList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'storeTransferOutTypeManagementList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/basicData/storeTransferOutTypeManagement/list.vue'),
+                meta: {
+                  title: '店内调出类型管理列表',
+                  icon: 'interaction',
+                  hidden: true,
+                  permission: 'M_storeTransferOutTypeList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/basicData/bulkPartsTypeManagement',
+            redirect: '/basicData/bulkPartsTypeManagement/list',
+            name: 'bulkPartsTypeManagement',
+            component: RouteView,
+            meta: {
+              title: '散件入库类型管理',
+              icon: 'gold',
+              permission: 'M_bulkPartsTypeList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'bulkPartsTypeManagementList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/basicData/bulkPartsTypeManagement/list.vue'),
+                meta: {
+                  title: '散件入库类型列表',
+                  icon: 'gold',
+                  hidden: true,
+                  permission: 'M_bulkPartsTypeList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/basicData/expenseType',
+            redirect: '/basicData/expenseType/list',
+            name: 'expenseType',
+            component: RouteView,
+            meta: {
+              title: '费用类型管理',
+              icon: 'pay-circle',
+              permission: 'M_expenseTypeList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'expenseTypeList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/basicData/expenseType/list.vue'),
+                meta: {
+                  title: '费用类型列表',
+                  icon: 'pay-circle',
+                  hidden: true,
+                  permission: 'M_expenseTypeList'
+                }
+              }
+            ]
+          },
+          // {
+          //   path: '/basicData/processSettings',
+          //   redirect: '/basicData/processSettings/setup',
+          //   name: 'processSettings',
+          //   component: RouteView,
+          //   meta: {
+          //     title: '业务自动化设置',
+          //     icon: 'sliders'
+          //     // permission: 'M_goodsManage_list'
+          //   },
+          //   hideChildrenInMenu: true,
+          //   children: [
+          //     {
+          //       path: 'setup',
+          //       name: 'processSettingsSetup',
+          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/basicData/processSettings/setup.vue'),
+          //       meta: {
+          //         title: '业务自动化设置',
+          //         icon: 'sliders',
+          //         hidden: true
+          //         // permission: 'M_goodsManage_list'
+          //       }
+          //     }
+          //   ]
+          // },
+          {
+            path: '/basicData/customerTypeManagement',
+            redirect: '/basicData/customerTypeManagement/list',
+            name: 'customerTypeManagement',
+            component: RouteView,
+            meta: {
+              title: '客户类型管理',
+              icon: 'idcard',
+              permission: 'M_customerTypeList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'customerTypeManagementList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/basicData/customerTypeManagement/list.vue'),
+                meta: {
+                  title: '客户类型列表',
+                  icon: 'idcard',
+                  hidden: true,
+                  permission: 'M_customerTypeList'
+                }
+              }
+            ]
+          }
+        ]
+      },
+      // auth
+      {
+        path: '/auth',
+        redirect: '/auth/userList',
+        component: PageView,
+        meta: {
+          title: '权限管理',
+          icon: 'lock',
+          permission: 'M_powerMD_0'
+        },
+        children: [
+          {
+            path: '/auth/userList',
+            name: 'powerUserList',
+            component: () => import(/* webpackChunkName: "auth" */ '@/views/power/user/userList.vue'),
+            meta: {
+              title: '用户管理',
+              icon: 'user',
+              permission: 'M_powerMD_user_list'
+            }
+          },
+          {
+            path: '/auth/roleList',
+            name: 'powerRoleList',
+            component: () => import(/* webpackChunkName: "auth" */ '@/views/power/role/roleList.vue'),
+            meta: {
+              title: '角色管理',
+              icon: 'solution',
+              permission: 'M_powerMD_role_list'
+            }
+          }
+        ]
+      },
+      // 系统设置
+      // {
+      //   path: '/setting',
+      //   redirect: '/setting/userList',
+      //   component: PageView,
+      //   meta: {
+      //     title: '系统设置',
+      //     icon: 'setting'
+      //     // permission: 'M_setting_0'
+      //   },
+      //   children: [
+      //     {
+      //       path: '/setting/dataDictionary',
+      //       name: 'powerDD',
+      //       component: () => import(/* webpackChunkName: "setting" */
+      //         '@/views/power/dataDictionary/dataDictionary.vue'),
+      //       meta: {
+      //         title: '数据字典管理',
+      //         icon: 'database'
+      //         // permission: 'M_sys_dataDictionary'
+      //       }
+      //     },
+      //     // {
+      //     //   path: '/setting/register',
+      //     //   name: 'powerRegister',
+      //     //   component: () => import(/* webpackChunkName: "setting" */ '@/views/power/register/register.vue'),
+      //     //   meta: {
+      //     //     title: '参数管理',
+      //     //     icon: 'key',
+      //     //     permission: 'M_sys_register'
+      //     //   }
+      //     // },
+      //     {
+      //       path: '/setting/OperateJournal',
+      //       name: 'powerOperateJournal',
+      //       component: () => import(/* webpackChunkName: "setting" */
+      //         '@/views/power/OperateJournal/OperateJournal.vue'),
+      //       meta: {
+      //         title: '操作日志',
+      //         icon: 'read'
+      //         // permission: 'M_operateJournal'
+      //       }
+      //     }
+      //   ]
+      // }
+      // 公告
+      {
+        path: '/notice',
+        name: 'notice',
+        component: () => import(/* webpackChunkName: "home" */ '@/views/notice/list'),
+        meta: {
+          title: '公告',
+          icon: 'bell'
+        },
+        hidden: true
       }
       }
-    }
     ]
     ]
   },
   },
   {
   {
-    path: '/changePwd',
-    name: 'changePwd',
-    component: () => import(/* webpackChunkName: "home" */ '@/views/user/ChangePwd'),
-    meta: {
-      title: '修改密码',
-      icon: 'home'
-    },
+    path: '*',
+    redirect: '/404',
     hidden: true
     hidden: true
-  },
-  // auth
-  {
-    path: '/auth',
-    redirect: '/auth/userList',
-    component: PageView,
-    meta: {
-      title: 'IT权限管理',
-      icon: 'lock',
-      permission: 'M_auth_0'
-    },
-    children: [{
-      path: '/auth/userList',
-      name: 'powerUserList',
-      component: () => import(/* webpackChunkName: "auth" */ '@/views/power/user/userList.vue'),
-      meta: {
-        title: '用户管理',
-        icon: 'user',
-        permission: 'M_auth_userList'
-      }
-    },
-    {
-      path: '/auth/roleList',
-      name: 'powerRoleList',
-      component: () => import(/* webpackChunkName: "auth" */ '@/views/power/role/roleList.vue'),
-      meta: {
-        title: '角色管理',
-        icon: 'solution',
-        permission: 'M_auth_roleList'
-      }
-    }
-    ]
-  },
-  {
-    path: '/setting',
-    redirect: '/setting/userList',
-    component: PageView,
-    meta: {
-      title: '系统设置',
-      icon: 'setting',
-      permission: 'M_setting_0'
-    },
-    children: [{
-      path: '/setting/dataDictionary',
-      name: 'powerDD',
-      component: () => import(/* webpackChunkName: "setting" */
-        '@/views/power/dataDictionary/dataDictionary.vue'),
-      meta: {
-        title: '数据字典管理',
-        icon: 'database',
-        permission: 'M_sys_dataDictionary'
-      }
-    },
-    {
-      path: '/setting/register',
-      name: 'powerRegister',
-      component: () => import(/* webpackChunkName: "setting" */ '@/views/power/register/register.vue'),
-      meta: {
-        title: '参数管理',
-        icon: 'key',
-        permission: 'M_sys_register'
-      }
-    },
-    // {
-    //   path: '/setting/jobs',
-    //   name: 'powerJobs',
-    //   component: () => import(/* webpackChunkName: "setting" */ '@/views/power/job/jobs.vue'),
-    //   meta: {
-    //     title: '定时器',
-    //     icon: 'alert',
-    //     permission: 'M_sys_job'
-    //   }
-    // },
-    {
-      path: '/setting/OperateJournal',
-      name: 'powerOperateJournal',
-      component: () => import(/* webpackChunkName: "setting" */
-        '@/views/power/OperateJournal/OperateJournal.vue'),
-      meta: {
-        title: '操作日志',
-        icon: 'read',
-        permission: 'M_operateJournal'
-      }
-    }
-    ]
   }
   }
-  ]
-},
-{
-  path: '*',
-  redirect: '/404',
-  hidden: true
-}
 ]
 ]
 
 
 /**
 /**
  * 基础路由
  * 基础路由
  * @type { *[] }
  * @type { *[] }
  */
  */
-export const constantRouterMap = [{
-  path: '/user',
-  component: UserLayout,
-  redirect: '/user/login',
-  hidden: true,
-  children: [{
-    path: 'login',
-    name: 'login',
-    component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
-  },
+export const constantRouterMap = [
   {
   {
-    path: 'register',
-    name: 'register',
-    component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
-  },
-  {
-    path: 'register-result',
-    name: 'registerResult',
-    component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
+    path: '/user',
+    component: UserLayout,
+    redirect: '/user/login',
+    hidden: true,
+    children: [
+      {
+        path: 'login',
+        name: 'login',
+        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
+      },
+      {
+        path: 'register',
+        name: 'register',
+        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
+      },
+      {
+        path: 'register-result',
+        name: 'registerResult',
+        component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
+      },
+      {
+        path: 'recover',
+        name: 'recover',
+        component: undefined
+      }
+    ]
   },
   },
   {
   {
-    path: 'recover',
-    name: 'recover',
-    component: undefined
+    path: '/404',
+    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
   }
   }
-  ]
-},
-{
-  path: '/404',
-  component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
-}
-
 ]
 ]

+ 7 - 3
src/layouts/BasicLayout.vue

@@ -39,7 +39,7 @@
         @toggle="toggle"
         @toggle="toggle"
       />
       />
       <!-- layout content -->
       <!-- layout content -->
-      <a-layout-content :style="{ height: '100%', margin: '24px 24px 0', paddingTop: fixedHeader ? '105px' : '0' }">
+      <a-layout-content :style="{ height: '100%', margin: '24px 24px 0', paddingTop: multiTab&&fixedHeader ? '105px' : (!multiTab&&fixedHeader?'65px':'0') }">
         <transition name="page-transition">
         <transition name="page-transition">
           <route-view/>
           <route-view/>
         </transition>
         </transition>
@@ -47,7 +47,7 @@
 
 
       <!-- layout footer -->
       <!-- layout footer -->
       <a-layout-footer>
       <a-layout-footer>
-        <global-footer />
+        <!-- <global-footer /> -->
       </a-layout-footer>
       </a-layout-footer>
 
 
       <!-- Setting Drawer (show in development mode) -->
       <!-- Setting Drawer (show in development mode) -->
@@ -90,7 +90,9 @@ export default {
   computed: {
   computed: {
     ...mapState({
     ...mapState({
       // 动态主路由
       // 动态主路由
-      mainMenu: state => state.permission.routers
+      mainMenu: state => state.permission.routers,
+      multiTab: state => state.app.multiTab,
+      fixedHeader: state => state.app.fixedHeader
     }),
     }),
     contentPaddingLeft () {
     contentPaddingLeft () {
       if (!this.fixSidebar || this.isMobile()) {
       if (!this.fixSidebar || this.isMobile()) {
@@ -116,6 +118,8 @@ export default {
       this.menus = [noqx.find(item => item.path === '/home')]
       this.menus = [noqx.find(item => item.path === '/home')]
     }
     }
     this.collapsed = !this.sidebarOpened
     this.collapsed = !this.sidebarOpened
+    this.$store.dispatch('ToggleMultiTab', true)
+	  this.$store.dispatch('ToggleColor', '#1890FF')
   },
   },
   mounted () {
   mounted () {
     const userAgent = navigator.userAgent
     const userAgent = navigator.userAgent

+ 3 - 2
src/layouts/PageView.vue

@@ -1,7 +1,8 @@
 <template>
 <template>
   <div :style="!$route.meta.hiddenHeaderContent ? 'margin: -24px -24px 0px;' : null">
   <div :style="!$route.meta.hiddenHeaderContent ? 'margin: -24px -24px 0px;' : null">
     <!-- pageHeader , route meta :true on hide -->
     <!-- pageHeader , route meta :true on hide -->
-    <page-header v-if="!$route.meta.hiddenHeaderContent" :title="pageTitle" :logo="logo" :avatar="avatar">
+    <!-- <page-header v-if="!$route.meta.hiddenHeaderContent" :title="pageTitle" :logo="logo" :avatar="avatar"> -->
+    <page-header v-if="false" :title="pageTitle" :logo="logo" :avatar="avatar">
       <slot slot="action" name="action"></slot>
       <slot slot="action" name="action"></slot>
       <slot slot="content" name="headerContent"></slot>
       <slot slot="content" name="headerContent"></slot>
       <div slot="content" v-if="!this.$slots.headerContent && description">
       <div slot="content" v-if="!this.$slots.headerContent && description">
@@ -124,7 +125,7 @@ export default {
 
 
 <style lang="less" scoped>
 <style lang="less" scoped>
   .content {
   .content {
-    margin: 24px 24px 0;
+    margin: 12px 12px 0;
     .link {
     .link {
       margin-top: 16px;
       margin-top: 16px;
       &:not(:empty) {
       &:not(:empty) {

+ 5 - 4
src/layouts/RouteView.vue

@@ -23,10 +23,11 @@ export default {
     // 这里增加了 multiTab 的判断,当开启了 multiTab 时
     // 这里增加了 multiTab 的判断,当开启了 multiTab 时
     // 应当全部组件皆缓存,否则会导致切换页面后页面还原成原始状态
     // 应当全部组件皆缓存,否则会导致切换页面后页面还原成原始状态
     // 若确实不需要,可改为 return meta.keepAlive ? inKeep : notKeep
     // 若确实不需要,可改为 return meta.keepAlive ? inKeep : notKeep
-    if (!getters.multiTab && !meta.keepAlive) {
-      return notKeep
-    }
-    return this.keepAlive || getters.multiTab || meta.keepAlive ? inKeep : notKeep
+    // if (!getters.multiTab && !meta.keepAlive) {
+    //   return notKeep
+    // }
+    // return this.keepAlive || getters.multiTab || meta.keepAlive ? inKeep : notKeep
+    return meta.keepAlive ? inKeep : notKeep
   }
   }
 }
 }
 </script>
 </script>

+ 95 - 61
src/libs/getDate.js

@@ -1,65 +1,99 @@
 // 引入 moment 时间插件
 // 引入 moment 时间插件
-import moment from "moment";
-//获取今日/昨日/本周/上周/本月/上月 时间
+import moment from 'moment'
+moment.updateLocale('en', { week: {
+  dow: 1, // 星期的第一天是星期一
+  doy: 7 // 年份的第一周必须包含1月1日 (7 + 1 - 1)
+} })
+// 获取今日/昨日/本周/上周/本月/上月 时间
 export default {
 export default {
-    // 获取今日的开始结束时间
-    getToday() {
-        let obj = {
-            starttime: '',
-            endtime: ''
-        }
-        obj.starttime = moment(moment().startOf("day").valueOf()).format("YYYY-MM-DD HH:mm:ss");
-        obj.endtime = moment(moment().valueOf()).format("YYYY-MM-DD HH:mm:ss");
-        return obj
-    },
-    // 获取昨日的开始结束时间
-    getYesterday() {
-        let obj = {
-            starttime: '',
-            endtime: ''
-        }
-        obj.starttime = moment(moment().add(-1, 'days').startOf("day").valueOf()).format("YYYY-MM-DD");
-        obj.endtime = moment(moment().add(-1, 'days').endOf('day').valueOf()).format('YYYY-MM-DD');
-        return obj
-    },
-    // 获取当前周的开始结束时间
-    getCurrWeekDays() {
-        let obj = {
-            starttime: '',
-            endtime: ''
-        }
-        obj.starttime = moment(moment().week(moment().week()).startOf('week').add(1, 'days').valueOf()).format('YYYY-MM-DD')
-        obj.endtime = moment(moment().week(moment().week()).endOf('week').add(1, 'days').valueOf()).format('YYYY-MM-DD');
-        return obj
-    },
-    // 获取上一周的开始结束时间
-    getLastWeekDays() {
-        let obj = {
-            starttime: '',
-            endtime: ''
-        }
-        obj.starttime = moment(moment().week(moment().week() - 1).startOf('week').add(1, 'days').valueOf()).format('YYYY-MM-DD')
-        obj.endtime = moment(moment().week(moment().week() - 1).endOf('week').add(1, 'days').valueOf()).format('YYYY-MM-DD');
-        return obj
-    },
-    // 获取当前月的开始结束时间
-    getCurrMonthDays() {
-        let obj = {
-            starttime: '',
-            endtime: ''
-        }
-        obj.starttime = moment(moment().month(moment().month()).startOf('month').valueOf()).format('YYYY-MM-DD');
-        obj.endtime = moment(moment().month(moment().month()).endOf('month').valueOf()).format('YYYY-MM-DD');
-        return obj
-    },
-    // 获取上一个月的开始结束时间
-    getLastMonthDays() {
-        let obj = {
-            starttime: '',
-            endtime: ''
-        }
-        obj.starttime = moment(moment().month(moment().month() - 1).startOf('month').valueOf()).format('YYYY-MM-DD');
-        obj.endtime = moment(moment().month(moment().month() - 1).endOf('month').valueOf()).format('YYYY-MM-DD');
-        return obj
+  // 获取今日的开始结束时间
+  getToday () {
+    const obj = {
+      starttime: '',
+      endtime: ''
     }
     }
+    obj.starttime = moment(moment().startOf('day').valueOf()).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD')
+    return obj
+  },
+  //  近7天
+  getRecentday () {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment().subtract('days', 6).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD')
+    return obj
+  },
+  //  近7天  年月日时分秒
+  getRecentTime () {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment().subtract('days', 6).format('YYYY-MM-DD HH:mm:ss')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD HH:mm:ss')
+    return obj
+  },
+  // 获取昨日的开始结束时间
+  getYesterday () {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment(moment().add(-1, 'days').startOf('day').valueOf()).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().add(-1, 'days').endOf('day').valueOf()).format('YYYY-MM-DD')
+    return obj
+  },
+  // 获取当前周的开始到当天结束时间
+  getCurrWeekDays () {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment(moment().week(moment().week()).startOf('week').add('days').valueOf()).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD')
+    return obj
+  },
+  // 获取上一周的开始结束时间
+  getLastWeekDays () {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment(moment().week(moment().week() - 1).startOf('week').add('days').valueOf()).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().week(moment().week() - 1).endOf('week').add('days').valueOf()).format('YYYY-MM-DD')
+    return obj
+  },
+  // 获取当前月的开始到当天结束时间
+  getCurrMonthDays () {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment(moment().month(moment().month()).startOf('month').valueOf()).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD')
+    return obj
+  },
+  // 获取上一个月的开始结束时间
+  getLastMonthDays () {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment(moment().month(moment().month() - 1).startOf('month').valueOf()).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().month(moment().month() - 1).endOf('month').valueOf()).format('YYYY-MM-DD')
+    return obj
+  },
+  // 获取近三个月的开始结束时间
+  getThreeMonthDays () {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment(moment().month(moment().month() - 2).startOf('month').valueOf()).format('YYYY-MM-DD')
+    obj.endtime = moment(moment().month(moment().month() - 2).endOf('month').valueOf()).format('YYYY-MM-DD')
+    return obj
+  }
 }
 }

+ 5 - 0
src/libs/tools.js

@@ -0,0 +1,5 @@
+// 小数运算精度处理  4位小数运算后结果保留2位小数
+export const getOperationalPrecision = (num1, num2) => {
+  const val = ((num1 * 10000) * (num2 * 10000) / 100000000).toFixed(2) || 0
+  return val != 0 ? val : 0
+}

+ 3 - 0
src/store/getters.js

@@ -5,9 +5,12 @@ const getters = {
   token: state => state.user.token,
   token: state => state.user.token,
   avatar: state => state.user.avatar,
   avatar: state => state.user.avatar,
   nickname: state => state.user.name,
   nickname: state => state.user.name,
+  mustChangePwd: state => state.user.mustChangePwd,
   welcome: state => state.user.welcome,
   welcome: state => state.user.welcome,
   roles: state => state.user.roles,
   roles: state => state.user.roles,
   userInfo: state => state.user.info,
   userInfo: state => state.user.info,
+  authOrgs: state => state.user.authOrgs,
+  changeOrg: state => state.user.changeOrg,
   addRouters: state => state.permission.addRouters,
   addRouters: state => state.permission.addRouters,
   multiTab: state => state.app.multiTab,
   multiTab: state => state.app.multiTab,
   lang: state => state.i18n.lang
   lang: state => state.i18n.lang

+ 3 - 1
src/store/index.js

@@ -3,6 +3,7 @@ import Vuex from 'vuex'
 
 
 import app from './modules/app'
 import app from './modules/app'
 import user from './modules/user'
 import user from './modules/user'
+import socket from './modules/websocketStore'
 
 
 // default router permission control
 // default router permission control
 import permission from './modules/permission'
 import permission from './modules/permission'
@@ -17,7 +18,8 @@ export default new Vuex.Store({
   modules: {
   modules: {
     app,
     app,
     user,
     user,
-    permission
+    permission,
+    socket
   },
   },
   state: {
   state: {
 
 

+ 25 - 1
src/store/modules/user.js

@@ -7,10 +7,13 @@ const user = {
   state: {
   state: {
     token: '',
     token: '',
     name: '',
     name: '',
+    mustChangePwd: null,
     welcome: '',
     welcome: '',
     avatar: '',
     avatar: '',
     roles: { permissionList: [] },
     roles: { permissionList: [] },
-    info: {}
+    info: {},
+    authOrgs: [],
+    changeOrg: ''
   },
   },
 
 
   mutations: {
   mutations: {
@@ -31,6 +34,15 @@ const user = {
     },
     },
     SET_INFO: (state, info) => {
     SET_INFO: (state, info) => {
       state.info = info
       state.info = info
+    },
+    SET_AUTHORGS: (state, authOrgs) => {
+      state.authOrgs = authOrgs
+    },
+    SET_CHANGEORG: (state, changeOrg) => {
+      state.changeOrg = changeOrg
+    },
+    SET_MUSTCHANGEPWD: (state, status) => {
+      state.mustChangePwd = status
     }
     }
   },
   },
 
 
@@ -47,7 +59,10 @@ const user = {
               const users = res.auth_user
               const users = res.auth_user
               Vue.ls.set('hasError', 0)
               Vue.ls.set('hasError', 0)
               commit('SET_TOKEN', res.access_token)
               commit('SET_TOKEN', res.access_token)
+              commit('SET_INFO', users)
+              commit('SET_AUTHORGS', res.auth_orgs || [])
               commit('SET_NAME', { name: users.userNameCN, welcome: welcome() })
               commit('SET_NAME', { name: users.userNameCN, welcome: welcome() })
+              commit('SET_MUSTCHANGEPWD', users.mustChangePwd)
               Vue.ls.set('rolesAccess', { permissionList: users.permCodes }, 7 * 24 * 60 * 60 * 1000)
               Vue.ls.set('rolesAccess', { permissionList: users.permCodes }, 7 * 24 * 60 * 60 * 1000)
               commit('SET_AVATAR', res.avatar ? res.avatar : '')
               commit('SET_AVATAR', res.avatar ? res.avatar : '')
               // 记住密码
               // 记住密码
@@ -78,6 +93,11 @@ const user = {
       commit('SET_NAME', { name: Vue.ls.get('userName'), welcome: '' })
       commit('SET_NAME', { name: Vue.ls.get('userName'), welcome: '' })
       return roles
       return roles
     },
     },
+    // 切换账号
+    SetOrgSn ({ commit, state }, info) {
+      // console.log(info)
+      commit('SET_CHANGEORG', info)
+    },
     // 登出
     // 登出
     Logout ({ commit, state }) {
     Logout ({ commit, state }) {
       console.log(state)
       console.log(state)
@@ -87,7 +107,11 @@ const user = {
         }).catch((error) => {
         }).catch((error) => {
           resolve(error)
           resolve(error)
         }).finally(() => {
         }).finally(() => {
+          commit('SET_INFO', {})
+          commit('SET_AUTHORGS', [])
+          commit('SET_CHANGEORG', '')
           commit('SET_NAME', { name: '', welcome: '' })
           commit('SET_NAME', { name: '', welcome: '' })
+          commit('SET_MUSTCHANGEPWD', '')
           commit('SET_AVATAR', '')
           commit('SET_AVATAR', '')
           commit('SET_TOKEN', '')
           commit('SET_TOKEN', '')
           commit('SET_ROLES', { permissionList: [] })
           commit('SET_ROLES', { permissionList: [] })

+ 121 - 0
src/store/modules/websocketStore.js

@@ -0,0 +1,121 @@
+// import Vue from 'vue'
+import { noticeUserList, hasRead, getUnreadCount } from '@/api/noticeUser'
+export default {
+  state: {
+    websock: null,
+    wsMessageData: null,
+    wsMessageHomeData: null,
+    unreadCount: 0,
+    updateMessage: null, // 判断是否刷新未读消息数据
+    heartInterId: null
+  },
+  getters: {
+    wsMessageData: state => {
+      return () => state.wsMessageData
+    },
+    wsMessageHomeData: state => {
+      return () => state.wsMessageHomeData
+    },
+    unreadCount: state => state.unreadCount,
+    updateMessage: state => {
+      return () => state.updateMessage
+    }
+  },
+  mutations: {
+    WEBSOCKET_INIT (state, url) {
+      const _this = this
+      const baseUrl = process.env.VUE_APP_WX_BASE_URL
+      const sid = 'pc/u' + this.getters.userInfo.userid + 'epc'
+      const protocol = process.env.NODE_ENV == 'production' ? (window.location.protocol == 'http:' ? 'ws:' : 'wss:') : 'ws:'
+      const wsUrl = protocol + baseUrl + sid
+      console.log(process.env.NODE_ENV, wsUrl)
+      state.websock = new WebSocket(wsUrl)
+      state.websock.onopen = function () {
+        console.log('连接成功!')
+        _this.dispatch('getUnreadMessageCount')
+      }
+      state.websock.onmessage = function (e) {
+        console.log('ws接收!', e.data)
+        if (e.data != 'pong') {
+          console.log('进来----------')
+          state.wsMessageData = JSON.parse(e.data)
+        }
+      }
+      state.websock.οnerrοr = function (e) { // 错误
+        console.log('ws错误!', e)
+      }
+      state.websock.onclose = function (e) { // 关闭
+        console.log('ws关闭!', e)
+      }
+
+      // 发送心跳包
+      state.heartInterId = setInterval(function () {
+        console.log('ws发送心跳!')
+        if (state.websock.readyState == 3) {
+          clearInterval(state.heartInterId)
+          _this.commit('WEBSOCKET_INIT', url)
+        }
+        state.websock.send('ping')
+      }, 10000)
+    },
+    WEBSOCKET_CLOSE (state) {
+      state.websock.close()
+      clearInterval(state.heartInterId)
+    },
+    WEBSOCKET_SEND (state, p) {
+      console.log('ws发送!', p)
+      state.websock.send(p)
+    },
+    UPDATE_HOME (state, p) {
+      state.wsMessageHomeData = p
+    },
+    setMessageCount (state, count) {
+      state.unreadCount = count
+    }
+  },
+  actions: {
+    WEBSOCKET_INIT ({ commit }, url) {
+      commit('WEBSOCKET_INIT', url)
+    },
+    WEBSOCKET_SEND ({ commit }, p) {
+      commit('WEBSOCKET_SEND', p)
+    },
+    UPDATE_HOME ({ commit }, p) {
+      commit('UPDATE_HOME', p)
+    },
+    WEBSOCKET_CLOSE ({ commit }) {
+      commit('WEBSOCKET_CLOSE')
+    },
+    // 此方法用来获取未读消息条数,接口只返回数值,不返回消息列表
+    getUnreadMessageCount ({ state, commit }) {
+      getUnreadCount().then(res => {
+        console.log(res, '---------------请求未读消息', res.data ? res.data.no_read_count : 0)
+        commit('setMessageCount', res.data ? res.data.no_read_count : 0)
+      })
+    },
+    // 获取消息列表,其中包含未读、已读、回收站三个列表
+    getMessageList ({ state, commit }, params) {
+      return new Promise((resolve, reject) => {
+        noticeUserList(params).then(res => {
+          resolve(res)
+        }).catch(error => {
+          reject(error)
+        })
+      })
+    },
+    // 把一个未读消息标记为已读
+    hasRead ({ state, commit }, { msg_id }) {
+      return new Promise((resolve, reject) => {
+        hasRead(msg_id).then((res) => {
+          resolve(res)
+        }).catch(error => {
+          reject(error)
+        })
+      })
+    },
+    // 更新未读数
+    updateUnreadcount ({ state, commit }, count) {
+      commit('setMessageCount', count)
+    }
+  }
+}

+ 3 - 1
src/utils/mixin.js

@@ -57,7 +57,9 @@ const AppDeviceEnquire = {
       switch (deviceType) {
       switch (deviceType) {
         case DEVICE_TYPE.DESKTOP:
         case DEVICE_TYPE.DESKTOP:
           $store.commit('TOGGLE_DEVICE', 'desktop')
           $store.commit('TOGGLE_DEVICE', 'desktop')
-          $store.dispatch('setSidebar', true)
+          // $store.dispatch('setSidebar', true)
+          // 默认收起侧边栏
+          $store.dispatch('setSidebar', false)
           break
           break
         case DEVICE_TYPE.TABLET:
         case DEVICE_TYPE.TABLET:
           $store.commit('TOGGLE_DEVICE', 'tablet')
           $store.commit('TOGGLE_DEVICE', 'tablet')

+ 5 - 4
src/utils/request.js

@@ -38,18 +38,19 @@ const err = (error) => {
 // request interceptor
 // request interceptor
 service.interceptors.request.use(config => {
 service.interceptors.request.use(config => {
   const token = store.getters.token
   const token = store.getters.token
-  config.headers['App-Type'] = 9 // 平台类型
+  const changeOrg = store.getters.changeOrg
   if (token) {
   if (token) {
-    config.headers['authorization'] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
+    config.headers['access-token'] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
+    config.headers['access-org'] = changeOrg // 当前要切换的账号 sn
   }
   }
   return config
   return config
 }, err)
 }, err)
 
 
 // response interceptor
 // response interceptor
 service.interceptors.response.use((response) => {
 service.interceptors.response.use((response) => {
-  console.log(response, 'response.data.status')
+  // console.log(response, 'response.data.status')
   const et = sessionStorage.getItem('errorTips')
   const et = sessionStorage.getItem('errorTips')
-  if (response.data.status == '1001' && !et) {
+  if ((response.data.status == '1001' || response.data.status == '1099') && !et) {
     sessionStorage.setItem('errorTips', 1)
     sessionStorage.setItem('errorTips', 1)
     modal.destroyAll()
     modal.destroyAll()
     modal.error({
     modal.error({

+ 32 - 3
src/views/Home.vue

@@ -1,22 +1,51 @@
 <template>
 <template>
   <div class="home">
   <div class="home">
     <a-alert :message="message" type="info" showIcon />
     <a-alert :message="message" type="info" showIcon />
+    <!-- 重置密码 -->
+    <a-modal
+      class="resetPwdModal"
+      title="重置密码"
+      width="60%"
+      centered
+      :footer="null"
+      :closable="false"
+      :maskClosable="false"
+      :destroyOnClose="true"
+      @cancel="openResetPwd=false"
+      v-model="openResetPwd">
+      <ResetPwd />
+    </a-modal>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
+import { mapGetters } from 'vuex'
+import ResetPwd from '@/views/user/ResetPwd.vue'
 export default {
 export default {
   name: 'Home',
   name: 'Home',
-  components: {
-  },
+  components: { ResetPwd },
   data () {
   data () {
     return {
     return {
-      message: '欢迎登录' + process.env.VUE_APP_PRO_NAME
+      message: '欢迎登录' + process.env.VUE_APP_PRO_NAME,
+      openResetPwd: false //  重置密码是否显示
     }
     }
   },
   },
+  computed: {
+    ...mapGetters(['mustChangePwd'])
+  },
   created () {
   created () {
   },
   },
   methods: {
   methods: {
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      //  判断登录用户是否重置过密码(首次登陆需强制重置密码)
+      if (vm.mustChangePwd == 0) {
+        vm.openResetPwd = false
+      } else {
+        vm.openResetPwd = true
+      }
+    })
   }
   }
 }
 }
 </script>
 </script>

+ 184 - 0
src/views/allocationManagement/chainTransferIn/detail.vue

@@ -0,0 +1,184 @@
+<template>
+  <div class="chainTransferInDetail-wrap">
+    <a-page-header :ghost="false" :backIcon="false" class="chainTransferInDetail-cont" >
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="chainTransferInDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        <a-button
+          v-if="isEdit"
+          type="primary"
+          size="small"
+          style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+          id="chainTransferInDetail-edit-btn"
+          @click.stop="handleEdit">编辑</a-button>
+      </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra">
+        <a-radio-group key="3" v-model="printerType">
+          <a-radio value="NEEDLE">针式</a-radio>
+          <a-radio value="INK">喷墨</a-radio>
+        </a-radio-group>
+        <a-button key="2" id="chainTransferInDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+        <a-button key="1" type="primary" id="chainTransferInDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+      </template>
+    </a-page-header>
+    <!-- 基础信息 -->
+    <a-card size="small" :bordered="false" class="chainTransferInDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions :column="3">
+            <a-descriptions-item label="调入单号">{{ (basicInfoData&&basicInfoData.allocationLinkagePutNo) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="调出对象">{{ (basicInfoData&&basicInfoData.outTenantName) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <a-card size="small" :bordered="false" class="chainTransferInDetail-cont">
+      <!-- 总计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1335 }"
+        bordered>
+      </s-table>
+    </a-card>
+    <!-- 打印 -->
+    <div id="print"></div>
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { getOperationalPrecision } from '@/libs/tools.js'
+import { allocLinkagePutDetailList, allocLinkagePutDetailSn, allocLinkagePutDetailCount, allocLinkagePutDetailPrint } from '@/api/allocLinkagePut'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价(¥)', dataIndex: 'putCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调入数量', dataIndex: 'putQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本小计(¥)', dataIndex: 'costSubtotal', width: 115, align: 'center' },
+        { title: '仓库', dataIndex: 'warehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        const params = Object.assign(parameter, { allocationLinkagePutSn: this.$route.params.sn })
+        return allocLinkagePutDetailList(params).then(res => {
+          const 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
+            // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+            data.list[i].costSubtotal = getOperationalPrecision(data.list[i].putCost, data.list[i].putQty)
+          }
+          this.getDetailCount(params)
+          this.localDataSource = data.list
+          return data
+        })
+      },
+      basicInfoData: null, //  基本信息
+      productTotal: null, //  合计
+      localDataSource: [],
+      printerType: 'NEEDLE' //  打印机类型
+    }
+  },
+  computed: {
+    isEdit () {
+      return (this.basicInfoData && this.basicInfoData.state == 'WAIT_AUDIT')
+    }
+  },
+  methods: {
+    //  返回列表
+    handleBack () {
+      this.$router.push({ path: '/allocationManagement/chainTransferIn/list' })
+    },
+    // 基本信息
+    getDetail () {
+      allocLinkagePutDetailSn({ sn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.basicInfoData = res.data
+        } else {
+          this.basicInfoData = null
+        }
+      })
+    },
+    // 合计
+    getDetailCount (params) {
+      allocLinkagePutDetailCount(params).then(res => {
+        if (res.status == 200) {
+          this.productTotal = res.data
+        } else {
+          this.productTotal = null
+        }
+      })
+    },
+    //  编辑
+    handleEdit () {
+      this.$router.push({ path: `/allocationManagement/chainTransferIn/edit/${this.basicInfoData.id}/${this.basicInfoData.allocationLinkagePutSn}` })
+    },
+    // 打印预览/快捷打印
+    handlePrint (type) {
+      const _this = this
+      allocLinkagePutDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.print(res, type)
+        }
+      })
+    },
+    print (data, type) {
+      if (!data) {
+        return
+      }
+      const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
+      document.getElementById('print').innerHTML = '<iframe id="printf" name="printf" src="' + url + '" hidden></iframe>'
+      if (type == 'preview') { //  预览
+        window.open(url)
+      } else if (type == 'print') { //  打印
+        window.frames['printf'].focus()
+        window.frames['printf'].print()
+      }
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getDetail()
+    })
+  }
+}
+</script>
+
+<style lang="less">
+  .chainTransferInDetail-wrap{
+    .chainTransferInDetail-cont{
+      margin-bottom: 15px;
+    }
+  }
+</style>

+ 367 - 0
src/views/allocationManagement/chainTransferIn/edit.vue

@@ -0,0 +1,367 @@
+<template>
+  <div class="chainTransferInEdit-wrap">
+    <a-page-header :ghost="false" :backIcon="false" class="chainTransferInEdit-back" >
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="chainTransferInEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+      </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra">
+        <a-radio-group key="3" v-model="printerType">
+          <a-radio value="NEEDLE">针式</a-radio>
+          <a-radio value="INK">喷墨</a-radio>
+        </a-radio-group>
+        <a-button key="2" id="chainTransferInEdit-preview-btn" :disabled="loadData.length==0" @click="handlePrint('preview')">打印预览</a-button>
+        <a-button key="1" type="primary" id="chainTransferInEdit-print-btn" :disabled="loadData.length==0" @click="handlePrint('print')">快捷打印</a-button>
+      </template>
+    </a-page-header>
+    <!-- 基础信息 -->
+    <a-card size="small" :bordered="false" class="chainTransferInDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions :column="3">
+            <a-descriptions-item label="调入单号">{{ (basicInfoData&&basicInfoData.allocationLinkagePutNo) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="调出对象">{{ (basicInfoData&&basicInfoData.outTenantName) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <!-- 总计 -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div slot="message">总款数 <strong>{{ (basicInfoData&&basicInfoData.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (basicInfoData&&basicInfoData.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (basicInfoData&&basicInfoData.productTotalCost) || 0 }}</strong></div>
+    </a-alert>
+    <a-card size="small" :bordered="false" class="chainTransferInEdit-cont">
+      <!-- 筛选条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="getProductList(1)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品编码" prop="productCode">
+                <a-input id="chainTransferInEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品名称" prop="productName">
+                <a-input id="chainTransferInEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品分类">
+                <a-cascader
+                  @change="changeProductType"
+                  change-on-select
+                  v-model="productType"
+                  expand-trigger="hover"
+                  :options="productTypeList"
+                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                  id="chainTransferInEdit-productType"
+                  placeholder="请选择产品分类"
+                  allowClear />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+              <a-button type="primary" @click="getProductList(1)" :disabled="disabled" id="chainTransferInEdit-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferInEdit-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <a-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :dataSource="loadData"
+        :scroll="{ x: 1415 }"
+        bordered>
+        <!-- 仓库仓位 -->
+        <template slot="warehouse" slot-scope="text, record, index">
+          <a-cascader
+            @change="e => changeWarehouseCascade(e, record, index)"
+            v-model="record.warehouseCascade"
+            expand-trigger="hover"
+            :allowClear="false"
+            :options="warehouseCascadeData"
+            :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+            id="chainTransferInEdit-warehouseCascade"
+            placeholder="请选择仓库仓位"
+            style="width: 100%;" />
+        </template>
+      </a-table>
+    </a-card>
+    <a-affix :offset-bottom="0">
+      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+        <a-button
+          type="primary"
+          id="chainTransferInEdit-submit"
+          size="large"
+          class="button-primary"
+          @click="handleSubmit"
+          style="padding: 0 60px;">提交入库</a-button>
+      </div>
+    </a-affix>
+    <!-- 打印 -->
+    <div id="print"></div>
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { getOperationalPrecision } from '@/libs/tools.js'
+import { dealerProductTypeList } from '@/api/dealerProductType'
+import { warehouseCascadeList } from '@/api/warehouse'
+import { allocLinkagePutDetailSn, allocLinkagePutDetailList, allocLinkagePutDetailCount, allocLinkagePutDetailUpdate, allocLinkagePutSubmit, allocLinkagePutDetailPrint } from '@/api/allocLinkagePut'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      queryParam: {
+        productCode: '', //  产品编码
+        productName: '', //  产品名称
+        productTypeSn1: '', //  产品分类1
+        productTypeSn2: '', //  产品分类2
+        productTypeSn3: '' //  产品分类3
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      productTypeList: [], //  产品分类  下拉数据
+      productType: [],
+      warehouseCascadeData: [], //  仓库仓位
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价(¥)', dataIndex: 'putCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调入数量', dataIndex: 'putQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本小计(¥)', dataIndex: 'costSubtotal', width: 115, align: 'center' },
+        { title: '仓库仓位', scopedSlots: { customRender: 'warehouse' }, width: 280, align: 'center' }
+      ],
+      loadData: [],
+      pageNo: 1, //  分页页码
+      pageSize: 10, //  分页 每页多少条
+      paginationProps: {
+        showSizeChanger: true, //  是否可以改变 pageSize
+        total: 0, //  分页总条数
+        current: 1,
+        onShowSizeChange: (current, pageSize) => this.changePageSize(current, pageSize),
+        onChange: (current) => this.changePage(current)
+      },
+      basicInfoData: null, //  基本信息
+      productTotal: null, //  合计
+      printerType: 'NEEDLE' //  打印机类型
+    }
+  },
+  methods: {
+    //  重置
+    resetSearchForm () {
+      this.queryParam.productCode = ''
+      this.queryParam.productName = ''
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.productType = []
+      this.getProductList(1)
+    },
+    // 基本信息
+    getDetail () {
+      allocLinkagePutDetailSn({ sn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.basicInfoData = res.data
+          this.getProductType()
+        } else {
+          this.basicInfoData = null
+        }
+      })
+    },
+    //  提交
+    handleSubmit () {
+      allocLinkagePutSubmit({ sn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.handleBack()
+        }
+      })
+    },
+    // 产品列表数据
+    getProductList (pageNo) {
+      this.disabled = true
+      this.pageNo = pageNo || this.pageNo
+      const params = Object.assign({ pageNo: this.pageNo, pageSize: this.pageSize }, this.queryParam, { allocationLinkagePutSn: this.$route.params.sn })
+      allocLinkagePutDetailList(params).then(res => {
+        if (res.status == 200) {
+          this.getDetailCount(params)
+          const data = res.data
+          this.paginationProps.total = Number(res.data.count) || 0
+          this.paginationProps.current = data.pageNo
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+            const warehouseSn = data.list[i].warehouseSn || undefined
+            const warehouseLocationSn = data.list[i].warehouseLocationSn || undefined
+            data.list[i].warehouseSnBackups = warehouseSn
+            data.list[i].warehouseLocationSnBackups = warehouseLocationSn
+            if (warehouseSn || warehouseLocationSn) {
+              data.list[i].warehouseCascade = [warehouseSn, warehouseLocationSn]
+            } else {
+              data.list[i].warehouseCascade = undefined
+            }
+            // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+            data.list[i].costSubtotal = getOperationalPrecision(data.list[i].putCost, data.list[i].putQty)
+          }
+          this.loadData = data.list
+          this.disabled = false
+        } else {
+          this.paginationProps.total = 0
+          this.paginationProps.current = 1
+          this.loadData = []
+        }
+      })
+    },
+    // 合计
+    getDetailCount (params) {
+      allocLinkagePutDetailCount(params).then(res => {
+        if (res.status == 200) {
+          this.productTotal = res.data
+        } else {
+          this.productTotal = null
+        }
+      })
+    },
+    //  返回列表
+    handleBack () {
+      this.$router.push({ path: '/allocationManagement/chainTransferIn/list' })
+    },
+    //  产品分类  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] : ''
+    },
+    changeWarehouseCascade (val, opt, ind) {
+      if (val.length < 2) {
+        this.$message.warning('当前仓库无仓位,请选择其他仓库')
+        const warehouseSnBackups = this.loadData[ind].warehouseSnBackups || undefined
+        const warehouseLocationSnBackups = this.loadData[ind].warehouseLocationSnBackups || undefined
+        this.loadData[ind].warehouseSn = warehouseSnBackups
+        this.loadData[ind].warehouseLocationSn = warehouseLocationSnBackups
+        if (warehouseSnBackups || warehouseLocationSnBackups) {
+          this.loadData[ind].warehouseCascade = [warehouseSnBackups, warehouseLocationSnBackups]
+        } else {
+          this.loadData[ind].warehouseCascade = undefined
+        }
+      } else {
+        this.loadData[ind].warehouseSn = val[0] ? val[0] : ''
+        this.loadData[ind].warehouseLocationSn = val[1] ? val[1] : ''
+        this.handleAdd(this.loadData[ind])
+      }
+    },
+    //  添加/编辑
+    handleAdd (row) {
+      // 清空成本价或数量时,值应保持未清空前的值,因成本价和数量都不可为空
+      if (!row.warehouseSn) {
+        row.warehouseSn = row.warehouseSnBackups
+        return
+      }
+      if (!row.warehouseLocationSn) {
+        row.warehouseLocationSn = row.warehouseLocationSnBackups
+        return
+      }
+      const params = {
+        id: row.id,
+        warehouseLocationSn: row.warehouseLocationSn,
+        warehouseSn: row.warehouseSn
+      }
+      allocLinkagePutDetailUpdate(params).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.getProductList()
+        }
+      })
+    },
+    //  产品分类  列表
+    getProductType () {
+      dealerProductTypeList({ sysFlag: this.basicInfoData.allocationType == 'JIANGUAN' ? '1' : '0' }).then(res => {
+        if (res.status == 200) {
+          this.productTypeList = res.data
+        } else {
+          this.productTypeList = []
+        }
+      })
+    },
+    getWarehouseCascade () {
+      warehouseCascadeList({}).then(res => {
+        if (res.status == 200) {
+          res.data.map(item => {
+            item.sn = item.warehouseSn
+            if (item.warehouseLocationList) {
+              item.warehouseLocationList.map(subItem => {
+                subItem.sn = subItem.warehouseLocationSn
+              })
+            }
+          })
+          this.warehouseCascadeData = res.data
+          console.log(this.warehouseCascadeData)
+        } else {
+          this.warehouseCascadeData = []
+        }
+      })
+    },
+    // 打印预览/快捷打印
+    handlePrint (type) {
+      const _this = this
+      allocLinkagePutDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.print(res, type)
+        }
+      })
+    },
+    print (data, type) {
+      if (!data) {
+        return
+      }
+      const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
+      document.getElementById('print').innerHTML = '<iframe id="printf" name="printf" src="' + url + '" hidden></iframe>'
+      if (type == 'preview') { //  预览
+        window.open(url)
+      } else if (type == 'print') { //  打印
+        window.frames['printf'].focus()
+        window.frames['printf'].print()
+      }
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getDetail()
+      vm.getProductList(1)
+      vm.getWarehouseCascade()
+    })
+  }
+}
+</script>
+
+<style lang="less">
+  .chainTransferInEdit-wrap{
+    .chainTransferInEdit-back{
+      margin-bottom: 15px;
+    }
+    .chainTransferInEdit-cont{
+      margin-bottom: 15px;
+    }
+  }
+</style>

+ 236 - 0
src/views/allocationManagement/chainTransferIn/list.vue

@@ -0,0 +1,236 @@
+<template>
+  <a-card size="small" :bordered="false" class="chainTransferInList-wrap">
+    <!-- 搜索条件 -->
+    <div 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="入库时间">
+              <rangeDate ref="rangeDate" @change="dateChange" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="调出对象">
+              <a-select
+                placeholder="请选择调出对象"
+                allowClear
+                id="chainTransferInList-outTenantSn"
+                v-model="queryParam.outTenantSn"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in outTenantSnData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="调拨产品类型">
+              <v-select
+                v-model="queryParam.allocationType"
+                ref="allocationType"
+                id="chainTransferInList-allocationType"
+                code="ALLOCATION_LINKAGE_PRODUCT_TYPE"
+                placeholder="请选择调拨产品类型"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="业务状态">
+                <v-select
+                  v-model="queryParam.state"
+                  ref="state"
+                  id="chainTransferInList-state"
+                  code="ALLOCATION_LINKAGE_PUT_STATUS"
+                  placeholder="请选择业务状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="财务状态">
+                <v-select
+                  v-model="queryParam.settleState"
+                  ref="settleState"
+                  id="chainTransferInList-settleState"
+                  code="FINANCIAL_PAY_STATUS"
+                  placeholder="请选择财务状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="chainTransferInList-refresh">查询</a-button>
+            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferInList-reset">重置</a-button>
+            <a @click="advanced=!advanced" style="margin-left: 8px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 1650, y: tableHeight }"
+      bordered>
+      <!-- 连锁调入单号 -->
+      <template slot="allocationLinkagePutNo" slot-scope="text, record">
+        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.allocationLinkagePutNo }}</span>
+      </template>
+      <!-- 财务状态 -->
+      <template slot="settleState" slot-scope="text, record">
+        <a-badge :color="text=='FINISH'?'#87d068':'gold'" :text="record.settleStateDictValue" />
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button
+          size="small"
+          type="link"
+          v-if="record.state == 'WAIT_SUBMIT'"
+          class="button-primary"
+          @click="handleEdit(record)"
+          id="chainTransferInList-warehousing-btn">入库</a-button>
+        <a-button
+          size="small"
+          type="link"
+          v-if="record.state == 'WAIT_AUDIT'"
+          class="button-warning"
+          @click="handleExamine(record)"
+          id="chainTransferInList-examine-btn">审核</a-button>
+        <a-button
+          size="small"
+          type="link"
+          v-if="record.state == 'WAIT_AUDIT'"
+          class="button-info"
+          @click="handleEdit(record)"
+          id="chainTransferInList-edit-btn">编辑</a-button>
+        <span v-if="(record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT')">--</span>
+      </template>
+    </s-table>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { allocLinkagePutList, allocLinkagePutAudit } from '@/api/allocLinkagePut'
+import { getTenantList } from '@/api/allocLinkageOut'
+export default {
+  components: { STable, VSelect, rangeDate },
+  data () {
+    return {
+      tableHeight: 0,
+      advanced: false, // 高级搜索 展开/关闭
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        outTenantSn: undefined, //  调出对象
+        allocationType: undefined, //  调拨产品类型
+        state: undefined, //  业务状态
+        settleState: undefined
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
+        { title: '连锁调入单号', scopedSlots: { customRender: 'allocationLinkagePutNo' }, width: 220, align: 'center' },
+        { title: '调出对象', dataIndex: 'outTenantName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总数量', dataIndex: 'productTotalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总成本', dataIndex: 'productTotalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库时间', dataIndex: 'putWarehouseTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨产品类型', dataIndex: 'allocationTypeDictValue', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'stateDictValue', width: 100, align: 'center' },
+        { title: '财务状态', scopedSlots: { customRender: 'settleState' }, width: 100, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        if (this.tableHeight == 0) {
+          this.tableHeight = window.innerHeight - 80
+        }
+        return allocLinkagePutList(Object.assign(parameter, this.queryParam)).then(res => {
+          const 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
+          return data
+        })
+      },
+      outTenantSnData: []
+    }
+  },
+  methods: {
+    //  时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.outTenantSn = undefined
+      this.queryParam.allocationType = undefined
+      this.queryParam.state = undefined
+      this.queryParam.settleState = undefined
+      this.$refs.table.refresh(true)
+    },
+    //  详情
+    handleDetail (row) {
+      this.$router.push({ path: `/allocationManagement/chainTransferIn/detail/${row.allocationLinkagePutSn}` })
+    },
+    //  入库/编辑
+    handleEdit (row) {
+      this.$router.push({ path: `/allocationManagement/chainTransferIn/edit/${row.id}/${row.allocationLinkagePutSn}` })
+    },
+    //  审核
+    handleExamine (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要审核通过吗?',
+        centered: true,
+        onOk () {
+          allocLinkagePutAudit({ sn: row.allocationLinkagePutSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    },
+    // 调出对象
+    getPutTenantList () {
+      getTenantList({}).then(res => {
+        if (res.status == 200) {
+          this.outTenantSnData = res.data
+        } else {
+          this.outTenantSnData = []
+        }
+      })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getPutTenantList()
+    })
+  }
+}
+</script>

+ 147 - 0
src/views/allocationManagement/chainTransferOut/basicInfoModal.vue

@@ -0,0 +1,147 @@
+<template>
+  <a-modal
+    centered
+    class="chainTransferOut-basicInfo-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="新增连锁调出单"
+    v-model="isShow"
+    @cancle="isShow = false"
+    :width="800">
+    <a-form-model
+      id="chainTransferOut-basicInfo-form"
+      ref="ruleForm"
+      :model="form"
+      :rules="rules"
+      :label-col="formItemLayout.labelCol"
+      :wrapper-col="formItemLayout.wrapperCol"
+    >
+      <a-form-model-item label="调出产品类型" prop="allocationType">
+        <v-select
+          v-model="form.allocationType"
+          ref="allocationType"
+          id="chainTransferOut-basicInfo-allocationType"
+          code="ALLOCATION_LINKAGE_PRODUCT_TYPE"
+          placeholder="请选择调出产品类型"
+          allowClear
+        ></v-select>
+      </a-form-model-item>
+      <a-form-model-item label="调往对象" prop="putTenantSn">
+        <a-select
+          placeholder="请选择调往对象"
+          allowClear
+          v-model="form.putTenantSn"
+          :showSearch="true"
+          option-filter-prop="children"
+          :filter-option="filterOption">
+          <a-select-option v-for="item in putTenantSnData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
+        </a-select>
+      </a-form-model-item>
+      <a-form-model-item label="备注" prop="remark">
+        <a-textarea id="chainTransferOut-basicInfo-remark" :maxLength="500" v-model="form.remark" placeholder="请输入备注(最多500个字符)" allowClear />
+      </a-form-model-item>
+    </a-form-model>
+    <div class="btn-cont">
+      <a-button type="primary" id="chainTransferOut-basicInfo-modal-save" @click="handleSave">保存</a-button>
+      <a-button id="chainTransferOut-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { VSelect } from '@/components'
+import { getTenantList, allocLinkageOutSave } from '@/api/allocLinkageOut'
+export default {
+  name: 'ChainTransferOutBasicInfoModal',
+  components: { VSelect },
+  props: {
+    openModal: {
+      //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 18 }
+      },
+      form: {
+        allocationType: '', // 调出产品类型
+        putTenantSn: undefined, //  调往对象
+        remark: ''
+      },
+      rules: {
+        allocationType: [{ required: true, message: '请选择调出产品类型', trigger: 'change' }],
+        putTenantSn: [{ required: true, message: '请选择调往对象', trigger: 'change' }]
+      },
+      putTenantSnData: [] //  调往对象  下拉数据
+    }
+  },
+  methods: {
+    //  保存
+    handleSave () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const form = JSON.parse(JSON.stringify(_this.form))
+          allocLinkageOutSave(form).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              setTimeout(() => {
+                _this.isShow = false
+                _this.$emit('ok', res.data)
+              }, 1000)
+            }
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    filterOption (input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    // 调往对象
+    getPutTenantList () {
+      getTenantList({}).then(res => {
+        if (res.status == 200) {
+          this.putTenantSnData = res.data
+        } else {
+          this.putTenantSnData = []
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.$refs.ruleForm.resetFields()
+      } else {
+        this.getPutTenantList()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+.chainTransferOut-basicInfo-modal {
+	.ant-modal-body {
+		padding: 40px 40px 24px;
+	}
+	.btn-cont {
+		text-align: center;
+		margin: 35px 0 10px;
+	}
+}
+</style>

+ 188 - 0
src/views/allocationManagement/chainTransferOut/detail.vue

@@ -0,0 +1,188 @@
+<template>
+  <div class="chainTransferOutDetail-wrap">
+    <a-page-header :ghost="false" :backIcon="false" class="chainTransferOutDetail-cont" >
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="chainTransferOutDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        <a-button
+          v-if="isEdit"
+          type="primary"
+          size="small"
+          style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+          id="chainTransferOutDetail-edit-btn"
+          @click.stop="handleEdit">编辑</a-button>
+      </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra">
+        <a-radio-group key="3" v-model="printerType">
+          <a-radio value="NEEDLE">针式</a-radio>
+          <a-radio value="INK">喷墨</a-radio>
+        </a-radio-group>
+        <a-button key="2" id="chainTransferOutDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+        <a-button key="1" type="primary" id="chainTransferOutDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+      </template>
+    </a-page-header>
+    <!-- 基础信息 -->
+    <a-card size="small" :bordered="false" class="chainTransferOutDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions :column="3">
+            <a-descriptions-item label="调往对象">{{ (basicInfoData&&basicInfoData.putTenantName) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="调出单号">{{ (basicInfoData&&basicInfoData.allocationLinkageOutNo) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <!-- 产品详情 -->
+    <a-card size="small" :bordered="false" class="chainTransferOutDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="产品详情">
+          <!-- 总计 -->
+          <a-alert type="info" showIcon style="margin-bottom:15px">
+            <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
+          </a-alert>
+          <!-- 列表 -->
+          <s-table
+            class="sTable"
+            ref="table"
+            size="small"
+            :rowKey="(record) => record.id"
+            :columns="columns"
+            :data="loadData"
+            :scroll="{ x: 1090 }"
+            bordered>
+          </s-table>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <!-- 打印 -->
+    <div id="print"></div>
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { getOperationalPrecision } from '@/libs/tools.js'
+import { allocLinkageOutDetailSn, allocLinkageOutDetailList, allocLinkageOutDetailCount, allocLinkageOutDetailPrint } from '@/api/allocLinkageOut'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', dataIndex: 'outCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调出仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出数量', dataIndex: 'outQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本小计(¥)', dataIndex: 'costSubtotal', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, { allocationLinkageOutSn: this.$route.params.sn })
+        return allocLinkageOutDetailList(params).then(res => {
+          const 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
+            // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+            data.list[i].costSubtotal = getOperationalPrecision(data.list[i].outCost, data.list[i].outQty)
+          }
+          this.disabled = false
+          this.getDetailCount(params)
+          this.localDataSource = data.list
+          return data
+        })
+      },
+      basicInfoData: null, //  基本信息
+      productTotal: null, //  合计
+      localDataSource: [],
+      printerType: 'NEEDLE' //  打印机类型
+    }
+  },
+  computed: {
+    isEdit () {
+      return (this.basicInfoData && this.basicInfoData.state == 'WAIT_SUBMIT') || (this.basicInfoData && this.basicInfoData.state == 'WAIT_AUDIT')
+    }
+  },
+  methods: {
+    //  返回列表
+    handleBack () {
+      this.$router.push({ path: '/allocationManagement/chainTransferOut/list' })
+    },
+    // 基本信息
+    getDetail () {
+      allocLinkageOutDetailSn({ sn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.basicInfoData = res.data
+        } else {
+          this.basicInfoData = null
+        }
+      })
+    },
+    // 合计
+    getDetailCount (params) {
+      allocLinkageOutDetailCount(params).then(res => {
+        if (res.status == 200) {
+          this.productTotal = res.data
+        } else {
+          this.productTotal = null
+        }
+      })
+    },
+    //  编辑
+    handleEdit () {
+      this.$router.push({ path: `/allocationManagement/chainTransferOut/edit/${this.basicInfoData.id}/${this.basicInfoData.allocationLinkageOutSn}` })
+    },
+    // 打印预览/快捷打印
+    handlePrint (type) {
+      const _this = this
+      allocLinkageOutDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.print(res, type)
+        }
+      })
+    },
+    print (data, type) {
+      if (!data) {
+        return
+      }
+      const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
+      document.getElementById('print').innerHTML = '<iframe id="printf" name="printf" src="' + url + '" hidden></iframe>'
+      if (type == 'preview') { //  预览
+        window.open(url)
+      } else if (type == 'print') { //  打印
+        window.frames['printf'].focus()
+        window.frames['printf'].print()
+      }
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getDetail()
+    })
+  }
+}
+</script>
+
+<style lang="less">
+  .chainTransferOutDetail-cont{
+    margin-bottom: 15px;
+  }
+</style>

+ 550 - 0
src/views/allocationManagement/chainTransferOut/edit.vue

@@ -0,0 +1,550 @@
+<template>
+  <div class="chainTransferOutEdit-wrap">
+    <a-page-header :ghost="false" :backIcon="false" class="chainTransferOutEdit-back" >
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="chainTransferOutEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        <span style="margin: 0 15px;color: #666;">调往对象:{{ (basicInfoData&&basicInfoData.putTenantName) || '--' }}</span>
+      </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra">
+        <a-radio-group key="3" v-model="printerType">
+          <a-radio value="NEEDLE">针式</a-radio>
+          <a-radio value="INK">喷墨</a-radio>
+        </a-radio-group>
+        <a-button key="2" id="chainTransferOutEdit-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+        <a-button key="1" type="primary" id="chainTransferOutEdit-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+      </template>
+    </a-page-header>
+    <!-- 选择产品 -->
+    <a-card size="small" :bordered="false" class="chainTransferOutEdit-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="选择产品">
+          <!-- 筛选条件 -->
+          <div class="table-page-search-wrapper">
+            <a-form layout="inline" @keyup.enter.native="getProductList(1)">
+              <a-row :gutter="15">
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="产品编码" prop="productCode">
+                    <a-input id="chainTransferOutEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="产品名称" prop="productName">
+                    <a-input id="chainTransferOutEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="原厂编码" prop="productOrigCode">
+                    <a-input id="chainTransferOutEdit-productOrigCode" v-model="queryParam.productOrigCode" placeholder="请输入原厂编码" allowClear />
+                  </a-form-item>
+                </a-col>
+                <template v-if="advanced">
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="产品品牌">
+                      <a-select
+                        placeholder="请选择"
+                        id="chainTransferOutEdit-brandSn"
+                        allowClear
+                        v-model="queryParam.brandSn"
+                        :showSearch="true"
+                        option-filter-prop="children"
+                        :filter-option="filterOption">
+                        <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                      </a-select>
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="产品分类">
+                      <a-cascader
+                        @change="changeProductType"
+                        change-on-select
+                        v-model="productType"
+                        expand-trigger="hover"
+                        :options="productTypeList"
+                        :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                        id="chainTransferOutEdit-productType"
+                        placeholder="请选择产品分类"
+                        allowClear />
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="仓库">
+                      <a-select id="chainTransferOutEdit-warehouseSn" placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
+                        <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-item>
+                  </a-col>
+                </template>
+                <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+                  <a-button type="primary" @click="getProductList(1)" :disabled="disabled" id="chainTransferOutEdit-refresh">查询</a-button>
+                  <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferOutEdit-reset">重置</a-button>
+                  <a @click="advanced=!advanced" style="margin-left: 8px">
+                    {{ advanced ? '收起' : '展开' }}
+                    <a-icon :type="advanced ? 'up' : 'down'"/>
+                  </a>
+                </a-col>
+              </a-row>
+            </a-form>
+          </div>
+          <!-- 列表 -->
+          <a-table
+            class="sTable"
+            ref="table"
+            size="small"
+            :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
+            :columns="columns"
+            :customRow="handleClickRow"
+            :dataSource="loadData"
+            :scroll="{ x: 1680, y: 300 }"
+            bordered>
+            <!-- 调出数量 -->
+            <template slot="outQty" slot-scope="text, record">
+              <a-input-number
+                id="chainTransferOutEdit-outQty"
+                v-model="record.outQty"
+                :precision="0"
+                :min="1"
+                :max="record.currentQty"
+                placeholder="请输入"
+                style="width: 100%;" />
+            </template>
+            <!-- 操作 -->
+            <template slot="action" slot-scope="text, record">
+              <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="chainTransferOutEdit-add-btn">添加</a-button>
+            </template>
+          </a-table>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <!-- 已选产品 -->
+    <a-card size="small" :bordered="false" class="chainTransferOutEdit-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="已选产品">
+          <!-- 总计 -->
+          <a-alert type="info" showIcon style="margin-bottom:15px">
+            <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
+          </a-alert>
+          <!-- 筛选条件 -->
+          <a-row :gutter="15" justify="space-between">
+            <a-col :span="17">
+              <div class="table-page-search-wrapper">
+                <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
+                  <a-row :gutter="15">
+                    <a-col :md="9" :sm="24">
+                      <a-form-item label="产品编码" prop="productCode">
+                        <a-input id="chainTransferOutEdit-productCode" v-model="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
+                      </a-form-item>
+                    </a-col>
+                    <a-col :md="9" :sm="24">
+                      <a-form-item label="产品名称" prop="productName">
+                        <a-input id="chainTransferOutEdit-productName" v-model="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
+                      </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+                      <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="chainTransferOutList-refresh">查询</a-button>
+                      <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="chainTransferOutList-reset">重置</a-button>
+                    </a-col>
+                  </a-row>
+                </a-form>
+              </div>
+            </a-col>
+            <a-col :span="7" style="text-align: right;">
+              <!-- <a-button size="small" style="margin-left: 8px" id="chainTransferOutEdit-import-btn">导入明细</a-button> -->
+              <a-button size="small" type="danger" style="margin-left: 8px" @click.stop="handleDel('', 'all')" id="chainTransferOutEdit-del-all-btn">整单删除</a-button>
+            </a-col>
+          </a-row>
+          <!-- 列表 -->
+          <s-table
+            class="sTable"
+            ref="chooseTable"
+            size="small"
+            :rowKey="(record) => record.id"
+            :columns="chooseColumns"
+            :data="chooseLoadData"
+            :scroll="{ x: 1695, y: 300 }"
+            bordered>
+            <!-- 操作 -->
+            <template slot="action" slot-scope="text, record">
+              <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="chainTransferOutEdit-del-btn">删除</a-button>
+            </template>
+          </s-table>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <a-affix :offset-bottom="0">
+      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+        <a-button
+          type="primary"
+          id="chainTransferOutEdit-submit"
+          size="large"
+          class="button-primary"
+          @click="handleSubmit"
+          style="padding: 0 60px;">提交</a-button>
+      </div>
+    </a-affix>
+    <!-- 打印 -->
+    <div id="print"></div>
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { getOperationalPrecision } from '@/libs/tools.js'
+import { allocLinkageOutDetailSn, allocLinkageOutDetailList, allocLinkageOutDetailSave, allocLinkageOutDetailDel, allocLinkageOutDetailCount, allocLinkageOutSubmit, allocLinkageOutDetailDelAll, allocLinkageOutDetailPrint } from '@/api/allocLinkageOut'
+import { productQuery } from '@/api/allocWarehouse'
+import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
+import { dealerProductTypeList } from '@/api/dealerProductType'
+import { warehouseAllList } from '@/api/warehouse'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      queryParam: {
+        productCode: '',
+        productName: '',
+        productOrigCode: '',
+        warehouseSn: undefined,
+        brandSn: undefined,
+        productTypeSn1: undefined,
+        productTypeSn2: undefined,
+        productTypeSn3: undefined
+      },
+      productBrandList: [], //  产品品牌  下拉数据
+      productTypeList: [], //  产品分类  下拉数据
+      productType: [],
+      warehouseList: [], //  仓库  下拉数据
+      disabled: false, //  查询、重置按钮是否可操作
+      chooseDisabled: false,
+      advanced: false, // 高级搜索 展开/关闭
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'brandName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓库', dataIndex: 'warehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '成本价(¥)', dataIndex: 'putCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '库存数量', dataIndex: 'currentQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出数量', scopedSlots: { customRender: 'outQty' }, width: 140, align: 'center', fixed: 'right' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+      ],
+      loadData: [],
+      pageNo: 1, //  分页页码
+      pageSize: 10, //  分页 每页多少条
+      paginationProps: {
+        showSizeChanger: true, //  是否可以改变 pageSize
+        total: 0, //  分页总条数
+        current: 1,
+        onShowSizeChange: (current, pageSize) => this.changePageSize(current, pageSize),
+        onChange: (current) => this.changePage(current)
+      },
+      chooseQueryParam: {
+        productCode: '',
+        productName: ''
+      },
+      // 表头
+      chooseColumns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', ellipsis: true },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'dealerProductEntity.productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓库', dataIndex: 'warehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', dataIndex: 'outCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调出数量', dataIndex: 'outQty', width: 140, align: 'center' },
+        { title: '成本小计', dataIndex: 'costSubtotal', width: 115, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      chooseLoadData: parameter => {
+        this.chooseDisabled = true
+        const params = Object.assign(parameter, this.chooseQueryParam, { allocationLinkageOutSn: this.$route.params.sn })
+        return allocLinkageOutDetailList(params).then(res => {
+          const 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
+            // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+            data.list[i].costSubtotal = getOperationalPrecision(data.list[i].outCost, data.list[i].outQty)
+          }
+          this.chooseDisabled = false
+          this.getDetailCount(params)
+          this.localDataSource = data.list
+          return data
+        })
+      },
+      basicInfoData: null, //  基本信息
+      productTotal: null, //  合计
+      localDataSource: [],
+      printerType: 'NEEDLE' //  打印机类型
+    }
+  },
+  methods: {
+    //  重置
+    resetSearchForm () {
+      this.queryParam.productCode = ''
+      this.queryParam.productName = ''
+      this.queryParam.productOrigCode = ''
+      this.queryParam.warehouseSn = undefined
+      this.queryParam.brandSn = undefined
+      this.queryParam.productTypeSn1 = undefined
+      this.queryParam.productTypeSn2 = undefined
+      this.queryParam.productTypeSn3 = undefined
+      this.getProductList(1)
+    },
+    // 已选产品  重置
+    chooseResetSearchForm () {
+      this.chooseQueryParam.productCode = ''
+      this.chooseQueryParam.productName = ''
+      this.$refs.chooseTable.refresh(true)
+    },
+    // 双击快速添加
+    handleClickRow (record) {
+      return {
+        on: {
+          dblclick: (event) => {
+            this.handleAdd(record)
+          }
+        }
+      }
+    },
+    // 基本信息
+    getDetail () {
+      allocLinkageOutDetailSn({ sn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.basicInfoData = res.data
+          this.getProductList(1)
+          this.getProductBrand()
+          this.getProductType()
+        } else {
+          this.basicInfoData = null
+        }
+      })
+    },
+    //  添加/编辑
+    handleAdd (row, isEdit) {
+      if (!isEdit && !row.outQty) {
+        this.$message.warning('请输入调出数量后再添加!')
+        return
+      }
+      const params = {
+        id: isEdit ? row.id : undefined,
+        allocationLinkageOutSn: this.$route.params.sn,
+        outCost: isEdit ? row.outCost : row.putCost,
+        outQty: row.outQty,
+        productSn: row.productSn,
+        productProduceDate: row.productProduceDate,
+        productExpiryDate: row.productExpiryDate,
+        warehouseSn: row.warehouseSn,
+        warehouseLocationSn: row.warehouseLocationSn
+      }
+      allocLinkageOutDetailSave(params).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.getProductList()
+          this.$refs.chooseTable.refresh()
+        }
+      })
+    },
+    //  删除
+    handleDel (row, isAll) {
+      const _this = this
+      const content = isAll ? '删除后不可恢复,确定要进行整单删除吗?' : '删除后不可恢复,确定要进行删除吗?'
+      this.$confirm({
+        title: '提示',
+        content: content,
+        centered: true,
+        onOk () {
+          if (isAll) { //  整单删除
+            allocLinkageOutDetailDelAll({ sn: _this.$route.params.sn }).then(res => {
+              if (res.status == 200) {
+                _this.$message.success(res.message)
+                _this.getProductList()
+                _this.$refs.chooseTable.refresh()
+              }
+            })
+          } else { //  单个删除
+            allocLinkageOutDetailDel({ id: row.id }).then(res => {
+              if (res.status == 200) {
+                _this.$message.success(res.message)
+                _this.getProductList()
+                _this.$refs.chooseTable.refresh()
+              }
+            })
+          }
+        }
+      })
+    },
+    //  提交
+    handleSubmit () {
+      const _this = this
+      allocLinkageOutSubmit({ sn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          setTimeout(() => {
+            _this.handleBack()
+          }, 1000)
+        }
+      })
+    },
+    //  导入明细
+    handleImport () {
+      console.log(333)
+    },
+    //  返回列表
+    handleBack () {
+      this.$router.push({ path: '/allocationManagement/chainTransferOut/list' })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    // 产品列表数据
+    getProductList (pageNo) {
+      this.disabled = true
+      this.pageNo = pageNo || this.pageNo
+      // 箭冠品牌 sysFlag传1,非箭冠品牌传0。与新增时所选调出产品类型有关
+      this.queryParam.sysFlag = this.basicInfoData.allocationType == 'JIANGUAN' ? '1' : '0'
+      const params = Object.assign({ pageNo: this.pageNo, pageSize: this.pageSize }, this.queryParam)
+      productQuery(params).then(res => {
+        if (res.status == 200) {
+          const data = res.data
+          this.paginationProps.total = Number(res.data.count) || 0
+          this.paginationProps.current = data.pageNo
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          this.loadData = data.list
+          this.disabled = false
+        } else {
+          this.paginationProps.total = 0
+          this.paginationProps.current = 1
+          this.loadData = []
+        }
+      })
+    },
+    // 合计
+    getDetailCount (params) {
+      allocLinkageOutDetailCount(params).then(res => {
+        if (res.status == 200) {
+          this.productTotal = res.data
+        } else {
+          this.productTotal = 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] : ''
+    },
+    //  产品品牌  列表
+    getProductBrand () {
+      // sysFlag为1查询箭冠产品,为0查询非箭冠产品
+      dealerProductBrandQuery({ sysFlag: this.basicInfoData.allocationType == 'JIANGUAN' ? '1' : '0' }).then(res => {
+        if (res.status == 200) {
+          this.productBrandList = res.data
+        } else {
+          this.productBrandList = []
+        }
+      })
+    },
+    //  产品分类  列表
+    getProductType () {
+      dealerProductTypeList({ sysFlag: this.basicInfoData.allocationType == 'JIANGUAN' ? '1' : '0' }).then(res => {
+        if (res.status == 200) {
+          this.productTypeList = res.data
+        } else {
+          this.productTypeList = []
+        }
+      })
+    },
+    // 仓库下拉数据
+    getWarehouseList (type) {
+      warehouseAllList({}).then(res => {
+        if (res.status == 200) {
+          this.warehouseList = res.data
+        } else {
+          this.warehouseList = []
+        }
+      })
+    },
+    // 打印预览/快捷打印
+    handlePrint (type) {
+      const _this = this
+      allocLinkageOutDetailPrint({ sn: this.$route.params.sn, type: this.printerType }).then(res => {
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.print(res, type)
+        }
+      })
+    },
+    print (data, type) {
+      if (!data) {
+        return
+      }
+      const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
+      document.getElementById('print').innerHTML = '<iframe id="printf" name="printf" src="' + url + '" hidden></iframe>'
+      if (type == 'preview') { //  预览
+        window.open(url)
+      } else if (type == 'print') { //  打印
+        window.frames['printf'].focus()
+        window.frames['printf'].print()
+      }
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getDetail()
+      vm.getWarehouseList()
+    })
+  }
+}
+</script>
+
+<style lang="less">
+  .chainTransferOutEdit-wrap{
+    .chainTransferOutEdit-back{
+      margin-bottom: 15px;
+    }
+    .chainTransferOutEdit-cont{
+      margin-bottom: 15px;
+      .sub-title{
+        font-size: 12px;
+        color: #808695;
+        margin-left: 10px;
+      }
+      .tag-txt{
+        font-size: 12px;
+        color: #ed1c24;
+      }
+      .edit-circle-btn{
+        margin-left: 15px;
+        i{
+          vertical-align: text-bottom;
+        }
+      }
+      .import-btn{
+        margin-left: 15px;
+      }
+    }
+  }
+</style>

+ 296 - 0
src/views/allocationManagement/chainTransferOut/list.vue

@@ -0,0 +1,296 @@
+<template>
+  <a-card size="small" :bordered="false" class="chainTransferOutList-wrap">
+    <!-- 搜索条件 -->
+    <div 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="创建时间">
+              <rangeDate ref="rangeDate" :value="createDate" @change="dateChange" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="调往对象">
+              <a-select
+                placeholder="请选择调往对象"
+                allowClear
+                id="chainTransferOutList-putTenantSn"
+                v-model="queryParam.putTenantSn"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in putTenantSnData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="调出产品类型">
+              <v-select
+                v-model="queryParam.allocationType"
+                ref="allocationType"
+                id="chainTransferOutList-allocationType"
+                code="ALLOCATION_LINKAGE_PRODUCT_TYPE"
+                placeholder="请选择调出产品类型"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="业务状态">
+                <v-select
+                  v-model="queryParam.state"
+                  ref="state"
+                  id="chainTransferOutList-state"
+                  code="ALLOCATION_LINKAGE_OUT_STATUS"
+                  placeholder="请选择业务状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="财务状态">
+                <v-select
+                  v-model="queryParam.settleState"
+                  ref="settleState"
+                  id="chainTransferOutList-settleState"
+                  code="FINANCIAL_RECEIVE_STATUS"
+                  placeholder="请选择财务状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="chainTransferOutList-refresh">查询</a-button>
+            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferOutList-reset">重置</a-button>
+            <a @click="advanced=!advanced" style="margin-left: 8px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 操作按钮 -->
+    <div class="table-operator">
+      <a-button id="chainTransferOutList-add" type="primary" class="button-error" @click="openModal=true">新增</a-button>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 1670, y: tableHeight }"
+      bordered>
+      <!-- 连锁调出单号 -->
+      <template slot="allocationLinkageOutNo" slot-scope="text, record">
+        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.allocationLinkageOutNo }}</span>
+      </template>
+      <!-- 财务状态 -->
+      <template slot="settleState" slot-scope="text, record">
+        <a-badge :color="text=='FINISH'?'#87d068':'gold'" :text="record.settleStateDictValue" />
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button
+          size="small"
+          type="link"
+          v-if="record.state == 'WAIT_AUDIT'"
+          class="button-warning"
+          @click="handleExamine(record)"
+          id="chainTransferOutList-examine-btn">审核</a-button>
+        <a-button
+          size="small"
+          type="link"
+          v-if="record.state == 'WAIT_SUBMIT' || record.state == 'WAIT_AUDIT'"
+          class="button-info"
+          @click="handleEdit(record)"
+          id="chainTransferOutList-edit-btn">编辑</a-button>
+        <a-button
+          size="small"
+          type="link"
+          v-if="record.state == 'WAIT_OUT_WAREHOUSE'"
+          class="button-primary"
+          @click="handleOut(record)"
+          id="chainTransferOutList-out-btn">出库</a-button>
+        <a-button
+          size="small"
+          type="link"
+          v-if="record.state == 'WAIT_SUBMIT' || record.state == 'WAIT_AUDIT' || record.state == 'WAIT_OUT_WAREHOUSE'"
+          class="button-error"
+          @click="handleDel(record)"
+          id="chainTransferOutList-del-btn">删除</a-button>
+        <span v-if="record.state != 'WAIT_SUBMIT' && record.state != 'WAIT_AUDIT' && record.state != 'WAIT_OUT_WAREHOUSE'">--</span>
+      </template>
+    </s-table>
+    <!-- 新增/编辑 -->
+    <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
+  </a-card>
+</template>
+
+<script>
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import basicInfoModal from './basicInfoModal.vue'
+import { allocLinkageOutList, allocLinkageAudit, allocLinkageOutDel, allocLinkageOutStock, getTenantList } from '@/api/allocLinkageOut'
+export default {
+  components: { STable, VSelect, basicInfoModal, rangeDate },
+  data () {
+    return {
+      tableHeight: 0,
+      advanced: false, // 高级搜索 展开/关闭
+      createDate: [
+        moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+      ], //  创建时间
+      queryParam: { //  查询条件
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
+        putTenantSn: undefined, //  调往对象
+        allocationType: undefined, //  调出产品类型
+        state: undefined, //  业务状态
+        settleState: undefined
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
+        { title: '连锁调出单号', scopedSlots: { customRender: 'allocationLinkageOutNo' }, align: 'center' },
+        { title: '调往对象', dataIndex: 'putTenantName', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总款数', dataIndex: 'productTotalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总数量', dataIndex: 'productTotalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总成本', dataIndex: 'productTotalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨类型', dataIndex: 'allocationTypeDictValue', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', scopedSlots: { customRender: 'settleState' }, width: 100, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 210, align: 'center', fixed: 'right' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        if (this.tableHeight == 0) {
+          this.tableHeight = window.innerHeight - 380
+        }
+        return allocLinkageOutList(Object.assign(parameter, this.queryParam)).then(res => {
+          const 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
+          return data
+        })
+      },
+      putTenantSnData: [],
+      openModal: false, //  新增编辑  弹框
+      itemId: '' //  当前品牌id
+    }
+  },
+  methods: {
+    //  时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate(this.createDate)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.putTenantSn = undefined
+      this.queryParam.allocationType = undefined
+      this.queryParam.state = undefined
+      this.queryParam.settleState = undefined
+      this.$refs.table.refresh(true)
+    },
+    //  基本信息  保存
+    handleOk (data) {
+      this.$router.push({ path: `/allocationManagement/chainTransferOut/add/${data.id}/${data.allocationLinkageOutSn}` })
+    },
+    //  删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '删除后不可恢复,确定要进行删除吗?',
+        centered: true,
+        onOk () {
+          allocLinkageOutDel({ sn: row.allocationLinkageOutSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    },
+    //  出库
+    handleOut (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要出库吗?',
+        centered: true,
+        onOk () {
+          allocLinkageOutStock({ sn: row.allocationLinkageOutSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    },
+    //  审核
+    handleExamine (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要审核通过吗?',
+        centered: true,
+        onOk () {
+          allocLinkageAudit({ sn: row.allocationLinkageOutSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    },
+    //  详情
+    handleDetail (row) {
+      this.$router.push({ path: `/allocationManagement/chainTransferOut/detail/${row.allocationLinkageOutSn}` })
+    },
+    //  新增/编辑
+    handleEdit (row) {
+      this.$router.push({ path: `/allocationManagement/chainTransferOut/edit/${row.id}/${row.allocationLinkageOutSn}` })
+    },
+    // 调往对象
+    getPutTenantList () {
+      getTenantList({}).then(res => {
+        if (res.status == 200) {
+          this.putTenantSnData = res.data
+        } else {
+          this.putTenantSnData = []
+        }
+      })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.openModal = false
+      vm.getPutTenantList()
+    })
+  }
+}
+</script>

+ 204 - 0
src/views/allocationManagement/storeTransferOut/basicInfoModal.vue

@@ -0,0 +1,204 @@
+<template>
+  <a-modal
+    centered
+    class="storeTransferOut-basicInfo-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="新增店内调出单"
+    v-model="isShow"
+    @cancle="isShow = false"
+    :width="800">
+    <a-form-model
+      id="storeTransferOut-basicInfo-form"
+      ref="ruleForm"
+      :model="form"
+      :rules="rules"
+      :label-col="formItemLayout.labelCol"
+      :wrapper-col="formItemLayout.wrapperCol"
+    >
+      <a-form-model-item label="调往对象" prop="putPersonType">
+        <a-radio-group v-model="form.putPersonType" @change="putPersonTypeChange">
+          <a-radio v-for="(item,index) in putPersonTypeList" :key="index" :value="item.code">{{ item.dispName }}</a-radio>
+        </a-radio-group>
+      </a-form-model-item>
+      <a-form-model-item label="调往对象名称" :prop="isCustomer ? 'putPersonSn' : 'putPersonName'">
+        <a-select
+          v-if="isCustomer"
+          v-model="form.putPersonSn"
+          placeholder="请选择"
+          allowClear
+          :showSearch="true"
+          option-filter-prop="children"
+          :filter-option="filterOption"
+          @change="putPersonChange">
+          <a-select-option v-for="item in custData" :key="item.customerSn" :value="item.customerSn">{{ item.customerName }}</a-select-option>
+        </a-select>
+        <a-input v-if="!isCustomer" v-model="form.putPersonName" placeholder="请输入调往对象名称(最多30个字符)" allowClear :maxLength="30" />
+      </a-form-model-item>
+      <a-form-model-item label="调拨类型" prop="callOutType">
+        <a-select v-model="form.callOutType" placeholder="请选择调拨类型" allowClear >
+          <a-select-option v-for="item in storeCallOutTypeList" :key="item.storeCallOutTypeSn" :value="item.storeCallOutTypeSn">{{ item.name }}</a-select-option>
+        </a-select>
+      </a-form-model-item>
+      <a-form-model-item label="备注" prop="remark">
+        <a-textarea id="storeTransferOut-basicInfo-remark" :maxLength="120" v-model="form.remark" placeholder="请输入备注(最多120个字符)" allowClear />
+      </a-form-model-item>
+    </a-form-model>
+    <div class="btn-cont">
+      <a-button type="primary" id="storeTransferOut-basicInfo-modal-save" @click="handleSave">保存</a-button>
+      <a-button id="storeTransferOut-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { VSelect } from '@/components'
+import { storeCallOutSave } from '@/api/storeCallOut'
+import { custAllList } from '@/api/customer'
+import { getLookUpData } from '@/api/data'
+import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
+export default {
+  name: 'StoreTransferOutBasicInfoModal',
+  components: { VSelect },
+  props: {
+    openModal: {
+      //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 18 }
+      },
+      form: {
+        putPersonType: 'CUSTOMER',
+        putPersonSn: undefined,
+        putPersonName: '',
+        callOutType: undefined,
+        remark: ''
+      },
+      rules: {
+        putPersonType: [{ required: true, message: '请选择调往对象', trigger: 'change' }],
+        putPersonSn: [{ required: true, message: '请选择调往对象名称', trigger: 'change' }],
+        putPersonName: [{ required: true, message: '请输入调往对象名称', trigger: 'blur' }],
+        callOutType: [{ required: true, message: '请选择调拨类型', trigger: 'change' }]
+      },
+      custData: [], //  调往对象  下拉数据
+      putPersonTypeList: [], //  调往对象类型
+      storeCallOutTypeList: [] //  调拨类型
+    }
+  },
+  computed: {
+    // 当前所选调往对象是否为客户
+    isCustomer () {
+      return this.form.putPersonType == 'CUSTOMER'
+    }
+  },
+  methods: {
+    //  保存
+    handleSave () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const form = JSON.parse(JSON.stringify(_this.form))
+          storeCallOutSave(form).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              setTimeout(() => {
+                _this.isShow = false
+                _this.$emit('ok', res.data)
+              }, 1000)
+            }
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    // 调往对象  change
+    putPersonTypeChange (e) {
+      this.$refs.ruleForm.resetFields()
+      this.form.putPersonSn = undefined
+      this.form.putPersonName = ''
+      this.form.putPersonType = e.target.value
+    },
+    // 调往对象名称  change
+    putPersonChange (val) {
+      const ind = this.custData.findIndex(item => item.customerSn == val)
+      this.form.putPersonName = this.custData[ind].customerName
+    },
+    // 调往对象列表
+    getCustAllList () {
+      custAllList().then(res => {
+        if (res.status == 200) {
+          this.custData = res.data
+        } else {
+          this.custData = []
+        }
+      })
+    },
+    // 调往对象类型
+    getPutPersonTypeList () {
+      const _this = this
+      getLookUpData({
+        pageNo: 1,
+        pageSize: 1000,
+        lookupCode: 'PUT_PERSON_TYPE'
+      }).then(res => {
+        if (res.status == 200) {
+          _this.putPersonTypeList = res.data.list
+        } else {
+          _this.putPersonTypeList = []
+        }
+      })
+    },
+    //  调拨类型
+    getStoreCallOutTypeAllList () {
+      storeCallOutTypeAllList().then(res => {
+        if (res.status == 200) {
+          this.storeCallOutTypeList = res.data
+        } else {
+          this.storeCallOutTypeList = []
+        }
+      })
+    },
+    filterOption (input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.$refs.ruleForm.resetFields()
+      } else {
+        this.getCustAllList()
+        this.getPutPersonTypeList()
+        this.getStoreCallOutTypeAllList()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+.storeTransferOut-basicInfo-modal {
+	.ant-modal-body {
+		padding: 40px 40px 24px;
+	}
+	.btn-cont {
+		text-align: center;
+		margin: 35px 0 10px;
+	}
+}
+</style>

+ 187 - 0
src/views/allocationManagement/storeTransferOut/detail.vue

@@ -0,0 +1,187 @@
+<template>
+  <div class="storeTransferOutDetail-wrap">
+    <a-page-header :ghost="false" :backIcon="false" class="storeTransferOutDetail-back" >
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="storeTransferOutDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        <a-button
+          v-if="isEdit"
+          type="primary"
+          size="small"
+          style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+          id="storeTransferOutDetail-edit-btn"
+          @click.stop="handleEdit">编辑</a-button>
+      </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra">
+        <a-checkbox key="4" v-model="printCostChecked">打印成本</a-checkbox>
+        <a-radio-group key="3" v-model="printerType">
+          <a-radio value="NEEDLE">针式</a-radio>
+          <a-radio value="INK">喷墨</a-radio>
+        </a-radio-group>
+        <a-button key="2" id="storeTransferOutDetail-preview-btn" :disabled="localDataSource.length==0" @click="handlePrint('preview')">打印预览</a-button>
+        <a-button key="1" type="primary" id="storeTransferOutDetail-print-btn" :disabled="localDataSource.length==0" @click="handlePrint('print')">快捷打印</a-button>
+      </template>
+    </a-page-header>
+    <a-card size="small" :bordered="false" class="storeTransferOutDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions :column="3">
+            <a-descriptions-item label="调往对象名称">{{ (basicInfoData&&basicInfoData.putPersonName) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="店内调出单号">{{ (basicInfoData&&basicInfoData.storeCallOutNo) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="调拨类型">{{ (basicInfoData&&basicInfoData.callOutTypeName) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <a-card size="small" :bordered="false" class="storeTransferOutDetail-cont">
+      <!-- 总计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 995 }"
+        bordered>
+      </s-table>
+    </a-card>
+    <!-- 打印 -->
+    <div id="print"></div>
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { getOperationalPrecision } from '@/libs/tools.js'
+import { storeCallOutDetailList, storeCallOutDetailCount, storeCallOutDetailSn, storeCallOutDetailPrint } from '@/api/storeCallOut'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
+        { title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价(¥)', dataIndex: 'outCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调出仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出数量', dataIndex: 'outQty', width: 100, align: 'center' },
+        { title: '成本小计(¥)', dataIndex: 'costSubtotal', width: 115, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return storeCallOutDetailList(Object.assign(parameter, { storeCallOutSn: this.$route.params.sn })).then(res => {
+          const 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
+            // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+            data.list[i].costSubtotal = getOperationalPrecision(data.list[i].outCost, data.list[i].outQty)
+          }
+          this.localDataSource = data.list
+          return data
+        })
+      },
+      localDataSource: [],
+      basicInfoData: null, //  基本信息
+      productTotal: null, //  合计
+      printerType: 'NEEDLE', //  打印机类型
+      printCostChecked: true //  打印成本
+    }
+  },
+  computed: {
+    isEdit () {
+      return (this.basicInfoData && this.basicInfoData.state == 'WAIT_SUBMIT') || (this.basicInfoData && this.basicInfoData.state == 'WAIT_AUDIT')
+    }
+  },
+  methods: {
+    //  返回列表
+    handleBack () {
+      this.$router.push({ path: '/allocationManagement/storeTransferOut/list' })
+    },
+    // 打印预览/快捷打印
+    handlePrint (type) {
+      const _this = this
+      storeCallOutDetailPrint({ sn: this.$route.params.sn, type: this.printerType, costFlag: this.printCostChecked ? '1' : '0' }).then(res => {
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.print(res, type)
+        }
+      })
+    },
+    print (data, type) {
+      if (!data) {
+        return
+      }
+      const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
+      document.getElementById('print').innerHTML = '<iframe id="printf" name="printf" src="' + url + '" hidden></iframe>'
+      if (type == 'preview') { //  预览
+        window.open(url)
+      } else if (type == 'print') { //  打印
+        window.frames['printf'].focus()
+        window.frames['printf'].print()
+      }
+    },
+    // 基本信息
+    getDetail () {
+      storeCallOutDetailSn({ sn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.basicInfoData = res.data
+        } else {
+          this.basicInfoData = null
+        }
+      })
+    },
+    // 合计
+    getDetailCount () {
+      storeCallOutDetailCount({ storeCallOutSn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.productTotal = res.data
+        } else {
+          this.productTotal = null
+        }
+      })
+    },
+    //  编辑
+    handleEdit () {
+      this.$router.push({ path: `/allocationManagement/storeTransferOut/edit/${this.basicInfoData.id}/${this.basicInfoData.storeCallOutSn}` })
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getDetail()
+      vm.getDetailCount()
+    })
+  }
+}
+</script>
+
+<style lang="less">
+  .storeTransferOutDetail-wrap{
+    .storeTransferOutDetail-back{
+      margin-bottom: 15px;
+    }
+    .storeTransferOutDetail-cont{
+      margin-bottom: 15px;
+    }
+  }
+</style>

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