Browse Source

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

gitadmin 3 years ago
parent
commit
104d180e85
100 changed files with 2605 additions and 1343 deletions
  1. 7 0
      public/index.html
  2. 8 0
      src/api/checkWarehouse.js
  3. 31 0
      src/api/receiving.js
  4. 0 2
      src/components/MultiTab/MultiTab.vue
  5. 2 1
      src/components/newThem.less
  6. 4 1
      src/components/tools/UserMenu.vue
  7. 49 0
      src/config/router.config.js
  8. 0 1
      src/layouts/PageView.vue
  9. 4 2
      src/libs/JGPrint.js
  10. 13 1
      src/libs/tools.js
  11. 1 1
      src/utils/request.js
  12. 21 19
      src/views/allocationManagement/chainTransferIn/detail.vue
  13. 29 27
      src/views/allocationManagement/chainTransferIn/edit.vue
  14. 21 18
      src/views/allocationManagement/chainTransferIn/list.vue
  15. 12 9
      src/views/allocationManagement/chainTransferOut/detail.vue
  16. 15 12
      src/views/allocationManagement/chainTransferOut/list.vue
  17. 10 7
      src/views/allocationManagement/storeTransferOut/detail.vue
  18. 8 5
      src/views/allocationManagement/storeTransferOut/list.vue
  19. 76 68
      src/views/allocationManagement/warehouseAllocation/detail.vue
  20. 8 5
      src/views/allocationManagement/warehouseAllocation/list.vue
  21. 8 5
      src/views/basicData/bulkPartsTypeManagement/list.vue
  22. 8 5
      src/views/basicData/customerTypeManagement/list.vue
  23. 8 6
      src/views/basicData/expenseType/list.vue
  24. 7 4
      src/views/basicData/storeTransferOutTypeManagement/list.vue
  25. 8 7
      src/views/bulkManagement/bulkImport/list.vue
  26. 12 7
      src/views/bulkManagement/bulkReturnGoods/detailModal.vue
  27. 10 5
      src/views/bulkManagement/bulkReturnGoods/list.vue
  28. 13 8
      src/views/bulkManagement/bulkWarehousingOrder/detail.vue
  29. 11 10
      src/views/bulkManagement/bulkWarehousingOrder/list.vue
  30. 10 7
      src/views/customerManagement/customerInfo/list.vue
  31. 65 57
      src/views/financialManagement/companyCollectionPayment/detail.vue
  32. 93 87
      src/views/financialManagement/companyCollectionPayment/list.vue
  33. 69 61
      src/views/financialManagement/companyReceivablePayable/chooseBillModal.vue
  34. 82 76
      src/views/financialManagement/companyReceivablePayable/detail.vue
  35. 82 76
      src/views/financialManagement/companyReceivablePayable/list.vue
  36. 15 12
      src/views/financialManagement/expenseManagement/list.vue
  37. 26 8
      src/views/financialManagement/financialCollection/list.vue
  38. 2 2
      src/views/financialManagement/financialPayment/detailModal.vue
  39. 28 11
      src/views/financialManagement/financialPayment/list.vue
  40. 35 15
      src/views/financialManagement/inventoryCheckAudit/list.vue
  41. 10 7
      src/views/financialManagement/ledgerRecord/list.vue
  42. 11 6
      src/views/financialManagement/warehousingAudit/detail.vue
  43. 33 23
      src/views/financialManagement/warehousingAudit/list.vue
  44. 59 51
      src/views/financialManagement/withdrawalManagement/list.vue
  45. 31 17
      src/views/inventoryManagement/inventoryChecking/detailModal.vue
  46. 41 11
      src/views/inventoryManagement/inventoryChecking/list.vue
  47. 13 12
      src/views/inventoryManagement/inventoryChecking/makeInventory.vue
  48. 9 6
      src/views/inventoryManagement/inventoryChecking/overall.vue
  49. 10 9
      src/views/inventoryManagement/inventoryImport/list.vue
  50. 36 28
      src/views/inventoryManagement/inventoryQuery/detailModal.vue
  51. 19 18
      src/views/inventoryManagement/inventoryQuery/list.vue
  52. 102 94
      src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue
  53. 15 14
      src/views/inventoryManagement/inventoryWarning/list.vue
  54. 9 4
      src/views/inventoryManagement/satelliteWarehouseInventory/addModal.vue
  55. 8 5
      src/views/inventoryManagement/satelliteWarehouseInventory/list.vue
  56. 8 5
      src/views/inventoryManagement/warehouse/list.vue
  57. 8 5
      src/views/inventoryManagement/warehouse/storingLocation/list.vue
  58. 9 6
      src/views/outboundOrderManagement/outboundOrder/list.vue
  59. 10 6
      src/views/power/role/roleList.vue
  60. 10 6
      src/views/power/user/userList.vue
  61. 8 5
      src/views/productManagement/newProduct/list.vue
  62. 7 4
      src/views/productManagement/newProduct/modal.vue
  63. 10 8
      src/views/productManagement/priceChangeRecord/list.vue
  64. 8 5
      src/views/productManagement/productBrand/list.vue
  65. 11 7
      src/views/productManagement/productCategory/list.vue
  66. 13 12
      src/views/productManagement/productInfo/list.vue
  67. 9 8
      src/views/productManagement/productInfoJg/list.vue
  68. 9 8
      src/views/productManagement/productOnlineInfo/list.vue
  69. 29 22
      src/views/purchasingManagement/purchaseOrder/detail.vue
  70. 26 18
      src/views/purchasingManagement/purchaseOrder/list.vue
  71. 7 2
      src/views/purchasingManagement/purchaseOrder/outStockModal.vue
  72. 15 10
      src/views/purchasingManagement/purchaseOrder/receivingAddress/chooseAddressModal.vue
  73. 23 20
      src/views/purchasingManagement/purchaseOrder/warehousing.vue
  74. 64 58
      src/views/purchasingManagement/purchaseReturn/detail.vue
  75. 7 1
      src/views/purchasingManagement/purchaseReturn/edit.vue
  76. 8 5
      src/views/purchasingManagement/purchaseReturn/list.vue
  77. 325 0
      src/views/purchasingManagement/signWarehousing/edit.vue
  78. 209 0
      src/views/purchasingManagement/signWarehousing/list.vue
  79. 202 0
      src/views/purchasingManagement/signWarehousing/stockOrderDetail.vue
  80. 11 8
      src/views/reportData/chainCustomerReport/list.vue
  81. 14 0
      src/views/reportData/chainPurchaseReceiptReport/list.vue
  82. 11 10
      src/views/reportData/chainPurchaseReceiptReport/purchaseReceiptDetail.vue
  83. 11 10
      src/views/reportData/chainPurchaseReceiptReport/purchaseReceiptOrder.vue
  84. 11 9
      src/views/reportData/chainReceivedSendStorageReport/list.vue
  85. 10 7
      src/views/reportData/chainSalesDetailReport/list.vue
  86. 10 7
      src/views/reportData/chainSalesReport/list.vue
  87. 34 26
      src/views/reportData/chainStockReport/detailModal.vue
  88. 10 7
      src/views/reportData/chainStockReport/list.vue
  89. 11 8
      src/views/reportData/customerReport/list.vue
  90. 10 7
      src/views/reportData/inventoryReport/inventoryDetail.vue
  91. 10 9
      src/views/reportData/inventoryReport/inventoryOrder.vue
  92. 15 1
      src/views/reportData/inventoryReport/list.vue
  93. 14 0
      src/views/reportData/purchaseReceiptReport/list.vue
  94. 11 10
      src/views/reportData/purchaseReceiptReport/purchaseReceiptDetail.vue
  95. 11 10
      src/views/reportData/purchaseReceiptReport/purchaseReceiptOrder.vue
  96. 11 10
      src/views/reportData/receivedSendStorageReport/list.vue
  97. 11 10
      src/views/reportData/salesDetailReport/list.vue
  98. 11 10
      src/views/reportData/salesReport/list.vue
  99. 8 5
      src/views/salesManagement/giftRecord/list.vue
  100. 8 5
      src/views/salesManagement/productPricing/list.vue

+ 7 - 0
public/index.html

@@ -12,6 +12,13 @@
     <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
     <link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
     <% } %>
+     <script>
+      var userAgent = navigator.userAgent.toLowerCase()
+      var isElectronApp = userAgent.indexOf(' electron/') > -1
+      if (isElectronApp){
+         var ipcRenderer = require('electron').ipcRenderer
+      }
+     </script>
      <script src="./menus.js"></script>
   </head>
   <body>

+ 8 - 0
src/api/checkWarehouse.js

@@ -136,6 +136,14 @@ export const checkWarehouseInventory = (params) => {
     method: 'post'
   })
 }
+//  库存盘点  重盘
+export const checkWarehouseReInventory = (params) => {
+  return axios({
+    url: '/checkWarehouse/reInventory',
+    data: params,
+    method: 'post'
+  })
+}
 //  库存盘点  财务审核
 export const checkWarehouseFinanceAudit = (params) => {
   return axios({

+ 31 - 0
src/api/receiving.js

@@ -65,3 +65,34 @@ export const receivingDetailPrint = params => {
   }
   return axios.request(data)
 }
+// 备货 详情  导出
+export const receivingExport = params => {
+  return axios.request({
+    url: `/receiving/export`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+//  签收入库 列表  有分页
+export const receivingStockList = (params) => {
+  const url = `/receiving/queryStockInPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  入库审核 列表  有分页
+export const receivingAuditList = (params) => {
+  const url = `/receiving/queryStockInAuditPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 0 - 2
src/components/MultiTab/MultiTab.vue

@@ -36,7 +36,6 @@ export default {
       } catch (e) {
       }
     })
-    console.log('rename')
     if (this.pages.length <= this.maxTabNums) {
       this.pages.push(this.$route)
       this.tabsList.push(this.$route.name)
@@ -223,7 +222,6 @@ export default {
       }
     },
     activeKey: function (newPathKey) {
-      console.log('-----' + newPathKey)
       const pages = this.pages.find(item => item.name == newPathKey)
       this.$router.push({ name: newPathKey, params: pages.params, query: pages.query })
     }

+ 2 - 1
src/components/newThem.less

@@ -8,4 +8,5 @@
 @table-padding-vertical: 5px;
 @table-padding-horizontal: 5px;
 @border-color-base: #dedede;
-@border-color-split: #dedede;
+@border-color-split: #dedede;
+@input-disabled-bg: #dedede;

+ 4 - 1
src/components/tools/UserMenu.vue

@@ -120,7 +120,10 @@ export default {
         // 重新登录
         const params = { username: '', password: '' }
         return this.Login(params).then(() => {
-          window.location.reload() //  刷新页面
+          this.$router.push({ path: '/home' })
+          setTimeout(() => {
+            window.location.reload() //  刷新页面
+          }, 100)
         }).catch(err => this.requestFailed(err))
       })
     },

+ 49 - 0
src/config/router.config.js

@@ -392,6 +392,55 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/purchasingManagement/signWarehousing',
+            redirect: '/purchasingManagement/signWarehousing/list',
+            name: 'signWarehousing',
+            component: BlankLayout,
+            meta: {
+              title: '签收入库',
+              icon: 'money-collect'
+              // permission: 'M_signWarehousingList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'signWarehousingList',
+                component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/signWarehousing/list.vue'),
+                meta: {
+                  title: '签收入库列表',
+                  icon: 'money-collect',
+                  hidden: true
+                  // permission: 'M_signWarehousingList'
+                }
+              },
+              {
+                path: 'edit/:sn',
+                name: 'signWarehousingEdit',
+                component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/signWarehousing/edit.vue'),
+                meta: {
+                  title: '签收入库',
+                  icon: 'money-collect',
+                  replaceTab: true,
+                  hidden: true
+                  // permission: 'B_signWarehousingDetail'
+                }
+              },
+              {
+                path: 'stockOrderDetail/:sn',
+                name: 'signWarehousingStockOrderDetail',
+                component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/signWarehousing/stockOrderDetail.vue'),
+                meta: {
+                  title: '备货单详情',
+                  icon: 'money-collect',
+                  replaceTab: true,
+                  hidden: true
+                  // permission: 'B_signWarehousingStockOrderDetail'
+                }
+              }
+            ]
+          },
           {
             path: '/purchasingManagement/purchaseReturn',
             redirect: '/purchasingManagement/purchaseReturn/list',

+ 0 - 1
src/layouts/PageView.vue

@@ -99,7 +99,6 @@ export default {
     // }
   },
   mounted () {
-    console.log(window.innerHeight, 'mounted')
     this.tabs = this.directTabs
     this.getPageMeta()
     this.setpageH()

+ 4 - 2
src/libs/JGPrint.js

@@ -89,15 +89,17 @@ export const demoDownloadPDF = function (url) {
 // 导出下载excel
 export const downloadExcel = function (data, fileName) {
   if (!data) { return }
+  const a = moment().format('YYYYMMDDHHmmss')
+  const fname = fileName + a
   const blob = new Blob([data], { type: 'application/vnd.ms-excel' })
   if (window.navigator && window.navigator.msSaveOrOpenBlob) {
-    navigator.msSaveBlob(blob, fileName + '.xlsx')
+    navigator.msSaveBlob(blob, fname + '.xlsx')
   } else {
     const link = document.createElement('a')
     link.style.display = 'none'
     var href = URL.createObjectURL(blob)
     link.href = href
-    link.setAttribute('download', fileName + '.xlsx')
+    link.setAttribute('download', fname + '.xlsx')
     document.body.appendChild(link)
     link.click()
     document.body.removeChild(link)

+ 13 - 1
src/libs/tools.js

@@ -213,7 +213,19 @@ export const numberToFixed = function (val, num) {
   else _value = _value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
 
   return _value
-}// 只能输入数字
+}
+// 保留两位小数(不四舍五入)
+export const formatDecimal = function (num, decimal) {
+  num = num.toString()
+  const index = num.indexOf('.')
+  if (index !== -1) {
+    num = num.substring(0, decimal + index + 1)
+  } else {
+    num = num.substring(0)
+  }
+  return parseFloat(num).toFixed(decimal)
+}
+// 只能输入数字
 export const justNumber = function (val) {
   let _value = val + ''
   _value = _value.replace(/\D/g, '')

+ 1 - 1
src/utils/request.js

@@ -13,7 +13,7 @@ const service = axios.create({
 })
 
 const err = (error) => {
-  console.log(error.response.data.message, 'error')
+  console.log(error, 'error')
   if (error.response) {
     const status = error.response.status
     if ((status == 503 || status == 500) && window.location.pathname != '/user/login') {

+ 21 - 19
src/views/allocationManagement/chainTransferIn/detail.vue

@@ -48,7 +48,6 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :scroll="{ x: 1335 }"
           :defaultLoadData="false"
           bordered>
         </s-table>
@@ -70,31 +69,34 @@ export default {
       spinning: false,
       // 表头
       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', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '仓库', dataIndex: 'warehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '仓位', dataIndex: 'warehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '18%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价(¥)', dataIndex: 'putCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调入数量', dataIndex: 'putQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本小计(¥)', dataIndex: 'costSubtotal', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         const params = Object.assign(parameter, { allocationLinkagePutSn: this.$route.params.sn })
         this.spinning = true
         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)
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.getDetailCount(params)
+            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.localDataSource = data.list
           }
-          this.getDetailCount(params)
-          this.localDataSource = data.list
           this.spinning = false
           return data
         })

+ 29 - 27
src/views/allocationManagement/chainTransferIn/edit.vue

@@ -77,7 +77,6 @@
           :columns="columns"
           :data="loadData"
           :defaultLoadData="false"
-          :scroll="{ x: 1110 }"
           bordered>
           <!-- 仓库仓位 -->
           <template slot="warehouse" slot-scope="text, record, index">
@@ -135,15 +134,15 @@ export default {
       warehouseCascadeData: [], //  仓库仓位
       // 表头
       columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价', dataIndex: 'putCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '调入数量', dataIndex: 'putQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本小计', dataIndex: 'costSubtotal', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '仓库仓位', scopedSlots: { customRender: 'warehouse' }, width: 200, align: 'center' }
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '18%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调入数量', dataIndex: 'putQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本小计', dataIndex: 'costSubtotal', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓库仓位', scopedSlots: { customRender: 'warehouse' }, width: '16%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -151,25 +150,28 @@ export default {
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam, { allocationLinkagePutSn: this.$route.params.sn })
         return allocLinkagePutDetailList(params).then(res => {
-          this.getDetailCount(params)
-          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
-            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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.getDetailCount(params)
+            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)
             }
-            // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
-            data.list[i].costSubtotal = getOperationalPrecision(data.list[i].putCost, data.list[i].putQty)
+            this.localDataSource = data.list || []
+            this.disabled = false
           }
-          this.localDataSource = data.list || []
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 21 - 18
src/views/allocationManagement/chainTransferIn/list.vue

@@ -79,7 +79,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1310, y: tableHeight }"
+        :scroll="{ y: tableHeight }"
         :defaultLoadData="false"
         bordered>
         <!-- 连锁调入单号 -->
@@ -139,30 +139,33 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '连锁调入单号', scopedSlots: { customRender: 'allocationLinkagePutNo' }, width: 180, align: 'center' },
-        { title: '调出对象', dataIndex: 'outTenantName', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '总款数', dataIndex: 'productTotalCategory', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总数量', dataIndex: 'productTotalQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总成本', dataIndex: 'productTotalCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库时间', dataIndex: 'putWarehouseTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调拨产品类型', dataIndex: 'allocationTypeDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'stateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务状态', dataIndex: 'settleStateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '连锁调入单号', scopedSlots: { customRender: 'allocationLinkagePutNo' }, width: '16%', align: 'center' },
+        { title: '调出对象', dataIndex: 'outTenantName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总款数', dataIndex: 'productTotalCategory', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总数量', dataIndex: 'productTotalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总成本', dataIndex: 'productTotalCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库时间', dataIndex: 'putWarehouseTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨产品类型', dataIndex: 'allocationTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', dataIndex: 'settleStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
         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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 12 - 9
src/views/allocationManagement/chainTransferOut/detail.vue

@@ -95,16 +95,19 @@ export default {
         this.disabled = true
         const params = Object.assign(parameter, { allocationLinkageOutSn: this.outBizSn || 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)
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.getDetailCount(params)
+            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.localDataSource = data.list
           }
-          this.disabled = false
-          this.getDetailCount(params)
-          this.localDataSource = data.list
           return data
         })
       },

+ 15 - 12
src/views/allocationManagement/chainTransferOut/list.vue

@@ -158,29 +158,32 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '连锁调出单号', scopedSlots: { customRender: 'allocationLinkageOutNo' }, width: '12%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '连锁调出单号', scopedSlots: { customRender: 'allocationLinkageOutNo' }, width: '16%', align: 'center' },
         { title: '调往对象', dataIndex: 'putTenantName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '总款数', dataIndex: 'productTotalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总数量', dataIndex: 'productTotalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总成本', dataIndex: 'productTotalCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'auditTime', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总款数', dataIndex: 'productTotalCategory', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总数量', dataIndex: 'productTotalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总成本', dataIndex: 'productTotalCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨类型', dataIndex: 'allocationTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '财务状态', dataIndex: 'settleStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '13%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
         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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 10 - 7
src/views/allocationManagement/storeTransferOut/detail.vue

@@ -90,14 +90,17 @@ export default {
       loadData: parameter => {
         this.spinning = true
         return storeCallOutDetailList(Object.assign(parameter, { storeCallOutSn: this.outBizSn || 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)
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+              data.list[i].costSubtotal = getOperationalPrecision(data.list[i].outCost, data.list[i].outQty)
+            }
+            this.localDataSource = data.list
           }
-          this.localDataSource = data.list
           this.spinning = false
           return data
         })

+ 8 - 5
src/views/allocationManagement/storeTransferOut/list.vue

@@ -165,12 +165,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return storeCallOutList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 76 - 68
src/views/allocationManagement/warehouseAllocation/detail.vue

@@ -1,68 +1,70 @@
 <template>
   <div class="warehouseAllocationDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="warehouseAllocationDetail-back" :style="{ padding: !outBizSn ? '16px 24px' : '0px 24px' }" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle" v-if="!outBizSn">
-        <a id="warehouseAllocationDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <a-button
-          v-if="warehouse&&warehouse.stateDictValue!='已完结'&&$hasPermissions('B_warehouseAllocationEdit')"
-          type="primary"
-          size="small"
-          style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
-          id="warehouseAllocationEdit-btn"
-          @click.stop="handleEdit">
-          编辑
-        </a-button>
-      </template>
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="warehouseAllocationDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <a-descriptions-item label="调出仓库">{{ (warehouse&&warehouse.outWarehouseName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="调入仓库">{{ (warehouse&&warehouse.putWarehouseName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="调拨单号">{{ (warehouse&&warehouse.allocationWarehouseNo) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="关联单号">{{ (warehouse&&warehouse.relevanceNo) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="单据状态">{{ (warehouse&&warehouse.stateDictValue) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="备注">{{ (warehouse&&warehouse.remark) || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-card size="small" :bordered="false" class="warehouseAllocationDetail-cont">
-      <!-- 总计 -->
-      <a-alert type="info" style="margin-bottom:10px">
-        <div slot="message">
-          总款数: <strong>{{ productTotal&&(productTotal.productTotalCategory || productTotal.productTotalCategory==0) ? productTotal.productTotalCategory : '--' }}</strong> ,
-          总数量: <strong>{{ productTotal&&(productTotal.productTotalQty || productTotal.productTotalQty==0) ? productTotal.productTotalQty : '--' }}</strong> ,
-          总成本: <strong>{{ productTotal&&(productTotal.productTotalCost || productTotal.productTotalCost==0) ? '¥'+productTotal.productTotalCost : '--' }}</strong>
-        </div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        bordered>
-        <!-- 产品类别 -->
-        <template slot="productType" slot-scope="text, record">
-          <a-tooltip placement="top">
-            <template slot="title">
-              <span>{{ record.productTypeName }}</span>
-            </template>
-            {{ record.productTypeName3 }}
-          </a-tooltip>
-        </template>
-        <!-- 成本小计 -->
-        <template slot="totalCost" slot-scope="text, record">
-          <span>{{ (record.allocationCost * record.allocationQty) || 0 }}</span>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="warehouseAllocationDetail-back" :style="{ padding: !outBizSn ? '16px 24px' : '0px 24px' }" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle" v-if="!outBizSn">
+          <a id="warehouseAllocationDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <a-button
+            v-if="warehouse&&warehouse.stateDictValue!='已完结'&&$hasPermissions('B_warehouseAllocationEdit')"
+            type="primary"
+            size="small"
+            style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+            id="warehouseAllocationEdit-btn"
+            @click.stop="handleEdit">
+            编辑
+          </a-button>
         </template>
-      </s-table>
-    </a-card>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="warehouseAllocationDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="3">
+              <a-descriptions-item label="调出仓库">{{ (warehouse&&warehouse.outWarehouseName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调入仓库">{{ (warehouse&&warehouse.putWarehouseName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调拨单号">{{ (warehouse&&warehouse.allocationWarehouseNo) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="关联单号">{{ (warehouse&&warehouse.relevanceNo) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="单据状态">{{ (warehouse&&warehouse.stateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ (warehouse&&warehouse.remark) || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-card size="small" :bordered="false" class="warehouseAllocationDetail-cont">
+        <!-- 总计 -->
+        <a-alert type="info" style="margin-bottom:10px">
+          <div slot="message">
+            总款数: <strong>{{ productTotal&&(productTotal.productTotalCategory || productTotal.productTotalCategory==0) ? productTotal.productTotalCategory : '--' }}</strong> ,
+            总数量: <strong>{{ productTotal&&(productTotal.productTotalQty || productTotal.productTotalQty==0) ? productTotal.productTotalQty : '--' }}</strong> ,
+            总成本: <strong>{{ productTotal&&(productTotal.productTotalCost || productTotal.productTotalCost==0) ? '¥'+productTotal.productTotalCost : '--' }}</strong>
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          bordered>
+          <!-- 产品类别 -->
+          <template slot="productType" slot-scope="text, record">
+            <a-tooltip placement="top">
+              <template slot="title">
+                <span>{{ record.productTypeName }}</span>
+              </template>
+              {{ record.productTypeName3 }}
+            </a-tooltip>
+          </template>
+          <!-- 成本小计 -->
+          <template slot="totalCost" slot-scope="text, record">
+            <span>{{ (record.allocationCost * record.allocationQty) || 0 }}</span>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
   </div>
 </template>
 
@@ -79,6 +81,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       exportLoading: false, // 导出loading
       warehouse: null, // 基础信息
       productTotal: null,
@@ -98,14 +101,19 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return allocWarehouseDetailList(Object.assign(parameter, { allocationWarehouseSn: this.outBizSn || 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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.getProduceTotal()
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.getProduceTotal()
-          this.disabled = false
+          this.spinning = false
           return data
         })
       }

+ 8 - 5
src/views/allocationManagement/warehouseAllocation/list.vue

@@ -151,12 +151,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return allocWarehouseList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 8 - 5
src/views/basicData/bulkPartsTypeManagement/list.vue

@@ -69,12 +69,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return sparePartsPutTypeList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 8 - 5
src/views/basicData/customerTypeManagement/list.vue

@@ -84,12 +84,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return custTypeList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 8 - 6
src/views/basicData/expenseType/list.vue

@@ -78,12 +78,14 @@ export default {
       loadData: parameter => {
         this.spinning = true
         return costTypeAllQuery({}).then(res => {
-          //  递归去除空children
-          this.recursionFun(res.data)
-          if (res.data.length > 0) {
-            this.defaultExpandedRowKeys[0] = res.data[0].id
-          } else {
-            this.defaultExpandedRowKeys = []
+          if (res.status == 200) {
+            //  递归去除空children
+            this.recursionFun(res.data)
+            if (res.data.length > 0) {
+              this.defaultExpandedRowKeys[0] = res.data[0].id
+            } else {
+              this.defaultExpandedRowKeys = []
+            }
           }
           this.spinning = false
           return res.data

+ 7 - 4
src/views/basicData/storeTransferOutTypeManagement/list.vue

@@ -71,10 +71,13 @@ export default {
       loadData: parameter => {
         this.spinning = true
         return storeCallOutTypeList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
           }
           this.spinning = false
           return data

+ 8 - 7
src/views/bulkManagement/bulkImport/list.vue

@@ -71,7 +71,6 @@
 <script>
 import { STable, Upload } from '@/components'
 import { stockImportList, stockImportFinish, stockImportCancel, stockImportExportError } from '@/api/stockImport'
-import moment from 'moment'
 import { downloadExcel } from '@/libs/JGPrint.js'
 export default {
   components: { STable, Upload },
@@ -103,10 +102,13 @@ export default {
       loadData: parameter => {
         this.spinning = true
         return stockImportList(Object.assign(parameter, { stockImportSn: this.uploadData && this.uploadData.stockImportSn })).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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
           }
           this.spinning = false
           return data
@@ -198,8 +200,7 @@ export default {
           })
           reader.readAsText(res)
         } else {
-          const fileName = '散件导入错误项' + moment().format('YYYYMMDDHHmmss')
-          downloadExcel(res, fileName)
+          downloadExcel(res, '散件导入错误项')
         }
       })
     },

+ 12 - 7
src/views/bulkManagement/bulkReturnGoods/detailModal.vue

@@ -80,16 +80,21 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         const params = Object.assign(parameter, { sparePartsReturnSn: this.itemSn })
         return sparePartsRetDetailList(params).then(res => {
-          this.getDetailCount(params)
-          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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.getDetailCount(params)
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.dataSource = data.list
+            this.disabled = false
           }
-          this.dataSource = data.list
-          this.disabled = false
+          this.spinning = false
           return data
         })
       },

+ 10 - 5
src/views/bulkManagement/bulkReturnGoods/list.vue

@@ -168,13 +168,18 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return sparePartsRetList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
+          this.spinning = false
           return data
         })
       },

+ 13 - 8
src/views/bulkManagement/bulkWarehousingOrder/detail.vue

@@ -121,16 +121,21 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return sparePartsPurDetailList(Object.assign(parameter, { sparePartsPurchaseSn: 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].purchaseAmount = getOperationalPrecision(data.list[i].putCost, data.list[i].putQty)
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              // 采购金额  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+              data.list[i].purchaseAmount = getOperationalPrecision(data.list[i].putCost, data.list[i].putQty)
+            }
+            this.localDataSource = data.list
+            this.disabled = false
           }
-          this.localDataSource = data.list
-          this.disabled = false
+          this.spinning = false
           return data
         })
       },

+ 11 - 10
src/views/bulkManagement/bulkWarehousingOrder/list.vue

@@ -139,7 +139,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import getDate from '@/libs/getDate.js'
@@ -189,15 +188,18 @@ export default {
         this.disabled = true
         this.spinning = true
         return sparePartsPurList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.getTotal(Object.assign(parameter, this.queryParam))
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+            this.dataTotalCount = data.count || 0
           }
-          this.disabled = false
           this.spinning = false
-          this.dataTotalCount = data.count || 0
-          this.getTotal(Object.assign(parameter, this.queryParam))
           return data
         })
       },
@@ -315,8 +317,7 @@ export default {
           })
           reader.readAsText(res)
         } else {
-          const fileName = '散件入库单' + moment().format('YYYYMMDDHHmmss')
-          downloadExcel(res, fileName)
+          downloadExcel(res, '散件入库单')
         }
       })
     },

