cgform_jspSubTemplate_one2one.ftl 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  4. <#include "../../ui/datatype.ftl"/>
  5. <#include "../../ui/dictInfo.ftl"/>
  6. <#-- update--end--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  7. <script type="text/javascript">
  8. $(document).ready(function(){
  9. if(location.href.indexOf("load=detail")!=-1){
  10. $(":input").attr("disabled","true");
  11. }
  12. });
  13. </script>
  14. <div style="width: auto;height: 300px;overflow-y:auto;overflow-x:auto;">
  15. <table cellpadding="0" cellspacing="1" class="formtable" id="${entityName?uncap_first}_table" >
  16. <tbody id="add_${entityName?uncap_first}_table" >
  17. <c:if test="${"$"}{fn:length(${entityName?uncap_first}List) <= 0 }">
  18. <tr>
  19. <#list columns as po>
  20. <#if po.isShow=="N">
  21. <input name="${entityName?uncap_first}List[0].${po.fieldName}" type="hidden" value="${'$'}{poVal.${po.fieldName}}"/>
  22. </#if>
  23. </#list>
  24. </tr>
  25. <#list pageColumns as po>
  26. <#assign check = 0 >
  27. <#list foreignKeys as key>
  28. <#if fieldMeta[po.fieldName]==key?uncap_first>
  29. <#assign check = 1 >
  30. <#break>
  31. </#if>
  32. </#list>
  33. <#if check==0>
  34. <#if po_index%2==0>
  35. <tr>
  36. </#if>
  37. <td align="right">
  38. <label class="Validform_label">
  39. ${po.content}:
  40. </label>
  41. </td>
  42. <td class="value">
  43. <#if po.showType == "text">
  44. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  45. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />/>
  46. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  47. <#elseif po.showType=='password'>
  48. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  49. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="password" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />/>
  50. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  51. <#elseif po.showType=='radio' || po.showType=='select' || po.showType=='checkbox' || po.showType=='list'>
  52. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  53. <t:dictSelect field="${entityName?uncap_first}List[0].${po.fieldName}" type="${po.showType?if_exists?html}" <@datatype inputCheck="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> <@dictInfo dictTable="${po.dictTable}" dictField="${po.dictField}" dictText="${po.dictText}" /> defaultVal="${'$'}{${entityName?uncap_first}Page.${po.fieldName}}" hasLabel="false" title="${po.content}"></t:dictSelect>
  54. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  55. <#elseif po.showType=='date'>
  56. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  57. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="Wdate" onClick="WdatePicker()" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/>/>
  58. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  59. <#-- update--begin--author:zhangjiaqiang date:20170531 for:增加图片和文件的支持 -->
  60. <#elseif po.showType=='file' || po.showType == 'image'>
  61. <#-- update--end--author:zhangjiaqiang date:20170531 for:增加图片和文件的支持 -->
  62. <input type="hidden" id="${entityName?uncap_first}List[0].${po.fieldName}" name="${entityName?uncap_first}List[0].${po.fieldName}" />
  63. <a target="_blank" id="${entityName?uncap_first}List[0].${po.fieldName}_href">暂时未上传文件</a>
  64. <input class="ui-button" type="button" value="上传附件"
  65. onclick="commonUpload(${entityName?uncap_first}List0${po.fieldName}Callback)"/>
  66. <script type="text/javascript">
  67. function ${entityName?uncap_first}List0${po.fieldName}Callback(url,name){
  68. $("#${entityName?uncap_first}List\\[0\\]\\.${po.fieldName}_href").attr('href',url).html('下载');
  69. $("#${entityName?uncap_first}List\\[0\\]\\.${po.fieldName}").val(url);
  70. }
  71. </script>
  72. <#elseif po.showType=='datetime'>
  73. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  74. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/>/>
  75. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  76. <#else>
  77. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  78. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}"type="text" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
  79. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  80. </#if>
  81. <label class="Validform_label" style="display: none;">${po.content?if_exists?html}</label>
  82. </td>
  83. <#if (po_index+1)%2==0>
  84. </tr>
  85. <#else>
  86. <#if !po_has_next>
  87. </tr>
  88. </#if>
  89. </#if>
  90. </#if>
  91. </#list>
  92. </c:if>
  93. <c:if test="${"$"}{fn:length(${entityName?uncap_first}List) > 0 }">
  94. <c:forEach items="${"$"}{${entityName?uncap_first}List}" var="poVal" varStatus="stuts" begin="0" end="0">
  95. <tr>
  96. <#list columns as po>
  97. <#if po.isShow=="N">
  98. <input name="${entityName?uncap_first}List[0].${po.fieldName}" type="hidden" value="${'$'}{poVal.${po.fieldName}}"/>
  99. </#if>
  100. </#list>
  101. </tr>
  102. <#list pageColumns as po>
  103. <#assign check = 0 >
  104. <#list foreignKeys as key>
  105. <#if fieldMeta[po.fieldName]==key?uncap_first>
  106. <#assign check = 1 >
  107. <#break>
  108. </#if>
  109. </#list>
  110. <#if check==0>
  111. <#if po_index%2==0>
  112. <tr>
  113. </#if>
  114. <td align="right">
  115. <label class="Validform_label">
  116. ${po.content}:
  117. </label>
  118. </td>
  119. <td class="value">
  120. <#if po.showType == "text">
  121. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  122. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value="${'$'}{poVal.${po.fieldName} }"/>
  123. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  124. <#elseif po.showType=='password'>
  125. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  126. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="password" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value="${'$'}{poVal.${po.fieldName} }"/>
  127. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  128. <#elseif po.showType=='radio' || po.showType=='select' || po.showType=='checkbox' || po.showType=='list'>
  129. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  130. <t:dictSelect field="${entityName?uncap_first}List[0].${po.fieldName}" type="${po.showType?if_exists?html}" <@datatype inputCheck="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/><@dictInfo dictTable="${po.dictTable}" dictField="${po.dictField}" dictText="${po.dictText}" /> defaultVal="${'$'}{${entityName?uncap_first}Page.${po.fieldName}}" hasLabel="false" title="${po.content}"></t:dictSelect>
  131. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  132. <#elseif po.showType=='date'>
  133. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  134. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="Wdate" onClick="WdatePicker()" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> value="<fmt:formatDate value='${'$'}{poVal.${po.fieldName}}' type="date" pattern="yyyy-MM-dd"/>"/>
  135. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  136. <#elseif po.showType=='datetime'>
  137. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  138. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> value="<fmt:formatDate value='${'$'}{poVal.${po.fieldName}}' type="date" pattern="yyyy-MM-dd hh:mm:ss"/>"/>
  139. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  140. <#elseif po.showType=='file'>
  141. <input type="hidden" id="${entityName?uncap_first}List[0].${po.fieldName}" name="${entityName?uncap_first}List[0].${po.fieldName}" value="${'$'}{poVal.${po.fieldName} }"/>
  142. <c:if test="${'$'}{empty poVal.${po.fieldName}}">
  143. <a target="_blank" id="${entityName?uncap_first}List[0].${po.fieldName}_href">暂时未上传文件</a>
  144. </c:if>
  145. <c:if test="${'$'}{!empty poVal.${po.fieldName}}">
  146. <a href="${'$'}{poVal.${po.fieldName}}" target="_blank" id="${entityName?uncap_first}List[0].${po.fieldName}_href">下载</a>
  147. </c:if>
  148. <input class="ui-button" type="button" value="上传附件"
  149. onclick="commonUpload(${entityName?uncap_first}List0${po.fieldName}Callback)"/>
  150. <script type="text/javascript">
  151. function ${entityName?uncap_first}List0${po.fieldName}Callback(url,name){
  152. $("#${entityName?uncap_first}List\\[0\\]\\.${po.fieldName}_href").attr('href',url).html('下载');
  153. $("#${entityName?uncap_first}List\\[0\\]\\.${po.fieldName}").val(url);
  154. }
  155. </script>
  156. <#else>
  157. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  158. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> value="${'$'}{poVal.${po.fieldName} }"/>
  159. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  160. </#if>
  161. <label class="Validform_label" style="display: none;">${po.content?if_exists?html}</label>
  162. </td>
  163. <#if (po_index+1)%2==0>
  164. </tr>
  165. <#else>
  166. <#if !po_has_next>
  167. </tr>
  168. </#if>
  169. </#if>
  170. </#if>
  171. </#list>
  172. </c:forEach>
  173. </c:if>
  174. </tbody>
  175. </table>
  176. </div>