Преглед изворни кода

Merge branch 'develop' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop

lilei пре 3 година
родитељ
комит
57e98c8e0d
98 измењених фајлова са 1860 додато и 2352 уклоњено
  1. 4 0
      public/version.json
  2. 34 0
      src/api/reportData.js
  3. 1 1
      src/components/Charts/RankList.vue
  4. 1 1
      src/components/DescriptionList/DescriptionList.vue
  5. 1 1
      src/components/GlobalFooter/GlobalFooter.vue
  6. 0 1
      src/components/Menu/menu.js
  7. 11 13
      src/components/MultiTab/MultiTab.vue
  8. 1 1
      src/components/PageHeader/PageHeader.vue
  9. 1 1
      src/components/Result/Result.vue
  10. 1 1
      src/components/SettingDrawer/SettingItem.vue
  11. 78 18
      src/components/Table/index.js
  12. 2 2
      src/components/global.less
  13. 9 1
      src/components/index.less
  14. 1 1
      src/components/tools/HeadInfo.vue
  15. 148 198
      src/config/router.config.js
  16. 1 1
      src/layouts/UserLayout.vue
  17. 28 0
      src/libs/versionUpdate.js
  18. 3 1
      src/permission.js
  19. 8 1
      src/utils/request.js
  20. 1 1
      src/views/allocationManagement/transferOut/basicInfoModal.vue
  21. 5 5
      src/views/allocationManagement/transferOut/edit.vue
  22. 3 3
      src/views/allocationManagement/transferOut/list.vue
  23. 1 1
      src/views/basicData/warehouse/storingLocation/editModal.vue
  24. 1 1
      src/views/basicData/warehouse/storingLocation/list.vue
  25. 1 1
      src/views/bnSetting/menu/adminMenus.vue
  26. 1 1
      src/views/bnSetting/menu/storeMenus.vue
  27. 2 2
      src/views/common/auditModal.vue
  28. 90 83
      src/views/common/chooseCustomerModal.vue
  29. 136 205
      src/views/common/chooseProductsModal.vue
  30. 101 185
      src/views/common/chooseSupplierModal.vue
  31. 5 6
      src/views/common/commonModal.vue
  32. 1 1
      src/views/dealerManagement/marketingDivisionSet/editModal.vue
  33. 4 3
      src/views/dealerManagement/merchantInfoManagement/edit.vue
  34. 2 2
      src/views/dealerManagement/merchantInfoManagement/list.vue
  35. 41 18
      src/views/financialManagement/financialCollection/list.vue
  36. 1 1
      src/views/financialManagement/inventoryConfirmation/detail.vue
  37. 1 1
      src/views/financialManagement/inventoryConfirmation/list.vue
  38. 3 3
      src/views/financialManagement/returnConfirmation/list.vue
  39. 19 38
      src/views/financialManagement/warehousingConfirmation/list.vue
  40. 1 1
      src/views/inventoryManagement/inventoryCheck/detail.vue
  41. 1 1
      src/views/inventoryManagement/inventoryCheck/list.vue
  42. 3 3
      src/views/inventoryManagement/inventoryQuery/list.vue
  43. 2 2
      src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue
  44. 35 51
      src/views/inventoryManagement/inventoryWarning/list.vue
  45. 1 1
      src/views/inventoryManagement/makeInventory/check.vue
  46. 1 1
      src/views/inventoryManagement/makeInventory/list.vue
  47. 1 1
      src/views/inventoryManagement/supervisionDisk/check.vue
  48. 1 1
      src/views/inventoryManagement/supervisionDisk/list.vue
  49. 2 2
      src/views/power/dataDictionary/dataDictionary.vue
  50. 1 1
      src/views/power/menu/menu.vue
  51. 1 1
      src/views/power/register/register.vue
  52. 2 2
      src/views/productManagement/newProduct/list.vue
  53. 2 2
      src/views/productManagement/priceChangeRecord/list.vue
  54. 1 1
      src/views/productManagement/productBrand/editModal.vue
  55. 3 3
      src/views/productManagement/productInfo/edit.vue
  56. 19 50
      src/views/productManagement/productInfo/list.vue
  57. 13 31
      src/views/productManagement/productLaunchAudit/list.vue
  58. 2 2
      src/views/productManagement/productLevel/list.vue
  59. 15 32
      src/views/productManagement/productOfflineAudit/list.vue
  60. 2 2
      src/views/productManagement/productPricing/list.vue
  61. 2 2
      src/views/productManagement/productUniversal/list.vue
  62. 2 2
      src/views/promotionRulesManagement/orderStatistics/list.vue
  63. 2 2
      src/views/promotionRulesManagement/productStatistics/list.vue
  64. 1 1
      src/views/purchasingManagement/bulkWarehousingOrder/basicInfoModal.vue
  65. 3 2
      src/views/purchasingManagement/bulkWarehousingOrder/edit.vue
  66. 14 65
      src/views/purchasingManagement/bulkWarehousingOrder/list.vue
  67. 576 0
      src/views/reportData/allCountryCostReport/list.vue
  68. 0 177
      src/views/reportData/districtTypeSalesDetails/list.vue
  69. 0 440
      src/views/reportData/nationalCustomerCostStatistics/list.vue
  70. 0 193
      src/views/reportData/provinceTypeSalesDetails/list.vue
  71. 295 0
      src/views/reportData/regionTypeSalesReport/list.vue
  72. 0 196
      src/views/reportData/regionalPromotionCostStatistics/list.vue
  73. 1 1
      src/views/result/Error.vue
  74. 4 4
      src/views/result/Success.vue
  75. 1 1
      src/views/salesManagement/examineVerify/auditRejectModal.vue
  76. 2 2
      src/views/salesManagement/examineVerify/list.vue
  77. 16 65
      src/views/salesManagement/outboundOrder/list.vue
  78. 2 2
      src/views/salesManagement/priceInquiry/list.vue
  79. 2 2
      src/views/salesManagement/pushOrderManagement/list.vue
  80. 12 47
      src/views/salesManagement/salesQuery/chooseActive.vue
  81. 2 2
      src/views/salesManagement/salesQuery/edit.vue
  82. 2 2
      src/views/salesManagement/salesQuery/list.vue
  83. 3 3
      src/views/salesManagement/salesQuery/receivingAddress/editAddressModal.vue
  84. 2 2
      src/views/salesManagement/salesReturn/list.vue
  85. 10 35
      src/views/salesManagement/salesReturn/salesReturnCheck.vue
  86. 1 1
      src/views/salesManagement/salesReturn/salesReturnEdit.vue
  87. 1 1
      src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue
  88. 2 2
      src/views/salesManagement/shortageStatisticsC/list.vue
  89. 2 2
      src/views/salesManagement/shortageStatisticsP/list.vue
  90. 13 40
      src/views/salesManagement/waitDispatch/edit.vue
  91. 15 52
      src/views/salesManagement/waitDispatch/queryPart.vue
  92. 1 1
      src/views/setting/notice/detailModal.vue
  93. 1 1
      src/views/setting/noticeManagement/detailModal.vue
  94. 1 1
      src/views/setting/noticeManagement/editModal.vue
  95. 2 2
      src/views/supplierManagement/associatedProduct/add.vue
  96. 2 2
      src/views/supplierManagement/associatedProductDetails/list.vue
  97. 2 2
      src/views/supplierManagement/supplierInfo/edit.vue
  98. 2 2
      vue.config.js

+ 4 - 0
public/version.json

@@ -0,0 +1,4 @@
+{
+    "version": "1.0.5",
+    "message": "发现有新版本发布,确定更新系统?"
+}

+ 34 - 0
src/api/reportData.js

@@ -419,3 +419,37 @@ export const reportSalesReturnThjdReportExport = (params) => {
     responseType: 'blob'
   })
 }
+// 全国各省类销售明细报表
+export const realReportSalesByProvince = (params) => {
+  return axios({
+    url: '/report/realReportSales/queryListByProvince',
+    data: params,
+    method: 'post'
+  })
+}
+// 导出
+export const realReportSalesByProvinceExport = (params) => {
+  return axios({
+    url: '/report/realReportSales/exportByProvince',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+// 全国各区类销售明细报表
+export const realReportSalesBySubArea = (params) => {
+  return axios({
+    url: '/report/realReportSales/queryListBySubArea',
+    data: params,
+    method: 'post'
+  })
+}
+// 导出
+export const realReportSalesBySubAreaExport = (params) => {
+  return axios({
+    url: '/report/realReportSales/exportBySubArea',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 1 - 1
src/components/Charts/RankList.vue

@@ -42,7 +42,7 @@ export default {
         margin-top: 16px;
 
         span {
-          color: rgba(0, 0, 0, .65);
+          color: rgba(0, 0, 0);
           font-size: 14px;
           line-height: 22px;
 

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

@@ -122,7 +122,7 @@ export default {
 
       .title {
         font-size: 14px;
-        color: rgba(0, 0, 0, .65);
+        color: rgba(0, 0, 0);
         font-weight: normal;
         margin-bottom: 12px;
       }

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

@@ -45,7 +45,7 @@ export default {
       color: rgba(0, 0, 0, 0.45);
 
       &:hover {
-        color: rgba(0, 0, 0, 0.65);
+        color: rgba(0, 0, 0);
       }
 
       &:not(:last-child) {

+ 0 - 1
src/components/Menu/menu.js

@@ -112,7 +112,6 @@ export default {
           item.meta = Object.assign(item.meta, { hidden: true })
         })
       }
-
       return (
         <Item {...{ key: menu.path }}>
           <tag {...{ props, attrs }}>

+ 11 - 13
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)
@@ -171,18 +170,18 @@ export default {
       const molen = oldMenu.matched.length < 3
       const oldMatched = oldMenu.matched[molen ? 1 : 2]
       const hasChildren = newMatched.name == oldMatched.name
+      // 判断是否是新增,编辑,详情页
+      const na = newVal.meta.title.indexOf('详情') >= 0
+      const nb = newVal.meta.title.indexOf('新增') >= 0
+      const nc = newVal.meta.title.indexOf('编辑') >= 0
+      const nxt = newVal.meta.replaceTab
+      const oa = oldMenu.meta.title.indexOf('详情') >= 0
+      const ob = oldMenu.meta.title.indexOf('新增') >= 0
+      const oc = oldMenu.meta.title.indexOf('编辑') >= 0
+      const oxt = oldMenu.meta.replaceTab
 
       if (index < 0) { // 不存在
         // console.log(1, hasChildren, '不存在')
-        // 判断是否是新增,编辑,详情页
-        const na = newVal.meta.title.indexOf('详情') >= 0
-        const nb = newVal.meta.title.indexOf('新增') >= 0
-        const nc = newVal.meta.title.indexOf('编辑') >= 0
-        const nxt = newVal.meta.replaceTab
-        const oa = oldMenu.meta.title.indexOf('详情') >= 0
-        const ob = oldMenu.meta.title.indexOf('新增') >= 0
-        const oc = oldMenu.meta.title.indexOf('编辑') >= 0
-        const oxt = oldMenu.meta.replaceTab
         if ((na || nb || nc || nxt || oa || ob || oc || oxt) && hasChildren) {
           // 替换当前页签
           this.replaceTab(newVal, oldMenu)
@@ -212,18 +211,17 @@ export default {
           }
         }
       } else { // 已存在
+        // console.log(1, nxt, '已存在')
         this.pages.splice(index, 1, newVal)
         this.tabsList.splice(index, 1, newVal.name)
-        this.$store.state.app.isNewTab = false
+        this.$store.state.app.isNewTab = !!nxt
         if (hasEqChild) {
           this.$store.state.app.updateList = hasEqChild.name == oldVal.name
         }
-        // console.log(1, this.$store.state.app.updateList, '已存在')
         this.activeKey = newVal.name
       }
     },
     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 })
     }

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

@@ -107,7 +107,7 @@ export default {
         font-size: 20px;
         line-height: 28px;
         font-weight: 500;
-        color: rgba(0, 0, 0, 0.85);
+        color: rgba(0, 0, 0);
         margin-bottom: 16px;
         flex: auto;
       }

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

@@ -77,7 +77,7 @@ export default {
     }
     .title {
       font-size: 24px;
-      color: rgba(0, 0, 0, .85);
+      color: rgba(0, 0, 0);
       font-weight: 500;
       line-height: 32px;
       margin-bottom: 16px;

+ 1 - 1
src/components/SettingDrawer/SettingItem.vue

@@ -29,7 +29,7 @@ export default {
 
     .setting-drawer-index-title {
       font-size: 14px;
-      color: rgba(0, 0, 0, .85);
+      color: rgba(0, 0, 0);
       line-height: 22px;
       margin-bottom: 12px;
     }

+ 78 - 18
src/components/Table/index.js

@@ -9,7 +9,8 @@ export default {
       selectedRowKeys: [],
       localLoading: false,
       localDataSource: [],
-      localPagination: Object.assign({}, this.pagination)
+      localPagination: Object.assign({}, this.pagination),
+      isSucceed: true //  是否请求成功
     }
   },
   props: Object.assign({}, T.props, {
@@ -17,6 +18,10 @@ export default {
       type: [String, Function],
       default: 'key'
     },
+    rowKeyName: { // 多选时,唯一标识键名
+      type: String,
+      default: 'id'
+    },
     rowClassName: {
       type: [String, Function],
       default: ''
@@ -55,11 +60,6 @@ export default {
       type: Object,
       default: null
     },
-    /** @Deprecated */
-    showAlertInfo: {
-      type: Boolean,
-      default: false
-    },
     showPagination: {
       type: String | Boolean,
       default: 'auto'
@@ -147,6 +147,7 @@ export default {
     },
     // 重置表格为空
     clearTable () {
+      this.localLoading = false
       this.localDataSource = []
       this.localPagination = Object.assign({}, {
         current: 1, pageSize: this.pageSize, total: 0
@@ -183,8 +184,13 @@ export default {
       // eslint-disable-next-line
       if ((typeof result === 'object' || typeof result === 'function') && typeof result.then === 'function') {
         result.then(r => {
-          const list = r.list || r.data || r
+          // const list = r.list || r.data || r
+          let list = []
+          if (r) {
+            list = r.list || r.data || r
+          }
           // console.log(r,'rrrrrrrrrr')
+          this.isSucceed = !!r
           this.localPagination = this.showPagination && Object.assign({}, this.localPagination, {
             current: r.pageNo, // 返回结果中的当前分页数
             total: Number(r.count), // 返回结果中的总记录数
@@ -210,6 +216,8 @@ export default {
           }
           this.localDataSource = list // 返回结果中的数组数据
           this.localLoading = false
+        }).catch(err => {
+          this.clearTable()
         })
       }
     },
@@ -231,26 +239,72 @@ export default {
      * @param selectedRows
      */
     updateSelect (selectedRowKeys, selectedRows) {
-      this.selectedRows = selectedRows
-      this.selectedRowKeys = selectedRowKeys
       const list = this.needTotalList
       this.needTotalList = list.map(item => {
         return {
           ...item,
-          total: selectedRows.reduce((sum, val) => {
+          total: this.selectedRows.reduce((sum, val) => {
             const total = sum + parseInt(get(val, item.dataIndex))
             return isNaN(total) ? 0 : total
           }, 0)
         }
       })
+      const obj = {
+        selectedRowKeys: this.selectedRowKeys,
+        selectedRows: this.selectedRows
+      }
+      this.$emit('rowSelection', obj)
+    },
+    onSelectChange (record, selected, selectedRows, nativeEvent) {
+      if (selected) { //  选择
+        this.selectedRows.push(record)
+      } else { //  取消
+        const selectedRowsArr = []
+        this.selectedRows.map(item => {
+          if (this.selectedRowKeys.indexOf(item[this.rowKeyName]) != -1) {
+            selectedRowsArr.push(item)
+          }
+        })
+        this.selectedRows = selectedRowsArr
+      }
+      this.updateSelect()
+    },
+    // 本页全选/取消全选
+    onSelectAllChange (selected, selectedRows, changeRows) {
+      const _this = this
+      if (selected) { //  选择
+        this.selectedRows = [...this.selectedRows, ...changeRows]
+      } else { //  取消
+        const arrId = []
+        this.selectedRows.map((item, index) => {
+          this.selectedRows.map((subItem, ind) => {
+            if (item[this.rowKeyName] == subItem[this.rowKeyName]) {
+              arrId.push(index)
+            }
+          })
+        })
+        arrId.map((item, index) => {
+          _this.selectedRows = _this.selectedRows.slice(item, item + 1)
+        })
+      }
+      this.updateSelect()
+    },
+    // 设置 table 已选中项
+    setTableSelected (selectedRowKeys, selectedRows) {
+      this.selectedRows = selectedRows
+      this.selectedRowKeys = selectedRowKeys
+      this.updateSelect()
     },
     /**
      * 清空 table 已选中项
      */
     clearSelected () {
       if (this.rowSelection) {
-        this.rowSelection.onChange([], [])
-        this.updateSelect([], [])
+        // this.rowSelection.onChange([], [])
+        // this.updateSelect([], [])
+        this.selectedRows = []
+        this.selectedRowKeys = []
+        this.updateSelect()
       }
     },
     /**
@@ -299,7 +353,6 @@ export default {
     const props = {}
     const localKeys = Object.keys(this.$data)
     const showAlert = (typeof this.alert === 'object' && this.alert !== null && this.alert.show) && typeof this.rowSelection.selectedRowKeys !== 'undefined' || this.alert
-
     Object.keys(T.props).forEach(k => {
       const localKey = `local${k.substring(0, 1).toUpperCase()}${k.substring(1)}`
       if (localKeys.includes(localKey)) {
@@ -307,16 +360,19 @@ export default {
         return props[k]
       }
       if (k === 'rowSelection') {
-        if (showAlert && this.rowSelection) {
+        if (this.rowSelection) {
           // 如果需要使用alert,则重新绑定 rowSelection 事件
-          // console.log('this.rowSelection', this.rowSelection)
           props[k] = {
             ...this.rowSelection,
-            selectedRows: this.selectedRows,
             selectedRowKeys: this.selectedRowKeys,
             onChange: (selectedRowKeys, selectedRows) => {
-              this.updateSelect(selectedRowKeys, selectedRows)
-              typeof this[k].onChange !== 'undefined' && this[k].onChange(selectedRowKeys, selectedRows)
+              this.selectedRowKeys = selectedRowKeys
+            },
+            onSelect: (record, selected, selectedRows, nativeEvent) => {
+              this.onSelectChange(record, selected, selectedRows, nativeEvent)
+            },
+            onSelectAll: (selected, selectedRows, changeRows) => {
+              this.onSelectAllChange(selected, selectedRows, changeRows)
             }
           }
           return props[k]
@@ -329,6 +385,10 @@ export default {
       this[k] && (props[k] = this[k])
       return props[k]
     })
+    if (!this.isSucceed) { // 请求失败
+      props['locale'] = { emptyText: '网络异常,请点击按钮刷新' }
+    }
+    // isSucceed
     const table = (
       <a-table {...{ props, scopedSlots: { ...this.$scopedSlots } }} onChange={this.loadData}>
         { Object.keys(this.$slots).map(name => (<template slot={name}>{this.$slots[name]}</template>)) }

+ 2 - 2
src/components/global.less

@@ -183,7 +183,7 @@ body {
         display: inline-block;
         transition: all 0.3s;
         height: 100%;
-        color: rgba(0, 0, 0, 0.65);
+        color: rgba(0, 0, 0);
 
         &:hover {
           background: rgba(0, 0, 0, 0.025);
@@ -244,7 +244,7 @@ body {
         .header-index-wide {
           .header-index-left {
             .trigger {
-              color: rgba(0, 0, 0, 0.65);
+              color: rgba(0, 0, 0);
             }
           }
         }

+ 9 - 1
src/components/index.less

@@ -408,9 +408,17 @@
     padding: 3px 0 5px 38px!important;
   }
   .ant-collapse-content-box{
-    padding: 10px 10px 0!important;
+    padding: 10px 10px 5px!important;
     .ant-descriptions-item{
       padding-bottom: 8px!important;
     }
   }
+}
+.ant-form-item-label{
+  label{
+    color: #000000!important;
+  }
+}
+.ant-alert-message, .ant-card-head{
+  color: #000000!important;
 }

+ 1 - 1
src/components/tools/HeadInfo.vue

@@ -50,7 +50,7 @@ export default {
       margin-bottom: 4px;
     }
     p {
-      color: rgba(0, 0, 0, .85);
+      color: rgba(0, 0, 0);
       font-size: 24px;
       line-height: 32px;
       margin: 0;

+ 148 - 198
src/config/router.config.js

@@ -979,6 +979,79 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/reportData/actualSalesReport',
+            redirect: '/reportData/actualSalesReport/list',
+            name: 'actualSalesReport',
+            component: BlankLayout,
+            meta: {
+              title: '实售销售报表',
+              icon: 'profile',
+              permission: 'M_actualSalesReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'actualSalesReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/actualSalesReport/list.vue'),
+                meta: {
+                  title: '实售销售列表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_actualSalesReportList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/reportData/salesAmountReport',
+            redirect: '/reportData/salesAmountReport/list',
+            name: 'salesAmountReport',
+            component: BlankLayout,
+            meta: {
+              title: '开单销售报表',
+              icon: 'profile',
+              permission: 'M_salesAmountReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [{
+              path: 'list',
+              name: 'salesAmountReportList',
+              component: () => import(/* webpackChunkName: "reportData" */
+                '@/views/reportData/salesAmountReport/list.vue'),
+              meta: {
+                title: '开单销售报表列表',
+                icon: 'profile',
+                hidden: true,
+                permission: 'M_salesAmountReportList'
+              }
+            }]
+          },
+          {
+            path: '/reportData/salesSlipReport',
+            redirect: '/reportData/salesSlipReport/list',
+            name: 'salesSlipReport',
+            component: BlankLayout,
+            meta: {
+              title: '开单销售单报表',
+              icon: 'profile',
+              permission: 'M_salesSlipReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [{
+              path: 'list',
+              name: 'salesSlipReportList',
+              component: () => import(/* webpackChunkName: "reportData" */
+                '@/views/reportData/salesSlipReport/list.vue'),
+              meta: {
+                title: '开单销售单报表列表',
+                icon: 'profile',
+                hidden: true,
+                permission: 'M_salesSlipReportList'
+              }
+            }]
+          },
           {
             path: '/reportData/allocationOrderTotal',
             redirect: '/reportData/allocationOrderTotal/list',
@@ -1079,98 +1152,26 @@ export const asyncRouterMap = [
             }]
           },
           {
-            path: '/reportData/salesSlipReport',
-            redirect: '/reportData/salesSlipReport/list',
-            name: 'salesSlipReport',
-            component: BlankLayout,
-            meta: {
-              title: '开单销售单报表',
-              icon: 'profile',
-              permission: 'M_salesSlipReportList'
-            },
-            hideChildrenInMenu: true,
-            children: [{
-              path: 'list',
-              name: 'salesSlipReportList',
-              component: () => import(/* webpackChunkName: "reportData" */
-                '@/views/reportData/salesSlipReport/list.vue'),
-              meta: {
-                title: '开单销售单报表列表',
-                icon: 'profile',
-                hidden: true,
-                permission: 'M_salesSlipReportList'
-              }
-            }]
-          },
-          {
-            path: '/reportData/returnSlipReport',
-            redirect: '/reportData/returnSlipReport/list',
-            name: 'returnSlipReport',
-            component: BlankLayout,
-            meta: {
-              title: '开单退货单报表',
-              icon: 'profile',
-              permission: 'M_returnSlipReportList'
-            },
-            hideChildrenInMenu: true,
-            children: [{
-              path: 'list',
-              name: 'returnSlipReportList',
-              component: () => import(/* webpackChunkName: "reportData" */
-                '@/views/reportData/returnSlipReport/list.vue'),
-              meta: {
-                title: '开单退货单报表列表',
-                icon: 'profile',
-                hidden: true,
-                permission: 'M_returnSlipReportList'
-              }
-            }]
-          },
-          {
-            path: '/reportData/salesAmountReport',
-            redirect: '/reportData/salesAmountReport/list',
-            name: 'salesAmountReport',
-            component: BlankLayout,
-            meta: {
-              title: '开单销售报表',
-              icon: 'profile',
-              permission: 'M_salesAmountReportList'
-            },
-            hideChildrenInMenu: true,
-            children: [{
-              path: 'list',
-              name: 'salesAmountReportList',
-              component: () => import(/* webpackChunkName: "reportData" */
-                '@/views/reportData/salesAmountReport/list.vue'),
-              meta: {
-                title: '开单销售报表列表',
-                icon: 'profile',
-                hidden: true,
-                permission: 'M_salesAmountReportList'
-              }
-            }]
-          },
-          {
-            path: '/reportData/actualSalesReport',
-            redirect: '/reportData/actualSalesReport/list',
-            name: 'actualSalesReport',
+            path: '/reportData/salesReturnReport',
+            redirect: '/reportData/salesReturnReport/list',
+            name: 'salesReturnReport',
             component: BlankLayout,
             meta: {
-              title: '实售销售报表',
+              title: '实售退货报表',
               icon: 'profile',
-              permission: 'M_actualSalesReportList'
+              permission: 'M_salesReturnReportList'
             },
             hideChildrenInMenu: true,
             children: [
               {
                 path: 'list',
-                name: 'actualSalesReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/actualSalesReport/list.vue'),
+                name: 'salesReturnReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/salesReturnReport/list.vue'),
                 meta: {
-                  title: '实售销售列表',
+                  title: '实售退货列表',
                   icon: 'profile',
                   hidden: true,
-                  permission: 'M_actualSalesReportList'
+                  permission: 'M_salesReturnReportList'
                 }
               }
             ]
@@ -1201,29 +1202,28 @@ export const asyncRouterMap = [
             ]
           },
           {
-            path: '/reportData/salesReturnReport',
-            redirect: '/reportData/salesReturnReport/list',
-            name: 'salesReturnReport',
+            path: '/reportData/returnSlipReport',
+            redirect: '/reportData/returnSlipReport/list',
+            name: 'returnSlipReport',
             component: BlankLayout,
             meta: {
-              title: '实售退货报表',
+              title: '开单退货单报表',
               icon: 'profile',
-              permission: 'M_salesReturnReportList'
+              permission: 'M_returnSlipReportList'
             },
             hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'salesReturnReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/salesReturnReport/list.vue'),
-                meta: {
-                  title: '实售退货列表',
-                  icon: 'profile',
-                  hidden: true,
-                  permission: 'M_salesReturnReportList'
-                }
+            children: [{
+              path: 'list',
+              name: 'returnSlipReportList',
+              component: () => import(/* webpackChunkName: "reportData" */
+                '@/views/reportData/returnSlipReport/list.vue'),
+              meta: {
+                title: '开单退货单报表列表',
+                icon: 'profile',
+                hidden: true,
+                permission: 'M_returnSlipReportList'
               }
-            ]
+            }]
           },
           {
             path: '/reportData/hPriceDifferenceDetailReport',
@@ -1275,6 +1275,31 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/reportData/regionTypeSalesReport',
+            redirect: '/reportData/regionTypeSalesReport/list',
+            name: 'regionTypeSalesReport',
+            component: BlankLayout,
+            meta: {
+              title: '各省品类实售明细',
+              icon: 'profile',
+              permission: 'M_regionTypeSalesReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'regionTypeSalesReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/regionTypeSalesReport/list.vue'),
+                meta: {
+                  title: '各省品类实售明细',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_regionTypeSalesReportList'
+                }
+              }
+            ]
+          },
           {
             path: '/reportData/warehousingOrder',
             redirect: '/reportData/warehousingOrder/list',
@@ -1399,107 +1424,32 @@ export const asyncRouterMap = [
                 }
               }
             ]
-          },
-          {
-            path: '/reportData/provinceTypeSalesDetails',
-            redirect: '/reportData/provinceTypeSalesDetails/list',
-            name: 'provinceTypeSalesDetails',
-            component: BlankLayout,
-            meta: {
-              title: '全国各省品类实际销售明细',
-              icon: 'profile',
-              permission: 'M_provinceTypeSalesDetailsList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'provinceTypeSalesDetailsList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/provinceTypeSalesDetails/list.vue'),
-                meta: {
-                  title: '全国各省品类实际销售明细列表',
-                  icon: 'profile',
-                  hidden: true,
-                  permission: 'M_provinceTypeSalesDetailsList'
-                }
-              }
-            ]
-          },
-          {
-            path: '/reportData/districtTypeSalesDetails',
-            redirect: '/reportData/districtTypeSalesDetails/list',
-            name: 'districtTypeSalesDetails',
-            component: BlankLayout,
-            meta: {
-              title: '全国各区品类实际销售明细',
-              icon: 'profile',
-              permission: 'M_districtTypeSalesDetailsList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'districtTypeSalesDetailsList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/districtTypeSalesDetails/list.vue'),
-                meta: {
-                  title: '全国各区品类实际销售明细列表',
-                  icon: 'profile',
-                  hidden: true,
-                  permission: 'M_districtTypeSalesDetailsList'
-                }
-              }
-            ]
-          },
-          {
-            path: '/reportData/regionalPromotionCostStatistics',
-            redirect: '/reportData/regionalPromotionCostStatistics/list',
-            name: 'regionalPromotionCostStatistics',
-            component: BlankLayout,
-            meta: {
-              title: '区域促销费用统计',
-              icon: 'profile',
-              permission: 'M_regionalPromotionCostStatisticsList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'regionalPromotionCostStatisticsList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/regionalPromotionCostStatistics/list.vue'),
-                meta: {
-                  title: '区域促销费用统计列表',
-                  icon: 'profile',
-                  hidden: true,
-                  permission: 'M_regionalPromotionCostStatisticsList'
-                }
-              }
-            ]
-          },
-          {
-            path: '/reportData/nationalCustomerCostStatistics',
-            redirect: '/reportData/nationalCustomerCostStatistics/list',
-            name: 'nationalCustomerCostStatistics',
-            component: BlankLayout,
-            meta: {
-              title: '全国客户费用统计',
-              icon: 'profile',
-              permission: 'M_nationalCustomerCostStatisticsList'
-            },
-            hideChildrenInMenu: true,
-            children: [
-              {
-                path: 'list',
-                name: 'nationalCustomerCostStatisticsList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/nationalCustomerCostStatistics/list.vue'),
-                meta: {
-                  title: '全国客户费用统计列表',
-                  icon: 'profile',
-                  hidden: true,
-                  permission: 'M_nationalCustomerCostStatisticsList'
-                }
-              }
-            ]
           }
+          // {
+          //   path: '/reportData/allCountryCostReport',
+          //   redirect: '/reportData/allCountryCostReport/list',
+          //   name: 'allCountryCostReport',
+          //   component: BlankLayout,
+          //   meta: {
+          //     title: '全国费用统计报表',
+          //     icon: 'profile'
+          //     // permission: 'M_nationalCustomerCostStatisticsList'
+          //   },
+          //   hideChildrenInMenu: true,
+          //   children: [
+          //     {
+          //       path: 'list',
+          //       name: 'allCountryCostReportList',
+          //       component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/allCountryCostReport/list.vue'),
+          //       meta: {
+          //         title: '全国费用统计报表',
+          //         icon: 'profile',
+          //         hidden: true
+          //         // permission: 'M_nationalCustomerCostStatisticsList'
+          //       }
+          //     }
+          //   ]
+          // }
         ]
       },
       // 数据导出

