<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>

<html>
  <head>
    <title></title>

   <%--  富客户端环境引用文件  --%> 
<%@ include file="/gaowj/header-simple-app-1.0.jsp"%>
  </head><br/>
  <body class="gaowj">
<div class="easyui-layout" style="width:99%;height:90%;margin:0 5px;">
		
		<div data-options="region:'center',iconCls:'icon-ext-12_09'" title="功能窗口列表">
  <%@ include file="menuoperate.jsp"%>
  <table cellpadding="0" cellspacing="0">
        <tr><td>
  <table id="resizabletable" class="sortable"  border="0" cellpadding="0" cellspacing="1" bgcolor="#f4f4f4">
       <thead>
        
        <tr bgcolor="#c0c0c0">
          <th width="67" align="center" class="sort-alpha">序号</th>
          <th width="116" align="center" class="sort-alpha">编码</th>
          <th width="103" align="center" class="sort-alpha">功能窗口</th>
          <th width="96" align="center" class="sort-alpha">功能类别</th>
          <th width="101" align="center" class="sort-alpha">所属模块</th>
          <th width="60" align="center" class="sort-alpha">排序</th>
          <th width="79" align="center" class="sort-alpha">是否使用</th>
          <th width="50" align="center" class="sort-alpha">状态</th>
          <th width="200" align="center" class="sort-alpha">窗口地址</th>
          <th width="100" align="center" class="sort-alpha">窗口图片</th>
        </tr>
        </thead>
        <tbody>
        <s:set name="j" value="0"></s:set>
        <s:iterator value="listdata">
        <s:set name="j" value="#j+1"></s:set>
        <tr  ondblclick="g_dbclick();" onclick="ls_choice('<s:property value="M_ID"/>');" onMouseOver="this.style.backgroundColor='#D0E6EE';" onMouseOut="this.style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
          <td align="center">
          <input id="<s:property value="M_ID"/>" type="checkbox" name="checkbox" value="checkbox"><span id="<s:property value="M_ID"/>value"><s:property value='#j'/></span>
          </td>
          <td align="center"><s:property value="M_ID"/></td>
          <td align="center"><span title="<s:property value="M_TITLE"/>"><s:property value="M_NAME"/></span></td>
          <td align="center"><s:property value="M_MENU"/></td>
          <td align="center"><s:property value="MT_NAME"/></td>
          <td align="center"><s:property value="M_SORT"/></td>
          <td align="center"><s:if test="M_STATE==0">有效</s:if><s:else>失效</s:else> </td>
          <td align="center" id="del<s:property value="M_ID"/>"><s:if test="YSY!=null && YSY>0">已用</s:if><s:else>未用</s:else></td>
          <td align="left">&nbsp;<s:property value="WINDOWNAME_WEB"/></td>
          <td align="left">&nbsp;
          <span class="<s:property value="WINDOWPIC"/>">&nbsp;&nbsp;&nbsp;&nbsp;</span>
          </td>
        </tr>
         </s:iterator>
         </tbody>
         <tfoot>
        <tr>
          <td colspan="12" align="left" valign="middle" style="background:url(image/img_vk/bg001.png);"> 
          <form name="p" action="module_grid" method="post">
           <table border="0"><tr><td>　
             
         <select name="pageSize" onChange="submit();">　
        <s:iterator value="listPageSize">
          <option <s:if test="pageSize==pageSizec">selected</s:if>  value="<s:property value="pageSizec"/>"><s:property value="pageSizec"/></option>
        </s:iterator>
        </select>
          
          </td>
          <td>       
        <s:a action="module_grid"><img src="image/img_vk/first.png" border="0"/>
         <s:param name='pageNo'>1</s:param>
         <s:param name='pageSize' value="pageSize"></s:param>
        </s:a>&nbsp;&nbsp;&nbsp;&nbsp;
        <s:if test="pageNo>1">
        <s:a action="module_grid"><img src="image/img_vk/previous.png" border="0"/>
         <s:param name='pageNo' value="pageNo-1"></s:param>
         <s:param name='pageSize' value="pageSize"></s:param>
        </s:a>　
        </s:if>
        </td>
        <td valign="top">
                    第 <s:property value="pageNo"/>共 
        <s:property value="pageCount"/> 页 
        </td>
        <td>
        <s:if test="pageNo<pageCount">
        <s:a action="module_grid"><img src="image/img_vk/next.png" border="0"/>
         <s:param name='pageNo' value="pageNo+1"></s:param>
         <s:param name='pageSize' value="pageSize"></s:param>
        </s:a>
        </s:if>&nbsp;&nbsp;&nbsp;&nbsp;
        <s:a action="module_grid"><img src="image/img_vk/last.png" border="0"/>
          <s:param name='pageNo' value="pageCount"></s:param>
          <s:param name='pageSize' value="pageSize"></s:param>
        </s:a>
         </td></tr></table>
         </form>
          </td>
        </tr>
        </tfoot>
      </table>
 </td></tr></table>
 </div>
  </div>
  <div id="SendProduct" style="width:100px;height:100px;" >  
  </div> 
  </body>
  <script type="text/javascript">
    document.getElementById("g_list").style.display='none';
    document.getElementById("g_password").style.display='none';
    document.getElementById("g_add").style.display='';
    document.getElementById("g_open").style.display='';
    document.getElementById("g_copy").style.display='';
    document.getElementById("g_delete").style.display='';
    document.getElementById("g_preview").style.display='none';
    document.getElementById("g_taoda").style.display='none';
    document.getElementById("g_refresh").style.display='none';
    document.getElementById("g_save").style.display='none';
    document.getElementById("g_return").style.display='none';
    document.getElementById("g_groupCmodule").style.display='none';
    document.getElementById("g_groupCuser").style.display='none';
    document.getElementById("g_userCuser").style.display='none';
    var ls_code;
    var ls_old,ls_new
    var page="<s:property value='pageNo'/>";
    var pageSize="<s:property value='pageSize'/>";
    function ls_choice(ls_current){
     if(ls_old!=null){
       ls_old.checked=false;
     }
     ls_new = document.getElementById(ls_current);
     ls_new.checked=true;
     ls_old = ls_new;
    }
    function g_add(){
     var modifyUrl = gaowj.WEB_APP_NAME+"/module_insert?pageNo="+page+"&pageSize="+pageSize+"&method=insert";
     $('#SendProduct').window({
			  title : "模块编辑",
			  iconCls:'icon-ext-05_41',
			  width : 750,
			  height : 330,
			  content : '<iframe scrolling="yes" frameborder="0"  src="'+ modifyUrl+ '" style="width:100%;height:98%;"></iframe>',
			  modal : true,
			  minimizable : false,
			  maximizable : false,
			  shadow : false,
			  cache : false,
			  closed : false,
			  collapsible : false,
			  resizable : false,
			  loadingMessage : '正在加载数据，请稍等片刻......'
       });
    }
    function g_dbclick(){
     var modifyUrl = gaowj.WEB_APP_NAME+"/module_update?pageNo="+page+"&pageSize="+pageSize+"&method=update&myzd_id="+ls_new.id;
     $('#SendProduct').window({
			  title : "模块编辑",
			  iconCls:'icon-ext-05_41',
			  width : 750,
			  height : 330,
			  content : '<iframe scrolling="yes" frameborder="0"  src="'+ modifyUrl+ '" style="width:100%;height:98%;"></iframe>',
			  modal : true,
			  minimizable : false,
			  maximizable : false,
			  shadow : false,
			  cache : false,
			  closed : false,
			  collapsible : false,
			  resizable : false,
			  loadingMessage : '正在加载数据，请稍等片刻......'
       });
    }
    function g_open(){
     if(ls_new!=null){
      var ls_xh = document.getElementById(ls_new.id + "value");
      var ls_myzd_id = ls_new.id;
      var modifyUrl = gaowj.WEB_APP_NAME+"/module_update?pageNo="+page+"&pageSize="+pageSize+"&method=update&myzd_id="+ls_new.id;
      $('#SendProduct').window({
			  title : "模块编辑",
			  iconCls:'icon-ext-05_41',
			  width : 750,
			  height : 330,
			  content : '<iframe scrolling="yes" frameborder="0"  src="'+ modifyUrl+ '" style="width:100%;height:98%;"></iframe>',
			  modal : true,
			  minimizable : false,
			  maximizable : false,
			  shadow : false,
			  cache : false,
			  closed : false,
			  collapsible : false,
			  resizable : false,
			  loadingMessage : '正在加载数据，请稍等片刻......'
       });
     }
    }
    function g_copy(){
     if(ls_new!=null){
      var ls_xh = document.getElementById(ls_new.id + "value");
      $.messager.confirm('提示', '确定复制第'+ls_xh.innerHTML+'条记录?', function(r) {
		if (r) {
       var modifyUrl = gaowj.WEB_APP_NAME+"/module_copy?pageNo="+page+"&pageSize="+pageSize+"&method=insert&myzd_id="+ls_new.id;
       $('#SendProduct').window({
			  title : "模块编辑",
			  iconCls:'icon-ext-05_41',
			  width : 750,
			  height : 330,
			  content : '<iframe scrolling="yes" frameborder="0"  src="'+ modifyUrl+ '" style="width:100%;height:98%;"></iframe>',
			  modal : true,
			  minimizable : false,
			  maximizable : false,
			  shadow : false,
			  cache : false,
			  closed : false,
			  collapsible : false,
			  resizable : false,
			  loadingMessage : '正在加载数据，请稍等片刻......'
       });
      }
      });
     }
    }
    function g_delete(){
     if(ls_new!=null){
      var ls_sfsy = document.all.item("del"+ls_new.id).innerHTML;
      var ls_xh = document.getElementById(ls_new.id + "value");
      if(ls_sfsy=="已用"){
       $.messager.alert('提示','第'+ls_xh.innerHTML+'条记录已在使用中,不能删除!','info');
      }else{
         $.messager.confirm('提示', '确定删除第'+ls_xh.innerHTML+'条记录?', function(r) {
		if (r) {
           window.location="module_delete?pageNo="+page+"&pageSize="+pageSize+"&myzd_id="+ls_new.id;
        }
        });
      }
     }
    }
    function g_preview(){
     if(ls_new!=null){
      var ls_xh = document.getElementById(ls_new.id + "value");
      alert("将预览第"+ls_xh.innerHTML+"条记录!");
     }
    }
    function g_refresh(){
     window.location="mpdule_grid?pageNo="+page+"&pageSize="+pageSize;
    }
    function g_save(){
     alert('g_save');
    }
    function g_return(){
     alert("g_return");
    }
  </script>
</html>
