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