您好:加上您当前表单对应的流程图为A-B-C上个节点,三个节点对应的审批人为test1,test2,test3,那您查看 ...
kimi 发表于 2013-8-30 13:13 
你说我的有点晕,我是想知道有没的办法给予用户明确的标示,这个流程是回退的,不需要用户自己看逻辑自己去判断。目前我们系统在表格中自己写iscript实现了一个历史记录表。代码如下- /**
- *审批记录表
- */
- function getFlowOperationMSG(doc){
- var currDoc = doc || getCurrentDocument();
- var message = "";
- if(!"".equals(currDoc.getStateLabel()) && !"草稿".equals(currDoc.getStateLabel())){
- var domainid = getDomainid();
- var hisProcess = new Packages.cn.myapps.core.workflow.storage.runtime.ejb.RelationHISProcessBean(getApplication());
- var datas = hisProcess.doAllQueryByDocIdAndFlowStateId(currDoc.getId(), currDoc.getStateid());
- if(datas != null && datas.size() > 0){
- message = "<table cellSpacing='0' cellPadding='1' width='100%' align='center' style='border:solid #cccccc;border-width:2px 0px 0px 2px;'><tbody><tr style='line-height:22px;'><td width=25%' style='font-size:larger;font-family: Arial;border:solid #cccccc;border-width:0px 2px 2px 0px;' bgcolor='#dddddd'>办理人[部门]</td><td width='40%' style='font-size:larger;font-family: Arial;border:solid #cccccc;border-width:0px 2px 2px 0px;' bgcolor='#dddddd'>办理意见</td><td width='15%' style='font-size:larger;font-family: Arial;border:solid #cccccc;border-width:0px 2px 2px 0px;' bgcolor='#dddddd'>办理时间</td><td width='25%' style='font-size:larger;font-family: Arial;border:solid #cccccc;border-width:0px 2px 2px 0px;' bgcolor='#dddddd'>办理状态</td></tr>";
- var process = createProcess("cn.myapps.core.department.ejb.DepartmentProcess");//部门业务处理类
- for(var it = datas.iterator();it.hasNext();){
- var relationhis = it.next();
- if(relationhis.getActorhiss().size() > 0){
- for(var actit = relationhis.getActorhiss().iterator();actit.hasNext();){
- var actorHis = actit.next();
- //var userid = relationhis.getItemValueAsString("auditor");
- var userid = actorHis.getActorid();
- var user = getUserById(userid);
- var username = (actorHis.getAgentname()!=null && actorHis.getAgentname().trim().length()>0) ? (actorHis.getAgentname()+"("+actorHis.getName()+")") : actorHis.getName();
- //var dept=process.doView(user.getDefaultDepartment());//id为部门ID,获取部门对象
- var departmentName ="";
- if(user!= null ){
- var depart = process.doView(user.defaultDepartment);
- if(depart != null){
- departmentName = depart.getName();
- }
- }
- var attitude = (actorHis.getAttitude() != null && actorHis.getAttitude().length() > 0) ? actorHis.getAttitude() : "";
- var processtime = (actorHis.getProcesstime() != null) ? format(actorHis.getProcesstime(),"yyyy-MM-dd HH:mm:ss") : format(relationhis.getActiontime(),"yyyy-MM-dd HH:mm:ss");
- var state=relationhis.getStartnodename()+"<img src='/obpm/portal/share/icon/16x16_0060/arrow_right.png' />"+relationhis.getEndnodename();
- if(!isNotNull(attitude))
- attitude=" ";
- message += "<tr style='line-height:22px;'><td style='font-size:larger;font-family: Arial;border:solid #cccccc;border-width:0px 2px 2px 0px;'>"+username+"["+departmentName+"]</td><td style='font-size:larger;font-family: Arial;border:solid #cccccc;border-width:0px 2px 2px 0px;'>"+attitude+"</td><td style='font-size:larger;font-family: Arial;border:solid #cccccc;border-width:0px 2px 2px 0px;'>"+processtime+"</td><td style='font-size:larger;font-family: Arial;border:solid #cccccc;border-width:0px 2px 2px 0px;'>"+state+"</td></tbody></tr>";
- }
- }
- }
- message += "</table><br/>";
- }
- }
- return message;
- }
复制代码 现在就是想再加一列标示历史记录是否回退 |