+ 10 - 7
src/views/customerManagement/customerInfo/list.vue

@@ -147,7 +147,7 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '客户名称', dataIndex: 'customerName', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', dataIndex: 'customerName', width: '16%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '联系人', dataIndex: 'contactName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '联系电话', dataIndex: 'contactTel', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '联系手机', dataIndex: 'contactMobile', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -162,13 +162,16 @@ export default {
         this.disabled = true
         this.spinning = true
         return custList(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
-            data.list[i].enabledFlag = data.list[i].enabledFlag + '' === '1'
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].enabledFlag = data.list[i].enabledFlag + '' === '1'
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 65 - 57
src/views/financialManagement/companyCollectionPayment/detail.vue

@@ -1,56 +1,58 @@
 <template>
   <div class="companyCollectionPaymentDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="companyCollectionPaymentDetail-cont" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="companyCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.unitSettleNo) || '--' }}</p>
-      </template>
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="companyCollectionPaymentDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <a-descriptions-item label="单位名称">{{ (basicInfoData&&basicInfoData.settleClientName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="单位类型">{{ (basicInfoData&&basicInfoData.settleClientTypeDictValue) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="结算类型">{{ (basicInfoData&&basicInfoData.settleTypeDictValue) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="应结算金额">{{ (basicInfoData&&(basicInfoData.settleAmount || basicInfoData.settleAmount==0)) ? basicInfoData.settleAmount : '--' }}</a-descriptions-item>
-            <a-descriptions-item label="折让金额">{{ (discountAmount || discountAmount==0) ? discountAmount : '--' }}</a-descriptions-item>
-            <a-descriptions-item label="实结算金额">{{ (basicInfoData&&(basicInfoData.realSettleAmount || basicInfoData.realSettleAmount==0)) ? basicInfoData.realSettleAmount : '--' }}</a-descriptions-item>
-            <a-descriptions-item label="结算时间">{{ (basicInfoData&&basicInfoData.createDate) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="操作人">{{ (basicInfoData&&basicInfoData.operateName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="结算方式">{{ (basicInfoData&&basicInfoData.settleStyleName) || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 收款明细 -->
-    <a-card size="small" :bordered="false" class="companyCollectionPaymentDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="收款明细">
-          <!-- alert -->
-          <a-alert type="info" style="margin-bottom:10px">
-            <div slot="message">
-              共 <strong>{{ total }}</strong> 条明细,
-              金额合计 <strong>{{ (basicInfoData&&(basicInfoData.totalSettleAmount || basicInfoData.totalSettleAmount==0)) ? '¥'+basicInfoData.totalSettleAmount : '--' }}</strong> ,
-              结算金额合计 <strong>{{ (basicInfoData&&(basicInfoData.realSettleAmount || basicInfoData.realSettleAmount==0)) ? '¥'+basicInfoData.realSettleAmount : '--' }}</strong>
-            </div>
-          </a-alert>
-          <!-- 列表 -->
-          <s-table
-            class="sTable"
-            ref="table"
-            size="small"
-            :rowKey="(record) => record.id"
-            :columns="columns"
-            :data="loadData"
-            :defaultLoadData="false"
-            bordered>
-          </s-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="companyCollectionPaymentDetail-cont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="companyCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.unitSettleNo) || '--' }}</p>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="companyCollectionPaymentDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="3">
+              <a-descriptions-item label="单位名称">{{ (basicInfoData&&basicInfoData.settleClientName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="单位类型">{{ (basicInfoData&&basicInfoData.settleClientTypeDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="结算类型">{{ (basicInfoData&&basicInfoData.settleTypeDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="应结算金额">{{ (basicInfoData&&(basicInfoData.settleAmount || basicInfoData.settleAmount==0)) ? basicInfoData.settleAmount : '--' }}</a-descriptions-item>
+              <a-descriptions-item label="折让金额">{{ (discountAmount || discountAmount==0) ? discountAmount : '--' }}</a-descriptions-item>
+              <a-descriptions-item label="实结算金额">{{ (basicInfoData&&(basicInfoData.realSettleAmount || basicInfoData.realSettleAmount==0)) ? basicInfoData.realSettleAmount : '--' }}</a-descriptions-item>
+              <a-descriptions-item label="结算时间">{{ (basicInfoData&&basicInfoData.createDate) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="操作人">{{ (basicInfoData&&basicInfoData.operateName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="结算方式">{{ (basicInfoData&&basicInfoData.settleStyleName) || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 收款明细 -->
+      <a-card size="small" :bordered="false" class="companyCollectionPaymentDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="收款明细">
+            <!-- alert -->
+            <a-alert type="info" style="margin-bottom:10px">
+              <div slot="message">
+                共 <strong>{{ total }}</strong> 条明细,
+                金额合计 <strong>{{ (basicInfoData&&(basicInfoData.totalSettleAmount || basicInfoData.totalSettleAmount==0)) ? '¥'+basicInfoData.totalSettleAmount : '--' }}</strong> ,
+                结算金额合计 <strong>{{ (basicInfoData&&(basicInfoData.realSettleAmount || basicInfoData.realSettleAmount==0)) ? '¥'+basicInfoData.realSettleAmount : '--' }}</strong>
+              </div>
+            </a-alert>
+            <!-- 列表 -->
+            <s-table
+              class="sTable"
+              ref="table"
+              size="small"
+              :rowKey="(record) => record.id"
+              :columns="columns"
+              :data="loadData"
+              :defaultLoadData="false"
+              bordered>
+            </s-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+    </a-spin>
   </div>
 </template>
 
@@ -61,6 +63,7 @@ export default {
   components: { STable, VSelect },
   data () {
     return {
+      spinning: false,
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', align: 'center', width: '10%' },
@@ -72,14 +75,19 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return settleUnitDetailList(Object.assign(parameter, { unitSettleSn: 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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+            this.total = data.count || 0
           }
-          this.disabled = false
-          this.total = data.count || 0
+          this.spinning = false
           return data
         })
       },

+ 93 - 87
src/views/financialManagement/companyCollectionPayment/list.vue

@@ -1,95 +1,97 @@
 <template>
   <a-card size="small" :bordered="false" class="companyCollectionPaymentList-wrap">
-    <!-- 搜索条件 -->
-    <div ref="tableSearch" class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="单位名称">
-              <a-input id="companyCollectionPaymentList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入单位名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="单位类型">
-              <v-select
-                v-model="queryParam.settleClientType"
-                ref="settleClientType"
-                id="companyCollectionPaymentList-settleClientType"
-                code="SETTLE_CLIENT_TYPE"
-                placeholder="请选择单位类型"
-                allowClear></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="结算类型">
-              <v-select
-                v-model="queryParam.settleType"
-                ref="settleType"
-                id="companyCollectionPaymentList-settleType"
-                code="SETTLE_TYPE"
-                placeholder="请选择结算类型"
-                allowClear></v-select>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="结算单号">
-                <a-input id="companyCollectionPaymentList-unitSettleNo" v-model.trim="queryParam.unitSettleNo" allowClear placeholder="请输入结算单号"/>
+              <a-form-item label="单位名称">
+                <a-input id="companyCollectionPaymentList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入单位名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="结算时间">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+              <a-form-item label="单位类型">
+                <v-select
+                  v-model="queryParam.settleClientType"
+                  ref="settleClientType"
+                  id="companyCollectionPaymentList-settleClientType"
+                  code="SETTLE_CLIENT_TYPE"
+                  placeholder="请选择单位类型"
+                  allowClear></v-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="结算方式">
-                <a-select id="companyCollectionPaymentList-settleStyleSn" v-model="queryParam.settleStyleSn" placeholder="请选择结算方式" allowClear>
-                  <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
-                </a-select>
+              <a-form-item label="结算类型">
+                <v-select
+                  v-model="queryParam.settleType"
+                  ref="settleType"
+                  id="companyCollectionPaymentList-settleType"
+                  code="SETTLE_TYPE"
+                  placeholder="请选择结算类型"
+                  allowClear></v-select>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <span class="table-page-search-submitButtons">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="companyCollectionPaymentList-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="companyCollectionPaymentList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- alert -->
-    <a-alert type="info" style="margin-bottom:10px">
-      <div slot="message">
-        共 <strong>{{ total }}</strong> 条记录,
-        其中收款单 <strong>{{ (productTotal&&(productTotal.receiptCount || productTotal.receiptCount==0)) ? productTotal.receiptCount : '--' }}</strong> 条,
-        收款金额合计 <strong>{{ (productTotal&&(productTotal.receiptAmount || productTotal.receiptAmount==0)) ? '¥'+productTotal.receiptAmount : '--' }}</strong> ,
-        付款单 <strong>{{ (productTotal&&(productTotal.payCount || productTotal.payCount==0)) ? productTotal.payCount : '--' }}</strong> 条,
-        付款金额合计 <strong>{{ (productTotal&&(productTotal.payAmount || productTotal.payAmount==0)) ? '¥'+productTotal.payAmount : '--' }}</strong>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="结算单号">
+                  <a-input id="companyCollectionPaymentList-unitSettleNo" v-model.trim="queryParam.unitSettleNo" allowClear placeholder="请输入结算单号"/>
+                </a-form-item>
+              </a-col>
+              <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 id="companyCollectionPaymentList-settleStyleSn" v-model="queryParam.settleStyleSn" placeholder="请选择结算方式" allowClear>
+                    <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="companyCollectionPaymentList-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="companyCollectionPaymentList-reset">重置</a-button>
+                <a @click="advanced=!advanced" style="margin-left: 8px">
+                  {{ advanced ? '收起' : '展开' }}
+                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                </a>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
       </div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable fixPagination"
-      ref="table"
-      :style="{ height: tableHeight+84.5+'px' }"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ y: tableHeight }"
-      :defaultLoadData="false"
-      bordered>
-      <!-- 结算单号 -->
-      <template slot="unitSettleNo" slot-scope="text, record">
-        <span :class="$hasPermissions('M_companyCollectionPayment_detail')?'active':'common'" @click="handleDetail(record)">{{ record.unitSettleNo }}</span>
-      </template>
-    </s-table>
+      <!-- alert -->
+      <a-alert type="info" style="margin-bottom:10px">
+        <div slot="message">
+          共 <strong>{{ total }}</strong> 条记录,
+          其中收款单 <strong>{{ (productTotal&&(productTotal.receiptCount || productTotal.receiptCount==0)) ? productTotal.receiptCount : '--' }}</strong> 条,
+          收款金额合计 <strong>{{ (productTotal&&(productTotal.receiptAmount || productTotal.receiptAmount==0)) ? '¥'+productTotal.receiptAmount : '--' }}</strong> ,
+          付款单 <strong>{{ (productTotal&&(productTotal.payCount || productTotal.payCount==0)) ? productTotal.payCount : '--' }}</strong> 条,
+          付款金额合计 <strong>{{ (productTotal&&(productTotal.payAmount || productTotal.payAmount==0)) ? '¥'+productTotal.payAmount : '--' }}</strong>
+        </div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 结算单号 -->
+        <template slot="unitSettleNo" slot-scope="text, record">
+          <span :class="$hasPermissions('M_companyCollectionPayment_detail')?'active':'common'" @click="handleDetail(record)">{{ record.unitSettleNo }}</span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -102,6 +104,7 @@ export default {
   components: { STable, VSelect, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: true, //  高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       tableHeight: 0,
@@ -132,15 +135,18 @@ export default {
         this.disabled = true
         this.spinning = true
         return settleUnitList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.getTotal(Object.assign(parameter, this.queryParam))
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+            this.total = data.count || 0
           }
-          this.disabled = false
           this.spinning = false
-          this.total = data.count || 0
-          this.getTotal(Object.assign(parameter, this.queryParam))
           return data
         })
       },

+ 69 - 61
src/views/financialManagement/companyReceivablePayable/chooseBillModal.vue

@@ -8,56 +8,58 @@
     v-model="isShow"
     @cancle="isShow=false"
     :width="960">
-    <!-- 搜索条件 -->
-    <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="单据号">
-              <a-input id="chooseBillModal-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单据号"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="单据类型">
-              <v-select
-                v-model="queryParam.bizType"
-                ref="bizType"
-                id="chooseBillModal-bizType"
-                code="SETTLE_BIZ_TYPE"
-                placeholder="请选择单据类型"
-                allowClear></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="7" :sm="24">
-            <a-form-item label="审核时间">
-              <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="5" :sm="24">
-            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="chooseBillModal-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="chooseBillModal-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :showPagination="false"
-      :scroll="{ x: '100%', y: 400 }"
-      :defaultLoadData="false"
-      bordered>
-    </s-table>
-    <div class="btn-cont">
-      <a-button type="primary" id="chooseBillModal-modal-save" @click="handleSave">确定</a-button>
-      <a-button id="chooseBillModal-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-    </div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <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="单据号">
+                <a-input id="chooseBillModal-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单据号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="单据类型">
+                <v-select
+                  v-model="queryParam.bizType"
+                  ref="bizType"
+                  id="chooseBillModal-bizType"
+                  code="SETTLE_BIZ_TYPE"
+                  placeholder="请选择单据类型"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="7" :sm="24">
+              <a-form-item label="审核时间">
+                <rangeDate ref="rangeDate" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="5" :sm="24">
+              <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="chooseBillModal-refresh">查询</a-button>
+              <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="chooseBillModal-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :showPagination="false"
+        :scroll="{ x: '100%', y: 400 }"
+        :defaultLoadData="false"
+        bordered>
+      </s-table>
+      <div class="btn-cont">
+        <a-button type="primary" id="chooseBillModal-modal-save" @click="handleSave">确定</a-button>
+        <a-button id="chooseBillModal-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
   </a-modal>
 </template>
 
@@ -86,6 +88,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       disabled: false,
       queryParam: {
@@ -106,20 +109,25 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return settleInfoAllList(Object.assign(this.queryParam, { settleClientSn: this.settleClientSn, notEqZero: 1 })).then(res => {
-          const data = res.data
-          this.selectedRowKeys = []
-          this.selectedRows = []
-          for (var i = 0; i < data.length; i++) {
-            data[i].no = i + 1
-            data[i].settleAmount = data[i].unsettleAmount
-            const ind = this.nowChoose.findIndex(item => item.id == data[i].id)
-            if (ind != -1) {
-              this.selectedRowKeys.push(data[i].id)
-              this.selectedRows.push(data[i])
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.selectedRowKeys = []
+            this.selectedRows = []
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = i + 1
+              data[i].settleAmount = data[i].unsettleAmount
+              const ind = this.nowChoose.findIndex(item => item.id == data[i].id)
+              if (ind != -1) {
+                this.selectedRowKeys.push(data[i].id)
+                this.selectedRows.push(data[i])
+              }
             }
+            this.disabled = false
           }
-          this.disabled = false
+          this.spinning = false
           return data
         })
       },

+ 82 - 76
src/views/financialManagement/companyReceivablePayable/detail.vue

@@ -1,76 +1,77 @@
 <template>
   <div class="companyCollectionPaymentDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="companyCollectionPaymentDetail-cont" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="companyCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">客户:{{ $route.params.name || '--' }}</p>
-      </template>
-    </a-page-header>
-    <a-card>
-      <!-- 搜索条件 -->
-      <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="单据号">
-                <a-input id="companyReceivablePayableDetail-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单据号"/>
-              </a-form-item>
-            </a-col>
-            <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">
-              <span class="table-page-search-submitButtons">
-                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="companyReceivablePayableDetail-refresh">查询</a-button>
-                <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="companyReceivablePayableDetail-reset">重置</a-button>
-                <!-- <a-button
-                  type="danger"
-                  style="margin-left: 8px"
-                  @click="handleExport"
-                  :disabled="disabled"
-                  :loading="exportLoading"
-                  id="companyReceivablePayableDetail-export-btn">导出</a-button> -->
-              </span>
-            </a-col>
-          </a-row>
-        </a-form>
-      </div>
-      <!-- alert -->
-      <a-alert type="info" style="margin-bottom:10px">
-        <div slot="message">
-          共 <strong>{{ total }}</strong> 条明细,
-          金额合计 <strong>{{ (productTotal&&(productTotal.totalAmount || productTotal.totalAmount==0)) ? '¥'+productTotal.totalAmount : '--' }}</strong> ,
-          余额合计 <strong>{{ (productTotal&&(productTotal.unsettleAmount || productTotal.unsettleAmount==0)) ? '¥'+productTotal.unsettleAmount : '--' }}</strong>
-        </div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :defaultLoadData="false"
-        bordered>
-        <!-- 采购数量 -->
-        <template slot="purchaseNum" slot-scope="text, record">
-          <span>{{ record.purchaseNum }}</span>
-        </template>
-        <!-- 缺货数量 -->
-        <template slot="outOfStockNum" slot-scope="text, record">
-          <span>{{ record.outOfStockNum }}</span>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="companyCollectionPaymentDetail-cont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="companyCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">客户:{{ $route.params.name || '--' }}</p>
         </template>
-      </s-table>
-    </a-card>
+      </a-page-header>
+      <a-card>
+        <!-- 搜索条件 -->
+        <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="单据号">
+                  <a-input id="companyReceivablePayableDetail-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入单据号"/>
+                </a-form-item>
+              </a-col>
+              <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">
+                <span class="table-page-search-submitButtons">
+                  <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="companyReceivablePayableDetail-refresh">查询</a-button>
+                  <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="companyReceivablePayableDetail-reset">重置</a-button>
+                  <!-- <a-button
+                    type="danger"
+                    style="margin-left: 8px"
+                    @click="handleExport"
+                    :disabled="disabled"
+                    :loading="exportLoading"
+                    id="companyReceivablePayableDetail-export-btn">导出</a-button> -->
+                </span>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <!-- alert -->
+        <a-alert type="info" style="margin-bottom:10px">
+          <div slot="message">
+            共 <strong>{{ total }}</strong> 条明细,
+            金额合计 <strong>{{ (productTotal&&(productTotal.totalAmount || productTotal.totalAmount==0)) ? '¥'+productTotal.totalAmount : '--' }}</strong> ,
+            余额合计 <strong>{{ (productTotal&&(productTotal.unsettleAmount || productTotal.unsettleAmount==0)) ? '¥'+productTotal.unsettleAmount : '--' }}</strong>
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 采购数量 -->
+          <template slot="purchaseNum" slot-scope="text, record">
+            <span>{{ record.purchaseNum }}</span>
+          </template>
+          <!-- 缺货数量 -->
+          <template slot="outOfStockNum" slot-scope="text, record">
+            <span>{{ record.outOfStockNum }}</span>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
   </div>
 </template>
 
 <script>
-import moment from 'moment'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
@@ -79,6 +80,7 @@ export default {
   components: { STable, VSelect, rangeDate },
   data () {
     return {
+      spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
       // 查询参数
       queryParam: {
@@ -99,16 +101,21 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         const params = Object.assign(parameter, this.queryParam, { settleClientSn: this.$route.params.sn })
         return settleInfoList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.getTotal(params)
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+            this.total = data.count || 0
           }
-          this.disabled = false
-          this.total = data.count || 0
-          this.getTotal(params)
+          this.spinning = false
           return data
         })
       },
@@ -151,10 +158,9 @@ export default {
       this.exportLoading = true
       // customerBundleExportDelay(params).then(res => {
       //   this.exportLoading = false
-	  // const fileName = '单位应收应付' + moment().format('YYYYMMDDHHmmss')
-	  // downloadExcel(res, fileName)
+	  // downloadExcel(res, '单位应收应付')
       // })
-    },
+    }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用

+ 82 - 76
src/views/financialManagement/companyReceivablePayable/list.vue

@@ -1,73 +1,75 @@
 <template>
   <a-card size="small" :bordered="false" class="companyReceivablePayableList-wrap">
-    <!-- 搜索条件 -->
-    <div ref="tableSearch" class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="单位名称">
-              <a-input id="companyReceivablePayableList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入单位名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="单位类型">
-              <v-select
-                v-model="queryParam.settleClientType"
-                ref="settleClientType"
-                id="companyReceivablePayableList-settleClientType"
-                code="SETTLE_CLIENT_TYPE"
-                placeholder="请选择单位类型"
-                allowClear></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <span class="table-page-search-submitButtons">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="companyReceivablePayableList-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="companyReceivablePayableList-reset">重置</a-button>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- alert -->
-    <a-alert type="info" style="margin-bottom:10px">
-      <div slot="message">
-        共 <strong>{{ total }}</strong> 条记录,
-        应收金额合计 <strong>{{ (productTotal&&(productTotal.receipt || productTotal.receipt==0)) ? '¥'+productTotal.receipt : '--' }}</strong> ,
-        应付金额合计 <strong>¥{{ (productTotal&&productTotal.pay) ? Math.abs(productTotal.pay) : 0 }}</strong>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="单位名称">
+                <a-input id="companyReceivablePayableList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入单位名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="单位类型">
+                <v-select
+                  v-model="queryParam.settleClientType"
+                  ref="settleClientType"
+                  id="companyReceivablePayableList-settleClientType"
+                  code="SETTLE_CLIENT_TYPE"
+                  placeholder="请选择单位类型"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="companyReceivablePayableList-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="companyReceivablePayableList-reset">重置</a-button>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
       </div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable fixPagination"
-      ref="table"
-      :style="{ height: tableHeight+84.5+'px' }"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ y: tableHeight }"
-      :defaultLoadData="false"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          v-if="$hasPermissions('M_collectionPayment')"
-          size="small"
-          type="link"
-          class="button-info"
-          @click="handleCollectionPayment(record)"
-          id="companyReceivablePayableList-collectionPayment-btn">收付款</a-button>
-        <a-button
-          v-if="$hasPermissions('M_companyReceivablePayable_detail')"
-          size="small"
-          type="link"
-          class="button-success"
-          @click="handleDetail(record)"
-          id="companyReceivablePayableList-detail-btn">详情</a-button>
-        <span v-if="!$hasPermissions('M_collectionPayment') && !$hasPermissions('M_companyReceivablePayable_detail')">--</span>
-      </template>
-    </s-table>
+      <!-- alert -->
+      <a-alert type="info" style="margin-bottom:10px">
+        <div slot="message">
+          共 <strong>{{ total }}</strong> 条记录,
+          应收金额合计 <strong>{{ (productTotal&&(productTotal.receipt || productTotal.receipt==0)) ? '¥'+productTotal.receipt : '--' }}</strong> ,
+          应付金额合计 <strong>¥{{ (productTotal&&productTotal.pay) ? Math.abs(productTotal.pay) : 0 }}</strong>
+        </div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            v-if="$hasPermissions('M_collectionPayment')"
+            size="small"
+            type="link"
+            class="button-info"
+            @click="handleCollectionPayment(record)"
+            id="companyReceivablePayableList-collectionPayment-btn">收付款</a-button>
+          <a-button
+            v-if="$hasPermissions('M_companyReceivablePayable_detail')"
+            size="small"
+            type="link"
+            class="button-success"
+            @click="handleDetail(record)"
+            id="companyReceivablePayableList-detail-btn">详情</a-button>
+          <span v-if="!$hasPermissions('M_collectionPayment') && !$hasPermissions('M_companyReceivablePayable_detail')">--</span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -78,6 +80,7 @@ export default {
   components: { STable, VSelect },
   data () {
     return {
+      spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
       tableHeight: 0,
       // 查询参数
@@ -99,17 +102,20 @@ export default {
         this.disabled = true
         this.spinning = true
         return settleUnitClientList(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
-            // 应付金额  值为负,应显示为正
-            data.list[i].unSettleAmountPay = Math.abs(data.list[i].unSettleAmountPay) || 0
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.getTotal(Object.assign(parameter, this.queryParam))
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              // 应付金额  值为负,应显示为正
+              data.list[i].unSettleAmountPay = Math.abs(data.list[i].unSettleAmountPay) || 0
+            }
+            this.disabled = false
+            this.total = data.count || 0
           }
-          this.disabled = false
           this.spinning = false
-          this.total = data.count || 0
-          this.getTotal(Object.assign(parameter, this.queryParam))
           return data
         })
       },

+ 15 - 12
src/views/financialManagement/expenseManagement/list.vue

@@ -165,20 +165,23 @@ export default {
         this.disabled = true
         this.spinning = true
         return settleExpenseQuery(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+            // 费用类型
+            if (this.costTypeList.length == 0) {
+              this.getCostTypeList()
+            }
+            // 汇总
+            this.totalData.count = data.count
+            this.settleExpenseQuerySum(Object.assign(parameter, this.queryParam))
           }
-          this.disabled = false
           this.spinning = false
-          // 费用类型
-          if (this.costTypeList.length == 0) {
-            this.getCostTypeList()
-          }
-          // 汇总
-          this.totalData.count = data.count
-          this.settleExpenseQuerySum(Object.assign(parameter, this.queryParam))
           return data
         })
       },

+ 26 - 8
src/views/financialManagement/financialCollection/list.vue

@@ -170,16 +170,19 @@ export default {
         this.disabled = true
         this.spinning = true
         return settleReceiptQuery(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+            this.totalData.count = data.count || 0
+            // 查询总计
+            this.settleReceiptQuerySum(Object.assign(parameter, this.queryParam))
           }
-          this.disabled = false
           this.spinning = false
-          this.totalData.count = data.count || 0
-          // 查询总计
-          this.settleReceiptQuerySum(Object.assign(parameter, this.queryParam))
           return data
         })
       },
@@ -367,3 +370,18 @@ export default {
   }
 }
 </script>
+
+<style lang="less">
+	.financialCollectionList-wrap{
+		.financialCollectionList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container{
+      height: 30px!important;
+		}
+    .financialCollectionList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active{
+      height: 30px!important;
+    }
+    .financialCollectionList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab{
+      line-height: 26px!important;
+      height: 30px!important;
+    }
+	}
+</style>

+ 2 - 2
src/views/financialManagement/financialPayment/detailModal.vue

@@ -12,10 +12,10 @@
     <div v-if="detailsData">
       <a-descriptions :column="1" size="default">
         <a-descriptions-item label="付款单号">{{ detailsData&&detailsData.settleNo || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="关联单号">{{ detailsData&&detailsData.bizNo || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="发货单号">{{ detailsData&&detailsData.bizNo || '--' }}</a-descriptions-item>
         <a-descriptions-item label="商户名称">{{ detailsData&&detailsData.settleClientName || '--' }}</a-descriptions-item>
         <a-descriptions-item label="付款金额">{{ detailsData&&(detailsData.settledAmount || detailsData.settledAmount==0) ? '¥'+detailsData.settledAmount : '--' }}</a-descriptions-item>
-        <a-descriptions-item label="付款类型">{{ detailsData&&detailsData.bizTypeDictValue || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="单据类型">{{ detailsData&&detailsData.bizTypeDictValue || '--' }}</a-descriptions-item>
         <a-descriptions-item label="付款方式">{{ detailsData&&detailsData.settleStyleName || '--' }}</a-descriptions-item>
         <a-descriptions-item label="付款时间">{{ detailsData&&detailsData.settleTime || '--' }}</a-descriptions-item>
         <a-descriptions-item label="审核时间">{{ detailsData&&detailsData.auditTime || '--' }}</a-descriptions-item>

+ 28 - 11
src/views/financialManagement/financialPayment/list.vue

@@ -15,7 +15,7 @@
               <a-form-item label="付款单号"><a-input id="finacialPay-settleNo" v-model.trim="queryParam.settleNo" allowClear placeholder="请输入付款单号" /></a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="关联单号"><a-input id="finacialPay-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单号" /></a-form-item>
+              <a-form-item label="发货单号"><a-input id="finacialPay-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入发货单号" /></a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="商户名称">
@@ -150,12 +150,12 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '付款单号', dataIndex: 'settleNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '关联单号', dataIndex: 'bizNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '发货单号', dataIndex: 'bizNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '商户名称', dataIndex: 'settleClientName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '应付金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
         { title: '已付金额', dataIndex: 'settledAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
         { title: '待付金额', dataIndex: 'unsettleAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
-        { title: '付款类型', dataIndex: 'bizName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据类型', dataIndex: 'bizName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '付款方式', dataIndex: 'settleStyleName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '付款时间', dataIndex: 'settleTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -169,16 +169,19 @@ export default {
         this.disabled = true
         this.spinning = true
         return settlePayQuery(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+            this.totalData.count = data.count || 0
+            // 查询总计
+            this.settlePayQuerySum(Object.assign(parameter, this.queryParam))
           }
-          this.disabled = false
           this.spinning = false
-          this.totalData.count = data.count || 0
-          // 查询总计
-          this.settlePayQuerySum(Object.assign(parameter, this.queryParam))
           return data
         })
       },
@@ -366,3 +369,17 @@ export default {
   }
 }
 </script>
+<style lang="less">
+	.finacialPay-wrap{
+		.finacialPay-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container{
+      height: 30px!important;
+		}
+    .finacialPay-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active{
+      height: 30px!important;
+    }
+    .finacialPay-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab{
+      line-height: 26px!important;
+      height: 30px!important;
+    }
+	}
+</style>

+ 35 - 15
src/views/financialManagement/inventoryCheckAudit/list.vue

@@ -56,12 +56,12 @@
             id="warehousingAudit-adopt-btn">通过</a-button>
           <a-button
             size="small"
-            v-if="record.state=='WAIT_FINANCE_AUDIT' && $hasPermissions('B_inventoryCheckAuditAudit')"
             type="link"
+            v-if="record.state == 'WAIT_FINANCE_AUDIT' && $hasPermissions('B_inventoryCheckingAgain')"
             class="button-warning"
-            @click="handleExamine(record, false)"
-            id="warehousingAudit-unadopt-btn">不通过</a-button>
-          <span v-if="!(record.state=='WAIT_FINANCE_AUDIT' && $hasPermissions('B_inventoryCheckAuditAudit'))">--</span>
+            @click="handleAgain(record)"
+          >重盘</a-button>
+          <span v-if="!(record.state=='WAIT_FINANCE_AUDIT' && ($hasPermissions('B_inventoryCheckAuditAudit') || $hasPermissions('B_inventoryCheckingAgain')))">--</span>
         </template>
       </s-table>
     </a-spin>
@@ -74,7 +74,7 @@
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import inventoryCheckingDetailModal from '@/views/inventoryManagement/inventoryChecking/detailModal.vue'
-import { checkWarehouseAuditList, checkWarehouseFinanceAudit } from '@/api/checkWarehouse'
+import { checkWarehouseAuditList, checkWarehouseFinanceAudit, checkWarehouseReInventory } from '@/api/checkWarehouse'
 export default {
   components: { STable, VSelect, rangeDate, inventoryCheckingDetailModal },
   data () {
@@ -91,29 +91,32 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '盘点单号', scopedSlots: { customRender: 'checkWarehouseNo' }, width: '17%', align: 'center' },
+        { title: '盘点单号', scopedSlots: { customRender: 'checkWarehouseNo' }, width: '15%', align: 'center' },
         { title: '总款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总成本', dataIndex: 'totalStockCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总成本', dataIndex: 'totalStockCost', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '盘盈数量', dataIndex: 'totalProfitQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '盘亏数量', scopedSlots: { customRender: 'totalLossQty' }, width: '7%', align: 'center' },
         { title: '盘点完成时间', dataIndex: 'checkTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '财务审核时间', dataIndex: 'financeAuditTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务审核状态', dataIndex: 'stateDictValue', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '11%', align: 'center' }
+        { title: '财务审核状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
         return checkWarehouseAuditList(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
-            data.list[i].financeFinishTime = data.list[i].financeAuditTime
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].financeFinishTime = data.list[i].financeAuditTime
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })
@@ -159,6 +162,23 @@ export default {
         }
       })
     },
+    // 重盘
+    handleAgain (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '重新盘点后,盘点单状态回退到待提交。确认重新盘点吗?',
+        centered: true,
+        onOk () {
+          checkWarehouseReInventory({ id: row.id }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    },
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate()

+ 10 - 7
src/views/financialManagement/ledgerRecord/list.vue

@@ -109,15 +109,18 @@ export default {
         this.disabled = true
         this.spinning = true
         return satelliteWHSeparateList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+            this.total = data.count || 0
+            this.getTotal(Object.assign(parameter, this.queryParam))
           }
-          this.disabled = false
           this.spinning = false
-          this.total = data.count || 0
-          this.getTotal(Object.assign(parameter, this.queryParam))
           return data
         })
       },

+ 11 - 6
src/views/financialManagement/warehousingAudit/detail.vue

@@ -81,14 +81,19 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return receivingDetailList(Object.assign(parameter, { receivingBillSn: 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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.localDataSource = data.list
+            this.disabled = false
           }
-          this.localDataSource = data.list
-          this.disabled = false
+          this.spinning = false
           return data
         })
       },

+ 33 - 23
src/views/financialManagement/warehousingAudit/list.vue

@@ -11,8 +11,8 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="采购入库单号">
-                <a-input id="warehousingAuditList-receivingBillNo" v-model.trim="queryParam.receivingBillNo" allowClear placeholder="请输入采购入库单号"/>
+              <a-form-item label="发货单号">
+                <a-input id="warehousingAuditList-receivingBillNo" v-model.trim="queryParam.receivingBillNo" allowClear placeholder="请输入发货单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -27,7 +27,7 @@
                     v-model="queryParam.auditState"
                     ref="auditState"
                     id="warehousingAuditList-auditState"
-                    code="RECEIVING_BILL_STATUS"
+                    code="RECEIVING_BILL_AUDIT_STATUS"
                     placeholder="请选择入库审核状态"
                     allowClear></v-select>
                 </a-form-item>
@@ -65,7 +65,7 @@
         :scroll="{ y: tableHeight }"
         :defaultLoadData="false"
         bordered>
-        <!-- 采购入库单号 -->
+        <!-- 发货单号 -->
         <template slot="receivingBillNo" slot-scope="text, record">
           <span v-if="record.receivingBillNo" :class="$hasPermissions('M_warehousingAudit_detail')?'active':'common'" @click="handleDetail(record)">{{ record.receivingBillNo }}</span>
           <span v-else>--</span>
@@ -98,7 +98,7 @@ import moment from 'moment'
 import getDate from '@/libs/getDate'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { receivingList, receivingStockInAudit, receivingCount } from '@/api/receiving'
+import { receivingAuditList, receivingStockInAudit, receivingCount } from '@/api/receiving'
 export default {
   components: { STable, VSelect, rangeDate },
   data () {
@@ -107,23 +107,23 @@ export default {
       advanced: true, //  高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       auditTime: [
-        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
-        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+        moment(getDate.getThreeMonthDays().starttime + ' 00:00:00', 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime + ' 23:59:59', 'YYYY-MM-DD')
       ], //  入库时间
       tableHeight: 0,
       // 查询参数
       queryParam: {
-        beginDate: getDate.getThreeMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
+        beginDate: getDate.getThreeMonthDays().starttime + ' 00:00:00',
+        endDate: getDate.getCurrMonthDays().endtime + ' 23:59:59',
         purchaseBillNo: '',
         receivingBillNo: '',
-        auditState: undefined
+        auditState: 'WAIT_PUT_WAREHOUSE_AUDIT'
       },
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '采购单号', dataIndex: 'purchaseBillNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '采购入库单号', scopedSlots: { customRender: 'receivingBillNo' }, width: '15%', align: 'center' },
+        { title: '发货单号', scopedSlots: { customRender: 'receivingBillNo' }, width: '15%', align: 'center' },
         { title: '总款数', dataIndex: 'totalPutCategory', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '入库总数量', dataIndex: 'totalPutQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '入库总成本', dataIndex: 'totalPutAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -137,15 +137,25 @@ export default {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
-        return receivingList(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
+        return receivingAuditList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.getTotal(params)
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              if (data.list[i].auditState == 'WAIT_PUT_WAREHOUSE_AUDIT') {
+                data.list[i].auditStateDictValue = '待审核'
+              } else if (data.list[i].auditState == 'FINISH') {
+                data.list[i].auditStateDictValue = '已审核'
+              } else if (data.list[i].auditState == 'PUT_WAREHOUSE_AUDIT_REJECT') {
+                data.list[i].auditStateDictValue = '审核不通过'
+              }
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
-          this.getTotal(params)
           return data
         })
       },
@@ -155,8 +165,8 @@ export default {
   methods: {
     //  时间  change
     dateChange (date) {
-      this.queryParam.beginDate = date[0]
-      this.queryParam.endDate = date[1]
+      this.queryParam.beginDate = date[0] ? date[0] + ' 00:00:00' : ''
+      this.queryParam.endDate = date[1] ? date[1] + ' 23:59:59' : ''
     },
     // 合计
     getTotal (param) {
@@ -198,11 +208,11 @@ export default {
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate(this.auditTime)
-      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime + ' 00:00:00'
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime + ' 23:59:59'
       this.queryParam.purchaseBillNo = ''
       this.queryParam.receivingBillNo = ''
-      this.queryParam.auditState = undefined
+      this.queryParam.auditState = 'WAIT_PUT_WAREHOUSE_AUDIT'
       this.$refs.table.refresh(true)
     },
     pageInit () {

+ 59 - 51
src/views/financialManagement/withdrawalManagement/list.vue

@@ -1,51 +1,53 @@
 <template>
   <a-card size="small" :bordered="false" class="withdrawalManagementList-wrap">
-    <!-- 搜索条件 -->
-    <div ref="tableSearch" class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="提现时间">
-              <rangeDateTime ref="rangeDate" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <span class="table-page-search-submitButtons">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="withdrawalManagementList-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="withdrawalManagementList-reset">重置</a-button>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button v-if="$hasPermissions('B_withdrawalManagement_cashOut')" id="withdrawalManagementList-tx" type="primary" class="button-warning" @click="handleCashOut">申请提现</a-button>
-      <div style="display: inline-block;margin-left: 80px;">可提现余额: <strong>{{ accountInfo&&(accountInfo.balance || accountInfo.balance==0) ? '¥'+accountInfo.balance : '--' }}</strong> 元</div>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable fixPagination"
-      ref="table"
-      :style="{ height: tableHeight+84.5+'px' }"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1320 }"
-      :defaultLoadData="false"
-      bordered>
-    </s-table>
-    <!-- 提现说明 -->
-    <div class="descriptions">
-      <p class="descriptions-tit">提现说明:</p>
-      <ul class="descriptions-list">
-        <li><em>1、</em>提现手续费为元/笔,从可提现余额中扣除。</li>
-        <li><em>2、</em>提现到账时间正常为T+1工作日(例如当天提现,则第二天到账。如果遇到周末或法定节假日,则依次顺延)。</li>
-        <li><em>3、</em>页面上的【可提现余额】包含当天收款但支付公司未清算金额,该部分金额只能在第二天清算后才可提现,如果提示【提现失败】和【账户余额不足】,则表明【可提现金额】中会存在该部分金额,遇到这种情况时,请减少当日提现金额或在次日进行提现。</li>
-        <li><em>4、</em>提现账户为申请开通支付结算账户时所提供的账户信息。</li>
-      </ul>
-    </div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="提现时间">
+                <rangeDateTime ref="rangeDate" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="withdrawalManagementList-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="withdrawalManagementList-reset">重置</a-button>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button v-if="$hasPermissions('B_withdrawalManagement_cashOut')" id="withdrawalManagementList-tx" type="primary" class="button-warning" @click="handleCashOut">申请提现</a-button>
+        <div style="display: inline-block;margin-left: 80px;">可提现余额: <strong>{{ accountInfo&&(accountInfo.balance || accountInfo.balance==0) ? '¥'+accountInfo.balance : '--' }}</strong> 元</div>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1320 }"
+        :defaultLoadData="false"
+        bordered>
+      </s-table>
+      <!-- 提现说明 -->
+      <div class="descriptions">
+        <p class="descriptions-tit">提现说明:</p>
+        <ul class="descriptions-list">
+          <li><em>1、</em>提现手续费为元/笔,从可提现余额中扣除。</li>
+          <li><em>2、</em>提现到账时间正常为T+1工作日(例如当天提现,则第二天到账。如果遇到周末或法定节假日,则依次顺延)。</li>
+          <li><em>3、</em>页面上的【可提现余额】包含当天收款但支付公司未清算金额,该部分金额只能在第二天清算后才可提现,如果提示【提现失败】和【账户余额不足】,则表明【可提现金额】中会存在该部分金额,遇到这种情况时,请减少当日提现金额或在次日进行提现。</li>
+          <li><em>4、</em>提现账户为申请开通支付结算账户时所提供的账户信息。</li>
+        </ul>
+      </div>
+    </a-spin>
     <!-- 申请提现 -->
     <cashOutModal :openModal="openModal" :nowData="accountInfo" @ok="handleOk" @close="closeModal" />
   </a-card>
@@ -60,6 +62,7 @@ export default {
   components: { STable, VSelect, rangeDateTime, cashOutModal },
   data () {
     return {
+      spinning: false,
       advanced: true, //  高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       tableHeight: 0,
@@ -82,13 +85,18 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return satelliteWHWithdrawalList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
+          this.spinning = false
           return data
         })
       },

+ 31 - 17
src/views/inventoryManagement/inventoryChecking/detailModal.vue

@@ -34,8 +34,8 @@
             :disabled="localDataSource.length==0"
             @click="handlePrint('export')">导出Excel</a-button>
         </div>
-        <a-descriptions size="small" :column="3">
-          <a-descriptions-item label="盘点单号" :span="3">
+        <a-descriptions size="small" :column="2">
+          <a-descriptions-item label="盘点单号" :span="2">
             {{ (basicInfoData&&basicInfoData.checkWarehouseNo) || '--' }}
             <div style="display: inline-block;margin-left: 10px;">
               <a-tag color="red" v-if="basicInfoData&&basicInfoData.stateDictValue">{{ basicInfoData.stateDictValue }}</a-tag>
@@ -43,7 +43,7 @@
           </a-descriptions-item>
           <a-descriptions-item label="盘点类型">{{ (basicInfoData&&basicInfoData.checkTypeDictValue) || '--' }}</a-descriptions-item>
           <a-descriptions-item label="是否区分仓库" v-if="basicInfoData&&basicInfoData.checkType=='SELECT'">{{ (basicInfoData&&basicInfoData.warehouseFlagDictValue) || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="盘点仓库" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'" :span="3">{{ (basicInfoData&&basicInfoData.warehouseNameList) || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="盘点仓库" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'" :span="2">{{ (basicInfoData&&basicInfoData.warehouseNameList) || '--' }}</a-descriptions-item>
           <a-descriptions-item label="创建人">{{ (basicInfoData&&basicInfoData.creatorName) || '--' }}</a-descriptions-item>
           <a-descriptions-item label="创建时间">{{ (basicInfoData&&basicInfoData.createDate) || '--' }}</a-descriptions-item>
           <a-descriptions-item label="审核时间">{{ (basicInfoData&&basicInfoData.checkSuperviseTime) || '--' }}</a-descriptions-item>
@@ -139,6 +139,10 @@
           <template slot="checkProfitLossQty" slot-scope="text, record">
             <span :style="{ color: record.checkProfitLossQty>0?'red':record.checkProfitLossQty<0?'green':'', fontWeight: record.checkProfitLossQty!=0?'bold':'' }">{{ (record.checkProfitLossQty || record.checkProfitLossQty==0) ? Math.abs(record.checkProfitLossQty) : '--' }}</span>
           </template>
+          <!-- 盈亏成本 -->
+          <template slot="checkProfitLossCost" slot-scope="text, record">
+            <span :style="{ color: record.checkProfitLossCost>0?'red':record.checkProfitLossCost<0?'green':'', fontWeight: record.checkProfitLossCost!=0?'bold':'' }">{{ (record.checkProfitLossCost || record.checkProfitLossCost==0) ? '¥'+formatDecimal(Math.abs(record.checkProfitLossCost), 2) : '--' }}</span>
+          </template>
         </s-table>
       </a-card>
     </a-spin>
@@ -150,11 +154,11 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { STable } from '@/components'
 import printModal from './printModal.vue'
 import ProductType from '@/views/common/productType.js'
+import { formatDecimal } from '@/libs/tools'
 import { checkWarehouseDetailList, checkWarehouseDetail, checkWarehouseDetailCount, checkWarehouseDetailExport, checkWarehouseDetailPrint, checkWarehouseWarehouse } from '@/api/checkWarehouse'
 export default {
   name: 'InventoryCheckingDetailModal',
@@ -186,19 +190,24 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         const params = Object.assign(parameter, this.queryParam, { checkWarehouseSn: this.itemSn })
         if (this.isPrice) {
           params.profitLossFlag = 1
         }
         return checkWarehouseDetailList(params).then(res => {
-          this.getDetailCount(params)
-          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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.getDetailCount(params)
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.localDataSource = data.list || []
+            this.disabled = false
           }
-          this.localDataSource = data.list || []
-          this.disabled = false
+          this.spinning = false
           return data
         })
       },
@@ -217,22 +226,28 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '19%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, align: 'center', width: '12%' },
+        { title: '产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '17%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, align: 'center', width: '11%' },
         { title: '单位', dataIndex: 'productUnit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '库存数量', dataIndex: 'stockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '盘点数量', dataIndex: 'checkQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '盈亏数量', scopedSlots: { customRender: 'checkProfitLossQty' }, width: '6%', align: 'center' }
+        // { title: '盈亏成本', scopedSlots: { customRender: 'checkProfitLossCost' }, width: '6%', align: 'right' }
       ]
       if (this.basicInfoData && this.basicInfoData.warehouseFlag == '1') {
         arr.splice(4, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
         arr.splice(5, 0, { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
       }
+      if (this.basicInfoData && this.basicInfoData.state == 'FINISH') {
+        arr.push({ title: '盈亏成本', scopedSlots: { customRender: 'checkProfitLossCost' }, width: '6%', align: 'right' })
+      }
       return arr
     }
   },
   methods: {
+    // 保留两位小数(不四舍五入)
+    formatDecimal,
     // 详情
     getDetail () {
       checkWarehouseDetail({ sn: this.itemSn }).then(res => {
@@ -320,8 +335,7 @@ export default {
           reader.readAsText(res)
         } else {
           if (this.nowType == 'export' || this.nowType == 'typeExport') {
-			const fileName = '库存盘点' + moment().format('YYYYMMDDHHmmss')
-			downloadExcel(res, fileName)
+            downloadExcel(res, '库存盘点')
           } else {
             this.print(res, objs.type)
           }
@@ -340,7 +354,7 @@ export default {
         window.frames['printficd'].focus()
         window.frames['printficd'].print()
       }
-    },
+    }
   },
   watch: {
     //  父页面传过来的弹框状态

+ 41 - 11
src/views/inventoryManagement/inventoryChecking/list.vue

@@ -86,6 +86,13 @@
           class="button-warning"
           @click="handleWarehouse(record)"
         >盘点</a-button>
+        <a-button
+          size="small"
+          type="link"
+          v-if="record.state == 'WAIT_CHECK_WAREHOUSE' && $hasPermissions('B_inventoryCheckingAgain')"
+          class="button-warning"
+          @click="handleAgain(record)"
+        >重盘</a-button>
         <a-button
           size="small"
           type="link"
@@ -93,7 +100,10 @@
           class="button-error"
           @click="handleDel(record)"
         >删除</a-button>
-        <span v-if="!((record.state == 'WAIT_SUBMIT') || (record.state == 'AUDIT_REJECT') && ($hasPermissions('B_inventoryCheckingEdit') || $hasPermissions('B_inventoryCheckingDel'))) && !(record.state == 'WAIT_AUDIT' && $hasPermissions('B_inventoryCheckingAudit')) && !(record.state == 'WAIT_CHECK_WAREHOUSE' && $hasPermissions('B_inventoryCheckingInventory'))">--</span>
+        <span
+          v-if="!((record.state == 'WAIT_SUBMIT') || (record.state == 'AUDIT_REJECT') && ($hasPermissions('B_inventoryCheckingEdit') || $hasPermissions('B_inventoryCheckingDel')))
+            && !(record.state == 'WAIT_AUDIT' && $hasPermissions('B_inventoryCheckingAudit'))
+            && !(record.state == 'WAIT_CHECK_WAREHOUSE' && ($hasPermissions('B_inventoryCheckingInventory') || $hasPermissions('B_inventoryCheckingAgain')))">--</span>
       </template>
     </s-table>
     <!-- 基础信息 -->
@@ -111,7 +121,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import auditModal from '@/views/common/auditModal.vue'
 import basicInfoModal from './basicInfoModal.vue'
 import inventoryCheckingDetailModal from './detailModal.vue'
-import { checkWarehouseList, checkWarehouseDel, checkWarehouseAudit, checkWarehouseValidate } from '@/api/checkWarehouse'
+import { checkWarehouseList, checkWarehouseDel, checkWarehouseAudit, checkWarehouseValidate, checkWarehouseReInventory } from '@/api/checkWarehouse'
 export default {
   components: { STable, VSelect, rangeDate, auditModal, basicInfoModal, inventoryCheckingDetailModal },
   data () {
@@ -129,12 +139,12 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '盘点单号', scopedSlots: { customRender: 'checkWarehouseNo' }, width: '16%', align: 'center' },
+        { title: '盘点单号', scopedSlots: { customRender: 'checkWarehouseNo' }, width: '15%', align: 'center' },
         { title: '总款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总成本', dataIndex: 'totalStockCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盘点类型', dataIndex: 'checkTypeDictValue', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '是否区分仓库', dataIndex: 'warehouseFlagDictValue', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总成本', dataIndex: 'totalStockCost', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '盘点类型', dataIndex: 'checkTypeDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '是否区分仓库', dataIndex: 'warehouseFlagDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', dataIndex: 'stateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'checkSuperviseTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -145,12 +155,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return checkWarehouseList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })
@@ -219,6 +232,23 @@ export default {
     handleWarehouse (row) {
       this.$router.push({ path: `/inventoryManagement/inventoryChecking/makeInventory/${row.id}/${row.checkWarehouseSn}` })
     },
+    // 重盘
+    handleAgain (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '重新盘点后,盘点单状态回退到待提交。确认重新盘点吗?',
+        centered: true,
+        onOk () {
+          checkWarehouseReInventory({ id: row.id }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    },
     //  基本信息  保存
     handleOk (data) {
       this.handleEdit(data)

+ 13 - 12
src/views/inventoryManagement/inventoryChecking/makeInventory.vue

@@ -168,7 +168,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import ProductType from '@/views/common/productType.js'
 import printModal from './printModal.vue'
@@ -197,15 +196,18 @@ export default {
         this.disabled = true
         this.spinning = true
         return checkWarehouseDetailList(Object.assign(parameter, this.queryParam, { checkWarehouseSn: 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
-            data.list[i].checkQtyBackups = data.list[i].checkQty
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].checkQtyBackups = data.list[i].checkQty
+            }
+            this.localDataSource = data.list || []
+            this.getProduceTotal()
+            this.disabled = false
           }
-          this.localDataSource = data.list || []
-          this.getProduceTotal()
-          this.disabled = false
           this.spinning = false
           return data
         })
@@ -405,8 +407,7 @@ export default {
           reader.readAsText(res)
         } else {
           if (this.nowType == 'export' || this.nowType == 'typeExport') {
-			const fileName = '库存盘点' + moment().format('YYYYMMDDHHmmss')
-			downloadExcel(res, fileName)
+            downloadExcel(res, '库存盘点')
           } else {
             this.print(res, objs.type)
           }
@@ -425,7 +426,7 @@ export default {
         window.frames['printficm'].focus()
         window.frames['printficm'].print()
       }
-    },
+    }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用

+ 9 - 6
src/views/inventoryManagement/inventoryChecking/overall.vue

@@ -108,13 +108,16 @@ export default {
         this.disabled = true
         this.spinning = true
         return checkWarehouseDetailList(Object.assign(parameter, this.queryParam, { checkWarehouseSn: 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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.getProduceTotal()
+            this.disabled = false
           }
-          this.getProduceTotal()
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 10 - 9
src/views/inventoryManagement/inventoryImport/list.vue

@@ -72,7 +72,6 @@
 <script>
 import { STable, Upload } from '@/components'
 import { stockImportList, stockImportFinish, stockImportCancel, stockImportKCExportError } from '@/api/stockImport'
-import moment from 'moment'
 import { downloadExcel } from '@/libs/JGPrint.js'
 export default {
   components: { STable, Upload },
@@ -97,13 +96,16 @@ export default {
       loadData: parameter => {
         this.spinning = true
         return stockImportList(Object.assign(parameter, { stockImportSn: this.uploadData && this.uploadData.stockImportSn })).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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            const ret = data.list.filter(item => item.isError == 1)
+            this.isAllError = ret.length == data.count
           }
-          const ret = data.list.filter(item => item.isError == 1)
-          this.isAllError = ret.length == data.count
           this.spinning = false
           return data
         })
@@ -192,8 +194,7 @@ export default {
           })
           reader.readAsText(res)
         } else {
-          const fileName = '库存导入错误项' + moment().format('YYYYMMDDHHmmss')
-          downloadExcel(res, fileName)
+          downloadExcel(res, '库存导入错误项')
         }
       })
     },

+ 36 - 28
src/views/inventoryManagement/inventoryQuery/detailModal.vue

@@ -8,28 +8,30 @@
     v-model="isShow"
     @cancle="isShow=false"
     :width="960">
-    <!-- 合计 -->
-    <a-alert type="info" style="margin-bottom:10px">
-      <div class="ftext" slot="message">
-        可用库存总数量(个):<strong>{{ currentStock&&(currentStock.currentStockQty || currentStock.currentStockQty==0) ? currentStock.currentStockQty : '--' }}</strong>;
-        可用库存总成本(¥):<strong>{{ currentStock&&(currentStock.currentStockCost || currentStock.currentStockCost==0) ? currentStock.currentStockCost : '--' }}</strong>。
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 合计 -->
+      <a-alert type="info" style="margin-bottom:10px">
+        <div class="ftext" slot="message">
+          可用库存总数量(个):<strong>{{ currentStock&&(currentStock.currentStockQty || currentStock.currentStockQty==0) ? currentStock.currentStockQty : '--' }}</strong>;
+          可用库存总成本(¥):<strong>{{ currentStock&&(currentStock.currentStockCost || currentStock.currentStockCost==0) ? currentStock.currentStockCost : '--' }}</strong>。
+        </div>
+      </a-alert>
+      <!-- 库存详情 -->
+      <s-table
+        v-if="openModal"
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: 500 }"
+        bordered>
+      </s-table>
+      <div class="btn-cont">
+        <a-button id="inventoryQueryDetail-detail-modal-back" @click="isShow = false">返回列表</a-button>
       </div>
-    </a-alert>
-    <!-- 库存详情 -->
-    <s-table
-      v-if="openModal"
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ y: 500 }"
-      bordered>
-    </s-table>
-    <div class="btn-cont">
-      <a-button id="inventoryQueryDetail-detail-modal-back" @click="isShow = false">返回列表</a-button>
-    </div>
+    </a-spin>
   </a-modal>
 </template>
 
@@ -58,6 +60,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       // 表头
       columns: [
@@ -75,15 +78,20 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return stockDetailList(Object.assign(parameter, { stockSn: this.nowData && this.nowData.stockSn || '', isSellOut: '0' })).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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+            // 总计
+            this.getTotal(Object.assign(parameter, { stockSn: this.nowData && this.nowData.stockSn || '', isSellOut: '0' }))
           }
-          this.disabled = false
-          // 总计
-          this.getTotal(Object.assign(parameter, { stockSn: this.nowData && this.nowData.stockSn || '', isSellOut: '0' }))
+          this.spinning = false
           return data
         })
       },

+ 19 - 18
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -123,7 +123,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { stockList, stockCount, stockExport } from '@/api/stock'
 import { dealerProductTypeList } from '@/api/dealerProductType'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
@@ -187,23 +186,26 @@ export default {
           params.zeroQtyFlag = ''
         }
         return stockList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+            // 总计
+            this.getTotal(params)
+            // 产品分类
+            if (this.typeData.length == 0) {
+              this.getProductType()
+            }
+            // 产品品牌
+            if (this.brandData.length == 0) {
+              this.getProductBrand()
+            }
           }
-          this.disabled = false
           this.spinning = false
-          // 总计
-          this.getTotal(params)
-          // 产品分类
-          if (this.typeData.length == 0) {
-            this.getProductType()
-          }
-          // 产品品牌
-          if (this.brandData.length == 0) {
-            this.getProductBrand()
-          }
           return data
         })
       },
@@ -277,8 +279,7 @@ export default {
           })
           reader.readAsText(res)
         } else {
-		  const fileName = '库存查询' + moment().format('YYYYMMDDHHmmss')
-		  downloadExcel(res, fileName)
+		  downloadExcel(res, '库存查询')
         }
       })
     },

+ 102 - 94
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -1,96 +1,98 @@
 <template>
   <div class="inventoryQueryWarehouseDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="inventoryQueryWarehouseDetail-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="inventoryQueryWarehouseDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-    </a-page-header>
-    <a-card size="small" :bordered="false" class="inventoryQueryWarehouseDetail-cont">
-      <!-- 搜索条件 -->
-      <div ref="tableSearch" class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
-              <a-form-item label="变动类型">
-                <v-select
-                  v-model="queryParam.flowType"
-                  ref="flowType"
-                  id="warehousingAuditList-flowType"
-                  code="STOCK_FLOW_TYPE"
-                  placeholder="请选择变动类型"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="单据类型">
-                <v-select
-                  v-model="queryParam.bizType"
-                  ref="bizType"
-                  id="inventoryQueryWarehouseDetail-bizType"
-                  code="STOCK_FLOW_BIZ_TYPE"
-                  placeholder="请选择单据类型"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="仓库">
-                <a-select id="inventoryQueryWarehouseDetail-warehouseSn" placeholder="请选择仓库" allowClear 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 v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="inventoryQueryWarehouseDetail-back">
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="inventoryQueryWarehouseDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        </template>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="inventoryQueryWarehouseDetail-cont">
+        <!-- 搜索条件 -->
+        <div ref="tableSearch" class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="变动类型">
+                  <v-select
+                    v-model="queryParam.flowType"
+                    ref="flowType"
+                    id="warehousingAuditList-flowType"
+                    code="STOCK_FLOW_TYPE"
+                    placeholder="请选择变动类型"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="单据审核时间">
-                  <rangeDate ref="rangeDate" @change="dateChange" />
+                <a-form-item label="单据类型">
+                  <v-select
+                    v-model="queryParam.bizType"
+                    ref="bizType"
+                    id="inventoryQueryWarehouseDetail-bizType"
+                    code="STOCK_FLOW_BIZ_TYPE"
+                    placeholder="请选择单据类型"
+                    allowClear></v-select>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="单位名称">
-                  <a-input id="inventoryQueryWarehouseDetail-unitName" v-model.trim="queryParam.unitName" allowClear placeholder="请输入单位名称"/>
+                <a-form-item label="仓库">
+                  <a-select id="inventoryQueryWarehouseDetail-warehouseSn" placeholder="请选择仓库" allowClear 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">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryWarehouseDetail-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryWarehouseDetail-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-alert type="info" style="margin-bottom:10px">
-        <div class="ftext" slot="message">
-          当前库存总数量(个):<strong>{{ (productTotal&&(productTotal.currentStockQty || productTotal.currentStockQty==0)) ? productTotal.currentStockQty : '--' }}</strong>;
-          当前库存总成本(¥):<strong>{{ (productTotal&&(productTotal.currentStockCost || productTotal.currentStockCost==0)) ? productTotal.currentStockCost : '--' }}</strong>。
+              <template v-if="advanced">
+                <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-input id="inventoryQueryWarehouseDetail-unitName" v-model.trim="queryParam.unitName" allowClear placeholder="请输入单位名称"/>
+                  </a-form-item>
+                </a-col>
+              </template>
+              <a-col :md="6" :sm="24">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryWarehouseDetail-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryWarehouseDetail-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-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable fixPagination"
-        ref="table"
-        :style="{ height: tableHeight+84.5+'px' }"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ y: tableHeight }"
-        :defaultLoadData="false"
-        bordered>
-        <!-- 数量 -->
-        <template slot="qty" slot-scope="text, record">
-          <p :class="record.flowType=='PUT' ? 'green':'red'" style="margin: 0;">
-            <span v-if="record.qty!=0">{{ record.flowType=='PUT' ? '+':'-' }}</span>
-            {{ record.qty }}
-          </p>
-        </template>
-      </s-table>
-    </a-card>
+        <!-- 合计 -->
+        <a-alert type="info" style="margin-bottom:10px">
+          <div class="ftext" slot="message">
+            当前库存总数量(个):<strong>{{ (productTotal&&(productTotal.currentStockQty || productTotal.currentStockQty==0)) ? productTotal.currentStockQty : '--' }}</strong>;
+            当前库存总成本(¥):<strong>{{ (productTotal&&(productTotal.currentStockCost || productTotal.currentStockCost==0)) ? productTotal.currentStockCost : '--' }}</strong>。
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 数量 -->
+          <template slot="qty" slot-scope="text, record">
+            <p :class="record.flowType=='PUT' ? 'green':'red'" style="margin: 0;">
+              <span v-if="record.qty!=0">{{ record.flowType=='PUT' ? '+':'-' }}</span>
+              {{ record.qty }}
+            </p>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
   </div>
 </template>
 
@@ -104,6 +106,7 @@ export default {
   components: { STable, VSelect, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -133,20 +136,25 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         const params = Object.assign(parameter, this.queryParam, { productSn: this.$route.params.sn })
         return stockFlowList(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
-            if (data.list[i].flowType == 'PUT') {
-              data.list[i].qty = data.list[i].putQty
-            } else if (data.list[i].flowType == 'OUT') {
-              data.list[i].qty = data.list[i].outQty
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              if (data.list[i].flowType == 'PUT') {
+                data.list[i].qty = data.list[i].putQty
+              } else if (data.list[i].flowType == 'OUT') {
+                data.list[i].qty = data.list[i].outQty
+              }
             }
+            this.disabled = false
+            this.getTotal(params)
           }
-          this.disabled = false
-          this.getTotal(params)
+          this.spinning = false
           return data
         })
       },

+ 15 - 14
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -177,7 +177,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import { stockWarnList, stockWarnSaveBatch } from '@/api/stockWarn'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
@@ -226,20 +225,23 @@ export default {
         this.disabled = true
         this.spinning = true
         return stockWarnList(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
-            if (this.selectedRowKeys) { //  处理切换页码后 上页已选已输数据保留
-              const ind = this.selectedRowKeys.indexOf(data.list[i].id)
-              if (ind >= 0) {
-                data.list[i].inTransit = this.selectedRows[ind].inTransit
-                data.list[i].upperLimit = this.selectedRows[ind].upperLimit
-                data.list[i].lowerLimit = this.selectedRows[ind].lowerLimit
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              if (this.selectedRowKeys) { //  处理切换页码后 上页已选已输数据保留
+                const ind = this.selectedRowKeys.indexOf(data.list[i].id)
+                if (ind >= 0) {
+                  data.list[i].inTransit = this.selectedRows[ind].inTransit
+                  data.list[i].upperLimit = this.selectedRows[ind].upperLimit
+                  data.list[i].lowerLimit = this.selectedRows[ind].lowerLimit
+                }
               }
             }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })
@@ -409,8 +411,7 @@ export default {
       this.exportLoading = true
       // customerBundleExportDelay(params).then(res => {
       //   this.exportLoading = false
-	  // const fileName = '库存预警' + moment().format('YYYYMMDDHHmmss')
-	  // downloadExcel(res, fileName)
+	  // downloadExcel(res, '库存预警')
       // })
     },
     pageInit () {

+ 9 - 4
src/views/inventoryManagement/satelliteWarehouseInventory/addModal.vue

@@ -94,12 +94,17 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
+        this.spinning = true
         return satelliteWHSupplyList(Object.assign(parameter, { customerSn: this.nowData.customerSn })).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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
           }
+          this.spinning = false
           return data
         })
       },

+ 8 - 5
src/views/inventoryManagement/satelliteWarehouseInventory/list.vue

@@ -105,12 +105,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return satelliteWHStockList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 8 - 5
src/views/inventoryManagement/warehouse/list.vue

@@ -91,12 +91,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return warehouseList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 8 - 5
src/views/inventoryManagement/warehouse/storingLocation/list.vue

@@ -94,12 +94,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return warehouseLocList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 9 - 6
src/views/outboundOrderManagement/outboundOrder/list.vue

@@ -166,12 +166,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return stockOutList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })
@@ -373,7 +376,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 205
+      this.tableHeight = window.innerHeight - tableSearchH - 245
     }
   },
   watch: {

+ 10 - 6
src/views/power/role/roleList.vue

@@ -121,14 +121,18 @@ export default {
       loadData: parameter => {
         this.spinning = true
         return getPowerRoleList(Object.assign(parameter, this.queryParam)).then(res => {
-          const no = (res.data.pageNo - 1) * res.data.pageSize
-          for (let i = 0; i < res.data.list.length; i++) {
-            const _item = res.data.list[i]
-            _item.no = no + i + 1
-            _item.isEnable = _item.isEnable + '' === '1'
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (let i = 0; i < data.list.length; i++) {
+              const _item = data.list[i]
+              _item.no = no + i + 1
+              _item.isEnable = _item.isEnable + '' === '1'
+            }
           }
           this.spinning = false
-          return res.data
+          return data
         })
       },
       optionAlertShow: false

+ 10 - 6
src/views/power/user/userList.vue

@@ -112,14 +112,18 @@ export default {
       loadData: parameter => {
         this.spinning = true
         return getPowerUserList(Object.assign(parameter, this.queryParam)).then(res => {
-          const no = (res.data.pageNo - 1) * res.data.pageSize
-          for (let i = 0; i < res.data.list.length; i++) {
-            const _item = res.data.list[i]
-            _item.no = no + i + 1
-            _item.loginFlag = _item.loginFlag + '' === '1'
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (let i = 0; i < data.list.length; i++) {
+              const _item = data.list[i]
+              _item.no = no + i + 1
+              _item.loginFlag = _item.loginFlag + '' === '1'
+            }
           }
           this.spinning = false
-          return res.data
+          return data
         })
       },
       optionAlertShow: false,

+ 8 - 5
src/views/productManagement/newProduct/list.vue

@@ -150,12 +150,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return queryNewProductPage(Object.assign(parameter, this.queryParam, { onlineFalg: this.$route.params.onlineFalg })).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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 7 - 4
src/views/productManagement/newProduct/modal.vue

@@ -41,10 +41,13 @@ export default {
       loadData: parameter => {
         this.spinning = true
         return queryNewProductPage(Object.assign(parameter, this.queryParam, { onlineFalg: this.onlineFalg })).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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
           }
           this.spinning = false
           return data

+ 10 - 8
src/views/productManagement/priceChangeRecord/list.vue

@@ -150,13 +150,16 @@ export default {
         this.disabled = true
         this.spinning = true
         return productPriceChangeList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.total = data.count || 0
+            this.disabled = false
           }
-          this.total = data.count || 0
-          this.disabled = false
           this.spinning = false
           return data
         })
@@ -283,8 +286,7 @@ export default {
       this.exportLoading = true
       // customerBundleExportDelay(params).then(res => {
       //   this.exportLoading = false
-      // const fileName = '价格变更记录' + moment().format('YYYYMMDDHHmmss')
-      // downloadExcel(res, fileName)
+      // downloadExcel(res, '价格变更记录')
       // })
     },
     //  产品品牌  列表

+ 8 - 5
src/views/productManagement/productBrand/list.vue

@@ -95,12 +95,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return dealerProductBrandList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 11 - 7
src/views/productManagement/productCategory/list.vue

@@ -79,14 +79,18 @@ export default {
           this.tableHeight = window.innerHeight - 190
         }
         return dealerProductTypeList({}).then(res => {
-          //  递归去除空children
-          this.recursionFun(res.data)
-          if (res.data.length > 0) {
-            this.defaultExpandedRowKeys[0] = res.data[0].id
-          } else {
-            this.defaultExpandedRowKeys = []
+          let data
+          if (res.status == 200) {
+            data = res.data
+            //  递归去除空children
+            this.recursionFun(data)
+            if (data.length > 0) {
+              this.defaultExpandedRowKeys[0] = data[0].id
+            } else {
+              this.defaultExpandedRowKeys = []
+            }
           }
-          return res.data
+          return data
         })
       },
       defaultExpandedRowKeys: [], //  树形数据默认展开项

+ 13 - 12
src/views/productManagement/productInfo/list.vue

@@ -132,7 +132,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { dealerProductTypeList } from '@/api/dealerProductType'
 import { dealerProductList, dealerProductUpdate, dealerProductExport } from '@/api/dealerProduct'
@@ -180,16 +179,19 @@ export default {
         this.disabled = true
         this.spinning = true
         return dealerProductList(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
-            const productTypeName1 = data.list[i].productTypeName1 ? data.list[i].productTypeName1 : ''
-            const productTypeName2 = data.list[i].productTypeName2 ? ' > ' + data.list[i].productTypeName2 : ''
-            const productTypeName3 = data.list[i].productTypeName3 ? ' > ' + data.list[i].productTypeName3 : ''
-            data.list[i].productTypeName = productTypeName1 + productTypeName2 + productTypeName3
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              const productTypeName1 = data.list[i].productTypeName1 ? data.list[i].productTypeName1 : ''
+              const productTypeName2 = data.list[i].productTypeName2 ? ' > ' + data.list[i].productTypeName2 : ''
+              const productTypeName3 = data.list[i].productTypeName3 ? ' > ' + data.list[i].productTypeName3 : ''
+              data.list[i].productTypeName = productTypeName1 + productTypeName2 + productTypeName3
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })
@@ -287,8 +289,7 @@ export default {
       dealerProductExport(this.queryParam).then(res => {
         this.exportLoading = false
         this.spinning = false
-		const fileName = '自建产品列表' + moment().format('YYYYMMDDHHmmss')
-		downloadExcel(res, fileName)
+        downloadExcel(res, '自建产品列表')
       })
     },
     //  产品品牌  列表

+ 9 - 8
src/views/productManagement/productInfoJg/list.vue

@@ -110,7 +110,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { productTypeQuery } from '@/api/productType'
 import { productList, getCurrentDealer } from '@/api/product'
@@ -144,12 +143,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return productList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })
@@ -242,8 +244,7 @@ export default {
       this.exportLoading = true
       // dealerProductExport(this.queryParam).then(res => {
       //   this.exportLoading = false
-	  // const fileName = '箭冠产品列表' + moment().format('YYYYMMDDHHmmss')
-	  // downloadExcel(res, fileName)
+	  // downloadExcel(res, '箭冠产品列表')
       // })
     },
     //  产品品牌  列表

+ 9 - 8
src/views/productManagement/productOnlineInfo/list.vue

@@ -106,7 +106,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
@@ -154,12 +153,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return productList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })
@@ -210,8 +212,7 @@ export default {
       _this.exportLoading = true
       _this.spinning = true
       productExport(params).then(res => {
-        const fileName = '产品上线信息' + moment().format('YYYYMMDDHHmmss')
-        downloadExcel(res, fileName)
+        downloadExcel(res, '产品上线信息')
         _this.exportLoading = false
         _this.spinning = false
       })

+ 29 - 22
src/views/purchasingManagement/purchaseOrder/detail.vue

@@ -8,13 +8,14 @@
           <span class="billno">单号:{{ detail&&detail.purchaseBillNo }}</span>
           <a-tag color="blue">{{ detail&&detail.billStatusDictValue }}</a-tag>
           <a-tag color="orange">{{ detail&&detail.financialStatusDictValue }}</a-tag>
+          <span class="billno" v-if="detail&&detail.purchaseBillNoSource" style="font-size: 14px;margin: 0;">(原:{{ detail&&detail.purchaseBillNoSource }})</span>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra">
           <Print v-if="$hasPermissions('B_purchasePrint')" :disabled="localDataSource.length==0" @handlePrint="handlePrint"></Print>
           <a-button
             key="1"
-            v-if="$hasPermissions('B_purchaseExportProduct') && (detail&&(detail.billStatus=='WAIT_PUT_WAREHOUSE' || detail.billStatus=='WAIT_PUT_WAREHOUSE_AUDIT' || detail.billStatus=='FINISH'))"
+            v-if="$hasPermissions('B_purchaseExportProduct') && (detail&&(detail.billStatus=='AUDIT_PASS' || detail.billStatus=='CANCEL' || detail.billStatus=='WAIT_PUT_WAREHOUSE' || detail.billStatus=='WAIT_PUT_WAREHOUSE_AUDIT' || detail.billStatus=='FINISH'))"
             type="primary"
             class="button-info"
             id="purchaseOrderDetail-export-btn"
@@ -40,6 +41,7 @@
                 </div>
                 <span v-else>--</span>
               </a-descriptions-item>
+              <a-descriptions-item label="备注">{{ (detail&&detail.remarks) || '--' }}</a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
         </a-collapse>
@@ -53,11 +55,11 @@
               <div slot="message">
                 产品款数:<strong>{{ detail && (detail.totalCategory || detail.totalCategory==0) ? detail.totalCategory : '--' }}</strong>,
                 采购数量合计:<strong>{{ detail && (detail.totalQty || detail.totalQty==0) ? detail.totalQty : '--' }}</strong>,
-                审核订单数量:<strong>{{ detail && (detail.totalAuthQty || detail.totalAuthQty==0) ? detail.totalAuthQty : '--' }}</strong>,
-                缺货数量:<strong>{{ detail && (detail.totalCancelQty || detail.totalCancelQty==0) ? detail.totalCancelQty : '--' }}</strong>,
+                审核订单数量:<strong>{{ detail && (detail.totalPushedQty || detail.totalPushedQty==0) ? detail.totalPushedQty : '--' }}</strong>,
+                已取消数量:<strong>{{ detail && (detail.totalCancelQty || detail.totalCancelQty==0) ? detail.totalCancelQty : '--' }}</strong>,
                 采购金额合计:<strong>{{ detail && (detail.discountedAmount || detail.discountedAmount==0) ? '¥'+detail.discountedAmount : '--' }}</strong>,
-                审核订单金额:<strong>{{ detail && (detail.totalAuthAmount || detail.totalAuthAmount==0) ? '¥'+detail.totalAuthAmount : '--' }}</strong>,
-                缺货金额:<strong>{{ detail && (detail.totalCancelAmount || detail.totalCancelAmount==0) ? '¥'+detail.totalCancelAmount : '--' }}</strong>
+                审核订单金额:<strong>{{ detail && (detail.totalPushedAmount || detail.totalPushedAmount==0) ? '¥'+detail.totalPushedAmount : '--' }}</strong>,
+                已取消金额:<strong>{{ detail && (detail.totalCancelAmount || detail.totalCancelAmount==0) ? '¥'+detail.totalCancelAmount : '--' }}</strong>
               </div>
             </a-alert>
             <!-- 列表 -->
@@ -75,7 +77,7 @@
                 <div>{{ text }}</div>
                 <div v-if="record.origqty">原采购数量:{{ record.origqty }}</div>
               </template>
-              <!-- 缺货数量 -->
+              <!-- 已取消数量 -->
               <template slot="outOfStockNum" slot-scope="text, record">
                 <span>{{ record.outOfStockNum }}</span>
               </template>
@@ -108,7 +110,7 @@
                 <div>{{ text }}</div>
                 <div v-if="record.origqty">原采购数量:{{ record.origqty }}</div>
               </template>
-              <!-- 缺货数量 -->
+              <!-- 已取消数量 -->
               <template slot="outOfStockNum" slot-scope="text, record">
                 <span>{{ record.outOfStockNum }}</span>
               </template>
@@ -138,7 +140,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import { purchaseDetailBySn, purchaseDetailPrint, purchaseDetailExport, purchaseExportDetail } from '@/api/purchase'
 import { purchaseDetailList } from '@/api/purchaseDetail'
@@ -159,21 +160,24 @@ export default {
         { title: '采购单价', dataIndex: 'discountedPrice', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购金额', dataIndex: 'discountedAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购数量', dataIndex: 'qty', width: '7%', align: 'center', scopedSlots: { customRender: 'origqty' } },
-        { title: '审核订单金额', dataIndex: 'authAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核订单数量', dataIndex: 'authQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '缺货数量', dataIndex: 'cancelQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '审核订单金额', dataIndex: 'pushedAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核订单数量', dataIndex: 'pushedQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '已取消数量', dataIndex: 'cancelQty', width: '7%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        return purchaseDetailList(Object.assign(parameter, { purchaseBillSn: 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
+        return purchaseDetailList(Object.assign(parameter, { purchaseBillSn: this.$route.params.sn, orderBy: 'product_type.FIRST_CHAR,dealer_product.CODE' })).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.localDataSource = data.list
+            this.disabled = false
           }
-          this.localDataSource = data.list
-          this.disabled = false
           return data
         })
       },
@@ -185,7 +189,11 @@ export default {
   methods: {
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/purchasingManagement/purchaseOrder/list', query: { closeLastOldTab: true } })
+      if (this.$route.query.pageType) {
+        this.$router.push({ name: this.$route.query.pageType })
+      } else {
+        this.$router.push({ name: 'purchaseOrderList' })
+      }
     },
     //  详情
     getDetail () {
@@ -229,11 +237,10 @@ export default {
           })
           reader.readAsText(res)
         } else {
-			const fileName = '采购产品' + moment().format('YYYYMMDDHHmmss')
-			downloadExcel(res, fileName)
+          downloadExcel(res, '采购产品')
         }
       })
-    },
+    }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用

