This commit is contained in:
Viet An
2026-06-25 09:14:51 +07:00
parent 66ffa01c57
commit 07151bf78e
4 changed files with 48 additions and 25 deletions

View File

@@ -21,12 +21,13 @@ const { activeCartId, activeCart, activeCartItems, customerIdsWithNoCart, subtot
const { addresses, getAddresses, isChangingCus, changeCustomer } = useCustomer({ activeCart, getCarts });
const { orderInfo, isOrderValid } = useOrderInfo({
const { orderInfo, isOrderValid, fullAddress, total } = useOrderInfo({
activeCartId,
activeCart,
activeCartItems,
addresses,
getAddresses,
subtotal,
});
const showModal = ref();
@@ -63,7 +64,10 @@ provide("pos", {
activeCartItems,
isChangingCus,
orderInfo,
fullAddress,
getCarts,
subtotal,
total,
});
</script>
@@ -321,10 +325,14 @@ provide("pos", {
</td>
<td class="has-text-right">{{ $formatNum(subtotal, { hasUnit: true }) }}</td>
</tr>
<tr>
<td>Phí giao hàng</td>
<td class="has-text-right">{{ $formatNum(orderInfo.shipping_fee, { hasUnit: true }) }}</td>
</tr>
<tr>
<td class="font-bold fs-14">Tổng cộng</td>
<td class="has-text-right has-text-primary font-bold fs-18">
{{ $formatNum(subtotal, { hasUnit: true }) }}
{{ $formatNum(total, { hasUnit: true }) }}
</td>
</tr>
</tbody>