Skip to content

Commit aec024e

Browse files
committed
feat:【MALL 商城】佣金提现,优化字段,以及支持更多 API 自动打款
1 parent 11b3de0 commit aec024e

File tree

5 files changed

+30
-24
lines changed

5 files changed

+30
-24
lines changed

src/api/mall/trade/brokerage/withdraw/index.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@ export interface BrokerageWithdrawVO {
77
feePrice: number
88
totalPrice: number
99
type: number
10-
name: string
11-
accountNo: string
10+
userName: string
11+
userAccount: string
1212
bankName: string
1313
bankAddress: string
14-
accountQrCodeUrl: string
14+
qrCodeUrl: string
1515
status: number
1616
auditReason: string
1717
auditTime: Date
1818
remark: string
19+
payTransferId?: number
20+
transferChannelCode?: string
21+
transferTime?: Date
22+
transferErrorMsg?: string
1923
}
2024

2125
// 查询佣金提现列表

src/api/pay/demo/index.ts renamed to src/api/pay/demo/order/index.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ export function createDemoOrder(data: DemoOrderVO) {
1313
})
1414
}
1515

16-
// 获得示例订单
17-
export function getDemoOrder(id: number) {
18-
return request.get({
19-
url: '/pay/demo-order/get?id=' + id
20-
})
21-
}
22-
2316
// 获得示例订单分页
2417
export function getDemoOrderPage(query: PageParam) {
2518
return request.get({
@@ -29,7 +22,7 @@ export function getDemoOrderPage(query: PageParam) {
2922
}
3023

3124
// 退款示例订单
32-
export function refundDemoOrder(id) {
25+
export function refundDemoOrder(id: number) {
3326
return request.put({
3427
url: '/pay/demo-order/refund?id=' + id
3528
})

src/views/mall/trade/brokerage/withdraw/index.vue

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,24 @@
3434
/>
3535
</el-select>
3636
</el-form-item>
37-
<el-form-item label="账号" prop="accountNo">
37+
<el-form-item label="账号" prop="userAccount">
3838
<el-input
39-
v-model="queryParams.accountNo"
39+
v-model="queryParams.userAccount"
4040
placeholder="请输入账号"
4141
clearable
4242
@keyup.enter="handleQuery"
4343
class="!w-240px"
4444
/>
4545
</el-form-item>
46+
<el-form-item label="真实名字" prop="userName">
47+
<el-input
48+
v-model="queryParams.userName"
49+
placeholder="请输入真实名字"
50+
clearable
51+
@keyup.enter="handleQuery"
52+
class="!w-240px"
53+
/>
54+
</el-form-item>
4655
<el-form-item label="提现银行" prop="bankName">
4756
<el-select
4857
v-model="queryParams.bankName"
@@ -107,10 +116,10 @@
107116
<div v-if="scope.row.type === BrokerageWithdrawTypeEnum.WALLET.type"> 余额 </div>
108117
<div v-else>
109118
{{ getDictLabel(DICT_TYPE.BROKERAGE_WITHDRAW_TYPE, scope.row.type) }}
110-
<span v-if="scope.row.accountNo">账号:{{ scope.row.accountNo }}</span>
119+
<div v-if="scope.row.userAccount">账号:{{ scope.row.userAccount }}</div>
120+
<div v-if="scope.row.userName">真实姓名:{{ scope.row.userName }}</div>
111121
</div>
112122
<template v-if="scope.row.type === BrokerageWithdrawTypeEnum.BANK.type">
113-
<div>真实姓名:{{ scope.row.name }}</div>
114123
<div>
115124
银行名称:
116125
<dict-tag :type="DICT_TYPE.BROKERAGE_BANK_NAME" :value="scope.row.bankName" />
@@ -119,13 +128,13 @@
119128
</template>
120129
</template>
121130
</el-table-column>
122-
<el-table-column label="收款码" align="left" prop="accountQrCodeUrl" min-width="70px">
131+
<el-table-column label="收款码" align="left" prop="qrCodeUrl" min-width="70px">
123132
<template #default="scope">
124133
<el-image
125-
v-if="scope.row.accountQrCodeUrl"
126-
:src="scope.row.accountQrCodeUrl"
134+
v-if="scope.row.qrCodeUrl"
135+
:src="scope.row.qrCodeUrl"
127136
class="h-40px w-40px"
128-
:preview-src-list="[scope.row.accountQrCodeUrl]"
137+
:preview-src-list="[scope.row.qrCodeUrl]"
129138
preview-teleported
130139
/>
131140
<span v-else>无</span>
@@ -150,6 +159,7 @@
150159
</div>
151160
</template>
152161
</el-table-column>
162+
<el-table-column label="转账失败原因" align="left" prop="transferErrorMsg" />
153163
<el-table-column label="操作" align="left" width="110px" fixed="right">
154164
<template #default="scope">
155165
<template v-if="scope.row.status === BrokerageWithdrawStatusEnum.AUDITING.status">
@@ -192,7 +202,6 @@ import { dateFormatter, formatDate } from '@/utils/formatTime'
192202
import * as BrokerageWithdrawApi from '@/api/mall/trade/brokerage/withdraw'
193203
import BrokerageWithdrawRejectForm from './BrokerageWithdrawRejectForm.vue'
194204
import { BrokerageWithdrawStatusEnum, BrokerageWithdrawTypeEnum } from '@/utils/constants'
195-
import { fenToYuanFormat } from '@/utils/formatter'
196205
import { fenToYuan } from '@/utils'
197206
198207
defineOptions({ name: 'BrokerageWithdraw' })
@@ -207,8 +216,8 @@ const queryParams = reactive({
207216
pageSize: 10,
208217
userId: null,
209218
type: null,
210-
name: null,
211-
accountNo: null,
219+
userName: null,
220+
userAccount: null,
212221
bankName: null,
213222
status: null,
214223
auditReason: null,

src/views/pay/demo/order/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
</Dialog>
111111
</template>
112112
<script lang="ts" setup name="PayDemoOrder">
113-
import * as PayDemoApi from '@/api/pay/demo'
113+
import * as PayDemoApi from '@/api/pay/demo/order'
114114
import { dateFormatter, formatDate } from '@/utils/formatTime'
115115
import { DICT_TYPE } from '@/utils/dict'
116116

src/views/pay/demo/withdraw/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999

100100
<script setup lang="ts">
101101
import { dateFormatter } from '@/utils/formatTime'
102-
import * as DemoWithdrawApi from '@/api/pay/demo/withdraw/index'
102+
import * as DemoWithdrawApi from '@/api/pay/demo/withdraw'
103103
import DemoWithdrawForm from './DemoWithdrawForm.vue'
104104
import { DICT_TYPE } from '@/utils/dict'
105105
import { useMessage } from '@/hooks/web/useMessage'

0 commit comments

Comments
 (0)