<?xml version="1.0" encoding="UTF-8"?> <!-- $Author: wangwei5743 $Date: 2015-11-18 下午3:43:19 $Revision: 1.0 $Purpose: 借款合同查询 --> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true"> <a:init-procedure/> <a:view> <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="tre_interbank_borrowing_maintain_link_id" url="${/request/@context_path}/modules/tre/tre503/tre_interbank_borrowing_maintain.lview"/> <a:link id="tre_working_capital_loan_maintain_link_id" url="${/request/@context_path}/modules/tre/tre503/tre_working_capital_loan_add.lview"/> <a:link id="tre_factoring_contract_maintain_link_id" url="${/request/@context_path}/modules/tre/tre503/tre_factoring_contract_maintain.lview"/> <a:link id="tre_entrustment_loan_contract_maintain_link_id" url="${/request/@context_path}/modules/tre/tre503/tre_entrustment_loan_contract_maintain.lview"/> <a:link id="tre_other_contract_maintain_link_id" url="${/request/@context_path}/modules/tre/tre503/tre_other_contract_maintain.lview"/> <a:link id="tre_loan_contract_add_link_id" url="${/request/@context_path}/modules/tre/tre503/tre_loan_contract_add.lview"/> <a:link id="tre_factoring_contract_add_maintain_lind_id" url="${/request/@context_path}/modules/tre/tre503/tre_factoring_contract_add.lview"/> <a:link id="tre_factoring_contract_modify_detail_link_id" url="${/request/@context_path}/modules/tre/tre503/tre_factoring_contract_add.lview"/> <a:link id="tre503_closed_link" model="tre.tre503.tre503_closed_active" modelaction="update"/> <a:link id="tre503_active_link" model="tre.tre503.tre503_closed_active" modelaction="execute"/> <a:link id="tre_loan_contract_status_link_id" url="${/request/@context_path}/modules/tre/tre503/tre_loan_contract_open.lview"/> <a:link id="tre_get_status_id" url="${/request/@context_path}/modules/tre/tre503/tre_get_status.lview"/> <script type="text/javascript"><![CDATA[ function open_loan_contract_create_win(ds_id) { var param = {}; param['function_code'] = 'TRE503F'; // param['default_value_dsid'] = ds_id; // param['pre_layout_code'] = '${/parameter/@layout_code}'; param['function_usage'] = 'CREATE'; param['url_title'] = '借款合同明细'; param['winid'] = 'tre503d_create_loan_contract_detail_winid'; hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'tre_loan_contract_add_link_id', ds_id); } //新增按钮 window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'tre_loan_contract'); //var record = $(ds_id).getAt(0); open_loan_contract_create_win(ds_id); }; //关闭按钮 window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'tre_loan_contract'); var record = $(ds_id).getCurrentRecord(); if (!$(ds_id).getSelected().length) { Leaf.showMessage('${l:HLS.PROMPT}', '请选择数据!'); return; } Leaf.Masker.mask(Ext.getBody()); if (record.get('loan_con_wfl_status') == 'WFL_NEW') { Leaf.showConfirm('${l:PROMPT}', '确认关闭?', function() { Leaf.request({ url: $('tre503_closed_link').getUrl(), para: { loan_contract_id: record.get('loan_contract_id') }, success: function(res) { Leaf.SideBar.show({ msg: '${l:HLS.SUBMIT_SUCCESS}', duration: 2000 }); $(ds_id).query(); Leaf.Masker.unmask(Ext.getBody()); }, failure: function() { Leaf.Masker.unmask(Ext.getBody()); }, error: function() { Leaf.Masker.unmask(Ext.getBody()); }, scope: this }); }, function() { Leaf.Masker.unmask(Ext.getBody()); }); } else { Leaf.showMessage('提示', '只有新建的单据才能关闭!'); Leaf.Masker.unmask(Ext.getBody()); return; } }; //激活按钮 window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function() { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'tre_loan_contract'); var record = $(ds_id).getCurrentRecord(); if (!$(ds_id).getSelected().length) { Leaf.showMessage('${l:HLS.PROMPT}', '请选择数据!'); return; } Leaf.Masker.mask(Ext.getBody()); if (record.get('loan_con_wfl_status') == 'CLOSED') { Leaf.showConfirm('${l:PROMPT}', '确认激活?', function() { Leaf.request({ url: $('tre503_active_link').getUrl(), para: { loan_contract_id: record.get('loan_contract_id') }, success: function(res) { Leaf.SideBar.show({ msg: '${l:HLS.SUBMIT_SUCCESS}', duration: 2000 }); $(ds_id).query(); Leaf.Masker.unmask(Ext.getBody()); }, failure: function() { Leaf.Masker.unmask(Ext.getBody()); }, error: function() { Leaf.Masker.unmask(Ext.getBody()); }, scope: this }); }, function() { Leaf.Masker.unmask(Ext.getBody()); }); } else { Leaf.showMessage('提示', '只有关闭的单据才能激活!'); Leaf.Masker.unmask(Ext.getBody()); return; } }; function loan_contract_number(id, name, query_only) { var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var loan_contract_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'tre_loan_contract'); var param = {}; if (record.get('loan_contract_status') == 'COMPLETED') { param['loan_contract_id'] = record.get('loan_contract_id'); param['function_code'] = 'TRE503F'; param['function_usage'] = 'QUERY'; } else { param['function_code'] = 'TRE503F'; param['loan_contract_id'] = record.get('loan_contract_id'); param['function_usage'] = 'MODIFY'; } //param['document_category'] = record.get('document_category'); //param['document_type'] = record.get('document_type'); //param['document_type_2nd'] = record.get('document_type'); param['url_title'] = '借款明细'; param['winid'] = 'tre503d_tre_loan_contract_modify_winid'; hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'tre_loan_contract_add_link_id', loan_contract_id); } //超链接渲染 window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) { var link_function = ''; window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record; if (name == 'loan_contract_number' && !record.isNew) { link_function = 'loan_contract_number'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>'; } }; window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) { //查询权限 var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'tre_loan_contract'); if (ds == $(ds_id)) { aut_authority_list_validate_query(ds, qpara); } }; //融资合同维护按钮 window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'tre_loan_contract'); var record = $(ds_id).getCurrentRecord(); var param = {}; param['loan_contract_id'] = record.get('loan_contract_id'); param['function_code'] = 'TRE503P'; param['function_usage'] = 'UPDATE'; param['url_title'] = '融资合同维护'; param['screen_width'] = 400; param['screen_height'] = 300; //param['pre_layout_code'] = '${/parameter/@layout_code}'; param['winid'] = 'tre503p_loan_contract_status_winid'; //param['pre_layout_code'] = '${/parameter/@layout_code}'; //param['document_category'] = record.get('document_category'); //param['document_type'] = record.get('document_type'); hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'tre_loan_contract_status_link_id', ds_id); }; //合同状态更改记录 window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function() { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'tre_loan_contract'); var record = $(ds_id).getSelected()[0]; var param = {}; param['function_code'] = 'TRE503Q'; param['function_usage'] = 'QUERY'; param['url_title'] = '借款合同状态更改记录'; param['loan_contract_id'] = record.get('loan_contract_id'); param['winid'] = 'tre503q_tre_loan_contract_modify_winid'; hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'tre_get_status_id', ds_id); }; ]]></script> <a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=LOAN_CONTRACT&function_code=TRE503"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> </a:view> </a:screen>