|
@@ -100,7 +100,7 @@
|
|
|
:style="{ height: tableHeight+70+'px' }"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- :scroll="{x:2200, y: tableHeight-120}"
|
|
|
+ :scroll="{x:2200, y: tableHeight}"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
</s-table>
|
|
@@ -156,7 +156,6 @@ export default {
|
|
|
},
|
|
|
columns: [], // 表头
|
|
|
countLabel: null, // 合计名称
|
|
|
- totalData: null, // 合计
|
|
|
rules: {
|
|
|
'beginDate': [{ required: true, message: '请选择查询月份', trigger: 'change' }]
|
|
|
},
|
|
@@ -171,13 +170,11 @@ export default {
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
|
// 计算表格序号
|
|
|
- const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ const id = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
- data.list[i].no = no + i + 1
|
|
|
+ data.list[i].id = id + i + 1
|
|
|
}
|
|
|
this.disabled = false
|
|
|
- // 统计
|
|
|
- // this.getCount(params)
|
|
|
}
|
|
|
this.spinning = false
|
|
|
return data
|
|
@@ -266,9 +263,9 @@ export default {
|
|
|
},
|
|
|
// 地区
|
|
|
areaChange (val) {
|
|
|
- this.queryParam.dealerEntity.provinceSn = val[0] ? val[0] : undefined
|
|
|
- this.queryParam.dealerEntity.citySn = val[1] ? val[1] : undefined
|
|
|
- this.queryParam.dealerEntity.districtSn = val[2] ? val[2] : undefined
|
|
|
+ this.queryParam.provinceSn = val[0] ? val[0] : undefined
|
|
|
+ this.queryParam.citySn = val[1] ? val[1] : undefined
|
|
|
+ this.queryParam.districtSn = val[2] ? val[2] : undefined
|
|
|
},
|
|
|
// 区域分区 change
|
|
|
subareaChange (val) {
|
|
@@ -280,9 +277,9 @@ export default {
|
|
|
this.queryParam.beginDate = moment().startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
|
|
|
this.queryParam.endDate = moment().endOf('month').format('YYYY-MM-DD') + ' 23:59:59'
|
|
|
this.monthVal = moment().format('YYYY-MM')
|
|
|
- this.queryParam.dealerEntity.provinceSn = undefined
|
|
|
- this.queryParam.dealerEntity.citySn = undefined
|
|
|
- this.queryParam.dealerEntity.districtSn = undefined
|
|
|
+ this.queryParam.provinceSn = undefined
|
|
|
+ this.queryParam.citySn = undefined
|
|
|
+ this.queryParam.districtSn = undefined
|
|
|
this.queryParam.dealerEntity.dealerName = undefined
|
|
|
this.queryParam.dealerSn = undefined
|
|
|
this.queryParam.subareaArea.subareaSn = ''
|
|
@@ -292,10 +289,9 @@ export default {
|
|
|
this.queryParam.kfSn = undefined
|
|
|
this.$refs.dealerSubareaScopeList.resetForm()
|
|
|
if (this.advanced) {
|
|
|
- this.$refs.subarea.clearData()
|
|
|
- this.$refs.areaList.clearData()
|
|
|
+ this.$refs.subarea && this.$refs.subarea.clearData()
|
|
|
+ this.$refs.areaList && this.$refs.areaList.clearData()
|
|
|
}
|
|
|
- this.totalData = null
|
|
|
this.$refs.table.clearTable()
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
},
|
|
@@ -322,22 +318,6 @@ export default {
|
|
|
_this.spinning = false
|
|
|
})
|
|
|
},
|
|
|
- // 统计
|
|
|
- getCount (params) {
|
|
|
- promoSalesExpenseCount(params).then(res => {
|
|
|
- if (res.status == 200 && res.data) {
|
|
|
- const mergedList = this.countLabel.map(item => {
|
|
|
- const key = item.key
|
|
|
- return key in res.data
|
|
|
- ? { ...item, [key]: res.data[key] }
|
|
|
- : item
|
|
|
- })
|
|
|
- this.totalData = mergedList
|
|
|
- } else {
|
|
|
- this.totalData = null
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 初始化
|
|
|
pageInit () {
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|