fix bug 22/4 2

This commit is contained in:
2026-07-13 19:03:03 +03:30
parent 61235b3bf8
commit 76813df062
15 changed files with 1020 additions and 70 deletions
@@ -58,12 +58,12 @@
<BasicInfoItem
is-line
:title="metalLabel.goldWalletTitle()"
:value="selectedCustomer?.wallet?.[0]?.gold ?? '_'"
:value="goldBalanceDisplay"
/>
<BasicInfoItem
is-line
title="کیف پول ریالی"
:value="selectedCustomer?.wallet?.[0]?.cash ?? '_'"
:value="cashBalanceDisplay"
/>
</div>
@@ -108,6 +108,7 @@ import type { last } from '@/model/price'
import { inputRules, inputRulesNumber } from '@/utils/inputRules'
import { usePrice } from '@core/utils/usePrice'
import { metalLabel } from '@/utils/adminMetalLabels'
import { getCashBalance, getGoldBalance } from '@/components/mobile/utils/wallet'
const props = defineProps<{
form: Order
@@ -131,6 +132,14 @@ const marketPriceLabel = computed(() => {
return usePrice(price)
})
const goldBalanceDisplay = computed(
() => getGoldBalance(props.selectedCustomer?.wallet) || '_'
)
const cashBalanceDisplay = computed(
() => getCashBalance(props.selectedCustomer?.wallet) || '_'
)
defineExpose({
validateFields: () => formRef.value?.validateFields(),
resetFields: () => formRef.value?.resetFields()
+2
View File
@@ -91,6 +91,7 @@ import { createOrder } from '@/api/order'
import { isMobile } from '@core/utils/is'
import { metalLabel } from '@/utils/adminMetalLabels'
import { formatAmountWithUnit } from '@/utils/weightUnit'
import { initWalletSettingsFromApi } from '@/utils/config'
//loading
const loading = ref<boolean>(false)
@@ -118,6 +119,7 @@ async function getCustomers() {
}
onMounted(() => {
void initWalletSettingsFromApi()
getCustomers()
})