From 051cd8a1e51a1a62c3962ababd9013ac22ffa52f Mon Sep 17 00:00:00 2001 From: yinq Date: Sat, 21 Feb 2026 10:43:04 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E9=85=8D=E6=96=B9=E5=B7=A6=E4=BE=A7?= =?UTF-8?q?=E6=A0=91=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/recipeInfo/index.ts | 23 +++++++++++++ src/views/mes/recipeInfo/detail.vue | 10 +++--- src/views/mes/recipeInfo/index.vue | 51 +++++++++++++---------------- 3 files changed, 50 insertions(+), 34 deletions(-) diff --git a/src/api/mes/recipeInfo/index.ts b/src/api/mes/recipeInfo/index.ts index e6205d0..c6e532e 100644 --- a/src/api/mes/recipeInfo/index.ts +++ b/src/api/mes/recipeInfo/index.ts @@ -18,6 +18,29 @@ export const listRecipeInfo = (query?: RecipeInfoQuery): AxiosPromise => { + return request({ + url: '/mes/recipeInfo/tree', + method: 'get', + params + }); +}; + /** * 查询配方-基础信息详细 * @param recipeId diff --git a/src/views/mes/recipeInfo/detail.vue b/src/views/mes/recipeInfo/detail.vue index b44262c..42bc45d 100644 --- a/src/views/mes/recipeInfo/detail.vue +++ b/src/views/mes/recipeInfo/detail.vue @@ -106,9 +106,9 @@ > @@ -298,9 +298,9 @@ const condCodeOptions = ref([]); const recipeMaterialDisplay = computed(() => { const id = recipeInfo.value.materialId; if (id == null || id === '') return ''; - const fromOptions = materialOptions.value.find((m) => Number(m.materialId) === Number(id)); + const fromOptions = materialOptions.value.find((m) => String(m.materialId) === String(id)); if (fromOptions) return `${fromOptions.materialName || ''} (${fromOptions.materialCode || ''})`.trim() || String(id); - if (selectedMaterial.value && Number(selectedMaterial.value.materialId) === Number(id)) { + if (selectedMaterial.value && String(selectedMaterial.value.materialId) === String(id)) { const m = selectedMaterial.value; return `${m.materialName || ''} (${m.materialCode || ''})`.trim() || String(id); } @@ -353,7 +353,7 @@ async function loadData() { const wRows = wData?.rows ?? (Array.isArray(wData) ? wData : []); weightList.value = wRows.map((r: any) => ({ ...r, - childCode: r.childCode != null && r.childCode !== '' ? Number(r.childCode) : undefined, + childCode: r.childCode != null && r.childCode !== '' ? r.childCode : undefined, actCode: r.actCode != null && r.actCode !== '' ? String(r.actCode) : '' })); const mData = (mixingRes as any).data ?? mixingRes; diff --git a/src/views/mes/recipeInfo/index.vue b/src/views/mes/recipeInfo/index.vue index d008db7..fc321db 100644 --- a/src/views/mes/recipeInfo/index.vue +++ b/src/views/mes/recipeInfo/index.vue @@ -151,8 +151,8 @@ @@ -292,7 +292,7 @@