cgform_jspSubTemplate_one2one.ftl 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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="margin: 0 15px; background-color: white;">
  15. <!-- Table -->
  16. <table id="${entityName?uncap_first}_table" class="table table-bordered table-hover" style="margin-bottom: 0;">
  17. <tbody id="add_${entityName?uncap_first}_table" >
  18. <c:if test="${"$"}{fn:length(${entityName?uncap_first}List) <= 0 }">
  19. <tr>
  20. <#list columns as po>
  21. <#if po.isShow=="N">
  22. <input name="${entityName?uncap_first}List[0].${po.fieldName}" type="hidden" value="${'$'}{poVal.${po.fieldName}}"/>
  23. </#if>
  24. </#list>
  25. </tr>
  26. <#list pageColumns as po>
  27. <#assign check = 0 >
  28. <#list foreignKeys as key>
  29. <#if fieldMeta[po.fieldName]==key?uncap_first>
  30. <#assign check = 1 >
  31. <#break>
  32. </#if>
  33. </#list>
  34. <#if check==0>
  35. <#if po_index%2==0>
  36. <tr>
  37. </#if>
  38. <td class="text-center">
  39. <b>${po.content}:</b>
  40. </td>
  41. <td>
  42. <#if po.showType == "text">
  43. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  44. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="width:120px;" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />/>
  45. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  46. <#elseif po.showType=='password'>
  47. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  48. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="password" style="width:120px;" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />/>
  49. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  50. <#elseif po.showType=='radio' || po.showType=='select' || po.showType=='checkbox' || po.showType=='list'>
  51. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  52. <t:dictSelect field="${entityName?uncap_first}List[0].${po.fieldName}" type="${po.showType?if_exists?html}" extendJson="{class:'form-control',style:'width:150px'}" <@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>
  53. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  54. <#elseif po.showType=='date'>
  55. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  56. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;width:160px;" class="form-control" onClick="WdatePicker()" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />/>
  57. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  58. <#-- update--begin--author:zhangjiaqiang date:20170531 for:增加图片和文件的支持 -->
  59. <#elseif po.showType=='file' || po.showType == 'image'>
  60. <#-- update--end--author:zhangjiaqiang date:20170531 for:增加图片和文件的支持 -->
  61. <input type="hidden" id="${entityName?uncap_first}List[0].${po.fieldName}" name="${entityName?uncap_first}List[0].${po.fieldName}" />
  62. <a target="_blank" id="${entityName?uncap_first}List[0].${po.fieldName}_href">暂时未上传文件</a>
  63. <#-- update--begin--author:zhangjiaqiang date:20170614 for:修订上传附件按钮的大小 -->
  64. <input class="btn btn-sm btn-success" style="margin-left:10px;" type="button" value="上传附件"
  65. onclick="commonUpload(${entityName?uncap_first}List0${po.fieldName}Callback)"/>
  66. <#-- update--end--author:zhangjiaqiang date:20170614 for:修订上传附件按钮的大小 -->
  67. <script type="text/javascript">
  68. function ${entityName?uncap_first}List0${po.fieldName}Callback(url,name){
  69. $("#${entityName?uncap_first}List\\[0\\]\\.${po.fieldName}_href").attr('href',url).html('下载');
  70. $("#${entityName?uncap_first}List\\[0\\]\\.${po.fieldName}").val(url);
  71. }
  72. </script>
  73. <#elseif po.showType=='datetime'>
  74. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  75. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;width:160px;" class="form-control" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />/>
  76. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  77. <#else>
  78. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  79. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="width:120px;" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> />
  80. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  81. </#if>
  82. <label class="Validform_label" style="display: none;">${po.content?if_exists?html}</label>
  83. </td>
  84. <#if (po_index+1)%2==0>
  85. </tr>
  86. <#else>
  87. <#if !po_has_next>
  88. </tr>
  89. </#if>
  90. </#if>
  91. </#if>
  92. </#list>
  93. </c:if>
  94. <c:if test="${"$"}{fn:length(${entityName?uncap_first}List) > 0 }">
  95. <c:forEach items="${"$"}{${entityName?uncap_first}List}" var="poVal" varStatus="stuts" begin="0" end="0">
  96. <tr>
  97. <#list columns as po>
  98. <#if po.isShow=="N">
  99. <input name="${entityName?uncap_first}List[0].${po.fieldName}" type="hidden" value="${'$'}{poVal.${po.fieldName}}"/>
  100. </#if>
  101. </#list>
  102. </tr>
  103. <#list pageColumns as po>
  104. <#assign check = 0 >
  105. <#list foreignKeys as key>
  106. <#if fieldMeta[po.fieldName]==key?uncap_first>
  107. <#assign check = 1 >
  108. <#break>
  109. </#if>
  110. </#list>
  111. <#if check==0>
  112. <#if po_index%2==0>
  113. <tr>
  114. </#if>
  115. <td class="text-center">
  116. <b>${po.content}:</b>
  117. </td>
  118. <td>
  119. <#if po.showType == "text">
  120. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  121. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="width:120px;" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value="${'$'}{poVal.${po.fieldName} }"/>
  122. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  123. <#elseif po.showType=='password'>
  124. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  125. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="password" style="width:120px;" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value="${'$'}{poVal.${po.fieldName} }"/>
  126. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  127. <#elseif po.showType=='radio' || po.showType=='select' || po.showType=='checkbox' || po.showType=='list'>
  128. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  129. <t:dictSelect field="${entityName?uncap_first}List[0].${po.fieldName}" type="${po.showType?if_exists?html}" extendJson="{class:'form-control',style:'width:150px'}" <@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="${'$'}{poVal.${po.fieldName}}" hasLabel="false" title="${po.content}"></t:dictSelect>
  130. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  131. <#elseif po.showType=='date'>
  132. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  133. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;width:160px;" class="form-control" onClick="WdatePicker()" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value="<fmt:formatDate value='${'$'}{poVal.${po.fieldName}}' type="date" pattern="yyyy-MM-dd"/>"/>
  134. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  135. <#elseif po.showType=='datetime'>
  136. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  137. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;width:160px;" class="form-control" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value="<fmt:formatDate value='${'$'}{poVal.${po.fieldName}}' type="date" pattern="yyyy-MM-dd hh:mm:ss"/>"/>
  138. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  139. <#elseif po.showType=='file' || po.showType=='image'>
  140. <input type="hidden" id="${entityName?uncap_first}List[0].${po.fieldName}" name="${entityName?uncap_first}List[0].${po.fieldName}" value="${'$'}{poVal.${po.fieldName} }"/>
  141. <c:if test="${'$'}{empty poVal.${po.fieldName}}">
  142. <a target="_blank" id="${entityName?uncap_first}List[0].${po.fieldName}_href">暂时未上传文件</a>
  143. </c:if>
  144. <c:if test="${'$'}{!empty poVal.${po.fieldName}}">
  145. <a href="${'$'}{poVal.${po.fieldName}}" target="_blank" id="${entityName?uncap_first}List[0].${po.fieldName}_href">下载</a>
  146. </c:if>
  147. <input class="form-control" type="button" value="上传附件"
  148. onclick="commonUpload(${entityName?uncap_first}List0${po.fieldName}Callback)"/>
  149. <script type="text/javascript">
  150. function ${entityName?uncap_first}List0${po.fieldName}Callback(url,name){
  151. $("#${entityName?uncap_first}List\\[0\\]\\.${po.fieldName}_href").attr('href',url).html('下载');
  152. $("#${entityName?uncap_first}List\\[0\\]\\.${po.fieldName}").val(url);
  153. }
  154. </script>
  155. <#else>
  156. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  157. <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="width:120px;" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value="${'$'}{poVal.${po.fieldName} }"/>
  158. <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
  159. </#if>
  160. <label class="Validform_label" style="display: none;">${po.content?if_exists?html}</label>
  161. </td>
  162. <#if (po_index+1)%2==0>
  163. </tr>
  164. <#else>
  165. <#if !po_has_next>
  166. </tr>
  167. </#if>
  168. </#if>
  169. </#if>
  170. </#list>
  171. </c:forEach>
  172. </c:if>
  173. </tbody>
  174. </table>
  175. </div>