29 lines
968 B
JavaScript
29 lines
968 B
JavaScript
/**
|
|
* 修改签署类型
|
|
* @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});
|
|
}
|
|
} |