+ 26 - 18
src/views/purchasingManagement/purchaseOrder/list.vue

@@ -32,13 +32,18 @@
             </a-col>
             <a-col :md="6" :sm="24" v-show="advanced">
               <a-form-item label="业务状态">
-                <v-select
+                <!-- <v-select
                   v-model="queryParam.billStatus"
                   ref="billStatus"
                   id="purchaseOrderList-billStatus"
                   code="PURCHASE_BILL_STATUS"
                   placeholder="请选择业务状态"
-                  allowClear></v-select>
+                  allowClear></v-select> -->
+                <a-select id="purchaseOrderList-billStatus" allowClear v-model="queryParam.billStatus" placeholder="请选择业务状态">
+                  <a-select-option value="">全部</a-select-option>
+                  <a-select-option value="WAIT_SUBMIT">待提交</a-select-option>
+                  <a-select-option value="SUBMIT">已提交</a-select-option>
+                </a-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24" v-show="advanced">
@@ -106,9 +111,9 @@
           <span v-else>{{ record.purchaseBillNo }}</span>
         </template>
         <!-- 财务状态 -->
-        <template slot="financialStatus" slot-scope="text, record">
+        <!-- <template slot="financialStatus" slot-scope="text, record">
           <span>{{ record.billStatus=='FINISH'&&record.financialStatusDictValue ? record.financialStatusDictValue : '--' }}</span>
