pageIndex.ftl 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. #parse("content/base/back/common/macro.vm")
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. #parse("content/base/back/common/head.vm")
  5. <body style='overflow:scroll;overflow-x:hidden'>
  6. <div class="container bs-docs-container" style="width:100%;">
  7. <div class="row">
  8. <form role="form" class="form-inline" action="$!{basePath}/${projectName}/${lowerName}.do?list" method="post" id="formSubmit">
  9. <div class="col-md-10" style="width:100%">
  10. <div class="panel panel-default">
  11. <div class="panel-heading">列表</div>
  12. <div class="panel-body">
  13. <div class="search">
  14. <#list columnDatas as item>
  15. <#if item.columnName?lower_case != 'id'>
  16. <#if item.columnType == "datetime" ||item.columnType == "date" || item.columnType == "timestamp">
  17. <div class="form-group col-sm-3">
  18. <label for="${item.domainPropertyName}" class="control-label col-sm-3 line34">${item.columnComment}</label>
  19. <div class="col-sm-8">
  20. <input type="text" name="${item.domainPropertyName}" id="${item.domainPropertyName}" value="$!dateTool.format('yyyy-MM-dd',$!{${lowerName}.${item.domainPropertyName}})" class="form-control">
  21. </div>
  22. </div>
  23. <#else>
  24. <div class="form-group col-sm-3">
  25. <label for="${item.domainPropertyName}" class="control-label col-sm-3 line34">${item.columnComment}</label>
  26. <div class="col-sm-8">
  27. <input type="text" name="${item.domainPropertyName}" id="${item.domainPropertyName}" value="$!{${lowerName}.${item.domainPropertyName}}" class="form-control">
  28. </div>
  29. </div>
  30. </#if>
  31. </#if>
  32. </#list>
  33. <#-- update--begin--author:zhangjiaqiang date:20170524 for:美化p3列表页面的按钮 -->
  34. <button type="submit" class="btn btn-primary"><i class="fa fa-search"></i> 搜 索</button>
  35. <#-- update--begin--author:zhangjiaqiang date:20170524 for:美化p3列表页面的按钮 -->
  36. <div class="clearfix"></div>
  37. </div>
  38. <div id="legend">
  39. <#-- update--begin--author:zhangjiaqiang date:20170524 for:美化p3列表页面的按钮 -->
  40. <legend class="le"><button type="button" class="btn btn-primary" onclick="doUrl('$!{basePath}/${projectName}/${lowerName}.do?toAdd')" ><i class="fa fa-plus"></i> 新增</button></legend>
  41. <#-- update--begin--author:zhangjiaqiang date:20170524 for:美化p3列表页面的按钮 -->
  42. </div>
  43. <table class="table table-striped">
  44. <thead>
  45. <#-- update--begin--author:zhangjiaqiang date:20170616 for:修订checkbox在IE下的兼容性 -->
  46. <th>
  47. <input type="checkbox" name="ckAll" id="ckAll" />
  48. </th>
  49. <#-- update--begin--author:zhangjiaqiang date:20170616 for:修订checkbox在IE下的兼容性 -->
  50. <#list columnDatas as item>
  51. <#if item.columnName?lower_case != 'id'>
  52. <th>${item.columnComment}</th>
  53. </#if>
  54. </#list>
  55. <th>操作</th>
  56. </thead>
  57. <tbody>
  58. #if($!{pageInfos})
  59. #foreach($!{info} in $!{pageInfos})
  60. <tr>
  61. <#-- update--begin--author:zhangjiaqiang date:20170525 for:美化P3页面按钮 -->
  62. <td>
  63. <input type="checkbox" name="ck" id="ck_$!{velocityCount}" value="$!{info.id}" />
  64. </td>
  65. <#-- update--end--author:zhangjiaqiang date:20170525 for:美化P3页面按钮 -->
  66. <#list columnDatas as item>
  67. <#if item.columnName?lower_case != 'id'>
  68. <#if item.columnType == "datetime" ||item.columnType == "date" || item.columnType == "timestamp">
  69. <td>$!dateTool.format("yyyy-MM-dd",$!{info.${item.domainPropertyName}})</td>
  70. <#else>
  71. <td>$!{info.${item.domainPropertyName}}</td>
  72. </#if>
  73. </#if>
  74. </#list>
  75. <td class="last">
  76. <#-- update--begin--author:zhangjiaqiang date:20170524 for:美化p3列表页面的按钮 -->
  77. <a class="btn btn-success btn-xs" href="javascript:doUrl('$!{basePath}/${projectName}/${lowerName}.do?toEdit&id=$!{info.id}')" ><i class="fa fa-edit"></i> 编辑</a>
  78. <a class="btn btn-danger btn-xs" href="javascript:delData('$!{basePath}/${projectName}/${lowerName}.do?doDelete&id=$!{info.id}')"><i class="fa fa-trash-o"></i> 删除</a>
  79. <#-- update--begin--author:zhangjiaqiang date:20170524 for:美化p3列表页面的按钮 -->
  80. </td>
  81. </tr>
  82. #end
  83. #end
  84. </tbody>
  85. </table>
  86. <div class="text-right">
  87. <!--公用翻页代码-->
  88. #set($attr='formSubmit')
  89. #showPageList($pageInfos $attr)
  90. <!--END公用翻页代码-->
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </form>
  96. </div>
  97. </div>
  98. </body>
  99. </html>
  100. <script>
  101. $("#ckAll").click(function(){
  102. if($(this).prop("checked")){
  103. $(":checkbox").prop("checked",true)
  104. }else{
  105. $(":checkbox").prop("checked",false)
  106. }
  107. });
  108. //jquery获取复选框值
  109. function getCkValue(){
  110. var chk_value =[];
  111. $('input[name="ck"]:checked').each(function(){
  112. chk_value.push($(this).val());
  113. });
  114. //alert(chk_value.length==0 ?'你还没有选择任何内容!':chk_value);
  115. }
  116. </script>