lilei 6 days ago
parent
commit
16c7b0ff33

+ 52 - 0
src/api/reportData.js

@@ -1792,3 +1792,55 @@ export const salesStatsProvinceExport = (params) => {
     }
   })
 }
+// 新客户首笔统计报表
+// 新客户首笔统计报表   列表   有分页
+export const reportDealerNewLogList = (params) => {
+  const url = `/report/reportDealerNewLog/reportPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+
+// 新客户首笔统计报表  表头
+export const reportDealerNewLogTitle = (params) => {
+  return axios({
+    url: '/report/reportDealerNewLog/reportTitle',
+    data: params,
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('表头')
+    }
+  })
+}
+
+// 新客户首笔统计报表  合计
+export const reportDealerNewLogCount = (params) => {
+  return axios({
+    url: '/report/reportDealerNewLog/reportCount',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('合计')
+    }
+  })
+}
+
+// 新客户首笔统计报表  导出
+export const reportDealerNewLogExport = (params) => {
+  return axios({
+    url: '/report/reportDealerNewLog/reportExport',
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers: {
+      'module': encodeURIComponent('导出')
+    }
+  })
+}

+ 0 - 584
src/views/reportData/newCustomSales/dataCustomer.js

@@ -1,584 +0,0 @@
-export default {
-    'count': [
-      {
-        'type': 'amount',
-        'dataIndex': 'jplqq',
-        'title': '箭牌滤清器',
-        'align': 'right',
-        'key': 'jplqq'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'jpbsxlqq',
-        'title': '箭牌变速箱滤清器',
-        'align': 'right',
-        'key': 'jpbsxlqq'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'gplqq',
-        'title': '冠牌滤清器',
-        'align': 'right',
-        'key': 'gplqq'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'dataIndex': 'lqqhj',
-        'title': '滤清器合计',
-        'align': 'right',
-        'key': 'lqqhj'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'jpygp',
-        'title': '箭牌雨刮片',
-        'align': 'right',
-        'key': 'jpygp'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'jpyyygp',
-        'title': '箭牌雨燕雨刮片',
-        'align': 'right',
-        'key': 'jpyyygp'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'gpygp',
-        'title': '冠牌雨刮片',
-        'align': 'right',
-        'key': 'gpygp'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'dataIndex': 'ygphj',
-        'title': '雨刮片合计',
-        'align': 'right',
-        'key': 'ygphj'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'dataIndex': 'jplb',
-        'title': '箭牌喇叭',
-        'align': 'right',
-        'key': 'jplb'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'jpscp',
-        'title': '箭牌刹车片',
-        'align': 'right',
-        'key': 'jpscp'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'tbujpgyx',
-        'title': 'TBU+箭牌感应线',
-        'align': 'right',
-        'key': 'tbujpgyx'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'gpscp',
-        'title': '冠牌刹车片',
-        'align': 'right',
-        'key': 'gpscp'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'tbuscp',
-        'title': 'TBU刹车片',
-        'align': 'right',
-        'key': 'tbuscp'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'tbuzhscp',
-        'title': 'TBU至惠刹车片',
-        'align': 'right',
-        'key': 'tbuzhscp'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'tbuscy',
-        'title': 'TBU刹车油',
-        'align': 'right',
-        'key': 'tbuscy'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'tubpscp',
-        'title': 'TBU-P刹车盘',
-        'align': 'right',
-        'key': 'tubpscp'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'dataIndex': 'scphj',
-        'title': '刹车片合计',
-        'align': 'right',
-        'key': 'scphj'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'hjxdc',
-        'title': '汇箭蓄电池',
-        'align': 'right',
-        'key': 'hjxdc'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'brsxdc',
-        'title': '布瑞斯蓄电池',
-        'align': 'right',
-        'key': 'brsxdc'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'dataIndex': 'xdchj',
-        'title': '蓄电池合计',
-        'align': 'right',
-        'key': 'xdchj'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'dlsjy',
-        'title': '德路斯机油',
-        'align': 'right',
-        'key': 'dlsjy'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'dlsbsxy',
-        'title': '德路斯变速箱油',
-        'align': 'right',
-        'key': 'dlsbsxy'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'dlsscy',
-        'title': '德路斯刹车油',
-        'align': 'right',
-        'key': 'dlsscy'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'dlsqcyhcp',
-        'title': '德路斯汽车养护产品',
-        'align': 'right',
-        'key': 'dlsqcyhcp'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'krxjy',
-        'title': '科润星机油',
-        'align': 'right',
-        'key': 'krxjy'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'dataIndex': 'rhyhj',
-        'title': '润滑油合计',
-        'align': 'right',
-        'key': 'rhyhj'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'wsdhxq',
-        'title': '稳升点火线圈',
-        'align': 'right',
-        'key': 'wsdhxq'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'wsledd',
-        'title': '稳升LED灯',
-        'align': 'right',
-        'key': 'wsledd'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'dataIndex': 'wshj',
-        'title': '稳升合计',
-        'align': 'right',
-        'key': 'wshj'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'dataIndex': 'pphj',
-        'title': '品牌合计',
-        'align': 'right',
-        'key': 'pphj'
-      },
-      {
-        'dataIndex': 'luntai',
-        'title': '轮胎条数',
-        'align': 'right',
-        'key': 'luntai'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'dataIndex': 'luntai',
-        'title': '轮胎金额',
-        'align': 'right',
-        'key': 'luntai'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'ngkhhs',
-        'title': 'NGK火花塞',
-        'align': 'right',
-        'key': 'ngkhhs'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'flp',
-        'title': '飞利浦',
-        'align': 'right',
-        'key': 'flp'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'dataIndex': 'dlpphj',
-        'title': '代理品牌合计',
-        'align': 'right',
-        'key': 'dlpphj'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'dataIndex': 'ppdlpphj',
-        'title': '合计',
-        'align': 'right',
-        'key': 'ppdlpphj'
-      }
-    ],
-    'list': [
-      {
-        'dataIndex': 'no',
-        'fixed': 'left',
-        'title': '序号',
-        'align': 'center',
-        'width': '40px',
-        'key': 'no'
-      },
-      {
-        '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': 'bizUserName',
-        'fixed': 'left',
-        'title': '销售日期',
-        'align': 'center',
-        'key': 'salesDate'
-      },
-      {
-        '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'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'jplqq',
-        'title': '箭牌滤清器',
-        'align': 'right',
-        'key': 'jplqq'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'jpbsxlqq',
-        'title': '箭牌变速箱滤清器',
-        'align': 'right',
-        'key': 'jpbsxlqq'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'gplqq',
-        'title': '冠牌滤清器',
-        'align': 'right',
-        'key': 'gplqq'
-      },
-      {
-        'colour': 'red',
-        'txtLen': '5',
-        'type': 'amount',
-        'dataIndex': 'lqqhj',
-        'title': '滤清器合计',
-        'align': 'right',
-        'key': 'lqqhj'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'jpygp',
-        'title': '箭牌雨刮片',
-        'align': 'right',
-        'key': 'jpygp'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'jpyyygp',
-        'title': '箭牌雨燕雨刮片',
-        'align': 'right',
-        'key': 'jpyyygp'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'gpygp',
-        'title': '冠牌雨刮片',
-        'align': 'right',
-        'key': 'gpygp'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'txtLen': '5',
-        'dataIndex': 'ygphj',
-        'title': '雨刮片合计',
-        'align': 'right',
-        'key': 'ygphj'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'dataIndex': 'jplb',
-        'txtLen': '4',
-        'title': '箭牌喇叭',
-        'align': 'right',
-        'key': 'jplb'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'jpscp',
-        'title': '箭牌刹车片',
-        'align': 'right',
-        'key': 'jpscp'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'tbujpgyx',
-        'title': 'TBU+箭牌感应线',
-        'align': 'right',
-        'key': 'tbujpgyx'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'gpscp',
-        'title': '冠牌刹车片',
-        'align': 'right',
-        'key': 'gpscp'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'tbuscp',
-        'title': 'TBU刹车片',
-        'align': 'right',
-        'key': 'tbuscp'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'tbuzhscp',
-        'title': 'TBU至惠刹车片',
-        'align': 'right',
-        'key': 'tbuzhscp'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'tbuscy',
-        'title': 'TBU刹车油',
-        'align': 'right',
-        'key': 'tbuscy'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'tubpscp',
-        'title': 'TBU-P刹车盘',
-        'align': 'right',
-        'key': 'tubpscp'
-      },
-      {
-        'colour': 'red',
-        'txtLen': '5',
-        'type': 'amount',
-        'dataIndex': 'scphj',
-        'title': '刹车片合计',
-        'align': 'right',
-        'key': 'scphj'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'hjxdc',
-        'title': '汇箭蓄电池',
-        'align': 'right',
-        'key': 'hjxdc'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'brsxdc',
-        'title': '布瑞斯蓄电池',
-        'align': 'right',
-        'key': 'brsxdc'
-      },
-      {
-        'colour': 'red',
-        'txtLen': '5',
-        'type': 'amount',
-        'dataIndex': 'xdchj',
-        'title': '蓄电池合计',
-        'align': 'right',
-        'key': 'xdchj'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'dlsjy',
-        'title': '德路斯机油',
-        'align': 'right',
-        'key': 'dlsjy'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'dlsbsxy',
-        'title': '德路斯变速箱油',
-        'align': 'right',
-        'key': 'dlsbsxy'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'dlsscy',
-        'title': '德路斯刹车油',
-        'align': 'right',
-        'key': 'dlsscy'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'dlsqcyhcp',
-        'title': '德路斯汽车养护产品',
-        'align': 'right',
-        'key': 'dlsqcyhcp'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'krxjy',
-        'title': '科润星机油',
-        'align': 'right',
-        'key': 'krxjy'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'txtLen': '5',
-        'dataIndex': 'rhyhj',
-        'title': '润滑油合计',
-        'align': 'right',
-        'key': 'rhyhj'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'wsdhxq',
-        'title': '稳升点火线圈',
-        'align': 'right',
-        'key': 'wsdhxq'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'wsledd',
-        'title': '稳升LED灯',
-        'align': 'right',
-        'key': 'wsledd'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'dataIndex': 'wshj',
-        'txtLen': '4',
-        'title': '稳升合计',
-        'align': 'right',
-        'key': 'wshj'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'txtLen': '4',
-        'dataIndex': 'pphj',
-        'title': '品牌合计',
-        'align': 'right',
-        'key': 'pphj'
-      },
-      {
-        'dataIndex': 'luntai',
-        'txtLen': '2',
-        'title': '轮胎条数',
-        'align': 'right',
-        'key': 'luntai'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'dataIndex': 'luntai',
-        'txtLen': '2',
-        'title': '轮胎金额',
-        'align': 'right',
-        'key': 'luntai'
-      },
-      {
-        'type': 'amount',
-        'dataIndex': 'ngkhhs',
-        'title': 'NGK火花塞',
-        'align': 'right',
-        'key': 'ngkhhs'
-      },
-      {
-        'colour': 'red',
-        'type': 'amount',
-        'txtLen': '2',
-        'dataIndex': 'ppdlpphj',
-        'title': '品牌+代理品牌合计',
-        'align': 'right',
-        'key': 'ppdlpphj'
-      }
-    ]
-  }

+ 5 - 5
src/views/reportData/newCustomSales/list.vue

@@ -133,7 +133,6 @@
 import { commonMixin } from '@/utils/mixin'
 import { hdExportExcel } from '@/libs/exportExcel'
 import moment from 'moment'
-import tableTitle from './dataCustomer.js'
 // 组件
 import { STable, VSelect } from '@/components'
 import subarea from '@/views/common/subarea.js'
@@ -142,7 +141,7 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import BizUser from '@/views/common/bizUser.js'
 import customerService from '@/views/common/customerService.vue'
 // 接口
-import { salesStatsDealerList, salesStatsDealerCount, salesStatsDealerExport } from '@/api/reportData'
+import { reportDealerNewLogList, reportDealerNewLogCount, reportDealerNewLogTitle, reportDealerNewLogExport } from '@/api/reportData'
 export default {
   name: 'CustomerCountList',
   mixins: [commonMixin],
@@ -189,7 +188,7 @@ export default {
         const params = Object.assign(parameter, this.queryParam)
         params.removeReportFlag = 1
         // 获取列表数据  有分页
-        return salesStatsDealerList(params).then(res => {
+        return reportDealerNewLogList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -234,6 +233,7 @@ export default {
     // 获取表头
     async getTableTitle () {
       const _this = this
+      const tableTitle = await reportDealerNewLogTitle({}).then(res => res.data)
       this.columns = tableTitle.list
       this.countLabel = tableTitle.count
       this.columns.map(item => {
@@ -272,7 +272,7 @@ export default {
     },
     // 统计
     getCount (params) {
-      salesStatsDealerCount(params).then(res => {
+      reportDealerNewLogCount(params).then(res => {
         if (res.status == 200 && res.data) {
           const mergedList = this.countLabel.map(item => {
             const key = item.key
@@ -341,7 +341,7 @@ export default {
       params.removeReportFlag = this.removeReportFlag
       _this.exportLoading = true
       _this.spinning = true
-      hdExportExcel(salesStatsDealerExport, params, this.removeReportFlag == 0 ? '开单统计报表(客户)' : '未统计销售退货(客户)', function () {
+      hdExportExcel(reportDealerNewLogExport, params, this.removeReportFlag == 0 ? '开单统计报表(客户)' : '未统计销售退货(客户)', function () {
         _this.exportLoading = false
         _this.spinning = false
       })