-        </template>
+        </template> -->
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
@@ -118,13 +123,13 @@
             v-if="(record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') && $hasPermissions('B_purchaseEdit')"
             @click="handleEdit(record)"
           >编辑</a-button>
-          <a-button
+          <!-- <a-button
             size="small"
             type="link"
             class="button-warning"
             v-if="record.billStatus == 'WAIT_PUT_WAREHOUSE'&&$hasPermissions('B_purchaseReceiving')"
             @click="handleWarehouse(record)"
-          >签收入库</a-button>
+          >签收入库</a-button> -->
           <a-button
             size="small"
             type="link"
@@ -132,7 +137,7 @@
             v-if="(record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') &&$hasPermissions('B_purchaseDel')"
             @click="handleDel(record)"
           >删除</a-button>
-          <span v-if="record.billStatus != 'WAIT_SUBMIT'&&record.billStatus != 'AUDIT_REJECT'&&record.billStatus != 'WAIT_PUT_WAREHOUSE'">--</span>
+          <span v-if="!((record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') && $hasPermissions('B_purchaseEdit')) && !((record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') &&$hasPermissions('B_purchaseDel'))">--</span>
         </template>
       </s-table>
     </a-spin>
@@ -183,15 +188,15 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '采购单号', scopedSlots: { customRender: 'purchaseBillNo' }, width: '14%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '供应商', dataIndex: 'purchaseTargetName', width: '14%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '供应商', dataIndex: 'purchaseTargetName', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品款数', dataIndex: 'totalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购金额', dataIndex: 'discountedAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核数量', dataIndex: 'totalAuthQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核金额', dataIndex: 'totalAuthAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '缺货数量', dataIndex: 'totalCancelQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务状态', dataIndex: 'financialStatusDictValue', scopedSlots: { customRender: 'financialStatus' }, width: '6%', align: 'center' },
+        { title: '审核数量', dataIndex: 'totalPushedQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核金额', dataIndex: 'totalPushedAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '已取消数量', dataIndex: 'totalCancelQty', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -201,12 +206,15 @@ export default {
         // 获取统计数据
         this.getTotalData(Object.assign(parameter, this.queryParam))
         return purchaseList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 7 - 2
src/views/purchasingManagement/purchaseOrder/outStockModal.vue

@@ -88,9 +88,14 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return purchaseDetailCancelList(parameter).then(res => {
-          const data = res.data
-          this.disabled = false
+          let data
+          if (res.status == 200) {
+            data = res.data
+            this.disabled = false
+          }
+          this.spinning = false
           return data
         })
       },

