找回密码
 注册成为天翎用户
查看: 1204|回复: 5

[其他] 提交流程后审核状态问题

[复制链接]
北京智源普华 发表于 2014-9-11 09:50:26 | 显示全部楼层 |阅读模式
本帖最后由 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
 楼主| 北京智源普华 发表于 2014-9-11 10:03:00 | 显示全部楼层
回复 1# 北京智源普华


    请联系qq:625231762
回复

使用道具 举报

david 发表于 2014-9-11 13:46:10 | 显示全部楼层
本帖最后由 david 于 2014-9-11 13:51 编辑

请楼主把更新脚本写到 流向完成节点的线条的执行脚本里面(在这里不需要判断flowtype),有问题再沟通。
回复

使用道具 举报

 楼主| 北京智源普华 发表于 2014-9-11 14:46:59 | 显示全部楼层
回复 3# david


    已写到流程线的执行脚本里,但还是这种情况,请联系qq625231762
回复

使用道具 举报

david 发表于 2014-9-11 18:01:23 | 显示全部楼层
直接 通过getStateLabel()获取流程状态行么?
回复

使用道具 举报

 楼主| 北京智源普华 发表于 2014-9-12 09:10:25 | 显示全部楼层
回复 5# david


    我们感觉用getStateLabel()不太好,之前一直用的getLastFlowOperation(),为什么现在不行了呢?
回复

使用道具 举报

本版积分规则

手机版|天翎MyApps技术社区 ( 粤ICP备11093750号 )

GMT+8, 2026-8-13 22:36

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表