<?xml version="1.0" encoding="UTF-8"?> <!-- $Author: xuls $Date: 2016-12-8 下午1:42:02 $Revision: 1.0 $Purpose: --> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"> <a:init-procedure/> <a:view> <a:link id="ccb301_create_ccb_document_link" model="ccb.ccb301.ctr_receivables_ccb" modelaction="execute"/> <a:link id="ccb301_create_acr_link" model="ccb.ccb301.create_acr_transaction" modelaction="execute"/> <a:link id="ccb301_create_transaction_link" model="ccb.ccb301.ccb_transaction_job" modelaction="execute"/> <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'], 'hls_ebank_ccb_transaction'); var tra_ds_id = $(ds_id); var records = tra_ds_id.getSelected(); if (records.length != 1) { Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}'); return; } var record = records[0]; var detail_mask = Ext.getBody(); var confirm_win = Leaf.showConfirm('${l:PROMPT}', '是否确认生成生成代扣单', function() { Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}'); Leaf.request({ url: $('ccb301_create_ccb_document_link').getUrl(), para: {}, success: function(res) { parent.Leaf.SideBar.enable = true; parent.Leaf.SideBar.show({ msg: '${l:HLS.SUBMIT_SUCCESS}', duration: 2000 }); Leaf.Masker.unmask(detail_mask); }, error: function(res) { Leaf.Masker.unmask(detail_mask); }, faliure: function() { Leaf.Masker.unmask(detail_mask); }, scope: this }); }, function(res) {}); }; /*创建交易事务*/ window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_ebank_ccb_transaction'); var tra_ds_id = $(ds_id); var detail_mask = Ext.getBody(); var confirm_win = Leaf.showConfirm('${l:PROMPT}', '是否确认生成交易事务', function() { Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}'); Leaf.request({ url: $('ccb301_create_transaction_link').getUrl(), para: {}, success: function(res) { parent.Leaf.SideBar.enable = true; parent.Leaf.SideBar.show({ msg: '${l:HLS.SUBMIT_SUCCESS}', duration: 2000 }); tra_ds_id.query(); Leaf.Masker.unmask(detail_mask); }, error: function(res) { Leaf.Masker.unmask(detail_mask); }, faliure: function() { Leaf.Masker.unmask(detail_mask); }, scope: this }); }, function(res) {}); }; /*创建收款*/ window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_ebank_ccb_transaction'); var tra_ds_id = $(ds_id); var records = tra_ds_id.getSelected(); if (records.length != 1) { Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}'); return; } var record = records[0]; var detail_mask = Ext.getBody(); var confirm_win = Leaf.showConfirm('${l:PROMPT}', '是否确认创建收款', function() { Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}'); Leaf.request({ url: $('ccb301_create_acr_link').getUrl(), para: { transaction_id : record.get('transaction_id') }, success: function(res) { parent.Leaf.SideBar.enable = true; parent.Leaf.SideBar.show({ msg: '${l:HLS.SUBMIT_SUCCESS}', duration: 2000 }); tra_ds_id.query(); Leaf.Masker.unmask(detail_mask); }, error: function(res) { Leaf.Masker.unmask(detail_mask); }, faliure: function() { Leaf.Masker.unmask(detail_mask); }, scope: this }); }, function(res) {}); }; ]]></script> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> </a:view> </a:screen>