From 4a917cb7e7be67d5f10e7c0d852efe3865f3dc59 Mon Sep 17 00:00:00 2001 From: wangdong <1551135706@qq.com> Date: Thu, 19 Sep 2024 18:10:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E8=AE=A2=E5=8D=95=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E5=92=8C=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user/recharge.js | 22 +++- src/config/router.config.js | 5 + src/views/user/recharge/AuditForm.vue | 135 ++++++++++++++++++++ src/views/user/recharge/Detail.vue | 170 ++++++++++++++++++++++++++ src/views/user/recharge/Index.vue | 46 ++++++- 5 files changed, 372 insertions(+), 6 deletions(-) create mode 100644 src/views/user/recharge/AuditForm.vue create mode 100644 src/views/user/recharge/Detail.vue diff --git a/src/api/user/recharge.js b/src/api/user/recharge.js index 1f09d00..8345601 100644 --- a/src/api/user/recharge.js +++ b/src/api/user/recharge.js @@ -2,7 +2,9 @@ import { axios } from '@/utils/request' // api接口列表 const api = { - order: '/user.recharge/order' + order: '/user.recharge/order', + detail: '/user.recharge/detail', + audit: '/user.recharge/audit' } // 列表记录 @@ -13,3 +15,21 @@ export function order (params) { params }) } + +// 支付订单详情 +export function detail (params) { + return axios({ + url: api.detail, + method: 'get', + params + }) +} + +// 支付订单审核 +export function audit (data) { + return axios({ + url: api.audit, + method: 'post', + data + }) +} \ No newline at end of file diff --git a/src/config/router.config.js b/src/config/router.config.js index 7677ae4..8db990c 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -539,6 +539,11 @@ export const asyncRouterMap = [ component: () => import(/* webpackChunkName: "content" */ '@/views/user/recharge/Index'), meta: { title: '充值记录', keepAlive: false, permission: ['/user/recharge/index'] }, }, + { + path: '/user/recharge/detail', + component: () => import(/* webpackChunkName: "content" */ '@/views/user/recharge/Detail'), + meta: { title: '充值详情', keepAlive: false, permission: ['/user/recharge/detail'] }, + }, { path: '/user/balance/index', component: () => import(/* webpackChunkName: "content" */ '@/views/user/balance/Index'), diff --git a/src/views/user/recharge/AuditForm.vue b/src/views/user/recharge/AuditForm.vue new file mode 100644 index 0000000..d469127 --- /dev/null +++ b/src/views/user/recharge/AuditForm.vue @@ -0,0 +1,135 @@ + + + + diff --git a/src/views/user/recharge/Detail.vue b/src/views/user/recharge/Detail.vue new file mode 100644 index 0000000..9aa3c59 --- /dev/null +++ b/src/views/user/recharge/Detail.vue @@ -0,0 +1,170 @@ + + + + diff --git a/src/views/user/recharge/Index.vue b/src/views/user/recharge/Index.vue index 5a86db0..e97464e 100644 --- a/src/views/user/recharge/Index.vue +++ b/src/views/user/recharge/Index.vue @@ -41,6 +41,7 @@ :columns="columns" :data="loadData" :pagination="pagination" + :scroll="{ x: 1450 }" > @@ -56,10 +57,26 @@ {{ RechargeTypeEnum[text].name }} - - {{ text == 20 ? '已支付' : '待支付' }} + + {{ text == 20 ? '已支付' : (item.audit_status ? '已拒绝' : '待支付') }} + + + + {{ text == 10 ? '审核通过' : (text == 20 ? '拒绝' : '') }} + + + 详情 + 审核 + @@ -68,12 +85,14 @@ import * as Api from '@/api/user/recharge' import { STable, UserItem } from '@/components/Table' import PayStatusEnum from '@/common/enum/recharge/order/PayStatus' import RechargeTypeEnum from '@/common/enum/recharge/order/RechargeType' +import AuditForm from './AuditForm.vue'; export default { name: 'Index', components: { STable, - UserItem + UserItem, + AuditForm }, data () { return { @@ -95,10 +114,12 @@ export default { { title: '会员信息', dataIndex: 'user', + width: '250px', scopedSlots: { customRender: 'user' } }, { title: '订单号', + width: '150px', dataIndex: 'order_no' }, { @@ -124,13 +145,25 @@ export default { dataIndex: 'pay_status', scopedSlots: { customRender: 'pay_status' } }, + { + title: '审核状态', + dataIndex: 'audit_status', + scopedSlots: { customRender: 'audit_status' } + }, { title: '付款时间', + width: '150px', dataIndex: 'pay_time' }, { title: '创建时间', + width: '150px', dataIndex: 'create_time' + }, + { + title: '操作', + dataIndex: 'actions', + scopedSlots: { customRender: 'actions' } } ], // 加载数据方法 必须为 Promise 对象 @@ -164,8 +197,11 @@ export default { this.handleRefresh(true) } }) - } - + }, + // 审核 + handleAudit(record) { + this.$refs.AuditForm.show(record) + }, } }