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

[已解决] 回退按钮中能写执行脚本么

[复制链接]
上海中汇 发表于 2017-6-13 11:34:52 | 显示全部楼层 |阅读模式
如题,能否在回退工单时,写执行脚本清空特定字段的值?

QQ:350677226
karrman 发表于 2017-6-13 14:06:48 | 显示全部楼层
将脚本,放在提交的执行后脚本
  1. //1、判断提交还是回退
  2. var t =doc.getLastFlowOperation();//t=80表示提交;t=81表示回退。
  3. //如果回退,将自动填写的字段清空;
  4. var type1=getParameter("_flowType");
  5. var doc=getCurrentDocument();
  6. var process=getDocumentProcess();
  7. if(type1=="81"){
  8.       doc.findItem("managr").setValue("");
  9.            doc.findItem("sign_date").setValue("");
  10.            process.doUpdate(doc);

  11. }
复制代码

确认没有问题,请回复帖子,说明问题已解决,我们需要作为结贴依据,谢谢!
回复

使用道具 举报

karrman 发表于 2017-6-13 14:07:01 | 显示全部楼层
将脚本,放在提交的执行后脚本
  1. //1、判断提交还是回退
  2. var t =doc.getLastFlowOperation();//t=80表示提交;t=81表示回退。
  3. //如果回退,将自动填写的字段清空;
  4. var type1=getParameter("_flowType");
  5. var doc=getCurrentDocument();
  6. var process=getDocumentProcess();
  7. if(type1=="81"){
  8.       doc.findItem("managr").setValue("");
  9.            doc.findItem("sign_date").setValue("");
  10.            process.doUpdate(doc);

  11. }
复制代码

确认没有问题,请回复帖子,说明问题已解决,我们需要作为结贴依据,谢谢!
回复

使用道具 举报

 楼主| 上海中汇 发表于 2017-6-13 17:26:23 | 显示全部楼层
功能已实现,可以结帖
回复

使用道具 举报

karrman 发表于 2017-6-13 17:31:55 | 显示全部楼层
感谢反馈,可以结贴!
回复

使用道具 举报

本版积分规则

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

GMT+8, 2026-8-13 21:20

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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