+ 1 - 1
src/layouts/UserLayout.vue

@@ -107,7 +107,7 @@ export default {
 
 				.title {
 					font-size: 33px;
-					color: rgba(0, 0, 0, 0.85);
+					color: rgba(0, 0, 0);
 					font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif;
 					font-weight: 600;
 					position: relative;

+ 28 - 0
src/libs/versionUpdate.js

@@ -0,0 +1,28 @@
+import axios from 'axios'
+import modal from 'ant-design-vue/es/modal'
+const isNewVersion = () => {
+  const url = `//${window.location.host}/version.json?t=${new Date().getTime()}`
+  axios.get(url).then(res => {
+    if (res.status === 200) {
+      const vueVersion = res.data.version
+      const message = res.data.message
+      const localVueVersion = localStorage.getItem('vueVersion-ocs')
+      if (localVueVersion && localVueVersion != vueVersion) {
+        localStorage.setItem('vueVersion-ocs', vueVersion)
+        modal.info({
+          title: '提示',
+          content: message,
+          onOk () {
+            window.location.reload()
+          }
+        })
+      } else {
+        localStorage.setItem('vueVersion-ocs', vueVersion)
+      }
+    }
+  })
+}
+
+export default {
+  isNewVersion
+}

+ 3 - 1
src/permission.js

@@ -7,13 +7,15 @@ import '@/components/NProgress/nprogress.less' // progress bar custom style
 import notification from 'ant-design-vue/es/notification'
 import { setDocumentTitle, domTitle } from '@/utils/domUtil'
 import { ACCESS_TOKEN } from '@/store/mutation-types'
-
+import versionTood from '@/libs/versionUpdate'
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
 
 const whiteList = ['login', 'register', 'registerResult'] // no redirect whitelist
 const defaultRoutePath = '/home'
 
 router.beforeEach((to, from, next) => {
+  // 判断当前代码版本是否与服务器中代码版本一致,如不一致则刷新页面获取最新
+  versionTood.isNewVersion()
   NProgress.start() // start progress bar
   to.meta && (typeof to.meta.title !== 'undefined' && setDocumentTitle(`${to.meta.title} - ${domTitle}`))
   let token = store.state.user.token || sessionStorage.getItem(ACCESS_TOKEN)

+ 8 - 1
src/utils/request.js

@@ -62,13 +62,20 @@ service.interceptors.response.use((response) => {
       }
     })
   }
-  if ((response.data.status == '401' || response.data.status == '900' || response.data.status == '500') && window.location.pathname != '/user/login') {
+  if ((response.data.status == '401' || response.data.status == '500') && window.location.pathname != '/user/login') {
     notification.destroy()
     notification.error({
       message: '提示',
       description: response.data.message
     })
   }
+  if (response.data.status == '900' && window.location.pathname != '/user/login') {
+    notification.destroy()
+    notification.error({
+      message: response.data.message,
+      description: response.data.code
+    })
+  }
   return response.data
 }, err)
 

+ 1 - 1
src/views/allocationManagement/transferOut/basicInfoModal.vue

@@ -37,7 +37,7 @@
             <a-spin v-if="fetching" slot="notFoundContent" size="small" />
             <a-select-option v-for="item in dealerData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
           </a-select>
-          <a-input v-if="!isDealer" v-model="form.targetName" placeholder="请输入调往对象名称(最多30个字符)" allowClear :maxLength="30" />
+          <a-input v-if="!isDealer" v-model.trim="form.targetName" placeholder="请输入调往对象名称(最多30个字符)" allowClear :maxLength="30" />
         </a-form-model-item>
         <a-form-model-item label="调拨类型" prop="allocateTypeSn">
           <a-select id="allocateBill-basicInfo-allocateTypeSn" v-model="form.allocateTypeSn" placeholder="请选择调拨类型" allowClear >

+ 5 - 5
src/views/allocationManagement/transferOut/edit.vue

@@ -64,17 +64,17 @@
                 <a-row :gutter="15">
                   <a-col :md="6" :sm="24">
                     <a-form-item label="产品编码" prop="productCode">
-                      <a-input id="allocateBillEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+                      <a-input id="allocateBillEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24">
                     <a-form-item label="产品名称" prop="productName">
-                      <a-input id="allocateBillEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                      <a-input id="allocateBillEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24">
                     <a-form-item label="原厂编码" prop="productOrigCode">
-                      <a-input id="allocateBillEdit-productOrigCode" v-model="queryParam.productOrigCode" placeholder="请输入原厂编码" allowClear />
+                      <a-input id="allocateBillEdit-productOrigCode" v-model.trim="queryParam.productOrigCode" placeholder="请输入原厂编码" allowClear />
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -126,12 +126,12 @@
                     <a-row :gutter="15">
                       <a-col :md="9" :sm="24">
                         <a-form-item label="产品编码" prop="productCode">
-                          <a-input id="allocateBillEdit-productCode" v-model="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
+                          <a-input id="allocateBillEdit-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
                         </a-form-item>
                       </a-col>
                       <a-col :md="9" :sm="24">
                         <a-form-item label="产品名称" prop="productName">
-                          <a-input id="allocateBillEdit-productName" v-model="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
+                          <a-input id="allocateBillEdit-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
                         </a-form-item>
                       </a-col>
                       <a-col :md="6" :sm="24" style="margin-bottom: 10px;">

+ 3 - 3
src/views/allocationManagement/transferOut/list.vue

@@ -301,9 +301,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()
@@ -338,6 +338,6 @@ export default {
 		cursor: pointer;
 	}
 	.common{
-		color: rgba(0, 0, 0, 0.65);
+		color: rgba(0, 0, 0);
 	}
 </style>

+ 1 - 1
src/views/basicData/warehouse/storingLocation/editModal.vue

@@ -23,7 +23,7 @@
             <a-input
               id="storingLocationEdit-name"
               :maxLength="30"
-              v-model="form.name"
+              v-model.trim="form.name"
               placeholder="请输入仓位名称(最多30个字符)"
               allowClear />
           </a-form-model-item>

+ 1 - 1
src/views/basicData/warehouse/storingLocation/list.vue

@@ -5,7 +5,7 @@
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="storingLocationList-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <strong style="color: rgba(0, 0, 0, 0.65);margin-left: 50px;">所属仓库:{{ $route.query.name }}</strong>
+          <strong style="color: rgba(0, 0, 0);margin-left: 50px;">所属仓库:{{ $route.query.name }}</strong>
         </template>
       </a-page-header>
       <a-card size="small" :bordered="false" class="storingLocationList-cont">

+ 1 - 1
src/views/bnSetting/menu/adminMenus.vue

@@ -449,7 +449,7 @@ export default {
     border-radius: 5px;
     padding: 5px 10px 5px 20px;
     margin: 10px 0;
-    color: rgba(0, 0, 0, 0.85);
+    color: rgba(0, 0, 0);
   }
   .imgSize{
     color: #2d8cf0;

+ 1 - 1
src/views/bnSetting/menu/storeMenus.vue

@@ -486,7 +486,7 @@ export default {
     border-radius: 5px;
     padding: 5px 10px 5px 20px;
     margin: 10px 0;
-    color: rgba(0, 0, 0, 0.85);
+    color: rgba(0, 0, 0);
   }
   .imgSize{
     color: #2d8cf0;

+ 2 - 2
src/views/common/auditModal.vue

@@ -91,7 +91,7 @@ export default {
       display: flex;
       .audit-cont{
         .audit-tit{
-          color: rgba(0, 0, 0, 0.85);
+          color: rgba(0, 0, 0);
           font-weight: 500;
           font-size: 16px;
           line-height: 1.4;
@@ -99,7 +99,7 @@ export default {
         }
         .audit-txt{
           margin: 8px 0 0;
-          color: rgba(0, 0, 0, 0.65);
+          color: rgba(0, 0, 0);
           font-size: 14px;
           line-height: 1.5;
         }

+ 90 - 83
src/views/common/chooseCustomerModal.vue

@@ -8,80 +8,84 @@
     v-model="isShow"
     @cancle="isShow=false"
     :width="900">
-    <div class="chooseCustomer-con">
-      <!-- 搜索条件 -->
-      <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="chooseCustomer-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入客户名称"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="12" :sm="24">
-              <a-row>
-                <a-form-item label="地区">
-                  <a-col span="7">
-                    <a-form-item prop="provinceSn" style="margin: 0;">
-                      <a-select v-model="queryParam.provinceSn" allowClear @change="getCityList" placeholder="请选择省">
-                        <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </a-col>
-                  <a-col span="7" offset="1">
-                    <a-form-item prop="citySn" style="margin: 0;">
-                      <a-select v-model="queryParam.citySn" allowClear @change="getAreaList" placeholder="请选择市">
-                        <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </a-col>
-                  <a-col span="7" offset="1">
-                    <a-form-item prop="districtSn" style="margin: 0;">
-                      <a-select v-model="queryParam.districtSn" allowClear placeholder="请选择区/县">
-                        <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </a-col>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="chooseCustomer-con">
+        <!-- 搜索条件 -->
+        <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="chooseCustomer-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入客户名称"/>
                 </a-form-item>
-              </a-row>
-            </a-col>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="promotionRulesList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="promotionRulesList-reset">重置</a-button>
-            </a-col>
-          </a-row>
-        </a-form>
+              </a-col>
+              <a-col :md="12" :sm="24">
+                <a-row>
+                  <a-form-item label="地区">
+                    <a-col span="7">
+                      <a-form-item prop="provinceSn" style="margin: 0;">
+                        <a-select v-model="queryParam.provinceSn" allowClear @change="getCityList" placeholder="请选择省">
+                          <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
+                        </a-select>
+                      </a-form-item>
+                    </a-col>
+                    <a-col span="7" offset="1">
+                      <a-form-item prop="citySn" style="margin: 0;">
+                        <a-select v-model="queryParam.citySn" allowClear @change="getAreaList" placeholder="请选择市">
+                          <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
+                        </a-select>
+                      </a-form-item>
+                    </a-col>
+                    <a-col span="7" offset="1">
+                      <a-form-item prop="districtSn" style="margin: 0;">
+                        <a-select v-model="queryParam.districtSn" allowClear placeholder="请选择区/县">
+                          <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+                        </a-select>
+                      </a-form-item>
+                    </a-col>
+                  </a-form-item>
+                </a-row>
+              </a-col>
+              <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="promotionRulesList-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="promotionRulesList-reset">重置</a-button>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <p style="font-weight: bold;">当前已选:{{ rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length }}个</p>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.dealerSn"
+          rowKeyName="dealerSn"
+          :row-selection="{ columnWidth: 40 }"
+          @rowSelection="rowSelectionFun"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          bordered>
+        </s-table>
+        <!-- 按钮 -->
+        <div class="btn-con">
+          <a-button
+            type="primary"
+            id="chooseCustomer-submit"
+            size="large"
+            class="button-primary"
+            style="padding: 0 60px;"
+            @click="handleSubmit">确定</a-button>
+          <a-button
+            id="chooseCustomer-cancel"
+            size="large"
+            class="button-cancel"
+            @click="isShow=false"
+            style="padding: 0 60px;margin-left: 15px;">取消</a-button>
+        </div>
       </div>
-      <p style="font-weight: bold;">当前已选:{{ selectedRowKeys.length }}个</p>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
-        :rowKey="(record) => record.dealerSn"
-        :columns="columns"
-        :data="loadData"
-        :defaultLoadData="false"
-        bordered>
-      </s-table>
-      <!-- 按钮 -->
-      <div class="btn-con">
-        <a-button
-          type="primary"
-          id="chooseCustomer-submit"
-          size="large"
-          class="button-primary"
-          style="padding: 0 60px;"
-          @click="handleSubmit">确定</a-button>
-        <a-button
-          id="chooseCustomer-cancel"
-          size="large"
-          class="button-cancel"
-          @click="isShow=false"
-          style="padding: 0 60px;margin-left: 15px;">取消</a-button>
-      </div>
-    </div>
+    </a-spin>
   </a-modal>
 </template>
 
@@ -106,6 +110,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       disabled: false, //  查询、重置按钮是否可操作
       queryParam: {
@@ -121,6 +126,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        this.spinning = true
         return dealerQueryList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
@@ -131,16 +137,21 @@ export default {
             }
             this.disabled = false
           }
+          this.spinning = false
           return data
         })
       },
-      selectedRowKeys: [],
       addrProvinceList: [], //  省下拉
       addrCityList: [], //  市下拉
-      addrDistrictList: [] //  区下拉
+      addrDistrictList: [], //  区下拉
+      rowSelectionInfo: null
     }
   },
   methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
     //  重置
     resetSearchForm () {
       this.resetData()
@@ -156,17 +167,13 @@ export default {
     },
     //  确定
     handleSubmit () {
-      if (this.selectedRowKeys.length < 1) {
+      if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length < 1)) {
         this.$message.warning('请在列表勾选后再进行操作!')
         return
       }
-      this.$emit('ok', this.selectedRowKeys)
+      this.$emit('ok', this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys)
       this.isShow = false
     },
-    onSelectChange (selectedRowKeys, selectedRows) {
-      console.log('selectedRowKeys changed: ', selectedRowKeys, selectedRows)
-      this.selectedRowKeys = selectedRowKeys
-    },
     // 获取城市列表
     getCityList (val) {
       this.addrCityList = []
@@ -225,14 +232,14 @@ export default {
         this.$emit('close')
         this.resetData()
       } else {
-        this.selectedRowKeys = this.chooseCust
         if (this.addrProvinceList.length == 0) {
           this.getArea('province')
         }
         const _this = this
-        setTimeout(() => {
+        this.$nextTick(() => { // 页面渲染完成后的回调
           _this.$refs.table.refresh(true)
-        }, 200)
+          _this.$refs.table.setTableSelected(_this.chooseCust, []) // 设置表格选中项
+        })
       }
     }
   }

