|
|
@ -164,8 +164,28 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
setV['reasonDescRequisition'] = val[0]['accountingName'] |
|
|
|
// 项目是否必填 |
|
|
|
if(UnplannedissueRequestMainRules['projectCode']){ |
|
|
|
UnplannedissueRequestMainRules['projectCode'][0].required = val[0]['isProject']=='TRUE' |
|
|
|
// “是”:必填 |
|
|
|
UnplannedissueRequestMainRules['projectCode'][0].required = val[0]['isProject']=='TRUE' |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UnplannedissueRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
|
if (item.field == 'projectCode') { |
|
|
|
//项目代码 |
|
|
|
if(val[0]['isProject']=='TRUE'){ |
|
|
|
//是-可编辑,可选择 |
|
|
|
item.componentProps.enterSearch = true |
|
|
|
item.componentProps.isSearchList = true |
|
|
|
item.componentProps.disabled = false |
|
|
|
}else{ |
|
|
|
//否-不可编辑,内容为空 |
|
|
|
setV['projectCode'] = '' |
|
|
|
item.componentProps.enterSearch = false |
|
|
|
item.componentProps.isSearchList = false |
|
|
|
item.componentProps.disabled = true |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
if(formField === 'projectCode'){ |
|
|
|
setV['projectCode'] = val[0]['projectCode'] |
|
|
|