天翎MyApps技术社区 - 低代码平台 | 流程管理系统 | BPM软件

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

[Iscript] 表单审批日期字段取当前审批人审批的日期【Iscript-流程历史】

[复制链接]
bobo 发表于 2013-10-14 15:29:20 | 显示全部楼层 |阅读模式
Q:您好:如何实现表单审批日期字段取当前审批人审批流程的日期?表单挂流程
A:您好,您可以用脚本去获取流程历史来实现此功能!具体操作代码如下:
  1. var opts="";
  2. var userProcess = getUserProcess();
  3. var doc = getCurrentDocument();
  4. var domainid = getDomainid();
  5. var nodeName="部门经理";  //流程节点名称
  6. println(nodeName+"======nodeName=====");
  7. var sql="select id,actorid as item_actorid,processtime as item_processtime,name as item_name,'" + domainid + "' as domainid from T_ACTORHIS where NODEHIS_ID in (select ID from t_relationhis where docid='"+doc.getId()+"' and startnodename='"+nodeName+"')";
  8. //var sql="select ID from t_relationhis where docid='"+doc.getId()+"' and startnodename='"+nodeName+"'";
  9. var datas = queryBySQL(sql);
  10. println(datas+"======datas=======");
  11. for (var it = datas.iterator(); it.hasNext();) {
  12.        var d = it.next();
  13.     println(d+"==ddddd====");
  14.        if(d!=null){
  15.       opts=d.getItemValueAsDate("processtime");
  16.         println(opts+"=====opts====");}
  17. }opts;
复制代码
效果图如下:
11.png

本版积分规则

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

GMT+8, 2026-8-12 16:34

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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