Commit 1814b11f by gonglei

加入框架代码

1 parent d2bd14f9
......@@ -312,7 +312,7 @@ public class TransactionService extends AbstractAuctionService {
Account account = recharge.getAccount();
account.setSurplus(account.getSurplus() - refundAmount);
recharge.setRefundableAmount(recharge.getRefundableAmount() - refundAmount);
Transaction transaction = new Transaction(account, "提现", Transaction.TransactionType.WITHDRAW, recharge.getAmount(), account.getSurplus());
Transaction transaction = new Transaction(account, "提现", Transaction.TransactionType.WITHDRAW, -refundAmount, account.getSurplus());
transactionDao.save(transaction);
}
}
......
......@@ -123,21 +123,33 @@ export default class ViewWithdraw extends Vue {
* 表格列配置
*/
columns: TableColumnsType = [
{title: '流水号', dataIndex: 'outTradeNo', key: 'outTradeNo', width: 150, resizable: true, ellipsis: true, sorter: true},
{title: '支付流水号', dataIndex: ['recharge', 'outTradeNo'], key: 'outTradeNo', width: 150, resizable: true, ellipsis: true, sorter: false},
{title: '微信支付订单号', dataIndex: ['recharge', 'transactionId'], key: 'transactionId', width: 170, resizable: true, ellipsis: true, sorter: false},
{
title: '申请提现金额', dataIndex: 'amount', key: 'amount', width: 120, align: 'right', resizable: true, ellipsis: true, sorter: true,
title: '支付金额', dataIndex: ['recharge', 'amount'], key: 'amount', width: 120, align: 'right', resizable: true, ellipsis: true, sorter: false,
customRender: ({text, record, index, column}) => {
return '¥' + text;
}
},
{title: '支付时间', dataIndex: 'paymentTime', key: 'paymentTime', align: 'center', width: 170, resizable: true, ellipsis: true, sorter: true},
{title: '审核时间', dataIndex: 'auditTime', key: 'auditTime', align: 'center', width: 170, resizable: true, ellipsis: true, sorter: true},
{title: '退款进度', dataIndex: 'refundState', key: 'refundState', align: 'center', fixed: 'right', width: 120, resizable: true, ellipsis: true, sorter: true},
{title: '审核状态', dataIndex: 'auditState', key: 'auditState', align: 'center', fixed: 'right', width: 100, resizable: true, ellipsis: true, sorter: true},
{title: '支付时间', dataIndex: ['recharge', 'paymentTime'], key: 'paymentTime', align: 'center', width: 170, resizable: true, ellipsis: true, sorter: false},
{title: '微信退款订单号', dataIndex: 'outRefundNo', key: 'outRefundNo', align: 'left', width: 170, resizable: true, ellipsis: true, sorter: false},
{
title: '退款金额', dataIndex: 'refundAmount', key: 'refundAmount', align: 'right', width: 120, resizable: true, ellipsis: true, sorter: false,
customRender: ({text, record, index, column}) => {
return '¥' + text;
}
},
{title: '退款时间', dataIndex: 'refundTime', key: 'refundTime', align: 'center', width: 170, resizable: true, ellipsis: true, sorter: false},
{title: '退款成功时间', dataIndex: 'refundSuccessTime', key: 'refundSuccessTime', align: 'center', width: 170, resizable: true, ellipsis: true, sorter: false},
];
created(): void {
this.withdrawId = Number(this.$route.query.withdrawId);
this.loadData();
}
loadData(): void {
WithdrawController.getWithdrawById(this.axios, this.withdrawId).then(response => {
this.withdraw = response.data;
});
......@@ -159,6 +171,7 @@ export default class ViewWithdraw extends Vue {
emits: {
handleOk: (e) => {
modal.destroy();
this.loadData();
}
},
});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!