diff --git a/src/api/mes/mold.js b/src/api/mes/mold.js index 107fd58..12a9cf8 100644 --- a/src/api/mes/mold.js +++ b/src/api/mes/mold.js @@ -72,6 +72,14 @@ export function getMoldList(params = {}) { }) } +export function getBrandList(params = {}) { + return request({ + url: '/admin-api/erp/mold-brand/getBrandList', + method: 'get', + params + }) +} + export function getInTransitMoldAllList() { return request({ url: '/admin-api/erp/mold/getInTransitMoldAllList', diff --git a/src/pages_function/pages/moldRepair/form.vue b/src/pages_function/pages/moldRepair/form.vue index 2e96ab0..8694303 100644 --- a/src/pages_function/pages/moldRepair/form.vue +++ b/src/pages_function/pages/moldRepair/form.vue @@ -222,7 +222,7 @@ import { computed, reactive, ref } from 'vue' import { onLoad } from '@dcloudio/uni-app' import { useI18n } from 'vue-i18n' import NavBar from '@/components/common/NavBar.vue' -import { getMoldList } from '@/api/mes/mold' +import { getBrandList } from '@/api/mes/mold' import { createMoldRepair, getMoldRepair, @@ -340,14 +340,14 @@ async function fetchUsers() { async function fetchMolds() { try { - const res = await getMoldList() + const res = await getBrandList() const root = res && res.data !== undefined ? res.data : res const data = Array.isArray(root) ? root : (Array.isArray(root?.data) ? root.data : []) moldOptions.value = (Array.isArray(data) ? data : []) .filter((item) => item && item.id !== undefined && item.id !== null) .map((item) => { - const code = item?.code ?? item?.moldCode ?? '' - const name = item?.name ?? item?.moldName ?? '' + const code = item?.code ?? item?.brandCode ?? '' + const name = item?.name ?? item?.brandName ?? '' const label = `${code} ${name}`.trim() || String(item.id) return { value: item.id,