lilei 1 周之前
父節點
當前提交
55cc3f36e8

+ 20 - 11
src/views/reportData/billingStatistics/customerCountList.vue

@@ -133,11 +133,21 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import BizUser from '@/views/common/bizUser.js'
 import BizUser from '@/views/common/bizUser.js'
 import customerService from '@/views/common/customerService.vue'
 import customerService from '@/views/common/customerService.vue'
 // 接口
 // 接口
-import { salesStatsDealerList, salesStatsDealerTitle, salesStatsDealerCount, salesStatsDealerExport } from '@/api/reportData'
+import { salesStatsDealerList, salesStatsDealerCount, salesStatsDealerExport } from '@/api/reportData'
 export default {
 export default {
   name: 'CustomerCountList',
   name: 'CustomerCountList',
   mixins: [commonMixin],
   mixins: [commonMixin],
   components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, BizUser, customerService },
   components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, BizUser, customerService },
+  props: {
+    removeReportFlag: {
+      type: [String, Number],
+      default: '0'
+    },
+    tableTitle: {
+      type: Object,
+      default: () => {}
+    }
+  },
   data () {
   data () {
     return {
     return {
       spinning: false,
       spinning: false,
@@ -178,6 +188,7 @@ export default {
           this.queryParam.endDate = undefined
           this.queryParam.endDate = undefined
         }
         }
         const params = Object.assign(parameter, this.queryParam)
         const params = Object.assign(parameter, this.queryParam)
+        params.removeReportFlag = this.removeReportFlag
         // 获取列表数据  有分页
         // 获取列表数据  有分页
         return salesStatsDealerList(params).then(res => {
         return salesStatsDealerList(params).then(res => {
           let data
           let data
@@ -224,16 +235,17 @@ export default {
     // 获取表头
     // 获取表头
     async getTableTitle () {
     async getTableTitle () {
       const _this = this
       const _this = this
-      const tableTitle = await salesStatsDealerTitle().then(res => res.data)
-      this.columns = tableTitle.list
-      this.countLabel = tableTitle.count
+      this.columns = _this.tableTitle.list
+      this.countLabel = _this.tableTitle.count
       this.columns.map(item => {
       this.columns.map(item => {
         item.titleNum = item.title
         item.titleNum = item.title
-        let mw = 20
+        const mw = item.customRender == 'amount' ? 15 : 20
+        const textLen = typeof item.title === 'string' ? item.title.length : (item.title.children && item.title.children[0].text && item.title.children[0].text.length)
+        const w = textLen * mw
+        const tw = w <= 80 ? mw * 5 : w
         if (item.customRender == 'amount') {
         if (item.customRender == 'amount') {
-          mw = 15
           if (item.colour && item.colour === 'red') {
           if (item.colour && item.colour === 'red') {
-            item.title = <span style="color:red;">{item.titleNum}</span>
+            item.title = <span style="color:red;">{ item.title }</span>
             item.customRender = (text) => { return <span style="color:red;">{(text || text == 0) ? _this.toThousands(text) : '--'}</span> }
             item.customRender = (text) => { return <span style="color:red;">{(text || text == 0) ? _this.toThousands(text) : '--'}</span> }
           } else {
           } else {
             item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
             item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
@@ -241,8 +253,6 @@ export default {
         } else {
         } else {
           item.customRender = function (text) { return text || '--' }
           item.customRender = function (text) { return text || '--' }
         }
         }
-        const w = item.titleNum.length * mw
-        const tw = w <= 80 ? mw * 5 : w
         item.width = tw + 'px'
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
         this.tableWidth = this.tableWidth + tw
       })
       })
@@ -341,6 +351,7 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
       this.$nextTick(() => { // 页面渲染完成后的回调
         this.setTableH()
         this.setTableH()
         this.resetSearchForm()
         this.resetSearchForm()
+        this.getTableTitle()
       })
       })
     },
     },
     // 计算表格高度
     // 计算表格高度
@@ -352,14 +363,12 @@ export default {
   mounted () {
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.pageInit()
       this.pageInit()
-      this.getTableTitle()
     }
     }
   },
   },
   activated () {
   activated () {
     // 如果是新页签打开,则重置当前页面
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
     if (this.$store.state.app.isNewTab) {
       this.pageInit()
       this.pageInit()
-      this.getTableTitle()
     }
     }
   }
   }
 }
 }

+ 568 - 0
src/views/reportData/billingStatistics/dataCustomer.js

@@ -0,0 +1,568 @@
+export default {
+    'count': [
+      {
+        'customRender': 'amount',
+        'dataIndex': 'jplqq',
+        'title': '箭牌滤清器',
+        'align': 'right',
+        'key': 'jplqq'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'jpbsxlqq',
+        'title': '箭牌变速箱滤清器',
+        'align': 'right',
+        'key': 'jpbsxlqq'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'gplqq',
+        'title': '冠牌滤清器',
+        'align': 'right',
+        'key': 'gplqq'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'lqqhj',
+        'title': '滤清器合计',
+        'align': 'right',
+        'key': 'lqqhj'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'jpygp',
+        'title': '箭牌雨刮片',
+        'align': 'right',
+        'key': 'jpygp'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'jpyyygp',
+        'title': '箭牌雨燕雨刮片',
+        'align': 'right',
+        'key': 'jpyyygp'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'gpygp',
+        'title': '冠牌雨刮片',
+        'align': 'right',
+        'key': 'gpygp'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'ygphj',
+        'title': '雨刮片合计',
+        'align': 'right',
+        'key': 'ygphj'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'jplb',
+        'title': '箭牌喇叭',
+        'align': 'right',
+        'key': 'jplb'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'jpscp',
+        'title': '箭牌刹车片',
+        'align': 'right',
+        'key': 'jpscp'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'tbujpgyx',
+        'title': 'TBU+箭牌感应线',
+        'align': 'right',
+        'key': 'tbujpgyx'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'gpscp',
+        'title': '冠牌刹车片',
+        'align': 'right',
+        'key': 'gpscp'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'tbuscp',
+        'title': 'TBU刹车片',
+        'align': 'right',
+        'key': 'tbuscp'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'tbuzhscp',
+        'title': 'TBU至惠刹车片',
+        'align': 'right',
+        'key': 'tbuzhscp'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'tbuscy',
+        'title': 'TBU刹车油',
+        'align': 'right',
+        'key': 'tbuscy'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'tubpscp',
+        'title': 'TBU-P刹车盘',
+        'align': 'right',
+        'key': 'tubpscp'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'scphj',
+        'title': '刹车片合计',
+        'align': 'right',
+        'key': 'scphj'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'hjxdc',
+        'title': '汇箭蓄电池',
+        'align': 'right',
+        'key': 'hjxdc'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'brsxdc',
+        'title': '布瑞斯蓄电池',
+        'align': 'right',
+        'key': 'brsxdc'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'xdchj',
+        'title': '蓄电池合计',
+        'align': 'right',
+        'key': 'xdchj'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'dlsjy',
+        'title': '德路斯机油',
+        'align': 'right',
+        'key': 'dlsjy'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'dlsbsxy',
+        'title': '德路斯变速箱油',
+        'align': 'right',
+        'key': 'dlsbsxy'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'dlsscy',
+        'title': '德路斯刹车油',
+        'align': 'right',
+        'key': 'dlsscy'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'dlsqcyhcp',
+        'title': '德路斯汽车养护产品',
+        'align': 'right',
+        'key': 'dlsqcyhcp'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'krxjy',
+        'title': '科润星机油',
+        'align': 'right',
+        'key': 'krxjy'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'rhyhj',
+        'title': '润滑油合计',
+        'align': 'right',
+        'key': 'rhyhj'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'wsdhxq',
+        'title': '稳升点火线圈',
+        'align': 'right',
+        'key': 'wsdhxq'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'wsledd',
+        'title': '稳升LED灯',
+        'align': 'right',
+        'key': 'wsledd'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'wshj',
+        'title': '稳升合计',
+        'align': 'right',
+        'key': 'wshj'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'pphj',
+        'title': '品牌合计',
+        'align': 'right',
+        'key': 'pphj'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'lt',
+        'title': '轮胎',
+        'align': 'right',
+        'key': 'lt'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'ngkhhs',
+        'title': 'NGK火花塞',
+        'align': 'right',
+        'key': 'ngkhhs'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'flp',
+        'title': '飞利浦',
+        'align': 'right',
+        'key': 'flp'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'dlpphj',
+        'title': '代理品牌合计',
+        'align': 'right',
+        'key': 'dlpphj'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'hj',
+        'title': '合计',
+        'align': 'right',
+        'key': 'hj'
+      }
+    ],
+    'list': [
+      {
+        'dataIndex': 'bizMonth',
+        'fixed': 'left',
+        'title': '月份',
+        'align': 'center',
+        'key': 'bizMonth'
+      },
+      {
+        'dataIndex': 'subareaName',
+        'fixed': 'left',
+        'title': '区域',
+        'align': 'center',
+        'key': 'subareaName'
+      },
+      {
+        'dataIndex': 'subareaAreaName',
+        'fixed': 'left',
+        'title': '分区',
+        'align': 'center',
+        'key': 'subareaAreaName'
+      },
+      {
+        'dataIndex': 'bizUserName',
+        'fixed': 'left',
+        'title': '区域负责人',
+        'align': 'center',
+        'key': 'bizUserName',
+        'ellipsis': 'true'
+      },
+      {
+        'dataIndex': 'provinceName',
+        'fixed': 'left',
+        'title': '省份',
+        'align': 'center',
+        'key': 'provinceName'
+      },
+      {
+        'dataIndex': 'dealerName',
+        'fixed': 'left',
+        'title': '客户名称',
+        'align': 'left',
+        'key': 'dealerName'
+      },
+      {
+        'dataIndex': 'dealerLevel',
+        'fixed': 'left',
+        'title': '客户级别',
+        'align': 'center',
+        'key': 'dealerLevel'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'jplqq',
+        'title': '箭牌滤清器',
+        'align': 'right',
+        'key': 'jplqq'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'jpbsxlqq',
+        'title': '箭牌变速箱滤清器',
+        'align': 'right',
+        'key': 'jpbsxlqq'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'gplqq',
+        'title': '冠牌滤清器',
+        'align': 'right',
+        'key': 'gplqq'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'lqqhj',
+        'title': '滤清器合计',
+        'align': 'right',
+        'key': 'lqqhj'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'jpygp',
+        'title': '箭牌雨刮片',
+        'align': 'right',
+        'key': 'jpygp'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'jpyyygp',
+        'title': '箭牌雨燕雨刮片',
+        'align': 'right',
+        'key': 'jpyyygp'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'gpygp',
+        'title': '冠牌雨刮片',
+        'align': 'right',
+        'key': 'gpygp'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'ygphj',
+        'title': '雨刮片合计',
+        'align': 'right',
+        'key': 'ygphj'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'jplb',
+        'title': '箭牌喇叭',
+        'align': 'right',
+        'key': 'jplb'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'jpscp',
+        'title': '箭牌刹车片',
+        'align': 'right',
+        'key': 'jpscp'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'tbujpgyx',
+        'title': 'TBU+箭牌感应线',
+        'align': 'right',
+        'key': 'tbujpgyx'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'gpscp',
+        'title': '冠牌刹车片',
+        'align': 'right',
+        'key': 'gpscp'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'tbuscp',
+        'title': 'TBU刹车片',
+        'align': 'right',
+        'key': 'tbuscp'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'tbuzhscp',
+        'title': 'TBU至惠刹车片',
+        'align': 'right',
+        'key': 'tbuzhscp'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'tbuscy',
+        'title': 'TBU刹车油',
+        'align': 'right',
+        'key': 'tbuscy'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'tubpscp',
+        'title': 'TBU-P刹车盘',
+        'align': 'right',
+        'key': 'tubpscp'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'scphj',
+        'title': '刹车片合计',
+        'align': 'right',
+        'key': 'scphj'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'hjxdc',
+        'title': '汇箭蓄电池',
+        'align': 'right',
+        'key': 'hjxdc'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'brsxdc',
+        'title': '布瑞斯蓄电池',
+        'align': 'right',
+        'key': 'brsxdc'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'xdchj',
+        'title': '蓄电池合计',
+        'align': 'right',
+        'key': 'xdchj'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'dlsjy',
+        'title': '德路斯机油',
+        'align': 'right',
+        'key': 'dlsjy'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'dlsbsxy',
+        'title': '德路斯变速箱油',
+        'align': 'right',
+        'key': 'dlsbsxy'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'dlsscy',
+        'title': '德路斯刹车油',
+        'align': 'right',
+        'key': 'dlsscy'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'dlsqcyhcp',
+        'title': '德路斯汽车养护产品',
+        'align': 'right',
+        'key': 'dlsqcyhcp'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'krxjy',
+        'title': '科润星机油',
+        'align': 'right',
+        'key': 'krxjy'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'rhyhj',
+        'title': '润滑油合计',
+        'align': 'right',
+        'key': 'rhyhj'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'wsdhxq',
+        'title': '稳升点火线圈',
+        'align': 'right',
+        'key': 'wsdhxq'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'wsledd',
+        'title': '稳升LED灯',
+        'align': 'right',
+        'key': 'wsledd'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'wshj',
+        'title': '稳升合计',
+        'align': 'right',
+        'key': 'wshj'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'pphj',
+        'title': '品牌合计',
+        'align': 'right',
+        'key': 'pphj'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'lt',
+        'title': '轮胎',
+        'align': 'right',
+        'key': 'lt'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'ngkhhs',
+        'title': 'NGK火花塞',
+        'align': 'right',
+        'key': 'ngkhhs'
+      },
+      {
+        'customRender': 'amount',
+        'dataIndex': 'flp',
+        'title': '飞利浦',
+        'align': 'right',
+        'key': 'flp'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'dlpphj',
+        'title': '代理品牌合计',
+        'align': 'right',
+        'key': 'dlpphj'
+      },
+      {
+        'colour': 'red',
+        'customRender': 'amount',
+        'dataIndex': 'hj',
+        'title': '合计',
+        'align': 'right',
+        'key': 'hj'
+      }
+    ]
+  }

+ 547 - 0
src/views/reportData/billingStatistics/dataProvince.js

@@ -0,0 +1,547 @@
+export default {
+  "count": [
+    {
+      "customRender": "amount",
+      "dataIndex": "jplqq",
+      "title": "箭牌滤清器",
+      "align": "right",
+      "key": "jplqq"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "jpbsxlqq",
+      "title": "箭牌变速箱滤清器",
+      "align": "right",
+      "key": "jpbsxlqq"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "gplqq",
+      "title": "冠牌滤清器",
+      "align": "right",
+      "key": "gplqq"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "lqqhj",
+      "title": "滤清器合计",
+      "align": "right",
+      "key": "lqqhj"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "jpygp",
+      "title": "箭牌雨刮片",
+      "align": "right",
+      "key": "jpygp"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "jpyyygp",
+      "title": "箭牌雨燕雨刮片",
+      "align": "right",
+      "key": "jpyyygp"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "gpygp",
+      "title": "冠牌雨刮片",
+      "align": "right",
+      "key": "gpygp"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "ygphj",
+      "title": "雨刮片合计",
+      "align": "right",
+      "key": "ygphj"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "jplb",
+      "title": "箭牌喇叭",
+      "align": "right",
+      "key": "jplb"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "jpscp",
+      "title": "箭牌刹车片",
+      "align": "right",
+      "key": "jpscp"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "tbujpgyx",
+      "title": "TBU+箭牌感应线",
+      "align": "right",
+      "key": "tbujpgyx"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "gpscp",
+      "title": "冠牌刹车片",
+      "align": "right",
+      "key": "gpscp"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "tbuscp",
+      "title": "TBU刹车片",
+      "align": "right",
+      "key": "tbuscp"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "tbuzhscp",
+      "title": "TBU至惠刹车片",
+      "align": "right",
+      "key": "tbuzhscp"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "tbuscy",
+      "title": "TBU刹车油",
+      "align": "right",
+      "key": "tbuscy"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "tubpscp",
+      "title": "TBU-P刹车盘",
+      "align": "right",
+      "key": "tubpscp"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "scphj",
+      "title": "刹车片合计",
+      "align": "right",
+      "key": "scphj"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "hjxdc",
+      "title": "汇箭蓄电池",
+      "align": "right",
+      "key": "hjxdc"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "brsxdc",
+      "title": "布瑞斯蓄电池",
+      "align": "right",
+      "key": "brsxdc"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "xdchj",
+      "title": "蓄电池合计",
+      "align": "right",
+      "key": "xdchj"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "dlsjy",
+      "title": "德路斯机油",
+      "align": "right",
+      "key": "dlsjy"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "dlsbsxy",
+      "title": "德路斯变速箱油",
+      "align": "right",
+      "key": "dlsbsxy"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "dlsscy",
+      "title": "德路斯刹车油",
+      "align": "right",
+      "key": "dlsscy"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "dlsqcyhcp",
+      "title": "德路斯汽车养护产品",
+      "align": "right",
+      "key": "dlsqcyhcp"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "krxjy",
+      "title": "科润星机油",
+      "align": "right",
+      "key": "krxjy"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "rhyhj",
+      "title": "润滑油合计",
+      "align": "right",
+      "key": "rhyhj"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "wsdhxq",
+      "title": "稳升点火线圈",
+      "align": "right",
+      "key": "wsdhxq"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "wsledd",
+      "title": "稳升LED灯",
+      "align": "right",
+      "key": "wsledd"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "wshj",
+      "title": "稳升合计",
+      "align": "right",
+      "key": "wshj"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "pphj",
+      "title": "品牌合计",
+      "align": "right",
+      "key": "pphj"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "lt",
+      "title": "轮胎",
+      "align": "right",
+      "key": "lt"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "ngkhhs",
+      "title": "NGK火花塞",
+      "align": "right",
+      "key": "ngkhhs"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "flp",
+      "title": "飞利浦",
+      "align": "right",
+      "key": "flp"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "dlpphj",
+      "title": "代理品牌合计",
+      "align": "right",
+      "key": "dlpphj"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "hj",
+      "title": "合计",
+      "align": "right",
+      "key": "hj"
+    }
+  ],
+  "list": [
+    {
+      "dataIndex": "bizMonth",
+      "fixed": "left",
+      "title": "月份",
+      "align": "center",
+      "key": "bizMonth"
+    },
+    {
+      "dataIndex": "subareaName",
+      "fixed": "left",
+      "title": "区域",
+      "align": "center",
+      "key": "subareaName"
+    },
+    {
+      "dataIndex": "bizUserName",
+      "fixed": "left",
+      "title": "区域负责人",
+      "align": "center",
+      "key": "bizUserName",
+      "ellipsis": "true"
+    },
+    {
+      "dataIndex": "provinceName",
+      "fixed": "left",
+      "title": "省份",
+      "align": "center",
+      "key": "provinceName"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "jplqq",
+      "title": "箭牌滤清器",
+      "align": "right",
+      "key": "jplqq"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "jpbsxlqq",
+      "title": "箭牌变速箱滤清器",
+      "align": "right",
+      "key": "jpbsxlqq"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "gplqq",
+      "title": "冠牌滤清器",
+      "align": "right",
+      "key": "gplqq"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "lqqhj",
+      "title": "滤清器合计",
+      "align": "right",
+      "key": "lqqhj"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "jpygp",
+      "title": "箭牌雨刮片",
+      "align": "right",
+      "key": "jpygp"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "jpyyygp",
+      "title": "箭牌雨燕雨刮片",
+      "align": "right",
+      "key": "jpyyygp"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "gpygp",
+      "title": "冠牌雨刮片",
+      "align": "right",
+      "key": "gpygp"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "ygphj",
+      "title": "雨刮片合计",
+      "align": "right",
+      "key": "ygphj"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "jplb",
+      "title": "箭牌喇叭",
+      "align": "right",
+      "key": "jplb"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "jpscp",
+      "title": "箭牌刹车片",
+      "align": "right",
+      "key": "jpscp"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "tbujpgyx",
+      "title": "TBU+箭牌感应线",
+      "align": "right",
+      "key": "tbujpgyx"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "gpscp",
+      "title": "冠牌刹车片",
+      "align": "right",
+      "key": "gpscp"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "tbuscp",
+      "title": "TBU刹车片",
+      "align": "right",
+      "key": "tbuscp"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "tbuzhscp",
+      "title": "TBU至惠刹车片",
+      "align": "right",
+      "key": "tbuzhscp"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "tbuscy",
+      "title": "TBU刹车油",
+      "align": "right",
+      "key": "tbuscy"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "tubpscp",
+      "title": "TBU-P刹车盘",
+      "align": "right",
+      "key": "tubpscp"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "scphj",
+      "title": "刹车片合计",
+      "align": "right",
+      "key": "scphj"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "hjxdc",
+      "title": "汇箭蓄电池",
+      "align": "right",
+      "key": "hjxdc"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "brsxdc",
+      "title": "布瑞斯蓄电池",
+      "align": "right",
+      "key": "brsxdc"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "xdchj",
+      "title": "蓄电池合计",
+      "align": "right",
+      "key": "xdchj"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "dlsjy",
+      "title": "德路斯机油",
+      "align": "right",
+      "key": "dlsjy"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "dlsbsxy",
+      "title": "德路斯变速箱油",
+      "align": "right",
+      "key": "dlsbsxy"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "dlsscy",
+      "title": "德路斯刹车油",
+      "align": "right",
+      "key": "dlsscy"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "dlsqcyhcp",
+      "title": "德路斯汽车养护产品",
+      "align": "right",
+      "key": "dlsqcyhcp"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "krxjy",
+      "title": "科润星机油",
+      "align": "right",
+      "key": "krxjy"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "rhyhj",
+      "title": "润滑油合计",
+      "align": "right",
+      "key": "rhyhj"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "wsdhxq",
+      "title": "稳升点火线圈",
+      "align": "right",
+      "key": "wsdhxq"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "wsledd",
+      "title": "稳升LED灯",
+      "align": "right",
+      "key": "wsledd"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "wshj",
+      "title": "稳升合计",
+      "align": "right",
+      "key": "wshj"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "pphj",
+      "title": "品牌合计",
+      "align": "right",
+      "key": "pphj"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "lt",
+      "title": "轮胎",
+      "align": "right",
+      "key": "lt"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "ngkhhs",
+      "title": "NGK火花塞",
+      "align": "right",
+      "key": "ngkhhs"
+    },
+    {
+      "customRender": "amount",
+      "dataIndex": "flp",
+      "title": "飞利浦",
+      "align": "right",
+      "key": "flp"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "dlpphj",
+      "title": "代理品牌合计",
+      "align": "right",
+      "key": "dlpphj"
+    },
+    {
+      "colour": "red",
+      "customRender": "amount",
+      "dataIndex": "hj",
+      "title": "合计",
+      "align": "right",
+      "key": "hj"
+    }
+  ]
+}

+ 9 - 5
src/views/reportData/billingStatistics/index.vue

@@ -3,16 +3,16 @@
     <a-card size="small" :bordered="false">
     <a-card size="small" :bordered="false">
       <a-tabs default-active-key="1" @change="handleChange">
       <a-tabs default-active-key="1" @change="handleChange">
         <a-tab-pane key="1" tab="开单统计报表(客户)">
         <a-tab-pane key="1" tab="开单统计报表(客户)">
-          <customerCountList ref="customerList"></customerCountList>
+          <customerCountList ref="customerList" :tableTitle="tableTitle" :removeReportFlag="0"></customerCountList>
         </a-tab-pane>
         </a-tab-pane>
         <a-tab-pane key="2" tab="开单统计报表(省份)" force-render>
         <a-tab-pane key="2" tab="开单统计报表(省份)" force-render>
-          <provinceCountList ref="provinceList"></provinceCountList>
+          <provinceCountList ref="provinceList" :tableTitle="tableTitle1" :removeReportFlag="0"></provinceCountList>
         </a-tab-pane>
         </a-tab-pane>
         <a-tab-pane key="3" tab="未统计销售退货(客户)" force-render>
         <a-tab-pane key="3" tab="未统计销售退货(客户)" force-render>
-          <provinceCountList ref="provinceList"></provinceCountList>
+          <customerCountList ref="customerList1" :tableTitle="tableTitle" :removeReportFlag="1"></customerCountList>
         </a-tab-pane>
         </a-tab-pane>
         <a-tab-pane key="4" tab="未统计销售退货(省份)" force-render>
         <a-tab-pane key="4" tab="未统计销售退货(省份)" force-render>
-          <provinceCountList ref="provinceList"></provinceCountList>
+          <provinceCountList ref="provinceList1" :tableTitle="tableTitle1" :removeReportFlag="1"></provinceCountList>
         </a-tab-pane>
         </a-tab-pane>
       </a-tabs>
       </a-tabs>
     </a-card>
     </a-card>
@@ -23,13 +23,17 @@ import { commonMixin } from '@/utils/mixin'
 // 组件
 // 组件
 import customerCountList from './customerCountList.vue'
 import customerCountList from './customerCountList.vue'
 import provinceCountList from './provinceCountList.vue'
 import provinceCountList from './provinceCountList.vue'
+import tableTitle from './dataCustomer.js'
+import tableTitle1 from './dataProvince.js'
 export default {
 export default {
   name: 'BillingStatisticsIndex',
   name: 'BillingStatisticsIndex',
   mixins: [commonMixin],
   mixins: [commonMixin],
   components: { customerCountList, provinceCountList },
   components: { customerCountList, provinceCountList },
   data () {
   data () {
     return {
     return {
-      tabVal: 1 // tab值  1轮胎月度费用报表 2轮胎季度费用报表 3轮胎年度费用报表 4轮胎费用明细报表
+      tabVal: 1, // tab值  1轮胎月度费用报表 2轮胎季度费用报表 3轮胎年度费用报表 4轮胎费用明细报表
+      tableTitle: tableTitle,
+      tableTitle1: tableTitle1
     }
     }
   },
   },
   methods: {
   methods: {

+ 19 - 9
src/views/reportData/billingStatistics/provinceCountList.vue

@@ -106,11 +106,21 @@ import subarea from '@/views/common/subarea.js'
 import Area from '@/views/common/area.js'
 import Area from '@/views/common/area.js'
 import BizUser from '@/views/common/bizUser.js'
 import BizUser from '@/views/common/bizUser.js'
 // 接口
 // 接口
-import { salesStatsProvinceList, salesStatsProvinceTit, salesStatsProvinceCount, salesStatsProvinceExport } from '@/api/reportData'
+import { salesStatsProvinceList, salesStatsProvinceCount, salesStatsProvinceExport } from '@/api/reportData'
 export default {
 export default {
   name: 'ProvinceCountList',
   name: 'ProvinceCountList',
   mixins: [commonMixin],
   mixins: [commonMixin],
   components: { STable, VSelect, subarea, Area, BizUser },
   components: { STable, VSelect, subarea, Area, BizUser },
+  props: {
+    removeReportFlag: {
+      type: [String, Number],
+      default: '0'
+    },
+    tableTitle: {
+      type: Object,
+      default: () => {}
+    }
+  },
   data () {
   data () {
     return {
     return {
       spinning: false,
       spinning: false,
@@ -148,6 +158,7 @@ export default {
           this.queryParam.endDate = undefined
           this.queryParam.endDate = undefined
         }
         }
         const params = Object.assign(parameter, this.queryParam)
         const params = Object.assign(parameter, this.queryParam)
+        params.removeReportFlag = this.removeReportFlag
         // 获取列表数据  无分页
         // 获取列表数据  无分页
         return salesStatsProvinceList(params).then(res => {
         return salesStatsProvinceList(params).then(res => {
           let data
           let data
@@ -188,16 +199,17 @@ export default {
     // 获取表头
     // 获取表头
     async getTableTitle () {
     async getTableTitle () {
       const _this = this
       const _this = this
-      const tableTitle = await salesStatsProvinceTit().then(res => res.data)
-      this.columns = tableTitle.list
-      this.countLabel = tableTitle.count
+      this.columns = _this.tableTitle.list
+      this.countLabel = _this.tableTitle.count
       this.columns.map(item => {
       this.columns.map(item => {
         item.titleNum = item.title
         item.titleNum = item.title
-        let mw = 20
+        const mw = item.customRender == 'amount' ? 15 : 20
+        const textLen = typeof item.title === 'string' ? item.title.length : (item.title.children && item.title.children[0].text && item.title.children[0].text.length)
+        const w = textLen * mw
+        const tw = w <= 80 ? mw * 5 : w
         if (item.customRender == 'amount') {
         if (item.customRender == 'amount') {
-          mw = 15
           if (item.colour && item.colour === 'red') {
           if (item.colour && item.colour === 'red') {
-            item.title = <span style="color:red;">{item.titleNum}</span>
+            item.title = <span style="color:red;">{ item.title }</span>
             item.customRender = (text) => { return <span style="color:red;">{(text || text == 0) ? _this.toThousands(text) : '--'}</span> }
             item.customRender = (text) => { return <span style="color:red;">{(text || text == 0) ? _this.toThousands(text) : '--'}</span> }
           } else {
           } else {
             item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
             item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
@@ -205,8 +217,6 @@ export default {
         } else {
         } else {
           item.customRender = function (text) { return text || '--' }
           item.customRender = function (text) { return text || '--' }
         }
         }
-        const w = item.titleNum.length * mw
-        const tw = w <= 80 ? mw * 5 : w
         item.width = tw + 'px'
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
         this.tableWidth = this.tableWidth + tw
       })
       })