本帖最后由 david 于 2014-9-11 13:46 编辑
在提交流程按钮的动作后执行脚本使用如下代码,在流程结束时得到的flowType值是80,而不是7,无法修改审核状态为”审核通过“,而且在表单中一直显示审核状态为“新增”
var process=getDocProcess(getApplication());
var doc=getCurrentDocument();
var flowType =doc.getLastFlowOperation();
var statelabel = getStateLabel();
println("flowType:"+flowType);
if (flowType!=null && flowType.equals("81")) {
doc.findItem("STAT").setValue("驳回");
process.doUpdate(doc);
}//回退
if (flowType!=null && flowType.equals("7")) {
doc.findItem("STAT").setValue("审核通过");
doc.findItem("AUDITIME").setValue(getToday());
doc.findItem("AUDITOR").setValue(getWebUser().getName());
process.doUpdate(doc);
}
if (flowType!=null && flowType.equals("8")) {
doc.findItem("STAT").setValue("已终止");
process.doUpdate(doc);
}
if (flowType!=null && flowType.equals("80")){
doc.findItem("STAT").setValue("审批中");
process.doUpdate(doc);
//审批中
}
版本号obpm 20221 |