feat(trade): separate gross price, fee and net payable into three colored rows
This commit is contained in:
@@ -147,15 +147,33 @@
|
|||||||
موجودی کیف پول ناکافی می باشد.
|
موجودی کیف پول ناکافی می باشد.
|
||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<div class="w-full px-4 rounded-2xl py-2 border-1 bg-white gold-fee-box">
|
<div class="w-full px-4 rounded-2xl py-3 border-1 bg-white gold-fee-box flex flex-col gap-2 mt-2">
|
||||||
<div class="flex justify-between items-center">
|
<!-- سطر اول: مبلغ اصل معامله (رنگ مشکی/پایه) -->
|
||||||
<div>کارمزد ({{ feeDeductsFromGold ? `از طلا` : `از ریال` }}):</div>
|
<div class="flex justify-between items-center text-xs sm:text-sm">
|
||||||
<div class="flex gap-2 items-center font-bold">
|
<span class="text-gray-600 font-medium">مبلغ اصل معامله:</span>
|
||||||
<div>{{ feeDisplayText }}</div>
|
<strong class="font-bold text-gray-800 number-ltr" dir="ltr">
|
||||||
</div>
|
{{ usePriceWithoutType(Math.round(finalPrice ?? 0)) }} ریال
|
||||||
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-xs text-gray-600 mt-1">
|
|
||||||
{{ feeFormHint }}
|
<!-- سطر دوم: کارمزد معامله (رنگ قرمز) -->
|
||||||
|
<div class="flex justify-between items-center text-xs sm:text-sm">
|
||||||
|
<span class="text-red-500 font-medium">
|
||||||
|
{{ isBuy ? `کارمزد خرید (${feePercentLabel}):` : `کسر ${feePercentLabel} کارمزد از فروش:` }}
|
||||||
|
</span>
|
||||||
|
<strong class="font-bold text-red-600 number-ltr" dir="ltr">
|
||||||
|
{{ isBuy ? `+ ${feeDisplayText}` : `− ${feeDisplayText}` }}
|
||||||
|
</strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- سطر سوم: مبلغ نهایی قابل پرداخت / قابل واریز (رنگ سبز برجسته) -->
|
||||||
|
<div class="flex justify-between items-center text-xs sm:text-sm pt-2 border-t border-gray-100">
|
||||||
|
<span class="text-green-700 font-bold">
|
||||||
|
{{ isBuy ? 'مبلغ قابل پرداخت:' : 'مبلغ قابل واریز (دریافتی):' }}
|
||||||
|
</span>
|
||||||
|
<strong class="font-bold text-green-600 text-sm sm:text-base number-ltr" dir="ltr">
|
||||||
|
{{ usePriceWithoutType(Math.round(payablePrice ?? 0)) }} ریال
|
||||||
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-form>
|
</a-form>
|
||||||
@@ -491,6 +509,10 @@ const feeDisplayText = computed(() =>
|
|||||||
: `${usePriceWithoutType(Math.round(feeInRial.value))} ریال`
|
: `${usePriceWithoutType(Math.round(feeInRial.value))} ریال`
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const feePercentLabel = computed(() =>
|
||||||
|
feeInGrams.value > 0 ? `${formatFixed(serviceFeePercentage.value * 100, 2)}%` : 'رایگان'
|
||||||
|
)
|
||||||
|
|
||||||
const displayTradeGoldAmount = computed(() =>
|
const displayTradeGoldAmount = computed(() =>
|
||||||
formatTradeGramDisplay(orderGoldAmount.value)
|
formatTradeGramDisplay(orderGoldAmount.value)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user