|
@@ -35,6 +35,17 @@
|
|
|
<a-input id="accountStatementBill-bookNo" v-model.trim="queryParam.kdMidCustomerFnumber" allowClear placeholder="请输入财务编码"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="月度有业务客户" prop="beginDate">
|
|
|
+ <a-month-picker
|
|
|
+ id="accountStatementBill-monthBox"
|
|
|
+ class="monthBox"
|
|
|
+ :disabled-date="disabledDate"
|
|
|
+ v-model="monthVal"
|
|
|
+ placeholder="请选择月份"
|
|
|
+ @change="onChangeMonth" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="accountStatementBill-refresh">查询</a-button>
|
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="accountStatementBill-reset">重置</a-button>
|
|
@@ -55,6 +66,15 @@
|
|
|
</a-card>
|
|
|
<a-card size="small" :bordered="false" class="accountStatementBill-wrap">
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <!-- 操作按钮 -->
|
|
|
+ <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) }};
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!-- 列表 -->
|
|
|
<s-table
|
|
|
class="sTable fixPagination"
|
|
@@ -68,9 +88,9 @@
|
|
|
:pageSize="30"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
- <template slot="totalAmount" slot-scope="text, record">
|
|
|
- <span v-if="$hasPermissions('B_asb_detail')" class="link-bule" @click="handleDetail(record)">{{ record.totalAmount }}</span>
|
|
|
- <span v-else>{{ record.totalAmount }}</span>
|
|
|
+ <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-else>{{ record.totalBalance }}</span>
|
|
|
</template>
|
|
|
<template slot="dealerType" slot-scope="text, record">
|
|
|
{{ record.dealerTypeName1 }}>{{ record.dealerTypeName2 }}
|
|
@@ -97,6 +117,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import moment from 'moment'
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
@@ -116,7 +137,10 @@ export default {
|
|
|
tableHeight: 0,
|
|
|
openModal: false,
|
|
|
dealerType: [], // 商户类型
|
|
|
+ monthVal: '', // 初始化月份值
|
|
|
queryParam: { // 查询条件
|
|
|
+ beginDate: '', // 月份开始时间
|
|
|
+ endDate: '', // 月份结束时间
|
|
|
nameLike: '', // 经销商名称/别名
|
|
|
dealerType1: undefined, // 商户类型
|
|
|
dealerType2: undefined, // 商户类型
|
|
@@ -151,7 +175,8 @@ export default {
|
|
|
return data
|
|
|
})
|
|
|
},
|
|
|
- total: 0 // 合计
|
|
|
+ total: 0, // 合计
|
|
|
+ countData: null
|
|
|
}
|
|
|
},
|
|
|
// 根据权限显示列表字段
|
|
@@ -162,12 +187,16 @@ export default {
|
|
|
{ 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: '总余额', scopedSlots: { customRender: 'totalAmount' }, width: '6%', align: 'center' },
|
|
|
- { title: '待选余额', dataIndex: 'waitAmount', width: '6%', align: 'center', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
|
|
|
+ { 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: '最新业务月份', 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: '商户类型', scopedSlots: { customRender: 'dealerType' }, width: '15%', align: 'center' },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
@@ -176,6 +205,29 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 选择月份 禁用选择当月以后日期
|
|
|
+ disabledDate (current) {
|
|
|
+ return current && current >= moment().endOf('day')
|
|
|
+ },
|
|
|
+ // 选择月份 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) {
|
|
|
this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
|
|
@@ -190,6 +242,7 @@ export default {
|
|
|
resetSearchForm () {
|
|
|
this.queryParam.beginDate = ''
|
|
|
this.queryParam.endDate = ''
|
|
|
+ this.monthVal = ''
|
|
|
this.queryParam.nameLike = ''
|
|
|
this.queryParam.dealerType1 = undefined
|
|
|
this.queryParam.dealerType2 = undefined
|
|
@@ -280,4 +333,13 @@ export default {
|
|
|
color: rgba(0, 0, 0);
|
|
|
}
|
|
|
}
|
|
|
+ .monthBox{
|
|
|
+ width: 100%;
|
|
|
+ /deep/.ant-calendar-picker-icon{
|
|
|
+ display:none !important;
|
|
|
+ }
|
|
|
+ /deep/.ant-calendar-picker input{
|
|
|
+ text-align:center;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|