ecology_maven/html/index.js

29 lines
968 B
JavaScript
Raw Normal View History

2022-08-19 18:07:25 +08:00
/**
* 修改签署类型
* @param detailTable
* @param detailField
* @param changeField
* @param errValue
* @param rightValue
*/
function changeSingedType(detailTable,detailField,changeField,errValue,rightValue){
let detailIndexStr = WfForm.getDetailAllRowIndexStr(detailTable)
let changeFieldId = WfForm.convertFieldNameToId(changeField)
if(detailIndexStr == null){
return
}
let detailIndexArr = detailIndexStr.split(",");
let detailFieldId = WfForm.convertFieldNameToId(detailField, detailTable);
let n = 0;
detailIndexArr.forEach(item=>{
let fieldId = detailFieldId + "_" + item
let value = WfForm.getFieldValue(fieldId);
if(value == null || value == ""){
WfForm.changeFieldValue(changeFieldId, {value:errValue});
}
n ++
})
if(n == detaiIndexArr.length){
WfForm.changeFieldValue(changeFieldId, {value:rightValue});
}
}