<?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:view> <a:link id="con638_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="cus100_excel_export_link" url="${/request/@context_path}/modules/cus/CUS100/cus_con_gps_notice_print.lsc"/> <a:link id="cus100_gps_notice_print_link_id" model="cus.CUS100.cus_con_gps_notice_print" modelaction="update"/> <script type="text/javascript"><![CDATA[ function print() { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'cus_con_contract_gps'); var record = $(ds_id).getCurrentRecord(); var contract_id = record.get('contract_id'); var contract_number = record.get('contract_number'); var file_name = 'GPS通知函' + contract_number; var url = $('cus100_excel_export_link').getUrl() + '?contract_id=' + contract_id + '&file_name=' + file_name + '&templt_name=' + 'cus_gps_notice.xml'; window.open(url); } //GPS window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'cus_con_contract_gps'); var record = $(ds_id).getCurrentRecord(); record.set('_status', 'update'); window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'](); Leaf.request({ url: $('cus100_gps_notice_print_link_id').getUrl(), para: record.data, success: function(res) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); Leaf.SideBar.show({ msg: '${l:HLS.SUBMIT_SUCCESS}', duration: 2000 }); print(); }, failure: function() { window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); }, error: function() { window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); }, sync: true, scope: this }); }; ]]></script> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> </a:view> </a:screen>