fix bug of register page
This commit is contained in:
@@ -232,7 +232,7 @@ import type { Transaction } from '@/models/transaction'
|
||||
import type { TableEngineInput, TableOutput } from '@/models/table'
|
||||
import { useInfiniteScroll } from '@vueuse/core'
|
||||
import { getTransactionTable } from '@/api/transaction'
|
||||
import { getLastPrices, getUpPrice, lastPrice, setIntervalGetAllPrice, stopPriceInterval } from '@/utils/price'
|
||||
import { getLastPrices, getTradeBuyPrice, getTradeSellPrice, lastPrice, setIntervalGetAllPrice, stopPriceInterval } from '@/utils/price'
|
||||
import type { Product } from '@/models/products'
|
||||
import { useFundUserStore } from '@/store/fundStore'
|
||||
import {useConfigStore} from "@/store/configStore";
|
||||
@@ -327,7 +327,8 @@ const disableTransaction = computed(() =>
|
||||
form.value?.goldCash === undefined ||
|
||||
(isBuy.value ? (form.value?.goldCash ?? 0) < 500000 : (form.value?.goldValue ?? 0) < 0.001) ||
|
||||
(!isBuy.value && form.value.goldValue > walletStore?.walletInfo?.gold) ||
|
||||
price.value?.buy === undefined)
|
||||
!lastPrice.value ||
|
||||
(isBuy.value ? getTradeBuyPrice(lastPrice.value) <= 0 : getTradeSellPrice(lastPrice.value) <= 0))
|
||||
|
||||
function refreshTable() {
|
||||
sellItems.value = []
|
||||
@@ -515,7 +516,7 @@ const limitedPrice = computed(() => {
|
||||
}
|
||||
}*/
|
||||
function syncFormWithLatestPrice() {
|
||||
if (!price.value) return
|
||||
if (!lastPrice.value) return
|
||||
|
||||
const goldValue = form.value.goldValue
|
||||
if (goldValue !== undefined && goldValue !== null && goldValue !== '' && !isNaN(Number(goldValue))) {
|
||||
@@ -538,26 +539,20 @@ watch(
|
||||
|
||||
function calculateCash(val: number) {
|
||||
priceErrorVisible.value = false
|
||||
if (price.value) {
|
||||
form.value.goldVazn = parseFloat((val * (( props?.ProductItem?.price) + (props?.ProductItem?.cash_fee_buy)))/lastPrice.value?.buy).toFixed(1)
|
||||
if (isBuy.value) {
|
||||
if (val) {
|
||||
form.value.goldCash = parseFloat(val * (( props?.ProductItem?.price) + (props?.ProductItem?.cash_fee_buy))).toFixed(0)
|
||||
}
|
||||
else {
|
||||
form.value.goldCash = 0
|
||||
form.value.goldVazn = 0
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (val)
|
||||
form.value.goldCash = parseFloat((val * props?.ProductItem?.price) - (props?.ProductItem?.cash_fee_sell)).toFixed(0)
|
||||
else{
|
||||
form.value.goldCash = 0
|
||||
form.value.goldVazn = 0
|
||||
}
|
||||
}
|
||||
console.log(form.value.goldVazn)
|
||||
if (!lastPrice.value) return
|
||||
|
||||
const tradeBuy = getTradeBuyPrice(lastPrice.value)
|
||||
form.value.goldVazn = parseFloat((val * ((props?.ProductItem?.price) + (props?.ProductItem?.cash_fee_buy))) / tradeBuy).toFixed(1)
|
||||
if (isBuy.value) {
|
||||
form.value.goldCash = val
|
||||
? parseFloat(String(val * ((props?.ProductItem?.price) + (props?.ProductItem?.cash_fee_buy))))
|
||||
: 0
|
||||
if (!val) form.value.goldVazn = 0
|
||||
} else {
|
||||
form.value.goldCash = val
|
||||
? parseFloat(String((val * props?.ProductItem?.price) - (props?.ProductItem?.cash_fee_sell)))
|
||||
: 0
|
||||
if (!val) form.value.goldVazn = 0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -629,15 +624,14 @@ const price = computed((): Price => <Price>lastPrice.value ?? 0)
|
||||
const goldPriceValue = computed(() => {
|
||||
if (!lastPrice.value?.price) return 0
|
||||
return isBuy.value
|
||||
? (lastPrice.value.buy ?? 0)
|
||||
: (lastPrice.value.sell ?? 0)
|
||||
? getTradeBuyPrice(lastPrice.value)
|
||||
: getTradeSellPrice(lastPrice.value)
|
||||
})
|
||||
|
||||
async function initPrice() {
|
||||
try {
|
||||
// chartLoading.value = true
|
||||
await getLastPrices()
|
||||
await getUpPrice()
|
||||
await setIntervalGetAllPrice()
|
||||
loading.value = true
|
||||
} catch (e) {
|
||||
|
||||
@@ -9,7 +9,15 @@
|
||||
<!-- <img :src="props.item.img" alt="image">-->
|
||||
<img v-if="props.item.group_type=='طلا'|| props.item.group_type=='آبشده'|| props.item.group_type== null" :src="defaultImg">
|
||||
<div class="mt-3">{{props.item?.title?? '-'}}</div>
|
||||
<div class="mt-1 flex gap-1"> <div class="font-bold"> {{props.item?.wallet?.gold?? '-'}} </div> {{props.item?.unit}} </div>
|
||||
<div class="mt-1 flex flex-col items-center gap-0.5 text-center">
|
||||
<div class="flex gap-1">
|
||||
<div class="font-bold">{{ props.item?.wallet?.gold ?? '-' }}</div>
|
||||
{{ getProductQuantityUnit(props.item) }}
|
||||
</div>
|
||||
<div v-if="getProductUnitWeightLabel(props.item)" class="text-xs text-gray-500">
|
||||
هر عدد {{ getProductUnitWeightLabel(props.item) }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- {{props.item?.wallet[0]?.cash}}-->
|
||||
</div>
|
||||
</template>
|
||||
@@ -30,6 +38,7 @@ import sekkeImg from "@/assets/img/sekkeImg.svg"
|
||||
import type { Product } from '@/models/products'
|
||||
import mesImg from "@/assets/img/mesImg.jpg";
|
||||
import noghrehImg from "@/assets/img/noghrehImg.webp";
|
||||
import { getProductQuantityUnit, getProductUnitWeightLabel } from '@/utils/productDealMethod'
|
||||
/*function itemImg() {
|
||||
|
||||
}*/
|
||||
|
||||
@@ -10,33 +10,6 @@
|
||||
<img :src="img" alt="" class="w-full absolute bottom-0 left-0 opacity-5 pointer-events-none z-0" />
|
||||
<div class="pt-15 flex flex-col relative z-10">
|
||||
<div class="text-tertiary font-bold mr-5 z-20">موجودی دارایی ها</div>
|
||||
<template v-if="isBoursecuProject()">
|
||||
<div class="flex justify-center mt-2 w-full z-20">
|
||||
{{ BOURSECU_ASSET_LABEL_KATOD }}:
|
||||
<div class="text-l mr-4 font-bold">
|
||||
{{ formatBoursecuAssetAmount(walletStore.walletInfo?.count_katod_mes) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-center mt-2 w-full z-20">
|
||||
{{ BOURSECU_ASSET_LABEL_MAFTOL }}:
|
||||
<div class="text-l mr-4 font-bold">
|
||||
{{ formatBoursecuAssetAmount(walletStore.walletInfo?.count_maftol_mes) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-center mt-2 w-full z-20">
|
||||
{{ BOURSECU_ASSET_LABEL_GOLD }}:
|
||||
<div class="text-l mr-4 font-bold">
|
||||
{{ formatBoursecuAssetAmount(walletStore.walletInfo?.count_gold) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-center mt-2 w-full z-20">
|
||||
دارایی ریالی:
|
||||
<div class="text-l mr-4 font-bold">
|
||||
{{ usePriceWithoutType(walletStore.walletInfo?.count_cash ?? 0) }}ریال
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="flex mt-4 justify-center mt-2 w-full z-20">
|
||||
محصولات:
|
||||
<div class="text-l mr-4 font-bold">{{ walletStore.walletInfo?.count_product ?? 0}}عدد</div>
|
||||
@@ -49,9 +22,9 @@
|
||||
دارایی مس:
|
||||
<div class="text-l mr-4 font-bold">{{ walletStore.walletInfo?.count_copper ?? 0}}گرم</div>
|
||||
</div>
|
||||
<div class="flex justify-center mt-2 w-full z-20">
|
||||
دارایی طلایی:
|
||||
<div class="text-l mr-4 font-bold">{{ walletStore.walletInfo?.count_gold ?? 0}}گرم</div>
|
||||
<div v-if="!isBoursecuProject" class="flex justify-center mt-2 w-full z-20">
|
||||
{{ metalAssetLabel }}:
|
||||
<div class="text-l mr-4 font-bold">{{ walletStore.walletInfo?.count_gold ?? 0 }}{{ getWeightUnit() }}</div>
|
||||
</div>
|
||||
<div class="flex justify-center mt-2 w-full z-20">
|
||||
دارایی ریالی:
|
||||
@@ -61,7 +34,6 @@
|
||||
معادل ریالی مجموع دارایی ها:
|
||||
<div class="text-l mr-4 font-bold">{{ usePriceWithoutType(walletStore.walletInfo?.count_cash_total ?? 0) }}ریال</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pt-[20rem] ">
|
||||
@@ -99,7 +71,7 @@ import BasicModal from "@/components/BasicPacks/BasicModal.vue";
|
||||
import img from '@/assets/img/user_ly1.svg'
|
||||
import empty from '@/assets/img/cash_empty.svg'
|
||||
import Item from './components/Item.vue'
|
||||
import {onMounted, ref} from "vue";
|
||||
import {onMounted, ref, computed} from "vue";
|
||||
import {loading} from "@/utils";
|
||||
import type {TableOutput} from "@/models/table";
|
||||
import type {Fund} from "@/models/fund";
|
||||
@@ -110,13 +82,9 @@ import {usePriceWithoutType} from "../../../utils/usePrice";
|
||||
import {useWalletStore} from "@/store/walletStore";
|
||||
import {useConfigStore} from "@/store/configStore";
|
||||
import { isBoursecuProject } from '@/utils/config'
|
||||
import {
|
||||
BOURSECU_ASSET_LABEL_GOLD,
|
||||
BOURSECU_ASSET_LABEL_KATOD,
|
||||
BOURSECU_ASSET_LABEL_MAFTOL,
|
||||
formatBoursecuAssetAmount,
|
||||
} from '@/utils/productDealMethod'
|
||||
import { formatBoursecuAssetAmount, getMetalAssetLabel, getWeightUnit } from '@/utils/productDealMethod'
|
||||
const nameProject = useConfigStore().config.name
|
||||
const metalAssetLabel = computed(() => getMetalAssetLabel())
|
||||
|
||||
const items = ref<Fund[]>([])
|
||||
const tableOutput = ref<TableOutput<Fund> | null>(null)
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
<div class="flex justify-evenly w-full px-2 h-11 items-center bg-gray-50 relative rounded ">
|
||||
<div :class="isBuy?'text-tertiary':'text-gray-400'" class="w-full text-center z-2"
|
||||
@click.stop="setIsBuy(true) ">
|
||||
خرید طلا {{ props?.ProductItem?.title }}
|
||||
خرید {{ meltedGoldLabel }} {{ props?.ProductItem?.title }}
|
||||
</div>
|
||||
<div :class="!isBuy?'text-tertiary':'text-gray-400'" class="w-full text-center z-2"
|
||||
@click.stop="setIsBuy(false) ">
|
||||
فروش طلا {{ props?.ProductItem?.title }}
|
||||
فروش {{ meltedGoldLabel }} {{ props?.ProductItem?.title }}
|
||||
</div>
|
||||
<!-- <div ref="bganim" class="absolute bg-white h-8 w-1/2 rounded-lg " :style="`transform: translateX(${isbuy? '0':'-100%'}); left: ${isbuy? '0':'100%'}`"></div>-->
|
||||
<div ref="bganim" :style="useStyle()"
|
||||
@@ -160,7 +160,7 @@
|
||||
<div class="flex justify-between mt-3">
|
||||
<div>مظنه:</div>
|
||||
<div class="flex items-center">
|
||||
<div class="font-bold">{{ usePriceWithoutType(isBuy ? price.buy ?? 0 : price.sell ?? 0) }}</div>
|
||||
<div class="font-bold">{{ usePriceWithoutType(isBuy ? getTradeBuyPrice(lastPrice) : getTradeSellPrice(lastPrice)) }}</div>
|
||||
<div class="text-xs mr-1">ریال</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -227,16 +227,21 @@ import type { Transaction } from '@/models/transaction'
|
||||
import type { TableEngineInput, TableOutput } from '@/models/table'
|
||||
import { useInfiniteScroll } from '@vueuse/core'
|
||||
import { getTransactionTable } from '@/api/transaction'
|
||||
import { getLastPrices, getUpPrice, lastPrice, setIntervalGetAllPrice, stopPriceInterval } from '@/utils/price'
|
||||
import { getProductBuyPrice, getProductSellPrice } from '@/utils/productPrice'
|
||||
import { getLastPrices, getTradeBuyPrice, getTradeSellPrice, lastPrice, setIntervalGetAllPrice, stopPriceInterval } from '@/utils/price'
|
||||
import type { Product } from '@/models/products'
|
||||
import { useFundUserStore } from '@/store/fundStore'
|
||||
import {useConfigStore} from "@/store/configStore";
|
||||
import { calcFeeInGrams, loadServiceFeeFromSettings } from '@/utils/serviceFee'
|
||||
import { formatCashWalletBalanceText, formatGoldWalletBalanceText } from '@/utils/productDealMethod'
|
||||
import { useSettingsStore } from '@/store/settingsStore'
|
||||
import { storeToRefs } from 'pinia'
|
||||
|
||||
const infoVisible = ref(false)
|
||||
const walletStore = useWalletStore()
|
||||
const userStore = useUserStore()
|
||||
const settingsStore = useSettingsStore()
|
||||
const { meltedGoldLabel } = storeToRefs(settingsStore)
|
||||
const fundStore = useFundUserStore()
|
||||
const confirmAction = ref<boolean>(false)
|
||||
const noCompleteVisible = ref<boolean>(false)
|
||||
@@ -273,9 +278,13 @@ const sellPagination = ref<TableEngineInput>({
|
||||
}], limit: 6, page: 0
|
||||
})
|
||||
|
||||
const unitPrice = computed(() =>
|
||||
isBuy.value ? price.value?.buy ?? 0 : price.value?.sell ?? 0
|
||||
)
|
||||
const unitPrice = computed(() => {
|
||||
const product = props.ProductItem
|
||||
if (product?.group_type === 'آبشده') {
|
||||
return isBuy.value ? getProductBuyPrice(product) : getProductSellPrice(product)
|
||||
}
|
||||
return isBuy.value ? getTradeBuyPrice(lastPrice.value) : getTradeSellPrice(lastPrice.value)
|
||||
})
|
||||
const feeInGrams = computed(() => calcFeeInGrams(form.value?.goldValue))
|
||||
const finalPrice = computed(() => (form.value?.goldValue ?? 0) * unitPrice.value)
|
||||
const feeInRial = computed(() => unitPrice.value * feeInGrams.value)
|
||||
@@ -292,7 +301,8 @@ const disableTransaction = computed(() =>
|
||||
form.value?.goldCash === undefined ||
|
||||
(isBuy.value ? (form.value?.goldCash ?? 0) < 500000 : (form.value?.goldValue ?? 0) < 0.001) ||
|
||||
(!isBuy.value && form.value.goldValue > walletStore?.walletInfo?.gold) ||
|
||||
price.value?.buy === undefined)
|
||||
!lastPrice.value ||
|
||||
(isBuy.value ? getTradeBuyPrice(lastPrice.value) <= 0 : getTradeSellPrice(lastPrice.value) <= 0))
|
||||
|
||||
function refreshTable() {
|
||||
sellItems.value = []
|
||||
@@ -468,7 +478,7 @@ const limitedPrice = computed(() => {
|
||||
})
|
||||
|
||||
function syncFormWithLatestPrice() {
|
||||
if (!price.value) return
|
||||
if (!lastPrice.value) return
|
||||
|
||||
const goldValue = form.value.goldValue
|
||||
if (goldValue !== undefined && goldValue !== null && goldValue !== '' && !isNaN(Number(goldValue))) {
|
||||
@@ -483,7 +493,7 @@ function syncFormWithLatestPrice() {
|
||||
}
|
||||
|
||||
watch(
|
||||
() => [lastPrice.value?.buy, lastPrice.value?.sell, isBuy.value],
|
||||
() => [getTradeBuyPrice(lastPrice.value), getTradeSellPrice(lastPrice.value), isBuy.value],
|
||||
() => {
|
||||
syncFormWithLatestPrice()
|
||||
}
|
||||
@@ -491,48 +501,36 @@ watch(
|
||||
|
||||
function calculateCash(val: number) {
|
||||
priceErrorVisible.value = false
|
||||
// console.log(val)
|
||||
if (price.value) {
|
||||
if (isBuy.value) {
|
||||
if (val) form.value.goldCash = parseFloat((val * price?.value?.buy).toFixed(0))
|
||||
else form.value.goldCash = undefined
|
||||
} else {
|
||||
if (val) form.value.goldCash = parseFloat((val * price?.value?.sell).toFixed(0))
|
||||
else form.value.goldCash = undefined
|
||||
}
|
||||
}
|
||||
if (!lastPrice.value) return
|
||||
|
||||
const unit = isBuy.value ? getTradeBuyPrice(lastPrice.value) : getTradeSellPrice(lastPrice.value)
|
||||
form.value.goldCash = val ? parseFloat((val * unit).toFixed(0)) : undefined
|
||||
}
|
||||
|
||||
function calculateGold(val: number) {
|
||||
// console.log(val)
|
||||
// form.value.goldCash = usePriceWithoutType(form.value.goldCash)
|
||||
if (price.value) {
|
||||
if (isBuy.value) {
|
||||
if (val) {
|
||||
form.value.goldValue = toFixedDownThreeChar(parseFloat(val / price?.value?.buy))
|
||||
if (parseInt(finalPrice.value) > 0) priceErrorVisible.value = true
|
||||
if (parseInt(finalPrice.value) === 0) priceErrorVisible.value = false
|
||||
} else if (val.toString() === '') {
|
||||
form.value.goldValue = undefined
|
||||
priceErrorVisible.value = false
|
||||
} else {
|
||||
form.value.goldValue = 0
|
||||
priceErrorVisible.value = false
|
||||
}
|
||||
if (!lastPrice.value) return
|
||||
|
||||
const unit = isBuy.value ? getTradeBuyPrice(lastPrice.value) : getTradeSellPrice(lastPrice.value)
|
||||
if (isBuy.value) {
|
||||
if (val) {
|
||||
form.value.goldValue = toFixedDownThreeChar(parseFloat(String(val / unit)))
|
||||
priceErrorVisible.value = parseInt(finalPrice.value) > 0
|
||||
} else if (val.toString() === '') {
|
||||
form.value.goldValue = undefined
|
||||
priceErrorVisible.value = false
|
||||
} else {
|
||||
if (val) {
|
||||
form.value.goldValue = toFixedDownThreeChar(parseFloat((val / price?.value?.sell)))
|
||||
if (parseInt(finalPrice.value) > 0) priceErrorVisible.value = true
|
||||
if (parseInt(finalPrice.value) === 0) priceErrorVisible.value = false
|
||||
} else if (val.toString() === '') {
|
||||
// console.log('sasasasasasa')
|
||||
form.value.goldValue = undefined
|
||||
priceErrorVisible.value = false
|
||||
} else {
|
||||
form.value.goldValue = 0
|
||||
priceErrorVisible.value = false
|
||||
}
|
||||
form.value.goldValue = 0
|
||||
priceErrorVisible.value = false
|
||||
}
|
||||
} else if (val) {
|
||||
form.value.goldValue = toFixedDownThreeChar(parseFloat(String(val / unit)))
|
||||
priceErrorVisible.value = parseInt(finalPrice.value) > 0
|
||||
} else if (val.toString() === '') {
|
||||
form.value.goldValue = undefined
|
||||
priceErrorVisible.value = false
|
||||
} else {
|
||||
form.value.goldValue = 0
|
||||
priceErrorVisible.value = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -573,18 +571,16 @@ const formatter = (value: number) => {
|
||||
const price = computed((): Price => <Price>lastPrice.value ?? 0)
|
||||
|
||||
const goldPriceValue = computed(() => {
|
||||
// if (!price.value) return 0
|
||||
if (!lastPrice.value?.price) return 0
|
||||
return isBuy.value
|
||||
? (price.value.buy ?? 0)
|
||||
: (price.value.sell ?? 0)
|
||||
return isBuy.value
|
||||
? getTradeBuyPrice(lastPrice.value)
|
||||
: getTradeSellPrice(lastPrice.value)
|
||||
})
|
||||
|
||||
async function initPrice() {
|
||||
try {
|
||||
// chartLoading.value = true
|
||||
await getLastPrices()
|
||||
await getUpPrice()
|
||||
await setIntervalGetAllPrice()
|
||||
loading.value = true
|
||||
} catch (e) {
|
||||
@@ -605,7 +601,7 @@ async function ok() {
|
||||
infoVisible.value = true
|
||||
await createOrder({
|
||||
direction: isBuy.value ? 1 : 2,
|
||||
price: isBuy.value ? price.value?.buy : price.value?.sell,
|
||||
price: isBuy.value ? getTradeBuyPrice(lastPrice.value) : getTradeSellPrice(lastPrice.value),
|
||||
amount: form.value.goldValue ?? 0
|
||||
})
|
||||
await walletStore.getMyWallet()
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
محصولات:
|
||||
<div class="text-l mr-2 font-bold">{{ userStore?.userInfo?.wallet?.count_product ?? 0 }} عدد</div>
|
||||
</div>
|
||||
<div class="flex mt-2 justify-center text-tertiary w-full z-20">
|
||||
دارایی طلایی:
|
||||
<div v-if="!isBoursecuProject()" class="flex mt-2 justify-center text-tertiary w-full z-20">
|
||||
{{ metalAssetLabel }}:
|
||||
<div class="text-l mr-2 font-bold">{{ (userStore?.userInfo?.wallet?.count_gold ?? 0).toFixed(3) }} گرم</div>
|
||||
<BasicIcon @click="$emit('openGoldModal')" icon="vuesax-linear:info-circle" size="18" color="tertiary" />
|
||||
</div>
|
||||
@@ -18,11 +18,15 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useUserStore } from '@/store/userStore'
|
||||
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
||||
import {usePriceWithoutType} from "../../../../utils/usePrice";
|
||||
import { isBoursecuProject } from '@/utils/config'
|
||||
import { getMetalAssetLabel } from '@/utils/productDealMethod'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const metalAssetLabel = computed(() => getMetalAssetLabel())
|
||||
|
||||
defineEmits<{
|
||||
openGoldModal: []
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<script setup lang="ts">
|
||||
import Icon from '@/components/BasicPacks/BasicIcon.vue'
|
||||
import { useConfigStore } from '@/store/configStore'
|
||||
import {lastPrice, percentPriceChanged, price} from '@/utils/price'
|
||||
import { getTradeBuyPrice, lastPrice, percentPriceChanged, price } from '@/utils/price'
|
||||
import Vue3Odometer from 'vue3-odometer'
|
||||
import 'odometer/themes/odometer-theme-default.css'
|
||||
import {useTowDecimal} from "../../../../utils/usePrice";
|
||||
@@ -42,19 +42,19 @@ const config = useConfigStore()
|
||||
|
||||
// محاسبه درصد تغییرات به صورت reactive
|
||||
const percentChange = computed(() => {
|
||||
if (! lastPrice?.value?.price_last) return 0
|
||||
if (!getTradeBuyPrice(lastPrice.value)) return 0
|
||||
return percentPriceChanged()
|
||||
})
|
||||
|
||||
// بررسی بسته بودن بازار
|
||||
const isMarketClosed = computed(() => {
|
||||
return lastPrice?.value?.goldir === 0 && lastPrice?.value?.price_last === 0
|
||||
return lastPrice?.value?.goldir === 0 && getTradeBuyPrice(lastPrice.value) === 0
|
||||
})
|
||||
|
||||
// مقدار نمایشی برای ادومتر (با مدیریت خطا)
|
||||
const displayGoldVal = computed(() => {
|
||||
if (isMarketClosed.value) return 0
|
||||
return lastPrice?.value?.price_last|| 0
|
||||
return getTradeBuyPrice(lastPrice.value)
|
||||
})
|
||||
|
||||
// انیمیشن fade-in
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div>بالاترین قیمت امروز</div>
|
||||
<div v-if="price" class="flex flex-col items-center mt-3">
|
||||
<div class="text-green-600 flex gap-1 text-xs items-center">
|
||||
<div class="text-base">{{ usePriceWithoutType(price?.buy ?? 0) }}</div>
|
||||
<div class="text-base">{{ usePriceWithoutType(highPrice) }}</div>
|
||||
ریال
|
||||
</div>
|
||||
</div>
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="flex w-full mt-3 justify-evenly">
|
||||
<div v-if="price" class="flex flex-col items-center">
|
||||
<div class="text-red-600 flex gap-1 text-xs items-center">
|
||||
<div class="text-base">{{ usePriceWithoutType(price?.sell ?? 0) }}</div>
|
||||
<div class="text-base">{{ usePriceWithoutType(lowPrice) }}</div>
|
||||
ریال
|
||||
</div>
|
||||
</div>
|
||||
@@ -25,10 +25,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { getTradeBuyPrice, getTradeSellPrice } from '@/utils/price'
|
||||
import { usePriceWithoutType } from '../../../../utils/usePrice'
|
||||
|
||||
import {usePriceWithoutType} from "../../../../utils/usePrice";
|
||||
|
||||
defineProps<{
|
||||
const props = defineProps<{
|
||||
price: any
|
||||
}>()
|
||||
|
||||
const highPrice = computed(() => getTradeBuyPrice(props.price))
|
||||
const lowPrice = computed(() => getTradeSellPrice(props.price))
|
||||
</script>
|
||||
@@ -10,15 +10,24 @@
|
||||
<BasicIcon v-else-if="['آبشده','طلا'].includes(props.ProductItem.group_type)" stroke-width="1" size="50" color="#0A1B37" class="rotate-310" icon="vuesax-linear:slider-vertical"/>
|
||||
<BasicIcon v-else stroke-width="1" size="50" color="#0A1B37" class="rotate-310" icon="vuesax-linear:slider-vertical"/>
|
||||
</div>
|
||||
<div class="flex justify-between px-2 items-center ">
|
||||
<div class="px-2">
|
||||
<div class="flex justify-between items-center">
|
||||
<BasicIcon v-if="props.ProductItem.group_type=='گوی'" stroke-width="1" size="26" color="#0A1B37" class="rotate-310" icon="vuesax-linear:grammerly"/>
|
||||
<BasicIcon v-else-if="props.ProductItem.group_type=='سکه'" stroke-width="1" size="26" color="#0A1B37" class="rotate-310" icon="vuesax-linear:coin"/>
|
||||
<BasicIcon v-else-if="props.ProductItem.group_type=='شمش'" stroke-width="1" size="26" color="#0A1B37" class="rotate-310" icon="vuesax-linear:slider-vertical"/>
|
||||
<BasicIcon v-else-if="props.ProductItem.group_type=='مکعب'" stroke-width="1" size="26" color="#0A1B37" class="rotate-310" icon="vuesax-linear:keyboard"/>
|
||||
<BasicIcon v-else stroke-width="1" size="26" color="#0A1B37" class="rotate-310" icon="vuesax-linear:slider-vertical"/> <div class="flex justify-between gap-2 items-center">
|
||||
<BasicIcon v-else stroke-width="1" size="26" color="#0A1B37" class="rotate-310" icon="vuesax-linear:slider-vertical"/>
|
||||
<div class="flex justify-between gap-2 items-center">
|
||||
<span v-if="['آبشده','طلا'].includes(props.ProductItem.group_type)" class="font-bold text-secondary">{{userWallet.walletInfo?.gold??0}}</span>
|
||||
<span v-else class="font-bold text-secondary">{{props?.ProductItem.wallet?.gold??0}}</span>
|
||||
<span class="text-gray-400">{{props?.ProductItem?.unit}}</span>
|
||||
<span v-else class="font-bold text-secondary">{{ props?.ProductItem.wallet?.gold ?? 0 }}</span>
|
||||
<span class="text-gray-400">{{ getProductQuantityUnit(props.ProductItem) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="getProductUnitWeightLabel(props.ProductItem)"
|
||||
class="mt-1 text-left text-xs text-gray-400"
|
||||
>
|
||||
هر عدد {{ getProductUnitWeightLabel(props.ProductItem) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,6 +39,7 @@
|
||||
import BasicIcon from "@/components/BasicPacks/BasicIcon.vue";
|
||||
import type {PInventory} from "@/models/products";
|
||||
import {useWalletStore} from "../../../../store/walletStore";
|
||||
import { getProductQuantityUnit, getProductUnitWeightLabel } from '@/utils/productDealMethod'
|
||||
interface Prop {
|
||||
ProductItem: PInventory
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ import {useWalletStore} from '@/store/walletStore'
|
||||
import {useConfigStore} from '@/store/configStore'
|
||||
import {useFundUserStore} from '@/store/fundStore'
|
||||
import {usePrice, usePriceWithoutType} from '../../../utils/usePrice'
|
||||
import {getLastPrices, getUpPrice, lastPrice, price, setIntervalGetAllPrice, stopPriceInterval} from '@/utils/price'
|
||||
import {getLastPrices, lastPrice, price, setIntervalGetAllPrice, stopPriceInterval} from '@/utils/price'
|
||||
import {getConstByKey} from '@/api/const'
|
||||
import {message, Modal} from 'ant-design-vue'
|
||||
|
||||
@@ -260,7 +260,6 @@ onMounted(async () => {
|
||||
await Promise.all([
|
||||
loadFunds(),
|
||||
getLastPrices(),
|
||||
getUpPrice(),
|
||||
fetchPrices(),
|
||||
setIntervalGetAllPrice(),
|
||||
loadBanners()
|
||||
|
||||
@@ -32,15 +32,20 @@
|
||||
</div>
|
||||
<div class="flex mt-3 justify-between items-center">
|
||||
<div>تعداد موجودی:</div>
|
||||
<div class="flex gap-1 items-center">
|
||||
<div class="font-bold">{{ val.product.wallet.gold }}</div>
|
||||
<div>{{ val.product.unit }}</div>
|
||||
<div class="flex flex-col items-end gap-0.5">
|
||||
<div class="flex gap-1 items-center">
|
||||
<div class="font-bold">{{ val.product.wallet.gold }}</div>
|
||||
<div>{{ getProductQuantityUnit(val.product) }}</div>
|
||||
</div>
|
||||
<div v-if="getProductUnitWeightLabel(val.product)" class="text-xs text-gray-500">
|
||||
هر عدد {{ getProductUnitWeightLabel(val.product) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-between items-center mt-2">
|
||||
<div>تعداد درخواستی:</div>
|
||||
<div class="flex gap-1 items-center w-40%">
|
||||
<BasicInput v-model:value="val.count" addon-before="عدد"/>
|
||||
<BasicInput v-model:value="val.count" :addon-before="getProductQuantityUnit(val.product)"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -104,6 +109,7 @@ import {message} from "ant-design-vue"
|
||||
import New_EditAddress from "@/views/base/address/components/New_EditAddress.vue"
|
||||
import mesImg from "@/assets/img/mesImg.jpg";
|
||||
import noghrehImg from "@/assets/img/noghrehImg.webp";
|
||||
import { getProductQuantityUnit, getProductUnitWeightLabel } from '@/utils/productDealMethod'
|
||||
|
||||
const items = ref<PInventory[]>()
|
||||
const baseItems = ref<PInventory[]>()
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<div @click="router.back()">
|
||||
<BasicIcon icon="vuesax-linear:arrow-right-1"/>
|
||||
</div>
|
||||
<div v-if="route.name=='list'" class="mr-2">دریافت طلای فیزیکی</div>
|
||||
<div v-else class="mr-2">دریافت طلای فیزیکی-درخواست جدید</div>
|
||||
<div v-if="route.name=='list'" class="mr-2">دریافت فیزیکی</div>
|
||||
<div v-else class="mr-2">دریافت فیزیکی-درخواست جدید</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -79,20 +79,27 @@
|
||||
<div>{{ usePrice(form.goldCash ?? 0) }}</div>
|
||||
</div>
|
||||
|
||||
<div v-if="props?.ProductItem?.group_type !== 'سکه'" class="flex justify-between">
|
||||
<div> وزن کل</div>
|
||||
<div>{{ form.goldVazn ?? 0 }} {{ getWeightUnit() }}</div>
|
||||
<div v-if="shouldShowProductTotalWeight(props?.ProductItem)" class="flex justify-between">
|
||||
<div>وزن کل</div>
|
||||
<div>{{ totalWeightDisplay }}</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="isCountBasedProductItem && hasProductUnitWeight(props?.ProductItem)"
|
||||
class="flex justify-between text-xs text-gray-500"
|
||||
>
|
||||
<div>وزن هر عدد</div>
|
||||
<div>{{ getProductUnitWeightLabel(props?.ProductItem) }}</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>{{ goldWalletBalanceText }}</div>
|
||||
<div v-if="isBuy && (form.method === 'gold' || form.method === 'katod')" class="font-bold text-xs">
|
||||
<div>{{ buyMetalWalletBalanceText }}</div>
|
||||
</div>
|
||||
<div v-else-if="isBuy" class="font-bold text-xs">
|
||||
<div v-else-if="isBuy && form.method === 'cash'" class="font-bold text-xs">
|
||||
{{ cashWalletBalanceText }}
|
||||
</div>
|
||||
<div class="font-bold text-xs" v-else>{{ `موجودی محصول: ${getInventoryById(props?.ProductItem?.id)}` }}
|
||||
<div class="font-bold text-xs" v-else>{{ `موجودی محصول: ${getInventoryById(props?.ProductItem?.id)} ${getProductQuantityUnit(props?.ProductItem)}` }}
|
||||
</div>
|
||||
</Transition>
|
||||
<Transition mode="out-in" name="fade">
|
||||
@@ -184,7 +191,7 @@
|
||||
<div class="flex items-center">
|
||||
<div class="font-bold">{{ form.goldValue }}</div>
|
||||
<div class="text-xs mr-1"> عدد</div>
|
||||
<div class="text-base font-bold mr-1"> عدد {{ props?.ProductItem?.title }}</div>
|
||||
<div class="text-base font-bold mr-1"> {{ props?.ProductItem?.title }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-between mt-3">
|
||||
@@ -250,7 +257,7 @@ import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
||||
import type { Transaction } from '@/models/transaction'
|
||||
import type { TableEngineInput, TableOutput } from '@/models/table'
|
||||
import { getTransactionTable } from '@/api/transaction'
|
||||
import { getLastPrices, lastPrice} from '@/utils/price'
|
||||
import { getLastPrices, getTradeBuyPrice, getTradeSellPrice, lastPrice, setIntervalGetAllPrice, stopPriceInterval } from '@/utils/price'
|
||||
import { Product } from '@/models/products'
|
||||
import BasicSelect from '@/components/BasicPacks/BasicSelect.vue'
|
||||
import Bg_main from '@/components/bg_main.vue'
|
||||
@@ -258,20 +265,46 @@ import { useFundUserStore } from '@/store/fundStore'
|
||||
import {
|
||||
getDefaultProductDealMethod,
|
||||
getProductDealMethodOptions,
|
||||
isCashLikeDealMethod,
|
||||
formatCashWalletBalanceText,
|
||||
formatGoldWalletBalanceText,
|
||||
getWeightUnit,
|
||||
formatMainMetalWalletBalanceText,
|
||||
formatProductWeightAmount,
|
||||
getProductQuantityUnit,
|
||||
getProductTotalWeightLabel,
|
||||
getProductUnitWeightLabel,
|
||||
hasProductUnitWeight,
|
||||
isCountBasedProduct,
|
||||
shouldShowProductTotalWeight,
|
||||
} from '@/utils/productDealMethod'
|
||||
|
||||
const typeDeal = computed(() => getProductDealMethodOptions(props?.ProductItem?.group_type))
|
||||
|
||||
const productGroupType = computed(() => props?.ProductItem?.group_type)
|
||||
const isCountBasedProductItem = computed(() => isCountBasedProduct(props?.ProductItem))
|
||||
const totalWeightDisplay = computed(() => {
|
||||
const product = props?.ProductItem
|
||||
if (!product) {
|
||||
return formatProductWeightAmount(0, product)
|
||||
}
|
||||
|
||||
if (isCountBasedProductItem.value) {
|
||||
return getProductTotalWeightLabel(form.value.goldValue, product)
|
||||
?? formatProductWeightAmount(0, product)
|
||||
}
|
||||
|
||||
return formatProductWeightAmount(form.value.goldVazn ?? 0, product)
|
||||
})
|
||||
|
||||
const goldWalletBalanceText = computed(() =>
|
||||
formatGoldWalletBalanceText(walletStore?.walletInfo?.gold ?? 0, productGroupType.value)
|
||||
)
|
||||
|
||||
const buyMetalWalletBalanceText = computed(() =>
|
||||
form.value.method === 'katod'
|
||||
? formatMainMetalWalletBalanceText(walletStore?.walletInfo?.gold ?? 0)
|
||||
: goldWalletBalanceText.value
|
||||
)
|
||||
|
||||
const cashWalletBalanceText = computed(() =>
|
||||
formatCashWalletBalanceText(
|
||||
usePriceWithoutType(walletStore?.walletInfo?.cash ?? 0),
|
||||
@@ -352,7 +385,8 @@ const disableTransaction = computed(() =>
|
||||
form.value?.goldCash === undefined ||
|
||||
(isBuy.value ? (form.value?.goldCash ?? 0) < 500000 : (form.value?.goldValue ?? 0) < 0.001) ||
|
||||
// (!isBuy.value && form.value.goldValue > walletStore?.walletInfo?.gold) ||
|
||||
price.value?.buy === undefined)
|
||||
!lastPrice.value ||
|
||||
(isBuy.value ? getTradeBuyPrice(lastPrice.value) <= 0 : getTradeSellPrice(lastPrice.value) <= 0))
|
||||
|
||||
function refreshTable() {
|
||||
sellItems.value = []
|
||||
@@ -557,8 +591,9 @@ function handleGoldValueChange(val: string | number | undefined) {
|
||||
|
||||
function calculateCash(val: number) {
|
||||
priceErrorVisible.value = false
|
||||
if (price.value) {
|
||||
form.value.goldVazn = parseFloat(val * props?.ProductItem?.amount)
|
||||
if (!lastPrice.value) return
|
||||
|
||||
form.value.goldVazn = parseFloat(String(val * props?.ProductItem?.amount))
|
||||
// form.value.goldVazn = parseFloat((val * (( props?.ProductItem?.price) + (props?.ProductItem?.cash_fee_buy)))/lastPrice.value?.buy).toFixed(2)
|
||||
if (isBuy.value) {
|
||||
if (val){
|
||||
@@ -589,7 +624,6 @@ function calculateCash(val: number) {
|
||||
form.value.goldVazn = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*function calculateGold(val: number) {
|
||||
@@ -673,9 +707,6 @@ async function initPrice() {
|
||||
await getLastPrices()
|
||||
// await setIntervalGetPrice()
|
||||
loading.value = true
|
||||
price.value = lastPrice.value
|
||||
/*props.ProductItem.price = lastPrice.value?.buy * props.ProductItem?.amount
|
||||
props.ProductItem.sellPrice = lastPrice.value?.sell * props.ProductItem?.amount*/
|
||||
props.ProductItem.price = lastPrice?.value?.price? (lastPrice?.value?.price + props.ProductItem?.cash_fee_buy) * props.ProductItem?.amount: 0
|
||||
props.ProductItem.sellPrice = lastPrice?.value?.price? (lastPrice?.value?.price - props.ProductItem?.percent_fee_sell) * props.ProductItem?.amount:0
|
||||
} catch (e) {
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
<div class="flex items-center">
|
||||
<div class="font-bold">{{ form.goldValue }}</div>
|
||||
<div class="text-xs mr-1"> عدد</div>
|
||||
<div class="text-base font-bold mr-1"> عدد {{ props?.ProductItem?.title }}</div>
|
||||
<div class="text-base font-bold mr-1"> {{ props?.ProductItem?.title }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-between mt-3">
|
||||
|
||||
@@ -32,8 +32,7 @@ import type {Product} from "@/models/products";
|
||||
import {usePrice} from '@/utils/usePrice';
|
||||
import {getFileUrl} from '@/utils/file';
|
||||
import {computed, ref} from "vue";
|
||||
import { lastPrice } from '@/utils/price'
|
||||
import type { Price } from '@/models/home'
|
||||
import { getProductBuyPrice } from '@/utils/productPrice'
|
||||
|
||||
interface Prop {
|
||||
ProductItem: Product
|
||||
@@ -88,12 +87,7 @@ const price = computed(()=>{
|
||||
}
|
||||
})
|
||||
|
||||
const priceLast = computed((): Price => <Price>lastPrice.value ?? 0)
|
||||
|
||||
const goldPriceValue = computed(() => {
|
||||
if (!priceLast.value) return 0
|
||||
return priceLast.value.buy
|
||||
})
|
||||
const goldPriceValue = computed(() => getProductBuyPrice(props.ProductItem))
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -219,9 +219,7 @@ async function initPrice() {
|
||||
try {
|
||||
// chartLoading.value = true
|
||||
await getLastPrices()
|
||||
// await setIntervalGetPrice()
|
||||
loading.value = true
|
||||
price.value = lastPrice.value
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
} finally {
|
||||
|
||||
@@ -54,17 +54,25 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="item.order" class="flex justify-between mb-3">
|
||||
<div class="text-primary">قیمت هر گرم طلا حین معامله:</div>
|
||||
<div class="text-primary">قیمت هر گرم {{ getTradePriceUnitLabel() }} حین معامله:</div>
|
||||
<div class="flex text-xs items-center number-ltr">
|
||||
<div class="text-base ml-1">{{ usePriceWithoutType(item.order?.price?? 0) }}</div>
|
||||
ریال
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-between mb-3">
|
||||
<div class="text-primary">مقدار {{item.wallet?.product? item.wallet.product.title: 'آبشده' }} مبادله شده:</div>
|
||||
<div :class="item.gold >= 0? 'text-green-600' : 'text-red-600'" class="flex text-xs items-center number-ltr">
|
||||
<div class="text-base ml-1">{{ item.gold }}</div>
|
||||
{{item.unit}}
|
||||
<div class="text-primary">مقدار {{ item.wallet?.product ? item.wallet.product.title : getMeltedGoldTradeLabel() }} مبادله شده:</div>
|
||||
<div :class="item.gold >= 0? 'text-green-600' : 'text-red-600'" class="flex flex-col items-end text-xs number-ltr">
|
||||
<div class="flex items-center">
|
||||
<div class="text-base ml-1">{{ item.gold }}</div>
|
||||
{{ item.unit }}
|
||||
</div>
|
||||
<div
|
||||
v-if="item.wallet?.product && getProductTotalWeightLabel(Math.abs(item.gold ?? 0), item.wallet.product)"
|
||||
class="text-gray-500"
|
||||
>
|
||||
{{ getProductTotalWeightLabel(Math.abs(item.gold ?? 0), item.wallet.product) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-between mb-3">
|
||||
@@ -76,9 +84,14 @@
|
||||
</div>
|
||||
<div class="flex justify-between mb-3" v-if="item.wallet?.product">
|
||||
<div class="text-primary">موجودی {{item.wallet.product.title}}:</div>
|
||||
<div class="flex text-xs text-yellow-700 items-center">
|
||||
<div class="text-base ml-1">{{ item.balance_gold }}</div>
|
||||
{{item.wallet.product.unit}}
|
||||
<div class="flex flex-col items-end text-xs text-yellow-700">
|
||||
<div class="flex items-center">
|
||||
<div class="text-base ml-1">{{ item.balance_gold }}</div>
|
||||
{{ getProductQuantityUnit(item.wallet.product) }}
|
||||
</div>
|
||||
<div v-if="getProductUnitWeightLabel(item.wallet.product)" class="text-gray-500">
|
||||
هر عدد {{ getProductUnitWeightLabel(item.wallet.product) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-between mb-3" v-else>
|
||||
@@ -138,7 +151,7 @@ import BasicActionSheet from '@/components/BasicPacks/BasicActionSheet.vue'
|
||||
import { computed, ref } from 'vue'
|
||||
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
||||
import type { Transaction } from '@/models/transaction'
|
||||
import { getCashWalletLabel, getGoldWalletLabel, getWeightUnit } from '@/utils/productDealMethod'
|
||||
import { getCashWalletLabel, getGoldWalletLabel, getMeltedGoldTradeLabel, getProductQuantityUnit, getProductTotalWeightLabel, getProductUnitWeightLabel, getTradePriceUnitLabel, getWeightUnit } from '@/utils/productDealMethod'
|
||||
import { toJalaliNotime, toJalaliOutOfUTC, toTime } from '../../../../utils/useDateTime'
|
||||
|
||||
const infoVisible = ref<boolean>(false)
|
||||
|
||||
@@ -65,14 +65,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-between mb-3">
|
||||
<div class="text-black">مقدار طلا مبادله شده:</div>
|
||||
<div class="text-black">مقدار {{ getMetalTypeTradeLabel() }} مبادله شده:</div>
|
||||
<div :class="item.gold >= 0? 'text-green-600' : 'text-red-600'" class="flex text-xs items-center">
|
||||
<div class="text-base ml-1 number-ltr">{{ item.gold }}</div>
|
||||
گرم
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="item.order" class="flex justify-between mb-3">
|
||||
<div class="text-black">قیمت هر گرم طلا حین معامله:</div>
|
||||
<div class="text-black">قیمت هر گرم {{ getTradePriceUnitLabel() }} حین معامله:</div>
|
||||
<div class="flex text-xs items-center number-ltr">
|
||||
<div class="text-base ml-1">{{ usePriceWithoutType(item.order?.price?? 0) }}</div>
|
||||
ریال
|
||||
@@ -143,7 +143,7 @@ import BasicActionSheet from "@/components/BasicPacks/BasicActionSheet.vue";
|
||||
import {computed, ref} from "vue";
|
||||
import BasicButton from "@/components/BasicPacks/BasicButton.vue";
|
||||
import type {Transaction} from "@/models/transaction";
|
||||
import {getCashWalletLabel, getGoldWalletLabel, getWeightUnit} from '@/utils/productDealMethod'
|
||||
import {getCashWalletLabel, getGoldWalletLabel, getMetalTypeTradeLabel, getTradePriceUnitLabel, getWeightUnit} from '@/utils/productDealMethod'
|
||||
import {toJalaliNotime, toJalaliOutOfUTC, toTime} from "../../../../utils/useDateTime";
|
||||
|
||||
const infoVisible = ref<boolean>(false)
|
||||
|
||||
Reference in New Issue
Block a user