From d266e5f9e5fc620a1d32b9734c3a878f40c3509c Mon Sep 17 00:00:00 2001 From: WUSIJIAN <13825895+wsj0228@user.noreply.gitee.com> Date: Wed, 11 Feb 2026 17:00:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=9B=98=E7=82=B9=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E8=B7=AF=E7=94=B1=E9=85=8D=E7=BD=AE=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 3 +- src/api/assets/operation/count/index.ts | 115 ++++++ src/router/route.ts | 14 + .../count/component/editInventoryCount.vue | 313 +++++++++++++++ .../count/component/scopeSelectDrawer.vue | 373 ++++++++++++++++++ .../count/component/warehouseSelectDrawer.vue | 194 +++++++++ src/views/assets/operation/count/index.vue | 357 +++++++++++++++++ 7 files changed, 1367 insertions(+), 2 deletions(-) create mode 100644 src/api/assets/operation/count/index.ts create mode 100644 src/views/assets/operation/count/component/editInventoryCount.vue create mode 100644 src/views/assets/operation/count/component/scopeSelectDrawer.vue create mode 100644 src/views/assets/operation/count/component/warehouseSelectDrawer.vue create mode 100644 src/views/assets/operation/count/index.vue diff --git a/.env.development b/.env.development index 2437f05..e1f714a 100644 --- a/.env.development +++ b/.env.development @@ -15,5 +15,4 @@ ENV = 'development' VITE_API_URL = 'http://192.168.3.94:8808/' # 新功能服务地址(端口8000) # 用途: 资产管理、分类、SKU、订单等新业务模块 -VITE_NEW_API_URL = 'http://192.168.3.94.8000/' - \ No newline at end of file +VITE_NEW_API_URL = 'http://192.168.3.94:8000/' \ No newline at end of file diff --git a/src/api/assets/operation/count/index.ts b/src/api/assets/operation/count/index.ts new file mode 100644 index 0000000..7768f77 --- /dev/null +++ b/src/api/assets/operation/count/index.ts @@ -0,0 +1,115 @@ +import { newService } from '/@/utils/request'; + +// 盘点任务查询参数 +export interface InventoryCountQueryParams { + title?: string; + status?: number; + countType?: number; + warehouseId?: string; + pageNum?: number; + pageSize?: number; +} + +// 盘点任务创建/更新参数 +export interface InventoryCountParams { + id?: string; + title: string; + description?: string; + warehouseId?: string; + zoneId?: string; + locationId?: string; + assetSkuId?: string; + countType?: number; + scope?: number; + plannedStartTime?: string; + plannedEndTime?: string; + assigneeId?: string; + participants?: string[]; + remark?: string; +} + +// 获取盘点任务列表 +export function listInventoryCounts(params?: InventoryCountQueryParams) { + return newService({ + url: '/inventory/count/listInventoryCounts', + method: 'get', + params, + }); +} + +// 获取盘点任务详情 +export function getInventoryCount(id: string) { + return newService({ + url: '/inventory/count/getInventoryCount', + method: 'get', + params: { id }, + }); +} + +// 创建盘点任务 +export function createInventoryCount(data: InventoryCountParams) { + return newService({ + url: '/inventory/count/createInventoryCount', + method: 'post', + data, + }); +} + +// 更新盘点任务 +export function updateInventoryCount(data: InventoryCountParams) { + return newService({ + url: '/inventory/count/updateInventoryCount', + method: 'put', + data, + }); +} + +// 删除盘点任务 +export function deleteInventoryCount(id: string) { + return newService({ + url: '/inventory/count/deleteInventoryCount', + method: 'delete', + params: { id }, + }); +} + +// 完成盘点 +export function completeInventoryCount(id: string) { + return newService({ + url: '/inventory/count/completeInventoryCount', + method: 'post', + data: { id }, + }); +} + +// 取消盘点 +export function cancelInventoryCount(id: string[], reason?: string) { + return newService({ + url: '/inventory/count/cancelInventoryCount', + method: 'post', + data: { id, reason }, + }); +} + +// 导出盘点模板 +export function exportInventoryCountTemplate() { + return newService({ + url: '/inventory/count/exportInventoryCountTemplate', + method: 'get', + responseType: 'blob', + }); +} + +// 上传盘点Excel +export function importInventoryCount(file: File) { + const formData = new FormData(); + formData.append('file', file); + return newService({ + url: '/inventory/count/importInventoryCount', + method: 'post', + data: formData, + headers: { + 'Content-Type': 'multipart/form-data', + }, + }); +} diff --git a/src/router/route.ts b/src/router/route.ts index 927af49..c3d7fc8 100644 --- a/src/router/route.ts +++ b/src/router/route.ts @@ -65,6 +65,20 @@ export const dynamicRoutes: Array = [ }, ]; +/** + * 盘点管理路由配置(供后端菜单配置参考) + * + * 父级菜单: 库存作业 (/assets/operation) + * + * 盘点菜单配置: + * - 路由路径: /assets/operation/count + * - 组件路径: assets/operation/count/index + * - 路由名称: assetsOperationCount + * - 菜单名称: 盘点 + * - 图标: ele-Document + * - API权限: api/v1/assets/operation/count + */ + export const demoRoutes: Array = [ { path: '/demo', diff --git a/src/views/assets/operation/count/component/editInventoryCount.vue b/src/views/assets/operation/count/component/editInventoryCount.vue new file mode 100644 index 0000000..bcafe07 --- /dev/null +++ b/src/views/assets/operation/count/component/editInventoryCount.vue @@ -0,0 +1,313 @@ + + + + + diff --git a/src/views/assets/operation/count/component/scopeSelectDrawer.vue b/src/views/assets/operation/count/component/scopeSelectDrawer.vue new file mode 100644 index 0000000..10d8fdb --- /dev/null +++ b/src/views/assets/operation/count/component/scopeSelectDrawer.vue @@ -0,0 +1,373 @@ + + + + + diff --git a/src/views/assets/operation/count/component/warehouseSelectDrawer.vue b/src/views/assets/operation/count/component/warehouseSelectDrawer.vue new file mode 100644 index 0000000..96ca4e6 --- /dev/null +++ b/src/views/assets/operation/count/component/warehouseSelectDrawer.vue @@ -0,0 +1,194 @@ + + + + + diff --git a/src/views/assets/operation/count/index.vue b/src/views/assets/operation/count/index.vue new file mode 100644 index 0000000..cdbc59a --- /dev/null +++ b/src/views/assets/operation/count/index.vue @@ -0,0 +1,357 @@ + + + + + + +