|
@@ -88,18 +88,48 @@
|
|
:data="loadData"
|
|
:data="loadData"
|
|
:scroll="{ x: 3120 }"
|
|
:scroll="{ x: 3120 }"
|
|
bordered>
|
|
bordered>
|
|
|
|
+ <template slot="footer">
|
|
|
|
+ <a-row>
|
|
|
|
+ <a-col span="2">合计:</a-col>
|
|
|
|
+ <a-col span="22">
|
|
|
|
+ <a-row>
|
|
|
|
+ <a-col span="4">箭牌滤清器:{{ (totalData && (totalData.jpLqqAmount || totalData.jpLqqAmount==0)) ? totalData.jpLqqAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="4">箭牌雨刮片:{{ (totalData && (totalData.jpYgpAmount || totalData.jpYgpAmount==0)) ? totalData.jpYgpAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="4">箭牌喇叭:{{ (totalData && (totalData.jpLbAmount || totalData.jpLbAmount==0)) ? totalData.jpLbAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="4">箭牌刹车片:{{ (totalData && (totalData.jpScpAmount || totalData.jpScpAmount==0)) ? totalData.jpScpAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="4">箭牌感应线:{{ (totalData && (totalData.jpGyxAmount || totalData.jpGyxAmount==0)) ? totalData.jpGyxAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="4">冠牌滤清器:{{ (totalData && (totalData.gpLqqAmount || totalData.gpLqqAmount==0)) ? totalData.gpLqqAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="4">冠牌雨刮片:{{ (totalData && (totalData.gpYgpAmount || totalData.gpYgpAmount==0)) ? totalData.gpYgpAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="4">冠牌刹车片:{{ (totalData && (totalData.gpScpAmount || totalData.gpScpAmount==0)) ? totalData.gpScpAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="4">汇箭:{{ (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">TBU:{{ (totalData && (totalData.tbuAmount || totalData.tbuAmount==0)) ? totalData.tbuAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="4">NGK:{{ (totalData && (totalData.ngkAmount || totalData.ngkAmount==0)) ? totalData.ngkAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="4">飞利浦:{{ (totalData && (totalData.flpAmount || totalData.flpAmount==0)) ? totalData.flpAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="4">车仆:{{ (totalData && (totalData.cpAmount || totalData.cpAmount==0)) ? totalData.cpAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="4">瓦尔塔:{{ (totalData && (totalData.wetAmount || totalData.wetAmount==0)) ? totalData.wetAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="4">雷贝斯托:{{ (totalData && (totalData.lbstAmount || totalData.lbstAmount==0)) ? totalData.lbstAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="4">德尔福:{{ (totalData && (totalData.defAmount || totalData.defAmount==0)) ? totalData.defAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="4">巴诺德:{{ (totalData && (totalData.bndAmount || totalData.bndAmount==0)) ? totalData.bndAmount : '--' }}</a-col>
|
|
|
|
+ <a-col span="6">开单销售合计金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ </a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ </template>
|
|
</s-table>
|
|
</s-table>
|
|
</a-spin>
|
|
</a-spin>
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import getDate from '@/libs/getDate.js'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import custList from '@/views/common/custList.vue'
|
|
import custList from '@/views/common/custList.vue'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import { getArea } from '@/api/data'
|
|
import { getArea } from '@/api/data'
|
|
-import { salesBillReportGroupByBuyerList } from '@/api/salesBillReport'
|
|
|
|
|
|
+import { salesBillReportGroupByBuyerList, salesBillReportCount } from '@/api/salesBillReport'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect, rangeDate, subarea, custList },
|
|
components: { STable, VSelect, rangeDate, subarea, custList },
|
|
data () {
|
|
data () {
|
|
@@ -108,9 +138,12 @@ export default {
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
tableHeight: 0,
|
|
tableHeight: 0,
|
|
queryParam: { // 查询条件
|
|
queryParam: { // 查询条件
|
|
- time: [],
|
|
|
|
- beginDate: '',
|
|
|
|
- endDate: '',
|
|
|
|
|
|
+ time: [
|
|
|
|
+ getDate.getCurrMonthDays().starttime,
|
|
|
|
+ getDate.getCurrMonthDays().endtime
|
|
|
|
+ ],
|
|
|
|
+ beginDate: getDate.getCurrMonthDays().starttime,
|
|
|
|
+ endDate: getDate.getCurrMonthDays().endtime,
|
|
dealer: {
|
|
dealer: {
|
|
'dealerSn': undefined,
|
|
'dealerSn': undefined,
|
|
'provinceSn': undefined,
|
|
'provinceSn': undefined,
|
|
@@ -127,7 +160,7 @@ export default {
|
|
exportLoading: false,
|
|
exportLoading: false,
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
- { title: '区域', dataIndex: 'dealer.subareaNameSet', width: 220, align: 'center', customRender: function (text) { return text ? text.join('/') : '--' } },
|
|
|
|
|
|
+ { title: '区域', dataIndex: 'dealer.subareaNameSet', width: 220, align: 'center', customRender: function (text) { return (text && text.length > 0) ? text.join('/') : '--' } },
|
|
{ title: '省份', dataIndex: 'dealer.provinceName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '省份', dataIndex: 'dealer.provinceName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '客户名称', dataIndex: 'dealer.dealerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '客户名称', dataIndex: 'dealer.dealerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '客户类型', dataIndex: 'dealer.dealerLevelDictValue', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '客户类型', dataIndex: 'dealer.dealerLevelDictValue', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -143,35 +176,35 @@ export default {
|
|
dataIndex: 'jpLqqAmount',
|
|
dataIndex: 'jpLqqAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '雨刮片',
|
|
title: '雨刮片',
|
|
dataIndex: 'jpYgpAmount',
|
|
dataIndex: 'jpYgpAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '喇叭',
|
|
title: '喇叭',
|
|
dataIndex: 'jpLbAmount',
|
|
dataIndex: 'jpLbAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '刹车片',
|
|
title: '刹车片',
|
|
dataIndex: 'pp4',
|
|
dataIndex: 'pp4',
|
|
align: 'jpScpAmount',
|
|
align: 'jpScpAmount',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '感应线',
|
|
title: '感应线',
|
|
dataIndex: 'jpGyxAmount',
|
|
dataIndex: 'jpGyxAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
}
|
|
}
|
|
]
|
|
]
|
|
},
|
|
},
|
|
@@ -184,21 +217,21 @@ export default {
|
|
dataIndex: 'gpLqqAmount',
|
|
dataIndex: 'gpLqqAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '雨刮片',
|
|
title: '雨刮片',
|
|
dataIndex: 'gpYgpAmount',
|
|
dataIndex: 'gpYgpAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '刹车片',
|
|
title: '刹车片',
|
|
dataIndex: 'gpScpAmount',
|
|
dataIndex: 'gpScpAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
}
|
|
}
|
|
]
|
|
]
|
|
},
|
|
},
|
|
@@ -207,28 +240,28 @@ export default {
|
|
dataIndex: 'hjAmount',
|
|
dataIndex: 'hjAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '德路斯',
|
|
title: '德路斯',
|
|
dataIndex: 'dlsAmount',
|
|
dataIndex: 'dlsAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '稳升',
|
|
title: '稳升',
|
|
dataIndex: 'wsAmount',
|
|
dataIndex: 'wsAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: 'TBU',
|
|
title: 'TBU',
|
|
dataIndex: 'tbuAmount',
|
|
dataIndex: 'tbuAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
}
|
|
}
|
|
] },
|
|
] },
|
|
{ title: '代理品牌',
|
|
{ title: '代理品牌',
|
|
@@ -239,52 +272,52 @@ export default {
|
|
dataIndex: 'ngkAmount',
|
|
dataIndex: 'ngkAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '飞利浦',
|
|
title: '飞利浦',
|
|
dataIndex: 'flpAmount',
|
|
dataIndex: 'flpAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '车仆',
|
|
title: '车仆',
|
|
dataIndex: 'cpAmount',
|
|
dataIndex: 'cpAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '瓦尔塔',
|
|
title: '瓦尔塔',
|
|
dataIndex: 'wetAmount',
|
|
dataIndex: 'wetAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '雷贝斯托',
|
|
title: '雷贝斯托',
|
|
dataIndex: 'lbstAmount',
|
|
dataIndex: 'lbstAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '德尔福',
|
|
title: '德尔福',
|
|
dataIndex: 'defAmount',
|
|
dataIndex: 'defAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '巴诺德',
|
|
title: '巴诺德',
|
|
dataIndex: 'bndAmount',
|
|
dataIndex: 'bndAmount',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 100,
|
|
width: 100,
|
|
- customRender: function (text) { return text ? ('¥' + text) : '0' }
|
|
|
|
|
|
+ customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
|
|
}
|
|
}
|
|
] },
|
|
] },
|
|
- { title: '实际销售合计金额', width: 200, dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return text ? ('¥' + text) : '0' } }
|
|
|
|
|
|
+ { title: '开单销售合计金额', width: 200, dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
@@ -294,28 +327,36 @@ export default {
|
|
this.tableHeight = window.innerHeight - 380
|
|
this.tableHeight = window.innerHeight - 380
|
|
}
|
|
}
|
|
const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) // 有分页
|
|
const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) // 有分页
|
|
|
|
+ delete paramsPage.time
|
|
return salesBillReportGroupByBuyerList(paramsPage).then(res => {
|
|
return salesBillReportGroupByBuyerList(paramsPage).then(res => {
|
|
|
|
+ this.getCount(paramsPage)
|
|
const data = res.data
|
|
const data = res.data
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
- const row = data.list[i]
|
|
|
|
- row.no = no + i + 1
|
|
|
|
- row.totalAmount = row.jpLqqAmount + row.jpYgpAmount + row.jpLbAmount + row.jpScpAmount
|
|
|
|
- row.totalAmount += row.jpGyxAmount + row.gpLqqAmount + row.gpYgpAmount + row.gpScpAmount + row.hjAmount
|
|
|
|
- row.totalAmount += row.dlsAmount + row.wsAmount + row.tbuAmount + row.ngkAmount + row.flpAmount + row.cpAmount
|
|
|
|
- row.totalAmount += row.wetAmount + row.lbstAmount + row.defAmount + row.bndAmount
|
|
|
|
|
|
+ data.list[i].no = no + i + 1
|
|
}
|
|
}
|
|
this.disabled = false
|
|
this.disabled = false
|
|
this.spinning = false
|
|
this.spinning = false
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ totalData: null,
|
|
addrProvinceList: [], // 省下拉
|
|
addrProvinceList: [], // 省下拉
|
|
addrCityList: [], // 市下拉
|
|
addrCityList: [], // 市下拉
|
|
addrDistrictList: [] // 区下拉
|
|
addrDistrictList: [] // 区下拉
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 总计
|
|
|
|
+ getCount (params) {
|
|
|
|
+ salesBillReportCount(params).then(res => {
|
|
|
|
+ if (res.status == 200 && res.data) {
|
|
|
|
+ this.totalData = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.totalData = null
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
handleSearch () {
|
|
handleSearch () {
|
|
const _this = this
|
|
const _this = this
|
|
this.$refs.ruleForm.validate(valid => {
|
|
this.$refs.ruleForm.validate(valid => {
|
|
@@ -343,10 +384,13 @@ export default {
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
- this.$refs.rangeDate.resetDate()
|
|
|
|
- this.queryParam.time = []
|
|
|
|
- this.queryParam.beginDate = ''
|
|
|
|
- this.queryParam.endDate = ''
|
|
|
|
|
|
+ this.queryParam.time = [
|
|
|
|
+ getDate.getCurrMonthDays().starttime,
|
|
|
|
+ getDate.getCurrMonthDays().endtime
|
|
|
|
+ ]
|
|
|
|
+ this.$refs.rangeDate.resetDate(this.queryParam.time)
|
|
|
|
+ this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
|
|
|
|
+ this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
this.queryParam.dealer = {
|
|
this.queryParam.dealer = {
|
|
'dealerSn': undefined,
|
|
'dealerSn': undefined,
|
|
'provinceSn': undefined,
|
|
'provinceSn': undefined,
|