+ 15 - 10
src/views/purchasingManagement/purchaseOrder/receivingAddress/chooseAddressModal.vue

@@ -110,18 +110,23 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return shippingAddressQuery(Object.assign(parameter, this.queryParam)).then(res => {
-          const data = res.data
-          const no = 0
-          for (var i = 0; i < data.length; i++) {
-            data[i].no = no + i + 1
-            const provinceName = data[i].provinceName ? (data[i].provinceName + '-') : ''
-            const cityName = data[i].cityName ? (data[i].cityName + '-') : ''
-            const countyName = data[i].countyName ? (data[i].countyName + '-') : ''
-            const addr = data[i].addr || ''
-            data[i].address = provinceName + cityName + countyName + addr
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+              const provinceName = data[i].provinceName ? (data[i].provinceName + '-') : ''
+              const cityName = data[i].cityName ? (data[i].cityName + '-') : ''
+              const countyName = data[i].countyName ? (data[i].countyName + '-') : ''
+              const addr = data[i].addr || ''
+              data[i].address = provinceName + cityName + countyName + addr
+            }
+            this.disabled = false
           }
-          this.disabled = false
+          this.spinning = false
           return data
         })
       },

+ 23 - 20
src/views/purchasingManagement/purchaseOrder/warehousing.vue

