Authored by lzhy

增加导出功能

... ... @@ -177,6 +177,11 @@ export default {
align: 'center',
},
{
title: '交易服务费',
key: 'serviceAmount',
align: 'center',
},
{
title: '商家实收',
key: 'shopNetAmount',
align: 'center',
... ... @@ -293,7 +298,6 @@ export default {
},
//导出列表
exportList() {
this.enableFilter = true;
const queryString = { ...this.filterValues(), excelConf: 'shopBill' };
const params = qs.stringify(queryString, true);
const href = `${baseExportApi}${params}`;
... ...
... ... @@ -81,6 +81,7 @@
<div class="select-container">
<Button type="primary" @click="search">查询</Button>
<Button type="primary" @click="reset">全部</Button>
<Button type="warning" @click="exportList">导出</Button>
</div>
</filter-item>
</layout-filter>
... ... @@ -103,6 +104,8 @@ import _ from 'lodash';
import moment from 'moment';
import { FreightApply } from './store';
import FinanceService from 'services/finance/finance-service';
import baseExportApi from 'util/excel';
import qs from 'querystringify';
export default {
data() {
... ... @@ -129,33 +132,33 @@ export default {
subClearingType: 'subClearingType',
status: 'status',
};
if (this.enableFilter) {
_.each(keysMap, (val, key) => {
values[key] = fields[val].model;
});
}
_.each(keysMap, (val, key) => {
values[key] = fields[val].model;
});
return values;
},
search() {
let params = {};
this.enableFilter = true;
this.filters.timeFlag.model = '';
params = this.filterValues();
this.list(params);
this.pageData.current = 1;
},
reset() {
let params = {};
this.enableFilter = false;
_.each(this.filters, value => {
if (value.hasOwnProperty('model')) {
value.model = '';
}
});
params = this.filterValues();
this.list(params);
this.pageData.current = 1;
},
timeFlag(flag) {
let params = {};
this.enableFilter = false;
this.filters.timeFlag.model = flag;
params = this.filterValues();
params.timeFlag = flag;
this.list(params);
this.pageData.current = 1;
},
... ... @@ -192,6 +195,12 @@ export default {
},
});
},
exportList() {
const queryString = { ...this.filterValues(), excelConf: 'shopFreightList' };
const params = qs.stringify(queryString, true);
const href = `${baseExportApi}${params}`;
window.open(href, '_blank');
},
},
};
</script>
... ...
... ... @@ -84,7 +84,7 @@
<div class="select-container">
<Button type="primary" @click="search">查询</Button>
<Button type="primary" @click="reset">全部</Button>
<!-- <Button>导出</Button>-->
<Button type="warning" @click="exportList">导出</Button>
</div>
</filter-item>
</layout-filter>
... ... @@ -107,7 +107,8 @@ import _ from 'lodash';
import moment from 'moment';
import { ServiceList } from './store';
import FinanceService from 'services/finance/finance-service';
import baseExportApi from 'util/excel';
import qs from 'querystringify';
export default {
data() {
return ServiceList.call(this);
... ... @@ -133,35 +134,34 @@ export default {
targetAccount: 'targetAccount',
clearingType: 'clearingType',
subClearingType: 'subClearingType',
// statementSn: 'statementSn',
};
if (this.enableFilter) {
_.each(keysMap, (val, key) => {
values[key] = fields[val].model;
});
}
_.each(keysMap, (val, key) => {
values[key] = fields[val].model;
});
return values;
},
search() {
let params = {};
this.enableFilter = true;
this.filters.timeFlag.model = '';
params = this.filterValues();
this.list(params);
this.pageData.current = 1;
},
reset() {
let params = {};
this.enableFilter = false;
_.each(this.filters, value => {
if (value.hasOwnProperty('model')) {
value.model = '';
}
});
params = this.filterValues();
this.list(params);
this.pageData.current = 1;
},
timeFlag(flag) {
let params = {};
this.enableFilter = false;
this.filters.timeFlag.model = flag;
params = this.filterValues();
params.timeFlag = flag;
this.list(params);
this.pageData.current = 1;
},
... ... @@ -190,6 +190,12 @@ export default {
this.pageData.current = _.get(ret, 'data.pageNo', 1);
});
},
exportList() {
const queryString = { ...this.filterValues(), excelConf: 'shopServiceList' };
const params = qs.stringify(queryString, true);
const href = `${baseExportApi}${params}`;
window.open(href, '_blank');
},
},
};
</script>
... ...
... ... @@ -128,6 +128,10 @@ export default function() {
key: 'realIncome',
},
{
title: '提现服务费',
key: 'withdrawServiceAmount',
},
{
title: '提现状态',
key: 'status',
align: 'center',
... ...
... ... @@ -129,11 +129,6 @@ export default function() {
key: 'productName',
align: 'center',
},
// {
// title: '业务单据号',
// key: 'statementSn',
// align: 'center',
// },
{
title: '账务类型',
key: 'clearingType',
... ... @@ -145,6 +140,16 @@ export default function() {
align: 'center',
},
{
title: '交易服务费',
key: 'tradeServiceAmount',
align: 'center',
},
{
title: '提现服务费',
key: 'withdrawServiceAmount',
align: 'center',
},
{
title: '服务费金额(元)',
key: 'serviceAmount',
align: 'center',
... ...
... ... @@ -32,7 +32,7 @@
<td :rowspan="item.goodsList.length">{{ item.consigneeName }}</td>
<td :rowspan="item.goodsList.length">{{ paymentStatusArr[item.paymentStatus] }}</td>
<td :rowspan="item.goodsList.length">{{ item.lastOrderAmount }}</td>
<td :rowspan="item.goodsList.length">{{ orderStatusArr[item.orderStatus] }}</td>
<td :rowspan="item.goodsList.length">{{ item.orderStatusStr }}</td>
<td :rowspan="item.goodsList.length">
<i-button type="default" size="small" @click="goToDetail(item.orderCode)">查看订单</i-button>
<template v-if="item.orderStatus == 100 || item.orderStatus == 200">
... ...
const exportExcelConfs = {
//交易账务明细报表导出配置
shopBill: {
apiUrl: '/erp/queryShopBillList',
conf: {
... ... @@ -52,6 +53,10 @@ const exportExcelConfs = {
type: 'number',
},
{
caption: '交易服务费',
type: 'number',
},
{
caption: '商家实收',
type: 'number',
},
... ... @@ -81,6 +86,7 @@ const exportExcelConfs = {
'clearingDiscount',
'shopDeserveAmount',
'withdrawServiceAmount',
'serviceAmount',
'shopNetAmount',
'statusName',
'withdrawalTime',
... ... @@ -88,5 +94,135 @@ const exportExcelConfs = {
],
},
},
//服务费账单报表导出配置
shopServiceList: {
apiUrl: '/erp/shopWithdrawServiceList',
conf: {
cols: [
{
caption: '账务ID',
type: 'number',
},
{
caption: '提现时间',
type: 'string',
},
{
caption: '商家收款账户',
type: 'string',
},
{
caption: '订单号',
type: 'string',
},
{
caption: 'SKU',
type: 'number',
},
{
caption: '商品名称',
type: 'string',
},
{
caption: '账务类型',
type: 'string',
},
{
caption: '子服务类型',
type: 'string',
},
{
caption: '交易服务费',
type: 'number',
},
{
caption: '提现服务费',
type: 'number',
},
{
caption: '服务费金额',
type: 'number',
},
{
caption: '提现状态',
type: 'string',
},
{
caption: '提现成功日期',
type: 'string',
},
],
rows: [
'id',
'withdrawTime',
'targetAccount',
'orderCode',
'productSku',
'productName',
'clearingType',
'clearingTypeName',
'tradeServiceAmount',
'withdrawServiceAmount',
'serviceAmount',
'statusName',
'createTime',
],
},
},
//运费账务明细报表导出配置
shopFreightList: {
apiUrl: '/erp/shopWithdrawFreightList',
conf: {
cols: [
{
caption: '账务ID',
type: 'number',
},
{
caption: '结算时间',
type: 'string',
},
{
caption: '订单号',
type: 'string',
},
{
caption: '商品名称',
type: 'string',
},
{
caption: '账务类型',
type: 'string',
},
{
caption: '商家实收',
type: 'number',
},
{
caption: '提现服务费',
type: 'number',
},
{
caption: '提现状态',
type: 'string',
},
{
caption: '提现成功日期',
type: 'string',
},
],
rows: [
'id',
'clearingTime',
'orderCode',
'productName',
'clearingType',
'realIncome',
'withdrawServiceAmount',
'statusName',
'withdrawTime',
],
},
},
};
module.exports = exportExcelConfs;
... ...