style:模具维修-模具选项接口更换

master
黄伟杰 2 weeks ago
parent 58a930e88f
commit 50cb786113

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

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

Loading…
Cancel
Save