var process=getDocProcess(getApplication());
var doc=getCurrentDocument();
var username = getWebUser().getName();
// var flowType = getParameter("_flowType");
var flowType =doc.getLastFlowOperation();
println("flowType:"+flowType);
if (flowType!=null && flowType.equals("81")) {
doc.findItem("审批状态").setValue("驳回");
process.doUpdate(doc);
}//回退
else if (flowType!=null && flowType.equals("7")) {
doc.findItem("审批状态").setValue("已批准");
process.doUpdate(doc);
}else if (flowType!=null && flowType.equals("8")) {
doc.findItem("审批状态").setValue("已终止");
process.doUpdate(doc);
}else{
if (flowType !=null){
//审批中
doc.findItem("审批状态").setValue("审批中");
process.doUpdate(doc);
}
} |