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 @@ + + + + + + +