|
@@ -90,7 +90,6 @@
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
:scroll="{y: tableHeight}"
|
|
|
- :defaultLoadData="false"
|
|
|
bordered>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
@@ -101,7 +100,6 @@
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
-import moment from 'moment'
|
|
|
// 组件
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import subarea from '@/views/common/subarea.js'
|
|
@@ -110,12 +108,13 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
import BizUser from '@/views/common/bizUser.js'
|
|
|
import customerService from '@/views/common/customerService.vue'
|
|
|
// 接口
|
|
|
-import { salesStatsDealerList, salesStatsDealerExport } from '@/api/reportData'
|
|
|
+import { dealerNewLogPageList, dealerNewLogExport } from '@/api/dealearNewLog'
|
|
|
export default {
|
|
|
name: 'CustomerCountList',
|
|
|
mixins: [commonMixin],
|
|
|
components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, BizUser, customerService },
|
|
|
data () {
|
|
|
+ const _this = this
|
|
|
return {
|
|
|
spinning: false,
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
@@ -125,7 +124,7 @@ export default {
|
|
|
// 查询条件
|
|
|
queryParam: {
|
|
|
dealerLevel: undefined, // 客户等级
|
|
|
- dealerSnOwner: undefined, // 客户sn
|
|
|
+ dealerSn: undefined, // 客户sn
|
|
|
dealerName: undefined, // 客户名称
|
|
|
provinceSn: undefined, // 省
|
|
|
citySn: undefined, // 市
|
|
@@ -141,26 +140,25 @@ export default {
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
{ title: '区域', dataIndex: 'subareaArea.subareaName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '区域负责人', dataIndex: 'subareaArea.userNameQyfzrs', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '省份', dataIndex: 'dealer.provinceName', width: '6%', align: 'left', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '客户名称', dataIndex: 'dealer.dealerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '客户级别', dataIndex: 'dealer.dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '区域负责人', dataIndex: 'subareaArea.bizUserName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '省份', dataIndex: 'provinceName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '客户名称', dataIndex: 'dealerName', width: '17%', align: 'left', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '客户级别', dataIndex: 'dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '年份', dataIndex: 'year', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '月份', dataIndex: 'month', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '第一笔时间', dataIndex: 'firstDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '最后一笔时间', dataIndex: 'lastDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '最后一笔时间', dataIndex: 'lastDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '首笔订单数', dataIndex: 'billCount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '总开单金额', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '总实售金额', dataIndex: 'totalRealAmount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
+ { title: '总开单金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: function (text) { return _this.toThousands(text) || '--' } },
|
|
|
+ { title: '总实售金额', dataIndex: 'totalRealAmount', width: '8%', align: 'right', customRender: function (text) { return _this.toThousands(text) || '--' } }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
|
- params.removeReportFlag = 1
|
|
|
// 获取列表数据 有分页
|
|
|
- return salesStatsDealerList(params).then(res => {
|
|
|
+ return dealerNewLogPageList(params).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
@@ -196,7 +194,7 @@ export default {
|
|
|
// 客户名称 change
|
|
|
custChange (val) {
|
|
|
this.queryParam.dealerName = val.name
|
|
|
- this.queryParam.dealerSnOwner = val.key
|
|
|
+ this.queryParam.dealerSn = val.key
|
|
|
},
|
|
|
// 地区
|
|
|
areaChange (val) {
|
|
@@ -215,8 +213,7 @@ export default {
|
|
|
this.queryParam.citySn = undefined
|
|
|
this.queryParam.districtSn = undefined
|
|
|
this.queryParam.dealerName = undefined
|
|
|
- this.queryParam.dealerSnOwner = undefined
|
|
|
- this.queryParam.bizUserSn = undefined
|
|
|
+ this.queryParam.dealerSn = undefined
|
|
|
this.queryParam.subareaArea.subareaSn = ''
|
|
|
this.queryParam.subareaArea.subareaAreaSn = ''
|
|
|
this.queryParam.subareaArea.bizUserSn = undefined
|
|
@@ -229,15 +226,15 @@ export default {
|
|
|
}
|
|
|
this.$refs.table.clearTable()
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
+ this.$refs.table.refresh(false)
|
|
|
},
|
|
|
// 导出
|
|
|
handleExport () {
|
|
|
const _this = this
|
|
|
const params = JSON.parse(JSON.stringify(_this.queryParam))
|
|
|
- params.removeReportFlag = this.removeReportFlag
|
|
|
_this.exportLoading = true
|
|
|
_this.spinning = true
|
|
|
- hdExportExcel(salesStatsDealerExport, params, '新客户查询', function () {
|
|
|
+ hdExportExcel(dealerNewLogExport, params, '新客户查询', function () {
|
|
|
_this.exportLoading = false
|
|
|
_this.spinning = false
|
|
|
})
|