123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>编辑单位类别</title>
- <script type="text/javascript" src="${ctx}/qui/libs/js/jquery.js"></script>
- <script type="text/javascript" src="${ctx}/qui/libs/js/framework.js"></script>
- <link href="${ctx}/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
- <link rel="stylesheet" type="text/css" id="skin" prePath="${ctx}/qui/"/>
- <link rel="stylesheet" type="text/css" id="customSkin"/>
- <script src="${ctx}/qui/libs/js/table/quiGrid.js" type="text/javascript"></script>
- <script type="text/javascript" src="${ctx}/qui/libs/js/nav/pageArrow.js"></script>
- <script src="${ctx}/qui/libs/js/form/form.js" type="text/javascript"></script>
- <script type="text/javascript">
- var g_pageNo = 1;
- var g_pageSize = 10;
-
- var g;
- var gridData;
- function initComplete(){
- g = $("#maingrid").quiGrid({
- columns: [
- { display: '状态名称', name: 'statusName', align: 'center', width: "8%"},
- { display: '状态颜色', name: 'statusColor', align: 'center', width: "4%",
- render: function (rowdata, rowindex, value, column){
- return '<label style="display: inline-block;width: 30px;height: 25px;background: '+value+';"></label>';
- }
- },
- { display: '颜色值', name: 'statusColor', align: 'center', width: "4%"},
- { display: '操作', isAllowHide: false, align: 'left', width:"15%",
- render: function (rowdata, rowindex, value, column){
- return '<div class="padding_top4 padding_left20">'
- +'<a href="#" onclick="onEdit(' + rowdata.id +')"><span class="icon_edit">修改</span></a>'
- +'<a href="#" onclick="onDelete(' + rowdata.id +')"><span class="icon_remove">删除</span></a>'
- + '</div>';
- }
- }
-
- ],
- toolbar:{
- items:[
- <@pop_perm url="/orgType/edit.do">
- {text:'新增',click:addUnit,iconClass:'icon_add'},
- </@pop_perm>
- {line:true}
- ]
- },
- data:[],rownumbers:true,dataAction:'local',checkbox:false,usePager: false,
- height: '100%', width:"100%",heightDiff:-40
-
- });
-
-
- }
-
-
- $(function(){
- getData(g_pageNo,g_pageSize);
- })
-
-
- function getData(pageNo,pageSize){
- jQuery.post("${ctx}/status/listPage.do",
- getFormParams(pageNo,pageSize),
- function(result){
- gridData = result;
-
- g.loadData(gridData);
-
- var content ="共有" + gridData["pager.totalRows"] + "条记录";
- $("#letfContent").html("");
- $("#letfContent").html(content);
-
- var pager=$("#pager");
-
- pager.attr("total",gridData["pager.totalRows"]);
- pager.render();
-
- pager.unbind("pageChange");
- pager.bind("pageChange",function(e,index){
- g_pageNo = index + 1;
- getData(g_pageNo,g_pageSize);
- });
-
- pager.bind("sizeChange",function(e,num){
- g_pageSize = num;
- getData(g_pageNo,g_pageSize);
- });
- },"json");
- }
-
-
-
- function searchHandler(){
-
- getData(1,g_pageSize);
- }
-
-
- function getFormParams(pageNo,pageSize){
- $("#pageNo").val(pageNo);
- $("#pageSize").val(pageSize);
- return $("#searchForm").formToArray();
- }
-
-
- function resetSearch(){
- $("#searchForm")[0].reset();
-
- getData(1,g_pageSize);
- }
-
-
- function onEdit(rowId) {
- top.Dialog.open({
- URL : "${ctx}/status/edit.do?id="+rowId,
- Title : "编辑状态",
- Width : 500,
- Height : 300
- });
- }
-
-
- function addUnit() {
- top.Dialog.open({
- URL : "${ctx}/status/edit.do",
- Title : "新增状态",
- Width : 500,
- Height : 300
- });
- }
-
- function onDelete(rowid){
- top.Dialog.confirm("确定要删除该记录吗?",function(){
-
- jQuery.post("${ctx}/status/delete.do",
- {"ids":rowid},
- function(responseText){
- if(responseText.status=="y"){
- top.Dialog.alert(responseText.info);
- resetSearch();
- }else{
- top.Dialog.alert(responseText.info);
- }
-
- },
- "json");
- });
- }
-
-
-
- </script>
- </head>
- <body>
-
- <div class="box2" panelTitle="状态管理列表">
- <form action="" id="searchForm" method="post">
- <input type="hidden" id="pageNo" name="pageNo" value="1"/>
- <input type="hidden" id="pageSize" name="pageSize" value="10"/>
- <table>
- <tr>
- <td>状态名称:</td>
- <td>
- <input type="text" id="Q_statusName_S_LK" name="Q_statusName_S_LK" />
- </td>
- <td>状态颜色:</td>
- <td>
- <input type="text" id="Q_statusColor_S_LK" name="Q_statusColor_S_LK" />
- </td>
- <td><button type="button" onclick="searchHandler()"><span class="icon_find">查询</span></button></td>
- <td><button type="button" onclick="resetSearch()"><span class="icon_reload">重置</span></button></td>
- </tr>
- </table>
- </form>
- </div>
- <div id="scrollContent">
- <div class="padding_right5">
- <div id="maingrid"></div>
- </div>
- </div>
-
- <div style="height:35px;">
- <div id="letfContent" class="float_left padding5"></div>
- <div class="float_right padding5">
- <div id="pager" total="0" class="pageArrow" showSelect="true" inputPosition="right"></div>
- </div>
- <div class="clear"></div>
- </div>
- </body>
- </html>
|