2026-05-14 13:44:43 +03:30
< template >
< BasicActionSheet v -model:show = "visible" >
< div class = "pb-20" >
< div >
< div class = "w-full text-center font-bold" > موجودی ها </ div >
< div class = "h-30vh overflow-y-auto" >
< div class = "mt-5" >
< BasicInfoItem
class = "flex justify-between"
2026-06-08 12:34:10 +03:30
: title = "`مجموعه کل دارایی ${settingsStore.metalTypeLabel}`"
2026-05-14 13:44:43 +03:30
is -line
2026-06-08 12:34:10 +03:30
: info = "`در این قسمت مجموع کل وزن ${settingsStore.metalTypeLabel} آبشده (${(walletInfo?.gold ?? 0)?.toFixed(3)}) + ارزش دارایی ها (${(walletInfo?.treasure_sum ?? 0)?.toFixed(3)} ) را مشاهده میفرمایید.`"
: infoHead = "`مجموع کل دارایی ${settingsStore.metalTypeLabel}`"
: value = "parseFloat((walletInfo?.gold_sum ?? 0).toFixed(2)) + ' ' + weightUnit"
2026-05-14 13:44:43 +03:30
/>
< a-divider class = "!my-1" />
< BasicInfoItem
class = "flex justify-between"
title = "دارایی کیف پول ریالی"
is -line
: value = "usePrice(walletInfo?.cash ?? 0)"
/>
< a-divider class = "!my-1" />
< BasicInfoItem
class = "flex justify-between"
2026-06-08 12:34:10 +03:30
: title = "`دارایی کیف پول ${settingsStore.metalTypeLabel}`"
2026-05-14 13:44:43 +03:30
is -line
2026-06-08 12:34:10 +03:30
: value = "(walletInfo?.count_gold_wallet ?? 0) + ' ' + weightUnit"
2026-05-14 13:44:43 +03:30
/>
< a-divider v-if = "nameProject === 'goldsun'" class="!my-1" />
< BasicInfoItem
v-if = "nameProject === 'goldsun'"
class = "flex justify-between"
title = "دارایی کیف پول نقره"
is -line
: value = "(walletInfo?.count_silver ?? 0) + ' گرم'"
/>
< a-divider v-if = "nameProject === 'goldsun'" class="!my-1" />
< BasicInfoItem
v-if = "nameProject === 'goldsun'"
class = "flex justify-between"
title = "دارایی کیف پول مس"
is -line
: value = "(walletInfo?.count_copper ?? 0) + ' گرم'"
/>
< a-divider class = "!my-1" />
< BasicInfoItem
class = "flex justify-between"
title = "معادل ریالی مجموع دارایی ها"
is -line
: value = "usePrice(walletInfo?.count_cash_total ?? 0)"
/>
</ div >
</ div >
</ div >
</ div >
</ BasicActionSheet >
</ template >
< script setup lang = "ts" >
import { computed } from 'vue'
import BasicActionSheet from '@/components/BasicPacks/BasicActionSheet.vue'
import BasicInfoItem from '@/components/BasicPacks/BasicInfoItem.vue'
import { useConfigStore } from '@/store/configStore'
2026-06-08 12:34:10 +03:30
import { useSettingsStore } from '@/store/settingsStore'
import { getWeightUnit } from '@/utils/productDealMethod'
2026-05-14 13:44:43 +03:30
import { usePrice } from "@/utils/usePrice" ;
const props = defineProps < {
show : boolean
walletInfo : any
goldVal : number
} > ()
const emit = defineEmits < {
'update:show' : [ value : boolean ]
} > ()
const config = useConfigStore ()
const nameProject = config . config . name
2026-06-08 12:34:10 +03:30
const settingsStore = useSettingsStore ()
const weightUnit = computed (() => getWeightUnit ())
2026-05-14 13:44:43 +03:30
const visible = computed ({
get : () => props . show ,
set : ( val ) => emit ( 'update:show' , val )
})
</ script >