|
|
【myApps/OBPM版本号】:v4.4- sp 23
【浏览器类型】:Chrome/其他
【问题描述】:
- #include"deptFunction1";
- (function testhis(){
- var flsg=IsWeixin();
- if(!flsg){
- var curDoc = getCurrentDocument();
- var message="<table id='flowhistory' cellSpacing='0' cellPadding='1' width='90%' align='center' style='table-layout:fixed;border:solid #cccccc;border-width:1px 0px 0px 1px;'><tbody><tr style='line-height:22px;'><td style='width:10%;align:center;font-size:12px;font-family: Arial;border:solid #cccccc;border-width:0px 1px 1px 0px;background-color:#EFF0F1;width=10%;' >审批人</td><td style='width:20%;font-size:12px;font-family: Arial;border:solid #cccccc;border-width:0px 1px 1px 0px;background-color:#EFF0F1;width=20%' >审批时间</td><td style='width:30%;align:center;font-size:12px;font-family: Arial;border:solid #cccccc;border-width:0px 1px 1px 0px;background-color:#EFF0F1;width=30%' >备注</td><td style='width:10%;align:center;font-size:12px;font-family: Arial;border:solid #cccccc;border-width:0px 1px 1px 0px;background-color:#EFF0F1;width=10%' >动作</td><td style='font-size:12px;font-family: Arial;border:solid #cccccc;border-width:0px 1px 1px 0px;background-color:#EFF0F1;' >流程状态</td></tr>";
- var txtNo = curDoc.getId();
-
- var sql="select acthis.nodehis_id,acthis.name,acthis.attitude,acthis.processtime,relhis.startNodename, relhis.flowoperation from (select * from T_Actorhis where doc_id = '"+txtNo+"') acthis,(select * from t_relationhis where docid = '"+txtNo+"') relhis where acthis.nodehis_id=relhis.ID and relhis.startNodename='部门审批中1' and acthis.processtime=(select max(acthis.processtime) as processtime from (select * from T_Actorhis where doc_id = '"+txtNo+"') acthis,(select * from t_relationhis where docid = '"+txtNo+"') relhis where acthis.nodehis_id=relhis.ID and relhis.startNodename='部门审批中1')";
- var datas = queryByDSName("cunhuoBusiness",sql);
- var count = 0;
- if(datas!=null&&datas.size()>0){
- for(var iter = datas.iterator();iter.hasNext();){
- count = count + 1;
- var doc = iter.next();
- var name = doc.get("name");
- var namebak = name;
- if ("admin".equalsIgnoreCase(name)) {
- name = "系统管理员";
- }
- var time1 = doc.get("processtime");
- var time =format(time1,"yyyy-MM-dd HH:mm:ss");
-
- // var time= parseDate(time2,"yyyy-MM-dd HH:mm:ss");
-
- var id = doc.get("nodehis_id");
- var nodeName = "";
- var status = "";
- nodeName = doc.get("startNodename");
- var statusNum = doc.get("flowoperation")-0;
- var attitude = "";
- var att = doc.get("attitude");
- if(att!=null&&att.trim().length()>0){
- if("提交备注".equals(att)||"说点什么吧...".equals(att)){
- attitude = "";
- }else{
- attitude = att;
- }
- }
- if (statusNum == 80) {
- if (name.indexOf("[")>=0 || name.indexOf("]")>=0) {
- status = "代理审批";
- } else {
- status = "流转";
- }
- } else if (statusNum == 81) {
- status = "回退";
- } else if (statusNum == 7) {
- status = "完成";
- } else if (statusNum == 87) {
- status = "自动审批";
- } else if (statusNum == 85) {
- status = "回撤";
- } else if (statusNum == 86) {
- status = "流程监控";
- } else if (statusNum == 100) {
- status = "提交至回退人";
- }
-
- if(count>0){
- message += "<tr style='line-height:22px;'><td style='font-size:12px;font-family: Arial;border:solid #cccccc;border-width:0px 1px 1px 0px;align:center;'>"+name+"</td><td style='align:center;font-size:12px;font-family: Arial;border:solid #cccccc;border-width:0px 1px 1px 0px;'>"+time+"</td><td style='font-size:12px;font-family: Arial;border:solid #cccccc;border-width:0px 1px 1px 0px;align:center;'><font style='font-weight:bold;'>"+attitude+"</font></td><td style='font-size:12px;font-family: Arial;border:solid #cccccc;border-width:0px 1px 1px 0px;'>"+status+"</td><td style='font-size:12px;font-family: Arial;border:solid #cccccc;border-width:0px 1px 1px 0px;word-wrap:break-word; white-space: pre-wrap;'>"+nodeName+" </td></tr>";
- }
- }
- }
- message += "</tbody></table>";
- return message;
- }
- })();
复制代码 |
|