wallet fix 2

This commit is contained in:
2026-06-26 17:41:52 +03:30
parent edffc5df76
commit d7ca6706fb
11 changed files with 529 additions and 12 deletions
@@ -57,6 +57,15 @@
<template #title><span>{{ metalLabel.goldWalletCharge() }}</span></template>
<Icon icon="vuesax-linear:wallet-money" color="#ea580c" />
</a-tooltip>
<a-tooltip
v-if="tahesabEnabled && !record.moshtari_code"
placement="bottom"
class="cursor-pointer"
@click="openTahesabRegister(record)"
>
<template #title><span>ثبت در ته‌حساب</span></template>
<Icon icon="vuesax-linear:refresh-circle" color="#CA8A04" />
</a-tooltip>
<a-tooltip placement="bottom" class="cursor-pointer" @click="emits('info', record)">
<template #title><span>مشخصات</span></template>
<Icon icon="vuesax-linear:stickynote" color="#10913A" />
@@ -130,6 +139,15 @@
<BasicInfoItem title="شماره ملی" :value="confirmInfo?.n_code" />
</div>
</BasicModal>
<TahesabRetryModal
v-if="tahesabEnabled"
v-model="tahesabRegisterVisible"
mode="register-customer"
:customer-id="tahesabCustomer?.id"
:customer-name="tahesabCustomer?.name"
@success="fetch"
/>
</BasicShowContext>
</div>
</template>
@@ -154,6 +172,8 @@ import type { Customer } from '@/model/customer'
import { MODAL_ABOVE_ACTION_SHEET_Z_INDEX } from '@/constants/overlayZIndex'
import { isMobile } from '@core/utils/is'
import { metalLabel } from '@/utils/adminMetalLabels'
import TahesabRetryModal from '@/components/TahesabRetryModal.vue'
import { tahesabEnabledSetting, initTahesabSettingFromApi } from '@/utils/config'
const [submit, reload] = useBaseTable()
const emits = defineEmits(['delete', 'edit', 'add', 'info', 'chargeMoney', 'chargeGold'])
@@ -161,6 +181,9 @@ const emits = defineEmits(['delete', 'edit', 'add', 'info', 'chargeMoney', 'char
const loading = ref(false)
const confirmVisible = ref(false)
const confirmInfo = ref<Customer>()
const tahesabRegisterVisible = ref(false)
const tahesabCustomer = ref<Customer>()
const tahesabEnabled = tahesabEnabledSetting
const mobileListRef = ref<null | { fetch: () => Promise<void> }>(null)
const tblProps = ref<any>({
@@ -179,6 +202,10 @@ const fetch = async () => {
defineExpose({ fetch })
onMounted(() => {
void initTahesabSettingFromApi()
})
async function changeCustomerActivationFunction(id: number) {
try {
loading.value = true
@@ -197,6 +224,11 @@ function openConfirmUser(user: Customer) {
confirmVisible.value = true
}
function openTahesabRegister(user: Customer) {
tahesabCustomer.value = user
tahesabRegisterVisible.value = true
}
function handleArchive(customer: Customer) {
Modal.confirm({
title: 'آیا مشتری را بایگانی می کنید؟',