@@ -107,30 +107,33 @@ export default {
         this.disabled = true
         this.queryParam.receivingBillSn = parameter.tableId
         return receivingDetail(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
-            data.list[i].shippedQty = data.list[i].putQty
-            const warehouseSn = data.list[i].warehouseSn || undefined
-            const warehouseLocationSn = data.list[i].warehouseLocationSn || undefined
-            if (warehouseSn || warehouseLocationSn) {
-              data.list[i].warehouseSnBackups = warehouseSn
-              data.list[i].warehouseLocationSnBackups = warehouseLocationSn
-              data.list[i].warehouseCascade = [warehouseSn, warehouseLocationSn]
-            } else {
-              //  设置默认仓库
-              if (this.defaultWarehouseCascade.length > 0) {
-                data.list[i].warehouseCascade = this.defaultWarehouseCascade
-                data.list[i].warehouseSn = this.defaultWarehouseCascade[0]
-                data.list[i].warehouseLocationSn = this.defaultWarehouseCascade[1]
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].shippedQty = data.list[i].putQty
+              const warehouseSn = data.list[i].warehouseSn || undefined
+              const warehouseLocationSn = data.list[i].warehouseLocationSn || undefined
+              if (warehouseSn || warehouseLocationSn) {
+                data.list[i].warehouseSnBackups = warehouseSn
+                data.list[i].warehouseLocationSnBackups = warehouseLocationSn
+                data.list[i].warehouseCascade = [warehouseSn, warehouseLocationSn]
               } else {
-                data.list[i].warehouseCascade = undefined
+                //  设置默认仓库
+                if (this.defaultWarehouseCascade.length > 0) {
+                  data.list[i].warehouseCascade = this.defaultWarehouseCascade
+                  data.list[i].warehouseSn = this.defaultWarehouseCascade[0]
+                  data.list[i].warehouseLocationSn = this.defaultWarehouseCascade[1]
+                } else {
+                  data.list[i].warehouseCascade = undefined
+                }
               }
             }
+            this.disabled = false
+            this.chooseLoadData[parameter.index] = data.list
           }
-          this.disabled = false
-          this.chooseLoadData[parameter.index] = data.list
           return data
         })
       }

+ 64 - 58
src/views/purchasingManagement/purchaseReturn/detail.vue

@@ -1,56 +1,58 @@
 <template>
   <div class="purchaseReturnDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="purchaseReturnDetail-cont" :style="{ padding: !outBizSn ? '16px 24px' : '0px 24px' }" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle" v-if="!outBizSn">
