price calulator changed 8
This commit is contained in:
@@ -214,7 +214,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<BasicButton class="mb-20 mt-5 w-full" type="primary" @click="ok(); confirmAction= false">ثبت نهایی</BasicButton>
|
||||
<BasicButton
|
||||
class="mb-20 mt-5 w-full"
|
||||
type="primary"
|
||||
:disabled="loading"
|
||||
@click="ok"
|
||||
>
|
||||
ثبت نهایی
|
||||
</BasicButton>
|
||||
</BasicActionSheet>
|
||||
<BasicModal
|
||||
v-else
|
||||
@@ -269,7 +276,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<BasicButton class="mt-5 w-full" type="primary" @click="ok(); confirmAction = false">
|
||||
<BasicButton class="mt-5 w-full" type="primary" :disabled="loading" @click="ok">
|
||||
ثبت نهایی
|
||||
</BasicButton>
|
||||
<template #footer>
|
||||
@@ -794,6 +801,9 @@ function okConfirm() {
|
||||
}
|
||||
|
||||
async function ok() {
|
||||
if (loading.value) {
|
||||
return
|
||||
}
|
||||
if (isStoreClosed()) {
|
||||
message.warning(getStoreClosedMessage())
|
||||
return
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="dtxn-row__meta">
|
||||
<span>{{ toJalaliOutOfUTC(props.item.expire_at) }}</span>
|
||||
<span :class="goldAmount >= 0 ? 'text-green-600' : 'text-red-600'">
|
||||
{{ formatGoldAmount(goldAmount) }} {{ props.item.unit }}
|
||||
{{ formatTransactionGoldAmount(props.item, goldAmount) }} {{ props.item.unit }}
|
||||
</span>
|
||||
<span v-if="isGold">
|
||||
قیمت معامله:
|
||||
@@ -59,7 +59,7 @@
|
||||
:class="goldAmount >= 0 ? 'text-green-600' : 'text-red-600'"
|
||||
class="text-gray-500 text-xs number-ltr"
|
||||
>
|
||||
{{ formatGoldAmount(goldAmount) }}
|
||||
{{ formatTransactionGoldAmount(props.item, goldAmount) }}
|
||||
<div>{{ props.item.unit }}</div>
|
||||
</div>
|
||||
<div class="text-gray-500 flex gap-1 text-xs items-center number-ltr">
|
||||
@@ -115,12 +115,12 @@
|
||||
<script lang="ts" setup>
|
||||
import Icon from '@/components/BasicPacks/BasicIcon.vue'
|
||||
import {
|
||||
formatGoldAmount,
|
||||
getTransactionGoldAmount,
|
||||
getTransactionTradePrice,
|
||||
resolveTransactionStatusLabel,
|
||||
usePriceWithoutType,
|
||||
} from '@/utils/usePrice'
|
||||
import { formatTransactionGoldAmount } from '@/utils/productDealMethod'
|
||||
import BasicActionSheet from '@/components/BasicPacks/BasicActionSheet.vue'
|
||||
import BasicModal from '@/components/BasicPacks/BasicModal.vue'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
]"
|
||||
>
|
||||
<div class="flex items-center gap-1">
|
||||
<div class="text-base">{{ formatGoldAmount(item.gold) }}</div>
|
||||
<div class="text-base">{{ formatTransactionGoldAmount(item, item.gold) }}</div>
|
||||
{{ item.unit }}
|
||||
</div>
|
||||
<div
|
||||
@@ -82,7 +82,7 @@
|
||||
</div>
|
||||
<div class="flex flex-col items-end text-xs text-yellow-700">
|
||||
<div class="flex items-center">
|
||||
<div class="text-base ml-1">{{ formatGoldAmount(item.balance_gold) }}</div>
|
||||
<div class="text-base ml-1">{{ formatTransactionGoldAmount(item, item.balance_gold) }}</div>
|
||||
{{ metalWalletBalanceUnit }}
|
||||
</div>
|
||||
<div v-if="getProductUnitWeightLabel(metalWalletProduct)" class="text-gray-500">
|
||||
@@ -115,9 +115,10 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { formatGoldAmount, resolveTransactionStatusLabel, usePriceWithoutType } from '@/utils/usePrice'
|
||||
import { resolveTransactionStatusLabel, usePriceWithoutType } from '@/utils/usePrice'
|
||||
import type { Transaction } from '@/models/transaction'
|
||||
import {
|
||||
formatTransactionGoldAmount,
|
||||
getCashWalletLabel,
|
||||
getProductTotalWeightLabel,
|
||||
getProductUnitWeightLabel,
|
||||
|
||||
Reference in New Issue
Block a user