pageEdit.ftl 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. #parse("content/base/back/common/head.vm")
  4. <body style='overflow:scroll;overflow-x:hidden'>
  5. <div class="container bs-docs-container" style="width:100%;">
  6. <div class="row">
  7. <div class="panel panel-default">
  8. <div class="panel-heading">
  9. <#-- update--begin--author:zhangjiaqiang date:20170524 for:美化p3列表页面的按钮 -->
  10. <button type="button" class="btn btn-primary" id="formSubmit"><span class="fa fa-save"></span> 保存</button>
  11. <button type="button" class="btn btn-default" id="formReturn" data-dismiss="modal" onclick="doUrl('$!{basePath}/${projectName}/${lowerName}.do?list')"><span class="fa fa-arrow-circle-left"></span> 返回</button>
  12. <#-- update--end--author:zhangjiaqiang date:20170524 for:美化p3列表页面的按钮 -->
  13. </div>
  14. <div class="panel-body">
  15. <form class="form-horizontal" role="form" id="dailogForm" action="$!{basePath}/${projectName}/${lowerName}.do?doEdit" method="POST">
  16. <input type="hidden" id="btn_sub" class="btn_sub" />
  17. <input type="hidden" value="$!{${lowerName}.id}" name="id" id="id" />
  18. <#list columnDatas as item>
  19. <#if item.domainPropertyName != 'id'>
  20. <#if item.columnType == "datetime" ||item.columnType == "date" || item.columnType == "timestamp">
  21. <div class="form-group mno">
  22. <label for="inputEmail3" class="col-sm-2 control-label" style="text-align:left;">${item.columnComment}</label>
  23. <div class="col-sm-8">
  24. <input type="text" value="$!dateTool.format("yyyy-MM-dd",$!{${lowerName}.${item.domainPropertyName}})" name="${item.domainPropertyName}" id="${item.domainPropertyName}" class="form-control" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" style="background: url('$!{basePath}/plug-in-ui/images/datetime.png') no-repeat scroll right center transparent;" <#if item.nullable != 'Y'> datatype="*" </#if> />
  25. </div>
  26. </div>
  27. <#else>
  28. <div class="form-group mno">
  29. <label for="inputEmail3" class="col-sm-2 control-label" style="text-align:left;">${item.columnComment}</label>
  30. <div class="col-sm-8">
  31. <input type="text" value="$!{${lowerName}.${item.domainPropertyName}}" name="${item.domainPropertyName}" id="${item.domainPropertyName}" class="form-control" <#if item.nullable != 'Y'> datatype="*" </#if>/>
  32. </div>
  33. </div>
  34. </#if>
  35. </#if>
  36. </#list>
  37. <div class="form-group mno">
  38. <ul id="tab_menu" class="nav nav-tabs">
  39. <#list subEntityList as sub>
  40. <li <#if sub_index == 0>class="active"</#if>>
  41. <a href="#${sub.paramData.lowerName}" data-toggle="tab">
  42. ${sub.paramData.codeName}
  43. </a>
  44. </li>
  45. </#list>
  46. </ul>
  47. <div id="tab_menu_content" class="tab-content">
  48. <#list subEntityList as sub>
  49. <div class="tab-pane fade in <#if sub_index == 0>active</#if>" id="${sub.paramData.lowerName}">
  50. <#-- update--begin--author:zhangjiaqiang date:20170524 for:美化p3列表页面的按钮 -->
  51. <button type="button" id="${sub.paramData.lowerName}_add" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> 添加</button>
  52. <button type="button" id="${sub.paramData.lowerName}_del" class="btn btn-danger btn-sm"><i class="fa fa-trash-o"></i> 删除</button>
  53. <#-- update--begin--author:zhangjiaqiang date:20170524 for:美化p3列表页面的按钮 -->
  54. <table class="table table-striped" id="${sub.paramData.lowerName}_table" style="margin-top:15px;">
  55. <thead>
  56. <th>ID</th>
  57. <#list sub.paramData.columnDatas as item>
  58. <#if item.domainPropertyName != 'id'>
  59. <th>${item.columnComment}</th>
  60. </#if>
  61. </#list>
  62. </thead>
  63. <tbody>
  64. #if($!{${sub.paramData.lowerName}Entities})
  65. #foreach($!{${sub.paramData.lowerName}} in $!{${sub.paramData.lowerName}Entities})
  66. #set($count = $!{velocityCount} - 1)
  67. <tr>
  68. <td>
  69. <input type="hidden" value="$!{${sub.paramData.lowerName}.id}" name="${sub.paramData.lowerName}Entities[$count].id" id="${sub.paramData.lowerName}Entities[$count].id"/>
  70. <input type="checkbox" name="${sub.paramData.lowerName}Entities[$count].idCheck" id="${sub.paramData.lowerName}Entities$count_idCheck" style="width:16px;height:16px;" />
  71. </td>
  72. <#list sub.paramData.columnDatas as item>
  73. <#if item.domainPropertyName != 'id'>
  74. <#if item.columnType == "datetime" ||item.columnType == "date" || item.columnType == "timestamp">
  75. <td>
  76. <input type="text" value="$!dateTool.format("yyyy-MM-dd",$!{${sub.paramData.lowerName}.${item.domainPropertyName}})" name="${sub.paramData.lowerName}Entities[$count].${item.domainPropertyName}" maxlength="16" id="${sub.paramData.lowerName}Entities[$count].${item.domainPropertyName}" class="form-control" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" style="background: url('$!{basePath}/plug-in-ui/images/datetime.png') no-repeat scroll right center transparent;" <#if item.nullable != 'Y'> datatype="*" </#if>/>
  77. </td>
  78. <#else>
  79. <td>
  80. <input type="text" value="$!{${sub.paramData.lowerName}.${item.domainPropertyName}}" name="${sub.paramData.lowerName}Entities[$count].${item.domainPropertyName}" maxlength="16" id="${sub.paramData.lowerName}Entities[$count].${item.domainPropertyName}" class="form-control" <#if item.nullable != 'Y'> datatype="*" </#if>/>
  81. </td>
  82. </#if>
  83. </#if>
  84. </#list>
  85. </tr>
  86. #end
  87. #end
  88. </tbody>
  89. </table>
  90. </div>
  91. </#list>
  92. </div>
  93. </div>
  94. </form>
  95. <#list subEntityList as sub>
  96. <!-- ${sub.paramData.codeName}模板 -->
  97. <table style="display:none;">
  98. <tbody id="add_${sub.paramData.lowerName}_template">
  99. <tr>
  100. <#-- update--begin--author:zhangjiaqiang date:20170616 for:修订checkbox在IE下的兼容性 -->
  101. <td>
  102. <input type="hidden" name="${sub.paramData.lowerName}Entities[#index#].id" id="${sub.paramData.lowerName}Entities[#index#].id"/>
  103. <input type="checkbox" name="${sub.paramData.lowerName}Entities[#index#].idCheck" id="${sub.paramData.lowerName}Entities#index#_idCheck" />
  104. </td>
  105. <#-- update--end--author:zhangjiaqiang date:20170616 for:修订checkbox在IE下的兼容性 -->
  106. <#list sub.paramData.columnDatas as item>
  107. <#if item.domainPropertyName != 'id'>
  108. <#if item.columnType == "datetime" ||item.columnType == "date" || item.columnType == "timestamp">
  109. <td>
  110. <input type="text" name="${sub.paramData.lowerName}Entities[#index#].${item.domainPropertyName}" maxlength="16" id="${sub.paramData.lowerName}Entities[#index#].${item.domainPropertyName}" class="form-control" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" style="background: url('$!{basePath}/plug-in-ui/images/datetime.png') no-repeat scroll right center transparent;" <#if item.nullable != 'Y'> datatype="*" </#if>/>
  111. </td>
  112. <#else>
  113. <td>
  114. <input type="text" name="${sub.paramData.lowerName}Entities[#index#].${item.domainPropertyName}" maxlength="16" id="${sub.paramData.lowerName}Entities[#index#].${item.domainPropertyName}" class="form-control" <#if item.nullable != 'Y'> datatype="*" </#if>/>
  115. </td>
  116. </#if>
  117. </#if>
  118. </#list>
  119. </tr>
  120. </tbody>
  121. </table>
  122. </#list>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. </body>
  128. </html>
  129. <script type="text/javascript" src="$!{basePath}/plug-in-ui/js/Validform_v5.3.2.js"></script>
  130. <script type="text/javascript" src="$!{basePath}/plug-in-ui/js/forminit.p3.js"></script>
  131. <script type="text/javascript" src="$!{basePath}/${pageAddJsPath}"></script>