Authored by lzhy

增加统计

... ... @@ -42,7 +42,8 @@
</filter-item>
</layout-filter>
<layout-list>
<Table border :columns="tableCols" :data="tableData"></Table>
<Table border :columns="tableCols" :data="tableData" show-summary></Table>
<Table border :columns="summaryColumn" :data="summaryInfo" :show-header="false"></Table>
<Page
:total="pageData.total"
:current="pageData.current"
... ... @@ -229,6 +230,48 @@ export default {
},
],
tableData: [],
summaryColumn: [
{
title: '账务ID',
key: 'summaryName',
width: 60,
align: 'center',
},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{
title: '商家应收汇总',
key: 'shopDeserveAmount',
align: 'center',
},
{
title: '提现服务费汇总',
key: 'withdrawServiceAmount',
align: 'center',
},
{
title: '交易服务费汇总',
key: 'serviceAmount',
align: 'center',
},
{
title: '商家实收汇总',
key: 'shopNetAmount',
align: 'center',
},
{},
{},
{},
],
summaryInfo: [],
pageData: {
total: 0,
current: 1,
... ... @@ -300,10 +343,16 @@ export default {
},
//获取列表数据
list() {
this.financeService.shopBillList(this.currentSearchParams).then(ret => {
this.tableData = _.get(ret, 'data.records', []);
this.pageData.total = _.get(ret, 'data.totalCount', 0);
this.pageData.current = _.get(ret, 'data.pageNo', 1);
Promise.all([
this.financeService.shopBillList(this.currentSearchParams),
this.financeService.querySummaryInfo(this.currentSearchParams),
]).then(result => {
this.tableData = _.get(result[0], 'data.records', []);
this.pageData.total = _.get(result[0], 'data.totalCount', 0);
this.pageData.current = _.get(result[0], 'data.pageNo', 1);
const summaryInfo = _.get(result[1], 'data', {});
this.summaryInfo = [];
this.summaryInfo.push({ ...summaryInfo, summaryName: '汇总' });
});
},
//导出列表
... ...
... ... @@ -90,6 +90,7 @@
</layout-filter>
<layout-list>
<Table border :columns="tableCols" :data="tableData"></Table>
<Table border :columns="summaryColumn" :data="summaryInfo" :show-header="false"></Table>
<Page
:total="pageData.total"
:current="pageData.current"
... ... @@ -184,10 +185,16 @@ export default {
this.list(params);
},
list(params) {
this.financeService.shopWithdrawServiceList(params).then(ret => {
this.tableData = _.get(ret, 'data.records', []);
this.pageData.total = _.get(ret, 'data.totalCount', 0);
this.pageData.current = _.get(ret, 'data.pageNo', 1);
Promise.all([
this.financeService.shopWithdrawServiceList(params),
this.financeService.queryBillSummary(params),
]).then(result => {
this.tableData = _.get(result[0], 'data.records', []);
this.pageData.total = _.get(result[0], 'data.totalCount', 0);
this.pageData.current = _.get(result[0], 'data.pageNo', 1);
const summaryInfo = _.get(result[1], 'data', {});
this.summaryInfo = [];
this.summaryInfo.push({ ...summaryInfo, summaryName: '汇总' });
});
},
exportList() {
... ...
... ... @@ -185,5 +185,37 @@ export default function() {
current: 1,
pageSize: 10,
},
summaryColumn: [
{
title: '账务ID',
key: 'summaryName',
align: 'center',
},
{},
{},
{},
{},
{},
{},
{},
{
title: '交易服务费汇总',
key: 'tradeServiceAmount',
align: 'center',
},
{
title: '提现服务费汇总',
key: 'withdrawServiceAmount',
align: 'center',
},
{
title: '服务费汇总',
key: 'serviceAmount',
align: 'center',
},
{},
{},
],
summaryInfo: [],
};
}
... ...
... ... @@ -19,6 +19,8 @@ const apiUrl = {
sendShopVerifyCode: '/erp/sendShopVerifyCode',
verifySmsCode: '/erp/verifySmsCode',
queryShopBillList: '/erp/queryShopBillList',
querySummaryInfo: '/erp/querySummaryInfo',
queryBillSummary: '/erp/queryBillSummary',
};
class FinanceService extends Service {
... ... @@ -177,11 +179,19 @@ class FinanceService extends Service {
}
/**
* 导出交易账务明细
* 财务明细汇总
* @param params
*/
exportBillList(params) {
return this.post('/export/excel', params);
querySummaryInfo(params) {
return this.post(apiUrl.querySummaryInfo, params);
}
/**
* 服务费账单汇总
* @param params
*/
queryBillSummary(params) {
return this.post(apiUrl.queryBillSummary, params);
}
}
... ...
... ... @@ -130,6 +130,8 @@ const domainApis = {
sendShopVerifyCode: '/erp-gateway-web/sms/sendVerificationCode', //获取短信验证码
verifySmsCode: '/erp-gateway-web/sms/verifySmsCode', // 验证短信验证码
queryShopBillList: '/erp-gateway-web/shop/bill/list', //交易账务明细(新)
querySummaryInfo: '/erp-gateway-web/shop/bill/summaryInfo', //财务明细汇总
queryBillSummary: '/erp-gateway-web/shop/withdraw/service/billSummary', //服务费账单汇总
},
platform: {
queryShopsByAdminPid: '/SellerShopController/queryShopsByAdminPid',
... ...