<?xml version="1.0" encoding="UTF-8"?> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true"> <a:view> <a:link id="check_gps_visit_link" model="hls.HLS051.check_gps_visit" modelaction="execute"/> <a:link id="con731_quote_link" url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_update_n.lview"/> <a:link id="con731_hls_bp_master_create_entrance_link" url="${/request/@context_path}/modules/hls/HLS213N/hls_bp_master_entrance_con.lview"/> <a:link id="con731_hls_bp_master_modify_link" url="${/request/@context_path}/modules/cont/CON501N/hls_bp_master_modify.lview"/> <a:link id="con731_contract_lease_item_query_link" url="${/request/@context_path}/modules/cont/CON504/con_lease_item_query.lview"/> <a:link id="con731_quote_calc_link" model="cont.CON731.calc_change_req" modelaction="execute"/> <a:link id="con731_calc_change_data_link" model="cont.CON731.calc_ccr_data" modelaction="execute"/> <a:link id="con731_submit_link" model="cont.CON731.submit_change_req" modelaction="execute"/> <a:link id="con733_submit_link" model="cont.CON731.submit_change_req" modelaction="update"/> <a:link id="con731_cancel_link" model="cont.CON731.cancel_change_req" modelaction="execute"/> <a:link id="con505_hls_bp_master_modify_link" url="${/request/@context_path}/modules/cont/CON505/hls_bp_master_query.lview"/> <a:link id="attachment_uploadFile_link" url="${/request/@context_path}/uploadFile.lview"/> <a:link id="hls_standard_history_link" url="${/request/@context_path}/modules/cont/CON380/hls_standard_histiory_layout_query.lview"/> <a:link id="hls_change_history_link" url="${/request/@context_path}/modules/cont/CON642N/hls_ccr_modify_histiory_query.lview"/> <a:link id="hls_change_history_paycard_link" url="${/request/@context_path}/modules/cont/CON732/hls_ccr_modify_histiory_paycard_query.lview"/> <a:link id="con731_item_detail_maintain" url="${/request/@context_path}/modules/cont/CON501N/con_item_detail_maintain.lview"/> <a:link id="con731_item_detail_query" url="${/request/@context_path}/modules/cont/CON501N/con_item_detail_query.lview"/> <a:link id="attachment_et_link" model="cont.CON731.check_change_req_attachment" modelaction="update"/> <a:link id="${/parameter/@layout_code}_prj500_cdd_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/> <a:link id="${/parameter/@layout_code}_prj500_cdd_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/> <a:link id="hls_doc_file_print_confirm" url="${/request/@context_path}/modules/hls/HLS811/hls_doc_file_print_con_confirm.lview"/> <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/> <script type="text/javascript"><![CDATA[ Ext.ux.Lightbox.register('a[ref=img]', true); window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function() { var req_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var req_record = $(req_ds_id).getAt(0); var calc_session_id = req_record.get('calc_session_id'); var quo_win; var calc_type = '${/parameter/@calc_type}'; var document_category = req_record.get('document_category'); var change_document_type = req_record.get('change_document_type'); if ($(req_ds_id).validate()) { if (req_record.dirty) { Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}'); return; } if (!calc_session_id) { window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); Leaf.request({ url: $('con731_quote_calc_link').getUrl(), para: { change_req_id: ${/parameter/@change_req_id}, calc_session_id: calc_session_id }, success: function(res) { req_record.set('calc_session_id', res.result.calc_session_id); req_record.dirty = false; quo_win = new Leaf.Window({ id: '${/parameter/@layout_code}_hls_fin_calc_quotation_link_winid', params: { document_id: ${/parameter/@change_req_id}, document_category: document_category, maintain_type: 'UPDATE', calc_session_id: res.result.calc_session_id, quotation_id: null, dsId: req_ds_id, winId: '${/parameter/@layout_code}_hls_fin_calc_quotation_link_winid', global_flag: 'Y', id_num: 0, calc_type: '${/parameter/@calc_type}', recreate_L_formula: 'N' }, url: $('con731_quote_link').getUrl(), fullScreen: true, draggable: true }); quo_win.addListener('close', function() { $(req_ds_id).query(); }); window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); }, 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'](); }, scope: this }); } else { quo_win = new Leaf.Window({ id: '${/parameter/@layout_code}_hls_fin_calc_quotation_link_winid', params: { document_id: ${/parameter/@change_req_id}, document_category: document_category, maintain_type: 'UPDATE', calc_session_id: calc_session_id, quotation_id: null, dsId: req_ds_id, winId: '${/parameter/@layout_code}_hls_fin_calc_quotation_link_winid', global_flag: 'Y', id_num: 0, calc_type: '${/parameter/@calc_type}', recreate_L_formula: 'N' }, url: $('con731_quote_link').getUrl(), fullScreen: true, draggable: true }); quo_win.addListener('close', function() { $(req_ds_id).query(); }); } } }; window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() { var con_bp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_bp'); var param = {}; param['function_code'] = 'HLS_213N_CON_CHANGE'; param['function_usage'] = 'UPDATE'; param['maintain_type'] = 'UPDATE'; param['url_title'] = '新增商业伙伴'; hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con731_hls_bp_master_create_entrance_link', con_bp_ds_id, '${/parameter/@layout_code}'); // var con_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); // var record = $(con_id).getAt(0); // new Leaf.Window({ // id: 'hls_standard_history_link_window', // url: $('hls_standard_history_link').getUrl(), // params: { // source_table: 'CON_CONTRACT', // source_table_pk_value: record.get('contract_id'), // winid: 'contract_lease_item_maintain_window' // }, // width: 530, // height: 400, // draggable: true // }); }; /* window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() { var con_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var record = $(con_id).getAt(0); new Leaf.Window({ id: 'hls_standard_history_link_window', url: $('hls_standard_history_link').getUrl(), params: { source_table: 'CON_CONTRACT', source_table_pk_value: record.get('contract_id'), winid: 'contract_lease_item_maintain_window' }, width: 530, height: 400, draggable: true }); }; */ //变更信息查看 window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() { var con_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item'); var record = $(con_id).getAt(0); new Leaf.Window({ id: 'hls_standard_history_link_window', url: $('hls_change_history_link').getUrl(), params: { contract_id: record.get('contract_id') }, width: 1250, height: 180, draggable: true }); }; window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function() { var con_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var record = $(con_id).getCurrentRecord(); if (Ext.isEmpty(record)) { Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); return; } if (Ext.isEmpty(record.get('contract_id'))) { Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); return; } var document_id = record.get('contract_id'); new Leaf.Window({ id: '${/parameter/@layout_code}_con_contract_content_confirm_win_id', params: { document_id: document_id, document_table: 'CON_CONTRACT' }, url: $('hls_doc_file_print_confirm').getUrl(), title: '合同文本生成', width: 1300, height: 550 }); }; window['${/parameter/@layout_code}_user_button5_layout_dynamic_click'] = function() { var con_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var lease_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_lease_item'); var record = $(con_id).getCurrentRecord(); var lease_record = $(lease_ds_id).getCurrentRecord(); if ($(con_id).validate()) { if (record.dirty || lease_record.dirty) { Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}'); return; } Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS.ARE_YOU_SURE_TO_SUBMIT}', function() { window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'](); Leaf.request({ url: $('con733_submit_link').getUrl(), para: { change_req_id: ${/parameter/@change_req_id} }, success: function(res) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); $('${/parameter/@winid}').close(); }, 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'](); }, scope: this }); }); }; } window['${/parameter/@layout_code}_open_lease_item_detail_window'] = function(id, name) { var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var param = record.data; var contract_lease_item_id = record.get('contract_lease_item_id'); var con_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var con_record = $(con_id).getAt(0); var change_document_type = con_record.get('change_document_type'); if (change_document_type == 'CBCHAG') { param['function_code'] = 'CON501M'; param['function_usage'] = 'MODIFY'; param['url_title'] = '租赁物明细维护'; hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con731_item_detail_maintain', record.ds.id, '${/parameter/@layout_code}'); } else { param['function_code'] = 'CON501Q'; param['function_usage'] = 'QUERY'; param['url_title'] = '租赁物明细查询'; hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con731_item_detail_query', record.ds.id, '${/parameter/@layout_code}'); } }; window['${/parameter/@layout_code}_open_bp_detail_window'] = function(id, name) { var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name]; var param = record.data; var con_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract'); var con_record = $(con_id).getAt(0); var change_document_type = con_record.get('change_document_type'); if (change_document_type == 'CBCHAG') { param['function_code'] = 'CON501H'; param['function_usage'] = 'MODIFY'; param['dynamic_source_table'] = 'CON_CONTRACT'; param['dynamic_source_table_pk_value'] = con_record.get('contract_id'); param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}'; hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con731_hls_bp_master_modify_link', record.ds.id, '${/parameter/@layout_code}'); } else { param['function_code'] = 'CON505H'; param['function_usage'] = 'QUERY'; param['dynamic_source_table'] = 'CON_CONTRACT'; param['dynamic_source_table_pk_value'] = con_record.get('contract_id'); param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}'; hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con505_hls_bp_master_modify_link', record.ds.id, '${/parameter/@layout_code}'); } }; window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() { Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认取消变更?', function() { window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'](); Leaf.request({ url: $('con731_cancel_link').getUrl(), para: { change_req_id: ${/parameter/@change_req_id} }, success: function(res) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); $('${/parameter/@winid}').close(); }, 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'](); }, scope: this }); }); }; window['${/parameter/@layout_code}_upload_layout_dynamic_click'] = function() { var header_id = '${/parameter/@change_req_id}'; var url = $('attachment_uploadFile_link').getUrl() + '?table_name=CON_CONTRACT&header_id=' + header_id; var win = new Leaf.Window({ url: url, title: '${l:HLS.SUPPORTING_DOCUMENT}', id: 'change_req_uploadFile_id', width: 850, height: 400 }); win.on('close', function() {}); }; //////附件上传 //////应张文要求增加附件上传 window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record, bp_seq) { var link_function = ''; window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record; if (name == 'bp_link' && record.get('bp_id') && record.get('record_id')) { link_function = '${/parameter/@layout_code}_open_bp_detail_window'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>'; } else if (name == 'car_detail' && record.get('contract_lease_item_id')) { link_function = '${/parameter/@layout_code}_open_lease_item_detail_window'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>'; } else if (name == 'attachment') { link_function = '${/parameter/@layout_code}_prj500_cdd_attachtment_upload'; return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } else if (name == 'attach_file_name') { if (value != null) { var link = '${/request/@context_path}/atm_download.lsc?attachment_id='; var str = value.split(';;'); var url = ''; for (var i = 0;i < str.length;i++) { var temp = str[i].split('--'); if (!Leaf.isEmpty(temp[0])) { var file_suffix = temp[0].substr(temp[0].lastIndexOf('.') + 1).toUpperCase(); if (file_suffix == 'BMP' || file_suffix == 'JPG' || file_suffix == 'JPEG' || file_suffix == 'PNG' || file_suffix == 'GIF') { url = url + '<a ref="img" href=' + link + temp[1] + '>' + temp[0] + '</a>' + ','; } else { url = url + '<a href=' + link + temp[1] + '>' + temp[0] + '</a>' + ','; } } } return url; } } else if (name == 'description') { if (record.get('important_flag') == 'Y') { return '<font color="RED">' + value + '</font>'; } return value; } else if (name == 'link1') { link_function = '${/parameter/@layout_code}_ast_con_cdd_attachtment_upload'; if (record.get('atm_num1') > 0) { return '<a style="color:red" href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } else { return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } } else if (name == 'link2') { link_function = '${/parameter/@layout_code}_ast_con_cdd2_attachtment_upload'; if (record.get('atm_num2') > 0) { return '<a style="color:red" href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } else { return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } } else if (name == 'link3') { link_function = '${/parameter/@layout_code}_ast_con_cdd3_attachtment_upload'; if (record.get('atm_num3') > 0) { return '<a style="color:red" href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } else { return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.ds.id + '\',\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>'; } } }; //link1 window['${/parameter/@layout_code}_ast_con_cdd_attachtment_upload'] = function(ds_id, id, name, query_only) { var record = $(ds_id).findById(id); if (record.get('ast_con_car_insurance_id')) { var url; if (query_only == 'Y') { url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('ast_con_car_insurance_id'); } else { url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('ast_con_car_insurance_id'); } var win = new Leaf.Window({ url: url, title: '${l:HLS.SUPPORTING_DOCUMENT}', id: '${/parameter/@layout_code}${/parameter/@tree_code}_ast_con_cdd_attachtment_upload_id', width: 850, height: 400 }); // win.on('close', function() { // $(ds_id).query(); // }); } else { Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); } }; //link2 window['${/parameter/@layout_code}_ast_con_cdd2_attachtment_upload'] = function(ds_id, id, name, query_only) { var record = $(ds_id).findById(id); if (record.get('ast_con_car_insurance_id')) { var url; if (query_only == 'Y') { url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('ast_con_car_insurance_id'); } else { url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('ast_con_car_insurance_id'); } var win = new Leaf.Window({ url: url, title: '${l:HLS.SUPPORTING_DOCUMENT}', id: '${/parameter/@layout_code}${/parameter/@tree_code}_ast_con_cdd2_attachtment_upload_id', width: 850, height: 400 }); // win.on('close', function() { // $(ds_id).query(); // }); } else { Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); } }; //link3 window['${/parameter/@layout_code}_ast_con_cdd3_attachtment_upload'] = function(ds_id, id, name, query_only) { var record = $(ds_id).findById(id); if (record.get('ast_con_car_insurance_id')) { var url; if (query_only == 'Y') { url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('ast_con_car_insurance_id'); } else { url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=CON_CONTRACT&header_id=' + record.get('ast_con_car_insurance_id'); } var win = new Leaf.Window({ url: url, title: '${l:HLS.SUPPORTING_DOCUMENT}', id: '${/parameter/@layout_code}${/parameter/@tree_code}_ast_con_cdd3_attachtment_upload_id', width: 850, height: 400 }); // win.on('close', function(){ // $(ds_id).query(); // }); } else { Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); } }; window['${/parameter/@layout_code}_prj500_cdd_attachtment_upload'] = function(ds_id, id, name, query_only) { var record = $(ds_id).findById(id); if (record.get('check_id')) { var url; if (query_only == 'Y') { url = $('${/parameter/@layout_code}_prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); } else { url = $('${/parameter/@layout_code}_prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id'); } var win = new Leaf.Window({ url: url, title: '${l:HLS.SUPPORTING_DOCUMENT}', id: '${/parameter/@layout_code}${/parameter/@tree_code}_prj500_cdd_uploadFile_screen_id', width: 850, height: 400 }); win.on('close', function() { record.ds.query(); }); } else { Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!'); } }; /// 附件上传 end ]]></script> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> </a:view> </a:screen>