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