feat: add deposit receipt preview, deposit identifier, and approve/reject modals with SMS

This commit is contained in:
2026-11-08 13:27:23 +03:30
parent 379995e0ab
commit e0e2b6daa5
9 changed files with 334 additions and 10 deletions
@@ -6,8 +6,24 @@
<div class="flex w-full items-center justify-between gap-3">
<span class="min-w-0 truncate">{{ sheetTitle }}</span>
<div class="flex shrink-0 items-center gap-2">
<template v-if="isPendingDepositRequest(row)">
<MobileIconButton
plain
icon="vuesax-linear:tick-circle"
color="#16A34A"
:size="22"
@click="$emit('approveDeposit', row)"
/>
<MobileIconButton
plain
icon="vuesax-linear:close-circle"
color="#DC2626"
:size="22"
@click="$emit('rejectDeposit', row)"
/>
</template>
<MobileIconButton
v-if="needsTrackingConfirmation(row)"
v-else-if="needsTrackingConfirmation(row)"
plain
icon="vuesax-linear:tick-circle"
color="#16A34A"
@@ -103,8 +119,51 @@
<MobileDetailRow label="نام و نام خانوادگی" full-width :value="row.customer?.name || '-'" />
<MobileDetailRow label="شماره کارت" full-width :value="row.bank_account?.cart_number || '-'" />
<MobileDetailRow label="شماره شبا" full-width :value="row.bank_account?.shaba_number || '-'" />
<MobileDetailRow
label="شناسه واریز"
full-width
:value="row.deposit_identifier || row.customer?.n_code || '-'"
/>
<MobileDetailRow label="تاریخ ثبت" full-width :value="dateLabel(row)" />
<MobileDetailRow
v-if="row.reject_reason"
label="علت رد درخواست"
full-width
:value="row.reject_reason"
/>
<div v-if="row.receipt_url" class="col-span-2 py-2">
<div class="text-xs text-gray-500 mb-1">فیش واریزی:</div>
<a-image
:src="row.receipt_url"
:height="120"
class="rounded-lg object-contain border max-w-full"
alt="فیش واریزی"
/>
</div>
</MobileInfoGrid>
<div v-if="isPendingDepositRequest(row)" class="mt-4 flex gap-2">
<BaseButton
type="primary"
class="flex-1 !bg-emerald-600 hover:!bg-emerald-700 !border-emerald-600 text-white"
@click="$emit('approveDeposit', row)"
>
<template #icon>
<BaseIcon icon="vuesax-linear:tick-circle" size="16" />
</template>
تایید واریز
</BaseButton>
<BaseButton
danger
class="flex-1"
@click="$emit('rejectDeposit', row)"
>
<template #icon>
<BaseIcon icon="vuesax-linear:close-circle" size="16" />
</template>
رد واریز
</BaseButton>
</div>
</template>
</MobileDetailSheet>
</template>
@@ -121,6 +180,7 @@ import { status } from '@/pages/menuPages/withdraw/information/hooks/status'
import {
formatWithdrawAmountDisplay,
isMoneyWithdraw,
isPendingDepositRequest,
needsTrackingConfirmation,
needsWeightAssignment,
withdrawAmountValue,
@@ -140,6 +200,8 @@ const emit = defineEmits<{
(e: 'update:visible', value: boolean): void
(e: 'withdraw', item: Withdraw): void
(e: 'weight', item: Withdraw): void
(e: 'approveDeposit', item: Withdraw): void
(e: 'rejectDeposit', item: Withdraw): void
(e: 'changeStatus', item: Withdraw, statusEntry: [string, (typeof status)[keyof typeof status]]): void
}>()