|
@@ -69,10 +69,11 @@
|
|
|
<!-- 操作按钮 -->
|
|
|
<div class="table-operator">
|
|
|
<div class="tongji-bar">
|
|
|
- 总余额:{{ toThousands(countData&&countData.orderTotalAmount||0) }};
|
|
|
- 已对单余额:{{ toThousands(countData&&countData.receiptTotalAmount||0) }};
|
|
|
- 待对单余额:{{ toThousands(countData&&countData.useTotalAmount||0) }};
|
|
|
- 待选余额:{{ toThousands(countData&&countData.payTotalAmount||0) }};
|
|
|
+ 总余额:{{ toThousands(countData&&countData.totalBalance||0) }};
|
|
|
+ 已对单余额:{{ toThousands(countData&&countData.confirmBalance||0) }};
|
|
|
+ 待对单余额:{{ toThousands(countData&&countData.waitConfirmBalance||0) }};
|
|
|
+ 待选余额:{{ toThousands(countData&&countData.newBizBalance||0) }};
|
|
|
+ 待选单数:{{ countData&&countData.newBizCount||0 }};
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 列表 -->
|
|
@@ -89,11 +90,25 @@
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
<template slot="totalBalance" slot-scope="text, record">
|
|
|
- <span v-if="$hasPermissions('B_asb_detail')" class="link-bule" @click="handleDetail(record)">{{ record.totalBalance }}</span>
|
|
|
+ <span v-if="$hasPermissions('B_asb_detail')" class="link-bule" @click="handleDetail(record,0)">{{ record.totalBalance }}</span>
|
|
|
<span v-else>{{ record.totalBalance }}</span>
|
|
|
</template>
|
|
|
+ <template slot="confirmBalance" slot-scope="text, record">
|
|
|
+ <span v-if="$hasPermissions('B_asb_detail')" class="link-bule" @click="handleDetail(record,1)">{{ record.confirmBalance }}</span>
|
|
|
+ <span v-else>{{ record.confirmBalance }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="waitConfirmBalance" slot-scope="text, record">
|
|
|
+ <span v-if="$hasPermissions('B_asb_detail')" class="link-bule" @click="handleDetail(record,2)">{{ record.waitConfirmBalance }}</span>
|
|
|
+ <span v-else>{{ record.waitConfirmBalance }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="newBizBalance" slot-scope="text, record">
|
|
|
+ <span v-if="$hasPermissions('B_asb_detail')" class="link-bule" @click="handleDetail(record,3)">{{ record.newBizBalance }}</span>
|
|
|
+ <span v-else>{{ record.newBizBalance }}</span>
|
|
|
+ </template>
|
|
|
<template slot="dealerType" slot-scope="text, record">
|
|
|
- {{ record.dealerTypeName1 }}>{{ record.dealerTypeName2 }}
|
|
|
+ <span v-if="record.dealer">
|
|
|
+ {{ record.dealer.dealerTypeName1 }}{{ record.dealer.dealerTypeName2?'>':'' }}{{ record.dealer.dealerTypeName2 }}
|
|
|
+ </span>
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
@@ -125,7 +140,7 @@ import subarea from '@/views/common/subarea.js'
|
|
|
import dealerType from '@/views/common/dealerType.js'
|
|
|
import customerService from '@/views/common/customerService.vue'
|
|
|
import baseModal from './baseModal.vue'
|
|
|
-import { verifyAccountBalanceQueryPage, verifyAccountBalanceExport } from '@/api/verifyAccountChange.js'
|
|
|
+import { verifyAccountBalanceQueryPage, verifyAccountBalanceExport, verifyAccountBalanceQueryCount } from '@/api/verifyAccountChange.js'
|
|
|
export default {
|
|
|
name: 'AccountStatementBillList',
|
|
|
mixins: [commonMixin],
|
|
@@ -139,8 +154,6 @@ export default {
|
|
|
dealerType: [], // 商户类型
|
|
|
monthVal: '', // 初始化月份值
|
|
|
queryParam: { // 查询条件
|
|
|
- beginDate: '', // 月份开始时间
|
|
|
- endDate: '', // 月份结束时间
|
|
|
nameLike: '', // 经销商名称/别名
|
|
|
dealerType1: undefined, // 商户类型
|
|
|
dealerType2: undefined, // 商户类型
|
|
@@ -158,20 +171,33 @@ export default {
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- const params = Object.assign(parameter, this.queryParam)
|
|
|
-
|
|
|
- return verifyAccountBalanceQueryPage(params).then(res => {
|
|
|
+ const params = this.queryParam
|
|
|
+ const params1 = {
|
|
|
+ dealer: {
|
|
|
+ nameLike: params.nameLike,
|
|
|
+ dealerType1: params.dealerType1,
|
|
|
+ dealerType2: params.dealerType2,
|
|
|
+ dealerLevel: params.dealerLevel,
|
|
|
+ subareaArea: params.subareaArea,
|
|
|
+ kdMidCustomerFnumber: params.kdMidCustomerFnumber
|
|
|
+ },
|
|
|
+ bizMonth: this.monthVal ? this.monthVal + '-01' : '',
|
|
|
+ ...parameter
|
|
|
+ }
|
|
|
+ return verifyAccountBalanceQueryPage(params1).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
|
+ data.list[i].lastBizDate = moment(data.list[i].lastBizDate).format('YYYY-MM')
|
|
|
}
|
|
|
this.total = data.count || 0
|
|
|
this.disabled = false
|
|
|
}
|
|
|
this.spinning = false
|
|
|
+ this.getCount(params1)
|
|
|
return data
|
|
|
})
|
|
|
},
|
|
@@ -184,20 +210,20 @@ export default {
|
|
|
columns () {
|
|
|
const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
- { title: '财务编码', dataIndex: 'kdMidCustomerFnumber', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '经销商名称', dataIndex: 'dealerName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '商户别名', dataIndex: 'dealerAlias', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '财务编码', dataIndex: 'dealer.kdMidCustomerFnumber', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '经销商名称', dataIndex: 'dealer.dealerName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '商户别名', dataIndex: 'dealer.dealerAlias', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '总余额', scopedSlots: { customRender: 'totalBalance' }, width: '6%', align: 'center' },
|
|
|
- { title: '已对单余额', dataIndex: 'confirmBalance', width: '6%', align: 'center', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
|
|
|
- { title: '待对单余额', dataIndex: 'waitConfirmBalance', width: '6%', align: 'center', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
|
|
|
- { title: '待选余额', dataIndex: 'newBizBalance', width: '6%', align: 'center', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
|
|
|
- { title: '待选单数', dataIndex: 'waitCount', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '已对单余额', scopedSlots: { customRender: 'confirmBalance' }, dataIndex: 'confirmBalance', width: '6%', align: 'center' },
|
|
|
+ { title: '待对单余额', scopedSlots: { customRender: 'waitConfirmBalance' }, dataIndex: 'waitConfirmBalance', width: '6%', align: 'center' },
|
|
|
+ { title: '待选余额', scopedSlots: { customRender: 'newBizBalance' }, dataIndex: 'newBizBalance', width: '6%', align: 'center' },
|
|
|
+ { title: '待选单数', dataIndex: 'newBizCount', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '最新业务月份', dataIndex: 'lastBizDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '客服', dataIndex: 'kfName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '区域', dataIndex: 'subareaArea.subareaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '省份', dataIndex: 'provinceName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '区域', dataIndex: 'dealer.subareaArea.subareaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '分区', dataIndex: 'dealer.subareaArea.subareaAreaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '省份', dataIndex: 'dealer.provinceName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '商户级别', dataIndex: 'dealer.dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '商户类型', scopedSlots: { customRender: 'dealerType' }, width: '15%', align: 'center' },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
|
]
|
|
@@ -212,21 +238,6 @@ export default {
|
|
|
// 选择月份 change
|
|
|
onChangeMonth (date, dateString) {
|
|
|
this.monthVal = dateString
|
|
|
- if (date && dateString != '') {
|
|
|
- this.queryParam.beginDate = this.getMonthRange(dateString).firstDay
|
|
|
- this.queryParam.endDate = this.getMonthRange(dateString).lastDay
|
|
|
- } else {
|
|
|
- this.queryParam.beginDate = undefined
|
|
|
- this.queryParam.endDate = undefined
|
|
|
- }
|
|
|
- },
|
|
|
- // 获取指定月份 第一天和最后一天
|
|
|
- getMonthRange (targetMonth) {
|
|
|
- // 获取指定月第一天(格式化为 YYYY-MM-DD)
|
|
|
- const firstDay = moment(targetMonth).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
|
|
|
- // 获取指定月最后一天(格式化为 YYYY-MM-DD)
|
|
|
- const lastDay = moment(targetMonth).endOf('month').format('YYYY-MM-DD') + ' 23:59:59'
|
|
|
- return { firstDay, lastDay }
|
|
|
},
|
|
|
// 区域分区
|
|
|
subareaChange (val) {
|
|
@@ -238,10 +249,14 @@ export default {
|
|
|
this.queryParam.dealerType1 = v[0]
|
|
|
this.queryParam.dealerType2 = v[1]
|
|
|
},
|
|
|
+ // 统计信息
|
|
|
+ getCount (params) {
|
|
|
+ verifyAccountBalanceQueryCount(params).then(res => {
|
|
|
+ this.countData = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
- this.queryParam.beginDate = ''
|
|
|
- this.queryParam.endDate = ''
|
|
|
this.monthVal = ''
|
|
|
this.queryParam.nameLike = ''
|
|
|
this.queryParam.dealerType1 = undefined
|
|
@@ -259,7 +274,19 @@ export default {
|
|
|
handleExport () {
|
|
|
const _this = this
|
|
|
_this.exportLoading = true
|
|
|
- hdExportExcel(verifyAccountBalanceExport, _this.queryParam, '经销商对账单据余额-', function () {
|
|
|
+ const params = this.queryParam
|
|
|
+ const params1 = {
|
|
|
+ dealer: {
|
|
|
+ nameLike: params.nameLike,
|
|
|
+ dealerType1: params.dealerType1,
|
|
|
+ dealerType2: params.dealerType2,
|
|
|
+ dealerLevel: params.dealerLevel,
|
|
|
+ subareaArea: params.subareaArea,
|
|
|
+ kdMidCustomerFnumber: params.kdMidCustomerFnumber
|
|
|
+ },
|
|
|
+ bizMonth: this.monthVal ? this.monthVal + '-01' : ''
|
|
|
+ }
|
|
|
+ hdExportExcel(verifyAccountBalanceExport, params1, '经销商对账单据余额-', function () {
|
|
|
_this.exportLoading = false
|
|
|
})
|
|
|
},
|
|
@@ -274,8 +301,8 @@ export default {
|
|
|
this.$router.push({ name: 'accountStatementEdit', params: { sn: data.verifyAccountBillSn } })
|
|
|
},
|
|
|
// 详情
|
|
|
- handleDetail (row) {
|
|
|
- this.$router.push({ name: 'accountStatementBillDetail', params: { sn: row.dealerSn, name: row.dealerName } })
|
|
|
+ handleDetail (row, type) {
|
|
|
+ this.$router.push({ name: 'accountStatementBillDetail', params: { sn: row.dealer.dealerSn, name: row.dealer.dealerName, type: type } })
|
|
|
},
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
@@ -285,7 +312,7 @@ export default {
|
|
|
},
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
- this.tableHeight = window.innerHeight - tableSearchH - 250
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 240
|
|
|
}
|
|
|
},
|
|
|
watch: {
|