From c5ede797ee2f5539bf11d44fee3421dffe64a4b4 Mon Sep 17 00:00:00 2001 From: Tonfa137206 Date: Mon, 10 Aug 2026 14:46:47 +0700 Subject: [PATCH 1/3] feat(inventory): complete UI for inventory count list and details (T231-T234) --- src/components/AppSidebar.vue | 1 + src/components/InventoryCountCreateModal.vue | 324 +++++++++++++++++++ src/router/index.js | 4 +- src/views/InventoryCountDetailView.vue | 217 +++++++++++++ src/views/InventoryCountList.vue | 300 +++++++++++++++++ 5 files changed, 845 insertions(+), 1 deletion(-) create mode 100644 src/components/InventoryCountCreateModal.vue create mode 100644 src/views/InventoryCountDetailView.vue create mode 100644 src/views/InventoryCountList.vue diff --git a/src/components/AppSidebar.vue b/src/components/AppSidebar.vue index b87d7cd..7433f21 100644 --- a/src/components/AppSidebar.vue +++ b/src/components/AppSidebar.vue @@ -49,6 +49,7 @@ const menuSections = [ }, { label: "Phiếu nhập kho", to: "/stock-in", icon: "mdi-tray-arrow-down" }, { label: "Phiếu xuất kho", to: "/stock-out", icon: "mdi-tray-arrow-up" }, + { label: "Kiểm kê kho", to: "/inventory-counts", icon: "mdi-clipboard-check-outline" }, ], }, { diff --git a/src/components/InventoryCountCreateModal.vue b/src/components/InventoryCountCreateModal.vue new file mode 100644 index 0000000..a3288fa --- /dev/null +++ b/src/components/InventoryCountCreateModal.vue @@ -0,0 +1,324 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index b466e62..8bdfa83 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -15,6 +15,7 @@ import ApprovalsView from '../views/ApprovalsView.vue' import PendingExportApprovalsView from '../views/PendingExportApprovalsView.vue' import ImportExcelView from '../views/ImportExcelView.vue' import AlertsView from '../views/AlertsView.vue' +import InventoryCountList from '../views/InventoryCountList.vue' import UsersView from '../views/UsersView.vue' import EmployeeListView from '../views/employees/EmployeeListView.vue' import CategoryListView from '../views/categories/CategoryListView.vue' @@ -29,6 +30,8 @@ const routes = [ { path: '/warehouses', component: WarehousesView, meta: { title: 'Kho hàng' } }, { path: '/inventory', component: InventoryView, meta: { title: 'Tồn kho' } }, { path: '/inventory-transactions', component: InventoryTransactionsView, meta: { title: 'Lịch sử giao dịch' } }, + { path: '/inventory-counts', component: InventoryCountList, meta: { title: 'Kiểm kê kho' } }, + { path: '/inventory/:id', name: 'InventoryDetail', component: () => import('../views/InventoryCountDetailView.vue') }, { path: '/stock-in', component: StockDocumentsView, props: { type: 'in' }, meta: { title: 'Phiếu nhập kho' } }, { path: '/stock-in/create', component: StockDocumentCreateView, props: { type: 'in' }, meta: { title: 'Tạo phiếu nhập kho' } }, { path: '/stock-in/:id/edit', component: StockDocumentCreateView, props: route => ({ id: route.params.id, type: 'in', mode: 'edit' }), meta: { title: 'Chỉnh sửa phiếu nhập kho' } }, @@ -44,7 +47,6 @@ const routes = [ { path: '/alerts', component: AlertsView, meta: { title: 'Cảnh báo tồn kho' } }, { path: '/employees', component: EmployeeListView, meta: { title: 'Nhân viên' } }, { path: '/users', component: UsersView, meta: { title: 'Nhân viên & phân quyền' } }, - ] const router = createRouter({ diff --git a/src/views/InventoryCountDetailView.vue b/src/views/InventoryCountDetailView.vue new file mode 100644 index 0000000..4a4d314 --- /dev/null +++ b/src/views/InventoryCountDetailView.vue @@ -0,0 +1,217 @@ + + + diff --git a/src/views/InventoryCountList.vue b/src/views/InventoryCountList.vue new file mode 100644 index 0000000..4a62777 --- /dev/null +++ b/src/views/InventoryCountList.vue @@ -0,0 +1,300 @@ + + + \ No newline at end of file From 971f88d14e5a53458e48c94f415fd4f20ef0f518 Mon Sep 17 00:00:00 2001 From: Tonfa137206 Date: Mon, 10 Aug 2026 20:08:39 +0700 Subject: [PATCH 2/3] feat(import): refactor to 2-step flow and sync enum with backend (T237, T238) --- src/components/AppSidebar.vue | 4 +- src/services/excelImportService.js | 2 +- src/views/ImportExcelView.vue | 863 ++++++++--------------------- 3 files changed, 243 insertions(+), 626 deletions(-) diff --git a/src/components/AppSidebar.vue b/src/components/AppSidebar.vue index 7433f21..3286d20 100644 --- a/src/components/AppSidebar.vue +++ b/src/components/AppSidebar.vue @@ -70,12 +70,12 @@ const menuSections = [ { title: "Hệ thống", items: [ + { label: "Cảnh báo tồn kho", to: "/alerts", icon: "mdi-alert-outline" }, { - label: "Import Excel", + label: "Nhập liệu Excel", to: "/import-excel", icon: "mdi-file-excel-outline", }, - { label: "Cảnh báo tồn kho", to: "/alerts", icon: "mdi-alert-outline" }, { label: "Nhân viên", to: "/employees", diff --git a/src/services/excelImportService.js b/src/services/excelImportService.js index 89efc87..ea77cf6 100644 --- a/src/services/excelImportService.js +++ b/src/services/excelImportService.js @@ -47,7 +47,7 @@ export async function createImportSession(file, loaiImport, warehouseId) { formData.append('file', file) formData.append('loaiImport', loaiImport) if (warehouseId) { - formData.append('khoId', warehouseId) + formData.append('khoId', warehouseId) } const { data } = await excelImportClient.post('/api/excel-imports', formData, { diff --git a/src/views/ImportExcelView.vue b/src/views/ImportExcelView.vue index 61a2030..b0761a4 100644 --- a/src/views/ImportExcelView.vue +++ b/src/views/ImportExcelView.vue @@ -1,8 +1,167 @@ + + - -