From a662bfa16da69d3213e56992d33abad264365583 Mon Sep 17 00:00:00 2001 From: yinq Date: Wed, 11 Feb 2026 21:02:31 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E9=85=8D=E6=96=B9=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/recipeInfo/index.ts | 29 +- src/api/mes/workReport/index.ts | 120 ++ src/router/index.ts | 14 + .../recipeInfo/components/MaterialSelect.vue | 93 ++ src/views/mes/recipeInfo/detail.vue | 399 +++++++ src/views/mes/recipeInfo/index.vue | 1063 +++++++++-------- src/views/mes/recipeWeight/index.vue | 36 +- src/views/mes/toolingTypeRelation/index.vue | 260 ++++ 8 files changed, 1479 insertions(+), 535 deletions(-) create mode 100644 src/api/mes/workReport/index.ts create mode 100644 src/views/mes/recipeInfo/components/MaterialSelect.vue create mode 100644 src/views/mes/recipeInfo/detail.vue create mode 100644 src/views/mes/toolingTypeRelation/index.vue diff --git a/src/api/mes/recipeInfo/index.ts b/src/api/mes/recipeInfo/index.ts index 369d884..e6205d0 100644 --- a/src/api/mes/recipeInfo/index.ts +++ b/src/api/mes/recipeInfo/index.ts @@ -1,6 +1,8 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { RecipeInfoVO, RecipeInfoForm, RecipeInfoQuery } from '@/api/mes/recipeInfo/types'; +import type { RecipeWeightForm } from '@/api/mes/recipeWeight/types'; +import type { RecipeMixingForm } from '@/api/mes/recipeMixing/types'; /** * 查询配方-基础信息列表 @@ -69,9 +71,26 @@ export const delRecipeInfo = (recipeId: string | number | Array * @returns {*} */ export function getProdRecipeInfoList (query) { - return request({ - url: '/mes/recipeInfo/getProdRecipeInfoList', - method: 'get', - params: query - }); + return request({ + url: '/mes/recipeInfo/getProdRecipeInfoList', + method: 'get', + params: query + }); +}; + +/** + * 配方明细一次保存(基本信息+称量信息+混炼信息) + */ +export interface RecipeDetailSaveDto { + recipeInfo: RecipeInfoForm; + weightList: RecipeWeightForm[]; + mixingList: RecipeMixingForm[]; +} + +export const saveRecipeDetail = (data: RecipeDetailSaveDto) => { + return request({ + url: '/mes/recipeInfo/saveDetail', + method: 'post', + data + }); }; diff --git a/src/api/mes/workReport/index.ts b/src/api/mes/workReport/index.ts new file mode 100644 index 0000000..d861a37 --- /dev/null +++ b/src/api/mes/workReport/index.ts @@ -0,0 +1,120 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; + +/** + * 获取待处理工单列表(按工位) + * @param query + * @returns {*} + */ +export const listPendingWorkOrders = (query?: any): AxiosPromise => { + return request({ + url: '/mes/workReport/pendingWorkOrders', + method: 'get', + params: query + }); +}; + +/** + * 获取当前工单(按工位) + * @param query + * @returns {*} + */ +export const getCurrentWorkOrder = (query?: any): AxiosPromise => { + return request({ + url: '/mes/workReport/currentWorkOrder', + method: 'get', + params: query + }); +}; + +/** + * 下发工单(更新工单状态为已开始) + * @param data + * @returns {*} + */ +export const issueWorkOrder = (data: any) => { + return request({ + url: '/mes/workReport/issueWorkOrder', + method: 'post', + data: data + }); +}; + +/** + * 开工 + * @param data + * @returns {*} + */ +export const startWork = (data: any) => { + return request({ + url: '/mes/workReport/startWork', + method: 'post', + data: data + }); +}; + +/** + * 停工 + * @param data + * @returns {*} + */ +export const stopWork = (data: any) => { + return request({ + url: '/mes/workReport/stopWork', + method: 'post', + data: data + }); +}; + +/** + * 复工 + * @param data + * @returns {*} + */ +export const resumeWork = (data: any) => { + return request({ + url: '/mes/workReport/resumeWork', + method: 'post', + data: data + }); +}; + +/** + * 报工 + * @param data + * @returns {*} + */ +export const reportWork = (data: any) => { + return request({ + url: '/mes/workReport/reportWork', + method: 'post', + data: data + }); +}; + +/** + * 获取报工记录列表 + * @param query + * @returns {*} + */ +export const listWorkReportRecords = (query?: any): AxiosPromise => { + return request({ + url: '/mes/workReport/records', + method: 'get', + params: query + }); +}; + +/** + * 获取工艺文件列表 + * @param query + * @returns {*} + */ +export const listProcessDocuments = (query?: any): AxiosPromise => { + return request({ + url: '/mes/workReport/processDocuments', + method: 'get', + params: query + }); +}; + diff --git a/src/router/index.ts b/src/router/index.ts index d2deca8..b124e23 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -219,6 +219,20 @@ export const constantRoutes: RouteRecordRaw[] = [ meta: { title: '不合格品主管审批', activeMenu: '/qms/qcUnqualifiedApproval', noCache: true } } ] + }, + { + path: '/mes/recipeInfoDetail', + component: Layout, + hidden: true, + redirect: '/mes/recipeInfoDetail/index', + children: [ + { + path: 'index', + component: () => import('@/views/mes/recipeInfo/detail.vue'), + name: 'RecipeInfoDetail', + meta: { title: '配方明细信息', activeMenu: '/mes/recipeInfo', noCache: true } + } + ] } ]; diff --git a/src/views/mes/recipeInfo/components/MaterialSelect.vue b/src/views/mes/recipeInfo/components/MaterialSelect.vue new file mode 100644 index 0000000..c7366b3 --- /dev/null +++ b/src/views/mes/recipeInfo/components/MaterialSelect.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/src/views/mes/recipeInfo/detail.vue b/src/views/mes/recipeInfo/detail.vue new file mode 100644 index 0000000..c36569c --- /dev/null +++ b/src/views/mes/recipeInfo/detail.vue @@ -0,0 +1,399 @@ + + + + + diff --git a/src/views/mes/recipeInfo/index.vue b/src/views/mes/recipeInfo/index.vue index 31390b6..3ca5223 100644 --- a/src/views/mes/recipeInfo/index.vue +++ b/src/views/mes/recipeInfo/index.vue @@ -1,350 +1,304 @@ - + + diff --git a/src/views/mes/recipeWeight/index.vue b/src/views/mes/recipeWeight/index.vue index 01a87ae..0694314 100644 --- a/src/views/mes/recipeWeight/index.vue +++ b/src/views/mes/recipeWeight/index.vue @@ -4,23 +4,10 @@
- - - - - - - - - - - - - - - - + + + @@ -43,12 +30,6 @@ - - - - - - 搜索 重置 @@ -84,7 +65,11 @@ - + + + @@ -127,7 +112,9 @@ - + + + @@ -172,6 +159,7 @@ import { listRecipeWeight, getRecipeWeight, delRecipeWeight, addRecipeWeight, up import { RecipeWeightVO, RecipeWeightQuery, RecipeWeightForm } from '@/api/mes/recipeWeight/types'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; +const { weight_type } = toRefs(proxy?.useDict('weight_type')); const recipeWeightList = ref([]); const buttonLoading = ref(false); diff --git a/src/views/mes/toolingTypeRelation/index.vue b/src/views/mes/toolingTypeRelation/index.vue new file mode 100644 index 0000000..316b7c7 --- /dev/null +++ b/src/views/mes/toolingTypeRelation/index.vue @@ -0,0 +1,260 @@ + + +