This commit is contained in:
Viet An
2026-06-22 16:06:12 +07:00
parent cb5d63b064
commit e9fcfbe610
5 changed files with 50 additions and 38 deletions

View File

@@ -3,5 +3,8 @@
"[vue]": { "[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnSave": true "editor.formatOnSave": true
} }

View File

@@ -80,7 +80,7 @@ provide("pos", {
</div> --> </div> -->
<template v-if="activeCartId && carts?.length > 0"> <template v-if="activeCartId && carts?.length > 0">
<CartTabs /> <CartTabs />
<div class="fixed-grid has-1-cols-mobile has-12-cols has-background-white is-clipped"> <div class="fixed-grid has-1-cols-mobile has-12-cols has-background-white">
<div class="grid is-gap-0"> <div class="grid is-gap-0">
<div :class="['cell', store.viewport < 3 ? 'is-col-span-12' : 'is-col-span-8']"> <div :class="['cell', store.viewport < 3 ? 'is-col-span-12' : 'is-col-span-8']">
<div class="card"> <div class="card">
@@ -276,10 +276,7 @@ provide("pos", {
</template> </template>
</div> </div>
</div> </div>
<div <div class="card">
class="card"
style="border-bottom: 1px solid var(--bulma-border)"
>
<div class="card-content"> <div class="card-content">
<p class="icon-text fs-16 font-semibold mb-4"> <p class="icon-text fs-16 font-semibold mb-4">
<span class="icon"> <span class="icon">
@@ -306,37 +303,39 @@ provide("pos", {
</div> </div>
</div> </div>
</div> </div>
<div class="card"> </div>
<div class="card-content"> </div>
<p class="icon-text fs-16 font-semibold mb-4">Tổng cộng</p> </div>
<div> <div
<table class="table is-fullwidth fs-13"> class="card is-radiusless sticky bottom-0"
<tbody> style="z-index: 5; /* to be higher than .control > .icon (4) */"
<tr> >
<td> <div class="card-content py-4">
<span>Tạm tính</span> <div class="is-flex is-gap-2 is-justify-content-space-between is-align-items-flex-end">
<span> ({{ activeCartItems?.length || 0 }} sản phẩm)</span> <table class="table is-fullwidth max-w-4xl fs-13 mb-0">
</td> <tbody>
<td class="has-text-right">{{ $formatNum(subtotal, { hasUnit: true }) }}</td> <tr>
</tr> <td>
<tr> <span>Tạm tính</span>
<td class="font-bold fs-14">Tổng cộng</td> <span> ({{ activeCartItems?.length || 0 }} sản phẩm)</span>
<td class="has-text-right has-text-success-35 font-bold fs-17"> </td>
{{ $formatNum(subtotal, { hasUnit: true }) }} <td class="has-text-right">{{ $formatNum(subtotal, { hasUnit: true }) }}</td>
</td> </tr>
</tr> <tr>
</tbody> <td class="font-bold fs-14">Tổng cộng</td>
</table> <td class="has-text-right has-text-primary font-bold fs-18">
<button {{ $formatNum(subtotal, { hasUnit: true }) }}
@click="openConfirmModal" </td>
:disabled="!isOrderValid" </tr>
class="button is-fullwidth is-success" </tbody>
> </table>
Thanh toán <button
</button> @click="openConfirmModal"
</div> :disabled="!isOrderValid"
</div> class="button is-success"
</div> >
Thanh toán
</button>
</div> </div>
</div> </div>
</div> </div>
@@ -404,8 +403,6 @@ provide("pos", {
.fixed-grid { .fixed-grid {
border: 1px solid var(--bulma-border); border: 1px solid var(--bulma-border);
border-bottom-left-radius: var(--bulma-radius);
border-bottom-right-radius: var(--bulma-radius);
} }
.sidebar { .sidebar {
border-left: 1px solid var(--bulma-border); border-left: 1px solid var(--bulma-border);

View File

@@ -37,6 +37,7 @@ export default defineNuxtConfig({
'dayjs/plugin/weekOfYear', // CJS 'dayjs/plugin/weekOfYear', // CJS
'dayjs/plugin/weekday', // CJS 'dayjs/plugin/weekday', // CJS
'es-toolkit', 'es-toolkit',
'es-toolkit/compat',
'highcharts', // CJS 'highcharts', // CJS
'highcharts-vue', // CJS 'highcharts-vue', // CJS
'highcharts/modules/export-data', // CJS 'highcharts/modules/export-data', // CJS

10
package-lock.json generated
View File

@@ -26,6 +26,7 @@
"pinia-plugin-persistedstate": "^4.5.0", "pinia-plugin-persistedstate": "^4.5.0",
"sass": "^1.81.0", "sass": "^1.81.0",
"socket.io-client": "^4.8.3", "socket.io-client": "^4.8.3",
"vnpay": "^2.5.0",
"vue": "^3.5.34", "vue": "^3.5.34",
"vue-advanced-cropper": "^2.8.9", "vue-advanced-cropper": "^2.8.9",
"vue-router": "latest", "vue-router": "latest",
@@ -13608,6 +13609,15 @@
"url": "https://github.com/sponsors/jonschlinkert" "url": "https://github.com/sponsors/jonschlinkert"
} }
}, },
"node_modules/vnpay": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/vnpay/-/vnpay-2.5.0.tgz",
"integrity": "sha512-kyUYxG0pyEnRu/ha0gSVqkPCajmql523W2PQzgCkH4ct4XdEuzdiQnssi/k9XMcv+TvoPzuweEJG+4hWNU2DAQ==",
"license": "MIT",
"dependencies": {
"dayjs": "^1.11.13"
}
},
"node_modules/vue": { "node_modules/vue": {
"version": "3.5.35", "version": "3.5.35",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.35.tgz", "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.35.tgz",

View File

@@ -31,6 +31,7 @@
"pinia-plugin-persistedstate": "^4.5.0", "pinia-plugin-persistedstate": "^4.5.0",
"sass": "^1.81.0", "sass": "^1.81.0",
"socket.io-client": "^4.8.3", "socket.io-client": "^4.8.3",
"vnpay": "^2.5.0",
"vue": "^3.5.34", "vue": "^3.5.34",
"vue-advanced-cropper": "^2.8.9", "vue-advanced-cropper": "^2.8.9",
"vue-router": "latest", "vue-router": "latest",