Authored by lzhy

运费明细增加汇总

... ... @@ -87,6 +87,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"
... ... @@ -181,10 +182,16 @@ export default {
this.list(params);
},
list(params) {
this.financeService.shopWithdrawFreightList(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.shopWithdrawFreightList(params),
this.financeService.queryFreightBillSummary(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: '汇总' });
});
},
getDetailById(id) {
... ...
... ... @@ -124,14 +124,18 @@ export default function() {
key: 'clearingType',
},
{
title: '商家实收(元)',
key: 'realIncome',
title: '运费',
key: 'freightAmount',
},
{
title: '提现服务费',
key: 'withdrawServiceAmount',
},
{
title: '商家实收(元)',
key: 'realIncome',
},
{
title: '提现状态',
key: 'status',
align: 'center',
... ... @@ -175,25 +179,6 @@ export default function() {
);
},
},
// {
// title: '操作',
// key: 'action',
// width: 180,
// align: 'center',
// render: (h, params) => {
// const row = params.row;
// return (
// <div>
// <div class="cell-action-row">
// <i-button type="primary" size="small" onClick={() => this.getDetailById(row.id)}>
// 查看明细
// </i-button>
// </div>
// </div>
// );
// },
// className: 'action-column',
// },
],
tableData: [],
pageData: {
... ... @@ -201,5 +186,33 @@ export default function() {
current: 1,
pageSize: 10,
},
summaryColumn: [
{
title: '账务ID',
key: 'summaryName',
align: 'center',
width: 60,
},
{},
{},
{},
{},
{
title: '运费汇总',
key: 'freightAmount',
},
{
title: '提现服务费汇总',
key: 'withdrawServiceAmount',
},
{
title: '商家实收汇总',
key: 'realIncome',
},
{},
{},
{},
],
summaryInfo: [],
};
}
... ...
... ... @@ -21,6 +21,7 @@ const apiUrl = {
queryShopBillList: '/erp/queryShopBillList',
querySummaryInfo: '/erp/querySummaryInfo',
queryBillSummary: '/erp/queryBillSummary',
queryFreightBillSummary: '/erp/queryFreightBillSummary',
};
class FinanceService extends Service {
... ... @@ -193,6 +194,14 @@ class FinanceService extends Service {
queryBillSummary(params) {
return this.post(apiUrl.queryBillSummary, params);
}
/**
* 运费账务汇总
* @param params
*/
queryFreightBillSummary(params) {
return this.post(apiUrl.queryFreightBillSummary, params);
}
}
FinanceService.exportBalanceList = '/Api/erp/exportBalanceList'; // 导出对账单列表, 结算单列表
... ...
... ... @@ -132,6 +132,7 @@ const domainApis = {
queryShopBillList: '/erp-gateway-web/shop/bill/list', //交易账务明细(新)
querySummaryInfo: '/erp-gateway-web/shop/bill/summaryInfo', //财务明细汇总
queryBillSummary: '/erp-gateway-web/shop/withdraw/service/billSummary', //服务费账单汇总
queryFreightBillSummary: '/erp-gateway-web/shop/withdraw/freight/billSummary', //运费账务汇总
},
platform: {
queryShopsByAdminPid: '/SellerShopController/queryShopsByAdminPid',
... ...