changes
This commit is contained in:
@@ -4,11 +4,14 @@ import usePlaceOrder from "~/components/pos/composables/usePlaceOrder";
|
||||
|
||||
const id = "confirmOrderModal";
|
||||
const emit = defineEmits(["close"]);
|
||||
const { activeCart, activeCartItems, orderInfo, getCarts } = inject("pos");
|
||||
const { subtotal, shipping_address, isPending, showVietQRModal, placeOrder, testReturnPage } = usePlaceOrder({
|
||||
const { activeCart, activeCartItems, orderInfo, fullAddress, getCarts, subtotal, total } = inject("pos");
|
||||
const { isPending, showVietQRModal, placeOrder, testReturnPage } = usePlaceOrder({
|
||||
activeCart,
|
||||
activeCartItems,
|
||||
orderInfo,
|
||||
fullAddress,
|
||||
subtotal,
|
||||
total,
|
||||
getCarts,
|
||||
onSuccess: () => emit("close"),
|
||||
});
|
||||
@@ -73,7 +76,7 @@ const { subtotal, shipping_address, isPending, showVietQRModal, placeOrder, test
|
||||
<p>Nhận tại cửa hàng</p>
|
||||
</div>
|
||||
<div v-else>
|
||||
<p class="font-medium fs-16 mb-0.5">{{ shipping_address }}</p>
|
||||
<p class="font-medium fs-16 mb-0.5">{{ fullAddress }}</p>
|
||||
<p class="has-text-grey">
|
||||
<span>{{ orderInfo.receiver_name }}</span>
|
||||
<span> • </span>
|
||||
@@ -108,10 +111,14 @@ const { subtotal, shipping_address, isPending, showVietQRModal, placeOrder, test
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user