123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="renderer" content="webkit|ie-comp|ie-stand">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta http-equiv="Cache-Control" content="no-siteapp" />
- <link rel="stylesheet" href="${ctx}/assets/lib/bootstrap-3.3.7/css/bootstrap.min.css">
- <link rel="stylesheet" href="${ctx}/assets/lib/bootstrap-upload/css/default.css">
- <link rel="stylesheet" href="${ctx}/assets/lib/bootstrap-upload/css/fileinput.css">
- <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" >
- <script type="text/javascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.min.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/jquery.form/jquery.form.min.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/layer/3.0.3/layer.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/My97DatePicker/WdatePicker.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/bootstrap-upload/js/fileinput.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/bootstrap-upload/js/locales/zh.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/bootstrap-3.3.7/js/bootstrap.min.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
- <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
- <script src="${ctx}/assets/js/validate.js" ></script>
-
- <script type="text/javascript">
-
- function setCollapseIcon(collapseIcon)
- {
- var curCollapseIconClass=$("#"+collapseIcon).attr("class");
- if(curCollapseIconClass=="glyphicon glyphicon-menu-up")
- {
- $("#"+collapseIcon).attr("class","glyphicon glyphicon-menu-down");
- }
- else
- {
- $("#"+collapseIcon).attr("class","glyphicon glyphicon-menu-up");
- }
- }
-
-
-
- function setOrgAndJob(jobid,jobname,orgid)
- {
- $('#DoWorkDutiesID').val(jobid);
- $('#DoWorkDutiesName').val(jobname);
- $('#NodeDeptID').val(orgid);
- $('#orgModal').modal('hide');
-
- }
-
- function setOrg()
- {
- var zTreeObj;
- var zNodes;
- function zTreeChecked(event, treeId, treeNode) {
- setOrgAndJob(treeNode.id,treeNode.name,treeNode.pId);
- };
- //异步获取数据
- function ajaxDataFilter(treeId, parentNode, data) {
- if(data == "") return;
- var zNodes = [];
-
- var orgN = data.Org;
-
- orgN.forEach(function(item,index){
- zNodes.push({id:item.orgid,pId:item.parentid,name:item.orgname,istype:false, isParent:true,"nocheck":true});
- })
- var jobN = data.Job;
- jobN.forEach(function(item,index){
- zNodes.push({id:item.keyid,pId:item.orgid,name:item.jobname,istype:true,checked:false});
- })
-
- return zNodes;
- }
- var setting = { //初始化树
- check: {
- enable: true,
- chkboxType: { "Y" : "", "N" : "" },
- autoCheckTrigger: true
- },
- data: {
- simpleData: {
- idKey:"id",
- pIdKey:"pId",
- enable:true,
- rootPId:"0"
- }
- },
- callback: {
- onCheck: zTreeChecked
- },
- async:{
- enable:true,
- url:"${ctx}/myconsole/complaint/preinflow/getOrgAndJobTree",
- autoParam:["id", "name"] ,
- dataFilter: ajaxDataFilter
- }
- };
- //初始化获取数据
- $.ajax({
- url : "${ctx}/myconsole/complaint/preinflow/getOrgAndJobTree?name=init",
- type : "post",
- dataType : "json",
- success : function(data) {
- if(data == "") return;
- var zNodes = [];
- var orgN = data.Org;
- if(orgN!=null)
- {
- orgN.forEach(function(item,index){
- zNodes.push({id:item.orgid,pId:item.parentid,name:item.orgname,istype:false, isParent:true,"nocheck":true});
- })
- }
- var jobN = data.Job;
- if(jobN!=null)
- {
- jobN.forEach(function(item,index){
- zNodes.push({id:item.keyid,pId:item.orgid,name:item.jobname,istype:true,checked:false});
- })
- }
-
-
- zTreeObj = $.fn.zTree.init($("#UserTree"), setting, zNodes);//初始化树节点时,添加同步获取的数据
- }
- });
- $('#orgModal').modal({
- backdrop: 'static',
- keyboard: false
- })
-
- }
-
- //预设流程开发
- function getNewFlowNodeNum()
- {
- $('#form1').attr('action','${ctx}/myconsole/complaint/preinflow/getNewFlowNodeNum');
- $('#form1').ajaxSubmit(getNewFlowNodeNumHandle);
- }
- function getNewFlowNodeNumHandle(data)
- {
-
- $("#FlowNode").val(data);
- }
- function showFlowNode()
- {
- $('#form1').attr('action','${ctx}/myconsole/complaint/preinflow/getFlowNode');
- $('#form1').ajaxSubmit(getFlowNodeHandle);
- }
- function getFlowNodeHandle(data)
- {
- $("#FlowShow").empty();
- $("#FlowShow").append(data);
- $('#FlowModal').modal({
- backdrop: 'static',
- keyboard: false
- })
-
- $("#DoFlowNodeButton").removeAttr('disabled');
-
- }
- function setFlowNode()
- {
- if(doValidate(form1))
- {
- $('#form1').attr('action','${ctx}/myconsole/complaint/preinflow/setFlowNode');
- $('#form1').ajaxSubmit(resultFlowNodeHandle);
- }
- }
- function resultFlowNodeHandle(data){
- var res=eval('(' + data + ')');
- if(res.flag){
- layer.alert(res.message, {skin: 'layui-layer-molv',closeBtn: 1},
- function(){
- var strArrow="";
- if(res.FlowNode!="1")
- {
- strArrow="<div class='row' style='padding:5px'>"+
- "<div class='col-xs-4 col-sm-4 col-md-4 col-lg-4' >"+
- "</div>"+
- "<div class='col-xs-4 col-sm-4 col-md-4 col-lg-4' align=center>"+
- " <span class='glyphicon glyphicon-arrow-down'></span> "+
- "</div>"+
- "<div class='col-xs-4 col-sm-4 col-md-4 col-lg-4' >"+
- "</div>"+
- "</div>";
- }
- var strContent="";
- var strEditNode="<button type='button' class='btn btn-warning' id='EditNodeButton' onclick=editNode('"+res.FlowNode+"','"+res.DoWorkDutiesID+"','"+res.DoWorkDutiesName+"','"+res.NoNormalPay+"','"+res.NodeDeptID+"') ><span class='glyphicon glyphicon-pencil'></span></button>";
- strContent="<div class='row' style='padding:5px' id=FlowNode_"+res.FlowNode+">"+
- "<div class='col-xs-4 col-sm-4 col-md-4 col-lg-4' >"+
- "</div>"+
- "<div class='col-xs-4 col-sm-4 col-md-4 col-lg-4' align=center>"+
- " <button type='button' class='btn btn-success' style='width:300px'>"+res.NodeOrgName+"-"+res.NodeDeptName+"-"+res.DoWorkDutiesName+"("+res.NoNormalPay+"元)</button> "+
- "</div>"+
- "<div class='col-xs-4 col-sm-4 col-md-4 col-lg-4' >"+strEditNode+
- "</div>"+
- "</div>";
-
- var iFlowNode=parseInt(res.FlowNode);
- iFlowNode=iFlowNode+1;
- $("#NoNormalPay").val("");
- $("#NodeDeptID").val("");
- $("#DoWorkDutiesID").val("");
- $("#DoWorkDutiesName").val("");
- $("#FlowNode").val(iFlowNode);
- $("#FlowShow").append(strArrow);
- $("#FlowShow").append(strContent);
- layer.closeAll('dialog');
- });
-
- }else{
- if(res.flag == false)
- {
- layer.alert(res.message, {skin: 'layui-layer-molv',closeBtn: 0}, function(){layer.closeAll('dialog');});
- }
- }
- }
-
-
-
- function editNode(strFlowNode,strDoWorkDutiesID,strDoWorkDutiesName,strNoNormalPay,strNodeDeptID)
- {
- $("#FlowNode").val(strFlowNode);
- $('#DoWorkDutiesID').val(strDoWorkDutiesID);
- $('#DoWorkDutiesName').val(strDoWorkDutiesName);
- $('#NoNormalPay').val(strNoNormalPay);
- $('#NodeDeptID').val(strNodeDeptID);
- $("#DoFlowNodeButton").attr("onclick","editFlowNode()");
- }
- function editFlowNode()
- {
- if(doValidate(form1))
- {
- $('#form1').attr('action','${ctx}/myconsole/complaint/preinflow/editFlowNode');
- $('#form1').ajaxSubmit(resultEditFlowNodeHandle);
- }
- }
- function resultEditFlowNodeHandle(data){
- var res=eval('(' + data + ')');
- if(res.flag){
- layer.alert(res.message, {skin: 'layui-layer-molv',closeBtn: 1},
- function(){
-
- var strContent="";
- var strEditNode="<button type='button' class='btn btn-warning' id='EditNodeButton' onclick=editNode('"+res.FlowNode+"','"+res.DoWorkDutiesID+"','"+res.DoWorkDutiesName+"','"+res.NoNormalPay+"','"+res.NodeDeptID+"') ><span class='glyphicon glyphicon-pencil'></span></button>";
- strContent="<div class='row' style='padding:5px' id=FlowNode_"+res.FlowNode+">"+
- "<div class='col-xs-4 col-sm-4 col-md-4 col-lg-4' >"+
- "</div>"+
- "<div class='col-xs-4 col-sm-4 col-md-4 col-lg-4' align=center>"+
- " <button type='button' class='btn btn-success' style='width:300px'>"+res.NodeOrgName+"-"+res.NodeDeptName+"-"+res.DoWorkDutiesName+"("+res.NoNormalPay+"元)</button> "+
- "</div>"+
- "<div class='col-xs-4 col-sm-4 col-md-4 col-lg-4' >"+strEditNode+
- "</div>"+
- "</div>";
-
-
- $("#NoNormalPay").val("");
- $("#DisabledNum").val("");
- $("#DoWorkDutiesID").val("");
- $("#DoWorkDutiesName").val("");
- $("#FlowNode_"+res.FlowNode).empty();
- $("#FlowNode_"+res.FlowNode).append(strContent);
-
- $("#DoFlowNodeButton").attr("onclick","setFlowNode()");
-
-
- layer.closeAll('dialog');
- });
-
- }else{
- if(res.flag == false)
- {
- layer.alert(res.message, {skin: 'layui-layer-molv',closeBtn: 0}, function(){layer.closeAll('dialog');});
- }
- }
- }
- function deleteEndNode()
- {
-
- $('#form1').attr('action','${ctx}/myconsole/complaint/preinflow/deleteEndNode');
- $('#form1').ajaxSubmit(deleteEndNodeHandle);
-
- }
- function deleteEndNodeHandle(data){
- var res=eval('(' + data + ')');
- if(res.flag)
- {
- layer.alert(res.message, {skin: 'layui-layer-molv',closeBtn: 0}, function(){layer.closeAll('dialog');showFlowNode();});
-
- }
- else
- {
- if(res.flag == false)
- {
- layer.alert(res.message, {skin: 'layui-layer-molv',closeBtn: 0}, function(){layer.closeAll('dialog');});
- }
- }
- }
- </script>
-
- <title>流程设置</title>
- <meta name="keywords" content="">
- <meta name="description" content="">
- </head>
- <body >
-
- <form id="form1" method="post" class="form-horizontal" role="form">
- <div style="display: none">
- <input type="hidden" id="DoOrgID" name="DoOrgID" value="${DoOrgID!''}"/>
- <input type="hidden" id="DoOrgName" name="DoOrgName" value="${DoOrgName!''}"/>
- <input type="hidden" id="DoWorkDutiesID" name="DoWorkDutiesID" value=""/>
- <input type="hidden" id="NodeDeptID" name="NodeDeptID" value=""/>
- </div>
- <div class="container-fluid" style="margin-top:15px;">
- <div class="panel panel-primary">
- <div class="panel-heading">
- <div style="display:inline;" >预设流程 机构:${DoOrgName!''} </div>
-
- </div>
- <div id="collapseFlow" class="panel-collapse collapse in">
- <div class="panel-body" style="font-size:14px">
- <div class="row" style="padding:5px">
- <div class="col-xs-12 col-sm-1 col-md-1 col-lg-1" >
- <label class="control-label" for="NoNormalPay" style="padding-top:5px">金额大于</label>
- </div>
- <div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
-
- <div class="input-group">
- <span class="input-group-addon">¥</span>
- <input type="text" class="form-control" value="" placeholder="协议赔偿金合计" id="NoNormalPay" name="NoNormalPay" vmode="not null" vdisp="金额大于" vtype="int" >
- <span class="input-group-addon">元</span>
- </div>
- </div>
-
- <div class="col-xs-12 col-sm-1 col-md-1 col-lg-1" >
- <label class="control-label" for="DoWorkDutiesName" style="padding-top:5px">所选岗位</label>
- </div>
- <div class="col-xs-12 col-sm-3 col-md-3 col-lg-3" >
- <div class="input-group">
- <input type="text" class="form-control" value="" placeholder="所选岗位" id="DoWorkDutiesName" name="DoWorkDutiesName" vmode="not null" vdisp="所选岗位" vtype="string" readonly>
- <div class="input-group-btn">
- <button type="button" class="btn btn-default" aria-label="Left Align" onclick="setOrg()" id="ButtonToOrgInfo" title="选择案件审批岗位">
- <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
- </button>
- </div>
- </div>
-
- </div>
- <div class="col-xs-1 col-sm-1 col-md-1 col-lg-1" >
- <label class="control-label" for="ReasonID1" style="padding-top:5px">节点顺序</label>
- </div>
- <div class="col-xs-12 col-sm-3 col-md-3 col-lg-3" >
- <div class="input-group">
- <input type="text" class="form-control" value="1" id="FlowNode" name="FlowNode" vmode="not null" vdisp="节点顺序" vtype="int" readonly>
- <div class="input-group-btn">
- <button type="button" class="btn btn-success" id="DoFlowNodeButton" onclick="setFlowNode()" >保存</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="panel panel-success">
- <div class="panel-heading">
- <div style="display:inline;" >流程展示 </div>
- <div style="display:inline;" ><a class="panel-title" data-toggle="collapse" data-parent="#accordion" href="#collapseFlowList"><span id="FlowListCollapseIcon" onClick="setCollapseIcon('FlowListCollapseIcon')" class="glyphicon glyphicon-menu-up" aria-hidden="true"></span></a></div>
- </div>
- <div id="collapseFlowList" class="panel-collapse collapse in">
- <div class="panel-body" style="font-size:14px" id=FlowShow>
-
-
- </div>
- </div>
- </div>
- <div class="row" style="padding:5px">
- <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" align=center>
- <button type="button" class="btn btn-primary" id="FlowSetButton" onclick=deleteEndNode() ><span class="glyphicon glyphicon-save"></span> 删除最后节点</button>
- </div>
-
- </div>
-
- </form>
-
- </div>
-
- <!-- 选择单位弹出页面,模态框(Modal) -->
- <div class="modal fade" id="orgModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-dialog" role="document" style="width:600px;height:500px;">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
- ×
- </button>
- </div>
- <div class="modal-body">
- <div class="row" style="padding:1px" >
- <ul id="UserTree" class="ztree"></ul>
- </div>
- </div>
- <div class="modal-footer">
-
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal -->
- </div>
-
- <script type="text/javascript">
- getNewFlowNodeNum();
- showFlowNode();
- </script>
- </body>
- </html>
|