优化:提现记录显示优化
This commit is contained in:
parent
2b84e5f01e
commit
7bc5831edd
@ -139,6 +139,7 @@ export interface SettlementRequestClientItem {
|
||||
fee?: string
|
||||
status?: string
|
||||
reason?: string
|
||||
payoutError?: string
|
||||
requestNo?: string
|
||||
tokenAddress?: string | null
|
||||
/** 兼容旧接口字段 */
|
||||
|
||||
@ -269,6 +269,9 @@
|
||||
"withdrawAmountLabel": "Withdraw Amount",
|
||||
"feeLabel": "Fee",
|
||||
"withdrawAddressLabel": "Withdraw Address",
|
||||
"withdrawRejectReasonTitle": "Why it was rejected",
|
||||
"withdrawRejectNoReason": "No reason was provided. Please contact support if you need help.",
|
||||
"withdrawViewRejectReason": "View reason",
|
||||
"priceLabel": "Price",
|
||||
"sellDialogTitle": "Sell {outcome}",
|
||||
"position": "Position",
|
||||
|
||||
@ -269,6 +269,9 @@
|
||||
"withdrawAmountLabel": "出金額",
|
||||
"feeLabel": "手数料",
|
||||
"withdrawAddressLabel": "出金先アドレス",
|
||||
"withdrawRejectReasonTitle": "審査が通らなかった理由",
|
||||
"withdrawRejectNoReason": "理由は返されていません。お問い合わせはサポートへご連絡ください。",
|
||||
"withdrawViewRejectReason": "タップして理由を見る",
|
||||
"priceLabel": "価格",
|
||||
"sellDialogTitle": "売却 {outcome}",
|
||||
"position": "ポジション",
|
||||
|
||||
@ -269,6 +269,9 @@
|
||||
"withdrawAmountLabel": "출금 금액",
|
||||
"feeLabel": "수수료",
|
||||
"withdrawAddressLabel": "출금 주소",
|
||||
"withdrawRejectReasonTitle": "심사 거부 사유",
|
||||
"withdrawRejectNoReason": "사유가 제공되지 않았습니다. 문의는 고객 지원으로 연락해 주세요.",
|
||||
"withdrawViewRejectReason": "탭하여 사유 보기",
|
||||
"priceLabel": "가격",
|
||||
"sellDialogTitle": "매도 {outcome}",
|
||||
"position": "포지션",
|
||||
|
||||
@ -269,6 +269,9 @@
|
||||
"withdrawAmountLabel": "提现金额",
|
||||
"feeLabel": "手续费",
|
||||
"withdrawAddressLabel": "提现地址",
|
||||
"withdrawRejectReasonTitle": "审核未通过原因",
|
||||
"withdrawRejectNoReason": "未返回具体原因,如有疑问请联系客服。",
|
||||
"withdrawViewRejectReason": "点击查看原因",
|
||||
"priceLabel": "价格",
|
||||
"sellDialogTitle": "卖出 {outcome}",
|
||||
"position": "仓位",
|
||||
|
||||
@ -269,6 +269,9 @@
|
||||
"withdrawAmountLabel": "提現金額",
|
||||
"feeLabel": "手續費",
|
||||
"withdrawAddressLabel": "提現地址",
|
||||
"withdrawRejectReasonTitle": "審核未通過原因",
|
||||
"withdrawRejectNoReason": "未返回具體原因,如有疑問請聯絡客服。",
|
||||
"withdrawViewRejectReason": "點擊查看原因",
|
||||
"priceLabel": "價格",
|
||||
"sellDialogTitle": "賣出 {outcome}",
|
||||
"position": "倉位",
|
||||
|
||||
@ -356,8 +356,18 @@
|
||||
</div>
|
||||
<div class="design-withdraw-bottom">
|
||||
<div class="design-withdraw-label">{{ t('wallet.withdrawAddressLabel') }}</div>
|
||||
<div class="withdrawal-mobile-address">
|
||||
{{ shortAddress(w.tokenAddress ?? w.walletAddress) }}
|
||||
<div class="withdrawal-address-row">
|
||||
<div class="withdrawal-mobile-address">
|
||||
{{ shortAddress(w.tokenAddress ?? w.walletAddress) }}
|
||||
</div>
|
||||
<button
|
||||
v-if="isWithdrawStatusRejected(w.status)"
|
||||
type="button"
|
||||
class="withdrawal-view-reason-link"
|
||||
@click.stop="openWithdrawRejectReasonDialog(w)"
|
||||
>
|
||||
{{ t('wallet.withdrawViewRejectReason') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -401,6 +411,25 @@
|
||||
@success="onWithdrawSuccess"
|
||||
/>
|
||||
|
||||
<v-dialog v-model="withdrawRejectReasonDialogOpen" max-width="440">
|
||||
<v-card
|
||||
class="withdraw-reject-dialog-card"
|
||||
elevation="0"
|
||||
rounded="lg"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
@click="closeWithdrawRejectReasonDialog"
|
||||
@keydown.enter.prevent="closeWithdrawRejectReasonDialog"
|
||||
>
|
||||
<div class="withdraw-reject-dialog-header">
|
||||
<h2 class="withdraw-reject-dialog-title">{{ t('wallet.withdrawRejectReasonTitle') }}</h2>
|
||||
</div>
|
||||
<v-card-text class="withdraw-reject-dialog-body">
|
||||
<p class="withdraw-reject-dialog-text">{{ withdrawRejectReasonText }}</p>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<!-- 授权弹窗 -->
|
||||
<v-dialog
|
||||
v-model="authorizeDialogOpen"
|
||||
@ -878,6 +907,35 @@ const positions = ref<Position[]>(USE_MOCK_WALLET ? [...MOCK_WALLET_POSITIONS] :
|
||||
const withdrawalsList = ref<SettlementRequestClientItem[]>([])
|
||||
const withdrawalsTotal = ref(0)
|
||||
const withdrawalsLoading = ref(false)
|
||||
const withdrawRejectReasonDialogOpen = ref(false)
|
||||
const withdrawRejectReasonText = ref('')
|
||||
|
||||
function isWithdrawStatusRejected(status: string | undefined): boolean {
|
||||
const s = (status ?? '').toLowerCase()
|
||||
return s === WITHDRAW_STATUS.REJECTED || s === '2' || s === 'rejected'
|
||||
}
|
||||
|
||||
function getWithdrawRejectionReason(w: SettlementRequestClientItem): string {
|
||||
const fromReason = w.reason
|
||||
if (typeof fromReason === 'string' && fromReason.trim()) return fromReason.trim()
|
||||
const rec = w as Record<string, unknown>
|
||||
for (const key of ['rejectReason', 'auditRemark', 'rejectMsg']) {
|
||||
const v = rec[key]
|
||||
if (typeof v === 'string' && v.trim()) return v.trim()
|
||||
}
|
||||
const payoutErr = w.payoutError ?? rec.payout_error
|
||||
if (typeof payoutErr === 'string' && payoutErr.trim()) return payoutErr.trim()
|
||||
return t('wallet.withdrawRejectNoReason')
|
||||
}
|
||||
|
||||
function openWithdrawRejectReasonDialog(w: SettlementRequestClientItem) {
|
||||
withdrawRejectReasonText.value = getWithdrawRejectionReason(w)
|
||||
withdrawRejectReasonDialogOpen.value = true
|
||||
}
|
||||
|
||||
function closeWithdrawRejectReasonDialog() {
|
||||
withdrawRejectReasonDialogOpen.value = false
|
||||
}
|
||||
/** 持仓列表(API 数据,非 mock 时使用) */
|
||||
const positionList = ref<Position[]>([])
|
||||
const positionTotal = ref(0)
|
||||
@ -2674,11 +2732,60 @@ async function submitAuthorize() {
|
||||
}
|
||||
.withdrawal-status-pill.status-pending,
|
||||
.withdrawal-status-pill.status-success,
|
||||
.withdrawal-status-pill.status-rejected,
|
||||
.withdrawal-status-pill.status-failed {
|
||||
background: #f3f4f6;
|
||||
color: #374151;
|
||||
}
|
||||
|
||||
.withdrawal-status-pill.status-rejected {
|
||||
background: #fef2f2;
|
||||
color: #b91c1c;
|
||||
border: 1px solid #fecaca;
|
||||
}
|
||||
|
||||
.withdraw-reject-dialog-card {
|
||||
container-type: inline-size;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
min-height: calc(100cqw * 2 / 3);
|
||||
border: 1px solid #f3f4f6;
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.withdraw-reject-dialog-card:focus-visible {
|
||||
outline: 2px solid #94a3b8;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.withdraw-reject-dialog-header {
|
||||
padding: 20px 20px 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.withdraw-reject-dialog-title {
|
||||
margin: 0;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
color: #111827;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.withdraw-reject-dialog-body {
|
||||
padding: 8px 24px 28px;
|
||||
color: #374151;
|
||||
font-size: 0.9375rem;
|
||||
line-height: 1.5;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.withdraw-reject-dialog-text {
|
||||
margin: 0;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
text-align: center;
|
||||
}
|
||||
.withdrawal-reason {
|
||||
font-size: 12px;
|
||||
color: #6b7280;
|
||||
@ -2739,11 +2846,21 @@ async function submitAuthorize() {
|
||||
color: #9ca3af;
|
||||
}
|
||||
|
||||
.withdrawal-mobile-card.design-withdraw-card .withdrawal-address-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.withdrawal-mobile-card.design-withdraw-card .withdrawal-mobile-address {
|
||||
margin-top: 0;
|
||||
font-family: Inter, sans-serif;
|
||||
font-size: 13px;
|
||||
color: #111827;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.withdrawal-mobile-card.design-withdraw-card .withdrawal-status-pill {
|
||||
@ -2756,6 +2873,30 @@ async function submitAuthorize() {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.withdrawal-view-reason-link {
|
||||
flex-shrink: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: #b91c1c;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
font-family: inherit;
|
||||
line-height: 1.3;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 3px;
|
||||
cursor: pointer;
|
||||
appearance: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.withdrawal-view-reason-link:focus-visible {
|
||||
outline: 2px solid #b91c1c;
|
||||
outline-offset: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.wallet-design-card .withdrawals-mobile-list {
|
||||
padding: 0;
|
||||
gap: 10px;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user