From e94f2d4feeb462a838f017abb4bfeb348e7e5393 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 19 Feb 2026 17:44:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(mes):=20=E4=BF=AE=E5=A4=8D=E5=B7=A5?= =?UTF-8?q?=E8=89=BA=E8=B7=AF=E7=BA=BF=E5=89=8D=E7=AB=AF=20TODO=EF=BC=8C?= =?UTF-8?q?=E8=A1=A5=E5=85=A8=E6=B3=A8=E9=87=8A=E4=B8=8E=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - API 文件(4 个)补充 VO 字段注释和方法注释,新增 updateRouteStatus 方法 - index.vue 字段加"工艺路线"前缀,状态列改为 el-switch 开关操作 - RouteForm.vue 补充行内注释,status 默认值改用 CommonStatusEnum.ENABLE - RouteProcessList/ProductList/ProductBomList 补充变量行内注释 - CalendarTypeView/TeamView 修复 ESLint 问题 --- src/api/mes/pro/route/index.ts | 35 ++++++++--- src/api/mes/pro/route/process/index.ts | 44 ++++++++------ src/api/mes/pro/route/product/index.ts | 36 +++++++---- src/api/mes/pro/route/productbom/index.ts | 36 +++++++---- src/views/mes/pro/route/RouteForm.vue | 22 +++---- src/views/mes/pro/route/RouteProcessList.vue | 24 ++++---- .../mes/pro/route/RouteProductBomList.vue | 29 +++++---- src/views/mes/pro/route/RouteProductList.vue | 28 ++++----- src/views/mes/pro/route/index.vue | 59 +++++++++++++------ 9 files changed, 191 insertions(+), 122 deletions(-) diff --git a/src/api/mes/pro/route/index.ts b/src/api/mes/pro/route/index.ts index 324b67550..29855a65c 100644 --- a/src/api/mes/pro/route/index.ts +++ b/src/api/mes/pro/route/index.ts @@ -1,35 +1,54 @@ import request from '@/config/axios' -// TODO @AI:参考别的 api 文件,需要有一些注释 +// MES 工艺路线 VO export interface ProRouteVO { - id?: number - code: string - name: string - description?: string - status: number - remark?: string - createTime?: Date + id?: number // 编号 + code: string // 工艺路线编码 + name: string // 工艺路线名称 + description?: string // 工艺路线说明 + status: number // 状态 + remark?: string // 备注 + createTime?: Date // 创建时间 } +// MES 工艺路线 API export const ProRouteApi = { + // 查询工艺路线分页 getRoutePage: async (params: any) => { return await request.get({ url: `/mes/pro/route/page`, params }) }, + + // 查询工艺路线精简列表 getRouteSimpleList: async () => { return await request.get({ url: `/mes/pro/route/simple-list` }) }, + + // 查询工艺路线详情 getRoute: async (id: number) => { return await request.get({ url: `/mes/pro/route/get?id=` + id }) }, + + // 新增工艺路线 createRoute: async (data: ProRouteVO) => { return await request.post({ url: `/mes/pro/route/create`, data }) }, + + // 修改工艺路线 updateRoute: async (data: ProRouteVO) => { return await request.put({ url: `/mes/pro/route/update`, data }) }, + + // 修改工艺路线状态 + updateRouteStatus: async (id: number, status: number) => { + return await request.put({ url: `/mes/pro/route/update-status?id=` + id + `&status=` + status }) + }, + + // 删除工艺路线 deleteRoute: async (id: number) => { return await request.delete({ url: `/mes/pro/route/delete?id=` + id }) }, + + // 导出工艺路线 Excel exportRoute: async (params: any) => { return await request.download({ url: `/mes/pro/route/export-excel`, params }) } diff --git a/src/api/mes/pro/route/process/index.ts b/src/api/mes/pro/route/process/index.ts index f4a31e5c7..38da9dc9b 100644 --- a/src/api/mes/pro/route/process/index.ts +++ b/src/api/mes/pro/route/process/index.ts @@ -1,38 +1,48 @@ import request from '@/config/axios' -// TODO @AI:参考别的 api 文件,需要有一些注释 +// MES 工艺路线工序 VO export interface ProRouteProcessVO { - id?: number - routeId: number - processId: number - processCode?: string - processName?: string - sort: number - nextProcessId?: number - nextProcessName?: string - linkType: number - prepareTime?: number - waitTime?: number - colorCode?: string - keyFlag?: number - checkFlag?: number - remark?: string - createTime?: Date + id?: number // 编号 + routeId: number // 工艺路线编号 + processId: number // 工序编号 + processCode?: string // 工序编码 + processName?: string // 工序名称 + sort: number // 序号 + nextProcessId?: number // 下一道工序编号 + nextProcessName?: string // 下一道工序名称 + linkType: number // 与下一道工序关系 + prepareTime?: number // 准备时间(分钟) + waitTime?: number // 等待时间(分钟) + colorCode?: string // 甘特图显示颜色 + keyFlag?: number // 是否关键工序 + checkFlag?: number // 是否质检工序 + remark?: string // 备注 + createTime?: Date // 创建时间 } +// MES 工艺路线工序 API export const ProRouteProcessApi = { + // 按工艺路线查询工序列表 getRouteProcessListByRoute: async (routeId: number) => { return await request.get({ url: `/mes/pro/route-process/list-by-route?routeId=` + routeId }) }, + + // 查询工艺路线工序详情 getRouteProcess: async (id: number) => { return await request.get({ url: `/mes/pro/route-process/get?id=` + id }) }, + + // 新增工艺路线工序 createRouteProcess: async (data: ProRouteProcessVO) => { return await request.post({ url: `/mes/pro/route-process/create`, data }) }, + + // 修改工艺路线工序 updateRouteProcess: async (data: ProRouteProcessVO) => { return await request.put({ url: `/mes/pro/route-process/update`, data }) }, + + // 删除工艺路线工序 deleteRouteProcess: async (id: number) => { return await request.delete({ url: `/mes/pro/route-process/delete?id=` + id }) } diff --git a/src/api/mes/pro/route/product/index.ts b/src/api/mes/pro/route/product/index.ts index 4a0dde88a..97710409d 100644 --- a/src/api/mes/pro/route/product/index.ts +++ b/src/api/mes/pro/route/product/index.ts @@ -1,34 +1,44 @@ import request from '@/config/axios' -// TODO @AI:参考别的 api 文件,需要有一些注释 +// MES 工艺路线产品 VO export interface ProRouteProductVO { - id?: number - routeId: number - itemId: number - itemCode?: string - itemName?: string - specification?: string - unitName?: string - quantity?: number - productionTime?: number - timeUnitType?: number - remark?: string - createTime?: Date + id?: number // 编号 + routeId: number // 工艺路线编号 + itemId: number // 产品物料编号 + itemCode?: string // 产品编码 + itemName?: string // 产品名称 + specification?: string // 规格型号 + unitName?: string // 单位名称 + quantity?: number // 生产数量 + productionTime?: number // 生产用时 + timeUnitType?: number // 时间单位 + remark?: string // 备注 + createTime?: Date // 创建时间 } +// MES 工艺路线产品 API export const ProRouteProductApi = { + // 按工艺路线查询产品列表 getRouteProductListByRoute: async (routeId: number) => { return await request.get({ url: `/mes/pro/route-product/list-by-route?routeId=` + routeId }) }, + + // 查询工艺路线产品详情 getRouteProduct: async (id: number) => { return await request.get({ url: `/mes/pro/route-product/get?id=` + id }) }, + + // 新增工艺路线产品 createRouteProduct: async (data: ProRouteProductVO) => { return await request.post({ url: `/mes/pro/route-product/create`, data }) }, + + // 修改工艺路线产品 updateRouteProduct: async (data: ProRouteProductVO) => { return await request.put({ url: `/mes/pro/route-product/update`, data }) }, + + // 删除工艺路线产品 deleteRouteProduct: async (id: number) => { return await request.delete({ url: `/mes/pro/route-product/delete?id=` + id }) } diff --git a/src/api/mes/pro/route/productbom/index.ts b/src/api/mes/pro/route/productbom/index.ts index 2c4d913e2..92286a6bf 100644 --- a/src/api/mes/pro/route/productbom/index.ts +++ b/src/api/mes/pro/route/productbom/index.ts @@ -1,34 +1,44 @@ import request from '@/config/axios' -// TODO @AI:参考别的 api 文件,需要有一些注释 +// MES 工艺路线产品 BOM VO export interface ProRouteProductBomVO { - id?: number - routeId: number - processId: number - productId: number - itemId: number - itemCode?: string - itemName?: string - specification?: string - unitName?: string - quantity?: number - remark?: string - createTime?: Date + id?: number // 编号 + routeId: number // 工艺路线编号 + processId: number // 工序编号 + productId: number // 产品物料编号 + itemId: number // BOM 物料编号 + itemCode?: string // 物料编码 + itemName?: string // 物料名称 + specification?: string // 规格型号 + unitName?: string // 单位名称 + quantity?: number // 用料比例 + remark?: string // 备注 + createTime?: Date // 创建时间 } +// MES 工艺路线产品 BOM API export const ProRouteProductBomApi = { + // 查询工艺路线产品 BOM 列表 getRouteProductBomList: async (params: { routeId: number; processId?: number; productId?: number }) => { return await request.get({ url: `/mes/pro/route-product-bom/list`, params }) }, + + // 查询工艺路线产品 BOM 详情 getRouteProductBom: async (id: number) => { return await request.get({ url: `/mes/pro/route-product-bom/get?id=` + id }) }, + + // 新增工艺路线产品 BOM createRouteProductBom: async (data: ProRouteProductBomVO) => { return await request.post({ url: `/mes/pro/route-product-bom/create`, data }) }, + + // 修改工艺路线产品 BOM updateRouteProductBom: async (data: ProRouteProductBomVO) => { return await request.put({ url: `/mes/pro/route-product-bom/update`, data }) }, + + // 删除工艺路线产品 BOM deleteRouteProductBom: async (id: number) => { return await request.delete({ url: `/mes/pro/route-product-bom/delete?id=` + id }) } diff --git a/src/views/mes/pro/route/RouteForm.vue b/src/views/mes/pro/route/RouteForm.vue index fc1796e63..266b94a81 100644 --- a/src/views/mes/pro/route/RouteForm.vue +++ b/src/views/mes/pro/route/RouteForm.vue @@ -72,6 +72,7 @@