list.gsp
上传用户:steveyhw
上传日期:2019-05-13
资源大小:307k
文件大小:9k
源码类别:

PlugIns编程

开发平台:

Java

  1. <html>
  2.     <head>
  3.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  4.         <meta name="layout" content="main" />
  5.         <title><g:message code="staff.list" default="Staff List" /></title>
  6. <script type="text/javascript" src="${createLinkTo(dir:'js/dojo',file:'dojo.js')}">
  7. </script>
  8. <script type="text/javascript">
  9. dojo.require("dojo.widget.validate");
  10. dojo.require("dojo.widget.ComboBox");
  11. dojo.require("dojo.widget.Checkbox");
  12. dojo.require("dojo.widget.Editor");
  13. dojo.require("dojo.widget.DropdownDatePicker");
  14. dojo.require("dojo.widget.Button");
  15. </script>
  16.     </head>
  17.     <body>
  18.         <div class="nav">
  19.             <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}"><g:message code="home" default="Home" /></a></span>
  20.             <span class="menuButton"><g:link class="create" action="create" params="${[_staId:params._staId,_staName:params._staName,_staType_id:params._staType_id,_staLastchangefrom:params._staLastchangefrom,_staLastchangeto:params._staLastchangeto,_staDel:params._staDel,offset:params.offset,sort:params.sort,order:params.order]}"><g:message code="staff.new" default="New Staff" /></g:link></span>
  21.         </div>
  22.         <div class="body">
  23.             <h1><g:message code="staff.list" default="Staff List" /></h1>
  24.             <g:if test="${flash.message}">
  25.             <div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}" /></div>
  26.             </g:if>
  27.                 <g:form name="staff" controller="staff" action="list" method="post"  enctype="multipart/form-data">
  28.             <table border="0">
  29.                         <div >
  30.                             <tr >
  31.                                 <td valign='middle' class='name'>
  32.                                     <label for='staName' ><g:message code="staff.staId" default="员工编号" />:</label>
  33.                                 </td>
  34.                                 <td valign='middle' class='value ${hasErrors(bean:staff,field:'staId','errors')}'>
  35.                                     <input type="text" id='_staId' name='_staId' value="${params._staId}" size="16" maxlength="12"/>
  36.                                 </td>
  37.                                 <td valign='middle' class='name'>
  38.                                     <label for='staName'><g:message code="staff.staName" default="姓名" />:</label>
  39.                                 </td>
  40.                                 <td valign='middle' class='value'>
  41.                                     <input type="text" id='_staName' name='_staName' value="${params._staName}" size="13" maxlength="10"/>
  42.                                 </td>
  43.                                 <td valign='middle' class='name'>
  44.                                     <label for='staName'><g:message code="staff.staType" default="员工类型" />:</label>
  45.                                 </td>
  46.                                 <td valign='middle' class='value ${hasErrors(bean:staff,field:'staType','errors')}'>
  47.                                     <g:select optionKey="id" noSelection="['':'-全部-']" from="${Code.findAllByCkind(Ckind.findByCkiFlag('StaffType'))}" name='_staType_id' value="${params._staType_id}" ></g:select>
  48.                                 </td>
  49.                             </tr>
  50.                             <tr>
  51.                                 <td valign='middle' class='name'>
  52.                                     <label for='staName'><g:message code="staff.staLastchange" default="更新时间" />:</label>
  53.                                 </td>
  54.                                 <td valign='middle' class='value ${hasErrors(bean:staff,field:'staType','errors')}'>
  55.                                     <input  readonly="true" type="text" dojoType="DropdownDatePicker" id="_staLastchangefrom" name="_staLastchangefrom" value="${params._staLastchangefrom}"/>
  56.                                     <input  readonly="true" type="text" dojoType="DropdownDatePicker" id="_staLastchangeto" name="_staLastchangeto" value="${params._staLastchangeto}"/>
  57.                                 </td>
  58.                                 <td valign='middle' class='name'>
  59.                                     <g:checkBox name="_staDel" value="${params._staDel=='on'}" />
  60.                                 </td>
  61.                                 <td valign='middle' class='name'>
  62.                                     <label for='_staDel'><g:message code="staff.staDel" default="全部查询" /></label>
  63.                                 </td>
  64.                                 <td valign='middle' class='value' >
  65.                                     <input class="save" type="submit" value="${message(code:'查询', 'default':'查询')}"></input>
  66.                                 </td>
  67.                                 <td valign='middle' class='value'>
  68.                                 </td>
  69.                             </tr>
  70.                         </div>
  71.                      </table>
  72.                       </g:form>
  73.             <div class="list">
  74.                 <br>
  75.                 <table>
  76.                     <thead>
  77.                         <tr>
  78.                         
  79.                            
  80.                         
  81.                             <th><g:message code="staff.person" default="Person" /></th>
  82.                         
  83.                             <g:sortableColumn property="staId" title="Sta Id" titleKey="staff.staId" action="search" params="${[_staId:params._staId,_staName:params._staName,_staType_id:params._staType_id,_staLastchangefrom:params._staLastchangefrom,_staLastchangeto:params._staLastchangeto,_staDel:params._staDel,offset:params.offset]}"/>
  84.                         
  85.                             <g:sortableColumn property="staName" title="Sta Name" titleKey="staff.staName" action="search" params="${[_staId:params._staId,_staName:params._staName,_staType_id:params._staType_id,_staLastchangefrom:params._staLastchangefrom,_staLastchangeto:params._staLastchangeto,_staDel:params._staDel,offset:params.offset]}"/>
  86.                         
  87.                             <g:sortableColumn property="staEname" title="Sta Ename" titleKey="staff.staEname" action="search" params="${[_staId:params._staId,_staName:params._staName,_staType_id:params._staType_id,_staLastchangefrom:params._staLastchangefrom,_staLastchangeto:params._staLastchangeto,_staDel:params._staDel,offset:params.offset]}"/>
  88.                         
  89.                             <g:sortableColumn property="staCard" title="Sta Card" titleKey="staff.staCard" action="search" params="${[_staId:params._staId,_staName:params._staName,_staType_id:params._staType_id,_staLastchangefrom:params._staLastchangefrom,_staLastchangeto:params._staLastchangeto,_staDel:params._staDel,offset:params.offset]}"/>
  90.                             <g:sortableColumn property="staDel" title="״̬" titleKey="staff.staDel" action="search" params="${[_staId:params._staId,_staName:params._staName,_staType_id:params._staType_id,_staLastchangefrom:params._staLastchangefrom,_staLastchangeto:params._staLastchangeto,_staDel:params._staDel,offset:params.offset]}"/>
  91.                         
  92.                         </tr>
  93.                     </thead>
  94.                     <tbody>
  95.                     <g:each in="${staffList}" status="i" var="staff">
  96.                         <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
  97.                         
  98.                             
  99.                         
  100.                             <td>${staff.person?.encodeAsHTML()}</td>
  101.                         
  102.                             <td><g:link action="show" id="${staff.id}" params="${[_staId:params._staId,_staName:params._staName,_staType_id:params._staType_id,_staLastchangefrom:params._staLastchangefrom,_staLastchangeto:params._staLastchangeto,_staDel:params._staDel,offset:params.offset,sort:params.sort,order:params.order]}">${staff.staId?.encodeAsHTML()}</g:link></td>
  103.                         
  104.                             <td>${staff.staName?.encodeAsHTML()}</td>
  105.                         
  106.                             <td>${staff.staEname?.encodeAsHTML()}</td>
  107.                         
  108.                             <td>${staff.staCard?.encodeAsHTML()}</td>
  109.                             <td><g:delState del="${staff.staDel}"/></td>
  110.                         </tr>
  111.                     </g:each>
  112.                     <% index = staffList.size() %>
  113.                         <g:while test="${index < 10}">
  114.                             <% index++ %>
  115.                             <tr class="${(index % 2) == 1 ? 'odd' : 'even'}">
  116.                                 <td>&nbsp;</td>
  117.                                 <td>&nbsp;</td>
  118.                                 <td>&nbsp;</td>
  119.                                 <td>&nbsp;</td>
  120.                                 <td>&nbsp;</td>
  121.                                 <td>&nbsp;</td>
  122.                             </tr>
  123.                         </g:while>
  124.                     </tbody>
  125.                 </table>
  126.             </div>
  127.             <div class="paginateButtons">
  128.                 <g:paginate total="${params.count}"   params="${[_staId:params._staId,_staName:params._staName,_staType_id:params._staType_id,_staLastchangefrom:params._staLastchangefrom,_staLastchangeto:params._staLastchangeto,_staDel:params._staDel]}"/>
  129.             </div>
  130.         </div>
  131.     </body>
  132. </html>