123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/commons/include/html_doctype.html"%>
- <html>
- <head>
- <title>任务催办设置</title>
- <base target="_self" />
- <%@include file="/commons/include/form.jsp" %>
- <%-- <link href="${ctx}/styles/default/css/jquery.qtip.css" rel="stylesheet" />
- <link rel="stylesheet" type="text/css" href="${ctx}/js/codemirror/lib/codemirror.css" > --%>
- <f:link href="jquery.qtip.css"></f:link>
- <f:link href="codemirror/lib/codemirror.css"></f:link>
- <script type="text/javascript" src="${ctx}/js/hotent/displaytag.js" ></script>
- <script type="text/javascript" src="${ctx}/servlet/ValidJs?form=taskReminder"></script>
- <script type="text/javascript" src="${ctx}/js/hotent/platform/system/TemplateDialog.js"></script>
- <script type="text/javascript" src="${ctx}/js/hotent/platform/system/ScriptDialog.js" ></script>
- <script type="text/javascript" src="${ctx}/js/jquery/plugins/jquery.qtip.js" ></script>
- <script type="text/javascript" src="${ctx}/js/codemirror/lib/codemirror.js"></script>
- <script type="text/javascript" src="${ctx}/js/codemirror/lib/util/matchbrackets.js"></script>
- <script type="text/javascript" src="${ctx}/js/codemirror/mode/groovy/groovy.js"></script>
- <script type="text/javascript" src="${ctx}/js/hotent/platform/system/SysDialog.js"></script>
- <script type="text/javascript" charset="utf-8" src="${ctx}/js/ueditor2/form-setting/editor_config.js"></script>
- <script type="text/javascript" charset="utf-8" src="${ctx}/js/ueditor2/editor_api.js"></script>
- <style>
- .sub{ display: none;}
- .condExp-control{
- width: 98%;
- padding: 2px;
- margin:2px;
- border: solid 1px #A8CFEB;
- }
- .condExp-control [name='flowOperate']{
- width:65px;
- }
- .condExp-editor{
- width: 540px;
- padding: 2px;
- margin:2px;
- height: 100px;
- border: solid 1px #A8CFEB;
- overflow: auto;
- }
- .condExp-editor-input{
- width:100%;
- height: 100px;
- }
-
- .script-control{
- width: 98%;
- padding: 2px;
- margin:2px;
- border: solid 1px #A8CFEB;
- }
- .script-editor{
- width: 98%;
- padding: 2px;
- margin:2px;
- height: 100px;
- border: solid 1px #A8CFEB;
- overflow: auto;
- }
- .script-editor-input{
- width:100%;
- height: 100px;
- }
- .send-msg-tr{
- display:none;
- }
- .choose-assigner{
- display:none;
- }
- .day-input{
- width:40px;
- }
- </style>
- <script type="text/javascript">
- /*KILLDIALOG*/
- var dialog = frameElement.dialog; //调用页面的dialog对象(ligerui对象)
- var editorMail;
- var editorMsg
- function showRequest(formData, jqForm, options) {
- return true;
- }
- //CodeMirror Editor
- var condExpScriptEditor=null,
- actionScriptEditor=null,
- curTime = '${taskReminder.times}';
-
- $(function() {
- $("input.day-input").focus(function(){
- $(this).select();
- });
- //total page layout
- $("#reminder-layout").ligerLayout({
- rightWidth:210
- });
- //是否发送催办信息的checkbox
- $("#needSendMsg").change(function(){
- var me = $(this),
- sendMsg = me.attr("checked");
-
- if(sendMsg){
- $(".send-msg-tr").show();
- }
- else{
- $("select[name='times']").val(0);
- $(".send-msg-tr").hide();
- }
- });
- if(curTime>0){
- $("#needSendMsg").attr("checked","checked").trigger("change");
- }
- //TaskReminder form Edit Layout
- $("#reminder-div-tab").ligerTab({
- });
- //reminder action change handle
- change();
- //save reminder
- $("a.save").click(save);
- //new reminder
- $("#btnAdd").click(add);
- ueditorInit()//初始化编辑器
- setTimeout(function(){
- var height=$("#condExp").height();
- condExpScriptEditor = CodeMirror.fromTextArea(document.getElementById("condExp"), {
- mode: "text/x-groovy",
- lineNumbers: true,
- matchBrackets: true
- });
- condExpScriptEditor.setSize(null,height);
- },0);
- setTimeout(function(){
- var height=$("#script").height();
- actionScriptEditor = CodeMirror.fromTextArea(document.getElementById("script"), {
- mode: "text/x-groovy",
- lineNumbers: true,
- matchBrackets: true
- });
- actionScriptEditor.setSize(null,height);
- },0);
-
- $("#reminders-list-table tbody tr").click(function(){
- var id=$(this).find("input.pk").val();
- url=__ctx + "/platform/bpm/taskReminder/edit.ht?actDefId=${actDefId}&nodeId=${nodeId}&id=" + id;
- document.getElementById('goLocation').href = url;
- document.getElementById('goLocation').click();
- });
-
- // 添加预警行
- $("#addWarning").click(function(){
- var tr = $("#warningTemplate").val();
- var WarningTable = $("#taskWarningSetList");
- WarningTable.append($(tr));
- });
- handFlowVars();
- });
- //初始化编辑器
- function ueditorInit(){
- editorMail = new baidu.editor.ui.Editor
- ({minFrameHeight:100,initialFrameWidth:'100%',lang:'zh_cn',toolbars:
- [['source','undo','redo','bold','italic', 'underline',
- 'subscript','superscript', 'removeformat',
- 'selectall', 'forecolor', 'fontsize', 'backcolor','justifyleft',
- 'justifyright', 'justifycenter', 'justifyjustify',
- 'sendperson','readperson','jumpurl' ,'taskname','remaintime']]
- });
- editorMsg = new baidu.editor.ui.Editor
- ({minFrameHeight:100,initialFrameWidth:'100%',lang:'zh_cn',toolbars:
- [['source','undo','redo','bold','italic', 'underline',
- 'subscript','superscript', 'removeformat',
- 'selectall', 'forecolor', 'fontsize', 'backcolor','justifyleft',
- 'justifyright', 'justifycenter', 'justifyjustify'
- ,'sendperson','readperson','jumpurl' ,'taskname','remaintime']]
- });
- editorMail.render("mailContent");
- editorMsg.render("msgContent");
- }
-
- function delWaringLine(me){
- $(me).closest("tr").remove();
- }
- function handtaskWarningSet(){
- var warningTable = $("#taskWarningSetList");
- var warningSetList = [];
- var tbody = $(warningTable.children()[1]);
- tbody.children().each(function(){
- var tr = $(this);
- var name = $("[name='warnName']",tr).val();
- if(name){
- var reminderDueDay = $("[name='reminderDueDay']",tr).val();
- var reminderDueHour = $("[name='reminderDueHour']",tr).val();
- var reminderDueMinute = $("[name='reminderDueMinute']",tr).val();
- var relativeType = $("[name='relativeType']",tr).val();
- var level = $("[name='level']",tr).val();
-
- warningSetList.push(
- { name:name,
- reminderDueDay:reminderDueDay,
- reminderDueHour:reminderDueHour,
- reminderDueMinute:reminderDueMinute,
- relativeType:relativeType,
- level:level
- });
- }
- });
- $("#warningSetJson").val(JSON.stringify(warningSetList));
- }
-
- /**
- * Action Change handler
- */
- function change(){
- var s= $("#action").val();
- $(".sub").hide();
- $(".choose-assigner").hide();
- if(s==7){//选择执行脚本
- $(".sub").show();
- if(actionScriptEditor){
- actionScriptEditor.refresh();
- }
- }
- if(s==5){//选择交办
- $(".choose-assigner").show();
- }
- }
-
- /**
- * Select Template
- */
- function slectTemplate(txtId,isText){
- var objcondExpCode=document.getElementById(txtId);
- TemplateDialog({isText:isText,callback:function(content){
- if(txtId=='mailContent'){
- var html = editorMail.getContent();
- editorMail.setContent(html+content);
- }else if(txtId=='msgContent'){
- var html = editorMsg.getContent();
- editorMsg.setContent(html+content);
- }else{
- jQuery.insertText(objcondExpCode,content);
- }
- }});
- };
-
- /**
- * 添加
- */
- function add(){
- url=__ctx + "/platform/bpm/taskReminder/edit.ht?actDefId=${actDefId}&nodeId=${nodeId}&id=0";
- document.getElementById('goLocation').href = url;
- document.getElementById('goLocation').click();
- }
- /**
- * 保存
- */
- function save(){
- handtaskWarningSet();
- condExpScriptEditor.save();
- actionScriptEditor.save();
- var name=$("#name").val();
- if(!name){
- $.ligerDialog.warn("请输入任务任务催办名称","提示信息");
- return;
- }
- var ctime=getTotalMinute($("#completeTr"));
- var stime=getTotalMinute($("#startTr"));
- //每次时间间隔*催办次数。
- var etime=getTotalMinute($("#endTr")) * ( parseInt($("#times").val())-1);
- if(ctime<stime+etime){
- $.ligerDialog.warn('办结时间不能比催办时间短',"提示信息");
- return;
- }
- $("#mailContent").val(editorMail.getContent());
- $("#msgContent").val(editorMsg.getContent());
- var rtn=$("#taskReminderForm").valid();
- if(!rtn) return;
- var url=__ctx+ "/platform/bpm/taskReminder/save.ht";
- var para=$('#taskReminderForm').serialize();
- $.post(url,para,showResult);
- }
- function showResult(responseText){
- var obj=new com.hotent.form.ResultMessage(responseText);
- if(!obj.isSuccess()){
- $.ligerDialog.err('出错信息',"任务催办提醒失败",obj.getMessage());
- return;
- }else{
- $.ligerDialog.confirm(obj.getMessage()+',是否继续操作?','提示信息',function(rtn){
- if(!rtn){
- dialog.close();
- }else{
- url=__ctx + "/platform/bpm/taskReminder/edit.ht?actDefId=${actDefId}&nodeId=${nodeId}&id=0";
- document.getElementById('goLocation').href = url;
- document.getElementById('goLocation').click();
- }
- });
- }
- }
-
- /**
- *
- */
- function scriptSelectScript(obj){
- ScriptDialog({callback:function(script){
- var pos=scriptScriptEditor.getCursor();
- scriptScriptEditor.replaceRange(script,pos);
- }});
- }
- /**
- *
- */
- function condExpSelectScript(obj){
- ScriptDialog({callback:function(script){
- var pos=condExpScriptEditor.getCursor();
- condExpScriptEditor.replaceRange(script,pos);
- }});
- }
-
- function getTotalMinute(e){
- var t=0;
- $(e).find(".dayInput").each(function(){
- t+= parseInt(3600* this.value);
- });
- $(e).find(".hourInput").each(function(){
- t+=parseInt(60* this.value);
- });
- $(e).find(".minuteInput").each(function(){
- t+=parseInt(this.value);
- });
- return t;
- }
-
- function constructFlowOperate(type){
- var select = $("select[name='flowOperate']");
- select.html("");
- type=type.toLowerCase();
- switch(type){
- case 'int':
- case 'number':
- case 'date':
- var eq=$("<option value='eq'>等于</option>");
- var ne=$("<option value='ne'>不等于</option>");
- var gt=$("<option value='gt'>大于</option>");
- var lt=$("<option value='lt'>小于</option>");
- select.append(eq);
- select.append(ne);
- select.append(gt);
- select.append(lt);
- break;
- case 'varchar':
- var eq=$("<option value='eq'>等于</option>");
- var ne=$("<option value='ne'>不等于</option>");
- select.append(eq);
- select.append(ne);
- break;
- }
- }
-
- function dateTimePicker(){
- WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true});
- $(this).blur();
- }
- /**
- * Select a different flow var
- * @params obj,target dom object
- */
- function selectFlowVar(obj,type){
- var obj=$(obj);
- obj.qtip("destroy");
- if(type==1){
- var fname=obj.val();
- if(!fname){
- return;
- }
- var ftype = obj.find("option:selected").attr("ftype");
- constructFlowOperate(ftype);
-
- var valueInput=$("<input name='flowValue'/>");
- var oldValueInput=$("input[name='flowValue']");
-
- if('date'==ftype.toLowerCase()){
- valueInput.addClass("date");
- valueInput.focus(dateTimePicker);
- }
- oldValueInput.replaceWith(valueInput);
-
- }else if(type==2){
- var fname = obj.val();
- var pos=actionScriptEditor.getCursor();
- actionScriptEditor.replaceRange(fname,pos);
- }
- var opt = obj.find("option:selected")
- var fname=opt.attr("fname");
- var fdesc=opt.attr("fdesc");
- var ftype=opt.attr("ftype");
- ftype=dbTypeToGroovyType(ftype);
- var content=""
- +"<table class='table-detail'>"
- +"<tr>"
- +"<th>名称</th>"
- +"<td>"+fname+"</td>"
- +"</tr>"
- +"<tr>"
- +"<th>注释</th>"
- +"<td>"+fdesc+"</td>"
- +"</tr>"
- +"<tr>"
- +"<th>类型</th>"
- +"<td>"+ftype+"</td>"
- +"</tr>"
- +"</table>";
- obj.qtip({
- content:content
- });
- }
-
- /**
- * Generate Express from Gui setting
- * @params obj,target dom object
- */
- function generateExpress(obj){
- var div = $(obj).closest("div.condExp-control");
- var flowVar=div.find("select[name='flowVar']").find("option:selected");
- var flowVarName=flowVar.val();
- var flowVarType=flowVar.attr("ftype");
- var flowVarOperate=div.find("select[name='flowOperate']").find("option:selected").val();
- var flowVarValue=div.find("input[name='flowValue']").val();
-
- if(!flowVarName){
- $.ligerDialog.warn("请选择流程变量!");
- return;
- }
- if(!flowVarOperate){
- $.ligerDialog.warn("请选择变量操作类型变量!");
- return;
- }
- if(!flowVarValue){
- $.ligerDialog.warn("请输入流程变量值!");
- return;
- }
- var exp=null;
- flowVarType=flowVarType.toLowerCase();
- switch(flowVarType){
- case 'int':
- case 'number':
- switch(flowVarOperate){
- case "eq":
- exp = flowVarName+" == "+flowVarValue;
- break;
- case "ne":
- exp = flowVarName+" != "+flowVarValue;
- break;
- case "gt":
- exp = flowVarName+" > "+flowVarValue;
- break;
- case "ge":
- exp = flowVarName+" >= "+flowVarValue;
- break;
- case "lt":
- exp = flowVarName+" < "+flowVarValue;
- break;
- case "le":
- exp = flowVarName+" <= "+flowVarValue;
- break;
- }
- break;
- case 'date':
- flowVarValue = "com.hotent.core.util.TimeUtil.convertString(\""+flowVarValue+'\","yyyy-MM-dd")';
- switch(flowVarOperate){
- case "eq":
- exp = flowVarValue+".compareTo((Date)"+flowVarName+") == 0";
- break;
- case "ne":
- exp = flowVarValue+".compareTo((Date)"+flowVarName+") !=0 ";
- break;
- case "gt":
- exp = flowVarValue+".compareTo((Date)"+flowVarName+") < 0";
- break;
- case "lt":
- exp = flowVarValue+".compareTo((Date)"+flowVarName+") > 0";
- break;
- }
- break;
- case 'varchar':
- switch(flowVarOperate){
- case "eq":
- exp = flowVarName+".equals(\""+flowVarValue+"\")";
- break;
- case "ne":
- exp =" !"+flowVarName+".equals(\""+flowVarValue+"\")";
- break;
- }
- break;
- }
- var pos=condExpScriptEditor.getCursor();
- condExpScriptEditor.replaceRange(exp,pos);
- }
-
- /**
- * 数据库类型到Groovy类型的转换
- * @params type relation data type
- * @return groovy type
- */
- function dbTypeToGroovyType(type){
- type=type.toLowerCase();
- var t;
- switch(type){
- case 'int':
- t='int';
- break;
- case 'number':
- t='double';
- break;
- case 'date':
- t='java.lang.Date';
- break;
- case 'varchar':
- case 'clob':
- t='java.lang.String';
- break;
- default:
- t=type;
- }
- return t;
- };
- //选择交办人
- function chooseAssigner(){
- UserDialog({
- isSingle:true,
- callback:function(userId,fullname){
- if(userId=='' || userId==null || userId==undefined) return;
- $("input[name='assignerId']").val(userId);
- $("input[name='assignerName']").val(fullname);
- }
- });
- };
- function handFlowVars(){
- $("select[name='selFlowVar']").change(function(){
- var val="{"+$(this).val()+"}";
- var thisEditor=$(this).closest('tr').find('textarea');
- var editorName=$(thisEditor).attr('name');
- if(val.length==0) return;
-
- if(editorName.indexOf('mail')!=-1){
- var html = editorMail.getContent();
- editorMail.setContent(html+"$"+val);
- }else{
- var html = editorMsg.getContent();
- editorMsg.setContent(html+"$"+val);
- }
- });
- }
- </script>
- </head>
- <body>
- <div class="panel">
- <div class="panel-top">
- <div class="tbar-title">
- <span class="tbar-label">编辑任务节点催办时间设置</span>
- </div>
- <div class="panel-toolbar">
- <div class="toolBar">
- <div class="group"><a class="link add" id="btnAdd"><span></span>增加</a></div>
- <div class="l-bar-separator"></div>
- <div class="group"><a class="link save" id="dataFormSave" href="javascript:;"><span></span>保存</a></div>
- <div class="l-bar-separator"></div>
- <div class="group"><a class="link del" onclick="javascript:dialog.close();"><span></span>关闭</a></div>
- </div>
- </div>
- </div>
- <div class="panel-body">
- <div class="reminder-layout" id="reminder-layout">
- <div class="reminder-edit" position="center">
- <div style="height:570px;overflow: auto;">
- <form id="taskReminderForm" method="post" action="save.ht">
- <div class="reminder-div" >
- <div class="reminder-div-tab" id="reminder-div-tab">
-
- <div class="reminder-div-base" title="催办基本信息设置">
- <div class="panel-detail">
- <fieldset class="fieldset-detail">
- <legend>
- <span>到期条件设置</span>
- </legend>
- <table class="table-detail" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <th width="120px">名称:</th>
- <td >
- <input id="name" name="name" value="${taskReminder.name}" class="inputText" />
- </td>
- <!-- <th >默认:</th> -->
- <!-- <td > -->
- <%-- <input id="isDefaultTrue" name="isDefault" type="radio" value="1" <c:if test="${taskReminder.isDefault==1 }">checked="checked"</c:if> /> --%>
- <!-- <label for="isDefaultTrue">是</label> -->
- <%-- <input id="isDefaultFalse" name="isDefault" type="radio" value="0" <c:if test="${taskReminder.isDefault!=1 }">checked="checked"</c:if> /> --%>
- <!-- <label for="isDefaultFalse">否</label> -->
- <!-- </td> -->
- <th width="100px">当前节点:</th>
- <td><input type="text" value="${nodeId}" disabled="disabled"/></td>
- </tr>
- <tr>
- <th>相对节点:</th>
- <td>
- <select name="relativeNodeId">
- <c:forEach items="${nodes}" var="node">
- <option value="${node.nodeId}" <c:if test="${node.nodeId==taskReminder.relativeNodeId}">selected="selected"</c:if>>${node.nodeName}</option>
- </c:forEach>
- </select>
- </td>
- <th>相对动作:</th>
- <td>
- <select name="relativeNodeType">
- <option value="0" >创建</option>
- <option value="1" <c:if test="${taskReminder.relativeNodeType==1}">selected="selected"</c:if>>完成</option>
- </select>
- </td>
- </tr>
- <tr>
- <th >相对时间: </th>
- <td id="completeTr">
- <input class="day-input" type="text" name="completeTimeDay" value="${completeTimeDay}"/>
- <span>天</span>
- <select id="completeTimeHour" class="hourInput" name="completeTimeHour">
- <c:forEach var="i" begin="0" end="23" step="1">
- <option value="${i}" <c:if test="${completeTimeHour==i}">selected="selected"</c:if>>${i}小时</option>
- </c:forEach>
- </select>
- <select id="completeTimeMinute" class="minuteInput" name="completeTimeMinute">
- <c:forEach var="i" begin="0" end="4" step="1">
- <option value="${i}" <c:if test="${completeTimeMinute==i}">selected="selected"</c:if>>${i}分钟</option>
- </c:forEach>
- <c:forEach var="i" begin="5" end="59" step="5">
- <option value="${i}" <c:if test="${completeTimeMinute==i}">selected="selected"</c:if>>${i}分钟</option>
- </c:forEach>
- </select>
- </td>
- <th>相对时间类型:</th>
- <td>
- <select name="relativeTimeType">
- <option value="0">工作日</option>
- <option value="1" <c:if test="${taskReminder.relativeTimeType==1}">selected="selected"</c:if>>日历日</option>
- </select>
- </td>
- </tr>
- <tr>
- <th >
- <a href="javascript:;" class="link tipinfo"><span style="z-index: 100;text-align: left;">条件表达要求是返回Boolean值的脚本。返回true,表示满足条件;返回talse,表示条件不满足。如果表达式为空,将视为返回true。</span></a>
- 条件表达式:
- </th>
- <td colspan="3">
- <div class="condExp-control">
- <a href="javascript:;" class="link var" title="常用脚本" onclick="condExpSelectScript(this)">常用脚本</a>
- <%-- <f:flowVar defId="${defId}"></f:flowVar> --%>
- <span class="green">表单变量</span>
- <select name="flowVar" onchange="selectFlowVar(this,1)">
- <option value="">请选择...</option>
- <optgroup label="表单变量"></optgroup>
- <c:forEach items="${flowVars}" var="flowVar">
- <option class="flowvar-item" value="${flowVar.fieldName}" fname="${flowVar.fieldName}" fdesc="${flowVar.fieldDesc}" ftype="${flowVar.fieldType}">${flowVar.fieldDesc}</option>
- </c:forEach>
- <c:if test="${not empty defVars}">
- <optgroup label="自定义变量"></optgroup>
- <c:forEach items="${defVars}" var="defVars">
- <option class="flowvar-item" value="${defVars.varKey}" fname="${defVars.varKey}" fdesc="${defVars.varName}" ftype="${defVars.varDataType}">${defVars.varName}</option>
- </c:forEach>
- </c:if>
- </select>
- <span class="green">比较</span>
- <select name="flowOperate" >
- </select>
- <span class="green">值</span>
- <input name="flowValue"/>
- <a onclick="generateExpress(this)" href="javascript:;" class="button">
- <span>生成</span>
- </a>
- </div>
- <div class="condExp-editor">
- <textarea id="condExp" name="condExp" class="condExp-editor-input">${taskReminder.condExp}</textarea>
- </div>
- </td>
- </tr>
- </table>
- </fieldset>
- <fieldset class="fieldset-detail">
- <legend>
- <span>到期动作设置</span>
- </legend>
- <table class="table-detail" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <th width="100">执行动作: </th>
- <td colspan="3">
- <select id="action" onchange="change()" name="action">
- <option value="0" <c:if test="${taskReminder.action==0}">selected="selected"</c:if>>无动作</option>
- <option value="1" <c:if test="${taskReminder.action==1}">selected="selected"</c:if>>执行同意操作</option>
- <option value="2" <c:if test="${taskReminder.action==2}">selected="selected"</c:if>>执行反对操作</option>
- <option value="3" <c:if test="${taskReminder.action==3}">selected="selected"</c:if>>执行驳回操作</option>
- <option value="4" <c:if test="${taskReminder.action==4}">selected="selected"</c:if>>执行驳回到发起人操作</option>
- <option value="5" <c:if test="${taskReminder.action==5}">selected="selected"</c:if>>执行交办操作</option>
- <option value="6" <c:if test="${taskReminder.action==6}">selected="selected"</c:if>>结束该流程</option>
- <option value="7" <c:if test="${taskReminder.action==7}">selected="selected"</c:if>>调用指定方法</option>
- </select>
- </td>
- </tr>
- <tr class="sub" width="100">
- <th >执行脚本: </th>
- <td colspan="3">
- <div class="condExp-control">
- <a href="javascript:;" class="link var" title="常用脚本" onclick="scriptSelectScript(this)">常用脚本</a>
- <span class="green">表单变量:</span>
- <%-- <f:flowVar defId="${defId}" controlName="selFlowVar"></f:flowVar> --%>
- <select name="flowVar" onchange="selectFlowVar(this,2)">
- <option value="">请选择...</option>
- <c:forEach items="${flowVars}" var="flowVar">
- <option class="flowvar-item" value="${flowVar.fieldName}" fname="${flowVar.fieldName}" fdesc="${flowVar.fieldDesc}" ftype="${flowVar.fieldType}">${flowVar.fieldDesc}</option>
- </c:forEach>
- </select>
- </div>
- <div class="script-editor">
- <textarea rows="6" cols="60" id="script" name="script" class="script-editor-input">${taskReminder.script}</textarea>
- </div>
- </td>
- </tr>
- <tr class="choose-assigner" width="100">
- <th>指定交办人员:</th>
- <td colspan="3">
- <input type="hidden" name="assignerId" value="${taskReminder.assignerId}"/>
- <input type="text" name="assignerName" readonly="readonly" value="${taskReminder.assignerName}"/>
- <a href="javascript:;" onclick="chooseAssigner()" class="button">
- <span>选择</span>
- </a>
- </td>
- </tr>
- </table>
- </fieldset>
- <fieldset class="fieldset-detail">
- <legend>
- <span>发送催办消息设置</span>
- </legend>
- <table class="table-detail" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <th width="100">
- 发送催办信息:
- </th>
- <td colspan="3">
- <label><input type="checkbox" id="needSendMsg"/>发送</label>
- </td>
- </tr>
- <tr class="send-msg-tr">
- <th>开始发送时间:</th>
- <td id="startTr" colspan="3">
- <input class="day-input" type="text" name="reminderStartDay" value="${reminderStartDay}"/>
- <span>天</span>
- <select id="reminderStartHour" class="hourInput" name="reminderStartHour">
- <c:forEach var="i" begin="0" end="23" step="1">
- <option value="${i}" <c:if test="${reminderStartHour==i}">selected="selected"</c:if>>${i}小时</option>
- </c:forEach>
- </select>
- <select id="reminderStartMinute" class="minuteInput" name="reminderStartMinute">
- <c:forEach var="i" begin="0" end="4" step="1">
- <option value="${i}" <c:if test="${reminderStartMinute==i}">selected="selected"</c:if>>${i}分钟</option>
- </c:forEach>
- <c:forEach var="i" begin="5" end="59" step="5">
- <option value="${i}" <c:if test="${reminderStartMinute==i}">selected="selected"</c:if>>${i}分钟</option>
- </c:forEach>
- </select>
- </td>
- </tr>
- <tr class="send-msg-tr">
- <th><a href="javascript:;" class="tipinfo"><span>每过多长的时间发送催办信息。 </span></a>发送的间隔:</th>
- <td id="endTr">
- <input class="day-input" type="text" name="reminderEndDay" value="${reminderEndDay}"/>
- <span>天</span>
- <select id="reminderEndHour" class="hourInput" name="reminderEndHour">
- <c:forEach var="i" begin="0" end="23" step="1">
- <option value="${i}" <c:if test="${reminderEndHour==i}">selected="selected"</c:if>>${i}小时</option>
- </c:forEach>
- </select>
- <select id="reminderEndMinute" class="minuteInput" name="reminderEndMinute">
- <c:forEach var="i" begin="1" end="4" step="1">
- <option value="${i}" <c:if test="${reminderEndMinute==i}">selected="selected"</c:if>>${i}分钟</option>
- </c:forEach>
- <c:forEach var="i" begin="5" end="59" step="5">
- <option value="${i}" <c:if test="${reminderEndMinute==i}">selected="selected"</c:if>>${i}分钟</option>
- </c:forEach>
- </select>
- </td>
- <th>发送信息次数: </th>
- <td>
- <select name="times" >
- <c:forEach var="i" begin="0" end="10" step="1">
- <option value="${i}" <c:if test="${taskReminder.times==i}">selected="selected"</c:if>>${i}</option>
- </c:forEach>
- </select>
- </td>
- </tr>
- </table>
- </fieldset>
-
- <fieldset class="fieldset-detail">
- <legend>
- <span>任务紧急程度预警设置</span>
- </legend>
- <table class="table-grid" id="taskWarningSetList" cellpadding="0" cellspacing="0" border="0">
- <thead>
- <tr>
- <td colspan="5">
- <a class="link add" id="addWarning">增加预警项</a> <span style="color: gray;">到期动作为“无动作”时方才有效</span>
- </td>
- </tr>
- <tr align="center">
- <th>名称</th>
- <th>相对到期类型</th>
- <th>相对时间</th>
- <th>紧急程度</th>
- <th>管理</th>
- </tr>
- </thead>
- <c:forEach items="${taskReminder.taskWarningSetList}" var="warningSet">
- <tr>
- <td>
- <input class="input" type="text" name="warnName" value="${warningSet.name}"/>
- </td>
- <td>
- <select name="relativeType" >
- <option value="before" <c:if test="${warningSet.relativeType eq 'before'}">selected="selected"</c:if>>之前</option>
- <option value="after" <c:if test="${warningSet.relativeType eq 'after'}">selected="selected"</c:if>>之后</option>
- </select>
- </td>
-
- <td id="relativeTime">
- <input class="day-input" type="text" name="reminderDueDay" value="${warningSet.reminderDueDay}"/>
- <span>天</span>
- <select class="hourInput" name="reminderDueHour">
- <c:forEach var="i" begin="0" end="23" step="1">
- <option value="${i}" <c:if test="${warningSet.reminderDueDay==i}">selected="selected"</c:if>>${i}小时</option>
- </c:forEach>
- </select>
- <select id="reminderDueMinute" class="minuteInput" name="reminderDueMinute">
- <c:forEach var="i" begin="1" end="4" step="1">
- <option value="${i}" <c:if test="${warningSet.reminderDueMinute==i}">selected="selected"</c:if>>${i}分钟</option>
- </c:forEach>
- <c:forEach var="i" begin="5" end="59" step="5">
- <option value="${i}" <c:if test="${warningSet.reminderDueMinute==i}">selected="selected"</c:if>>${i}分钟</option>
- </c:forEach>
- </select>
- </td>
-
- <td>
- <select name="level">
- <c:forEach items="${warningSettingList}" var="warningSetting">
- <option value="${warningSetting.level}" <c:if test="${warningSet.level eq warningSetting.level}">selected="selected"</c:if>>${warningSetting.name}</option>
- </c:forEach>
- </select>
- </td>
- <td><a class="link del" onclick="delWaringLine(this)">删除</a></td>
- </tr>
- </c:forEach>
- </table>
- </fieldset>
- </div>
- </div>
-
- <div class="reminder-div-msg-mail" title="邮件内容">
- <div class="panel-detail">
- <table class="table-detail" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <th width="60" >邮件内容: </th>
- <td>
- <div>
- <a href="javascript:;" class="link var" title="选择模板内容" onclick="slectTemplate('mailContent',false)">选择模板内容</a>
- <f:flowVar defId="${defId}" controlName="selFlowVar"></f:flowVar>
- </div>
- <textarea id="mailContent" name="mailContent" rows="20" cols="50">${taskReminder.mailContent}</textarea>
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div class="reminder-div-msg-inter" title="站内消息内容">
- <div class="panel-detail">
- <table class="table-detail" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <th width="60" >站内消息内容: </th>
- <td>
- <div>
- <a href="javascript:;" class="link var" title="选择模板内容" onclick="slectTemplate('msgContent',false)">选择模板内容</a>
- <f:flowVar defId="${defId}" controlName="selFlowVar"></f:flowVar>
- </div>
- <textarea id="msgContent" name="msgContent" rows="12" cols="50">${taskReminder.msgContent}</textarea>
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div class="reminder-div-msg-sms" title="手机短信内容">
- <div class="panel-detail">
- <table class="table-detail" cellpadding="0" cellspacing="0" border="0">
- <tr >
- <th width="60" >手机短信内容: </th>
- <td>
- <div>
- <a href="javascript:;" class="link var" title="选择模板内容" onclick="slectTemplate('smsContent',true)">选择模板内容</a>
- </div>
- <textarea id="smsContent" name="smsContent" rows="12" cols="50">${taskReminder.smsContent}</textarea>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- <div>
- <input type="hidden" name="taskDueId" value="${taskReminder.taskDueId}" />
- <input type="hidden" name="actDefId" value="${actDefId}" />
- <input type="hidden" name="nodeId" value="${nodeId}" />
- <input type="hidden" id="defId" name="defId" value="${defId}" />
- <input type="hidden" name="warningSetJson" id="warningSetJson">
-
- <!-- 预警级别模板设置 -->
- <textarea id="warningTemplate" style="display:none;">
- <tr>
- <td>
- <input class="input" type="text" name="warnName" value=""/>
- </td>
- <td>
- <select name="relativeType" >
- <option value="before">之前</option>
- <option value="after">之后</option>
- </select>
- </td>
-
- <td id="relativeTime">
- <input class="day-input" type="text" name="reminderDueDay" value=""/>
- <span>天</span>
- <select id="reminderDueHour" class="hourInput" name="reminderDueHour">
- <c:forEach var="i" begin="0" end="23" step="1">
- <option value="${i}">${i}小时</option>
- </c:forEach>
- </select>
- <select id="reminderDueMinute" class="minuteInput" name="reminderDueMinute">
- <c:forEach var="i" begin="1" end="4" step="1">
- <option value="${i}">${i}分钟</option>
- </c:forEach>
- <c:forEach var="i" begin="5" end="59" step="5">
- <option value="${i}">${i}分钟</option>
- </c:forEach>
- </select>
- </td>
-
- <td>
- <select name="level">
- <c:forEach items="${warningSettingList }" var="warningSetting">
- <option value="${warningSetting.level}">${warningSetting.name}</option>
- </c:forEach>
- </select>
- </td>
- <td><a class="link del" onclick="delWaringLine(this)">删除</a></td>
- </tr>
- </textarea>
- </div>
- </form>
- </div>
- </div>
- <div class="reminders-list" position="right">
- <div class="reminders-div">
- <table class="table-grid" id="reminders-list-table">
- <thead>
- <tr>
- <th>名称</th>
- <th>管理</th>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="${taskReminders }" var="reminder" varStatus="status">
- <tr <c:if test="${status.index%2==0 }">class="odd"</c:if><c:if test="${status.index%2==1 }">class="even"</c:if>>
- <td>
- <span>${reminder.name }</span>
- <input class="pk" type="hidden" value="${reminder.taskDueId}"/>
- </td>
- <td>
- <a class="link del" href="del.ht?taskDueId=${reminder.taskDueId}">删除</a>
- </td>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- <a href="" id="goLocation" style="display:none;"></a>
- </div>
- </body>
- </html>
|