diff --git a/src/views/spc/detectiontemplate/detectionTemplate.data.ts b/src/views/spc/detectiontemplate/detectionTemplate.data.ts index 7fd57d3..c0347b5 100644 --- a/src/views/spc/detectiontemplate/detectionTemplate.data.ts +++ b/src/views/spc/detectiontemplate/detectionTemplate.data.ts @@ -31,7 +31,8 @@ export const DetectionTemplate = useCrudSchemas(reactive([ searchField: 'code', // 查询弹窗赋值字段 searchTitle: '物料信息', // 查询弹窗标题 searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 - searchPage: ItembasicApi.getItembasicPage // 查询弹窗所需分页方法 + searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 + disabled:true } }, search: { diff --git a/src/views/spc/itembasic/index.vue b/src/views/spc/itembasic/index.vue index 61f85c0..57b299b 100644 --- a/src/views/spc/itembasic/index.vue +++ b/src/views/spc/itembasic/index.vue @@ -153,6 +153,11 @@ const openForm = (type: string, row?: any) => { // if(type=='update'){ // row.color = row.color.split(','); // } + if(type=='update'){ + Itembasic.allSchemas.formSchema[1].componentProps.disabled=true; + }else{ + Itembasic.allSchemas.formSchema[1].componentProps.disabled=false; + } basicFormRef.value.open(type, row) } diff --git a/src/views/spc/project/index.vue b/src/views/spc/project/index.vue index 8d1b0f6..9921a05 100644 --- a/src/views/spc/project/index.vue +++ b/src/views/spc/project/index.vue @@ -151,6 +151,11 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { + if(type=='update'){ + Project.allSchemas.formSchema[0].componentProps.disabled=true; + }else{ + Project.allSchemas.formSchema[0].componentProps.disabled=false; + } basicFormRef.value.open(type, row) }