+ 136 - 205
src/views/common/chooseProductsModal.vue

@@ -8,109 +8,95 @@
     v-model="isShow"
     @cancle="isShow=false"
     :width="900">
-    <div class="products-con">
-      <div>
-        <!-- 搜索条件 -->
-        <div class="table-page-search-wrapper">
-          <a-form-model
-            ref="ruleForm"
-            class="form-model-con"
-            layout="inline"
-            :model="queryParam"
-            :rules="rules"
-            @keyup.enter.native="getProductList(1)"
-            :label-col="formItemLayout.labelCol"
-            :wrapper-col="formItemLayout.wrapperCol">
-            <a-row :gutter="15">
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="产品编码" prop="code">
-                  <a-input id="chooseProducts-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="产品品牌" :prop="type=='dealership'?'productBrandSn':''">
-                  <a-select
-                    placeholder="请选择产品品牌"
-                    id="chooseProducts-productBrandSn"
-                    allowClear
-                    v-model="queryParam.productBrandSn"
-                    :showSearch="true"
-                    option-filter-prop="children"
-                    :filter-option="filterOption">
-                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                  </a-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="产品分类" :prop="type=='dealership'?'productType':''">
-                  <a-cascader
-                    @change="changeProductType"
-                    change-on-select
-                    v-model="queryParam.productType"
-                    expand-trigger="hover"
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="chooseProducts-productType"
-                    placeholder="请选择产品分类"
-                    allowClear />
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chooseProducts-refresh">查询</a-button>
-                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chooseProducts-reset">重置</a-button>
-              </a-col>
-            </a-row>
-          </a-form-model></a-form>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="products-con">
+        <div>
+          <!-- 搜索条件 -->
+          <div class="table-page-search-wrapper">
+            <a-form-model
+              ref="ruleForm"
+              class="form-model-con"
+              layout="inline"
+              :model="queryParam"
+              :rules="rules"
+              @keyup.enter.native="handleSearch"
+              :label-col="formItemLayout.labelCol"
+              :wrapper-col="formItemLayout.wrapperCol">
+              <a-row :gutter="15">
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="产品编码" prop="code">
+                    <a-input id="chooseProducts-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="产品品牌" :prop="type=='dealership'?'productBrandSn':''">
+                    <a-select
+                      placeholder="请选择产品品牌"
+                      id="chooseProducts-productBrandSn"
+                      allowClear
+                      v-model="queryParam.productBrandSn"
+                      :showSearch="true"
+                      option-filter-prop="children"
+                      :filter-option="filterOption">
+                      <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                    </a-select>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="产品分类" :prop="type=='dealership'?'productType':''">
+                    <a-cascader
+                      @change="changeProductType"
+                      change-on-select
+                      v-model="queryParam.productType"
+                      expand-trigger="hover"
+                      :options="productTypeList"
+                      :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                      id="chooseProducts-productType"
+                      placeholder="请选择产品分类"
+                      allowClear />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                  <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chooseProducts-refresh">查询</a-button>
+                  <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chooseProducts-reset">重置</a-button>
+                </a-col>
+              </a-row>
+            </a-form-model></a-form>
+          </div>
+          <p style="font-weight: bold;">当前已选:{{ rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length }}个</p>
+          <!-- 列表 -->
+          <s-table
+            class="sTable"
+            ref="table"
+            size="small"
+            :rowKey="(record) => record.productSn"
+            rowKeyName="productSn"
+            :row-selection="{ columnWidth: 40, getCheckboxProps:record =>({props: { disabled: (this.type == 'supplier') && (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.indexOf(record.productSn) > -1) }}) }"
+            @rowSelection="rowSelectionFun"
+            :columns="columns"
+            :data="loadData"
+            :defaultLoadData="false"
+            bordered>
+          </s-table>
+        </div>
+        <!-- 按钮 -->
+        <div class="btn-con">
+          <a-button
+            type="primary"
+            id="chooseProducts-save"
+            size="large"
+            class="button-primary"
+            @click="handleSave"
+            style="padding: 0 60px;">保存</a-button>
+          <a-button
+            id="chooseProducts-cancel"
+            size="large"
+            class="button-cancel"
+            @click="isShow=false"
+            style="padding: 0 60px;margin-left: 15px;">取消</a-button>
         </div>
-        <p style="font-weight: bold;">当前已选:{{ selectedRowKeys.length }}个</p>
-        <!-- 列表 -->
-        <a-table
-          class="sTable"
-          ref="table"
-          size="small"
-          :rowKey="(record) => record.productSn"
-          :row-selection="{
-            selectedRowKeys: selectedRowKeys,
-            onChange: onChange,
-            onSelect: onSelectChange,
-            onSelectAll: onSelectAllChange,
-            getCheckboxProps:record =>({props: {
-              disabled: (this.type == 'supplier') && (this.selectedRowKeys.indexOf(record.productSn) > -1)
-            }})
-          }"
-          :data-source="loadData"
-          :columns="columns"
-          :pagination="false"
-          :loading="loading"
-          :scroll="{ y: 450 }"
-          bordered>
-        </a-table>
-        <!-- 分页 -->
-        <tablePagination
-          ref="tablePagination"
-          :total="paginationProps.total"
-          :current="paginationProps.current"
-          :pageSize="paginationProps.pageSize"
-          @changePageSize="changePageSize"
-          @changePage="changePage" />
-      </div>
-      <!-- 按钮 -->
-      <div class="btn-con">
-        <a-button
-          type="primary"
-          id="chooseProducts-save"
-          size="large"
-          class="button-primary"
-          @click="handleSave"
-          style="padding: 0 60px;">保存</a-button>
-        <a-button
-          id="chooseProducts-cancel"
-          size="large"
-          class="button-cancel"
-          @click="isShow=false"
-          style="padding: 0 60px;margin-left: 15px;">取消</a-button>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
 </template>
 
@@ -146,6 +132,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
         labelCol: { span: 4 },
@@ -170,19 +157,42 @@ export default {
         { title: '产品编码', dataIndex: 'code', align: 'center' },
         { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } }
       ],
-      loadData: [],
-      paginationProps: {
-        total: 0, //  分页总条数
-        current: 1,
-        pageSize: 20
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        let url = productPricedList //  获取定过价的产品
+        if (this.type == 'supplier') { //  供应商增加产品
+          url = productPricingList //  获取定价产品
+        }
+        const params = Object.assign(parameter, this.queryParam)
+        if (this.type != 'supplier' && this.type != 'dealership') { //  促销
+          params.onlineFalg = 1
+        }
+        return url(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
       },
       productBrandList: [], //  品牌下拉数据
       productTypeList: [], //  分类下拉数据
-      selectedRowKeys: [],
-      selectedRows: []
+      rowSelectionInfo: null
     }
   },
   methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
     // 查询
     handleSearch () {
       const _this = this
@@ -221,11 +231,11 @@ export default {
             }
             dealerScopeValidProduct(params).then(res => {
               if (res.status == 200) {
-                _this.getProductList(1)
+                _this.$refs.table.refresh(true)
               }
             })
           } else {
-            _this.getProductList(1)
+            _this.$refs.table.refresh(true)
           }
         } else {
           return false
@@ -240,116 +250,32 @@ export default {
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
       this.queryParam.productType = []
-      this.paginationProps.total = 0
-      this.paginationProps.current = 1
-      this.paginationProps.pageSize = 20
     },
     //  重置
     resetSearchForm () {
       this.resetData()
-      this.loadData = []
-      this.disabled = false
+      this.$refs.table.clearTable()
     },
     // 保存
     handleSave () {
       const _this = this
-      if (this.selectedRowKeys.length < 1) {
+      if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length < 1)) {
         this.$message.warning('请在列表勾选后再进行操作!')
         return
       }
       if (this.type == 'supplier') { //  供应商增加产品
         const arr = []
-        this.selectedRowKeys.map(item => {
+        this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.map(item => {
           if (_this.chooseData.indexOf(item) == -1) {
             arr.push(item)
           }
         })
         this.$emit('ok', arr)
       } else {
-        this.$emit('ok', this.selectedRows)
+        this.$emit('ok', this.rowSelectionInfo && this.rowSelectionInfo.selectedRows)
       }
       this.isShow = false
     },
-    onChange (selectedRowKeys, selectedRows) {
-      this.selectedRowKeys = selectedRowKeys
-    },
-    onSelectChange (record, selected, selectedRows, nativeEvent) {
-      if (this.type != 'supplier') { //  供应商增加产品
-        if (selected) { //  选择
-          this.selectedRows.push(record)
-        } else { //  取消
-          this.selectedRows = selectedRows
-        }
-      }
-    },
-    // 本页全选/取消全选
-    onSelectAllChange (selected, selectedRows, changeRows) {
-      const _this = this
-      if (this.type != 'supplier') { //  供应商增加产品
-        if (selected) { //  选择
-          this.selectedRows = [...this.selectedRows, ...changeRows]
-        } else { //  取消
-          const arrId = []
-          this.selectedRows.map((item, index) => {
-            this.selectedRows.map((subItem, ind) => {
-              if (item.productSn == subItem.productSn) {
-                arrId.push(index)
-              }
-            })
-          })
-          arrId.map((item, index) => {
-            _this.selectedRows = _this.selectedRows.slice(item, item + 1)
-          })
-        }
-      }
-    },
-    // 产品列表
-    getProductList (pageNo) {
-      this.paginationProps.current = pageNo || this.paginationProps.current
-      this.disabled = true
-      const params = {
-        pageNo: this.paginationProps.current,
-        pageSize: this.paginationProps.pageSize
-      }
-      this.loading = true
-      let url = productPricedList //  获取定过价的产品
-      if (this.type == 'supplier') { //  供应商增加产品
-        url = productPricingList //  获取定价产品
-      }
-      if (this.type != 'supplier' && this.type != 'dealership') { //  促销
-        params.onlineFalg = 1
-      }
-      url(Object.assign(params, this.queryParam)).then(res => {
-        this.loading = false
-        if (res.status == 200) {
-          const data = res.data
-          this.paginationProps.total = Number(res.data.count) || 0
-          this.paginationProps.current = data.pageNo
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          this.loadData = data.list
-          this.disabled = false
-        } else {
-          this.paginationProps.total = 0
-          this.paginationProps.current = 1
-          this.paginationProps.pageSize = 20
-          this.loadData = []
-        }
-      })
-    },
-    //  已选产品 分页  一页多少条change
-    changePageSize (current, pageSize) {
-      this.paginationProps.current = current
-      this.paginationProps.pageSize = pageSize
-      this.getProductList()
-    },
-    //  已选产品 分页 页码change
-    changePage (current) {
-      this.paginationProps.current = current
-      this.getProductList()
-    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
@@ -401,20 +327,25 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
-        this.loadData = []
-        this.disabled = false
+        this.$refs.table.clearTable()
         this.resetData()
       } else {
+        const _this = this
+        let selectedRows = []
+        let selectedRowKeys = []
         if (this.type == 'supplier') { //  供应商增加产品
-          this.selectedRows = []
-          this.selectedRowKeys = this.chooseData
+          selectedRows = []
+          selectedRowKeys = this.chooseData
         } else {
-          this.selectedRows = this.chooseData
-          this.selectedRowKeys = []
+          selectedRows = this.chooseData
+          selectedRowKeys = []
           this.chooseData.map(item => {
-            this.selectedRowKeys.push(item.goodsSn)
+            selectedRowKeys.push(item.goodsSn)
           })
         }
+        this.$nextTick(() => { // 页面渲染完成后的回调
+          _this.$refs.table.setTableSelected(selectedRowKeys, selectedRows) // 设置表格选中项
+        })
         if (this.productBrandList.length == 0) {
           this.getProductBrand()
         }

+ 101 - 185
src/views/common/chooseSupplierModal.vue

@@ -8,93 +8,82 @@
     v-model="isShow"
     @cancle="isShow=false"
     :width="900">
-    <div class="products-con">
-      <div>
-        <!-- 搜索条件 -->
-        <div class="table-page-search-wrapper">
-          <a-form-model
-            ref="ruleForm"
-            class="form-model-con"
-            layout="inline"
-            :model="queryParam"
-            :rules="rules"
-            @keyup.enter.native="getSupplierList(1)"
-            :label-col="formItemLayout.labelCol"
-            :wrapper-col="formItemLayout.wrapperCol">
-            <a-row :gutter="15">
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="供应商名称">
-                  <a-input id="chooseSupplier-supplierName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入供应商名称"/>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="状态">
-                  <v-select code="ENABLE_FLAG" id="chooseSupplier-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></v-select>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chooseSupplier-refresh">查询</a-button>
-                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chooseSupplier-reset">重置</a-button>
-              </a-col>
-            </a-row>
-          </a-form-model></a-form>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="products-con">
+        <div>
+          <!-- 搜索条件 -->
+          <div class="table-page-search-wrapper">
+            <a-form-model
+              ref="ruleForm"
+              class="form-model-con"
+              layout="inline"
+              :model="queryParam"
+              :rules="rules"
+              @keyup.enter.native="$refs.table.refresh(true)"
+              :label-col="formItemLayout.labelCol"
+              :wrapper-col="formItemLayout.wrapperCol">
+              <a-row :gutter="15">
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="供应商名称">
+                    <a-input id="chooseSupplier-supplierName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入供应商名称"/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="状态">
+                    <v-select code="ENABLE_FLAG" id="chooseSupplier-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></v-select>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                  <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="chooseSupplier-refresh">查询</a-button>
+                  <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chooseSupplier-reset">重置</a-button>
+                </a-col>
+              </a-row>
+            </a-form-model>
+          </div>
+          <p style="font-weight: bold;">当前已选:{{ rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length }}个</p>
+          <!-- 列表 -->
+          <s-table
+            class="sTable"
+            ref="table"
+            size="small"
+            :rowKey="(record) => record.supplierSn"
+            rowKeyName="supplierSn"
+            :row-selection="{ columnWidth: 40 }"
+            @rowSelection="rowSelectionFun"
+            :columns="columns"
+            :data="loadData"
+            :scroll="{ y: 450 }"
+            :defaultLoadData="false"
+            bordered>
+          </s-table>
+        </div>
+        <!-- 按钮 -->
+        <div class="btn-con">
+          <a-button
+            type="primary"
+            id="chooseSupplier-save"
+            size="large"
+            class="button-primary"
+            @click="handleSave"
+            style="padding: 0 60px;">保存</a-button>
+          <a-button
+            id="chooseSupplier-cancel"
+            size="large"
+            class="button-cancel"
+            @click="isShow=false"
+            style="padding: 0 60px;margin-left: 15px;">取消</a-button>
         </div>
-        <p style="font-weight: bold;">当前已选:{{ selectedRowKeys.length }}个</p>
-        <!-- 列表 -->
-        <a-table
-          class="sTable"
-          ref="table"
-          size="small"
-          :rowKey="(record) => record.supplierSn"
-          :row-selection="{
-            selectedRowKeys: selectedRowKeys,
-            onChange: onChange,
-            onSelect: onSelectChange,
-            onSelectAll: onSelectAllChange
-          }"
-          :data-source="loadData"
-          :columns="columns"
-          :pagination="false"
-          :loading="loading"
-          :scroll="{ y: 450 }"
-          bordered>
-        </a-table>
-        <!-- 分页 -->
-        <tablePagination
-          ref="tablePagination"
-          :total="paginationProps.total"
-          :current="paginationProps.current"
-          :pageSize="paginationProps.pageSize"
-          @changePageSize="changePageSize"
-          @changePage="changePage" />
-      </div>
-      <!-- 按钮 -->
-      <div class="btn-con">
-        <a-button
-          type="primary"
-          id="chooseSupplier-save"
-          size="large"
-          class="button-primary"
-          @click="handleSave"
-          style="padding: 0 60px;">保存</a-button>
-        <a-button
-          id="chooseSupplier-cancel"
-          size="large"
-          class="button-cancel"
-          @click="isShow=false"
-          style="padding: 0 60px;margin-left: 15px;">取消</a-button>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
 </template>
 
 <script>
 import { STable, VSelect } from '@/components'
-import tablePagination from '@/views/common/tablePagination.vue'
 import { supplierList } from '@/api/supplier'
 export default {
   name: 'ChooseSupplierModal',
-  components: { STable, VSelect, tablePagination },
+  components: { STable, VSelect },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -113,6 +102,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
         labelCol: { span: 4 },
@@ -124,126 +114,51 @@ export default {
       },
       rules: {},
       disabled: false, //  查询、重置按钮是否可操作
-      loading: false, //  表格加载中
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '供应商名称', dataIndex: 'supplierName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '状态', dataIndex: 'enableFlagDictValue', align: 'center', customRender: function (text) { return text || '--' } }
       ],
-      loadData: [],
-      paginationProps: {
-        total: 0, //  分页总条数
-        current: 1,
-        pageSize: 20
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return supplierList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
       },
-      selectedRowKeys: [],
-      selectedRows: []
+      rowSelectionInfo: null
     }
   },
   methods: {
-    // 查询
-    handleSearch () {
-      const _this = this
-      _this.$refs.ruleForm.validate(valid => {
-        if (valid) {
-          _this.getSupplierList(1)
-        } else {
-          return false
-        }
-      })
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
     },
-    // 重置数据
-    resetData () {
+    // 重置
+    resetSearchForm () {
       this.queryParam.supplierName = ''
       this.queryParam.enabledFlag = undefined
-      this.paginationProps.total = 0
-      this.paginationProps.total = 0
-      this.paginationProps.current = 1
-      this.paginationProps.pageSize = 20
-    },
-    //  重置
-    resetSearchForm () {
-      this.resetData()
-      this.loadData = []
-      this.disabled = false
+      this.$refs.table.refresh(true)
     },
     // 保存
     handleSave () {
-      if (this.selectedRowKeys.length < 1) {
+      if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length < 1)) {
         this.$message.warning('请在列表勾选后再进行操作!')
         return
       }
-      this.$emit('ok', this.selectedRows)
+      this.$emit('ok', this.rowSelectionInfo && this.rowSelectionInfo.selectedRows)
       this.isShow = false
-    },
-    onChange (selectedRowKeys, selectedRows) {
-      this.selectedRowKeys = selectedRowKeys
-    },
-    onSelectChange (record, selected, selectedRows, nativeEvent) {
-      if (selected) { //  选择
-        this.selectedRows.push(record)
-      } else { //  取消
-        this.selectedRows = selectedRows
-      }
-    },
-    // 本页全选/取消全选
-    onSelectAllChange (selected, selectedRows, changeRows) {
-      const _this = this
-      if (selected) { //  选择
-        this.selectedRows = [...this.selectedRows, ...changeRows]
-      } else { //  取消
-        const arrId = []
-        this.selectedRows.map((item, index) => {
-          this.selectedRows.map((subItem, ind) => {
-            if (item.supplierSn == subItem.supplierSn) {
-              arrId.push(index)
-            }
-          })
-        })
-        arrId.map((item, index) => {
-          _this.selectedRows = _this.selectedRows.slice(item, item + 1)
-        })
-      }
-    },
-    // 供应商列表
-    getSupplierList (pageNo) {
-      this.paginationProps.current = pageNo || this.paginationProps.current
-      this.disabled = true
-      const params = {
-        pageNo: this.paginationProps.current,
-        pageSize: this.paginationProps.pageSize
-      }
-      this.loading = true
-      supplierList(Object.assign(params, this.queryParam)).then(res => {
-        this.loading = false
-        if (res.status == 200) {
-          const data = res.data
-          this.paginationProps.total = Number(res.data.count) || 0
-          this.paginationProps.current = data.pageNo
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          this.loadData = data.list
-          this.disabled = false
-        } else {
-          this.paginationProps.total = 0
-          this.paginationProps.current = 1
-          this.paginationProps.pageSize = 20
-          this.loadData = []
-        }
-      })
-    },
-    //  已选产品 分页  一页多少条change
-    changePageSize (current, pageSize) {
-      this.paginationProps.current = current
-      this.paginationProps.pageSize = pageSize
-      this.getSupplierList()
-    },
-    //  已选产品 分页 页码change
-    changePage (current) {
-      this.paginationProps.current = current
-      this.getSupplierList()
     }
   },
   watch: {
@@ -255,15 +170,16 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
-        this.loadData = []
-        this.disabled = false
-        this.resetData()
+        this.resetSearchForm()
       } else {
-        this.getSupplierList(1)
-        this.selectedRows = this.chooseData
-        this.selectedRowKeys = []
+        const _this = this
+        const selectedRowKeys = []
         this.chooseData.map(item => {
-          this.selectedRowKeys.push(item.rangeDataSn)
+          selectedRowKeys.push(item.rangeDataSn)
+        })
+        this.$nextTick(() => { // 页面渲染完成后的回调
+          _this.$refs.table.refresh(true)
+          _this.$refs.table.setTableSelected(selectedRowKeys, _this.chooseData) // 设置表格选中项
         })
       }
     }

