changes of boursecu
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item v-if="isBuy" name="goldValue"
|
||||
:rules="[justNumber2(props?.ProductItem?.price , form.method , props?.ProductItem?.amount, true)]">
|
||||
:rules="[justNumber2(props?.ProductItem?.price , form.method , props?.ProductItem?.amount, true, props?.ProductItem?.group_type)]">
|
||||
<BasicInput v-model:value="form.goldValue" addon-before="تعداد" addon-bg-color="#000000FF"
|
||||
addon-text-color="white"
|
||||
place-holder="تعداد"
|
||||
@@ -81,16 +81,16 @@
|
||||
|
||||
<div v-if="props?.ProductItem?.group_type !== 'سکه'" class="flex justify-between">
|
||||
<div> وزن کل</div>
|
||||
<div>{{ form.goldVazn ?? 0 }} گرم</div>
|
||||
<div>{{ form.goldVazn ?? 0 }} {{ getWeightUnit() }}</div>
|
||||
</div>
|
||||
|
||||
<!-- {{walletStore?.walletInfo?.gold}}-->
|
||||
<Transition mode="out-in" name="fade" class="mt-2">
|
||||
<div v-if="isBuy && form.method === 'gold'" class="font-bold text-xs">
|
||||
<div> {{ `موجودی کیف طلا: ${walletStore?.walletInfo?.gold ?? 0} گرم` }}</div>
|
||||
<div>{{ goldWalletBalanceText }}</div>
|
||||
</div>
|
||||
<div v-else-if="isBuy" class="font-bold text-xs">
|
||||
{{ `موجودی کیف پول: ${usePriceWithoutType(walletStore?.walletInfo?.cash ?? 0)} ریال` }}
|
||||
{{ cashWalletBalanceText }}
|
||||
</div>
|
||||
<div class="font-bold text-xs" v-else>{{ `موجودی محصول: ${getInventoryById(props?.ProductItem?.id)}` }}
|
||||
</div>
|
||||
@@ -259,9 +259,25 @@ import {
|
||||
getDefaultProductDealMethod,
|
||||
getProductDealMethodOptions,
|
||||
isCashLikeDealMethod,
|
||||
formatCashWalletBalanceText,
|
||||
formatGoldWalletBalanceText,
|
||||
getWeightUnit,
|
||||
} from '@/utils/productDealMethod'
|
||||
|
||||
const typeDeal = computed(() => getProductDealMethodOptions(props?.ProductItem?.group_type))
|
||||
|
||||
const productGroupType = computed(() => props?.ProductItem?.group_type)
|
||||
|
||||
const goldWalletBalanceText = computed(() =>
|
||||
formatGoldWalletBalanceText(walletStore?.walletInfo?.gold ?? 0, productGroupType.value)
|
||||
)
|
||||
|
||||
const cashWalletBalanceText = computed(() =>
|
||||
formatCashWalletBalanceText(
|
||||
usePriceWithoutType(walletStore?.walletInfo?.cash ?? 0),
|
||||
productGroupType.value
|
||||
)
|
||||
)
|
||||
const infoVisible = ref(false)
|
||||
const walletStore = useWalletStore()
|
||||
const userStore = useUserStore()
|
||||
|
||||
Reference in New Issue
Block a user