<?xml version="1.0" encoding="UTF-8"?> <!-- $Author: zhangxing5129 $Date: 2014-8-1 下午04:16:45 $Revision: 1.0 $Purpose: 项目报告维护入口界面 --> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true"> <a:view> <a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check" url="${/request/@context_path}/modules/zjwfl/zj_wfl_approve_history_check.lview"/> <a:link id="prj_project_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="prj_project_modify_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_create_tree_n.lview"/> <a:link id="car_modify_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/> <a:link id="car_modify_mananger_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_manager.lview"/> <a:link id="prj_project_bp_parameter_link" url="${/request/@context_path}/modules/prj/PRJ501/prj_project_bp_parameter.lview"/> <a:link id="prj_project_modify_special_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_special.lview"/> <a:link id="prj_project_close_link_id" model="prj.PRJ501.prj_project_close" modelaction="update"/> <script type="text/javascript"><![CDATA[ function open_project_modify_win(record_id, ds_id) { var record = $(ds_id).findById(record_id); //项目类layout_code if (record.get('document_type') == 'PRJ' ) { var maintain_type = 'UPDATE'; var param = record.data; param['document_id'] = record.get('project_id'); param['function_code'] = 'PRJ501Q'; param['function_usage'] = 'MODIFY'; param['bp_class'] = 'NP'; param['maintain_type'] = maintain_type; param['url_title'] = '${l:HLS.PROJECT_MAITAIN}'; param['layout_debugger_flag']='Y'; hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'prj_project_modify_link', ds_id); } else if (record.get('document_type') == 'CARLS') { if(record.get('special_permit_flag')=='Y'){ //零售特批 maintain_type = 'UPDATE'; param = record.data; param['layout_debugger_flag']='Y'; param['document_id'] = record.get('project_id'); param['function_code'] = 'PRJ501D_SPECIAL'; param['function_usage'] = 'MODIFY'; param['maintain_type'] = maintain_type; param['url_title'] = '${l:HLS.PROJECT_MAITAIN}'; hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'prj_project_modify_special_link', ds_id); }else if (record.get('lease_channel') == '02') { //管理人员 maintain_type = 'UPDATE'; param = record.data; param['document_id'] = record.get('project_id'); param['layout_debugger_flag']='Y'; param['function_code'] = 'PRJ501Q'; param['function_usage'] = 'MODIFY'; param['maintain_type'] = maintain_type; param['url_title'] = '${l:HLS.PROJECT_MAITAIN}'; hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_mananger_link', ds_id); } else { maintain_type = 'UPDATE'; param = record.data; param['document_id'] = record.get('project_id'); param['function_code'] = 'PRJ501Q'; param['function_usage'] = 'MODIFY'; param['maintain_type'] = maintain_type; param['url_title'] = '${l:HLS.PROJECT_MAITAIN}'; hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link', ds_id); } } } window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) { if (name == 'project_number' && value) { return '<a href="javascript:open_project_modify_win(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>'; } return value; }; var ajax_flag = 'N'; //关闭商机 window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var prj_project_result_ds = $(ds_id); var records = prj_project_result_ds.getSelected(); if (records.length != 1) { Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}'); return; } var record = records[0]; var confirm_win = Leaf.showConfirm('${l:PROMPT}', '${l:HLS.PROJECT_NUMBER}:' + record.get('project_number') + ',${l:HLS.IS_CLOSE_CONFIRM}', function() { ajax_flag = 'Y'; Leaf.request({ url: $('prj_project_close_link_id').getUrl(), para: { project_id: record.get('project_id') }, success: function(res) { parent.Leaf.SideBar.enable = true; parent.Leaf.SideBar.show({ msg: '${l:HLS.SUBMIT_SUCCESS}', duration: 2000 }); prj_project_result_ds.query(prj_project_result_ds.currentPage); unlock_current_window(); }, error: function(res) { unlock_current_window(); }, faliure: function() { unlock_current_window(); }, scope: this }); }, function(res) { }); confirm_win.on('close', function() { if (ajax_flag == 'N') { unlock_current_window(); } }); }; window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() { var ds = $('PROJECT_REJECT_ENTRANCE_G_PROJECT_RESULT_prj_project_ds'); var records = ds.getSelected(); for(i=0;i<records.length;i++){ records[i].set('check_flag','Y'); } window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](); }; //单据跟踪 window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() { // var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); // var records = $('prj_project_ds_id').getSelected(); var ds = $('PROJECT_REJECT_ENTRANCE_G_PROJECT_RESULT_prj_project_ds'); var records = ds.getSelected(); if (records.length != 1) { Leaf.showMessage('提示', '请选择一条数据!'); return; } var instance_id = records[0].get('wfl_instance_id'); var win = new Leaf.Window({ id: 'history_check', url: $('${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check').getUrl(), params: { instance_id:instance_id }, title: '单据历史查看', height: 500, width: 860, fullScreen: true }); }; 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'], 'prj_project'); if (ds == $(ds_id)) { aut_authority_list_validate_query(ds, qpara); } }; ]]></script> <a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=PROJECT&function_code=PRJ501"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> </a:view> </a:screen>