-        <a id="purchaseReturnDetail-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="purchaseReturnDetail-edit-btn"
-          @click.stop="handleEdit">编辑</a-button>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra" v-if="$hasPermissions('B_purchaseReturnPrint')">
-        <Print :disabled="dataSource.length==0" @handlePrint="handlePrint"></Print>
-      </template>
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="purchaseReturnDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <a-descriptions-item label="客户名称">{{ basicInfoData&&basicInfoData.returnTargetName || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="采退单号">{{ basicInfoData&&basicInfoData.purchaseReturnNo || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="创建时间">{{ basicInfoData&&basicInfoData.createDate || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="退货数量">{{ basicInfoData&&(basicInfoData.totalQty || basicInfoData.totalQty==0) ? basicInfoData.totalQty : '--' }}</a-descriptions-item>
-            <a-descriptions-item label="坏件数量">{{ basicInfoData&&(basicInfoData.totalBadQty || basicInfoData.totalBadQty == 0) ? basicInfoData.totalBadQty : '--' }}</a-descriptions-item>
-            <a-descriptions-item label="返库数量">{{ basicInfoData&&(basicInfoData.totalBackStockQty || basicInfoData.totalBackStockQty == 0) ? basicInfoData.totalBackStockQty : '--' }}</a-descriptions-item>
-            <a-descriptions-item label="退货金额">{{ basicInfoData&&(basicInfoData.totalAmount || basicInfoData.totalAmount == 0) ? basicInfoData.totalAmount : '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 产品详情 -->
-    <a-card size="small" :bordered="false" class="purchaseReturnDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="产品详情">
-          <!-- 列表 -->
-          <s-table
-            class="sTable"
-            ref="table"
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="purchaseReturnDetail-cont" :style="{ padding: !outBizSn ? '16px 24px' : '0px 24px' }" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle" v-if="!outBizSn">
+          <a id="purchaseReturnDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <a-button
+            v-if="isEdit"
+            type="primary"
             size="small"
-            :rowKey="(record) => record.id"
-            :columns="columns"
-            :data="loadData"
-            :defaultLoadData="false"
-            bordered>
-          </s-table>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
+            style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+            id="purchaseReturnDetail-edit-btn"
+            @click.stop="handleEdit">编辑</a-button>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra" v-if="$hasPermissions('B_purchaseReturnPrint')">
+          <Print :disabled="dataSource.length==0" @handlePrint="handlePrint"></Print>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="purchaseReturnDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="3">
+              <a-descriptions-item label="客户名称">{{ basicInfoData&&basicInfoData.returnTargetName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="采退单号">{{ basicInfoData&&basicInfoData.purchaseReturnNo || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="创建时间">{{ basicInfoData&&basicInfoData.createDate || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="退货数量">{{ basicInfoData&&(basicInfoData.totalQty || basicInfoData.totalQty==0) ? basicInfoData.totalQty : '--' }}</a-descriptions-item>
+              <a-descriptions-item label="坏件数量">{{ basicInfoData&&(basicInfoData.totalBadQty || basicInfoData.totalBadQty == 0) ? basicInfoData.totalBadQty : '--' }}</a-descriptions-item>
+              <a-descriptions-item label="返库数量">{{ basicInfoData&&(basicInfoData.totalBackStockQty || basicInfoData.totalBackStockQty == 0) ? basicInfoData.totalBackStockQty : '--' }}</a-descriptions-item>
+              <a-descriptions-item label="退货金额">{{ basicInfoData&&(basicInfoData.totalAmount || basicInfoData.totalAmount == 0) ? basicInfoData.totalAmount : '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <!-- 产品详情 -->
+      <a-card size="small" :bordered="false" class="purchaseReturnDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="产品详情">
+            <!-- 列表 -->
+            <s-table
+              class="sTable"
+              ref="table"
+              size="small"
+              :rowKey="(record) => record.id"
+              :columns="columns"
+              :data="loadData"
+              :defaultLoadData="false"
+              bordered>
+            </s-table>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+    </a-spin>
   </div>
 </template>
 
@@ -70,6 +72,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -89,15 +92,18 @@ export default {
       loadData: parameter => {
         this.disabled = true
         return purchaseReturnDetailList(Object.assign(parameter, { purchaseReturnSn: this.outBizSn || 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].purchaseReturnAmount = getOperationalPrecision(data.list[i].cost, data.list[i].qty)
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              // 采购金额  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+              data.list[i].purchaseReturnAmount = getOperationalPrecision(data.list[i].cost, data.list[i].qty)
+            }
+            this.disabled = false
+            this.dataSource = data.list
           }
-          this.disabled = false
-          this.dataSource = data.list
           return data
         })
       },

+ 7 - 1
src/views/purchasingManagement/purchaseReturn/edit.vue

@@ -77,7 +77,13 @@
               </template>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="purchaseReturnEdit-add-btn">添加</a-button>
+                <a-button
+                  size="small"
+                  type="primary"
+                  class="button-primary"
+                  :disabled="record.refundableQty==0"
+                  @click="handleAdd(record)"
+                  id="purchaseReturnEdit-add-btn">添加</a-button>
               </template>
             </s-table>
           </a-collapse-panel>

+ 8 - 5
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -151,12 +151,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return purchaseReturnList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 325 - 0
src/views/purchasingManagement/signWarehousing/edit.vue

@@ -0,0 +1,325 @@
+<template>
+  <div class="purchaseOrderWarehousing-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" @back="handleBack" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="purchaseOrderWarehousing-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span class="billno">
+            单号:{{ (detail&&detail[0]&&detail[0].purchaseBillNo) ? detail[0].purchaseBillNo : '--' }}
+            <span v-if="detail&&detail[0]&&detail[0].sendBillNo">(发货单号:{{ detail&&detail[0]&&detail[0].sendBillNo || '--' }})</span>
+          </span>
+        </template>
+      </a-page-header>
+      <!-- 内容 -->
+      <a-card size="small" v-for="(item,bindex) in detail" :key="item.id" :bordered="false" class="purchaseOrderWarehousing-cont">
+        <!-- 总计 -->
+        <a-alert type="info" style="margin-bottom:10px">
+          <div slot="message" >
+            <div>产品款数 <strong>{{ item.totalPutCategory }}</strong> ,本次发货数量合计 <strong>{{ item.totalPutQty }}</strong> ,本次发货金额合计¥<strong>{{ item.totalPutAmount }}</strong></div>
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          :ref="'table-'+bindex"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :tableId="item.receivingBillSn"
+          :index="bindex"
+          bordered>
+          <!-- 采购数量 -->
+          <template slot="origqty" slot-scope="text, record, index">
+            <div>{{ text }}</div>
+            <div v-if="record.origqty">原采购数量:{{ record.origqty }}</div>
+          </template>
+          <!-- 仓库仓位 -->
+          <template slot="warehousePosition" slot-scope="text, record, index">
+            <a-cascader
+              size="small"
+              @change="e => changeWarehouseCascade(e, record, index, bindex)"
+              v-model="record.warehouseCascade"
+              :disabled="!(item.auditState=='WAIT_PUT_WAREHOUSE' || item.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT')"
+              expand-trigger="hover"
+              :options="warehouseCascadeData"
+              :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+              id="purchaseOrderWarehousing-warehouseCascade"
+              placeholder="请选择仓库仓位"
+              :allowClear="false"
+              style="width: 100%;" />
+          </template>
+        </s-table>
+        <div style="text-align: center;">
+          <a-button
+            type="primary"
+            class="button-warning"
+            :id="'purchaseOrderWarehousing-warehousing-'+bindex"
+            @click="handleWarehousing(item,bindex)"
+            v-if="item.auditState=='WAIT_PUT_WAREHOUSE' || item.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT'"
+          >确认入库</a-button>
+        </div>
+      </a-card>
+    </a-spin>
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { purchaseWriteStockIn, receivingQuery, receivingDetail } from '@/api/purchase'
+import { purchaseUpdateWarehouse } from '@/api/purchaseDetail'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
+import { warehouseCascadeList } from '@/api/warehouse'
+export default {
+  components: { STable, VSelect, ProductType, ProductBrand },
+  data () {
+    return {
+      spinning: false,
+      detail: null, //  详情数据
+      productType: [],
+      queryParam: {
+        productBrandSn: undefined,
+        queryWord: '',
+        brand: '',
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      warehouseCascadeData: [], //  仓库仓位
+      defaultWarehouseCascade: [], //  默认仓库仓位
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购单价', dataIndex: 'discountedPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '采购数量', dataIndex: 'qty', width: '6%', align: 'center', scopedSlots: { customRender: 'origqty' } },
+        { title: '本次发货数量', dataIndex: 'shippedQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '本次发货金额', dataIndex: 'discountedAmount', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '本次入库数量', dataIndex: 'putQty', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库仓位', scopedSlots: { customRender: 'warehousePosition' }, width: '13%', align: 'center' }
+      ],
+      chooseLoadData: [],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.queryParam.receivingBillSn = parameter.tableId
+        return receivingDetail(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
+            data.list[i].shippedQty = data.list[i].putQty
+            const warehouseSn = data.list[i].warehouseSn || undefined
+            const warehouseLocationSn = data.list[i].warehouseLocationSn || undefined
+            if (warehouseSn || warehouseLocationSn) {
+              data.list[i].warehouseSnBackups = warehouseSn
+              data.list[i].warehouseLocationSnBackups = warehouseLocationSn
+              data.list[i].warehouseCascade = [warehouseSn, warehouseLocationSn]
+            } else {
+              //  设置默认仓库
+              if (this.defaultWarehouseCascade.length > 0) {
+                data.list[i].warehouseCascade = this.defaultWarehouseCascade
+                data.list[i].warehouseSn = this.defaultWarehouseCascade[0]
+                data.list[i].warehouseLocationSn = this.defaultWarehouseCascade[1]
+              } else {
+                data.list[i].warehouseCascade = undefined
+              }
+            }
+          }
+          this.disabled = false
+          this.chooseLoadData[parameter.index] = data.list
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    //  产品分类  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] : ''
+    },
+    //  重置产品库
+    resetSearchForm () {
+      this.queryParam = {
+        productBrandSn: undefined,
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '', //  产品三级分类
+        queryWord: '',
+        brand: ''
+      }
+      this.productType = []
+      this.$refs.table.refresh(true)
+    },
+    // 判断是否选择了仓库
+    hasChoseWarehousing (data) {
+      return data.find(item => !item.warehouseCascade || item.warehouseCascade.length == 0)
+    },
+    //  确认入库
+    handleWarehousing (row, index) {
+      const list = this.chooseLoadData[index]
+      if (this.hasChoseWarehousing(list)) {
+        this.$message.warning('请选择仓库仓位!')
+        return
+      }
+      this.spinning = true
+      purchaseWriteStockIn({ id: row.id }).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.getDetail()
+          this.spinning = false
+        } else {
+          this.spinning = false
+        }
+      })
+    },
+    //  返回列表
+    handleBack () {
+      this.$router.push({ path: '/purchasingManagement/signWarehousing/list', query: { closeLastOldTab: true } })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    //  详情
+    getDetail () {
+      this.spinning = true
+      receivingQuery({ receivingBillSn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.detail = res.data
+        } else {
+          this.detail = null
+        }
+        this.spinning = false
+      })
+    },
+    //  仓库仓位  级联  列表
+    getWarehouseCascade () {
+      const _this = this
+      warehouseCascadeList({}).then(res => {
+        if (res.status == 200) {
+          res.data.filter(item => {
+            // 过滤默认仓库
+            if (item.defaultFlag == 1 && item.wasteFlag == 0) { //  defaultFlag为1,且不是废品仓
+              _this.defaultWarehouseCascade[0] = item.warehouseSn
+              // 过滤默认仓位
+              item.warehouseLocationList.filter(subItem => {
+                if (subItem.defaultFlag == 1 && subItem.wasteFlag == 0) {
+                  _this.defaultWarehouseCascade[1] = subItem.warehouseLocationSn
+                  if (_this.detail && _this.detail.length > 0) {
+                    _this.detail.map((k, i) => {
+                      _this.$refs['table-' + i][0].refresh(true)
+                    })
+                  }
+                }
+              })
+            }
+          })
+          res.data.map(item => {
+            item.sn = item.warehouseSn
+            if (item.warehouseLocationList) {
+              item.warehouseLocationList.map(subItem => {
+                subItem.sn = subItem.warehouseLocationSn
+              })
+            }
+          })
+          this.warehouseCascadeData = res.data
+        } else {
+          this.warehouseCascadeData = []
+        }
+      })
+    },
+    // 修改仓库仓位
+    changeWarehouseCascade (val, opt, ind, bindex) {
+      let loadData = this.chooseLoadData[bindex][ind]
+      if (val.length == 1) {
+        this.$message.warning('当前仓库无仓位,请选择其他仓库')
+        const warehouseSnBackups = loadData.warehouseSnBackups || undefined
+        const warehouseLocationSnBackups = loadData.warehouseLocationSnBackups || undefined
+        loadData.warehouseSn = warehouseSnBackups
+        loadData.warehouseLocationSn = warehouseLocationSnBackups
+        if (warehouseSnBackups || warehouseLocationSnBackups) {
+          loadData.warehouseCascade = [warehouseSnBackups, warehouseLocationSnBackups]
+        } else {
+          loadData.warehouseCascade = undefined
+        }
+      } else {
+        loadData.warehouseSn = val[0] ? val[0] : ''
+        loadData.warehouseLocationSn = val[1] ? val[1] : ''
+        loadData.warehouseSnBackups = val[0] ? val[0] : ''
+        loadData.warehouseLocationSnBackups = val[1] ? val[1] : ''
+        loadData = this.chooseLoadData[bindex][ind]
+        this.updateWarehouse(loadData, bindex)
+      }
+    },
+    // 修改仓库
+    updateWarehouse (row, bindex) {
+      this.spinning = true
+      purchaseUpdateWarehouse({
+        id: row.id,
+        warehouseSn: row.warehouseSn,
+        warehouseLocationSn: row.warehouseLocationSn
+      }).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          console.log(bindex, this.$refs)
+          this.$refs['table-' + bindex][0].refresh()
+          this.spinning = false
+        } else {
+          this.spinning = false
+        }
+      })
+    },
+    pageInit () {
+      this.getDetail()
+      this.getWarehouseCascade()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style lang="less">
+  .purchaseOrderWarehousing-wrap{
+    position: relative;
+    height: 100%;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+    .billno{
+      font-size: 14px;
+      font-weight: bold;
+      margin: 0 15px;
+    }
+    .purchaseOrderWarehousing-cont{
+      margin-top: 10px;
+    }
+  }
+</style>

+ 209 - 0
src/views/purchasingManagement/signWarehousing/list.vue

@@ -0,0 +1,209 @@
+<template>
+  <a-card size="small" :bordered="false" class="signWarehousingList-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="创建时间">
+                <rangeDateTime ref="rangeDate" :value="time" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="采购单号">
+                <a-input id="signWarehousingList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="发货单号">
+                <a-input id="signWarehousingList-sendBillNo" v-model.trim="queryParam.sendBillNo" allowClear placeholder="请输入发货单号"/>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="业务状态">
+                  <v-select
+                    v-model="queryParam.auditState"
+                    ref="auditState"
+                    id="chainTransferOutList-auditState"
+                    code="RECEIVING_BILL_STATUS"
+                    placeholder="请选择业务状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="signWarehousingList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="signWarehousingList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 单号 -->
+        <template slot="purchaseBillNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" v-if="$hasPermissions('B_purchaseDetail')" @click="handleDetail(record)">{{ record.purchaseBillNo || '--' }}</span>
+          <span v-else>{{ record.purchaseBillNo || '--' }}</span>
+        </template>
+        <!-- 单号 -->
+        <template slot="sendBillNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" v-if="$hasPermissions('B_signWarehousingDetail')" @click="handleStockDetail(record)">{{ record.sendBillNo || '--' }}</span>
+          <span v-else>{{ record.sendBillNo || '--' }}</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-warning"
+            v-if="(record.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT' || record.auditState == 'WAIT_PUT_WAREHOUSE')&&$hasPermissions('B_signWarehousingSign')"
+            @click="handleWarehouse(record)"
+          >签收入库</a-button>
+          <span v-if="!((record.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT' || record.auditState == 'WAIT_PUT_WAREHOUSE')&&$hasPermissions('B_signWarehousingSign'))">--</span>
+        </template>
+      </s-table>
+    </a-spin>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import rangeDateTime from '@/views/common/rangeDateTime.vue'
+import getDate from '@/libs/getDate.js'
+import { receivingStockList } from '@/api/receiving'
+export default {
+  components: { STable, VSelect, rangeDateTime },
+  data () {
+    return {
+      spinning: false,
+      advanced: true, // 高级搜索 展开/关闭
+      time: [
+        getDate.getCurrMonthDays().starttime + ' 00:00:00',
+        getDate.getCurrMonthDays().endtime + ' 23:59:59'
+      ],
+      queryParam: { //  查询条件
+        beginDate: getDate.getCurrMonthDays().starttime + ' 00:00:00',
+        endDate: getDate.getCurrMonthDays().endtime + ' 23:59:59',
+        purchaseBillNo: '', //  采购单号
+        sendBillNo: '', //  发货单号
+        auditState: undefined
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      tableHeight: 0,
+      columns: [
+        { title: '采购单号', scopedSlots: { customRender: 'purchaseBillNo' }, width: '18%', align: 'center' },
+        { title: '发货单号', scopedSlots: { customRender: 'sendBillNo' }, width: '18%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '发货数量', dataIndex: 'totalPutQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '发货金额', dataIndex: 'totalPutAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库时间', dataIndex: 'stockPutTime', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'auditStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return receivingStockList(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
+          this.spinning = false
+          return data
+        })
+      },
+      purchaseTragetType: []
+    }
+  },
+  methods: {
+    //  时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime + ' 00:00:00'
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime + ' 23:59:59'
+      this.queryParam.purchaseBillNo = ''
+      this.queryParam.sendBillNo = ''
+      this.queryParam.auditState = undefined
+      this.$refs.table.refresh(true)
+    },
+    //  详情
+    handleDetail (row) {
+      this.$router.push({ path: `/purchasingManagement/purchaseOrder/detail/${row.purchaseBillSn}`, query: { pageType: 'signWarehousingList' } })
+    },
+    // 备货单详情
+    handleStockDetail (row) {
+      this.$router.push({ path: `/purchasingManagement/signWarehousing/stockOrderDetail/${row.receivingBillSn}` })
+    },
+    //  签收入库
+    handleWarehouse (row) {
+      this.$router.push({ path: `/purchasingManagement/signWarehousing/edit/${row.receivingBillSn}` })
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 200
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 202 - 0
src/views/purchasingManagement/signWarehousing/stockOrderDetail.vue

@@ -0,0 +1,202 @@
+<template>
+  <div class="signWarehousingDetail-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" @back="handleBack" class="signWarehousingDetail-cont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="signWarehousingDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span class="billno">
+            单号:{{ detail&&detail.purchaseBillNo }}
+            <span v-if="detail&&detail.sendBillNo">(发货单号:{{ detail&&detail.sendBillNo || '--' }})</span>
+          </span>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <!-- <Print v-if="$hasPermissions('B_purchasePrint')" :disabled="localDataSource.length==0" @handlePrint="handlePrint"></Print> -->
+          <a-button
+            key="1"
+            type="primary"
+            class="button-warning"
+            v-if="$hasPermissions('B_signWarehousingExport')"
+            id="signWarehousingDetail-export-btn"
+            :disabled="localDataSource.length==0"
+            @click="handleExportProduct()">导出Excel</a-button>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="purchaseOrderDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="3">
+              <a-descriptions-item label="供应商">{{ (detail&&detail.purchaseTargetName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="支付方式">{{ (detail&&detail.purchaseBill&&detail.purchaseBill.settleStyleEntity&&detail.purchaseBill.settleStyleEntity.name) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="采购员工" v-if="detail&&detail.purchaseBill&&detail.purchaseBill.purchaseBillSource=='PURCHASE'">{{ detail&&detail.purchaseBill&&detail.purchaseBill.operatorName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货人">{{ detail&&detail.purchaseBill&&detail.purchaseBill.consigneeName || '--' }}<span v-if="detail&&detail.purchaseBill&&detail.purchaseBill.consigneeTel">({{ detail&&detail.purchaseBill&&detail.purchaseBill.consigneeTel }})</span></a-descriptions-item>
+              <a-descriptions-item label="收货地址">
+                <div v-if="detail&&detail.purchaseBill&&(detail.purchaseBill.shippingAddressProvinceName || detail.purchaseBill.shippingAddressCityName || detail.purchaseBill.shippingAddressCountyName || detail.purchaseBill.shippingAddress)">
+                  {{ detail&&detail.purchaseBill&&detail.purchaseBill.shippingAddressProvinceName || '' }}
+                  {{ detail&&detail.purchaseBill&&detail.purchaseBill.shippingAddressCityName || '' }}
+                  {{ detail&&detail.purchaseBill&&detail.purchaseBill.shippingAddressCountyName || '' }}
+                  {{ detail&&detail.purchaseBill&&detail.purchaseBill.shippingAddress || '' }}
+                </div>
+                <span v-else>--</span>
+              </a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-card size="small" :bordered="false" class="signWarehousingDetail-cont">
+        <!-- 总计 -->
+        <a-alert type="info" style="margin-bottom:10px">
+          <div slot="message">
+            产品款数:<strong>{{ detail && (detail.totalPutCategory || detail.totalPutCategory==0) ? detail.totalPutCategory : '--' }}</strong>,
+            本次发货数量合计:<strong>{{ detail && (detail.totalPutQty || detail.totalPutQty==0) ? detail.totalPutQty : '--' }}</strong>,
+            本次发货金额合计:<strong>{{ detail && (detail.totalPutAmount || detail.totalPutAmount==0) ? '¥'+detail.totalPutAmount : '--' }}</strong>,
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 采购数量 -->
+          <template slot="qty" slot-scope="text, record">
+            <div>{{ record.qty }}</div>
+          </template>
+          <!-- 缺货数量 -->
+          <template slot="outOfStockNum" slot-scope="text, record">
+            <span>{{ record.outOfStockNum }}</span>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
+  </div>
+</template>
+
+<script>
+import moment from 'moment'
+import { STable, VSelect } from '@/components'
+import { purchaseDetailPrint, purchaseDetailExport, purchaseExportDetail } from '@/api/purchase'
+import { receivingDetailSn, receivingDetailList, receivingExport } from '@/api/receiving'
+import Print from '@/views/common/print.vue'
+import { hdPrint } from '@/libs/JGPrint'
+export default {
+  components: { STable, VSelect, Print },
+  data () {
+    return {
+      spinning: false,
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '17%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购单价', dataIndex: 'discountedPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '采购数量', width: '6%', align: 'center', scopedSlots: { customRender: 'qty' } },
+        { title: '本次发货数量', dataIndex: 'receivingQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '本次发货金额', dataIndex: 'discountedAmount', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '本次入库数量', dataIndex: 'putQty', width: '9%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        return receivingDetailList(Object.assign(parameter, { receivingBillSn: 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
+            data.list[i].receivingQty = data.list[i].putQty
+          }
+          this.localDataSource = data.list
+          this.disabled = false
+          return data
+        })
+      },
+      detail: null, //  详情数据
+      localDataSource: [],
+      printerType: 'NEEDLE' //  打印机类型
+    }
+  },
+  methods: {
+    //  返回列表
+    handleBack () {
+      this.$router.push({ path: '/purchasingManagement/signWarehousing/list', query: { closeLastOldTab: true } })
+    },
+    //  详情
+    getDetail () {
+      receivingDetailSn({ sn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.detail = res.data
+        } else {
+          this.detail = null
+        }
+      })
+    },
+    // 打印预览/快捷打印
+    handlePrint (type, printerType) {
+      const _this = this
+      _this.spinning = true
+      let url = purchaseDetailPrint
+      let params = { sn: this.$route.params.sn, type: printerType }
+      if (type == 'export') { //  导出
+        url = purchaseExportDetail
+        params = { sn: this.$route.params.sn }
+      }
+      // 打印或导出
+      hdPrint(printerType, type, url, params, '备货单', function () {
+        _this.spinning = false
+      })
+    },
+    // 导出产品
+    handleExportProduct () {
+      const _this = this
+      _this.spinning = true
+      // 打印或导出
+      hdPrint('', 'export', receivingExport, { receivingBillSn: this.$route.params.sn }, '备货单', function () {
+        _this.spinning = false
+      })
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.$refs.table.refresh(true)
+      this.getDetail()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.$refs.table.refresh(true)
+      this.getDetail()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style lang="less">
+  .signWarehousingDetail-cont{
+    margin-bottom: 10px;
+    .timeline-box{
+      margin-top: 30px;
+      .auxiliary-txt{
+        color: #808695;
+      }
+    }
+  }
+  .signWarehousingDetail-wrap{
+    .billno{
+      font-size: 16px;
+      font-weight: bold;
+      margin: 0 15px;
+    }
+  }
+</style>

+ 11 - 8
src/views/reportData/chainCustomerReport/list.vue

@@ -158,15 +158,18 @@ export default {
         delete params.time
         if (params.beginDate) {
           return reportBigCustomerLinkageList(params).then(res => {
-            // 总计
-            this.getCount(params)
-            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
-              data.list[i].percentageUnit = data.list[i].percentage ? data.list[i].percentage + '%' : undefined
+            let data
+            if (res.status == 200) {
+              data = res.data
+              // 总计
+              this.getCount(params)
+              const no = (data.pageNo - 1) * data.pageSize
+              for (var i = 0; i < data.list.length; i++) {
+                data.list[i].no = no + i + 1
+                data.list[i].percentageUnit = data.list[i].percentage ? data.list[i].percentage + '%' : undefined
+              }
+              this.disabled = false
             }
-            this.disabled = false
             this.spinning = false
             return data
           })

+ 14 - 0
src/views/reportData/chainPurchaseReceiptReport/list.vue

@@ -53,3 +53,17 @@ export default {
   }
 }
 </script>
+<style lang="less">
+	.chainPurchaseReceiptReportList-wrap{
+		.chainPurchaseReceiptReportList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container{
+      height: 30px!important;
+		}
+    .chainPurchaseReceiptReportList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active{
+      height: 30px!important;
+    }
+    .chainPurchaseReceiptReportList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab{
+      line-height: 26px!important;
+      height: 30px!important;
+    }
+	}
+</style>

+ 11 - 10
src/views/reportData/chainPurchaseReceiptReport/purchaseReceiptDetail.vue

@@ -98,7 +98,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import ProductType from '../../common/productType.js'
@@ -153,14 +152,17 @@ export default {
         delete params.time
         if (params.beginDate) {
           return reportChainReceivingBillDetailList(params).then(res => {
-            // 总计
-            this.getCount(params)
-            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
+            let data
+            if (res.status == 200) {
+              data = res.data
+              // 总计
+              this.getCount(params)
+              const no = (data.pageNo - 1) * data.pageSize
+              for (var i = 0; i < data.list.length; i++) {
+                data.list[i].no = no + i + 1
+              }
+              this.disabled = false
             }
-            this.disabled = false
             this.$emit('spinning', false)
             return data
           })
@@ -250,8 +252,7 @@ export default {
           _this.exportLoading = true
           _this.spinning = true
           reportReceivingBillDetailExport(params).then(res => {
-            const fileName = '连锁采购入库明细报表' + moment().format('YYYYMMDDHHmmss')
-            downloadExcel(res, fileName)
+            downloadExcel(res, '连锁采购入库明细报表')
             _this.exportLoading = false
             _this.spinning = false
           })

+ 11 - 10
src/views/reportData/chainPurchaseReceiptReport/purchaseReceiptOrder.vue

@@ -73,7 +73,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
@@ -115,14 +114,17 @@ export default {
         delete params.time
         if (params.beginDate) {
           return reportChainReceivingBillList(params).then(res => {
-            // 总计
-            this.getCount(params)
-            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
+            let data
+            if (res.status == 200) {
+              data = res.data
+              // 总计
+              this.getCount(params)
+              const no = (data.pageNo - 1) * data.pageSize
+              for (var i = 0; i < data.list.length; i++) {
+                data.list[i].no = no + i + 1
+              }
+              this.disabled = false
             }
-            this.disabled = false
             this.$emit('spinning', false)
             return data
           })
@@ -199,8 +201,7 @@ export default {
           _this.exportLoading = true
           _this.spinning = true
           reportReceivingBillExport(params).then(res => {
-            const fileName = '连锁采购入库单报表' + moment().format('YYYYMMDDHHmmss')
-            downloadExcel(res, fileName)
+            downloadExcel(res, '连锁采购入库单报表')
             _this.exportLoading = false
             _this.spinning = false
           })

+ 11 - 9
src/views/reportData/chainReceivedSendStorageReport/list.vue

@@ -184,14 +184,17 @@ export default {
         if (this.queryParam.auditDate && this.queryParam.tenantId) {
           params.auditDate = this.queryParam.auditDate + '-01'
           return linkageReportPageList(params).then(res => {
-            // 总计
-            this.getCount(params)
-            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
+            let data
+            if (res.status == 200) {
+              data = res.data
+              // 总计
+              this.getCount(params)
+              const no = (data.pageNo - 1) * data.pageSize
+              for (var i = 0; i < data.list.length; i++) {
+                data.list[i].no = no + i + 1
+              }
+              this.disabled = false
             }
-            this.disabled = false
             this.spinning = false
             return data
           })
@@ -269,8 +272,7 @@ export default {
           _this.exportLoading = true
           _this.spinning = true
           reportChainStockPutOutExport(params).then(res => {
-            const fileName = '连锁收发存报表' + moment().format('YYYYMMDDHHmmss')
-            downloadExcel(res, fileName)
+            downloadExcel(res, '连锁收发存报表')
             _this.exportLoading = false
             _this.spinning = false
           })

+ 10 - 7
src/views/reportData/chainSalesDetailReport/list.vue

@@ -251,14 +251,17 @@ export default {
         delete params.time
         delete params.warehouseCascade
         return reportChainSalesBillDetailList(params).then(res => {
-          // 总计
-          this.getCount(params)
-          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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 10 - 7
src/views/reportData/chainSalesReport/list.vue

@@ -184,14 +184,17 @@ export default {
         this.spinning = true
         delete params.time
         return reportChainSalesBillList(params).then(res => {
-          // 总计
-          this.getCount(params)
-          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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 34 - 26
src/views/reportData/chainStockReport/detailModal.vue

@@ -8,27 +8,29 @@
     v-model="isShow"
     @cancle="isShow=false"
     :width="960">
-    <!-- 合计 -->
-    <a-alert type="info" style="margin-bottom:10px">
-      <div class="ftext" slot="message">
-        可用库存总数量(个):<strong> {{ (currentStock && currentStock.totalQty) || 0 }} </strong>;
-        可用库存总成本(¥):<strong> {{ (currentStock && currentStock.totalCost) || 0 }} </strong>。
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 合计 -->
+      <a-alert type="info" style="margin-bottom:10px">
+        <div class="ftext" slot="message">
+          可用库存总数量(个):<strong> {{ (currentStock && currentStock.totalQty) || 0 }} </strong>;
+          可用库存总成本(¥):<strong> {{ (currentStock && currentStock.totalCost) || 0 }} </strong>。
+        </div>
+      </a-alert>
+      <!-- 详情 -->
+      <s-table
+        v-if="openModal"
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        bordered>
+      </s-table>
+      <div class="btn-cont">
+        <a-button id="chainStockReportDetail-detail-modal-back" @click="isShow = false">返回列表</a-button>
       </div>
-    </a-alert>
-    <!-- 详情 -->
-    <s-table
-      v-if="openModal"
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      bordered>
-    </s-table>
-    <div class="btn-cont">
-      <a-button id="chainStockReportDetail-detail-modal-back" @click="isShow = false">返回列表</a-button>
-    </div>
+    </a-spin>
   </a-modal>
 </template>
 
@@ -59,6 +61,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       // 表头
       columns: [
@@ -74,15 +77,20 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
+        this.spinning = true
         const params = Object.assign(parameter, { productSn: this.productSn, stockSn: this.stockSn })
         return reportStockDetailList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            // 总计
+            this.getCount(params)
           }
-          // 总计
-          this.getCount(params)
+          this.spinning = false
           return data
         })
       },

+ 10 - 7
src/views/reportData/chainStockReport/list.vue

@@ -159,14 +159,17 @@ export default {
         this.spinning = true
         if (params.tenantId) {
           return reportStockList(params).then(res => {
-            // 总计
-            this.getCount(params)
-            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
+            let data
+            if (res.status == 200) {
+              data = res.data
+              // 总计
+              this.getCount(params)
+              const no = (data.pageNo - 1) * data.pageSize
+              for (var i = 0; i < data.list.length; i++) {
+                data.list[i].no = no + i + 1
+              }
+              this.disabled = false
             }
-            this.disabled = false
             this.spinning = false
             return data
           })

+ 11 - 8
src/views/reportData/customerReport/list.vue

@@ -141,15 +141,18 @@ export default {
         delete params.time
         if (params.beginDate) {
           return reportBigCustomerList(params).then(res => {
-            // 总计
-            this.getCount(params)
-            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
-              data.list[i].percentageUnit = data.list[i].percentage ? data.list[i].percentage + '%' : undefined
+            let data
+            if (res.status == 200) {
+              data = res.data
+              // 总计
+              this.getCount(params)
+              const no = (data.pageNo - 1) * data.pageSize
+              for (var i = 0; i < data.list.length; i++) {
+                data.list[i].no = no + i + 1
+                data.list[i].percentageUnit = data.list[i].percentage ? data.list[i].percentage + '%' : undefined
+              }
+              this.disabled = false
             }
-            this.disabled = false
             this.spinning = false
             return data
           })

+ 10 - 7
src/views/reportData/inventoryReport/inventoryDetail.vue

@@ -128,14 +128,17 @@ export default {
         delete params.time
         if (params.beginDate) {
           return reportCheckWarehouseDetailList(params).then(res => {
-            // 总计
-            this.getCount(params)
-            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
+            let data
+            if (res.status == 200) {
+              data = res.data
+              // 总计
+              this.getCount(params)
+              const no = (data.pageNo - 1) * data.pageSize
+              for (var i = 0; i < data.list.length; i++) {
+                data.list[i].no = no + i + 1
+              }
+              this.disabled = false
             }
-            this.disabled = false
             this.$emit('spinning', false)
             return data
           })

+ 10 - 9
src/views/reportData/inventoryReport/inventoryOrder.vue

@@ -88,20 +88,21 @@ export default {
       loadData: parameter => {
         this.disabled = true
         const params = Object.assign(parameter, this.queryParam)
-        // this.spinning = true
         this.$emit('spinning', true)
         delete params.time
         if (params.beginDate) {
           return reportCheckWarehouseList(params).then(res => {
-            // 总计
-            this.getCount(params)
-            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
+            let data
+            if (res.status == 200) {
+              data = res.data
+              // 总计
+              this.getCount(params)
+              const no = (data.pageNo - 1) * data.pageSize
+              for (var i = 0; i < data.list.length; i++) {
+                data.list[i].no = no + i + 1
+              }
+              this.disabled = false
             }
-            this.disabled = false
-            // this.spinning = false
             this.$emit('spinning', false)
             return data
           })

+ 15 - 1
src/views/reportData/inventoryReport/list.vue

@@ -2,7 +2,7 @@
   <a-card size="small" :bordered="false" class="inventoryReportList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 标签页 -->
-      <a-tabs type="card" :default-active-key="nowKey" @change="handleTabChange" class="purchaseReceiptReportList-tabs ">
+      <a-tabs type="card" :default-active-key="nowKey" @change="handleTabChange" class="inventoryReportList-tabs ">
         <a-tab-pane v-for="item in tabPaneData" :key="item.val">
           <span slot="tab">{{ item.name }}</span>
         </a-tab-pane>
@@ -53,3 +53,17 @@ export default {
   }
 }
 </script>
+<style lang="less">
+	.inventoryReportList-wrap{
+		.inventoryReportList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container{
+      height: 30px!important;
+		}
+    .inventoryReportList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active{
+      height: 30px!important;
+    }
+    .inventoryReportList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab{
+      line-height: 26px!important;
+      height: 30px!important;
+    }
+	}
+</style>

+ 14 - 0
src/views/reportData/purchaseReceiptReport/list.vue

@@ -53,3 +53,17 @@ export default {
   }
 }
 </script>
+<style lang="less">
+	.purchaseReceiptReportList-wrap{
+		.purchaseReceiptReportList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container{
+      height: 30px!important;
+		}
+    .purchaseReceiptReportList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active{
+      height: 30px!important;
+    }
+    .purchaseReceiptReportList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab{
+      line-height: 26px!important;
+      height: 30px!important;
+    }
+	}
+</style>

+ 11 - 10
src/views/reportData/purchaseReceiptReport/purchaseReceiptDetail.vue

@@ -84,7 +84,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import ProductType from '../../common/productType.js'
@@ -137,14 +136,17 @@ export default {
         delete params.time
         if (params.beginDate) {
           return reportReceivingBillDetailList(params).then(res => {
-            // 总计
-            this.getCount(params)
-            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
+            let data
+            if (res.status == 200) {
+              data = res.data
+              // 总计
+              this.getCount(params)
+              const no = (data.pageNo - 1) * data.pageSize
+              for (var i = 0; i < data.list.length; i++) {
+                data.list[i].no = no + i + 1
+              }
+              this.disabled = false
             }
-            this.disabled = false
             this.$emit('spinning', false)
             return data
           })
@@ -227,8 +229,7 @@ export default {
           _this.exportLoading = true
           _this.spinning = true
           reportReceivingBillDetailExport(params).then(res => {
-            const fileName = '采购入库明细报表' + moment().format('YYYYMMDDHHmmss')
-            downloadExcel(res, fileName)
+            downloadExcel(res, '采购入库明细报表')
             _this.exportLoading = false
             _this.spinning = false
           })

+ 11 - 10
src/views/reportData/purchaseReceiptReport/purchaseReceiptOrder.vue

@@ -59,7 +59,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
@@ -99,14 +98,17 @@ export default {
         delete params.time
         if (params.beginDate) {
           return reportReceivingBillList(params).then(res => {
-            // 总计
-            this.getCount(params)
-            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
+            let data
+            if (res.status == 200) {
+              data = res.data
+              // 总计
+              this.getCount(params)
+              const no = (data.pageNo - 1) * data.pageSize
+              for (var i = 0; i < data.list.length; i++) {
+                data.list[i].no = no + i + 1
+              }
+              this.disabled = false
             }
-            this.disabled = false
             this.$emit('spinning', false)
             return data
           })
@@ -176,8 +178,7 @@ export default {
           _this.exportLoading = true
           _this.spinning = true
           reportReceivingBillExport(params).then(res => {
-            const fileName = '采购入库单报表' + moment().format('YYYYMMDDHHmmss')
-            downloadExcel(res, fileName)
+            downloadExcel(res, '采购入库单报表')
             _this.exportLoading = false
             _this.spinning = false
           })

+ 11 - 10
src/views/reportData/receivedSendStorageReport/list.vue

@@ -108,7 +108,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { dealerProductTypeList } from '@/api/dealerProductType'
@@ -169,14 +168,17 @@ export default {
         this.spinning = true
         if (this.queryParam.beginDate) {
           return reportPageList(params).then(res => {
-            // 总计
-            this.getCount(params)
-            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
+            let data
+            if (res.status == 200) {
+              data = res.data
+              // 总计
+              this.getCount(params)
+              const no = (data.pageNo - 1) * data.pageSize
+              for (var i = 0; i < data.list.length; i++) {
+                data.list[i].no = no + i + 1
+              }
+              this.disabled = false
             }
-            this.disabled = false
             this.spinning = false
             return data
           })
@@ -256,8 +258,7 @@ export default {
           _this.exportLoading = true
           _this.spinning = true
           reportStockPutOutExport(params).then(res => {
-            const fileName = '收发存报表' + moment().format('YYYYMMDDHHmmss')
-            downloadExcel(res, fileName)
+            downloadExcel(res, '收发存报表')
             _this.exportLoading = false
             _this.spinning = false
           })

+ 11 - 10
src/views/reportData/salesDetailReport/list.vue

@@ -175,7 +175,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
@@ -246,14 +245,17 @@ export default {
         delete params.time
         delete params.warehouseCascade
         return reportSalesBillDetailList(params).then(res => {
-          // 总计
-          this.getCount(params)
-          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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })
@@ -337,8 +339,7 @@ export default {
           _this.exportLoading = true
           _this.spinning = true
           reportSalesBillDetailExport(params).then(res => {
-            const fileName = '销售明细报表' + moment().format('YYYYMMDDHHmmss')
-            downloadExcel(res, fileName)
+            downloadExcel(res, '销售明细报表')
             _this.exportLoading = false
             _this.spinning = false
           })

+ 11 - 10
src/views/reportData/salesReport/list.vue

@@ -124,7 +124,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
@@ -179,14 +178,17 @@ export default {
         this.spinning = true
         delete params.time
         return reportSalesBillList(params).then(res => {
-          // 总计
-          this.getCount(params)
-          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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })
@@ -256,8 +258,7 @@ export default {
           _this.exportLoading = true
           _this.spinning = true
           reportSalesBillExport(params).then(res => {
-            const fileName = '销售报表' + moment().format('YYYYMMDDHHmmss')
-            downloadExcel(res, fileName)
+            downloadExcel(res, '销售报表')
             _this.exportLoading = false
             _this.spinning = false
           })

+ 8 - 5
src/views/salesManagement/giftRecord/list.vue

@@ -100,12 +100,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return giftsDetailList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

+ 8 - 5
src/views/salesManagement/productPricing/list.vue

@@ -95,12 +95,15 @@ export default {
         this.disabled = true
         this.spinning = true
         return dealerProductPriceList(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
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
           }
-          this.disabled = false
           this.spinning = false
           return data
         })

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