|
|
@ -247,22 +247,26 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
} |
|
|
|
if(formField === 'reasonCodeRequisition'){ |
|
|
|
setV['reasonCodeRequisition'] = val[0]['code'] |
|
|
|
let accountRes = await SubjectAccountApi.getSubjectAccountPage({ |
|
|
|
pageSize: 20, |
|
|
|
pageNo: 1, |
|
|
|
code: val[0]['code'], |
|
|
|
costcentreType: formRef.formModel['costCenterType'], |
|
|
|
sort: '', |
|
|
|
by: 'ASC' |
|
|
|
}) |
|
|
|
console.log('UnplannedreceiptRequestMainRules',UnplannedreceiptRequestMainRules) |
|
|
|
// let accountRes = await SubjectAccountApi.getSubjectAccountPage({ |
|
|
|
// pageSize: 20, |
|
|
|
// pageNo: 1, |
|
|
|
// code: val[0]['code'], |
|
|
|
// costcentreType: formRef.formModel['costCenterType'], |
|
|
|
// sort: '', |
|
|
|
// by: 'ASC' |
|
|
|
// }) |
|
|
|
// console.log('UnplannedreceiptRequestMainRules',UnplannedreceiptRequestMainRules) |
|
|
|
// if( UnplannedreceiptRequestMainRules['projectCode']){ |
|
|
|
// UnplannedreceiptRequestMainRules['projectCode'][0]['required'] = false |
|
|
|
// if(accountRes&&accountRes.list&&accountRes.list.length>0){ |
|
|
|
// if(accountRes.list[0]['isProject']=='TRUE'){ |
|
|
|
// UnplannedreceiptRequestMainRules['projectCode'][0]['required'] = true |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
// 项目是否必填 |
|
|
|
if(UnplannedreceiptRequestMainRules['projectCode']){ |
|
|
|
UnplannedreceiptRequestMainRules['projectCode'][0]['required'] = false |
|
|
|
if(accountRes&&accountRes.list&&accountRes.list.length>0){ |
|
|
|
if(accountRes.list[0]['isProject']=='TRUE'){ |
|
|
|
UnplannedreceiptRequestMainRules['projectCode'][0]['required'] = true |
|
|
|
} |
|
|
|
} |
|
|
|
UnplannedreceiptRequestMainRules['projectCode'][0].required = val[0]['isProject']=='TRUE' |
|
|
|
} |
|
|
|
} |
|
|
|
if(formField === 'projectCode'){ |
|
|
|