| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/context/mytags.jsp"%>
- <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
- <#include "../../ui/datatype.ftl"/>
- <#include "../../ui/dictInfo.ftl"/>
- <#-- update--end--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
- <script type="text/javascript">
- $('#add${entityName}Btn').linkbutton({
- iconCls: 'icon-add'
- });
- $('#del${entityName}Btn').linkbutton({
- iconCls: 'icon-remove'
- });
- $('#add${entityName}Btn').bind('click', function(){
- var tr = $("#add_${entityName?uncap_first}_table_template tr").clone();
- $("#add_${entityName?uncap_first}_table").append(tr);
- resetTrNum('add_${entityName?uncap_first}_table');
- return false;
- });
- $('#del${entityName}Btn').bind('click', function(){
- $("#add_${entityName?uncap_first}_table").find("input:checked").parent().parent().remove();
- resetTrNum('add_${entityName?uncap_first}_table');
- return false;
- });
- $(document).ready(function(){
- $(".datagrid-toolbar").parent().css("width","auto");
- if(location.href.indexOf("load=detail")!=-1){
- $(":input").attr("disabled","true");
- $(".datagrid-toolbar").hide();
- }
- <#-- update--begin--author:zhangjiaqiang date:20170614 for:去除表头固定功能 -->
- <#-- //将表格的表头固定
- $("#${entityName?uncap_first}_table").createhftable({
- height:'300px',
- width:'auto',
- fixFooter:false
- }); -->
- <#-- update--end--author:zhangjiaqiang date:20170614 for:去除表头固定功能 -->
- });
- </script>
- <div style="padding: 3px; height: 25px;width:auto;" class="datagrid-toolbar">
- <a id="add${entityName}Btn" href="#">添加</a> <a id="del${entityName}Btn" href="#">删除</a>
- </div>
- <table border="0" cellpadding="2" cellspacing="0" id="${entityName?uncap_first}_table">
- <tr bgcolor="#E6E6E6">
- <td align="center" bgcolor="#EEEEEE" style="width: 25px;">序号</td>
- <td align="center" bgcolor="#EEEEEE" style="width: 25px;">操作</td>
- <#list pageColumns as po>
- <#assign check = 0 >
- <#list foreignKeys as key>
- <#if fieldMeta[po.fieldName]==key?uncap_first>
- <#assign check = 1 >
- <#break>
- </#if>
- </#list>
- <#if check==0>
- <td align="left" bgcolor="#EEEEEE" style="width: 126px;">
- ${po.content}
- </td>
- </#if>
- </#list>
- </tr>
- <tbody id="add_${entityName?uncap_first}_table">
- <#-- --author: jg_renjie ------start----date:20160328-------for: #1004 [代码生成器] coding生成一对多代码多个bug和解决办法 -->
- <c:if test="${"$"}{fn:length(${entityName?uncap_first}List) <= 0 }">
- <tr>
- <td align="center"><div style="width: 25px;" name="xh">1</div></td>
- <td align="center"><input style="width:20px;" type="checkbox" name="ck"/></td>
- <#list columns as po>
- <#if po.isShow=="N">
- <input name="${entityName?uncap_first}List[0].${po.fieldName}" type="hidden"/>
- </#if>
- </#list>
- <#list pageColumns as po>
- <#assign check = 0 >
- <#list foreignKeys as key>
- <#if fieldMeta[po.fieldName]==key?uncap_first>
- <#assign check = 1 >
- <#break>
- </#if>
- </#list>
- <#if check==0>
- <td align="left">
- <#if po.showType == "text">
- <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />>
- <#elseif po.showType=='password'>
- <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="password" class="inputxt" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />>
- <#elseif po.showType=='radio' || po.showType=='select' || po.showType=='checkbox' || po.showType=='list'>
- <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>
- <#elseif po.showType=='date'>
- <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="Wdate" onClick="WdatePicker()" style="width:120px;" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/>>
- <#elseif po.showType=='datetime'>
- <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'})" style="width:120px;" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/>>
- <#elseif po.showType=='file' || po.showType == 'image'>
- <input type="hidden" id="${entityName?uncap_first}List[0].${po.fieldName}" name="${entityName?uncap_first}List[0].${po.fieldName}" />
- <a target="_blank" id="${entityName?uncap_first}List[0].${po.fieldName}_href">未上传</a>
- <br>
- <input class="ui-button" type="button" value="上传附件" onclick="commonUpload(commonUploadDefaultCallBack,'${entityName?uncap_first}List\\[0\\]\\.${po.fieldName}')"/>
- <#else>
- <input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> >
- </#if>
- <label class="Validform_label" style="display: none;">${po.content?if_exists?html}</label>
- </td>
- </#if>
- </#list>
- </tr>
- </c:if>
- <#-- --author: jg_renjie ------end----date:20160328-------for: #1004 [代码生成器] coding生成一对多代码多个bug和解决办法 -->
- <c:if test="${"$"}{fn:length(${entityName?uncap_first}List) > 0 }">
- <c:forEach items="${"$"}{${entityName?uncap_first}List}" var="poVal" varStatus="stuts">
- <tr>
- <td align="center"><div style="width: 25px;" name="xh">${'$'}{stuts.index+1 }</div></td>
- <td align="center"><input style="width:20px;" type="checkbox" name="ck" /></td>
- <#list columns as po>
- <#if po.isShow=="N">
- <input name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" type="hidden" value="${'$'}{poVal.${po.fieldName} }"/>
- </#if>
- </#list>
- <#list pageColumns as po>
- <#assign check = 0 >
- <#list foreignKeys as key>
- <#if fieldMeta[po.fieldName]==key?uncap_first>
- <#assign check = 1 >
- <#break>
- </#if>
- </#list>
- <#if check==0>
- <td align="left">
- <#if po.showType == "text">
- <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
- <input name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value="${'$'}{poVal.${po.fieldName} }"/>
- <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
- <#elseif po.showType=='password'>
- <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
- <input name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" maxlength="${po.length?c}" type="password" class="inputxt" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value="${'$'}{poVal.${po.fieldName} }"/>
- <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
- <#elseif po.showType=='radio' || po.showType=='select' || po.showType=='checkbox' || po.showType=='list'>
- <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
- <t:dictSelect field="${entityName?uncap_first}List[${'$'}{stuts.index }].${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="${'$'}{poVal.${po.fieldName} }" hasLabel="false" title="${po.content}"></t:dictSelect>
- <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
- <#elseif po.showType=='date'>
- <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
- <input name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" maxlength="${po.length?c}" type="text" class="Wdate" onClick="WdatePicker()" style="width:120px;" <@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"/>"/>
- <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
- <#elseif po.showType=='datetime'>
- <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
- <input name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" maxlength="${po.length?c}" type="text" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="width:120px;" <@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"/>"/>
- <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
- <#-- update--begin--author:zhangjiaqiang date:20170531 for:增加图片和文件的支持 -->
- <#elseif po.showType=='file' || po.showType == 'image'>
- <#-- update--end--author:zhangjiaqiang date:20170531 for:增加图片和文件的支持 -->
- <input type="hidden" id="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" value="${'$'}{poVal.${po.fieldName} }"/>
- <c:if test="${'$'}{empty poVal.${po.fieldName}}">
- <a target="_blank" id="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}_href">未上传</a>
- </c:if>
- <c:if test="${'$'}{!empty poVal.${po.fieldName}}">
- <a href="${'$'}{poVal.${po.fieldName}}" target="_blank" id="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}_href">下载</a>
- </c:if>
- <br>
- <input class="ui-button" type="button" value="上传附件"
- onclick="commonUpload(commonUploadDefaultCallBack,'${entityName?uncap_first}List\\[${'$'}{stuts.index }\\]\\.${po.fieldName}')"/>
- <#else>
- <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
- <input name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> value="${'$'}{poVal.${po.fieldName} }"/>
- <#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
- </#if>
- <label class="Validform_label" style="display: none;">${po.content?if_exists?html}</label>
- </td>
- </#if>
- </#list>
- </tr>
- </c:forEach>
- </c:if>
- </tbody>
- </table>
|