fix bug 22/4 2
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user