handle huge things!

This commit is contained in:
2026-06-03 22:04:45 +03:30
parent 198f0a164b
commit f82a0c3873
29 changed files with 778 additions and 445 deletions
+10 -1
View File
@@ -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() {
}*/
+6 -38
View File
@@ -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)