jformhead.ftl 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <#list columns as po>
  2. <#if po.show_type=='text'>
  3. <li id="${po.field_name}" class="clearfix " typ="name" reqd="1">
  4. <label class="desc">${po.content}:<#if po.is_null != 'Y'><span class="req">*</span></#if></label>
  5. <div class="content">
  6. <input
  7. type="text"
  8. maxlength="256"
  9. class="ui-input-text xl input fld"
  10. name="${po.field_name}"
  11. id="${po.field_name}"
  12. ${po.extend_json?if_exists}
  13. value="${data['${tableName}']['${po.field_name}']?if_exists?html}"
  14. <#if po.operationCodesReadOnly?exists> readonly = "readonly"</#if>
  15. <#-- update--begin--author:zhangjiaqiang Date:20170417 for:增加校验必填项 -->
  16. <#if po.field_must_input??><#if po.field_must_input == 'Y' || po.is_null != 'Y'>ignore="checked"<#else>ignore="ignore"</#if><#elseif po.is_null != "Y">ignore="checked"<#else>ignore="ignore"</#if>
  17. <#-- update--end--author:zhangjiaqiang Date:20170417 for:增加校验必填项 -->
  18. <#if po.field_valid_type?if_exists?html != ''>
  19. datatype="${po.field_valid_type?if_exists?html}"
  20. <#else>
  21. <#if po.type == 'int'>
  22. datatype="n" <#if po.is_null == 'Y'>ignore="ignore" </#if>
  23. <#elseif po.type=='double'>
  24. datatype="/^(-?\d+)(\.\d+)?$/" <#if po.is_null == 'Y'>ignore="ignore" </#if>
  25. <#else>
  26. <#if po.is_null != 'Y'>datatype="*"</#if>
  27. </#if>
  28. </#if>
  29. />
  30. </div>
  31. </li>
  32. <#elseif po.show_type=='password'>
  33. <li id="${po.field_name}" class="clearfix " typ="password" reqd="1">
  34. <label class="desc">${po.content}: <#if po.is_null != 'Y'><span class="req">*</span></#if></label>
  35. <div class="content">
  36. <input
  37. type="text"
  38. maxlength="256"
  39. class="ui-input-text xl input fld"
  40. name="${po.field_name}"
  41. id="${po.field_name}"
  42. ${po.extend_json?if_exists}
  43. value="${data['${tableName}']['${po.field_name}']?if_exists?html}"
  44. <#-- update--begin--author:zhangjiaqiang Date:20170417 for:增加校验必填项 -->
  45. <#if po.field_must_input??><#if po.field_must_input == 'Y' || po.is_null != 'Y'>ignore="checked"<#else>ignore="ignore"</#if><#elseif po.is_null != "Y">ignore="checked"<#else>ignore="ignore"</#if>
  46. <#-- update--end--author:zhangjiaqiang Date:20170417 for:增加校验必填项 -->
  47. <#if po.operationCodesReadOnly?exists> readonly = "readonly"</#if>
  48. <#if po.field_valid_type?if_exists?html != ''>
  49. datatype="${po.field_valid_type?if_exists?html}"
  50. <#else>
  51. <#if po.is_null != 'Y'>datatype="*"</#if>
  52. </#if>
  53. />
  54. </div>
  55. </li>
  56. <#elseif po.show_type=='radio'>
  57. <li id="${po.field_name}" class="clearfix " typ="radio" reqd="1">
  58. <label class="desc">${po.content} <#if po.is_null != 'Y'><span class="req">*</span></#if></label>
  59. <div class="content">
  60. <fieldset class="controlgroup">
  61. <@DictData name="${po.dict_field?if_exists?html}" text="${po.dict_text?if_exists?html}" tablename="${po.dict_table?if_exists?html}" var="dataList">
  62. <#list dataList as dictdata>
  63. <label <#if dictdata_index==0>class="first"</#if>>
  64. <input
  65. value="${dictdata.typecode?if_exists?html}"
  66. ${po.extend_json?if_exists}
  67. name="${po.field_name}"
  68. type="radio"
  69. <#if dictdata_index==0&&po.is_null != 'Y'>datatype="*"</#if>
  70. <#if po.operationCodesReadOnly?if_exists>onclick="return false;"</#if>
  71. <#if dictdata.typecode?if_exists?html=="${data['${tableName}']['${po.field_name}']?if_exists?html}"> checked="true</#if>
  72. /><label></label>${dictdata.typename?if_exists?html}
  73. </label>
  74. </#list>
  75. </@DictData>
  76. </fieldset>
  77. </div>
  78. </li>
  79. <#elseif po.show_type=='checkbox'>
  80. <li id="${po.field_name}" class="clearfix " typ="radio" reqd="1">
  81. <label class="desc">${po.content}: <#if po.is_null != 'Y'><span class="req">*</span></#if></label>
  82. <div class="content">
  83. <fieldset class="controlgroup">
  84. <#assign checkboxstr>${data['${tableName}']['${po.field_name}']?if_exists?html}</#assign>
  85. <#assign checkboxlist=checkboxstr?split(",")>
  86. <@DictData name="${po.dict_field?if_exists?html}" text="${po.dict_text?if_exists?html}" tablename="${po.dict_table?if_exists?html}" var="dataList">
  87. <#list dataList as dictdata>
  88. <label <#if dictdata_index==0>class="first"</#if>>
  89. <input
  90. value="${dictdata.typecode?if_exists?html}"
  91. ${po.extend_json?if_exists}
  92. name="${po.field_name}"
  93. type="checkbox"
  94. <#if po.operationCodesReadOnly?if_exists>onclick="return false;"</#if>
  95. <#if dictdata_index==0&&po.is_null != 'Y'>datatype="*"</#if>
  96. <#list checkboxlist as x >
  97. <#if dictdata.typecode?if_exists?html=="${x?if_exists?html}"> checked="true" </#if>
  98. </#list>
  99. /><label></label>${dictdata.typename?if_exists?html}
  100. </label>
  101. </#list>
  102. </@DictData>
  103. </fieldset>
  104. </div>
  105. </li>
  106. <#elseif po.show_type=='list'>
  107. <li id="${po.field_name}" class="clearfix " typ="list">
  108. <label class="desc">${po.content}:<#if po.is_null != 'Y'><span class="req">*</span></#if></label>
  109. <div class="content">
  110. <@DictData name="${po.dict_field?if_exists?html}" text="${po.dict_text?if_exists?html}" tablename="${po.dict_table?if_exists?html}" var="dataList">
  111. <select
  112. id="${po.field_name}"
  113. ${po.extend_json?if_exists}
  114. name="${po.field_name}"
  115. <#if po.operationCodesReadOnly?if_exists>
  116. onfocus="this.defOpt=this.selectedIndex" onchange="this.selectedIndex=this.defOpt;"</#if><#if po.is_null != 'Y'>datatype="*"
  117. </#if>
  118. <#-- update--begin--author:zhangjiaqiang Date:20170417 for:增加校验必填项 -->
  119. <#if po.field_must_input??><#if po.field_must_input == 'Y' || po.is_null != 'Y'>ignore="checked"<#else>ignore="ignore"</#if><#elseif po.is_null != "Y">ignore="checked"<#else>ignore="ignore"</#if>
  120. <#-- update--end--author:zhangjiaqiang Date:20170417 for:增加校验必填项 -->
  121. class="ui-input-select fld"
  122. >
  123. <#list dataList as dictdata>
  124. <option
  125. value="${dictdata.typecode?if_exists?html}"
  126. <#if dictdata.typecode?if_exists?html=="${data['${tableName}']['${po.field_name}']?if_exists?html}">
  127. selected="selected"
  128. </#if>>${dictdata.typename?if_exists?html}
  129. </option>
  130. </#list>
  131. </select>
  132. </@DictData>
  133. </div>
  134. </li>
  135. <#elseif po.show_type=='date'>
  136. <li id="${po.field_name}" class="clearfix " typ="date" reqd="1">
  137. <label class="desc">${po.content}: <#if po.is_null != 'Y'><span class="req">*</span></#if></label>
  138. <div class="content">
  139. <input
  140. type="text"
  141. maxlength="256"
  142. class="ui-input-text xl input fld"
  143. name="${po.field_name}"
  144. id="${po.field_name}"
  145. ${po.extend_json?if_exists}
  146. value="<#if data['${tableName}']['${po.field_name}']??>${data['${tableName}']['${po.field_name}']?if_exists?string("yyyy-MM-dd")}</#if>"
  147. <#-- update--begin--author:zhangjiaqiang Date:20170417 for:增加校验必填项 -->
  148. <#if po.field_must_input??><#if po.field_must_input == 'Y' || po.is_null != 'Y'>ignore="checked"<#else>ignore="ignore"</#if><#elseif po.is_null != "Y">ignore="checked"<#else>ignore="ignore"</#if>
  149. <#-- update--end--author:zhangjiaqiang Date:20170417 for:增加校验必填项 -->
  150. onClick="WdatePicker({<#if po.operationCodesReadOnly?if_exists> readonly = true</#if>})"
  151. <#if po.operationCodesReadOnly?exists> readonly = "readonly"</#if>
  152. <#if po.field_valid_type?if_exists?html != ''>
  153. datatype="${po.field_valid_type?if_exists?html}"
  154. <#else>
  155. <#if po.is_null != 'Y'>datatype="*"</#if>
  156. </#if>
  157. />
  158. </div>
  159. </li>
  160. <#elseif po.show_type=='datetime'>
  161. <li id="${po.field_name}" class="clearfix " typ="date" reqd="1">
  162. <label class="desc">${po.content}: <#if po.is_null != 'Y'><span class="req">*</span></#if>/label>
  163. <div class="content">
  164. <input
  165. type="text"
  166. maxlength="256"
  167. class="ui-input-text xl input fld"
  168. name="${po.field_name}"
  169. id="${po.field_name}"
  170. ${po.extend_json?if_exists}
  171. value="<#if data['${tableName}']['${po.field_name}']??>${data['${tableName}']['${po.field_name}']?if_exists?string("yyyy-MM-dd HH:mm:ss")}</#if>"
  172. onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'<#if po.operationCodesReadOnly?if_exists> readonly = true</#if>})"
  173. <#if po.operationCodesReadOnly?exists> readonly = "readonly"</#if>
  174. <#-- update--begin--author:zhangjiaqiang Date:20170417 for:增加校验必填项 -->
  175. <#if po.field_must_input??><#if po.field_must_input == 'Y' || po.is_null != 'Y'>ignore="checked"<#else>ignore="ignore"</#if><#elseif po.is_null != "Y">ignore="checked"<#else>ignore="ignore"</#if>
  176. <#-- update--end--author:zhangjiaqiang Date:20170417 for:增加校验必填项 -->
  177. <#if po.field_valid_type?if_exists?html != ''>
  178. datatype="${po.field_valid_type?if_exists?html}"
  179. <#else>
  180. <#if po.is_null != 'Y'>datatype="*"</#if>
  181. </#if>
  182. />
  183. </div>
  184. </li>
  185. </#if>
  186. </#list>