| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <%@ page language="java" contentType="text/html;charset=GBK"
- pageEncoding="GBK"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
- <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>数据字典</title>
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
-
- <link href="${pageContext.request.contextPath }/main.css" rel="stylesheet" type="text/css" />
- <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerTab.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
-
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <style type="text/css">
- .default_search li input[type='text']{height:28px; line-height:28px}
- </style>
- <script type="text/javascript">
- $(function(){
- searchlist();
- });
-
- function addSub(){
- var parentId=$("#parent_type").val();
- if(parentId==null || parentId==""){
- alert("请选择父类型");
- return ;
- }
- addTab("${pageContext.request.contextPath }/pmDictionary.do?task=to_add&parentId="+parentId, "新增子类", "${pageContext.request.contextPath }/pmDictionary.do?task=to_add&parentId="+parentId+ "&tabid=" + getCurrentTabId(), true);
- }
-
- function data_edit(universalid,pid){
- addTab("${pageContext.request.contextPath }/pmDictionary.do?task=to_edit&", "编辑数据字典", "${pageContext.request.contextPath }/pmDictionary.do?task=to_edit&id="+universalid+"&parentId="+pid+ "&tabid=" + getCurrentTabId(), true);
- }
- function data_view(universalid){
- addTab("${pageContext.request.contextPath }/pmDictionary.do?task=dictionary_view&id="+universalid, "查看数据字典", "${pageContext.request.contextPath }/pmDictionary.do?task=dictionary_view&id="+universalid, true);
- }
- function data_del(universalid){
- $.ajax({
- url:"pmDictionary.do?task=dictionary_del&id="+universalid+"&time="+new Date().getTime(),
- type:"post",
- dataType:"json",
- success:function(data){
- if(data.i>0){
- addInfo("操作成功!");
- searchlist();
- }else{
- addInfo("操作失败!");
- }
- }
- });
- }
- function reflesh(){
- $.ajax({
- url:"pmDictionary.do?task=dictionary_clear&time="+new Date().getTime(),
- type:"post",
- dataType:"json",
- success:function(data){
- addInfo("操作成功!");
- }
- });
- }
- var manager;
- function searchlist(){
- var s = "";
- var parentId=$("#parent_type").val();
- if(parentId !="" && parentId !=null){
- s="&parentId="+parentId;
- }
- if(manager==undefined){
- manager1=$("#creditgrid").ligerGrid({
- columns:[
- { display: '父类名称', name: 'p_dname', width: 220, align: 'center'},
- { display: '子类名称', name: 'dname', width: 220, align: 'center'},
- { display: '子类值', name: 'dvalue', width: 150, align: 'center'},
- { display: '操作', isSort: false, width: 340,align: 'left',render : function(rowdata, rowindex, value)
- {
- var html="";
- html+=" <a href='javascript:data_view("+rowdata.universalid+")'>查看</a>";
- html+=" | <a href='javascript:data_edit("+rowdata.universalid+","+rowdata.pid+")'>编辑</a>";
- html+=" | <a href='javascript:data_del("+rowdata.universalid+")'>删除</a>";
- return html;
- }
- }
- ],pageSize:20,
- url:"pmDictionary.do?task=dictionary_pagelist&time="+ new Date().getTime()+s,
- pageParmName: 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName: 'pSize', //页记录数参数名,(提交给服务器)
- width : '100%',
- height : '99.3%',
- rownumbers:true
- });
- }else{
- manager._setParms(josnobj);
- manager.loadData();
- }
- }
- </script>
- </head>
- <body>
- <div id="title" class="form-button">
- <input type="button" value="关闭" class="l-button" onclick="javascript:closeWindow();">
- </div>
- <div class="container-layout">
- <div class="default_search" style="margin-bottom: 0px;">
- <ul class="list_search" style="width: 300px;">
- <li class="title" >父类型:</li>
- <li class="text" >
- <select style="width:150px; height:25px;" name="parent_type" id="parent_type" onchange="searchlist()">
- <option value=""></option>
- <c:forEach items="${list}" var="obj" >
- <option value="${obj.universalid }" >${obj.dname }</option>
- </c:forEach>
- </select>
- </li>
- </ul>
- <ul class="list_search" style="width: 100px;">
- <li class="search-button" style="width: 100px;">
- <input type="button" class='l-button' name="search" onclick="addSub();" value="新增子类" />
- </li>
- </ul>
- <ul class="list_search" style="width: 100px;">
- <li class="search-button" style="width: 100px;">
- <input type="button" class='l-button' name="search" onclick="reflesh();" value="刷新缓存" />
- </li>
- </ul>
- </div>
-
- <div style="clear: both;margin-right: 2px;margin-bottom:0px;margin-left:0px;margin-top:0px; padding: 0">
- <div id="creditgrid" style=" margin:0;padding: 0"></div>
- </div>
-
- </div>
- </body>
- </html>
|