fix wallet ui

This commit is contained in:
2026-06-26 22:16:44 +03:30
parent 61c948b6c6
commit 34be7a66dc
6 changed files with 208 additions and 71 deletions
+8 -15
View File
@@ -180,19 +180,7 @@
</BasicInfoItem>
</div>
<div class="grid grid-cols-1 gap-3 md:grid-cols-2">
<div
v-for="(item, index) in userInfo.wallet"
:key="index"
class="grid grid-cols-2 bg-orange-100 dark:bg-orange-500/15 gap-2 rounded-lg p-2"
>
<BasicInfoItem
title="نام قلک"
:value="item?.fund ? item?.fund?.title : metalLabel.goldWallet()"
/>
<BasicInfoItem :title="metalLabel.goldAmount()" :value="`${item?.gold} گرم`" />
</div>
</div>
<CustomerWalletBalancePanel v-if="userInfo?.id" :customer-id="userInfo.id" class="mt-2" />
</div>
</a-tab-pane>
<a-tab-pane key="لیست سفارشات" tab="لیست سفارشات">
@@ -226,18 +214,20 @@
@ok="chargeMoneyWallet"
@close="showMoneyWalletCharge = false"
>
<CustomerWalletBalancePanel v-if="formCharge.customer_id" :customer-id="formCharge.customer_id" class="mb-3" />
<WalletChargeForm ref="moneyChargeFormRef" :model-value="formCharge" variant="money" />
</BasicActionSheet>
<BasicModal
v-else
v-model:visible="showMoneyWalletCharge"
width="22rem"
width="28rem"
:title="moneyChargeTitle"
:ok-text="moneyChargeOkText"
@ok="chargeMoneyWallet"
:loading="loading"
@close="showMoneyWalletCharge = false"
>
<CustomerWalletBalancePanel v-if="formCharge.customer_id" :customer-id="formCharge.customer_id" class="mb-3" />
<WalletChargeForm ref="moneyChargeFormRef" :model-value="formCharge" variant="money" />
</BasicModal>
@@ -255,18 +245,20 @@
@ok="chargeGoldWallet"
@close="showGoldWalletCharge = false"
>
<CustomerWalletBalancePanel v-if="formCharge.customer_id" :customer-id="formCharge.customer_id" class="mb-3" />
<WalletChargeForm ref="goldChargeFormRef" :model-value="formCharge" variant="gold" />
</BasicActionSheet>
<BasicModal
v-else
v-model:visible="showGoldWalletCharge"
width="22rem"
width="28rem"
:title="goldChargeTitle"
:ok-text="goldChargeOkText"
@ok="chargeGoldWallet"
:loading="loading"
@close="showGoldWalletCharge = false"
>
<CustomerWalletBalancePanel v-if="formCharge.customer_id" :customer-id="formCharge.customer_id" class="mb-3" />
<WalletChargeForm ref="goldChargeFormRef" :model-value="formCharge" variant="gold" />
</BasicModal>
<BasicInfoModal
@@ -313,6 +305,7 @@ import type { Order } from '@/model/order'
import Icon from '@core/components/BaseIcon/src/Icon.vue'
import { isMobile } from '@core/utils/is'
import WalletChargeForm from './components/WalletChargeForm.vue'
import CustomerWalletBalancePanel from '@/components/customer/CustomerWalletBalancePanel.vue'
import {
buildChargePayload,
createEmptyChargeForm,