<?xml version="1.0" encoding="UTF-8"?> <!-- $Author: zhangyu $Date: 2016-12-22 上午10:35:49 $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="prj501a_project_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="prj501a_project_modify_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_create_tree_n.lview"/> <a:link id="prj501a_project_document_info_link" url="${/request/@context_path}/modules/wfl_screen/PRJ_PROJECT/prj_project_approval_summary.lview"/> <a:link id="prj501a_project_approve_submit_link" url="${/request/@context_path}/modules/prj/PRJ501A/hn_project_approve_modify.lview"/> <a:link id="hn_project_approve_return_link" model="prj.PRJ501C.hn_project_meeting_submit" modelaction="update"/> <script type="text/javascript"><![CDATA[ function open_project_modify_win(record_id, ds_id) { var record = $(ds_id).findById(record_id); var maintain_type = 'UPDATE'; var function_usage = 'MODIFY'; var function_code = 'PRJ501D'; var param = record.data; var project_status = record.get('project_status'); if (project_status == 'APPROVING') { maintain_type = 'READONLY'; function_usage = 'QUERY'; function_code = 'PRJ505'; } param['document_id'] = record.get('project_id'); param['function_code'] = function_code; param['function_usage'] = function_usage; param['maintain_type'] = maintain_type; param['url_title'] = '${l:HLS.PROJECT_MAITAIN}'; //param['layout_debugger_flag']='Y'; param['cond_para2'] = record.get('hn_industry_classification'); param['wf_function_code'] = '${/parameter/@function_code}'; hls_doc_get_layout_code('prj501a_project_get_layout_code_link_id', param, 'prj501a_project_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; }; //会议信息 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 win = new Leaf.Window({ id: 'prj_project_document_info_window', url: $('prj501a_project_document_info_link').getUrl(), params: { project_id: record.get('project_id'), approval_id: record.get('approval_id'), show_approver: 'Y', show_summary: 'Y', show_reply: 'N', show_upload: 'Q', conditions_editor: 'Y', query_flag: 'Y', show_meeting: 'Y', winid: 'prj_project_document_info_window' }, title: '项目上会信息', fullScreen: true }); }; //同意 window['${/parameter/@layout_code}_user_button2_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(); var record = records[0]; if (records.length != 1) { Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}'); return; } else if (record.get('prj_wfl_status') !== 'PRJ_CONSIDERATED' && record.get('prj_wfl_status') !== 'PRJ_RETURN') { Leaf.showErrorMessage('提示', '只有审议通过的项目或者审批退回的项目才允许提交项目审批!'); return; } else { var win = new Leaf.Window({ id: 'prj_project_approve_submit_window', url: $('prj501a_project_approve_submit_link').getUrl(), params: { project_id: record.get('project_id'), approval_id: record.get('approval_id'), wfl_instance_id_2: record.get('wfl_instance_id_2'), wfl_instance_id: record.get('wfl_instance_id'), submit_type:'agree', winid: 'prj_project_approve_submit_window' }, title: '项目上会信息', fullScreen: true }).on('close',function(){ $(ds_id).query(); }); } }; //再议 window['${/parameter/@layout_code}_user_button3_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(); var record = records[0]; if (records.length != 1) { Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}'); return; } else if (record.get('prj_wfl_status') !== 'PRJ_CONSIDERATED' && record.get('prj_wfl_status') !== 'PRJ_RETURN') { Leaf.showErrorMessage('提示', '只有审议通过的项目或者审批退回的项目才允许提交项目审批!'); return; } else { var win = new Leaf.Window({ id: 'prj_project_approve_submit_window', url: $('prj501a_project_approve_submit_link').getUrl(), params: { project_id: record.get('project_id'), approval_id: record.get('approval_id'), submit_type:'discuss', winid: 'prj_project_approve_submit_window' }, title: '项目上会信息', fullScreen: true }).on('close',function(){ $(ds_id).query(); }); } }; //不同意 window['${/parameter/@layout_code}_user_button4_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(); var record = records[0]; if (records.length != 1) { Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}'); return; } else if (record.get('prj_wfl_status') !== 'PRJ_CONSIDERATED' && record.get('prj_wfl_status') !== 'PRJ_RETURN') { Leaf.showErrorMessage('提示', '只有审议通过的项目或者审批退回的项目才允许提交项目审批!'); return; } else { var win = new Leaf.Window({ id: 'prj_project_approve_submit_window', url: $('prj501a_project_approve_submit_link').getUrl(), params: { project_id: record.get('project_id'), approval_id: record.get('approval_id'), submit_type:'disagree', winid: 'prj_project_approve_submit_window' }, title: '项目上会信息', fullScreen: true }).on('close',function(){ $(ds_id).query(); }); } }; //退回提交人 window['${/parameter/@layout_code}_user_button5_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(); var record = records[0]; if (records.length != 1) { Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}'); return; } else if (record.get('prj_wfl_status') !== 'PRJ_CONSIDERATED' && record.get('prj_wfl_status') !== 'PRJ_RETURN') { Leaf.showErrorMessage('提示', '该项目已经在项目审批流程中,不能退回提交人!'); return; } else { Leaf.showConfirm('提示', '你确定要把<font color="red">' + record.get('project_name') + '</font>退回给提交人吗?', function() { window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'](); Leaf.request({ url: $('hn_project_approve_return_link').getUrl(), para: { project_id: record.get('project_id'), instance_id: record.get('wfl_instance_id_2') }, success: function(res) { parent.Leaf.SideBar.enable = true; parent.Leaf.SideBar.show({ msg: '${l:HLS.SUBMIT_SUCCESS}', duration: 2000 }); window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); prj_project_result_ds.query(prj_project_result_ds.currentPage); }, error: function(res) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); }, faliure: function() { window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); }, scope: this }); }, null, 400); } }; 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>