Commit e8e95736 by gonglei

加入框架代码

1 parent c59ab4cb
...@@ -4,6 +4,7 @@ import com.github.binarywang.wxpay.exception.WxPayException; ...@@ -4,6 +4,7 @@ import com.github.binarywang.wxpay.exception.WxPayException;
import com.glsx.usedcar.module.account.entity.Account; import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.finance.entity.Recharge; import com.glsx.usedcar.module.finance.entity.Recharge;
import com.glsx.usedcar.module.finance.entity.Recharge_; import com.glsx.usedcar.module.finance.entity.Recharge_;
import com.glsx.usedcar.module.finance.entity.Refund;
import com.glsx.usedcar.module.finance.entity.Withdraw; import com.glsx.usedcar.module.finance.entity.Withdraw;
import com.glsx.usedcar.module.finance.service.TransactionService; import com.glsx.usedcar.module.finance.service.TransactionService;
import com.glsx.usedcar.module.meta.AuditState; import com.glsx.usedcar.module.meta.AuditState;
...@@ -48,11 +49,15 @@ public class RechargeController { ...@@ -48,11 +49,15 @@ public class RechargeController {
// } // }
@GetMapping("getRechargeById") @GetMapping("getRechargeById")
public Recharge getRechargeById(@RequestParam int rechargeId) { public Recharge getRechargeById(@RequestParam int rechargeId) {
return transactionService.getRechargeById(rechargeId); return transactionService.getRechargeById(rechargeId);
} }
@GetMapping("getRefundsByRechargeId")
public List<Refund> getRefundsByRechargeId(@RequestParam int rechargeId) {
return transactionService.getRefundsByRechargeId(rechargeId);
}
} }
...@@ -1552,9 +1552,9 @@ ...@@ -1552,9 +1552,9 @@
}, },
{ {
"code": "finance_recharge", "code": "finance_recharge",
"name": "提现审核", "name": "微信支付流水",
"type": "MENU", "type": "MENU",
"enabled": false, "enabled": true,
"value": "/finance/recharge", "value": "/finance/recharge",
"children": [ "children": [
{ {
...@@ -1577,51 +1577,9 @@ ...@@ -1577,51 +1577,9 @@
}, },
{ {
"code": "recharge_4", "code": "recharge_4",
"name": "查看用户冻结明细", "name": "查看退款明细",
"type": "BUTTON",
"enabled": false
},
{
"code": "recharge_5",
"name": "执行提现初审(通过/驳回)",
"type": "BUTTON",
"enabled": true
},
{
"code": "recharge_6",
"name": "执行提现打款",
"type": "BUTTON", "type": "BUTTON",
"enabled": false "enabled": false
},
{
"code": "recharge_8",
"name": "查看数据统计概览",
"type": "BUTTON",
"enabled": true
},
{
"code": "recharge_9",
"name": "查看“全部”Tab",
"type": "BUTTON",
"enabled": true
},
{
"code": "recharge_10",
"name": "查看“已通过”Tab",
"type": "BUTTON",
"enabled": true
},
{
"code": "recharge_11",
"name": "查看“已驳回”Tab",
"type": "BUTTON",
"enabled": true
},
{
"code": "recharge_14",
"name": "导出提现审核记录",
"type": "BUTTON",
"enabled": true
} }
] ]
}, },
......
...@@ -19,6 +19,8 @@ public interface RefundDao extends BaseRepository<Refund, Long>, JpaSpecificatio ...@@ -19,6 +19,8 @@ public interface RefundDao extends BaseRepository<Refund, Long>, JpaSpecificatio
@EntityGraph(attributePaths = {"recharge"}) @EntityGraph(attributePaths = {"recharge"})
List<Refund> findByWithdraw_WithdrawIdOrderByRefundTimeAsc(int withdrawId); List<Refund> findByWithdraw_WithdrawIdOrderByRefundTimeAsc(int withdrawId);
List<Refund> findByRecharge_RechargeIdOrderByRefundTimeAsc(int rechargeId);
@Query("select sum(r.refundAmount) from Refund r where r.withdraw =?1 and r.refundSuccessTime is not null") @Query("select sum(r.refundAmount) from Refund r where r.withdraw =?1 and r.refundSuccessTime is not null")
Optional<Double> sumByWithdraw(Withdraw withdraw); Optional<Double> sumByWithdraw(Withdraw withdraw);
} }
...@@ -359,4 +359,8 @@ public class TransactionService extends AbstractAuctionService { ...@@ -359,4 +359,8 @@ public class TransactionService extends AbstractAuctionService {
return refundDao.findByWithdraw_WithdrawIdOrderByRefundTimeAsc(withdrawId); return refundDao.findByWithdraw_WithdrawIdOrderByRefundTimeAsc(withdrawId);
} }
public List<Refund> getRefundsByRechargeId(int rechargeId) {
return refundDao.findByRecharge_RechargeIdOrderByRefundTimeAsc(rechargeId);
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -18,6 +18,12 @@ export class RechargeController{ ...@@ -18,6 +18,12 @@ export class RechargeController{
/** /**
*/ */
static getRefundsByRechargeId(axios:AxiosStatic, rechargeId: number): Promise<AxiosResponse<Refund[]>> {
return axios.get('recharge/getRefundsByRechargeId', {params: {rechargeId: rechargeId}});
}
/**
*/
static pageRecharge(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Recharge>>> { static pageRecharge(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Recharge>>> {
return axios.post('recharge/pageRecharge', pagination); return axios.post('recharge/pageRecharge', pagination);
} }
......
<template> <template>
<a-alert type="info" :show-icon="true" :closable="false" message="请仔细核对收款账户信息,确保与申请人身份一致。">
</a-alert>
<a-descriptions :bordered="false" :column="3" size="small" v-if="recharge" class=" mt-16"> <a-descriptions :bordered="false" :column="3" size="small" v-if="recharge" class=" mt-16">
<template #title> <template #title>
<title-tip-icon></title-tip-icon> <title-tip-icon></title-tip-icon>
申请与账户信息 充值信息
</template> </template>
<a-descriptions-item label="流水号" name="name"> <a-descriptions-item label="流水号" name="name">
{{ recharge.outTradeNo }} {{ recharge.outTradeNo }}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="申请状态" name="auditState"> <a-descriptions-item label="充值用户" name="updateBy">
<audit-state-tag :audit-state="recharge.auditState"></audit-state-tag>
</a-descriptions-item>
<a-descriptions-item label="申请人" name="updateBy">
{{ recharge.account.accountName }} {{ recharge.account.accountName }}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="付款成功时间"> <a-descriptions-item label="付款成功时间">
{{ recharge.paymentTime }} {{ recharge.paymentTime }}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="审核时间" name="bankAccount"> <a-descriptions-item label="充值金额" name="amount">
{{ recharge.auditTime }}
</a-descriptions-item>
</a-descriptions>
<a-descriptions :bordered="false" :column="3" size="small" v-if="recharge" class="withdraw-view mt-16">
<template #title>
申请提现金额
</template>
<template #extra>
申请时间: {{ recharge.createTime }}
</template>
<a-descriptions-item label="申请提现金额" name="amount">
¥{{ recharge.amount }} ¥{{ recharge.amount }}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="剩余退款金额" name="amount">
¥{{ recharge.refundableAmount }}
</a-descriptions-item>
<a-descriptions-item label="账户余额" name="amount"> <a-descriptions-item label="账户余额" name="amount">
¥{{ recharge.account.surplus }} ¥{{ recharge.account.surplus }}
</a-descriptions-item> </a-descriptions-item>
</a-descriptions> </a-descriptions>
<a-descriptions :bordered="false" :column="3" size="small" v-if="recharge&&recharge.auditState==='REJECTED'">
<template #title>
<title-tip-icon></title-tip-icon>
驳回原因
</template>
<a-descriptions-item label="详细驳回原因" name="amount">
{{ recharge.rejectReason }}
</a-descriptions-item>
</a-descriptions>
<a-descriptions v-if="recharge&&recharge.auditState==='AUDITED'" :bordered="false" :column="3" size="small">
<template #title>
<title-tip-icon></title-tip-icon>
转账情况
</template>
<a-descriptions-item label="退款单号">
{{ recharge.outRefundNo }}
</a-descriptions-item>
<a-descriptions-item label="转账状态">
<a-tag v-if="recharge.refundState==='REFUNDED'" color="red">已退款</a-tag>
<a-tag v-if="recharge.refundState==='REFUNDING'" color="blue">退款中</a-tag>
<a-tag v-if="recharge.refundState==='UNREFUND'" color="green">未退款</a-tag>
</a-descriptions-item>
<a-descriptions-item v-if="recharge.rejectReason" label="驳回原因" :span="2">
{{ recharge.rejectReason ?? '-' }}
</a-descriptions-item>
<a-descriptions-item label="退款时间">
{{ recharge.refundTime }}
</a-descriptions-item>
<a-descriptions-item label="退款成功时间">
{{ recharge.refundSuccessTime }}
</a-descriptions-item>
<a-descriptions-item label="退款备注">
{{ recharge.auditRemark }}
</a-descriptions-item>
</a-descriptions>
<br/> <br/>
<title-divider title="审核记录"></title-divider> <title-divider title="退款记录"></title-divider>
<approve-history-timeline v-if="recharge" approve-type="WITHDRAW" :approve-id="recharge.rechargeId" :create-time="recharge.createTime" :starter="recharge.account.accountName"></approve-history-timeline> <a-table :columns="columns" :data-source="refunds" :pagination="false" size="small"></a-table>
<a-space :gap="8" v-if="recharge&&recharge.auditState==='UNAUDITED'">
<a-button type="primary" @click="editWithdraw('AUDITED')">审核通过</a-button>
<a-button type="default" @click="editWithdraw('REJECTED')">审核驳回</a-button>
<a-button type="default" @click="this.$goBack()">取消</a-button>
</a-space>
</template> </template>
<script lang="ts"> <script lang="ts">
import {Component, Vue} from "vue-facing-decorator"; import {Component, Prop, Vue} from "vue-facing-decorator";
import TitleDivider from "@/components/TitleDivider.vue"; import TitleDivider from "@/components/TitleDivider.vue";
import AuditStateTag from "@/views/common/AuditStateTag.vue"; import AuditStateTag from "@/views/common/AuditStateTag.vue";
import ApproveHistoryTimeline from "@/views/common/ApproveHistoryTimeline.vue"; import ApproveHistoryTimeline from "@/views/common/ApproveHistoryTimeline.vue";
...@@ -96,24 +41,39 @@ import {ModalService} from "@/components/ModalService"; ...@@ -96,24 +41,39 @@ import {ModalService} from "@/components/ModalService";
import {Recharge} from "lib/src/entity/finance/entity/Recharge"; import {Recharge} from "lib/src/entity/finance/entity/Recharge";
import {RechargeController} from "@/api/RechargeController"; import {RechargeController} from "@/api/RechargeController";
import RechargeForm from "@/views/finance/recharge/RechargeForm.vue"; import RechargeForm from "@/views/finance/recharge/RechargeForm.vue";
import {TableColumnsType} from "ant-design-vue";
import {Refund} from "lib/src/entity/finance/entity/Refund";
@Component({ @Component({
components: {TransferStateTag, TitleTipIcon, ApproveHistoryTimeline, AuditStateTag, TitleDivider} components: {TransferStateTag, TitleTipIcon, ApproveHistoryTimeline, AuditStateTag, TitleDivider}
}) })
export default class ViewRecharge extends Vue { export default class ViewRecharge extends Vue {
rechargeId: any; @Prop({required: true})
recharge: Recharge;
refunds: Refund[] = [];
columns: TableColumnsType = [
{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;
}
},
recharge: Recharge = null; {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 { created(): void {
this.rechargeId = Number(this.$route.query.rechargeId);
this.loadData(); this.loadData();
} }
loadData(): void { loadData(): void {
RechargeController.getRechargeById(this.axios, this.rechargeId).then(response => { RechargeController.getRefundsByRechargeId(this.axios, this.recharge.rechargeId).then(response => {
this.recharge = response.data; this.refunds = response.data;
}); });
} }
......
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<!-- 车况描述 --> <!-- 车况描述 -->
<view class="section-card"> <view class="section-card">
<view class="section-title">车辆描述</view> <view class="section-title">车况描述</view>
<view class="description-content"> <view class="description-content">
<text>{{ vehicle.historyCondition.conditionDescription }}</text> <text>{{ vehicle.historyCondition.conditionDescription }}</text>
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!