Authored by jiran.zhao

'一件代发'

<template>
<layout-body>
<layout-filter>
<filter-item>
<div class="detail">
<div class="detail-header">
<p class="bold-title">状态:{{ this.data.status }}</p>
<p class="no-title">提现发起后,正常xx-xx工作日到款</p>
</div>
<div class="detail-list">
<p>
<span class="bold-title">状态:提现成功</span><br /><span class="no">交易成功时间:2020-03-31 23:43:21</span>
<span class="no-title">创建时间:{{ this.data.createTime | timeFormat }}</span>
<span class="no-title">店铺:{{ this.data.shopName }}</span>
<span class="no-title">供应商: {{ this.data.supplierName }}</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 class="table-body">
<tr v-for="(row, outerIndex) in dataArray" :key="outerIndex" class="tr-body">
<!-- flex: 0 0 x% 自适应布局,每一大列的宽度按百分比显示 -->
<div
v-for="(col, innerIndex) in row"
:key="innerIndex"
class="td-box"
:style="{ flex: '0 0 ' + 100 / row.length + '%' }"
>
<td class="td-key">{{ col.key }}</td>
<td class="td-value">{{ col.value }}</td>
</div>
</tr>
</table>
</layout-list>
<layout-filter>
<filter-item>
<table border class="table-body">
<tr>
<td>业务单据号</td>
<td>{{ this.data.statementSn }}</td>
<td>类型</td>
<td>{{ this.data.type }}</td>
</tr>
<tr>
<td>收款账户</td>
<td>{{ this.data.targetAccount }}</td>
<td>付款账户</td>
<td>有货商贸有限公司(yh@yoho.cn){{ this.data.targetAccount }}</td>
</tr>
<tr>
<td>申请金额(元)</td>
<td>{{ this.data.applyAmount }}</td>
<td>服务费</td>
<td>{{ this.data.serviceAmount }}</td>
</tr>
<tr>
<td>成功金额(元)</td>
<td>{{ this.data.tradeSuccessAmount }}</td>
<td>操作人</td>
<td>{{ this.data.applyPid }}</td>
</tr>
<tr>
<td>说明</td>
<td>{{ this.data.remarks }}</td>
<td>失败原因</td>
<td>{{ this.data.errorReason }}</td>
</tr>
<tr>
<td>备注</td>
<td>{{ this.data.remarks }}</td>
<td></td>
<td></td>
</tr>
</table>
</div>
<div class="detail-footer">
<i-button type="primary" @click="backList">返回列表</i-button>
<i-button type="ghost" @click="handleTeacherData">测试数据展示</i-button>
</filter-item>
</layout-filter>
</div>
</div>
</layout-body>
</template>
<script>
import _ from 'lodash';
import { Detail } from './store';
import FinanceService from 'services/finance/finance-service';
export default {
props: {
dataArray: {
type: Array,
require: true,
},
},
name: 'Detail',
props: ['id'],
data() {
return Detail.call(this);
return {
data: [],
};
},
created() {
this.financeService = new FinanceService();
},
mounted() {
this.getDetail();
},
methods: {
backList() {
this.$router.push({ name: 'finance.withdraw.withdrawlist' });
},
handleTeacherData() {
// if (!teacher) {
// }
const 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);
getDetail() {
return this.financeService.shopWithdrawApplyById(this.$route.params).then(result => {
if (result.code === 200) {
this.data = result.data;
this.$emit('on-change', this.data);
}
});
},
refresh() {
this.getDetail();
},
},
};
</script>
<style lang="scss" scoped>
.bold-title {
font-size: 20px;
font-weight: bold;
}
.table-body {
width: 100%;
border: 1px solid #333333;
<style lang="scss">
.detail {
margin-bottom: 20px;
.tr-body {
display: flex;
border-bottom: 1px solid #333333;
&:last-child {
border-bottom: 0;
.detail-header {
.bold-title {
font-size: 25px;
}
.td-box {
display: flex;
border-left: 1px solid #333333;
.no-title {
font-size: 12px;
}
}
&:first-child {
border-left: 0;
}
.detail-list {
margin-top: 20px;
.td-key {
width: 120px;
padding: 10px;
line-height: 20px;
text-align: center;
background-color: #999999;
border-right: 1px solid #444444;
}
table,
tr,
td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.td-value {
flex: 1 0;
line-height: 20px;
padding: 10px 20px;
}
table {
font-size: 12px;
border-collapse: collapse;
border-spacing: 0;
empty-cells: show;
}
}
.detail-footer {
margin-top: 20px;
}
}
</style>
... ...
export default function() {
let table = []; // 大表格
return table;
// let table = []; // 大表格
// return table;
}
... ...
... ... @@ -22,24 +22,6 @@ export default function() {
timeFlag: {
label: '时间标志',
model: '',
options: [
{
value: 1,
label: '今天',
},
{
value: 2,
label: '昨天',
},
{
value: 3,
label: '近7天',
},
{
value: 4,
label: '近30天',
},
],
},
withdrawStatus: {
label: '提现状态',
... ... @@ -63,6 +45,10 @@ export default function() {
label: '业务单据号',
model: '',
},
targetAccount: {
label: '提现账户',
model: '',
},
pageNo: 1,
pageSize: 20,
},
... ... @@ -87,8 +73,8 @@ export default function() {
},
},
{
title: '结算类型',
key: 'clearingType',
title: '商家收款账户',
key: 'targetAccount',
align: 'center',
},
{
... ... @@ -113,15 +99,15 @@ export default function() {
const as = row.status;
const asText = as === 2 ? `${withdrawStatus[row.status]}(${row.rejectReason})` : withdrawStatus[as];
row.lineIndex = params.index;
return (<p class={{ 'high-light': as === 2}}>{ asText }</p>);
return <p class={{ 'high-light': as === 2 }}>{asText}</p>;
},
className: 'status-column',
},
{
title: '业务单据号',
key: 'statementSn',
align: 'center',
},
// {
// title: '业务单据号',
// key: 'statementSn',
// align: 'center',
// },
{
title: '说明',
key: 'remarks',
... ... @@ -139,9 +125,13 @@ export default function() {
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>
<div>
<div class="cell-action-row">
<i-button type="primary" size="small" onClick={() => this.getDetailById(row.id)}>
提现明细
</i-button>
</div>
</div>
);
},
className: 'action-column',
... ... @@ -151,7 +141,6 @@ export default function() {
pageData: {
total: 0,
current: 1,
pageSize: 10,
},
};
}
... ...
<template>
<layout-body>
<p slot="title">资金操作明细</p>
<layout-filter ref="filter" :model="filters">
<filter-item label="起止时间">
<Date-picker
v-model="filters.createTime.model"
type="datetimerange"
placeholder="选择日期和时间"
@on-change="createTimeChange"
></Date-picker>
</filter-item>
<filter-item>
<RadioGroup v-model.trim="filters.timeFlag.model" type="button">
<Radio label="1">今天</Radio>
<Radio label="2">昨天</Radio>
<Radio label="3">最近7天</Radio>
<Radio label="4">最近30天</Radio>
</RadioGroup>
</filter-item>
<filter-item> </filter-item>
</layout-filter>
<layout-list>
<Table border :columns="tableCols" :data="tableData"></Table>
<Page
:total="pageData.total"
:current="pageData.current"
:page-size="pageData.pageSize"
show-total
@on-change="pageChange"
></Page>
</layout-list>
</layout-body>
<div class="stat-shop">
<layout-body>
<p slot="title">资金操作明细</p>
<layout-filter ref="filter" :model="filters" class="box-filter" :inline="true" :col="1">
<filter-item label="起止时间">
<Date-picker
v-model="filters.createTime.model"
type="datetimerange"
format="yyyy-MM-dd"
placeholder="选择日期和时间"
@on-change="createTimeChange"
></Date-picker>
<div class="quick">
<a
href="javascript:;"
@click="
() => {
timeFlag(1);
}
"
>今天</a
>
<a
href="javascript:;"
@click="
() => {
timeFlag(2);
}
"
>昨天</a
>
<a
href="javascript:;"
@click="
() => {
timeFlag(3);
}
"
>最近7天</a
>
<a
href="javascript:;"
@click="
() => {
timeFlag(4);
}
"
>最近30天</a
>
</div>
</filter-item>
<filter-item>
<div class="select-container">
<Select v-model.trim="filters.withdrawStatus.model" :placeholder="filters.withdrawStatus.label">
<Option v-for="option in filters.withdrawStatus.options" :key="option.value" :value="option.value">{{
option.label
}}</Option>
</Select>
</div>
<div class="select-container">
<Input v-model.trim="filters.statementSn.model" :placeholder="filters.statementSn.label" />
</div>
<div class="select-container">
<Input v-model.trim="filters.targetAccount.model" :placeholder="filters.targetAccount.label" />
</div>
<div class="select-container">
<Button type="primary" @click="search">查询</Button>
<Button type="primary" @click="reset">全部</Button>
<Button>导出</Button>
</div>
</filter-item>
</layout-filter>
<layout-list>
<Table border :columns="tableCols" :data="tableData"></Table>
<Page
:total="pageData.total"
:current="pageData.current"
:page-size="pageData.pageSize"
show-total
@on-change="pageChange"
></Page>
</layout-list>
</layout-body>
</div>
</template>
<script>
import _ from 'lodash';
... ... @@ -44,13 +96,13 @@ export default {
},
created() {
this.financeService = new FinanceService();
this.filterSearch();
this.search();
},
methods: {
filterValues() {
const values = {
page: 1,
size: 20,
pageNo: 1,
pageSize: 20,
};
const fields = this.filters;
const keysMap = {
... ... @@ -68,22 +120,44 @@ export default {
}
return values;
},
filterSearch() {
search() {
let params = {};
this.enableFilter = true;
params = this.filterValues();
this.list(params);
this.pageData.current = 1;
},
reset() {
let params = {};
this.enableFilter = false;
params = this.filterValues();
this.list(params);
this.pageData.current = 1;
},
timeFlag(day) {
this.filters.timeFlag.model = day;
let params = {};
this.enableFilter = true;
params = this.filterValues();
params.timeFlag = day;
this.list(params);
this.pageData.current = 1;
},
createTimeChange(time) {
if (!_.isArray(time)) {
time = time.split(' - ');
}
if ((time[0] + '').length) {
this.filters.beginTime.model = +moment(time[0]).format('X');
this.filters.endTime.model = +moment(time[1]).format('X');
this.filters.beginTime.model = moment(time[0]).format('YYYY-MM-DD');
this.filters.endTime.model = moment(time[1]).format('YYYY-MM-DD');
}
},
pageChange(page) {
const params = this.filterValues();
params.pageNo = page;
this.pageData.current = page;
this.list(params);
},
list(params) {
this.financeService.shopWithdrawList(params).then(ret => {
this.tableData = _.get(ret, 'data.records', []);
... ... @@ -91,13 +165,130 @@ export default {
this.pageData.current = _.get(ret, 'data.pageNo', 1);
});
},
pageChange(page) {
const params = this.filterValues();
params.page = page;
this.pageData.current = page;
this.list(params);
getDetailById(id) {
this.$router.push({
name: 'finance.withdraw.detail',
params: {
id,
},
});
},
},
};
</script>
<style lang="scss"></style>
<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: 280px;
}
}
.ivu-table-cell {
padding-left: 6px;
padding-right: 6px;
}
.action-column {
.cell-action-row {
margin-top: 10px;
&:last-child {
margin-bottom: 10px;
}
}
}
</style>
... ...
... ... @@ -9,6 +9,7 @@ const apiUrl = {
balanceDetailSum: '/erp/balanceDetailSum',
settlementListSum: '/erp/settlementListSum',
shopWithdrawList: '/erp2/shopWithdrawList',
shopWithdrawApplyById: '/erp2/shopWithdrawApplyById',
shopWithdrawApply: '/erp2/shopWithdrawApply',
shopWithdrawAccountList: '/erp2/shopWithdrawAccountList',
shopWithdrawServiceList: '/erp2/shopWithdrawServiceList',
... ... @@ -76,7 +77,7 @@ class FinanceService extends Service {
* @returns {Promise<unknown>}
*/
shopWithdrawList(params) {
return this.get(apiUrl.shopWithdrawList, params);
return this.post(apiUrl.shopWithdrawList, params);
}
/**
... ... @@ -84,8 +85,8 @@ class FinanceService extends Service {
* @param params
* @returns {Promise<unknown>}
*/
shopWithdrawApplyGet(params) {
return this.get(apiUrl.shopWithdrawApply, params);
shopWithdrawApplyById(params) {
return this.post(apiUrl.shopWithdrawApplyById, params);
}
/**
... ... @@ -93,7 +94,7 @@ class FinanceService extends Service {
* @param params
* @returns {Promise<unknown>}
*/
shopWithdrawApplyPost(params) {
shopWithdrawApply(params) {
return this.post(apiUrl.shopWithdrawApply, params);
}
... ... @@ -103,7 +104,7 @@ class FinanceService extends Service {
* @returns {Promise<unknown>}
*/
shopWithdrawAccountList(params) {
return this.get(apiUrl.shopWithdrawAccountList, params);
return this.post(apiUrl.shopWithdrawAccountList, params);
}
/**
... ... @@ -112,7 +113,7 @@ class FinanceService extends Service {
* @returns {Promise<unknown>}
*/
shopWithdrawServiceList(params) {
return this.get(apiUrl.shopWithdrawServiceList, params);
return this.post(apiUrl.shopWithdrawServiceList, params);
}
}
... ...
... ... @@ -5,7 +5,8 @@ const domainApis = {
erp2: {
// 提现申请管理
shopWithdrawList: '/erp-gateway-web/shop/withdraw/list', //资金操作明细列表
shopWithdrawApply: '/erp-gateway-web/shop/withdraw/apply', //资金操作明细-提现明细ß
shopWithdrawApplyById: '/erp-gateway-web/shop/withdraw/applyById', //资金操作明细-提现明细
shopWithdrawApply: '/erp-gateway-web/shop/withdraw/apply', //资金操作明细-提现明细
shopWithdrawAccountList: '/erp-gateway-web/shop/account/list', //账户资金-账务明细
shopWithdrawServiceList: '/erp-gateway-web/shop/withdraw/service/list', //服务费账单
},
... ... @@ -101,7 +102,8 @@ const domainApis = {
// 提现申请管理
shopWithdrawList: '/erp-gateway-web/shop/withdraw/list', //资金操作明细列表
shopWithdrawApply: '/erp-gateway-web/shop/withdraw/apply', //资金操作明细-提现明细ß
shopWithdrawApplyById: '/erp-gateway-web/shop/withdraw/applyById', //资金操作明细-提现明细
shopWithdrawApply: '/erp-gateway-web/shop/withdraw/apply', //资金操作明细-提现明细
shopWithdrawAccountList: '/erp-gateway-web/shop/account/list', //账户资金-账务明细
shopWithdrawServiceList: '/erp-gateway-web/shop/withdraw/service/list', //服务费账单
},
... ... @@ -175,7 +177,7 @@ const domains = {
platform: 'http://192.168.102.202:8088/platform',
shop: 'http://192.168.102.211:30016'*/
erp2: 'http://10.10.1.108:80',
erp: 'http://192.168.103.48:9098',
erp: 'http://192.168.102.47:9098',
platform: 'http://java-yoho-platform.test3.ingress.dev.yohocorp.com/platform',
shop: 'http://192.168.102.211:30016',
};
... ...