ligerUI弹出框
1 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 3 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 4 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> 5 <c:set var="ctx" value="${pageContext.request.contextPath}" /> 6 7 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 8 <html style="background:none;" xmlns="http://www.w3.org/1999/xhtml"> 9 <head> 10 <title>山东省公安厅技侦数据共享查询系统</title> 11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 12 <%@include file="/WEB-INF/views/common/include/zfptForm_min.jsp" %> 13 <link href="${ctx}/static/lib/web/css/cf-all.css" rel="stylesheet" type="text/css" /> 14 <link rel="stylesheet" type="text/css" href="${ctx}/static/jzys/css/table_style.css" /> 15 <script src="${ctx}/static/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script> 16 <script src="${ctx}/static/lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script> 17 <script src="${ctx}/static/lib/sundun.js" type="text/javascript"></script> 18 <script src="${ctx}/static/lib/sundun.xfun.js" type="text/javascript"></script> 19 <script src="${ctx}/static/qbpt/bpm/js/bpm.common.js" type="text/javascript"></script> 20 <script src="${ctx}/static/qbpt/bpm/js/bsjzcx.js" type="text/javascript"></script> 21 <script type="text/javascript"> 22 function closes(){ 23 window.close();//关闭窗口 24 } 25 function tijiao(){ 26 startWorkflow(); 27 } 28 29 function daying(){ 30 window.open("http://localhost:8080/jzgx/upload/432451B4B0C8448EA7FFE9AA3A4784ACdesktop.ini"); 31 } 32 </script> 33 </head> 34 <body> 35 <form id="processForm" action="${ctx}/bpm/common/startProcess.sd" method="post" enctype="multipart/form-data"> 36 43 <div class="container"> 44 45 <div class="title"> 46 47 48 </div> 49 <table cellspacing="0" cellpadding="0"> 50 <tr> 51 <td class="container_td1" >案件编号</td> 52 <td > 53 <input type="text" class="input01" id="ajbh" name="ajbh" onclick="openwin();" value="${bsjz.ajbh}"/> 54 </table> 55 56 57 </body> 58 </html>
2.js代码:
1 function openwin(){ 2 var url = urlpath + "bhjk/openTcc.sd?"; 3 $.ligerDialog.open({ 4 height: 400, 5 url: url, 6 width: 700, 7 name:'wintest4', 8 title:'案件信息列表', 9 isResize:true, 10 buttons: [ 11 { id:"queren",text: '确认', onclick: function (item, dialog) 12 { 13 var row = document.getElementById('wintest4').contentWindow.f_ok(); 14 if(row != null && row != undefined){ 15 var obj = row[0]; 16 $("#jzgx_id").val(obj.id); 17 $("#ajbh").val(obj.ajbh); 18 $("#ajmc").val(obj.ajmc); 19 $("#ajlb").val(obj.ajlx); 20 $("#ajlbName").val(obj.ajlxName); 21 $("#jbaq").val(obj.jyaq); 22 23 //这里采用的是八进制 0110 = 72 24 if(obj.ajzt=='72'){ 25 $("#ajzt").val(obj.ajztName); 26 }else if(obj.ajzt=='65'){ 27 $("#ajzt").val(obj.ajztName); 28 } 29 }else{ 30 alert("未选择数据"); 31 return; 32 } 33 34 35 dialog.close(); 36 } 37 }, 38 { id:"guanbi",text: '关闭', onclick: function (item, dialog) {dialog.close();}} 39 ] 40 }); 41 }
3.openTcc.sd 代码:
1 @RequestMapping(value = "/openTcc", method = RequestMethod.GET) 2 public ModelAndView openTcc(HttpServletRequest request) { 3 ModelAndView mv = new ModelAndView("jzgx/tcc"); 4 return mv; 5 }
4.tcc jsp页面:
1 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 3 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 4 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> 5 <c:set var="ctx" value="${pageContext.request.contextPath}" /> 6 7 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 8 <html style="background:none;" xmlns="http://www.w3.org/1999/xhtml"> 9 <head> 10 <title>闭环信息</title> 11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 12 <%@include file="/WEB-INF/views/common/include/zfptForm_min.jsp" %> 13 14 <link href="${ctx}/static/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" /> 15 <link href="${ctx}/static/lib/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" /> 16 <link href="${ctx}/static/lib/web/css/web.css" rel="stylesheet" type="text/css" /> 17 18 <script src="${ctx}/static/lib/jquery/jquery-1.5.2.min.js" type="text/javascript"></script> 19 <script src="${ctx}/static/lib/ligerUI/js/core/base.js" type="text/javascript"></script> 20 <script src="${ctx}/static/lib/ligerUI/js/ligerui.min.js" type="text/javascript"></script> 21 <script src="${ctx}/static/lib/ligerUI/js/plugins/ligerLayout.js" type="text/javascript"></script> 22 <script src="${ctx}/static/lib/ligerUI/js/plugins/ligerToolBar.js" type="text/javascript"></script> 23 <script src="${ctx}/static/lib/ligerUI/js/plugins/ligerTree.js" type="text/javascript"></script> 24 <script src="${ctx}/static/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script> 25 <script src="${ctx}/static/lib/ligerUI/js/ligerui.min.js" type="text/javascript"></script> 26 <script type="text/javascript"> 27 function closes(){ 28 window.close();//关闭窗口 29 } 30 31 var bhgrid; 32 $(function(){ 33 var url = urlpath + "bhjk/getJson.sd?"; 34 $.ajax({ 35 type: "POST", 36 data:{}, 37 url: url, 38 dataType:"json", 39 success: function(data){ 40 var jsobj = eval('(' + data + ')'); 41 if("操作成功!"==jsobj.message){ 42 bhgrid = $("#bhgrid").ligerGrid({ 43 columns: 44 [ 45 { display: '主键', name:'id', hide:'true'}, 46 { display: '状态', name:'ajzt', hide:'true'}, 47 { display: '类型', name:'ajlx', hide:'true'}, 48 { display: '行数', name:'rownum', hide:'true'}, 49 { display: '案件编号', name:'ajbh',width:'17%'}, 50 { display: '案件名称', name:'ajmc',width:'25%'}, 51 { display: '承办单位名称', name:'cbdw_mc',width:'17%'}, 52 { display: '承办人', name:'zbr_xm',width:'10%'}, 53 { display: '案件类型', name:'ajlxName',width:'10%'}, 54 { display: '案件状态', name:'ajztName',width:'10%'}, 55 { display: '简要案情', name:'jyaq', hide:'true'} 56 ], 57 data: {Rows: jsobj.Rows}, 58 dataAction: 'local', 59 pageSize:10, 60 pageSizeOptions: [10, 20, 30, 50], 61 Total:jsobj.Rows.length, 62 width: '100%', 63 height:'100%', 64 checkbox: true, 65 onDblClickRow:function (data, rowindex, rowobj) //表格双击带回 66 { 67 $(window.parent.document).find("input[id='ajmc']").val(data.ajmc); 68 $(window.parent.document).find("input[id='ajbh']").val(data.ajbh); 69 parent.$.ligerDialog.close(); 70 $.ligerDialog.unmask(); 71 } 72 }); 73 }else{ 74 $("#bhgrid").append("<p>"+jsobj.message+"</p>"); 75 } 76 } 77 }); 78 }); 79 80 function f_ok(){ 81 var g = $("#bhgrid").ligerGetGridManager(); 82 var r=g.getCheckedRows(); 83 if (r==undefined) { 84 $.ligerDialog.alert('请选择一行数据!'); 85 return; 86 }else if(r.length > 1){ 87 $.ligerDialog.alert('只能选择一行数据!'); 88 return; 89 }else{ 90 return r; 91 parent.$.ligerDialog.close(); 92 } 93 parent.$.ligerDialog.close(); 94 } 95 96 </script> 97 </head> 98 <body> 99 <div id="bhgrid"></div> 100 101 </body> 102 </html>
** 引入的样式比较多:
上传到了百度云:
链接:http://pan.baidu.com/s/1kVhZIzt 密码:tyxx