|
@ -64,7 +64,8 @@ import download from '@/utils/download' |
|
|
import { MoldRepair, MoldRepairRules } from './moldRepair.data' |
|
|
import { MoldRepair, MoldRepairRules } from './moldRepair.data' |
|
|
import * as MoldRepairApi from '@/api/eam/mold/moldRepair' |
|
|
import * as MoldRepairApi from '@/api/eam/mold/moldRepair' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as MoldAccountApi from '@/api/eam/mold/moldAccount' |
|
|
import * as MoldAccountApi from '@/api/eam/mold/moldAccounts' |
|
|
|
|
|
import * as DeviceAccountApi from '@/api/eam/device/deviceAccounts' |
|
|
|
|
|
|
|
|
defineOptions({ name: 'MoldRepair' }) |
|
|
defineOptions({ name: 'MoldRepair' }) |
|
|
|
|
|
|
|
@ -80,6 +81,8 @@ const viewKey = ref(0) |
|
|
routeName.value = route.name |
|
|
routeName.value = route.name |
|
|
const tableColumns = ref(MoldRepair.allSchemas.tableColumns) |
|
|
const tableColumns = ref(MoldRepair.allSchemas.tableColumns) |
|
|
|
|
|
|
|
|
|
|
|
const factoryAreaNumber = ref(''); |
|
|
|
|
|
const type = ref(''); |
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
@ -182,7 +185,6 @@ const formsSuccess = async (formType, data) => { |
|
|
} |
|
|
} |
|
|
if (data.activeTime == 0) data.activeTime = null; |
|
|
if (data.activeTime == 0) data.activeTime = null; |
|
|
if (data.expireTime == 0) data.expireTime = null; |
|
|
if (data.expireTime == 0) data.expireTime = null; |
|
|
data.type = 'MOLD'; |
|
|
|
|
|
data.result = 'PENDING'; |
|
|
data.result = 'PENDING'; |
|
|
if (data.upload != null && data.upload != "") { |
|
|
if (data.upload != null && data.upload != "") { |
|
|
data.filePathList = data?.upload?.map((item: any) => { |
|
|
data.filePathList = data?.upload?.map((item: any) => { |
|
@ -289,6 +291,7 @@ onMounted(async () => { |
|
|
importTemplateData.templateUrl = await MoldRepairApi.importTemplate() |
|
|
importTemplateData.templateUrl = await MoldRepairApi.importTemplate() |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const onChange = (field, cur, item,formRef) => { |
|
|
const onChange = (field, cur, item,formRef) => { |
|
|
if (field == 'factoryAreaNumber') { |
|
|
if (field == 'factoryAreaNumber') { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
@ -296,6 +299,60 @@ const onChange = (field, cur, item, formRef) => { |
|
|
setV['deviceNumber'] = '' |
|
|
setV['deviceNumber'] = '' |
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
}) |
|
|
}) |
|
|
|
|
|
factoryAreaNumber.value = cur |
|
|
|
|
|
if(type.value != 'MOLD'){ |
|
|
|
|
|
DeviceAccountApi.getDeviceAccountsAllNoPage({ |
|
|
|
|
|
factoryAreaNumber: cur, |
|
|
|
|
|
type: type.value, |
|
|
|
|
|
status: '0' |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
MoldRepair.allSchemas.formSchema.find(item => { |
|
|
|
|
|
return item.field == 'deviceNumber' |
|
|
|
|
|
}).componentProps.options = res |
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
MoldAccountApi.getMoldAccountsAllNoPage({ |
|
|
|
|
|
factoryAreaNumber: cur, |
|
|
|
|
|
type: type.value, |
|
|
|
|
|
status: '0' |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
MoldRepair.allSchemas.formSchema.find(item => { |
|
|
|
|
|
return item.field == 'deviceNumber' |
|
|
|
|
|
}).componentProps.options = res |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (field == 'type') { |
|
|
|
|
|
nextTick(() => { |
|
|
|
|
|
const setV = {} |
|
|
|
|
|
setV['deviceNumber'] = '' |
|
|
|
|
|
formRef.setValues(setV) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
if(cur != 'MOLD'){ |
|
|
|
|
|
type.value = 'DEVICE' |
|
|
|
|
|
DeviceAccountApi.getDeviceAccountsAllNoPage({ |
|
|
|
|
|
factoryAreaNumber: factoryAreaNumber.value, |
|
|
|
|
|
type: 'DEVICE', |
|
|
|
|
|
status: '0' |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
MoldRepair.allSchemas.formSchema.find(item => { |
|
|
|
|
|
return item.field == 'deviceNumber' |
|
|
|
|
|
}).componentProps.options = res |
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
type.value = 'MOLD' |
|
|
|
|
|
MoldAccountApi.getMoldAccountsAllNoPage({ |
|
|
|
|
|
factoryAreaNumber: factoryAreaNumber.value, |
|
|
|
|
|
type: 'MOLD', |
|
|
|
|
|
status: '0' |
|
|
|
|
|
}).then((res) => { |
|
|
|
|
|
MoldRepair.allSchemas.formSchema.find(item => { |
|
|
|
|
|
return item.field == 'deviceNumber' |
|
|
|
|
|
}).componentProps.options = res |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|