+ 5 - 6
src/views/common/commonModal.vue

@@ -6,6 +6,7 @@
     :maskClosable="false"
     v-model="isShow"
     :title="modalTit"
+    :bodyStyle="{padding: modalTit?'25px 32px 20px':'50px 32px 15px'}"
     @cancle="isShow=false"
     :width="416">
     <a-spin :spinning="spinning" tip="Loading...">
@@ -83,14 +84,12 @@ export default {
 
 <style lang="less">
   .common-modal{
-    .ant-modal-body{
-      padding: 32px 32px 24px;
-    }
     .common-main{
       display: flex;
+      line-height: 20px;
       .common-cont{
         .common-tit{
-          color: rgba(0, 0, 0, 0.85);
+          color: rgba(0, 0, 0);
           font-weight: 500;
           font-size: 16px;
           line-height: 1.4;
@@ -98,7 +97,7 @@ export default {
         }
         .common-txt{
           margin: 8px 0 0;
-          color: rgba(0, 0, 0, 0.65);
+          color: rgba(0, 0, 0);
           font-size: 14px;
           line-height: 1.5;
         }
@@ -106,7 +105,7 @@ export default {
     }
     .btn-box{
       text-align: right;
-      margin-top: 24px;
+      margin-top: 20px;
     }
   }
 </style>

+ 1 - 1
src/views/dealerManagement/marketingDivisionSet/editModal.vue

@@ -23,7 +23,7 @@
             <a-input
               id="marketingDivisionSetEdit-subareaName"
               :maxLength="30"
-              v-model="form.subareaName"
+              v-model.trim="form.subareaName"
               @change="filterEmpty"
               placeholder="请输入分区名称(最多30个字符)"
               allowClear />

+ 4 - 3
src/views/dealerManagement/merchantInfoManagement/edit.vue

@@ -92,7 +92,7 @@
                     <a-input
                       id="merchantInfoManagementEdit-address"
                       :maxLength="60"
-                      v-model="form.address"
+                      v-model.trim="form.address"
                       placeholder="请输入详细地址(最多60个字符)"
                       allowClear />
                   </a-form-model-item>
@@ -276,7 +276,7 @@
                     <a-input
                       id="merchantInfoManagementEdit-receiveAddress"
                       :maxLength="60"
-                      v-model="form.receiveAddress"
+                      v-model.trim="form.receiveAddress"
                       placeholder="请输入收货详细地址(最多60个字符)"
                       allowClear />
                   </a-form-model-item>
@@ -325,7 +325,7 @@
                     <a-input
                       id="merchantInfoManagementEdit-jgAutoPartsCode"
                       :maxLength="30"
-                      v-model="form.jgAutoPartsCode"
+                      v-model.trim="form.jgAutoPartsCode"
                       placeholder="请输入箭冠汽配代码(最多30个字符)"
                       allowClear />
                   </a-form-model-item>
@@ -544,6 +544,7 @@ export default {
           params.cooperateEffectiveTime = params.cooperateEffectiveTime ? moment(params.cooperateEffectiveTime).format('YYYY-MM-DD hh:mm:ss') : ''
           params.jgDoorHeaderChangeTime = params.jgDoorHeaderChangeTime ? moment(params.jgDoorHeaderChangeTime).format('YYYY-MM-DD hh:mm:ss') : ''
           _this.spinning = true
+          delete params.dealerCode
           dealerSave(params).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)

+ 2 - 2
src/views/dealerManagement/merchantInfoManagement/list.vue

@@ -278,9 +278,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 41 - 18
src/views/financialManagement/financialCollection/list.vue

@@ -11,22 +11,32 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="经销商名称">
-                <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入经销商名称"/>
+              <a-form-item label="销售单号">
+                <a-input id="financialCollectionList-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.dealerLevel"
-                  ref="dealerLevel"
-                  id="financialCollectionList-dealerLevel"
-                  code="DEALER_LEVEL"
-                  placeholder="请选择商户级别"
-                  allowClear></v-select>
+              <a-form-item label="备货单号">
+                <a-input id="financialCollectionList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="经销商名称">
+                  <a-input id="financialCollectionList-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.dealerLevel"
+                    ref="dealerLevel"
+                    id="financialCollectionList-dealerLevel"
+                    code="DEALER_LEVEL"
+                    placeholder="请选择商户级别"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="收款方式">
                   <v-select
@@ -65,6 +75,17 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="单据状态">
+                  <v-select
+                    v-model="queryParam.voidFlag"
+                    ref="voidFlag"
+                    id="financialCollectionList-voidFlag"
+                    code="VOID_FLAG"
+                    placeholder="请选择单据状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="收款时间">
                   <rangeDate ref="rangeSettleDate" @change="dateSettleChange" />
@@ -130,10 +151,6 @@
           <span :class="$hasPermissions('B_dispatchDetail')?'active':'common'" v-if="$hasPermissions('B_dispatchDetail')" @click="handleBhDetail(record)">{{ record.dispatchBillNo || '--' }}</span>
           <span v-else>{{ record.dispatchBillNo || '--' }}</span>
         </template>
-        <!-- 单据状态 -->
-        <template slot="voidFlag" slot-scope="text, record">
-          <span>{{ record.voidFlag==1 ? '作废' : record.voidFlag==0 ? '有效' : '--' }}</span>
-        </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
@@ -167,6 +184,8 @@ export default {
       queryParam: { //  查询条件
         beginDate: getDate.getThreeMonthDays().starttime + ' 00:00:00',
         endDate: getDate.getCurrMonthDays().endtime + ' 23:59:59',
+        bizNo: '',
+        dispatchBillNo: '',
         beginDateSettle: '',
         endDateSettle: '',
         settleClientName: '',
@@ -175,6 +194,7 @@ export default {
         subareaSn: undefined,
         billStatus: undefined,
         settleState: undefined,
+        voidFlag: undefined,
         dealerProvinceSn: undefined,
         dealerCitySn: undefined,
         dealerCountySn: undefined
@@ -226,7 +246,7 @@ export default {
         { title: '备注', dataIndex: 'remark', width: '7%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '财务状态', dataIndex: 'settleStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据状态', dataIndex: 'voidFlag', scopedSlots: { customRender: 'voidFlag' }, width: '6%', align: 'center' },
+        { title: '单据状态', dataIndex: 'voidFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '4%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
@@ -254,6 +274,8 @@ export default {
       }
       this.queryParam.beginDate = getDate.getThreeMonthDays().starttime + ' 00:00:00'
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime + ' 23:59:59'
+      this.queryParam.bizNo = ''
+      this.queryParam.dispatchBillNo = ''
       this.queryParam.beginDateSettle = ''
       this.queryParam.endDateSettle = ''
       this.queryParam.settleClientName = ''
@@ -262,6 +284,7 @@ export default {
       this.queryParam.subareaSn = undefined
       this.queryParam.billStatus = undefined
       this.queryParam.settleState = undefined
+      this.queryParam.voidFlag = undefined
       this.queryParam.dealerProvinceSn = undefined
       this.queryParam.dealerCitySn = undefined
       this.queryParam.dealerCountySn = undefined
@@ -356,9 +379,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()
@@ -395,7 +418,7 @@ export default {
       cursor: pointer;
     }
     .common{
-      color: rgba(0, 0, 0, 0.65);
+      color: rgba(0, 0, 0);
     }
   }
 </style>

+ 1 - 1
src/views/financialManagement/inventoryConfirmation/detail.vue

@@ -54,7 +54,7 @@
                 <a-row :gutter="15">
                   <a-col :md="8" :sm="24">
                     <a-form-model-item label="产品编码">
-                      <a-input v-model="queryParam.productCode" allowClear placeholder="输入产品编码" />
+                      <a-input v-model.trim="queryParam.productCode" allowClear placeholder="输入产品编码" />
                     </a-form-model-item>
                   </a-col>
                   <a-col :md="8" :sm="24">

+ 1 - 1
src/views/financialManagement/inventoryConfirmation/list.vue

@@ -238,7 +238,7 @@ export default {
       cursor: pointer;
     }
     .common{
-      color: rgba(0, 0, 0, 0.65);
+      color: rgba(0, 0, 0);
     }
     // tab样式
     .inventoryConfirmationList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container{

+ 3 - 3
src/views/financialManagement/returnConfirmation/list.vue

@@ -234,9 +234,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()
@@ -273,7 +273,7 @@ export default {
       cursor: pointer;
     }
     .common{
-      color: rgba(0, 0, 0, 0.65);
+      color: rgba(0, 0, 0);
     }
   }
 </style>

+ 19 - 38
src/views/financialManagement/warehousingConfirmation/list.vue

@@ -32,7 +32,7 @@
       <div v-if="$hasPermissions('B_warehousingConfirmationpl')" style="margin-bottom: 10px">
         <a-button type="primary" class="button-error" id="warehousingConfirmationList-export" :loading="loading" @click="handleBatchAudit">批量确认</a-button>
         <span style="margin-left: 5px">
-          <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+          <template v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length>0"> {{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }} </template>
         </span>
       </div>
       <s-table
@@ -40,8 +40,10 @@
         ref="table"
         :style="{ height: tableHeight+84.5+'px' }"
         size="small"
-        :row-selection="rowSelection"
         :rowKey="(record) => record.stockPutSn"
+        rowKeyName="stockPutSn"
+        :row-selection="$hasPermissions('B_warehousingConfirmationpl') ? { columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.auditState != 'WAIT' } }) } : null"
+        @rowSelection="rowSelectionFun"
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
@@ -105,7 +107,6 @@ export default {
       },
       tableHeight: 0,
       disabled: false, //  查询、重置按钮是否可操作
-      selectedRowKeys: [], // Check here to configure the default column
       loading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -126,7 +127,8 @@ export default {
       nowData: null,
       confirmationModal: false,
       confirmationInfo: null,
-      isBatch: false
+      isBatch: false,
+      rowSelectionInfo: null
     }
   },
   computed: {
@@ -135,43 +137,26 @@ export default {
       const arr = [
         { title: '入库时间', dataIndex: 'putTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '入库单号', scopedSlots: { customRender: 'stockPutNo' }, width: '16%', align: 'center' },
-        { title: '商户名称', dataIndex: 'providerName', align: 'center', width: '22%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '商户名称', dataIndex: 'providerName', align: 'left', width: '22%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { 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: 'putBizTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单据状态', dataIndex: 'auditStateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '财务审核时间', dataIndex: 'auditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备注', dataIndex: 'remark', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '备注', dataIndex: 'remark', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowCost')) { // 成本价权限
         arr.splice(4, 0, { title: '入库成本', dataIndex: 'productTotalCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr
-    },
-    hasSelected () {
-      return this.selectedRowKeys.length > 0
-    },
-    rowSelection () {
-      if (this.$hasPermissions('B_warehousingConfirmationpl')) {
-        return {
-          selectedRowKeys: this.selectedRowKeys,
-          onChange: (selectedRowKeys, selectedRows) => {
-            console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
-            this.onSelectChange(selectedRowKeys)
-          },
-          getCheckboxProps: record => ({
-            props: {
-              disabled: record.auditState != 'WAIT'
-            }
-          })
-        }
-      } else {
-        return null
-      }
     }
   },
   methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
     //  重置
     resetSearchForm () {
       this.queryParam.stockPutNo = ''
@@ -194,7 +179,7 @@ export default {
     // 通过
     handleConfirmationOk () {
       if (this.isBatch) { //  批量
-        this.auditOrder(this.selectedRowKeys, true)
+        this.auditOrder(this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys, true)
       } else {
         this.auditOrder([this.confirmationInfo.stockPutSn], true)
       }
@@ -202,7 +187,7 @@ export default {
     // 不通过
     handleConfirmationFail () {
       if (this.isBatch) { //  批量
-        this.auditOrder(this.selectedRowKeys, false)
+        this.auditOrder(this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys, false)
       } else {
         this.auditOrder([this.confirmationInfo.stockPutSn], false)
       }
@@ -225,7 +210,7 @@ export default {
         }
         if (res.status == 200) {
           if (this.isBatch) {
-            _this.selectedRowKeys = []
+            _this.$refs.table.clearSelected() // 清空表格选中项
           }
           _this.$message.success(res.message)
           _this.$refs.table.refresh()
@@ -240,17 +225,13 @@ export default {
     // 批量审核
     handleBatchAudit () {
       const _this = this
-      if (_this.selectedRowKeys.length < 1) {
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
         _this.$message.warning('请在列表勾选后再进行批量操作!')
         return
       }
       this.isBatch = true
       this.confirmationModal = true
     },
-    onSelectChange (selectedRowKeys) {
-      console.log('selectedRowKeys changed: ', selectedRowKeys)
-      this.selectedRowKeys = selectedRowKeys
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -297,7 +278,7 @@ export default {
 		cursor: pointer;
 	}
 	.common{
-		color: rgba(0, 0, 0, 0.65);
+		color: rgba(0, 0, 0);
 	}
   .confirmation-modal{
     .ant-modal-body{
@@ -307,7 +288,7 @@ export default {
       display: flex;
       .confirmation-cont{
         .confirmation-tit{
-          color: rgba(0, 0, 0, 0.85);
+          color: rgba(0, 0, 0);
           font-weight: 500;
           font-size: 16px;
           line-height: 1.4;
@@ -315,7 +296,7 @@ export default {
         }
         .confirmation-txt{
           margin: 8px 0 0;
-          color: rgba(0, 0, 0, 0.65);
+          color: rgba(0, 0, 0);
           font-size: 14px;
           line-height: 1.5;
         }

+ 1 - 1
src/views/inventoryManagement/inventoryCheck/detail.vue

@@ -47,7 +47,7 @@
                 <a-row :gutter="15">
                   <a-col :md="8" :sm="24">
                     <a-form-model-item label="产品编码">
-                      <a-input v-model="queryParam.productCode" allowClear placeholder="输入产品编码" />
+                      <a-input v-model.trim="queryParam.productCode" allowClear placeholder="输入产品编码" />
                     </a-form-model-item>
                   </a-col>
                   <a-col :md="8" :sm="24">

+ 1 - 1
src/views/inventoryManagement/inventoryCheck/list.vue

@@ -275,7 +275,7 @@ export default {
       cursor: pointer;
     }
     .common{
-      color: rgba(0, 0, 0, 0.65);
+      color: rgba(0, 0, 0);
     }
     // tab样式
     .inventoryCheckList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container{

+ 3 - 3
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="产品编码">
-                <a-input id="inventoryQueryList-productCode" v-model="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+                <a-input id="inventoryQueryList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -311,9 +311,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -267,9 +267,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 35 - 51
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -68,7 +68,7 @@
       <div v-if="$hasPermissions('B_inventoryWarning_refresh')" class="table-operator">
         <a-button class="button-error" type="primary" id="inventoryWarningList-update" :loading="loading" @click="handleupdate">批量更新</a-button>
         <span style="margin-left: 8px">
-          <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+          <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
         </span>
       </div>
       <!-- 列表 -->
@@ -77,8 +77,9 @@
         ref="table"
         :style="{ height: tableHeight+84.5+'px' }"
         size="small"
-        :row-selection="$hasPermissions('B_inventoryWarning_refresh')?{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }:null"
+        :row-selection="$hasPermissions('B_inventoryWarning_refresh')?{ columnWidth: 40 }:null"
         :rowKey="(record) => record.id"
+        @rowSelection="rowSelectionFun"
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
@@ -109,6 +110,8 @@
               :precision="0"
               :min="0"
               :max="999999"
+              style="width: 100%;"
+              @change="numChange(record)"
               placeholder="请输入在途数" />
           </div>
         </template>
@@ -122,6 +125,8 @@
               :precision="0"
               :min="0"
               :max="999999"
+              style="width: 100%;"
+              @change="numChange(record)"
               placeholder="请输入最大库存数" />
           </div>
         </template>
@@ -135,6 +140,8 @@
               :precision="0"
               :min="0"
               :max="record.upperLimit"
+              style="width: 100%;"
+              @change="numChange(record)"
               placeholder="请输入最小库存数" />
           </div>
         </template>
@@ -155,7 +162,6 @@
 </template>
 
 <script>
-import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
@@ -210,12 +216,12 @@ export default {
             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 (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys) { //  处理切换页码后 上页已选已输数据保留
+                const ind = this.rowSelectionInfo.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
+                  data.list[i].inTransit = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows[ind].inTransit
+                  data.list[i].upperLimit = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows[ind].upperLimit
+                  data.list[i].lowerLimit = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows[ind].lowerLimit
                 }
               }
             }
@@ -225,23 +231,31 @@ export default {
           return data
         })
       },
-      selectedRowKeys: [],
-      selectedRows: [],
-      loading: false
-    }
-  },
-  computed: {
-    hasSelected () {
-      return this.selectedRowKeys.length > 0
+      loading: false,
+      rowSelectionInfo: null
     }
   },
   methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
+    numChange (row) {
+      if (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys) { //  处理切换页码后 上页已选已输数据保留
+        const ind = this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.indexOf(row.id)
+        if (ind >= 0) {
+          this.rowSelectionInfo.selectedRows[ind].inTransit = row.inTransit
+          this.rowSelectionInfo.selectedRows[ind].upperLimit = row.upperLimit
+          this.rowSelectionInfo.selectedRows[ind].lowerLimit = row.lowerLimit
+        }
+      }
+    },
     //  保存
     handleSave (row, isBatch) {
       const params = []
       if (isBatch) { //  批量更新
         const dataInd = []
-        this.selectedRows.map((item, index) => {
+        this.rowSelectionInfo && this.rowSelectionInfo.selectedRows.map((item, index) => {
           if ((!item.inTransit && item.inTransit != 0) || (!item.upperLimit && item.upperLimit != 0) || (!item.lowerLimit && item.lowerLimit != 0)) {
             dataInd.push(item.no)
           }
@@ -286,43 +300,13 @@ export default {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$refs.table.refresh()
-          this.selectedRowKeys = []
-          this.selectedRows = []
+          this.$refs.table.clearSelected() // 清空表格选中项
           this.spinning = false
         } else {
           this.spinning = false
         }
       })
     },
-    onChange (selectedRowKeys, selectedRows) {
-      this.selectedRowKeys = selectedRowKeys
-    },
-    onSelectChange (record, selected, selectedRows, nativeEvent) {
-      if (selected) { //  选择
-        this.selectedRows.push(record)
-      } else { //  取消
-        this.selectedRows = selectedRows
-      }
-    },
-    // 本页全选/取消全选
-    onSelectAllChange (selected, selectedRows, changeRows) {
-      const _this = this
-      if (selected) { //  选择
-        this.selectedRows = [...this.selectedRows, ...changeRows]
-      } else { //  取消
-        const arrId = []
-        this.selectedRows.map((item, index) => {
-          this.selectedRows.map((subItem, ind) => {
-            if (item.id == subItem.id) {
-              arrId.push(index)
-            }
-          })
-        })
-        arrId.map((item, index) => {
-          _this.selectedRows = _this.selectedRows.slice(item, item + 1)
-        })
-      }
-    },
     //  重置
     resetSearchForm () {
       this.queryParam.productCode = ''
@@ -338,7 +322,7 @@ export default {
     },
     //  批量更新
     handleupdate () {
-      if (this.selectedRowKeys.length < 1) {
+      if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length < 1)) {
         this.$message.warning('请在列表勾选后再进行批量操作!')
         return
       }
@@ -394,9 +378,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 1 - 1
src/views/inventoryManagement/makeInventory/check.vue

@@ -62,7 +62,7 @@
                 <a-row :gutter="15">
                   <a-col :md="8" :sm="24">
                     <a-form-model-item label="产品编码">
-                      <a-input v-model="queryParam.productCode" allowClear placeholder="输入产品编码" />
+                      <a-input v-model.trim="queryParam.productCode" allowClear placeholder="输入产品编码" />
                     </a-form-model-item>
                   </a-col>
                   <a-col :md="8" :sm="24">

+ 1 - 1
src/views/inventoryManagement/makeInventory/list.vue

@@ -152,7 +152,7 @@ export default {
       cursor: pointer;
     }
     .common{
-      color: rgba(0, 0, 0, 0.65);
+      color: rgba(0, 0, 0);
     }
   }
 </style>

+ 1 - 1
src/views/inventoryManagement/supervisionDisk/check.vue

@@ -63,7 +63,7 @@
                 <a-row :gutter="15">
                   <a-col :md="8" :sm="24">
                     <a-form-model-item label="产品编码">
-                      <a-input v-model="queryParam.productCode" allowClear placeholder="输入产品编码" />
+                      <a-input v-model.trim="queryParam.productCode" allowClear placeholder="输入产品编码" />
                     </a-form-model-item>
                   </a-col>
                   <a-col :md="8" :sm="24">

+ 1 - 1
src/views/inventoryManagement/supervisionDisk/list.vue

@@ -155,7 +155,7 @@ export default {
       cursor: pointer;
     }
     .common{
-      color: rgba(0, 0, 0, 0.65);
+      color: rgba(0, 0, 0);
     }
   }
 </style>

+ 2 - 2
src/views/power/dataDictionary/dataDictionary.vue

@@ -33,7 +33,7 @@
               <a-row :gutter="48">
                 <a-col :md="6" :sm="24">
                   <a-form-item label="数据名称">
-                    <a-input allowClear v-model="queryParam.dispName" placeholder="请输入数据名称"/>
+                    <a-input allowClear v-model.trim="queryParam.dispName" placeholder="请输入数据名称"/>
                   </a-form-item>
                 </a-col>
 
@@ -398,7 +398,7 @@ export default {
     border-radius: 5px;
     padding: 5px 10px 5px 20px;
     margin: 10px 0;
-    color: rgba(0, 0, 0, 0.85);
+    color: rgba(0, 0, 0);
   }
   .imgSize{
     color: #2d8cf0;

+ 1 - 1
src/views/power/menu/menu.vue

@@ -450,7 +450,7 @@ export default {
     border-radius: 5px;
     padding: 5px 10px 5px 20px;
     margin: 10px 0;
-    color: rgba(0, 0, 0, 0.85);
+    color: rgba(0, 0, 0);
   }
   .imgSize{
     color: #2d8cf0;

+ 1 - 1
src/views/power/register/register.vue

@@ -421,7 +421,7 @@ export default {
     border-radius: 5px;
     padding: 5px 10px 5px 20px;
     margin: 10px 0;
-    color: rgba(0, 0, 0, 0.85);
+    color: rgba(0, 0, 0);
   }
   .imgSize{
     color: #2d8cf0;

+ 2 - 2
src/views/productManagement/newProduct/list.vue

@@ -228,9 +228,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/productManagement/priceChangeRecord/list.vue

@@ -344,9 +344,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 1 - 1
src/views/productManagement/productBrand/editModal.vue

@@ -23,7 +23,7 @@
             <a-input
               id="productBrandEdit-brandName"
               :maxLength="30"
-              v-model="form.brandName"
+              v-model.trim="form.brandName"
               placeholder="请输入产品品牌名称(最多30个字符)"
               allowClear />
           </a-form-model-item>

+ 3 - 3
src/views/productManagement/productInfo/edit.vue

@@ -27,7 +27,7 @@
                   id="productInfoEdit-code"
                   :maxLength="100"
                   :disabled="form.state&&form.state!='WAIT'"
-                  v-model="form.code"
+                  v-model.trim="form.code"
                   placeholder="请输入产品编码(最多100个字符)"
                   allowClear />
               </a-form-model-item>
@@ -37,7 +37,7 @@
                 <a-input
                   id="productInfoEdit-origCode"
                   :maxLength="200"
-                  v-model="form.origCode"
+                  v-model.trim="form.origCode"
                   placeholder="请输入(最多200个字符,多个编码用逗号隔开)"
                   allowClear />
               </a-form-model-item>
@@ -47,7 +47,7 @@
                 <a-input
                   id="productInfoEdit-otherCode"
                   :maxLength="60"
-                  v-model="form.otherCode"
+                  v-model.trim="form.otherCode"
                   placeholder="请输入(最多60个字符,多个编码用逗号隔开)"
                   allowClear />
               </a-form-model-item>

+ 19 - 50
src/views/productManagement/productInfo/list.vue

@@ -94,7 +94,7 @@
           @click="handleBatchDownline"
           style="margin: 0 15px;">批量下线</a-button>
         <span style="margin-left: 8px" v-if="$hasPermissions('B_productInfo_batchAudit') || $hasPermissions('B_productInfo_batchLaunch') || $hasPermissions('B_productInfo_batchDownline')">
-          <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+          <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
         </span>
       </div>
       <s-table
@@ -102,8 +102,9 @@
         ref="table"
         :style="{ height: tableHeight+84.5+'px' }"
         size="small"
-        :row-selection=" showSelect ?{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }:null"
+        :row-selection=" showSelect?{ columnWidth: 40 }:null"
         :rowKey="(record) => record.id"
+        @rowSelection="rowSelectionFun"
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
@@ -225,8 +226,6 @@ export default {
         { title: '定价状态', dataIndex: 'pricingStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
       ],
-      selectedRowKeys: [], // Check here to configure the default column
-      selectedRows: [],
       loadingAudit: false,
       loadingLaunch: false,
       loadingDownline: false,
@@ -254,47 +253,20 @@ export default {
       offlineProductList: [], //  下线 当前所选数据
       productBrandList: [], //  品牌下拉数据
       productTypeList: [], //  分类下拉数据
-      pageFromInfo: null
+      pageFromInfo: null,
+      rowSelectionInfo: null
     }
   },
   computed: {
-    hasSelected () {
-      return this.selectedRowKeys.length > 0
-    },
     // 是否显示table选择框
     showSelect () {
       return this.$hasPermissions('B_productInfo_batchAudit') || this.$hasPermissions('B_productInfo_batchLaunch') || this.$hasPermissions('B_productInfo_batchDownline')
     }
   },
   methods: {
-    onChange (selectedRowKeys, selectedRows) {
-      this.selectedRowKeys = selectedRowKeys
-    },
-    onSelectChange (record, selected, selectedRows, nativeEvent) {
-      if (selected) { //  选择
-        this.selectedRows.push(record)
-      } else { //  取消
-        this.selectedRows = selectedRows
-      }
-    },
-    // 本页全选/取消全选
-    onSelectAllChange (selected, selectedRows, changeRows) {
-      const _this = this
-      if (selected) { //  选择
-        this.selectedRows = [...this.selectedRows, ...changeRows]
-      } else { //  取消
-        const arrId = []
-        this.selectedRows.map((item, index) => {
-          this.selectedRows.map((subItem, ind) => {
-            if (item.id == subItem.id) {
-              arrId.push(index)
-            }
-          })
-        })
-        arrId.map((item, index) => {
-          _this.selectedRows = _this.selectedRows.slice(item, item + 1)
-        })
-      }
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
     },
     // 审核
     handleAudit (row) {
@@ -320,13 +292,13 @@ export default {
     // 批量审核
     handleBatchAudit () {
       const _this = this
-      if (_this.selectedRowKeys.length < 1) {
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
         _this.$message.warning('请在列表勾选后再进行批量操作!')
         return
       }
       let num = 0
       const obj = []
-      _this.selectedRows.map(item => {
+      _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
         if (item.state == 'WAIT') {
           num++
           obj.push(item.productSn)
@@ -346,8 +318,7 @@ export default {
           productBatchAudit(obj).then(res => {
             _this.loadingAudit = false
             if (res.status == 200) {
-              _this.selectedRowKeys = []
-              _this.selectedRows = []
+              _this.$refs.table.clearSelected() // 清空表格选中项
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
               _this.spinning = false
@@ -361,13 +332,13 @@ export default {
     // 批量上线
     handleBatchLaunch () {
       const _this = this
-      if (_this.selectedRowKeys.length < 1) {
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
         _this.$message.warning('请在列表勾选后再进行批量操作!')
         return
       }
       let num = 0
       const obj = []
-      _this.selectedRows.map(item => {
+      _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
         if (item.state == 'WAIT_ONLINE' || item.state == 'OFFLINE') {
           num++
           obj.push(item.productSn)
@@ -387,8 +358,7 @@ export default {
           productBatchOnline(obj).then(res => {
             _this.loadingLaunch = false
             if (res.status == 200) {
-              _this.selectedRowKeys = []
-              _this.selectedRows = []
+              _this.$refs.table.clearSelected() // 清空表格选中项
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
               _this.spinning = false
@@ -402,13 +372,13 @@ export default {
     // 批量下线
     handleBatchDownline () {
       const _this = this
-      if (_this.selectedRowKeys.length < 1) {
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
         _this.$message.warning('请在列表勾选后再进行批量操作!')
         return
       }
       let num = 0
       _this.offlineProductList = []
-      _this.selectedRows.map(item => {
+      _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
         if (item.state == 'ONLINE') {
           num++
           _this.offlineProductList.push({ productSn: item.productSn, code: item.code, commonProductList: [] })
@@ -500,8 +470,7 @@ export default {
     },
     //  关闭下线弹框
     closeOfflineModal () {
-      this.selectedRowKeys = []
-      this.selectedRows = []
+      this.$refs.table.clearSelected() // 清空表格选中项
       this.offlineProductList = []
       this.openOfflineModal = false
     },
@@ -583,9 +552,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 13 - 31
src/views/productManagement/productLaunchAudit/list.vue

@@ -37,7 +37,7 @@
       <div style="margin-bottom: 10px">
         <a-button type="primary" v-if="$hasPermissions('B_productLaunchAudit_batchAudit')" id="productLaunchAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
         <span style="margin-left: 5px" v-if="$hasPermissions('B_productLaunchAudit_batchAudit')">
-          <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+          <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
         </span>
       </div>
       <s-table
@@ -45,8 +45,10 @@
         ref="table"
         :style="{ height: tableHeight+84.5+'px' }"
         size="small"
-        :row-selection="rowSelection"
         :rowKey="(record) => record.productSn"
+        rowKeyName="productSn"
+        :row-selection="$hasPermissions('B_productLaunchAudit_batchAudit')?{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.state != 'WAIT_ONLINE_AUDIT' } }) }:null"
+        @rowSelection="rowSelectionFun"
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
@@ -99,7 +101,6 @@ export default {
         { title: '审核人', dataIndex: 'onlineAuditPerson', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
       ],
-      selectedRowKeys: [], // Check here to configure the default column
       loading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -114,29 +115,15 @@ export default {
           this.spinning = false
           return data
         })
-      }
-    }
-  },
-  computed: {
-    hasSelected () {
-      return this.selectedRowKeys.length > 0
-    },
-    rowSelection () {
-      return this.$hasPermissions('B_productLaunchAudit_batchAudit') ? {
-        selectedRowKeys: this.selectedRowKeys,
-        onChange: (selectedRowKeys, selectedRows) => {
-          console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
-          this.onSelectChange(selectedRowKeys)
-        },
-        getCheckboxProps: record => ({
-          props: {
-            disabled: record.state != 'WAIT_ONLINE_AUDIT'
-          }
-        })
-      } : null
+      },
+      rowSelectionInfo: null
     }
   },
   methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
     //  重置
     resetSearchForm () {
       this.queryParam.name = ''
@@ -168,7 +155,7 @@ export default {
     // 批量审核
     handleBatchAudit () {
       const _this = this
-      if (_this.selectedRowKeys.length < 1) {
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
         _this.$message.warning('请在列表勾选后再进行批量操作!')
         return
       }
@@ -179,11 +166,10 @@ export default {
         onOk () {
           _this.loading = true
           _this.spinning = true
-          productBatchOnlineAudit(_this.selectedRowKeys).then(res => {
+          productBatchOnlineAudit(_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys).then(res => {
             _this.loading = false
             if (res.status == 200) {
-              _this.selectedRowKeys = []
-              _this.selectedRows = []
+              _this.$refs.table.clearSelected() // 清空表格选中项
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
               _this.spinning = false
@@ -197,10 +183,6 @@ export default {
         }
       })
     },
-    onSelectChange (selectedRowKeys) {
-      console.log('selectedRowKeys changed: ', selectedRowKeys)
-      this.selectedRowKeys = selectedRowKeys
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 2 - 2
src/views/productManagement/productLevel/list.vue

@@ -247,9 +247,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 15 - 32
src/views/productManagement/productOfflineAudit/list.vue

@@ -73,7 +73,7 @@
       <div style="margin-bottom: 10px">
         <a-button type="primary" v-if="$hasPermissions('B_productOfflineAudit_batchAudit')" id="productOfflineAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
         <span style="margin-left: 5px" v-if="$hasPermissions('B_productOfflineAudit_batchAudit')">
-          <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+          <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
         </span>
       </div>
       <s-table
@@ -81,8 +81,10 @@
         ref="table"
         :style="{ height: tableHeight+84.5+'px' }"
         size="small"
-        :row-selection="rowSelection"
         :rowKey="(record) => record.productSn"
+        rowKeyName="productSn"
+        :row-selection="$hasPermissions('B_productOfflineAudit_batchAudit')?{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.state != 'WAIT_OFFLINE_AUDIT' } }) }:null"
+        @rowSelection="rowSelectionFun"
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
@@ -148,7 +150,6 @@ export default {
         { title: '审核人', dataIndex: 'offlineAuditPerson', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '5%', align: 'center' }
       ],
-      selectedRowKeys: [], // Check here to configure the default column
       loading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -165,29 +166,15 @@ export default {
         })
       },
       productBrandList: [], //  品牌下拉数据
-      productTypeList: [] //  分类下拉数据
-    }
-  },
-  computed: {
-    hasSelected () {
-      return this.selectedRowKeys.length > 0
-    },
-    rowSelection () {
-      return this.$hasPermissions('B_productOfflineAudit_batchAudit') ? {
-        selectedRowKeys: this.selectedRowKeys,
-        onChange: (selectedRowKeys, selectedRows) => {
-          console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
-          this.onSelectChange(selectedRowKeys)
-        },
-        getCheckboxProps: record => ({
-          props: {
-            disabled: record.state != 'WAIT_OFFLINE_AUDIT'
-          }
-        })
-      } : null
+      productTypeList: [], //  分类下拉数据
+      rowSelectionInfo: null
     }
   },
   methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
     //  重置
     resetSearchForm () {
       this.queryParam.name = ''
@@ -225,7 +212,7 @@ export default {
     // 批量审核
     handleBatchAudit () {
       const _this = this
-      if (_this.selectedRowKeys.length < 1) {
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
         _this.$message.warning('请在列表勾选后再进行批量操作!')
         return
       }
@@ -236,10 +223,10 @@ export default {
         onOk () {
           _this.loading = true
           _this.spinning = true
-          productBatchOfflineAudit(_this.selectedRowKeys).then(res => {
+          productBatchOfflineAudit(_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys).then(res => {
             _this.loading = false
             if (res.status == 200) {
-              _this.selectedRowKeys = []
+              _this.$refs.table.clearSelected() // 清空表格选中项
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
               _this.spinning = false
@@ -250,10 +237,6 @@ export default {
         }
       })
     },
-    onSelectChange (selectedRowKeys) {
-      console.log('selectedRowKeys changed: ', selectedRowKeys)
-      this.selectedRowKeys = selectedRowKeys
-    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
@@ -296,9 +279,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/productManagement/productPricing/list.vue

@@ -283,9 +283,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/productManagement/productUniversal/list.vue

@@ -224,9 +224,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/promotionRulesManagement/orderStatistics/list.vue

@@ -240,9 +240,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/promotionRulesManagement/productStatistics/list.vue

@@ -250,9 +250,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

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

@@ -40,7 +40,7 @@
           <a-input
             id="bulkWarehousingOrder-relationNo"
             :maxLength="30"
-            v-model="form.relationNo"
+            v-model.trim="form.relationNo"
             placeholder="请输入关联单号(最多30个字符)"
             allowClear />
         </a-form-model-item>

+ 3 - 2
src/views/purchasingManagement/bulkWarehousingOrder/edit.vue

@@ -42,12 +42,12 @@
             <a-row :gutter="15">
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品编码" prop="productCode">
-                  <a-input id="allocateBillEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+                  <a-input id="allocateBillEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="产品名称" prop="productName">
-                  <a-input id="allocateBillEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                  <a-input id="allocateBillEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -112,6 +112,7 @@ export default {
   data () {
     return {
       spinning: false,
+      disabled: false,
       queryParam: {
         productCode: '',
         productName: ''

+ 14 - 65
src/views/purchasingManagement/bulkWarehousingOrder/list.vue

@@ -48,7 +48,7 @@
           @click="handleBatchAudit"
           style="margin: 0 15px;">批量审核</a-button>
         <span style="margin-left: 8px">
-          <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+          <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
         </span>
       </div>
       <!-- 列表 -->
@@ -57,8 +57,10 @@
         ref="table"
         :style="{ height: tableHeight+84.5+'px' }"
         size="small"
-        :row-selection="rowSelection"
         :rowKey="(record) => record.sparePartsSn"
+        rowKeyName="sparePartsSn"
+        :row-selection="$hasPermissions('B_sparePartsBatchAudit')?{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.state != 'WAIT_AUDIT' } }) }:null"
+        @rowSelection="rowSelectionFun"
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
@@ -120,8 +122,6 @@ export default {
         relationNo: '',
         state: undefined
       },
-      selectedRowKeys: [], // Check here to configure the default column
-      selectedRows: [],
       loading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -142,7 +142,8 @@ export default {
         })
       },
       openDetailModal: false,
-      itemSn: null
+      itemSn: null,
+      rowSelectionInfo: null
     }
   },
   computed: {
@@ -164,63 +165,12 @@ export default {
 	      arr.splice(4, 0, { title: '入库成本', dataIndex: 'productTotalCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
 	    }
 	    return arr
-	  },
-    hasSelected () {
-      return this.selectedRowKeys.length > 0
-    },
-    rowSelection () {
-      if (this.$hasPermissions('B_sparePartsBatchAudit')) {
-        return {
-          selectedRowKeys: this.selectedRowKeys,
-          onChange: (selectedRowKeys, selectedRows) => {
-            this.onChange(selectedRowKeys, selectedRows)
-          },
-          onSelect: (record, selected, selectedRows, nativeEvent) => {
-            this.onSelectChange(record, selected, selectedRows, nativeEvent)
-          },
-          onSelectAll: (selected, selectedRows, changeRows) => {
-            this.onSelectAllChange(selected, selectedRows, changeRows)
-          },
-          getCheckboxProps: record => ({
-            props: {
-              disabled: record.state != 'WAIT_AUDIT'
-            }
-          })
-        }
-      } else {
-        return null
-      }
-    }
+	  }
   },
   methods: {
-    onChange (selectedRowKeys, selectedRows) {
-      this.selectedRowKeys = selectedRowKeys
-    },
-    onSelectChange (record, selected, selectedRows, nativeEvent) {
-      if (selected) { //  选择
-        this.selectedRows.push(record)
-      } else { //  取消
-        this.selectedRows = selectedRows
-      }
-    },
-    // 本页全选/取消全选
-    onSelectAllChange (selected, selectedRows, changeRows) {
-      const _this = this
-      if (selected) { //  选择
-        this.selectedRows = [...this.selectedRows, ...changeRows]
-      } else { //  取消
-        const arrId = []
-        this.selectedRows.map((item, index) => {
-          this.selectedRows.map((subItem, ind) => {
-            if (item.sparePartsSn == subItem.sparePartsSn) {
-              arrId.push(index)
-            }
-          })
-        })
-        arrId.map((item, index) => {
-          _this.selectedRows = _this.selectedRows.slice(item, item + 1)
-        })
-      }
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
     },
     //  新增
     handleAdd () {
@@ -293,8 +243,7 @@ export default {
           _this.spinning = true
           sparePartsAudit(params).then(res => {
             if (res.status == 200) {
-              _this.selectedRowKeys = []
-              _this.selectedRows = []
+              _this.$refs.table.clearSelected() // 清空表格选中项
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
               _this.spinning = false
@@ -307,11 +256,11 @@ export default {
     },
     // 批量审核
     handleBatchAudit () {
-      if (this.selectedRowKeys.length < 1) {
+      if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length < 1)) {
         this.$message.warning('请在列表勾选后再进行批量操作!')
         return
       }
-      this.handleAudit(this.selectedRowKeys, 'batch')
+      this.handleAudit(this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys, 'batch')
     },
     pageInit () {
       const _this = this
@@ -362,7 +311,7 @@ export default {
       cursor: pointer;
     }
     .common{
-      color: rgba(0, 0, 0, 0.65);
+      color: rgba(0, 0, 0);
     }
   }
 </style>

+ 576 - 0
src/views/reportData/allCountryCostReport/list.vue

@@ -0,0 +1,576 @@
+<template>
+  <a-card>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-tabs v-model="activeKey" type="card" @change="callback">
+        <a-tab-pane :key="item.id" :tab="item.name" v-for="item in tabsList">
+        </a-tab-pane>
+      </a-tabs>
+
+      <div class="table-page-search-wrapper">
+        <a-form-model
+          id="returnGoodsPresentationList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :rules="rules"
+          :model="queryParam"
+          @keyup.enter.native="handleSearch">
+          <a-row :gutter="15">
+            <!-- <a-col :md="6" :sm="24">
+              <a-form-model-item label="创建时间" prop="time">
+                <a-date-picker
+                  style="width:100%"
+                  placeholder="请选择年份"
+                  format="YYYY"
+                  mode="year"
+                  :disabledDate="disabledDate"
+                  @change="onChange"
+                  :value="year"
+                  :open="open"
+                  @openChange="openChange"
+                  @panelChange="panelChange"
+                />
+              </a-form-model-item>
+            </a-col> -->
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="所在区域">
+                <subarea id="returnGoodsPresentationList-subareaSn" v-model="queryParam.dealer.subareaSn"></subarea>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24" v-if="activeKey == 0">
+              <a-form-model-item prop="dealerProvinceSn" style="margin: 0;" label="地区">
+                <a-select v-model="queryParam.dealer.provinceSn" allowClear placeholder="请选择省">
+                  <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="returnGoodsPresentationList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="returnGoodsPresentationList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 5px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('B_returnGoodsPresentationExport')"
+                id="returnGoodsPresentationList-export">导出</a-button>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :defaultLoadData="false"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :showPagination="false"
+        :data="loadData"
+        :scroll="{ x: 2370 }"
+        bordered>
+        <template slot="footer">
+          <a-row>
+            <a-col span="2">合计:</a-col>
+            <a-col span="22">
+              <a-row>
+                <a-col span="4">1月:{{ (totalData && (totalData.jpYgpAmount || totalData.jpYgpAmount==0)) ? totalData.jpYgpAmount : '--' }}</a-col>
+                <a-col span="4">2月:{{ (totalData && (totalData.jpLbAmount || totalData.jpLbAmount==0)) ? totalData.jpLbAmount : '--' }}</a-col>
+                <a-col span="4">3月:{{ (totalData && (totalData.jpScpAmount || totalData.jpScpAmount==0)) ? totalData.jpScpAmount : '--' }}</a-col>
+                <a-col span="4">4月:{{ (totalData && (totalData.jpGyxAmount || totalData.jpGyxAmount==0)) ? totalData.jpGyxAmount : '--' }}</a-col>
+                <a-col span="4">5月:{{ (totalData && (totalData.gpYgpAmount || totalData.gpYgpAmount==0)) ? totalData.gpYgpAmount : '--' }}</a-col>
+                <a-col span="4">6月:{{ (totalData && (totalData.gpLqqAmount || totalData.gpLqqAmount==0)) ? totalData.gpLqqAmount : '--' }}</a-col>
+                <a-col span="4">7月:{{ (totalData && (totalData.gpScpAmount || totalData.gpScpAmount==0)) ? totalData.gpScpAmount : '--' }}</a-col>
+                <a-col span="4">8月:{{ (totalData && (totalData.gpScpAmount || totalData.gpScpAmount==0)) ? totalData.gpScpAmount : '--' }}</a-col>
+                <a-col span="4">9月:{{ (totalData && (totalData.gpScpAmount || totalData.gpScpAmount==0)) ? totalData.gpScpAmount : '--' }}</a-col>
+                <a-col span="4">10月:{{ (totalData && (totalData.gpScpAmount || totalData.gpScpAmount==0)) ? totalData.gpScpAmount : '--' }}</a-col>
+                <a-col span="4">11月:{{ (totalData && (totalData.gpScpAmount || totalData.gpScpAmount==0)) ? totalData.gpScpAmount : '--' }}</a-col>
+                <a-col span="4">12月:{{ (totalData && (totalData.gpScpAmount || totalData.gpScpAmount==0)) ? totalData.gpScpAmount : '--' }}</a-col>
+                <a-col span="4">1-12月费用:{{ (totalData && (totalData.hjAmount || totalData.hjAmount==0)) ? totalData.hjAmount : '--' }}</a-col>
+                <a-col span="4">实际销售额:{{ (totalData && (totalData.dlsAmount || totalData.dlsAmount==0)) ? totalData.dlsAmount : '--' }}</a-col>
+                <a-col span="4">费用占比(%):{{ (totalData && (totalData.wsAmount || totalData.wsAmount==0)) ? totalData.wsAmount : '--' }}</a-col>
+                <a-col span="4">正常配送品费用:{{ (totalData && (totalData.wsAmount || totalData.wsAmount==0)) ? totalData.wsAmount : '--' }}</a-col>
+                <a-col span="4">正常促销品费用:{{ (totalData && (totalData.wsAmount || totalData.wsAmount==0)) ? totalData.wsAmount : '--' }}</a-col>
+                <a-col span="4">特殊申请配送品费用:{{ (totalData && (totalData.tbuAmount || totalData.tbuAmount==0)) ? totalData.tbuAmount : '--' }}</a-col>
+                <a-col span="4">特殊申请促销品费用:{{ (totalData && (totalData.tbupAmount || totalData.tbupAmount==0)) ? totalData.tbupAmount : '--' }}</a-col>
+              </a-row>
+            </a-col>
+          </a-row>
+        </template>
+      </s-table>
+    </a-spin>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { getArea } from '@/api/data'
+import subarea from '@/views/common/subarea.js'
+import { reportSalesReturnThjdReportList } from '@/api/reportData'
+import moment from 'moment'
+import reportData from '@/libs/reportData.js'
+export default {
+  components: { STable, VSelect, rangeDate, subarea, moment },
+  data () {
+    return {
+      spinning: false,
+      tabsList: [{ id: 0, name: '全国客户费用统计' }, { id: 1, name: '区域促销费用统计' }],
+      activeKey: 0,
+      open: false,
+      year: '',
+      queryParam: {
+        time: [],
+        beginDate: '',
+        endDate: '',
+        dealer: {
+          'dealerName': '',
+          'provinceSn': undefined,
+          'citySn': undefined,
+          'districtSn': undefined,
+          'subareaSn': undefined,
+          'dealerLevel': undefined
+        }
+      },
+      addrProvinceList: [], //  省下拉
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      rules: {
+        'time': [{ required: true, message: '请选择月份', trigger: 'change' }]
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        const _this = this
+        _this.disabled = true
+        _this.spinning = true
+        return new Promise(function (resolve, reject) {
+          const data = {
+            list: reportData.nationalCustomerCostStatisticsList
+          }
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = i + 1
+          }
+          _this.spinning = false
+          _this.disabled = false
+          resolve(data)
+        })
+
+        // const paramsPage = Object.assign(this.queryParam) //  有分页
+        // return reportSalesReturnThjdReportList(paramsPage).then(res => {
+        //   let data
+        //   if (res.status == 200) {
+        //     data = res.data
+        //     // this.getCount(paramsPage)
+        //     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
+        // })
+      },
+      totalData: null
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        {
+          title: '区域',
+          dataIndex: 'area',
+          width: 200,
+          align: 'center',
+          customRender: function (text) {
+            return text || '--'
+          }
+        },
+        {
+          title: '客户名称',
+          dataIndex: '',
+          align: 'center',
+          customRender: function (text) {
+            return text || '--'
+          },
+          ellipsis: true
+        },
+        {
+          title: '费用类型',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '1月',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '2月',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '3月',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '4月',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '5月',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '6月',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '7月',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '8月',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '9月',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '10月',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '11月',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '12月',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '1-12月费用合计',
+          dataIndex: '',
+          width: 140,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '实际销售额合计',
+          dataIndex: '',
+          width: 140,
+          align: 'center',
+          customRender: (value, row, index) => {
+            const obj = {
+              children: value,
+              attrs: {}
+            }
+            if (index === 0) {
+              obj.attrs.rowSpan = 5
+            }
+            if (index === 1) {
+              obj.attrs.rowSpan = 0
+            }
+            if (index === 2) {
+              obj.attrs.rowSpan = 0
+            }
+            if (index === 3) {
+              obj.attrs.rowSpan = 0
+            }
+            if (index === 4) {
+              obj.attrs.rowSpan = 0
+            }
+            if (index === 5) {
+              obj.attrs.rowSpan = 5
+            }
+            if (index === 6) {
+              obj.attrs.rowSpan = 0
+            }
+            if (index === 7) {
+              obj.attrs.rowSpan = 0
+            }
+            if (index === 8) {
+              obj.attrs.rowSpan = 0
+            }
+            if (index === 9) {
+              obj.attrs.rowSpan = 0
+            }
+            if (index === 10) {
+              obj.attrs.rowSpan = 5
+            }
+            if (index === 11) {
+              obj.attrs.rowSpan = 0
+            }
+            if (index === 12) {
+              obj.attrs.rowSpan = 0
+            }
+            if (index === 13) {
+              obj.attrs.rowSpan = 0
+            }
+            if (index === 14) {
+              obj.attrs.rowSpan = 0
+            }
+            return obj
+          }
+        },
+        {
+          title: '费用占比(%)',
+          dataIndex: '',
+          width: 140,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '正常配送品费用',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '正常促销品费用',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '特殊申请配送品费用',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        },
+        {
+          title: '特殊申请促销品费用',
+          dataIndex: '',
+          width: 120,
+          align: 'center',
+          customRender: function (text) {
+            return ((text || text == 0) ? text : '--')
+          }
+        }
+      ]
+      if (this.activeKey == 0) {
+        arr.splice(1, 0, { title: '省份', dataIndex: 'province', width: 90, align: 'center', customRender: function (text) { return text || '--' } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    callback (key) {
+      this.activeKey = key
+      console.log(key, this.activeKey)
+    },
+    onChange (date, dateString) {
+      console.log(date, dateString)
+    },
+    openChange (status) {
+      if (status) {
+        this.open = true
+      } else {
+        this.open = false
+      }
+    },
+    panelChange (value) {
+      this.year = value
+      this.open = false
+    },
+    // 禁止选择的年份
+    disabledDate (currentDate) {
+      console.log(currentDate)
+      return currentDate && currentDate < moment().endOf('year')
+    },
+    // 分页
+
+    // 查询省
+    getProvinceData (leve, sn) {
+      let params
+      if (leve == 'province') {
+        params = { type: '2' }
+      } else {
+        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
+      }
+      getArea(params).then(res => {
+        if (res.status == 200) {
+          console.log(res, '=============地区')
+          if (leve == 'province') {
+            this.addrProvinceList = res.data || []
+          } else if (leve == 'city') {
+            this.addrCityList = res.data || []
+          } else if (leve == 'district') {
+            this.addrDistrictList = res.data || []
+          }
+        } else {
+          if (leve == 'province') {
+            this.addrProvinceList = []
+          } else if (leve == 'city') {
+            this.addrCityList = []
+          } else if (leve == 'district') {
+            this.addrDistrictList = []
+          }
+        }
+      })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    // 查询
+    handleSearch () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$refs.table.refresh(true)
+        } else {
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.time = []
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.dealer = {
+        'dealerName': '',
+        'provinceSn': undefined,
+        'citySn': undefined,
+        'districtSn': undefined,
+        'subareaSn': undefined,
+        'dealerLevel': undefined
+      }
+      this.totalData = null
+      this.$refs.ruleForm.resetFields()
+      this.$refs.table.clearTable()
+    },
+    //  导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(reportRebateExport, params, '全国各省品类实际销售明细报表', function () {
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    pageInit () {
+      this.activeKey = 0
+      this.getProvinceData('province')
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      // this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      // this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style style="less">
+  .regionTypeSalesReportList-wrap{
+
+  }
+</style>

+ 0 - 177
src/views/reportData/districtTypeSalesDetails/list.vue

@@ -1,177 +0,0 @@
-<template>
-  <a-card size="small" :bordered="false" class="districtTypeSalesDetailsList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form-model
-        ref="ruleForm"
-        class="form-model-con"
-        layout="inline"
-        :rules="rules"
-        :model="queryParam"
-        @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="创建时间" prop="time">
-              <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="districtTypeSalesDetailsList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="districtTypeSalesDetailsList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form-model>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 3450 }"
-      :defaultLoadData="false"
-      bordered>
-    </s-table>
-  </a-card>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-import reportData from '@/libs/reportData'
-import rangeDate from '@/views/common/rangeDate.vue'
-import getDate from '@/libs/getDate.js'
-// import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
-// import { allocateTypeAllList } from '@/api/allocateType'
-export default {
-  components: { STable, VSelect, rangeDate },
-  data () {
-    return {
-      tableHeight: 0,
-      queryParam: { //  查询条件
-        time: [
-          getDate.getCurrMonthDays().starttime,
-          getDate.getCurrMonthDays().endtime
-        ],
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        targetName: '', //  调往对象
-        allocateTypeSn: undefined, //  调拨类型
-        state: undefined, //  业务状态
-        allocateNo: '' //  调拨单号
-      },
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
-      rules: {
-        'time': [{ required: true, message: '请选择创建时间', trigger: 'change' }]
-      },
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '区域', dataIndex: 'area', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '箭牌滤清器', dataIndex: 'targetName', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '冠牌滤清器', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '滤清器合计', dataIndex: 'totalQty', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌雨刮片', dataIndex: 'totalCost', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '冠牌雨刮片', dataIndex: 'totalPrice', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '雨刮片合计', dataIndex: 'auditTime', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌刹车片', dataIndex: 'allocateTypeName', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌感应线', dataIndex: 'stateDictValue', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '冠牌刹车片', dataIndex: 'printStateDictValue', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'TBU刹车片', dataIndex: 'printCount', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'TBU刹车油', dataIndex: 'printCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'TBU感应线', dataIndex: 'printCsounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '刹车片合计', dataIndex: 'printdCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯润滑油', dataIndex: 'prfintCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯刹车油', dataIndex: 'printCogunts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯变速箱油', dataIndex: 'phrintCounts', width: 140, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯合计', dataIndex: 'printCsountss', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '稳升点火线圈', dataIndex: 'prinftCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '稳升灯泡', dataIndex: 'prisntCogunts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '稳升合计', dataIndex: 'prinxtCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '汇箭', dataIndex: 'printCocunts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '布瑞斯', dataIndex: 'printCvounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌喇叭', dataIndex: 'printCgounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '品牌合计', dataIndex: 'printCouhnts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'NGK', dataIndex: 'printCoujnts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '品牌+NGK总合计', dataIndex: 'printCournts', width: 150, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return allocateBillList(Object.assign(parameter, this.queryParam)).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: reportData.districtTypeSalesList,
-            count: 10
-          }
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      },
-      allocateTypeList: [], //  调拨类型
-      openModal: false //  新增编辑  弹框
-    }
-  },
-  methods: {
-    //  创建时间  change
-    dateChange (date) {
-      if (date[0] && date[1]) {
-        this.queryParam.time = date
-      } else {
-        this.queryParam.time = []
-      }
-      this.queryParam.beginDate = date[0] || ''
-      this.queryParam.endDate = date[1] || ''
-    },
-    //  重置
-    resetSearchForm () {
-      this.$refs.rangeDate.resetDate(this.queryParam.time)
-      this.queryParam.time = [
-        getDate.getCurrMonthDays().starttime,
-        getDate.getCurrMonthDays().endtime
-      ]
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
-      this.queryParam.targetName = ''
-      this.queryParam.allocateTypeSn = undefined
-      this.queryParam.state = undefined
-      this.queryParam.allocateNo = ''
-      this.$refs.table.refresh(true)
-    },
-    pageInit () {
-
-    }
-  },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
-  activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {})
-  }
-}
-</script>

+ 0 - 440
src/views/reportData/nationalCustomerCostStatistics/list.vue

@@ -1,440 +0,0 @@
-<template>
-  <a-card size="small" :bordered="false" class="nationalCustomerCostStatisticsList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form-model
-        ref="ruleForm"
-        class="form-model-con"
-        layout="inline"
-        :rules="rules"
-        :model="queryParam"
-        @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="创建时间" prop="time">
-              <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="区域">
-              <a-select
-                id="nationalCustomerCostStatisticsList-allocateTypeSn"
-                v-model="queryParam.allocateTypeSn"
-                placeholder="请选择区域"
-                allowClear>
-                <a-select-option
-                  v-for="item in allocateTypeList"
-                  :key="item.allocateTypeSn"
-                  :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="省份">
-              <a-select
-                id="nationalCustomerCostStatisticsList-state"
-                v-model="queryParam.state"
-                placeholder="请选择省份"
-                allowClear>
-                <a-select-option
-                  v-for="item in allocateTypeList"
-                  :key="item.allocateTypeSn"
-                  :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button
-              type="primary"
-              @click="$refs.table.refresh(true)"
-              :disabled="disabled"
-              id="nationalCustomerCostStatisticsList-refresh">查询</a-button>
-            <a-button
-              style="margin-left: 5px"
-              @click="resetSearchForm"
-              :disabled="disabled"
-              id="nationalCustomerCostStatisticsList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form-model>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :showPagination="false"
-      :data="loadData"
-      :scroll="{ x: 2920 }"
-      :defaultLoadData="false"
-      bordered>
-    </s-table>
-  </a-card>
-</template>
-
-<script>
-import {
-  STable,
-  VSelect
-} from '@/components'
-import reportData from '@/libs/reportData'
-import rangeDate from '@/views/common/rangeDate.vue'
-import getDate from '@/libs/getDate.js'
-// import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
-// import { allocateTypeAllList } from '@/api/allocateType'
-export default {
-  components: {
-    STable,
-    VSelect,
-    rangeDate
-  },
-  data () {
-    return {
-      advanced: false, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      queryParam: { //  查询条件
-        time: [
-          getDate.getCurrMonthDays().starttime,
-          getDate.getCurrMonthDays().endtime
-        ],
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        targetName: '', //  调往对象
-        allocateTypeSn: undefined, //  调拨类型
-        state: undefined, //  业务状态
-        allocateNo: '' //  调拨单号
-      },
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
-      rules: {
-        'time': [{
-          required: true,
-          message: '请选择创建时间',
-          trigger: 'change'
-        }]
-      },
-      columns: [{
-        title: '序号',
-        dataIndex: 'no',
-        width: 80,
-        align: 'center',
-        fixed: 'left'
-      },
-      {
-        title: '区域',
-        dataIndex: 'area',
-        width: 200,
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        }
-      },
-      {
-        title: '省份',
-        dataIndex: 'province',
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        }
-      },
-      {
-        title: '客户名称',
-        dataIndex: 'customerName',
-        align: 'center',
-        customRender: function (text) {
-          return text || '--'
-        },
-        ellipsis: true
-      },
-      {
-        title: '费用类型',
-        dataIndex: 'targetName',
-        width: 120,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '1月',
-        dataIndex: 'dealerLevelDictValue',
-        width: 120,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '2月',
-        dataIndex: 'totalQty',
-        width: 120,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '3月',
-        dataIndex: 'totalCost',
-        width: 120,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '4月',
-        dataIndex: 'totalPrice',
-        width: 120,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '5月',
-        dataIndex: 'auditTime',
-        width: 120,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '6月',
-        dataIndex: 'allocateTypeName',
-        width: 120,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '7月',
-        dataIndex: 'stateDictValue',
-        width: 120,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '8月',
-        dataIndex: 'printStateDictValue',
-        width: 120,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '9月',
-        dataIndex: 'printCount',
-        width: 120,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '10月',
-        dataIndex: 'printCounts',
-        width: 120,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '11月',
-        dataIndex: 'printCsounts',
-        width: 120,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '12月',
-        dataIndex: 'printdCounts',
-        width: 120,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '1-12月费用合计',
-        dataIndex: 'prfintCounts',
-        width: 140,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '实际销售额合计',
-        dataIndex: 'printCogunts',
-        width: 140,
-        align: 'center',
-        customRender: (value, row, index) => {
-          const obj = {
-            children: value,
-            attrs: {}
-          }
-          if (index === 0) {
-            obj.attrs.rowSpan = 5
-          }
-          if (index === 1) {
-            obj.attrs.rowSpan = 0
-          }
-          if (index === 2) {
-            obj.attrs.rowSpan = 0
-          }
-          if (index === 3) {
-            obj.attrs.rowSpan = 0
-          }
-          if (index === 4) {
-            obj.attrs.rowSpan = 0
-          }
-          if (index === 5) {
-            obj.attrs.rowSpan = 5
-          }
-          if (index === 6) {
-            obj.attrs.rowSpan = 0
-          }
-          if (index === 7) {
-            obj.attrs.rowSpan = 0
-          }
-          if (index === 8) {
-            obj.attrs.rowSpan = 0
-          }
-          if (index === 9) {
-            obj.attrs.rowSpan = 0
-          }
-          if (index === 10) {
-            obj.attrs.rowSpan = 5
-          }
-          if (index === 11) {
-            obj.attrs.rowSpan = 0
-          }
-          if (index === 12) {
-            obj.attrs.rowSpan = 0
-          }
-          if (index === 13) {
-            obj.attrs.rowSpan = 0
-          }
-          if (index === 14) {
-            obj.attrs.rowSpan = 0
-          }
-          return obj
-        }
-      },
-      {
-        title: '费用占比(%)',
-        dataIndex: 'phrintCounts',
-        width: 140,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '正常费用',
-        dataIndex: 'printCsountss',
-        width: 120,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      },
-      {
-        title: '特殊申请费用',
-        dataIndex: 'prinftCounts',
-        width: 120,
-        align: 'center',
-        customRender: function (text) {
-          return ((text || text == 0) ? text : '--')
-        }
-      }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return allocateBillList(Object.assign(parameter, this.queryParam)).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: reportData.nationalCustomerCostStatisticsList,
-            count: 10
-          }
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      },
-      allocateTypeList: [], //  调拨类型
-      openModal: false //  新增编辑  弹框
-    }
-  },
-  methods: {
-    //  创建时间  change
-    dateChange (date) {
-      if (date[0] && date[1]) {
-        this.queryParam.time = date
-      } else {
-        this.queryParam.time = []
-      }
-      this.queryParam.beginDate = date[0] || ''
-      this.queryParam.endDate = date[1] || ''
-    },
-    //  重置
-    resetSearchForm () {
-      this.$refs.rangeDate.resetDate(this.queryParam.time)
-      this.queryParam.time = [getDate.getCurrMonthDays().starttime,
-        getDate.getCurrMonthDays().endtime
-      ]
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
-      this.queryParam.targetName = ''
-      this.queryParam.allocateTypeSn = undefined
-      this.queryParam.state = undefined
-      this.queryParam.allocateNo = ''
-      this.$refs.table.refresh(true)
-    },
-    pageInit () {
-
-    }
-  },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
-  activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {})
-  }
-}
-</script>

+ 0 - 193
src/views/reportData/provinceTypeSalesDetails/list.vue

@@ -1,193 +0,0 @@
-<template>
-  <a-card size="small" :bordered="false" class="provinceTypeSalesDetailsList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form-model
-        ref="ruleForm"
-        class="form-model-con"
-        layout="inline"
-        :model="queryParam"
-        :rules="rules"
-        @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="创建时间" prop="time">
-              <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="区域">
-              <a-select id="provinceTypeSalesDetailsList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择区域" allowClear >
-                <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="省份">
-              <a-select id="provinceTypeSalesDetailsList-state" v-model="queryParam.state" placeholder="请选择省份" allowClear >
-                <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="provinceTypeSalesDetailsList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="provinceTypeSalesDetailsList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form-model>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 3650 }"
-      :defaultLoadData="false"
-      bordered>
-    </s-table>
-  </a-card>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-import reportData from '@/libs/reportData'
-import rangeDate from '@/views/common/rangeDate.vue'
-import getDate from '@/libs/getDate.js'
-// import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
-// import { allocateTypeAllList } from '@/api/allocateType'
-export default {
-  components: { STable, VSelect, rangeDate },
-  data () {
-    return {
-      advanced: false, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      queryParam: { //  查询条件
-        time: [
-          getDate.getCurrMonthDays().starttime,
-          getDate.getCurrMonthDays().endtime
-        ],
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        targetName: '', //  调往对象
-        allocateTypeSn: undefined, //  调拨类型
-        state: undefined, //  业务状态
-        allocateNo: '' //  调拨单号
-      },
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
-      rules: {
-        'time': [{ required: true, message: '请选择创建时间', trigger: 'change' }]
-      },
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '区域', dataIndex: 'area', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '省份', dataIndex: 'province', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '箭牌滤清器', dataIndex: 'targetName', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '冠牌滤清器', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '滤清器合计', dataIndex: 'totalQty', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌雨刮片', dataIndex: 'totalCost', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '冠牌雨刮片', dataIndex: 'totalPrice', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '雨刮片合计', dataIndex: 'auditTime', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌刹车片', dataIndex: 'allocateTypeName', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌感应线', dataIndex: 'stateDictValue', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '冠牌刹车片', dataIndex: 'printStateDictValue', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'TBU刹车片', dataIndex: 'printCount', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'TBU刹车油', dataIndex: 'printCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'TBU感应线', dataIndex: 'printCsounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '刹车片合计', dataIndex: 'printdCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯润滑油', dataIndex: 'prfintCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯刹车油', dataIndex: 'printCogunts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯变速箱油', dataIndex: 'phrintCounts', width: 140, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '德路斯合计', dataIndex: 'printCsountss', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '稳升点火线圈', dataIndex: 'prinftCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '稳升灯泡', dataIndex: 'prisntCogunts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '稳升合计', dataIndex: 'prinxtCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '汇箭', dataIndex: 'printCocunts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '布瑞斯', dataIndex: 'printCvounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '箭牌喇叭', dataIndex: 'printCgounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '品牌合计', dataIndex: 'printCouhnts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: 'NGK', dataIndex: 'printCoujnts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '品牌+NGK总合计', dataIndex: 'printCournts', width: 150, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return allocateBillList(Object.assign(parameter, this.queryParam)).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: reportData.provinceTypeSalesList,
-            count: 10
-          }
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      },
-      allocateTypeList: [], //  调拨类型
-      openModal: false //  新增编辑  弹框
-    }
-  },
-  methods: {
-    //  创建时间  change
-    dateChange (date) {
-      if (date[0] && date[1]) {
-        this.queryParam.time = date
-      } else {
-        this.queryParam.time = []
-      }
-      this.queryParam.beginDate = date[0] || ''
-      this.queryParam.endDate = date[1] || ''
-    },
-    //  重置
-    resetSearchForm () {
-      this.queryParam.time = [
-        getDate.getCurrMonthDays().starttime,
-        getDate.getCurrMonthDays().endtime
-      ]
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
-      this.queryParam.targetName = ''
-      this.queryParam.allocateTypeSn = undefined
-      this.queryParam.state = undefined
-      this.queryParam.allocateNo = ''
-      this.$refs.rangeDate.resetDate(this.queryParam.time)
-      this.$refs.table.refresh(true)
-    },
-    pageInit () {
-
-    }
-  },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
-  activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {})
-  }
-}
-</script>

+ 295 - 0
src/views/reportData/regionTypeSalesReport/list.vue

@@ -0,0 +1,295 @@
+<template>
+  <a-card>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-tabs v-model="activeKey" type="card" @change="callback">
+        <a-tab-pane :key="item.id" :tab="item.name" v-for="item in tabsList">
+        </a-tab-pane>
+      </a-tabs>
+      <div class="table-page-search-wrapper">
+        <a-form-model
+          id="returnGoodsPresentationList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :rules="rules"
+          :model="queryParam"
+          @keyup.enter.native="handleSearch">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="审核时间" prop="time">
+                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="销售状态" prop="salesStatusType">
+                <a-select v-model="queryParam.salesStatusType" allowClear placeholder="请选择销售状态">
+                  <a-select-option v-for="item in salesStatusTypeList" :value="item.code" :key="item.code">{{ item.name }}</a-select-option>
+                </a-select>
+              </a-form-model-item>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24" v-if="activeKey==0">
+              <a-form-model-item label="所在区域">
+                <subarea id="returnGoodsPresentationList-subareaSn" v-model="queryParam.subareaSn"></subarea>
+              </a-form-model-item>
+            </a-col>
+            <template v-if="advanced && activeKey==0">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item prop="dealerProvinceSn" style="margin: 0;" label="地区">
+                  <a-select v-model="queryParam.dealerProvinceSn" allowClear placeholder="请选择省">
+                    <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="returnGoodsPresentationList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="returnGoodsPresentationList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 5px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('B_regionTypeSalesReportExport')"
+                id="returnGoodsPresentationList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px" v-if="activeKey==0">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :defaultLoadData="false"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :showPagination="false"
+        :scroll="{ x: 1550 }"
+        bordered>
+      </s-table>
+    </a-spin>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { getArea } from '@/api/data'
+import subarea from '@/views/common/subarea.js'
+import { hdExportExcel } from '@/libs/exportExcel'
+import { realReportSalesByProvince, realReportSalesByProvinceExport, realReportSalesBySubArea, realReportSalesBySubAreaExport } from '@/api/reportData.js'
+export default {
+  components: { STable, VSelect, rangeDate, subarea },
+  data () {
+    return {
+      spinning: false,
+      tabsList: [{ id: 0, name: '各省品类实售明细' }, { id: 1, name: '各区品类实售明细' }],
+      salesStatusTypeList: [{ code: 'SALES', name: '实售销售' }, { code: 'SALES_RETURN', name: '实售退货' }, { code: 'REAL_SALES', name: '实际销售' }],
+      activeKey: 0,
+      advanced: true, // 高级搜索 展开/关闭
+      queryParam: {
+        time: [],
+        beginDate: '',
+        endDate: '',
+        dealerProvinceSn: undefined,
+        subareaSn: undefined,
+        salesStatusType: 'REAL_SALES'
+      },
+      addrProvinceList: [], //  省下拉
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      rules: {
+        'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }],
+        'salesStatusType': [{ required: true, message: '请选择销售状态', trigger: 'change' }]
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const paramsPage = Object.assign(this.queryParam) //  无分页
+        const jkUrl = this.activeKey == 0 ? realReportSalesByProvince : realReportSalesBySubArea
+        return jkUrl(paramsPage).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+          }
+          this.disabled = false
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '区域',
+          dataIndex: 'subareaNames',
+          width: 50,
+          align: 'center',
+          customRender: function (text) { return text || '--' }
+        },
+        { title: '销售状态', dataIndex: 'salesStatus', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '箭牌滤清器', dataIndex: 'jpLqqAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '冠牌滤清器', dataIndex: 'gpLqqAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '滤清器合计', dataIndex: 'lqqAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '箭牌雨刮片', dataIndex: 'jpYgpAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '冠牌雨刮片', dataIndex: 'gpYgpAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '雨刮片合计', dataIndex: 'ygpAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '箭牌刹车片', dataIndex: 'jpScpAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '箭牌感应线', dataIndex: 'jpGyxAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '冠牌刹车片', dataIndex: 'gpScpAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: 'TBU刹车片', dataIndex: 'tbuScpAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: 'TBU刹车油', dataIndex: 'tbuScyAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: 'TBU感应线', dataIndex: 'tbuGyxAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '刹车片合计', dataIndex: 'scpAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: 'TBU-P', dataIndex: 'tbupAmount', align: 'center', width: 50, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '德路斯机油', dataIndex: 'dlsJyAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '德路斯刹车油', dataIndex: 'dlsScyAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '德路斯变速箱油', dataIndex: 'dlsBsxyAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '德路斯合计', dataIndex: 'dlsAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '稳升点火线圈', dataIndex: 'wsDhxqAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '稳升灯泡', dataIndex: 'wsDpAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '稳升合计', dataIndex: 'wsAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '汇箭', dataIndex: 'hjAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '布瑞斯', dataIndex: 'brsAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '箭牌喇叭', dataIndex: 'jpLbAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '品牌合计', dataIndex: 'ppAmount', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: 'NGK', dataIndex: 'ngkAmount', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '品牌+NGK总合计', dataIndex: 'ppAndNgkAmount', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ]
+      if (this.activeKey == 0) {
+        arr.splice(1, 0, { title: '省份', dataIndex: 'dealerProvinceName', width: 50, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    callback (key) {
+      this.activeKey = key
+      this.resetSearchForm()
+      // this.queryParam.time = []
+      // this.$refs.rangeDate.resetDate(this.queryParam.time)
+      // this.$refs.ruleForm.resetFields()
+      // this.$refs.table.clearTable()
+      console.log(key, this.activeKey)
+    },
+    // 查询省
+    getProvinceData (leve, sn) {
+      let params
+      if (leve == 'province') {
+        params = { type: '2' }
+      } else {
+        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
+      }
+      getArea(params).then(res => {
+        if (res.status == 200) {
+          console.log(res, '=============地区')
+          if (leve == 'province') {
+            this.addrProvinceList = res.data || []
+          } else if (leve == 'city') {
+            this.addrCityList = res.data || []
+          } else if (leve == 'district') {
+            this.addrDistrictList = res.data || []
+          }
+        } else {
+          if (leve == 'province') {
+            this.addrProvinceList = []
+          } else if (leve == 'city') {
+            this.addrCityList = []
+          } else if (leve == 'district') {
+            this.addrDistrictList = []
+          }
+        }
+      })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    // 查询
+    handleSearch () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$refs.table.refresh(true)
+        } else {
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.ruleForm.resetFields()
+      this.queryParam.time = []
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.dealerProvinceSn = undefined
+      this.queryParam.subareaSn = undefined
+      this.queryParam.salesStatusType = 'REAL_SALES'
+      this.$refs.table.clearTable()
+    },
+    //  导出
+    handleExport () {
+      const _this = this
+      const jkUrl = _this.activeKey == 0 ? realReportSalesByProvinceExport : realReportSalesBySubAreaExport
+      const excelTitle = _this.activeKey == 0 ? '各省品类实售明细报表' : '各区品类实售明细报表'
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          hdExportExcel(jkUrl, params, excelTitle, function () {
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    pageInit () {
+      this.activeKey = 0
+      this.getProvinceData('province')
+      this.resetSearchForm()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      // this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      // this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style style="less">
+  .regionTypeSalesReportList-wrap{
+
+  }
+</style>

+ 0 - 196
src/views/reportData/regionalPromotionCostStatistics/list.vue

@@ -1,196 +0,0 @@
-<template>
-  <a-card size="small" :bordered="false" class="regionalPromotionCostStatisticsList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form-model
-        ref="ruleForm"
-        class="form-model-con"
-        layout="inline"
-        :rules="rules"
-        :model="queryParam"
-        @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="创建时间" prop="time">
-              <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="区域">
-              <a-select id="regionalPromotionCostStatisticsList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择区域" allowClear >
-                <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="regionalPromotionCostStatisticsList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="regionalPromotionCostStatisticsList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form-model>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :showPagination="false"
-      :data="loadData"
-      :scroll="{ x: 2500 }"
-      :defaultLoadData="false"
-      bordered>
-    </s-table>
-  </a-card>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-import reportData from '@/libs/reportData'
-import rangeDate from '@/views/common/rangeDate.vue'
-import getDate from '@/libs/getDate.js'
-// import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
-// import { allocateTypeAllList } from '@/api/allocateType'
-export default {
-  components: { STable, VSelect, rangeDate },
-  data () {
-    return {
-      advanced: false, // 高级搜索 展开/关闭
-      tableHeight: 0,
-      queryParam: { //  查询条件
-        time: [
-          getDate.getCurrMonthDays().starttime,
-          getDate.getCurrMonthDays().endtime
-        ],
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
-        targetName: '', //  调往对象
-        allocateTypeSn: undefined, //  调拨类型
-        state: undefined, //  业务状态
-        allocateNo: '' //  调拨单号
-      },
-      disabled: false, //  查询、重置按钮是否可操作
-      exportLoading: false,
-      rules: {
-        'time': [{ required: true, message: '请选择创建时间', trigger: 'change' }]
-      },
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '省份', dataIndex: 'province', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '所属调拨类列', dataIndex: 'targetName', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '1月', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '2月', dataIndex: 'totalQty', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '3月', dataIndex: 'totalCost', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '4月', dataIndex: 'totalPrice', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '5月', dataIndex: 'auditTime', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '6月', dataIndex: 'allocateTypeName', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '7月', dataIndex: 'stateDictValue', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '8月', dataIndex: 'printStateDictValue', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '9月', dataIndex: 'printCount', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '10月', dataIndex: 'printCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '11月', dataIndex: 'printCsounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '12月', dataIndex: 'printdCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '1-12月费用合计', dataIndex: 'prfintCounts', width: 140, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        {
-          title: '实际销售额合计',
-          dataIndex: 'printCogunts',
-          width: 140,
-          align: 'center',
-          customRender: (value, row, index) => {
-            const obj = {
-              children: value,
-              attrs: {}
-            }
-            if (index === 0) { obj.attrs.rowSpan = 6 }
-            if (index === 1) { obj.attrs.rowSpan = 0 }
-            if (index === 2) { obj.attrs.rowSpan = 0 }
-            if (index === 3) { obj.attrs.rowSpan = 0 }
-            if (index === 4) { obj.attrs.rowSpan = 0 }
-            if (index === 5) { obj.attrs.rowSpan = 0 }
-            return obj
-          }
-        },
-        { title: '费用占比(%)', dataIndex: 'phrintCounts', width: 140, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '正常费用', dataIndex: 'printCsountss', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '特殊申请费用', dataIndex: 'prinftCounts', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return allocateBillList(Object.assign(parameter, this.queryParam)).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: reportData.regionalPromotionCostStatisticsList,
-            count: 10
-          }
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      },
-      allocateTypeList: [], //  调拨类型
-      openModal: false //  新增编辑  弹框
-    }
-  },
-  methods: {
-    //  创建时间  change
-    dateChange (date) {
-      if (date[0] && date[1]) {
-        this.queryParam.time = date
-      } else {
-        this.queryParam.time = []
-      }
-      this.queryParam.beginDate = date[0] || ''
-      this.queryParam.endDate = date[1] || ''
-    },
-    //  重置
-    resetSearchForm () {
-      this.$refs.rangeDate.resetDate(this.queryParam.time)
-      this.queryParam.time = [
-        getDate.getCurrMonthDays().starttime,
-        getDate.getCurrMonthDays().endtime
-      ]
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
-      this.queryParam.targetName = ''
-      this.queryParam.allocateTypeSn = undefined
-      this.queryParam.state = undefined
-      this.queryParam.allocateNo = ''
-      this.$refs.table.refresh(true)
-    },
-    pageInit () {
-
-    }
-  },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
-  activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {})
-  }
-}
-</script>

+ 1 - 1
src/views/result/Error.vue

@@ -5,7 +5,7 @@
         <a-button type="primary" >返回修改</a-button>
       </template>
       <div>
-        <div style="font-size: 16px; color: rgba(0, 0, 0, 0.85); font-weight: 500; margin-bottom: 16px">
+        <div style="font-size: 16px; color: rgba(0, 0, 0); font-weight: 500; margin-bottom: 16px">
           您提交的内容有如下错误:
         </div>
         <div style="margin-bottom: 16px">

+ 4 - 4
src/views/result/Success.vue

@@ -7,18 +7,18 @@
         <a-button style="margin-left: 8px">打印</a-button>
       </template>
       <div>
-        <div style="font-size: 16px; color: rgba(0, 0, 0, 0.85); font-weight: 500; margin-bottom: 20px;">项目名称</div>
+        <div style="font-size: 16px; color: rgba(0, 0, 0); font-weight: 500; margin-bottom: 20px;">项目名称</div>
         <a-row style="margin-bottom: 16px">
           <a-col :xs="24" :sm="12" :md="12" :lg="12" :xl="6">
-            <span style="color: rgba(0, 0, 0, 0.85)">项目 ID:</span>
+            <span style="color: rgba(0, 0, 0)">项目 ID:</span>
             20180724089
           </a-col>
           <a-col :xs="24" :sm="12" :md="12" :lg="12" :xl="6">
-            <span style="color: rgba(0, 0, 0, 0.85)">负责人:</span>
+            <span style="color: rgba(0, 0, 0)">负责人:</span>
             曲丽丽是谁?
           </a-col>
           <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
-            <span style="color: rgba(0, 0, 0, 0.85)">生效时间:</span>
+            <span style="color: rgba(0, 0, 0)">生效时间:</span>
             2016-12-12 ~ 2017-12-12
           </a-col>
         </a-row>

+ 1 - 1
src/views/salesManagement/examineVerify/auditRejectModal.vue

@@ -27,7 +27,7 @@
               id="auditRejectModal-remarks"
               :maxLength="100"
               type="textarea"
-              v-model="form.remarks"
+              v-model.trim="form.remarks"
               ref="remarks"
               placeholder="请输入原因(最多100个字符)"
               allowClear />

+ 2 - 2
src/views/salesManagement/examineVerify/list.vue

@@ -335,9 +335,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 16 - 65
src/views/salesManagement/outboundOrder/list.vue

@@ -78,7 +78,7 @@
       <div style="margin-bottom: 10px" v-if="$hasPermissions('B_stockOut')">
         <a-button type="primary" class="button-error" id="outboundOrder-export" :loading="loading" @click="handleOutbound()">批量出库</a-button>
         <span style="margin-left: 5px">
-          <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+          <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
         </span>
       </div>
       <s-table
@@ -86,8 +86,10 @@
         ref="table"
         :style="{ height: tableHeight+84.5+'px' }"
         size="small"
-        :row-selection="$hasPermissions('B_stockOut')?rowSelection:null"
         :rowKey="(record) => record.stockOutSn"
+        rowKeyName="stockOutSn"
+        :row-selection="$hasPermissions('B_stockOut')?{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.state == 'FINISH' } }) }:null"
+        @rowSelection="rowSelectionFun"
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
@@ -163,8 +165,6 @@ export default {
         shippingAddrProvinceSn: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
-      selectedRowKeys: [], // Check here to configure the default column
-      selectedRows: [],
       loading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -187,7 +187,8 @@ export default {
       addrProvinceList: [], //  省下拉
       openModal: false,
       orderSn: undefined,
-      outBizType: null //  当前单子类型   SALES销售出库        ALLOCATE调拨出库
+      outBizType: null, //  当前单子类型   SALES销售出库        ALLOCATE调拨出库
+      rowSelectionInfo: null
     }
   },
   computed: {
@@ -209,31 +210,13 @@ export default {
         arr.splice(7, 0, { title: '售价', dataIndex: 'productTotalPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr
-    },
-    hasSelected () {
-      return this.selectedRowKeys.length > 0
-    },
-    rowSelection () {
-      return {
-        selectedRowKeys: this.selectedRowKeys,
-        onChange: (selectedRowKeys, selectedRows) => {
-          this.onChange(selectedRowKeys, selectedRows)
-        },
-        onSelect: (record, selected, selectedRows, nativeEvent) => {
-          this.onSelectChange(record, selected, selectedRows, nativeEvent)
-        },
-        onSelectAll: (selected, selectedRows, changeRows) => {
-          this.onSelectAllChange(selected, selectedRows, changeRows)
-        },
-        getCheckboxProps: record => ({
-          props: {
-            disabled: record.state == 'FINISH' // Column configuration not to be checked
-          }
-        })
-      }
     }
   },
   methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
     detailPermissions (row) {
       let state = false
       //  根据出库类型和对应功能权限 判断是否有查看详情的权限
@@ -268,11 +251,9 @@ export default {
       this.outBizType = row.outBizType
       //  根据出库类型跳转对应页面
       if (row.outBizType == 'SALES' && this.$hasPermissions('B_dispatchDetail')) { //  销售出库
-        // this.$router.push({ path: `/salesManagement/pushOrderManagement/detail/${row.outBizSubSn}/stockOut` })
         this.orderSn = row.outBizSubSn
         this.openModal = true
       } else if (row.outBizType == 'ALLOCATE' && this.$hasPermissions('M_transferOut_detail')) { //  调拨出库
-        // this.$router.push({ path: `/allocationManagement/transferOut/detail/${row.outBizSn}` })
         this.orderSn = row.outBizSn
         this.openModal = true
       } else if (row.outBizType == 'CHECK_ORDER_OUT') { //  库存盘点盘亏
@@ -300,12 +281,12 @@ export default {
         }]
       } else { //  批量出库
         content = '确认要批量出库吗?'
-        if (this.selectedRowKeys.length < 1) {
+        if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length < 1)) {
           this.$message.warning('请在列表勾选后再进行批量操作!')
           return
         }
         params = []
-        this.selectedRows.map(item => {
+        this.rowSelectionInfo && this.rowSelectionInfo.selectedRows.map(item => {
           params.push({
             stockOutSn: item.stockOutSn,
             outBizSn: item.outBizSn,
@@ -327,8 +308,7 @@ export default {
             _this.loading = false
             if (res.status == 200) {
               if (!row) { //  批量出库
-                _this.selectedRowKeys = []
-                _this.selectedRows = []
+                _this.$refs.table.clearSelected() // 清空表格选中项
               }
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
@@ -340,35 +320,6 @@ export default {
         }
       })
     },
-    onChange (selectedRowKeys, selectedRows) {
-      this.selectedRowKeys = selectedRowKeys
-    },
-    onSelectChange (record, selected, selectedRows, nativeEvent) {
-      if (selected) { //  选择
-        this.selectedRows.push(record)
-      } else { //  取消
-        this.selectedRows = selectedRows
-      }
-    },
-    // 本页全选/取消全选
-    onSelectAllChange (selected, selectedRows, changeRows) {
-      const _this = this
-      if (selected) { //  选择
-        this.selectedRows = [...this.selectedRows, ...changeRows]
-      } else { //  取消
-        const arrId = []
-        this.selectedRows.map((item, index) => {
-          this.selectedRows.map((subItem, ind) => {
-            if (item.stockOutSn == subItem.stockOutSn) {
-              arrId.push(index)
-            }
-          })
-        })
-        arrId.map((item, index) => {
-          _this.selectedRows = _this.selectedRows.slice(item, item + 1)
-        })
-      }
-    },
     //  省/市/区
     getArea (leve, sn) {
       let params
@@ -412,9 +363,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()
@@ -450,7 +401,7 @@ export default {
       cursor: pointer;
     }
     .common{
-      color: rgba(0, 0, 0, 0.65);
+      color: rgba(0, 0, 0);
     }
   }
 </style>

+ 2 - 2
src/views/salesManagement/priceInquiry/list.vue

@@ -334,9 +334,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/salesManagement/pushOrderManagement/list.vue

@@ -257,9 +257,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 12 - 47
src/views/salesManagement/salesQuery/chooseActive.vue

@@ -6,25 +6,16 @@
     title="促销品列表"
     v-model="isShow"
     @cancle="cansel"
-    width="80%">
+    :width="960">
     <a-card size="small" :bordered="false" class="productInfoList-wrap">
       <!-- 列表 -->
       <s-table
         class="sTable"
         ref="table"
         size="small"
-        :row-selection="{
-          selectedRowKeys: selectedRowKeys,
-          onChange: onChange,
-          onSelect: onSelectChange,
-          onSelectAll: onSelectAllChange,
-          getCheckboxProps: record => ({
-            props: {
-              disabled: record.cost == undefined||record.cost==0||record.productPrice==0||record.productPrice==undefined, // Column configuration not to be checked
-            }
-          })
-        }"
         :rowKey="(record) => record.id"
+        :row-selection="{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.cost == undefined||record.cost==0||record.productPrice==0||record.productPrice==undefined } }) }"
+        @rowSelection="rowSelectionFun"
         :columns="columns"
         :data="loadData"
         :defaultLoadData="false"
@@ -39,6 +30,7 @@
             v-model="record.qty"
             :precision="0"
             :step="1"
+            style="width: 100%;"
           />
         </template>
       </s-table>
@@ -76,8 +68,6 @@ export default {
   data () {
     return {
       isShow: this.openModal,
-      selectedRowKeys: [], // Check here to configure the default column
-      selectedRows: [],
       spinning: false,
       list: [],
       salesBillDetailSn: null,
@@ -100,7 +90,8 @@ export default {
           this.spinning = false
           return data
         })
-      }
+      },
+      rowSelectionInfo: null
     }
   },
   computed: {
@@ -126,44 +117,19 @@ export default {
     }
   },
   methods: {
-    onChange (selectedRowKeys, selectedRows) {
-      this.selectedRowKeys = selectedRowKeys
-    },
-    onSelectChange (record, selected, selectedRows, nativeEvent) {
-      if (selected) { //  选择
-        this.selectedRows.push(record)
-      } else { //  取消
-        this.selectedRows = selectedRows
-      }
-    },
-    // 本页全选/取消全选
-    onSelectAllChange (selected, selectedRows, changeRows) {
-      const _this = this
-      if (selected) { //  选择
-        this.selectedRows = [...this.selectedRows, ...changeRows]
-      } else { //  取消
-        const arrId = []
-        this.selectedRows.map((item, index) => {
-          this.selectedRows.map((subItem, ind) => {
-            if (item.id == subItem.id) {
-              arrId.push(index)
-            }
-          })
-        })
-        arrId.map((item, index) => {
-          _this.selectedRows = _this.selectedRows.slice(item, item + 1)
-        })
-      }
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
     },
     // 选择产品
     handleSubmit () {
       const _this = this
-      if (_this.selectedRowKeys.length < 1) {
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
         _this.$message.warning('请选择促销品!')
         return
       }
       const obj = []
-      _this.selectedRows.map(item => {
+      _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
         obj.push({
           showCost: item.cost,
           price: item.promoRuleGoods.goodsPrice,
@@ -202,8 +168,7 @@ export default {
     //  重定义的弹框状态
     isShow (newValue, oldValue) {
       if (!newValue) {
-        this.selectedRows = []
-        this.selectedRowKeys = []
+        this.$refs.table.clearSelected() // 清空表格选中项
         this.$emit('close')
       }
     }

+ 2 - 2
src/views/salesManagement/salesQuery/edit.vue

@@ -55,12 +55,12 @@
                 <a-row :gutter="15">
                   <a-col :md="6" :sm="24">
                     <a-form-item label="产品编码" prop="productCode">
-                      <a-input id="salesEdit-productCode" v-model="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+                      <a-input id="salesEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24">
                     <a-form-item label="产品名称" prop="productName">
-                      <a-input id="salesEdit-productName" v-model="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                      <a-input id="salesEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">

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

@@ -450,9 +450,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 3 - 3
src/views/salesManagement/salesQuery/receivingAddress/editAddressModal.vue

@@ -21,7 +21,7 @@
           <a-input
             id="editAddress-name"
             :maxLength="30"
-            v-model="form.consigneeName"
+            v-model.trim="form.consigneeName"
             placeholder="请输入收货人(最多30个字符)"
             allowClear />
         </a-form-model-item>
@@ -29,7 +29,7 @@
           <a-input
             id="editAddress-phone"
             :maxLength="30"
-            v-model="form.consigneeTel"
+            v-model.trim="form.consigneeTel"
             placeholder="请输入收货人电话(最多30个字符)"
             allowClear />
         </a-form-model-item>
@@ -63,7 +63,7 @@
           <a-input
             id="editAddress-address"
             :maxLength="60"
-            v-model="form.addr"
+            v-model.trim="form.addr"
             placeholder="请输入详细地址(最多60个字符)"
             allowClear />
         </a-form-model-item>

+ 2 - 2
src/views/salesManagement/salesReturn/list.vue

@@ -401,9 +401,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 10 - 35
src/views/salesManagement/salesReturn/salesReturnCheck.vue

@@ -18,8 +18,9 @@
           ref="table"
           :style="{ height: tableHeight+84.5+'px' }"
           size="small"
-          :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }"
           :rowKey="(record) => record.id"
+          :row-selection="{ columnWidth: 40 }"
+          @rowSelection="rowSelectionFun"
           :columns="columns"
           :data="loadData"
           :scroll="{ y: tableHeight }"
@@ -80,8 +81,6 @@ export default {
       isInster: false, // 是否正在添加产品
       ordeDetail: { discountAmount: 0 },
       loading: false,
-      selectedRowKeys: [], // Check here to configure the default column
-      selectedRows: [],
       // 已选产品
       dataSource: [],
       productForm: {
@@ -107,7 +106,8 @@ export default {
           }
           return data
         })
-      }
+      },
+      rowSelectionInfo: null
     }
   },
   computed: {
@@ -129,34 +129,9 @@ export default {
     }
   },
   methods: {
-    onChange (selectedRowKeys, selectedRows) {
-      this.selectedRowKeys = selectedRowKeys
-    },
-    onSelectChange (record, selected, selectedRows, nativeEvent) {
-      if (selected) { //  选择
-        this.selectedRows.push(record)
-      } else { //  取消
-        this.selectedRows = selectedRows
-      }
-    },
-    // 本页全选/取消全选
-    onSelectAllChange (selected, selectedRows, changeRows) {
-      const _this = this
-      if (selected) { //  选择
-        this.selectedRows = [...this.selectedRows, ...changeRows]
-      } else { //  取消
-        const arrId = []
-        this.selectedRows.map((item, index) => {
-          this.selectedRows.map((subItem, ind) => {
-            if (item.id == subItem.id) {
-              arrId.push(index)
-            }
-          })
-        })
-        arrId.map((item, index) => {
-          _this.selectedRows = _this.selectedRows.slice(item, item + 1)
-        })
-      }
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
     },
     //  返回
     handleBack () {
@@ -165,8 +140,8 @@ export default {
     // 批量返库
     backStock () {
       const _this = this
-      if (_this.selectedRowKeys.length < 1) {
-        _this.$message.warning('请选择产品!')
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+        _this.$message.warning('请选择产品!')
         return
       }
       this.$confirm({
@@ -175,7 +150,7 @@ export default {
         centered: true,
         onOk () {
           const obj = []
-          _this.selectedRows.map(item => {
+          _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
             obj.push({
               salesReturnDetailSn: item.salesReturnDetailSn,
               backStockQty: item.qty

+ 1 - 1
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -66,7 +66,7 @@
           </template>
           <!-- 退货原因 -->
           <template slot="remark" slot-scope="text, record">
-            <a-input size="small" placeholder="30个字符内" :maxLength="30" v-model="record.remark" @blur="updateRemark(record)"></a-input>
+            <a-input size="small" placeholder="30个字符内" :maxLength="30" v-model.trim="record.remark" @blur="updateRemark(record)"></a-input>
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">

+ 1 - 1
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -70,7 +70,7 @@
               size="small"
               placeholder="30个字符内"
               :maxLength="30"
-              v-model="record.remark"
+              v-model.trim="record.remark"
               @blur="updateRemark(record)"
               style="width: 100%;"></a-input>
           </template>

+ 2 - 2
src/views/salesManagement/shortageStatisticsC/list.vue

@@ -411,9 +411,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/salesManagement/shortageStatisticsP/list.vue

@@ -187,9 +187,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 13 - 40
src/views/salesManagement/waitDispatch/edit.vue

@@ -47,8 +47,9 @@
           class="sTable"
           ref="table"
           size="small"
-          :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }"
           :rowKey="(record) => record.id"
+          :row-selection="{ columnWidth: 40 }"
+          @rowSelection="rowSelectionFun"
           :columns="columns"
           :data="loadData"
           :showPagination="false"
@@ -125,8 +126,6 @@ export default {
       productForm: {
         dispatchBillSn: ''
       },
-      selectedRowKeys: [], // Check here to configure the default column
-      selectedRows: [],
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -158,38 +157,14 @@ export default {
           return data
         })
       },
-      totalData: null
+      totalData: null,
+      rowSelectionInfo: null
     }
   },
   methods: {
-    onChange (selectedRowKeys, selectedRows) {
-      this.selectedRowKeys = selectedRowKeys
-    },
-    onSelectChange (record, selected, selectedRows, nativeEvent) {
-      if (selected) { //  选择
-        this.selectedRows.push(record)
-      } else { //  取消
-        this.selectedRows = selectedRows
-      }
-    },
-    // 本页全选/取消全选
-    onSelectAllChange (selected, selectedRows, changeRows) {
-      const _this = this
-      if (selected) { //  选择
-        this.selectedRows = [...this.selectedRows, ...changeRows]
-      } else { //  取消
-        const arrId = []
-        this.selectedRows.map((item, index) => {
-          this.selectedRows.map((subItem, ind) => {
-            if (item.id == subItem.id) {
-              arrId.push(index)
-            }
-          })
-        })
-        arrId.map((item, index) => {
-          _this.selectedRows = _this.selectedRows.slice(item, item + 1)
-        })
-      }
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
     },
     // 统计查询
     getTotalData () {
@@ -237,13 +212,13 @@ export default {
     // 批量删除
     delSalerDetailAll () {
       const _this = this
-      if (_this.selectedRowKeys.length < 1) {
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
         _this.$message.warning('请在选择待下推产品!')
         return
       }
       const obj = []
-      _this.selectedRows.map(item => {
-        if (_this.selectedRowKeys.indexOf(item.id) != -1) {
+      _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
+        if (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.indexOf(item.id) != -1) {
           obj.push(item.dispatchBillDetailSn)
         }
       })
@@ -280,11 +255,10 @@ export default {
           _this.resetSearchForm(true)
           _this.$refs.partQuery.resetCurForm()
           if (type == 1) { //  批量操作
-            _this.selectedRowKeys = []
-            _this.selectedRows = []
+            _this.$refs.table.clearSelected() // 清空表格选中项
           } else if (type == 0) { //  单条
-            const ind = _this.selectedRowKeys.findIndex(item => item == row.id)
-            _this.selectedRowKeys.splice(ind, 1)
+            const ind = _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.findIndex(item => item == row.id)
+            _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.splice(ind, 1)
           }
           _this.$message.success(res.message)
           _this.spinning = false
@@ -296,7 +270,6 @@ export default {
     },
     // 添加产品
     insterProduct (list) {
-      console.log(list)
       // 防止多次添加产品
       if (this.isInster) { return }
       this.saveNewProduct(list)

+ 15 - 52
src/views/salesManagement/waitDispatch/queryPart.vue

@@ -77,16 +77,9 @@
       class="sTable"
       ref="table"
       size="small"
-      :row-selection="{
-        selectedRowKeys: selectedRowKeys,
-        onChange: onChange,
-        onSelect: onSelectChange,
-        onSelectAll: onSelectAllChange,
-        getCheckboxProps:record =>({props: {
-          disabled: record.surplusQty<=0,
-        }})
-      }"
       :rowKey="(record) => record.id"
+      :row-selection="{ columnWidth: 40, getCheckboxProps:record =>({props: { disabled: record.surplusQty<=0 }})}"
+      @rowSelection="rowSelectionFun"
       :columns="columns"
       :showPagination="false"
       :data="loadData"
@@ -141,7 +134,6 @@ export default {
   },
   watch: {
     data (newValue, oldValue) {
-      console.log(newValue)
       this.resetSearchForm()
     }
   },
@@ -164,8 +156,6 @@ export default {
         salesBillSn: ''
       },
       disabled: false, //  查询、重置按钮是否可操作
-      selectedRowKeys: [], // Check here to configure the default column
-      selectedRows: [],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -201,7 +191,8 @@ export default {
           }
           return data
         })
-      }
+      },
+      rowSelectionInfo: null
     }
   },
   computed: {
@@ -233,39 +224,12 @@ export default {
     }
   },
   methods: {
-    onChange (selectedRowKeys, selectedRows) {
-      this.selectedRowKeys = selectedRowKeys
-    },
-    onSelectChange (record, selected, selectedRows, nativeEvent) {
-      if (selected) { //  选择
-        this.selectedRows.push(record)
-      } else { //  取消
-        this.selectedRows = selectedRows
-      }
-    },
-    // 本页全选/取消全选
-    onSelectAllChange (selected, selectedRows, changeRows) {
-      const _this = this
-      if (selected) { //  选择
-        this.selectedRows = [...this.selectedRows, ...changeRows]
-      } else { //  取消
-        const arrId = []
-        this.selectedRows.map((item, index) => {
-          this.selectedRows.map((subItem, ind) => {
-            if (item.id == subItem.id) {
-              arrId.push(index)
-            }
-          })
-        })
-        arrId.map((item, index) => {
-          _this.selectedRows = _this.selectedRows.slice(item, item + 1)
-        })
-      }
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
     },
     // 类型变化,过滤列表
-    handlePtypeChange () {
-
-    },
+    handlePtypeChange () {},
     //  重置
     resetSearchForm () {
       this.queryParam.ptype = '0'
@@ -286,8 +250,7 @@ export default {
     },
     // 刷新当前页面
     resetCurForm () {
-      this.selectedRowKeys = []
-      this.selectedRows = []
+      this.$refs.table.clearSelected() // 清空表格选中项
       this.$refs.table.refresh()
     },
     // 添加
@@ -301,12 +264,12 @@ export default {
     // 批量添加
     handlePlAdd () {
       const _this = this
-      if (_this.selectedRowKeys.length < 1) {
-        _this.$message.warning('请选择产品!')
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+        _this.$message.warning('请选择产品!')
         return
       }
       const obj = []
-      _this.selectedRows.map(item => {
+      _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
         if (item.stockQty > 0) {
           obj.push(item.salesBillDetailSn)
         }
@@ -328,12 +291,12 @@ export default {
     // 批量取消
     handlePlCancel () {
       const _this = this
-      if (_this.selectedRowKeys.length < 1) {
-        _this.$message.warning('请选择产品!')
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+        _this.$message.warning('请选择产品!')
         return
       }
       const obj = []
-      _this.selectedRows.map(item => {
+      _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
         obj.push({
           'cancelQty': item.cancelNums,
           'salesBillDetailSn': item.salesBillDetailSn

+ 1 - 1
src/views/setting/notice/detailModal.vue

@@ -192,7 +192,7 @@ export default {
     }
     .attachLink{
       display: inline-block;
-      color: rgba(0, 0, 0, 0.65);
+      color: rgba(0, 0, 0);
       &:hover{
         text-decoration: underline;
       }

+ 1 - 1
src/views/setting/noticeManagement/detailModal.vue

@@ -189,7 +189,7 @@ export default {
     }
     .attachLink{
       display: inline-block;
-      color: rgba(0, 0, 0, 0.65);
+      color: rgba(0, 0, 0);
       &:hover{
         text-decoration: underline;
       }

+ 1 - 1
src/views/setting/noticeManagement/editModal.vue

@@ -29,7 +29,7 @@
             <a-input
               id="noticeEdit-title"
               :maxLength="30"
-              v-model="form.title"
+              v-model.trim="form.title"
               placeholder="请输入公告标题(最多30个字符)"
               allowClear />
           </a-form-model-item>

+ 2 - 2
src/views/supplierManagement/associatedProduct/add.vue

@@ -281,9 +281,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/supplierManagement/associatedProductDetails/list.vue

@@ -161,9 +161,9 @@ export default {
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
-      setTimeout(() => {
+      this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
-      }, 400)
+      })
     },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()

+ 2 - 2
src/views/supplierManagement/supplierInfo/edit.vue

@@ -24,7 +24,7 @@
                     <a-input
                       id="supplierInfoEdit-supplierName"
                       :maxLength="30"
-                      v-model="form.supplierName"
+                      v-model.trim="form.supplierName"
                       placeholder="请输入供应商名称(最多30个字符)"
                       allowClear />
                   </a-form-model-item>
@@ -82,7 +82,7 @@
                     <a-input
                       id="supplierInfoEdit-address"
                       :maxLength="60"
-                      v-model="form.address"
+                      v-model.trim="form.address"
                       placeholder="请输入详细地址(最多60个字符)"
                       allowClear />
                   </a-form-model-item>

+ 2 - 2
vue.config.js

@@ -109,8 +109,8 @@ const vueConfig = {
     proxy: {
       '/api': {
         // target: 'http://192.168.16.188:8602/ocs-admin',
-        target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        // target: 'http://p.ocs.360arrow.com/ocs-admin', //  预发布
+        // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
+        target: 'http://p.ocs.360arrow.com/ocs-admin', //  预发布
         // target: 'http://ocs-admin.360arrow.com/ocs-admin', //  生产
         ws: false,
         changeOrigin: true,