Authored by lzhy

运费明细增加汇总

@@ -87,6 +87,7 @@ @@ -87,6 +87,7 @@
87 </layout-filter> 87 </layout-filter>
88 <layout-list> 88 <layout-list>
89 <Table border :columns="tableCols" :data="tableData"></Table> 89 <Table border :columns="tableCols" :data="tableData"></Table>
  90 + <Table border :columns="summaryColumn" :data="summaryInfo" :show-header="false"></Table>
90 <Page 91 <Page
91 :total="pageData.total" 92 :total="pageData.total"
92 :current="pageData.current" 93 :current="pageData.current"
@@ -181,10 +182,16 @@ export default { @@ -181,10 +182,16 @@ export default {
181 this.list(params); 182 this.list(params);
182 }, 183 },
183 list(params) { 184 list(params) {
184 - this.financeService.shopWithdrawFreightList(params).then(ret => {  
185 - this.tableData = _.get(ret, 'data.records', []);  
186 - this.pageData.total = _.get(ret, 'data.totalCount', 0);  
187 - this.pageData.current = _.get(ret, 'data.pageNo', 1); 185 + Promise.all([
  186 + this.financeService.shopWithdrawFreightList(params),
  187 + this.financeService.queryFreightBillSummary(params),
  188 + ]).then(result => {
  189 + this.tableData = _.get(result[0], 'data.records', []);
  190 + this.pageData.total = _.get(result[0], 'data.totalCount', 0);
  191 + this.pageData.current = _.get(result[0], 'data.pageNo', 1);
  192 + const summaryInfo = _.get(result[1], 'data', {});
  193 + this.summaryInfo = [];
  194 + this.summaryInfo.push({ ...summaryInfo, summaryName: '汇总' });
188 }); 195 });
189 }, 196 },
190 getDetailById(id) { 197 getDetailById(id) {
@@ -124,14 +124,18 @@ export default function() { @@ -124,14 +124,18 @@ export default function() {
124 key: 'clearingType', 124 key: 'clearingType',
125 }, 125 },
126 { 126 {
127 - title: '商家实收(元)',  
128 - key: 'realIncome', 127 + title: '运费',
  128 + key: 'freightAmount',
129 }, 129 },
130 { 130 {
131 title: '提现服务费', 131 title: '提现服务费',
132 key: 'withdrawServiceAmount', 132 key: 'withdrawServiceAmount',
133 }, 133 },
134 { 134 {
  135 + title: '商家实收(元)',
  136 + key: 'realIncome',
  137 + },
  138 + {
135 title: '提现状态', 139 title: '提现状态',
136 key: 'status', 140 key: 'status',
137 align: 'center', 141 align: 'center',
@@ -175,25 +179,6 @@ export default function() { @@ -175,25 +179,6 @@ export default function() {
175 ); 179 );
176 }, 180 },
177 }, 181 },
178 - // {  
179 - // title: '操作',  
180 - // key: 'action',  
181 - // width: 180,  
182 - // align: 'center',  
183 - // render: (h, params) => {  
184 - // const row = params.row;  
185 - // return (  
186 - // <div>  
187 - // <div class="cell-action-row">  
188 - // <i-button type="primary" size="small" onClick={() => this.getDetailById(row.id)}>  
189 - // 查看明细  
190 - // </i-button>  
191 - // </div>  
192 - // </div>  
193 - // );  
194 - // },  
195 - // className: 'action-column',  
196 - // },  
197 ], 182 ],
198 tableData: [], 183 tableData: [],
199 pageData: { 184 pageData: {
@@ -201,5 +186,33 @@ export default function() { @@ -201,5 +186,33 @@ export default function() {
201 current: 1, 186 current: 1,
202 pageSize: 10, 187 pageSize: 10,
203 }, 188 },
  189 + summaryColumn: [
  190 + {
  191 + title: '账务ID',
  192 + key: 'summaryName',
  193 + align: 'center',
  194 + width: 60,
  195 + },
  196 + {},
  197 + {},
  198 + {},
  199 + {},
  200 + {
  201 + title: '运费汇总',
  202 + key: 'freightAmount',
  203 + },
  204 + {
  205 + title: '提现服务费汇总',
  206 + key: 'withdrawServiceAmount',
  207 + },
  208 + {
  209 + title: '商家实收汇总',
  210 + key: 'realIncome',
  211 + },
  212 + {},
  213 + {},
  214 + {},
  215 + ],
  216 + summaryInfo: [],
204 }; 217 };
205 } 218 }
@@ -21,6 +21,7 @@ const apiUrl = { @@ -21,6 +21,7 @@ const apiUrl = {
21 queryShopBillList: '/erp/queryShopBillList', 21 queryShopBillList: '/erp/queryShopBillList',
22 querySummaryInfo: '/erp/querySummaryInfo', 22 querySummaryInfo: '/erp/querySummaryInfo',
23 queryBillSummary: '/erp/queryBillSummary', 23 queryBillSummary: '/erp/queryBillSummary',
  24 + queryFreightBillSummary: '/erp/queryFreightBillSummary',
24 }; 25 };
25 26
26 class FinanceService extends Service { 27 class FinanceService extends Service {
@@ -193,6 +194,14 @@ class FinanceService extends Service { @@ -193,6 +194,14 @@ class FinanceService extends Service {
193 queryBillSummary(params) { 194 queryBillSummary(params) {
194 return this.post(apiUrl.queryBillSummary, params); 195 return this.post(apiUrl.queryBillSummary, params);
195 } 196 }
  197 +
  198 + /**
  199 + * 运费账务汇总
  200 + * @param params
  201 + */
  202 + queryFreightBillSummary(params) {
  203 + return this.post(apiUrl.queryFreightBillSummary, params);
  204 + }
196 } 205 }
197 206
198 FinanceService.exportBalanceList = '/Api/erp/exportBalanceList'; // 导出对账单列表, 结算单列表 207 FinanceService.exportBalanceList = '/Api/erp/exportBalanceList'; // 导出对账单列表, 结算单列表
@@ -132,6 +132,7 @@ const domainApis = { @@ -132,6 +132,7 @@ const domainApis = {
132 queryShopBillList: '/erp-gateway-web/shop/bill/list', //交易账务明细(新) 132 queryShopBillList: '/erp-gateway-web/shop/bill/list', //交易账务明细(新)
133 querySummaryInfo: '/erp-gateway-web/shop/bill/summaryInfo', //财务明细汇总 133 querySummaryInfo: '/erp-gateway-web/shop/bill/summaryInfo', //财务明细汇总
134 queryBillSummary: '/erp-gateway-web/shop/withdraw/service/billSummary', //服务费账单汇总 134 queryBillSummary: '/erp-gateway-web/shop/withdraw/service/billSummary', //服务费账单汇总
  135 + queryFreightBillSummary: '/erp-gateway-web/shop/withdraw/freight/billSummary', //运费账务汇总
135 }, 136 },
136 platform: { 137 platform: {
137 queryShopsByAdminPid: '/SellerShopController/queryShopsByAdminPid', 138 queryShopsByAdminPid: '/SellerShopController/queryShopsByAdminPid',