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="customer.list" default="Customer 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="${[_cusName:params._cusName,_cusProfession_id:params._cusProfession_id,_cusType_id:params._cusType_id,_cusLastchangefrom:params._cusLastchangefrom,_cusLastchangeto:params._cusLastchangeto,_cusDel:params._cusDel,max:params.max,sort:params.sort,offset:params.offset,order:params.order]}"><g:message code="customer.new" default="New Customer" /></g:link></span>
  21.         </div>
  22.         <div class="body">
  23.             <h1><g:message code="customer.list" default="Customer 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="customer" controller="customer" 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='_cusName' ><g:message code="customer.cusName" default="Cus Name" />:</label>
  33.                                 </td>
  34.                                 <td valign='middle' class='value ${hasErrors(bean:customer,field:'cusName','errors')}'>
  35.                                     <input type="text" id='_cusName' name='_cusName' value="${params._cusName}" size="16" maxlength="12"/>
  36.                                 </td>
  37.                                 <td valign='middle' class='name'>
  38.                                     <label for='_cusProfession'><g:message code="customer.cusProfession" default="Cus Profession" />:</label>
  39.                                 </td>
  40.                                 <td valign='middle' class='value'>
  41.                                     <g:select optionKey="id" noSelection="['':'-全部-']" from="${Code.findAllByCkind(Ckind.findByCkiFlag('ProfessionType'))}" name='_cusProfession_id' value="${params._cusProfession_id}" ></g:select>
  42.                                 </td>
  43.                                 <td valign='middle' class='name'>
  44.                                     <label for='_cusType_id'><g:message code="customer.cusType" default="Cus Type" />:</label>
  45.                                 </td>
  46.                                 <td valign='middle' class='value ${hasErrors(bean:customer,field:'conManType','errors')}'>
  47.                                     <g:select optionKey="id" noSelection="['':'-全部-']" from="${Code.findAllByCkind(Ckind.findByCkiFlag('CustomerType'))}" name='_cusType_id' value="${params._cusType_id}" ></g:select>
  48.                                 </td>
  49.                             </tr>
  50.                             <tr>
  51.                                 <td valign='middle' class='name'>
  52.                                     <label for='_cusLastchangefrom'><g:message code="customer.cusLastchange" default="cus Lastchange" />:</label>
  53.                                 </td>
  54.                                 <td valign='middle' class='value ${hasErrors(bean:customer,field:'Lastchange','errors')}'>
  55.                                     <input  readonly="true" type="text" dojoType="DropdownDatePicker" id="_cusLastchangefrom" name="_cusLastchangefrom" value="${params._cusLastchangefrom}"/>
  56.                                     <input  readonly="true" type="text" dojoType="DropdownDatePicker" id="_cusLastchangeto" name="_cusLastchangeto" value="${params._cusLastchangeto}"/>
  57.                                 </td>
  58.                                 <td valign='middle' class='name'>
  59.                                     <g:checkBox name="_cusDel" value="${params._cusDel=='on'}" />
  60.                                 </td>
  61.                                 <td valign='middle' class='name'>
  62.                                     <label for='_cusDel'><g:message code="search.all" default="Search all" /></label>
  63.                                 </td>
  64.                                 <td valign='middle' class='value' >
  65.                                     <input class="save" type="submit" value="${message(code:'search', 'default':'Search')}"></input>
  66.                                 </td>
  67.                                 <td valign='middle' class='value'>
  68.                                 </td>
  69.                             </tr>
  70.                         </div>
  71.                      </table>
  72.                       </g:form>
  73.             
  74.             <div class="list">
  75.                 <br>
  76.                 <table>
  77.                     <thead>
  78.                         <tr>
  79.                         
  80.                         
  81.                             <g:sortableColumn property="cusId" title="Cus Id" titleKey="customer.cusId" params="${[_cusName:params._cusName,_cusProfession_id:params._cusProfession_id,_cusType_id:params._cusType_id,_cusLastchangefrom:params._cusLastchangefrom,_cusLastchangeto:params._cusLastchangeto,_cusDel:params._cusDel,max:params.max,offset:params.offset]}"/>
  82.                         
  83.                             <g:sortableColumn property="cusName" title="Cus Name" titleKey="customer.cusName" params="${[_cusName:params._cusName,_cusProfession_id:params._cusProfession_id,_cusType_id:params._cusType_id,_cusLastchangefrom:params._cusLastchangefrom,_cusLastchangeto:params._cusLastchangeto,_cusDel:params._cusDel,max:params.max,offset:params.offset]}"/>
  84.                         
  85.                             <g:sortableColumn property="cusEname" title="Cus Ename" titleKey="customer.cusEname" params="${[_cusName:params._cusName,_cusProfession_id:params._cusProfession_id,_cusType_id:params._cusType_id,_cusLastchangefrom:params._cusLastchangefrom,_cusLastchangeto:params._cusLastchangeto,_cusDel:params._cusDel,max:params.max,offset:params.offset]}"/>
  86.                         
  87.                             <g:sortableColumn property="cusCompany" title="Cus Company" titleKey="customer.cusCompany" params="${[_cusName:params._cusName,_cusProfession_id:params._cusProfession_id,_cusType_id:params._cusType_id,_cusLastchangefrom:params._cusLastchangefrom,_cusLastchangeto:params._cusLastchangeto,_cusDel:params._cusDel,max:params.max,offset:params.offset]}"/>
  88.                         
  89.                             <th><g:message code="customer.cusSex" default="Cus Sex" /></th>
  90.                             <th><g:message code="state" default="State" /></th>
  91.                         </tr>
  92.                     </thead>
  93.                     <tbody>
  94.                     <g:each in="${customerList}" status="i" var="customer">
  95.                         <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
  96.                         
  97.                             
  98.                         
  99.                             <td><g:link action="show" id="${customer.id}" params="${[_cusName:params._cusName,_cusProfession_id:params._cusProfession_id,_cusType_id:params._cusType_id,_cusLastchangefrom:params._cusLastchangefrom,_cusLastchangeto:params._cusLastchangeto,_cusDel:params._cusDel,max:params.max,sort:params.sort,offset:params.offset,order:params.order]}">${customer.cusId?.encodeAsHTML()}</g:link></td>
  100.                         
  101.                             <td>${customer.cusName?.encodeAsHTML()}</td>
  102.                         
  103.                             <td>${customer.cusEname?.encodeAsHTML()}</td>
  104.                         
  105.                             <td>${customer.cusCompany?.encodeAsHTML()}</td>
  106.                         
  107.                             <td>${customer.cusSex?.encodeAsHTML()}</td>
  108.                             <td><g:delState del="${customer.cusDel}"/></td>
  109.                         </tr>
  110.                     </g:each>
  111.                         <% index = customerList.size() %>
  112.                         <g:while test="${index < 10}">
  113.                             <% index++ %>
  114.                             <tr class="${(index % 2) == 1 ? 'odd' : 'even'}">
  115.                                 <td>&nbsp;</td>
  116.                                 <td>&nbsp;</td>
  117.                                 <td>&nbsp;</td>
  118.                                 <td>&nbsp;</td>
  119.                                 <td>&nbsp;</td>
  120.                                 <td>&nbsp;</td>
  121.                             </tr>
  122.                         </g:while>
  123.                     </tbody>
  124.                 </table>
  125.             </div>
  126.             <div class="paginateButtons">
  127.                 <g:paginate total="${params.count}" params="${[_cusName:params._cusName,_cusProfession_id:params._cusProfession_id,_cusType_id:params._cusType_id,_cusLastchangefrom:params._cusLastchangefrom,_cusLastchangeto:params._cusLastchangeto,_cusDel:params._cusDel]}"/>
  128.             </div>
  129.         </div>
  130.     </body>
  131. </html>