Authored by jiran.zhao

一件代发

... ... @@ -5,6 +5,7 @@ import franchisePayment from './franchise-payment';
import print from './print';
import stock from './stock';
import invoice from './invoice';
import withdraw from './withdraw';
export default {
clearing,
payment,
... ... @@ -13,4 +14,5 @@ export default {
print,
stock,
invoice,
withdraw,
};
... ...
<template>
<layout-body>
<layout-filter>
<filter-item>
<p><span class="bold-title">状态:提现成功</span><br /><span class="no">交易成功时间:2020-03-31 23:43:21</span></p>
</filter-item>
<filter-item>
<p><span class="no">创建时间:2020-3-30 21:34:23</span><span class="no">店铺:一件代发店铺</span><span class="no">供应商:一件代发供应商</span></p>
</filter-item>
</layout-filter>
<layout-list>
<!-- <Table border :columns="columns" :row-class-name="rowClassName" :data="dataList"></Table>-->
<table border class="table-body">
<tr class="tr-body" v-for="(row, outerIndex) in dataArray" :key="outerIndex">
<!-- flex: 0 0 x% 自适应布局,每一大列的宽度按百分比显示 -->
<div class="td-box" :style="{flex: '0 0 ' + 100 / row.length + '%'}" v-for="(col, innerIndex) in row" :key="innerIndex">
<td class="td-key">{{ col.key }}</td>
<td class="td-value">{{ col.value }}</td>
</div>
</tr>
</table>
</layout-list>
<layout-filter>
<filter-item>
<i-button type="primary" @click="backList">返回列表</i-button>
<i-button type="ghost" @click="handleTeacherData">测试数据展示</i-button>
</filter-item>
</layout-filter>
</layout-body>
</template>
<script>
import _ from 'lodash';
import detail from './store/detail';
export default {
data() {
return detail.call(this);
},
props: {
dataArray: {
type: Array,
require: true
}
},
methods: {
backList() {
this.$router.push({ name: 'finance.withdraw.withdrawlist' });
},
handleTeacherData () {
// if (!teacher) {
// return
// }
let table = [] // 大表格
let tmpRow = [] // 临时数组,表示 row,一行数据
tmpRow.push({key: '业务单据号', value: "20200330200040011100100086516385"})
tmpRow.push({key: '类型', value: "提现"})
table.push(tmpRow)
tmpRow = []
tmpRow.push({key: '收款账户', value: "张三商贸有限公司(caomei@yoho.cn)"})
tmpRow.push({key: '付款账户', value: "有货商贸有限公司(yh@yoho.cn)"})
table.push(tmpRow)
tmpRow = []
tmpRow.push({key: '申请金额(元)', value: "10000.00"})
tmpRow.push({key: '服务费', value: '100.00'})
table.push(tmpRow)
tmpRow = []
tmpRow.push({key: '成功金额(元)', value: "9900.00"})
tmpRow.push({key: '操作人', value: "商家/平台"})
table.push(tmpRow)
tmpRow = []
tmpRow.push({key: '说明', value: "提现转账扣款(2020-03-23至2020-03-28)"})
tmpRow.push({key: '失败原因', value: "付款账户余额不足"})
table.push(tmpRow)
tmpRow = []
tmpRow.push({key: '备注', value: "++++++------++++++"})
table.push(tmpRow)
tmpRow = []
this.dataArray = table;
}
},
}
</script>
<style lang="scss" scoped>
.bold-title{
font-size: 20px;
font-weight: bold;
}
.table-body {
width: 100%;
border: 1px solid #333333;
.tr-body {
display: flex;
border-bottom: 1px solid #333333;
&:last-child {
border-bottom: 0;
}
.td-box {
display: flex;
border-left: 1px solid #333333;
&:first-child {
border-left: 0;
}
.td-key {
width: 120px;
padding: 10px;
line-height: 20px;
text-align: center;
background-color: #999999;
border-right: 1px solid #444444;
}
.td-value {
flex: 1 0;
line-height: 20px;
padding: 10px 20px;
}
}
}
}
</style>
... ...
export default [{
path: '/withdrawlist.html',
name: 'withdrawlist',
component: () => import(/* webpackChunkName: "finance.withdraw" */'./withdraw'),
meta: {
pageName: '资金操作明细'
}
},{
path: '/detail/:id.html',
name: 'detail',
component: () => import(/* webpackChunkName: "finance.withdraw" */'./detail'),
meta: {
pageName: '提现明细'
}
},{
path: '/servicelist.html',
name: 'servicelist',
component: () => import(/* webpackChunkName: "finance.withdraw" */'./service-list'),
meta: {
pageName: '服务费账单'
}
}];
... ...
<template>
<div class="stat-shop">
<p slot="title">服务费账单</p>
<layout-filter class="box-filter" :inline="true" :col="1">
<filter-item :label="filters.dateRange.label" >
<Date-picker type="datetimerange"
:placeholder="filters.dateRange.label"
@on-change="dateRange"
v-model="filters.dateRange.model"
format="yyyy-MM-dd">
</Date-picker>
<div class="quick">
<a href="javascript:;" @click="() => {changeLimit(0)}">今日</a>
<a href="javascript:;" @click="() => {changeLimit(1)}">昨天</a>
<a href="javascript:;" @click="() => {changeLimit(7)}">近7天</a>
<a href="javascript:;" @click="() => {changeLimit(30)}">近30天</a>
</div>
</filter-item>
</layout-filter>
</div>
</template>
<script>
export default {
name: "service-list"
}
</script>
<style scoped>
</style>
\ No newline at end of file
... ...
export default function() {
let table = [] // 大表格
return table;
};
\ No newline at end of file
... ...
import moment from 'moment';
let curDay = moment().format('YYYY-MM-DD');
const withdrawStatus = {
0: '提现中',
1: '提现成功',
2: '提现失败'
};
export default function() {
return {
day: curDay,
date: curDay,
dateRange: [curDay, curDay],
beginTime: curDay,
endTime: curDay,
today: moment().format('YYYY-MM-DD'),
yesterday: moment().add(-1, 'days').format('YYYY-MM-DD'),
day7: moment().add(-6, 'days').format('YYYY-MM-DD'),
day30: moment().add(-29, 'days').format('YYYY-MM-DD'),
timeLimit: true,
tableCols: [
{
title: 'ID',
key: 'id',
width: 60,
align: 'center'
},
{
title: '申请时间',
key: 'createTime',
width: 90,
align: 'center'
}, {
title: '结算类型',
key: 'clearingType',
width: 90,
align: 'center'
}, {
title: '商家收款账户',
key: 'targetAccount',
width: 90,
align: 'center'
}, {
title: '申请金额(元)',
key: 'applyAmount',
width: 90,
align: 'center'
}, {
title: '服务费(元)',
key: 'serviceAmount',
width: 90,
align: 'center'
}, {
title: '成功金额(元)',
}, {
title: '提现状态',
key: 'status',
align: 'center',
render: (h, params) => {
const row = params.row;
const as = row.status;
const asText = as === 2 ? `${withdrawStatus[row.status]}(${row.rejectReason})` : withdrawStatus[as];
ow.lineIndex = params.index;
return (
<p class={{'high-light': as === 2}}>{asText}</p>
);
},
className: 'status-column'
}, {
title: '业务单据号',
key: 'statementSn',
width: 90,
align: 'center'
}, {
title: '说明',
}, {
title: '操作人',
key: 'applyPid',
width: 90,
align: 'center'
}, {
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 class="cell-action-row">
<i-button type="primary" size="small" onClick={() => this.getInfoById(row.id)}>结算明细</i-button>
</div></div>
);
},
className: 'action-column'
}
],
tableData: [],
pageData: {
total: 0,
current: 1,
pageSize: 20
},
filters: {
dateRange: {
label: '起止日期',
model: '',
labelSpan: 8
},
beginTime: '',
endTime: '',
timeFlag: {
label: '时间标志',
model: '',
options: [
{
value: 1,
label: '今天',
},{
value: 2,
label: '昨天',
},{
value: 3,
label: '近7天',
},{
value: 4,
label: '近30天',
}
]
},
withdrawStatus: {
label: '提现状态',
model: '',
labelSpan: 6,
fieldSpan: 18,
options: [
{
value: 0,
label: '提现中',
},
{
value: 1,
label: '提现成功',
},
{
value: 2,
label: '提现失败',
}
]
},
statementSn: {
label: '业务单据号',
model: '',
labelSpan: 6,
fieldSpan: 18
},
targetAccount: {
label: '提现账户',
model: '',
options: [
{
value: 0,
label: 'abcxxx@ert.com',
},
{
value: 1,
label: 'hjkxxx@ihi.com',
}
]
}
}
}
};
... ...
import moment from 'moment';
let curDay = moment().format('YYYY-MM-DD');
const withdrawStatus = {
0: '提现中',
1: '提现成功',
2: '提现失败'
};
export default function() {
return {
day: curDay,
date: curDay,
dateRange: [curDay, curDay],
beginTime: curDay,
endTime: curDay,
today: moment().format('YYYY-MM-DD'),
yesterday: moment().add(-1, 'days').format('YYYY-MM-DD'),
day7: moment().add(-6, 'days').format('YYYY-MM-DD'),
day30: moment().add(-29, 'days').format('YYYY-MM-DD'),
timeLimit: true,
tableCols: [
{
title: 'ID',
key: 'id',
width: 60,
align: 'center'
},
{
title: '申请时间',
key: 'createTime',
width: 90,
align: 'center'
}, {
title: '结算类型',
key: 'clearingType',
width: 90,
align: 'center'
}, {
title: '商家收款账户',
key: 'targetAccount',
width: 90,
align: 'center'
}, {
title: '申请金额(元)',
key: 'applyAmount',
width: 90,
align: 'center'
}, {
title: '服务费(元)',
key: 'serviceAmount',
width: 90,
align: 'center'
}, {
title: '成功金额(元)',
}, {
title: '提现状态',
key: 'status',
align: 'center',
render: (h, params) => {
const row = params.row;
const as = row.status;
const asText = as === 2 ? `${withdrawStatus[row.status]}(${row.rejectReason})` : withdrawStatus[as];
ow.lineIndex = params.index;
return (
<p class={{'high-light': as === 2}}>{asText}</p>
);
},
className: 'status-column'
}, {
title: '业务单据号',
key: 'statementSn',
width: 90,
align: 'center'
}, {
title: '说明',
}, {
title: '操作人',
key: 'applyPid',
width: 90,
align: 'center'
}, {
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 class="cell-action-row">
<i-button type="primary" size="small"
onClick={() => this.getInfoById(row.id)}>结算明细</i-button>
</div>
</div>
);
},
className: 'action-column'
}
],
tableData: [],
pageData: {
total: 0,
current: 1,
pageSize: 20
},
filters: {
dateRange: {
label: '起止日期',
model: '',
labelSpan: 8
},
beginTime: '',
endTime: '',
timeFlag: {
label: '时间标志',
model: '',
options: [
{
value: 1,
label: '今天',
},{
value: 2,
label: '昨天',
},{
value: 3,
label: '近7天',
},{
value: 4,
label: '近30天',
}
]
},
withdrawStatus: {
label: '提现状态',
model: '',
labelSpan: 6,
fieldSpan: 18,
options: [
{
value: 0,
label: '提现中',
},
{
value: 1,
label: '提现成功',
},
{
value: 2,
label: '提现失败',
}
]
},
statementSn: {
label: '业务单据号',
model: '',
labelSpan: 6,
fieldSpan: 18
},
targetAccount: {
label: '提现账户',
model: '',
options: [
{
value: 0,
label: 'abcxxx@ert.com',
},
{
value: 1,
label: 'hjkxxx@ihi.com',
}
]
}
}
}
};
... ...
<template>
<div class="stat-shop">
<layout-body>
<p slot="title">资金操作明细</p>
<layout-filter class="box-filter" :inline="true" :col="1">
<filter-item :label="filters.dateRange.label" >
<Date-picker type="datetimerange"
:placeholder="filters.dateRange.label"
@on-change="dateRange"
v-model="filters.dateRange.model"
format="yyyy-MM-dd">
</Date-picker>
<div class="quick">
<a href="javascript:;" @click="() => {changeLimit(0)}">今日</a>
<a href="javascript:;" @click="() => {changeLimit(1)}">昨天</a>
<a href="javascript:;" @click="() => {changeLimit(7)}">近7天</a>
<a href="javascript:;" @click="() => {changeLimit(30)}">近30天</a>
</div>
</filter-item>
<filter-item>
<div class="select-container">
<Select v-model.trim="filters.withdrawStatus.model" :placeholder="filters.withdrawStatus.label" style="width: 200px;">
<Option v-for="option in filters.withdrawStatus.options"
:value="option.value" :key="option.value">{{option.label}}</Option>
</Select>
</div>
<div class="select-container">
<Input v-model.trim="filters.statementSn.model" :placeholder="filters.statementSn.label" :maxlength="20"></Input>
</div>
<!-- <div class="select-container">-->
<!-- <Select v-model.trim="filters.targetAccount.model" :placeholder="filters.targetAccount.label" style="width: 200px;">-->
<!-- <Option v-for="option in filters.targetAccount.options"-->
<!-- :value="option.value" :key="option.value">{{option.label}}</Option>-->
<!-- </Select>-->
<!-- </div>-->
<Poptip trigger="hover" placement="bottom-end">
<Button type="primary" @click="list">查询</Button>
<Button type="primary" @click="reset">全部</Button>
<Button type="warning" @click="exportFile">导出</Button>
</Poptip>
</filter-item>
</layout-filter>
<layout-list>
<Table border :columns="tableCols" :data="tableData"></Table>
<Page :total="pageData.total" :current="pageData.current"
@on-change="pageChange" :page-size="pageData.pageSize" show-total></Page>
</layout-list>
</layout-body>
</div>
</template>
<script>
import moment from "moment";
import withdraw from './store/withdraw';
import FinanceService from 'services/finance/finance-service';
import _ from "lodash";
export default {
data() {
return withdraw.call(this);
},
created() {
this.financeService = new FinanceService();
},
mounted() {
this.loadData();
},
watch: {
date() {
this.loadData();
},
day(newDay) {
let curDay = moment().format('YYYY-MM-DD');
if (newDay === this.beginTime || !newDay) {
return;
}
this.dateRange = newDay !== this.curDay ? [newDay, curDay] : [newDay, newDay];
},
dateRange(newDate) {
this.beginTime = moment(Array.isArray(newDate) ? newDate[0] : newDate).format('YYYY-MM-DD');
this.endTime = moment(Array.isArray(newDate) ? newDate[1] : newDate).format('YYYY-MM-DD');
this.day = this.beginTime === this.endTime === this.today ? '' : this.beginTime;
this.pageData.current = 1;
this.list();
},
},
methods: {
loadData() {
this.list();
},
changeLimit(limit) {
if(limit > 1) {
this.dateRange = [this[`day${limit}`], this.today];
}else if(limit===1){
this.dateRange = [this.yesterday, this.today];
}else{
this.dateRange = [this.today, this.today];
}
this.pageData.current = 1;
},
pageChange() {
this.pageData.current = page;
this.list();
},
filtersParams() {
let params = {};
let fts = this.filters;
let withdrawStatus = fts.withdrawStatus.model,
statementSn = fts.statementSn.model === '' || fts.brand.model === null ?
null : fts.statementSn.model;
let pageNo = this.pageData.current;
let pageSize = this.pageData.pageSize;
if(this.filters.withdrawStatus.model){
if (this.isNumber(this.filters.withdrawStatus.mode)) {
params.withdrawStatus = this.filters.withdrawStatus.model;
}
}
if(this.filters.statementSn.model){
if (this.isString(this.filters.statementSn.mode)) {
params.statementSn = this.filters.statementSn.model;
}
}
params.pageSize = this.pageData.pageSize;
params.pageNo = this.pageData.current;
return Promise.resolve({
params,
withdrawStatus,
statementSn,
pageNo,
pageSize
});
},
list() {
this.$Loading.start();
return this.filtersParams().then((params) => {
let filter = {
beginTime: this.beginDate,
endTime: this.endDate,
pageNo: params.pageNo,
};
if (this.withdrawStatus && this.withdrawStatus !== '-1') {
filter = Object.assign({}, filter, {withdrawStatus: this.withdrawStatus});
}
return this.FinanceService.shopWithdrawList(filter);
}).then(result => {
if (!result.data) {
result.data = {
pageNo: 1,
pageSize: 1,
totalCount: 1,
totalPage: 1,
records: []
}
}
this.pageData.total = result.data.totalCount;
this.pageData.current = result.data.pageNo;
this.tableData = result.data.records;
this.$Loading.finish();
}).catch(() => {
this.$Loading.finish();
});
},
reset() {
this.filters.withdrawStatus.model = null;
this.filters.statementSn.model = null;
this.filters.timeFlag.model = null;
this.filters.beginTime.model = null;
this.filters.endTime.model = null;
this.pageData.pageNo = 1;
this.pageData.total = 0;
this.list();
},
exportFile() {
let param = {};
param.beginTime = this.beginTime;
param.endTime = this.endTime;
// param.timeFlag = '1,2,3,4';
if (this.withdrawStatus && this.withdrawStatus !== '0') {
param.withdrawStatus = this.withdrawStatus;
}
const href = '/Api/erp/exportShopWithdrawList?queryConf=' +
JSON.stringify(param);
window.open(href, '_blank');
},
getDetailById() {
}
}
};
</script>
<style lang="scss">
.stat-shop {
.ivu-tabs-tabpane {
height: 400px;
position: relative;
}
}
.layout-container {
min-height: 200px;
margin: 15px;
overflow: hidden;
background: #fff;
border-radius: 4px;
.layout-filter .line {
border-top: none;
margin-bottom: 0;
}
}
.shop-card {
margin-top: 10px;
margin-bottom: 10px;
}
.box-title {
font-weight: 700;
color: #495060;
font-size: 16px;
line-height: 22px;
margin: 5px;
&:before {
content: " ";
display: inline-block;
width: 5px;
margin-right: 2px;
height: 22px;
vertical-align: top;
background-color: #999;
}
}
.box-item {
width: 90%;
height: 50px;
padding: 0 0 0 15px;
line-height: 50px;
font-size: 14px;
overflow: hidden;
border-radius: 5px;
color: #fff;
margin-bottom: 10px;
.box-item-label {
display: inline-block;
min-width: 75px;
vertical-align: top;
font-weight: normal;
}
.box-item-value {
font-size: 20px;
font-weight: 600;
}
i {
display: inline-block;
width: 20px;
height: 20px;
font-size: 22px;
text-align: center;
margin-top: -7px;
vertical-align: middle;
margin-right: 3px;
}
}
.box-filter {
.ivu-date-picker {
margin-left: 0;
width: 220px !important;
}
.quick {
display: inline-block;
margin-left: 20px;
margin-right: 50px;
a {
margin-right: 5px;
}
}
.select-container {
display: inline-block;
width: 220px;
}
}
.ivu-table-cell {
padding-left: 6px;
padding-right: 6px;
}
</style>
... ...
... ... @@ -8,6 +8,9 @@ const apiUrl = {
exportBalanceList: '/erp/exportBalanceList',
balanceDetailSum: '/erp/balanceDetailSum',
settlementListSum: '/erp/settlementListSum',
shopWithdrawList: '/erp/shopWithdrawList',
shopWithdrawApply: '/erp/shopWithdrawApply',
shopWithdrawAccountList: '/erp/shopWithdrawAccountList',
};
class FinanceService extends Service {
... ... @@ -65,10 +68,48 @@ class FinanceService extends Service {
settlementListSum(params) {
return this.post(apiUrl.settlementListSum, params);
}
/**
* 提现申请管理-资金操作明细列表
* @param params
* @returns {Promise<unknown>}
*/
shopWithdrawList(params) {
return this.get(apiUrl.shopWithdrawList, params);
}
/**
* 提现申请管理-资金操作明细-提现明细ß
* @param params
* @returns {Promise<unknown>}
*/
shopWithdrawApplyGet(params) {
return this.get(apiUrl.shopWithdrawApply, params);
}
/**
* 提现申请管理-申请提现
* @param params
* @returns {Promise<unknown>}
*/
shopWithdrawApplyPost(params) {
return this.post(apiUrl.shopWithdrawApply, params);
}
/**
* 账户资金-账务明细
* @param params
* @returns {Promise<unknown>}
*/
shopWithdrawAccountList(params){
return this.post(apiUrl.shopWithdrawAccountList, params);
}
}
FinanceService.exportBalanceList = '/Api/erp/exportBalanceList'; // 导出对账单列表, 结算单列表
FinanceService.exportBalanceDetail = '/Api/erp/exportBalanceDetail'; // 导出对账单详情
FinanceService.exportSettlementDetail = '/Api/erp/exportSettlementDetail'; // 导出结算单详情
FinanceService.exportInventory = '/Api/erp/exportInventoryLedgerList'; // 导出结算单库存
FinanceService.exportShopWithdrawList = '/Api/erp/exportShopWithdrawList'; // 导出结算单库存
export default FinanceService;
... ...
... ... @@ -91,6 +91,13 @@ const domainApis = {
exportFavoriteClearingList: '/erp-gateway-web/export/favoriteClearingList',
exportFavoriteClearingDetail: '/erp-gateway-web/export/favoriteClearingDetail',
exportFavoriteBalanceDetail: '/erp-gateway-web/export/exportFavoriteBalanceDetail',
//提现申请管理
shopWithdrawList: '/erp-gateway-web/withdraw/list', //资金操作明细列表
shopWithdrawApply: '/erp-gateway-web/withdraw/apply', //资金操作明细-提现明细ß
//账户资金
shopWithdrawAccountList: '/erp-gateway-web/shop/account/list', //账务明细
},
platform: {
queryShopsByAdminPid: '/SellerShopController/queryShopsByAdminPid',
... ...