| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <#--多记录表的固定表头和扩展表头的输出方式基本一样,所以先先定义个表头宏,简化代码 -->
- <#-- 输出列标题 函数-->
- <#macro GLT_COL v_head_row isFixed>
- <#list v_head_row as col><#--列数据生成 -->
- <th nowrap="nowrap" rowspan=${col.rowspan!1} colspan=${col.colspan!1} <#if col.align??> _al=${col.align}</#if> sortable=${col.sortable!'true'}
- <#if col.width??>style="width=${col.width}" width="${col.width}"</#if> <#if (col.lastRowIndex??)>lastRowIndex="${col.lastRowIndex}" </#if>
- <#if isFixed>class=fwdatagrid-th-fixed<#else>class=fwdatagrid-th</#if>
- <#if col.checkbox??> style="text-align:left;padding-left:2px"</#if> >
-
- <#if !(col.lastRowIndex??)><#--标题组生成方式 -->
- <#if col.checkbox??><#--生成checkbox -->
- <input type=checkbox class=fwdatagrid-header-check>
- <#else>
- ${col.title!""}
- </#if>
- <#else><#--非标题组生成方式 -->
- <#if col.checkbox??><#--生成checkbox -->
- <input type=checkbox class=fwdatagrid-header-check>
- <#else>
- <div class=fwdatagrid-div onMouseDown="_FW.oFtl.fnMouseDownToResize(this,'${parameters.id}_table');" onMouseMove="_FW.oFtl.fnMouseMoveToResize(this,'${parameters.id}_table');" onMouseUp="_FW.oFtl.fnMouseUpToResize(this);">
- ${col.title!""}
- <span class=fwdatagrid-sort-icon> </span>
- </div>
- </#if>
- </#if>
-
- </th>
- </#list>
- </#macro>
- <#macro GLT_HEADER v_head_fixed,v_head_colHead>
- <#if ((v_head_fixed?size) > 1 || (v_head_colHead?size) > 1 )>
- <#-- 含有分组标题的情形先要拼第一行 -->
- <tr class=fwdatagrid-header-group >
- <th nowrap="nowrap" class=fwdatagrid-th-rownum-top> </th>
- <#list v_head_fixed as row>
- <@GLT_COL row true />
- <#break>
- </#list>
-
- <#list v_head_colHead as row>
- <@GLT_COL row false/>
- <#break>
- </#list>
- </tr>
-
- <#-- 拼第二行 -->
- <tr class=fwdatagrid-header-tr>
- <th nowrap="nowrap" class=fwdatagrid-th-rownum-bottom> </th>
- <#list v_head_fixed as row>
- <#if (row_index >0) >
- <@GLT_COL row true/>
- </#if>
- </#list>
-
- <#list v_head_colHead as row>
- <#if (row_index >0) >
- <@GLT_COL row false />
- </#if>
- </#list>
- </tr>
-
- <#else>
- <tr class=fwdatagrid-header-tr style="height:${parameters.options.headerHeight!"20"}px;">
- <th nowrap="nowrap" >序号</th>
- <#list v_head_fixed as row>
- <@GLT_COL row true/>
- <#break>
- </#list>
-
- <#list v_head_colHead as row>
- <@GLT_COL row false/>
- <#break>
- </#list>
- </tr>
- </#if>
-
- </#macro>
- <#-- 开始生成多记录表脚本-->
- <!--外层 bg_set start-->
- <div class="bg_set">
- <#if parameters.hasTitle!true >
- <fieldset class="fieldset2" align="center" style="cursor:default;width:${parameters.width!"100%"}" >
- <legend class="legend" style="cursor:hand;" >
- <span onclick="_FW.oFtl.fnShowTable('img_${parameters.id}_grid','${parameters.id}')" >
- <img id="img_${parameters.id}_grid" src="${request.contextPath}/themes/default/images/query_icon_right.gif">
- </span>
- <span title="单击展开或收缩" onclick="_FW.oFtl.fnShowTable('img_${parameters.id}_grid','${parameters.id}')">
- ${parameters.title!(parameters.glt.title!'')}
- </span>
- </legend>
- </#if>
- <div align="left" id="${parameters.id}" > <!-- `by hemeixiu` style="width:100%" -->
- <div class="fwdatagrid"><!--`by hemeixiu` style="height:${parameters.options.height}px;" --> <!-- 整个grid的外层 -->
- <div class="fwdatagrid-wrap" > <!-- 整个grid的覆盖区 -->
- <#assign buildPage=(parameters.options.hasPage||(parameters.options.expbtn?length!"")>0) >
- <#if (["TOP","BOTH"]?seq_contains(parameters.pageAlign!"BOTTOM"))&&buildPage >
- <div class="fwdatagrid-pager"></div><!-- 整个grid的分页区 -->
- </#if>
- <div class="fwdatagrid-view" > <!-- 整个grid的数据区 -->
- <table border=0 cellspacing=0 cellpadding=0 width=100% id="${parameters.id}_table">
- <thead>
- <@GLT_HEADER parameters.glt.fixHead![] parameters.glt.colHead![] />
- </thead>
- <tbody>
- </tbody>
- </table>
- <div class="fwdatagrid-resize-proxy"> </div>
- </div>
- <#if (["BOTTOM","BOTH"]?seq_contains(parameters.pageAlign!"BOTTOM"))&&buildPage >
- <div class="fwdatagrid-pager"></div><!-- 整个grid的分页区 -->
- </#if>
- </div>
- </div>
- <input type="hidden" name="_multiple" />
- </div>
- <#if parameters.hasTitle!true >
- </fieldset>
- </#if>
- </div><!--外层 bg_set end-->
- <br/>
- <!-- 工作流 接收人 window-->
- <div id="accepterWindow" class="window" style="display:none" >
- <div id="div_acts">
-
- </div>
- <div id="wfDialogBtn" class="wfDialogBtn" >
- <a class="buttonlink" keycomb="" href="javascript:void(0);" id="btn_cancel">取消</a>
- <a class="buttonlink" keycomb="" href="javascript:void(0);" id="btn_ok">确定</a>
- </div>
- </div>
- <!-- 流程图展示window ,配合wf.js中的 wfPlay()方法是用-->
- <div id="playWindow" style="display:none;">
- <iframe id="mainContent" src="" style="width: 100%;border: none;height:750px;" scrolling="yes">
- </iframe>
- </div>
- <#-- 生成多记录表对应js脚本的区域-->
- <script language="javascript">
- $(function(){
- if($(${parameters.id}).data('_init')){return;}
- //标志已经初始化,无需重新初始化
- $(${parameters.id}).data('_init',true);
- <#if !(parameters.showContent!true)>
- _FW.oFtl.fnShowTable('img_${parameters.id}_grid','${parameters.id}');
- </#if>
- $("#${parameters.id}").fwdatagrid(${tojson(parameters.options)});
- });
- </script>
|