pageIndex.ftl 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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--end--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--end--author:zhangjiaqiang date:20170616 for:修订checkbox在IE下的兼容性 -->
  50. <#list columnDatas as item>
  51. <#if item.columnName?lower_case != 'id'>
  52. <#if item.columnName?lower_case != 'del_stat'
  53. && item.columnName?lower_case != 'create_by'
  54. && item.columnName?lower_case != 'create_name'
  55. && item.columnName?lower_case != 'create_date'
  56. && item.columnName?lower_case != 'update_by'
  57. && item.columnName?lower_case != 'update_name'
  58. && item.columnName?lower_case != 'update_date'
  59. && item.columnName?lower_case != 'creator'
  60. && item.columnName?lower_case != 'editor'
  61. && item.columnName?lower_case != 'create_dt'
  62. && item.columnName?lower_case != 'edit_dt'
  63. && item.columnName?lower_case != 'last_edit_dt'
  64. && item.columnName?lower_case != 'record_version'>
  65. <th>${item.columnComment}</th>
  66. </#if>
  67. </#if>
  68. </#list>
  69. <th>操作</th>
  70. </thead>
  71. <tbody>
  72. #if($!{pageInfos})
  73. #foreach($!{info} in $!{pageInfos})
  74. <tr>
  75. <#-- update--begin--author:zhangjiaqiang date:20170525 for:美化P3页面按钮 -->
  76. <td>
  77. <input type="checkbox" name="ck" id="ck_$!{velocityCount}" value="$!{info.id}" />
  78. </td>
  79. <#-- update--end--author:zhangjiaqiang date:20170525 for:美化P3页面按钮 -->
  80. <#list columnDatas as item>
  81. <#if item.columnName?lower_case != 'id'>
  82. <#if item.columnName?lower_case != 'del_stat'
  83. && item.columnName?lower_case != 'create_by'
  84. && item.columnName?lower_case != 'create_name'
  85. && item.columnName?lower_case != 'create_date'
  86. && item.columnName?lower_case != 'update_by'
  87. && item.columnName?lower_case != 'update_name'
  88. && item.columnName?lower_case != 'update_date'
  89. && item.columnName?lower_case != 'creator'
  90. && item.columnName?lower_case != 'editor'
  91. && item.columnName?lower_case != 'create_dt'
  92. && item.columnName?lower_case != 'edit_dt'
  93. && item.columnName?lower_case != 'last_edit_dt'
  94. && item.columnName?lower_case != 'record_version'>
  95. <#if item.columnType == "datetime" ||item.columnType == "date" || item.columnType == "timestamp">
  96. <td>$!dateTool.format("yyyy-MM-dd",$!{info.${item.domainPropertyName}})</td>
  97. <#else>
  98. <td>$!{info.${item.domainPropertyName}}</td>
  99. </#if>
  100. </#if>
  101. </#if>
  102. </#list>
  103. <td class="last">
  104. <#-- update--begin--author:zhangjiaqiang date:20170524 for:美化p3列表页面的按钮 -->
  105. <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>
  106. <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>
  107. <#-- update--end--author:zhangjiaqiang date:20170524 for:美化p3列表页面的按钮 -->
  108. </td>
  109. </tr>
  110. #end
  111. #end
  112. </tbody>
  113. </table>
  114. <div class="text-right">
  115. <!--公用翻页代码-->
  116. #set($attr='formSubmit')
  117. #showPageList($pageInfos $attr)
  118. <!--END公用翻页代码-->
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. </form>
  124. </div>
  125. </div>
  126. </body>
  127. </html>
  128. <script>
  129. $("#ckAll").click(function(){
  130. if($(this).prop("checked")){
  131. $(":checkbox").prop("checked",true)
  132. }else{
  133. $(":checkbox").prop("checked",false)
  134. }
  135. });
  136. //jquery获取复选框值
  137. function getCkValue(){
  138. var chk_value =[];
  139. $('input[name="ck"]:checked').each(function(){
  140. chk_value.push($(this).val());
  141. });
  142. //alert(chk_value.length==0 ?'你还没有选择任何内容!':chk_value);
  143. }
  144. </script>