Browse Source

修改bug

master_hella_20240701
zhaoyiran 8 months ago
parent
commit
c5365c1379
  1. 11
      src/views/qms/samplingProcess/index.vue

11
src/views/qms/samplingProcess/index.vue

@ -275,7 +275,8 @@ const importSuccess = () => {
getList()
}
const onChange =async (field,value)=>{
const onChange =async (field,value, formRef)=>{
const setV = {};
if(field == 'sampleType'&& value == '1'){
SamplingProcess.allSchemas.formSchema.forEach(item=>{
if(item.field == "sampleSize"){
@ -287,6 +288,8 @@ const onChange =async (field,value)=>{
item.componentProps.disabled = true
}
})
setV["sampleSize"] = ''
setV["sampleProgCode"] = ''
}else if(field == 'sampleType'&& value == '2'){
SamplingProcess.allSchemas.formSchema.forEach(item=>{
if(item.field == "sampleSize"){
@ -298,6 +301,7 @@ const onChange =async (field,value)=>{
item.componentProps.disabled = true
}
})
setV["sampleProgCode"] = ''
}else if(field == 'sampleType'&& value == '3'){
SamplingProcess.allSchemas.formSchema.forEach(item=>{
if(item.field == "sampleSize"){
@ -309,6 +313,7 @@ const onChange =async (field,value)=>{
item.componentProps.disabled = true
}
})
setV["sampleProgCode"] = ''
}else if(field == 'sampleType'&& value == '4'){
SamplingProcess.allSchemas.formSchema.forEach(item=>{
if(item.field == "sampleSize"){
@ -319,7 +324,11 @@ const onChange =async (field,value)=>{
item.componentProps.disabled = false
}
})
setV["sampleSize"] = ''
}
nextTick(() => {
formRef.value.setValues(setV);
});
}
//

Loading…
Cancel
Save