|
@ -390,6 +390,12 @@ const onChange = (field, cur, item) => { |
|
|
// console.log(item) |
|
|
// console.log(item) |
|
|
// console.log(item.componentProps.options) |
|
|
// console.log(item.componentProps.options) |
|
|
formRef.value.formRef.formModel.maintenance = Number(userStore?.getUser?.id) |
|
|
formRef.value.formRef.formModel.maintenance = Number(userStore?.getUser?.id) |
|
|
|
|
|
if (judgeIfDeviceRole()) { |
|
|
|
|
|
formRef.value.formRef.formModel.type = 'DEVICE' |
|
|
|
|
|
} else { |
|
|
|
|
|
formRef.value.formRef.formModel.type = 'TECH' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -889,15 +895,15 @@ const detailOpenForm = (type, row) =>{ |
|
|
// 子表新增/编辑校验 |
|
|
// 子表新增/编辑校验 |
|
|
const detailValidate = (data) => { |
|
|
const detailValidate = (data) => { |
|
|
return true; |
|
|
return true; |
|
|
let tag = false; |
|
|
// let tag = false; |
|
|
if(data.qty <= 0){ |
|
|
// if(data.qty <= 0){ |
|
|
message.warning('数量必须大于0') |
|
|
// message.warning('数量必须大于0') |
|
|
tag = false; |
|
|
// tag = false; |
|
|
return tag; |
|
|
// return tag; |
|
|
}else { |
|
|
// }else { |
|
|
tag = true; |
|
|
// tag = true; |
|
|
return tag; |
|
|
// return tag; |
|
|
} |
|
|
// } |
|
|
} |
|
|
} |
|
|
// 子表提交 |
|
|
// 子表提交 |
|
|
const detailSubmitForm = async (formType, data, formRef, tableList) => { |
|
|
const detailSubmitForm = async (formType, data, formRef, tableList) => { |
|
@ -1013,6 +1019,22 @@ const cancel = () => { |
|
|
showTempIdeaRefView.value = false; |
|
|
showTempIdeaRefView.value = false; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const getActorClass = () => { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const judgeIfDeviceRole = () => { |
|
|
|
|
|
const rolesOk = userStore.roles.find(item => { |
|
|
|
|
|
return item == 'device_class_worker_role' || item == 'device_class_Engineer_role' |
|
|
|
|
|
}) |
|
|
|
|
|
if (rolesOk != undefined && rolesOk != null) { |
|
|
|
|
|
return true |
|
|
|
|
|
} else { |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|