<?xml version="1.0" encoding="UTF-8"?>
<!--
  create by nyl  2014-12-3 
  for contract context create
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
    <a:init-procedure>
        <a:model-query defaultWhereClause="t1.function_code = ${/parameter/@function_code}" model="cus.CUS100.cus_default_function_name" rootPath="default_function_name"/>
    </a:init-procedure>
    <a:view>
        <a:link id="con638_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <script type="text/javascript"><![CDATA[
            //导出
            window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
            
                var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
                var contract_id = $(ds_id).getAt(0).get('contract_id');
                /* var grid_id = ds_id.replace('ds', 'layout_grid_id');
               
                $(grid_id)._export('xls','${/model/default_function_name/record/@function_name}');
            
            	 */
            	 var birt_url = '${/request/@context_path}/reports?__report=reports/leg/' + 'penalty_excel_report.rptdesign' + '&&__format=xls&&contract_id='+contract_id;
	             window.open(birt_url);
            };
            
           
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>
