From c5365c137972ba02323eb5bc2dbc60b6394a9243 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Thu, 11 Apr 2024 15:05:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qms/samplingProcess/index.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/views/qms/samplingProcess/index.vue b/src/views/qms/samplingProcess/index.vue index 185dab487..8577435cb 100644 --- a/src/views/qms/samplingProcess/index.vue +++ b/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); + }); } // 筛选提交