diff --git a/src/components/AppSidebar.vue b/src/components/AppSidebar.vue index b87d7cd..3286d20 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" }, ], }, { @@ -69,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/components/InventoryCountCreateModal.vue b/src/components/InventoryCountCreateModal.vue new file mode 100644 index 0000000..4397485 --- /dev/null +++ b/src/components/InventoryCountCreateModal.vue @@ -0,0 +1,246 @@ + + + + + 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/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 @@ + + - -