cgform_jspTemplate.ftl 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title>${ftl_description}</title>
  7. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  8. <script type="text/javascript">
  9. //初始化下标
  10. function resetTrNum(tableId) {
  11. $tbody = $("#"+tableId+"");
  12. $tbody.find('>tr').each(function(i){
  13. $(':input, select', this).each(function(){
  14. var $this = $(this), name = $this.attr('name'), val = $this.val();
  15. if(name!=null){
  16. if (name.indexOf("#index#") >= 0){
  17. $this.attr("name",name.replace('#index#',i));
  18. }else{
  19. var s = name.indexOf("[");
  20. var e = name.indexOf("]");
  21. var new_name = name.substring(s+1,e);
  22. $this.attr("name",name.replace(new_name,i));
  23. }
  24. }
  25. });
  26. });
  27. }
  28. </script>
  29. </head>
  30. <body style="overflow-y: hidden" scroll="no">
  31. <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" tiptype="1" action="${entityName?uncap_first}Controller.do?save">
  32. <input id="id" name="id" type="hidden" value="${'$'}{${entityName?uncap_first}Page.id }">
  33. <table cellpadding="0" cellspacing="1" class="formtable">
  34. <#list columns as po>
  35. <#if po_index%2==0>
  36. <tr>
  37. <#else>
  38. <#if !po_has_next>
  39. <tr>
  40. </#if>
  41. </#if>
  42. <td align="right"><label class="Validform_label"><#if po.filedComment?length lt 7 ><#if po.filedComment?length lt 7 >${po.filedComment}<#else>${po.filedComment[0..6]}</#if><#else>${po.filedComment[0..6]}</#if>:</label></td>
  43. <td class="value">
  44. <input nullmsg="请填写<#if po.filedComment?length lt 7 ><#if po.filedComment?length lt 7 >${po.filedComment}<#else>${po.filedComment[0..6]}</#if><#else>${po.filedComment[0..6]}</#if>" errormsg="<#if po.filedComment?length lt 7 ><#if po.filedComment?length lt 7 >${po.filedComment}<#else>${po.filedComment[0..6]}</#if><#else>${po.filedComment[0..6]}</#if>格式不对" <#if po.classType=='easyui-datetimebox'>class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="width: 150px"<#elseif po.classType=='easyui-datebox'>class="Wdate" onClick="WdatePicker()" style="width: 150px"<#else>class="${po.classType}"</#if> id="${po.fieldName}" name="${po.fieldName}" <#if po.nullable == 'Y'>ignore="ignore"</#if>
  45. <#if po.fieldType?index_of("time")!=-1> value="<fmt:formatDate value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}' type="date" pattern="yyyy-MM-dd hh:mm:ss"/>"<#else><#if po.fieldType?index_of("date")!=-1>value="<fmt:formatDate value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}' type="date" pattern="yyyy-MM-dd"/>"<#else>value="${'$'}{${entityName?uncap_first}Page.${po.fieldName}}"</#if></#if><#if po.optionType?trim?length !=0> datatype="${po.optionType}"</#if>>
  46. <span class="Validform_checktip"></span>
  47. </td>
  48. <#if (po_index+1)%2==0>
  49. </tr>
  50. <#else>
  51. <#if !po_has_next>
  52. </tr>
  53. </#if>
  54. </#if>
  55. </#list>
  56. </table>
  57. <div style="width: auto;height: 200px;">
  58. <%-- 增加一个div,用于调节页面大小,否则默认太小 --%>
  59. <div style="width:690px;height:1px;"></div>
  60. <t:tabs id="tt" iframe="false" tabPosition="top" fit="false">
  61. <#list subTab as sub>
  62. <t:tab href="${entityName?uncap_first}Controller.do?${sub.entityName?uncap_first}List<#list sub.foreignKeys as key><#if key?lower_case?index_of("${jeecg_table_id}")!=-1>&${jeecg_table_id}=${"$"}{${entityName?uncap_first}Page.${jeecg_table_id}}<#else>&${key?uncap_first}=${"$"}{${entityName?uncap_first}Page.${key?uncap_first}}</#if></#list>" icon="icon-search" title="${sub.ftlDescription}" id="${sub.entityName?uncap_first}"></t:tab>
  63. </#list>
  64. </t:tabs>
  65. </div>
  66. </t:formvalid>
  67. <!-- 添加 产品明细 模版 -->
  68. <table style="display:none">
  69. <#list subTab as sub>
  70. <tbody id="add_${sub.entityName?uncap_first}_table_template">
  71. <tr>
  72. <td align="center"><input style="width:20px;" type="checkbox" name="ck"/></td>
  73. <#list sub.subColums as po>
  74. <#assign check = 0 >
  75. <#list sub.foreignKeys as key>
  76. <#if fieldMeta[po.fieldName]==key?uncap_first>
  77. <#assign check = 1 >
  78. <#break>
  79. </#if>
  80. </#list>
  81. <#if check==0>
  82. <td align="left"><input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" maxlength="${po.charmaxLength}" type="text" style="width:120px;"></td>
  83. </#if>
  84. </#list>
  85. </tr>
  86. </tbody>
  87. </#list>
  88. </table>
  89. </body>