Skip to content

Commit 048ecd7

Browse files
committed
feat:【MALL 商城】佣金提现,支持提现失败时,重新发起
1 parent aec024e commit 048ecd7

File tree

1 file changed

+48
-21
lines changed
  • src/views/mall/trade/brokerage/withdraw

1 file changed

+48
-21
lines changed

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

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,15 @@
111111
<div>手续费:¥{{ fenToYuan(scope.row.feePrice) }}</div>
112112
</template>
113113
</el-table-column>
114-
<el-table-column label="提现方式" align="left" prop="type" min-width="120px">
114+
<el-table-column label="提现方式" align="left" prop="type" min-width="80px">
115115
<template #default="scope">
116-
<div v-if="scope.row.type === BrokerageWithdrawTypeEnum.WALLET.type"> 余额 </div>
116+
<dict-tag :type="DICT_TYPE.BROKERAGE_WITHDRAW_TYPE" :value="scope.row.type" />
117+
</template>
118+
</el-table-column>
119+
<el-table-column label="提现信息" align="left" min-width="120px">
120+
<template #default="scope">
121+
<div v-if="scope.row.type === BrokerageWithdrawTypeEnum.WALLET.type">-</div>
117122
<div v-else>
118-
{{ getDictLabel(DICT_TYPE.BROKERAGE_WITHDRAW_TYPE, scope.row.type) }}
119123
<div v-if="scope.row.userAccount">账号:{{ scope.row.userAccount }}</div>
120124
<div v-if="scope.row.userName">真实姓名:{{ scope.row.userName }}</div>
121125
</div>
@@ -126,18 +130,15 @@
126130
</div>
127131
<div>开户地址:{{ scope.row.bankAddress }}</div>
128132
</template>
129-
</template>
130-
</el-table-column>
131-
<el-table-column label="收款码" align="left" prop="qrCodeUrl" min-width="70px">
132-
<template #default="scope">
133-
<el-image
134-
v-if="scope.row.qrCodeUrl"
135-
:src="scope.row.qrCodeUrl"
136-
class="h-40px w-40px"
137-
:preview-src-list="[scope.row.qrCodeUrl]"
138-
preview-teleported
139-
/>
140-
<span v-else>无</span>
133+
<div v-if="scope.row.qrCodeUrl" class="mt-2">
134+
<div>收款码:</div>
135+
<el-image
136+
:src="scope.row.qrCodeUrl"
137+
class="h-40px w-40px"
138+
:preview-src-list="[scope.row.qrCodeUrl]"
139+
preview-teleported
140+
/>
141+
</div>
141142
</template>
142143
</el-table-column>
143144
<el-table-column
@@ -155,11 +156,14 @@
155156
时间:{{ formatDate(scope.row.auditTime) }}
156157
</div>
157158
<div v-if="scope.row.auditReason" class="text-xs">
158-
原因:{{ scope.row.auditReason }}
159+
审核原因:{{ scope.row.auditReason }}
160+
</div>
161+
<!-- 提现失败原因 -->
162+
<div v-if="scope.row.transferErrorMsg" class="text-xs text-red-500">
163+
转账失败原因:{{ scope.row.transferErrorMsg }}
159164
</div>
160165
</template>
161166
</el-table-column>
162-
<el-table-column label="转账失败原因" align="left" prop="transferErrorMsg" />
163167
<el-table-column label="操作" align="left" width="110px" fixed="right">
164168
<template #default="scope">
165169
<template v-if="scope.row.status === BrokerageWithdrawStatusEnum.AUDITING.status">
@@ -180,6 +184,16 @@
180184
驳回
181185
</el-button>
182186
</template>
187+
<template v-if="scope.row.status === BrokerageWithdrawStatusEnum.WITHDRAW_FAIL.status">
188+
<el-button
189+
link
190+
type="warning"
191+
@click="handleRetryTransfer(scope.row.id)"
192+
v-hasPermi="['trade:brokerage-withdraw:audit']"
193+
>
194+
重新转账
195+
</el-button>
196+
</template>
183197
</template>
184198
</el-table-column>
185199
</el-table>
@@ -197,7 +211,7 @@
197211
</template>
198212

199213
<script setup lang="ts">
200-
import { DICT_TYPE, getDictLabel, getIntDictOptions, getStrDictOptions } from '@/utils/dict'
214+
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict'
201215
import { dateFormatter, formatDate } from '@/utils/formatTime'
202216
import * as BrokerageWithdrawApi from '@/api/mall/trade/brokerage/withdraw'
203217
import BrokerageWithdrawRejectForm from './BrokerageWithdrawRejectForm.vue'
@@ -215,11 +229,11 @@ const queryParams = reactive({
215229
pageNo: 1,
216230
pageSize: 10,
217231
userId: null,
218-
type: null,
232+
type: undefined,
219233
userName: null,
220234
userAccount: null,
221-
bankName: null,
222-
status: null,
235+
bankName: undefined,
236+
status: undefined,
223237
auditReason: null,
224238
auditTime: [],
225239
remark: null,
@@ -270,6 +284,19 @@ const handleApprove = async (id: number) => {
270284
}
271285
}
272286
287+
/** 重新转账 */
288+
const handleRetryTransfer = async (id: number) => {
289+
try {
290+
loading.value = true
291+
await message.confirm('确定要重新转账吗?')
292+
await BrokerageWithdrawApi.approveBrokerageWithdraw(id)
293+
await message.success(t('common.success'))
294+
await getList()
295+
} finally {
296+
loading.value = false
297+
}
298+
}
299+
273300
/** 初始化 **/
274301
onMounted(() => {
275302
getList()

0 commit comments

Comments
 (0)