<?xml version="1.0" encoding="UTF-8"?> <!-- $Author: chenlingfeng $Date: 2017-8-2 上午11:14:17 $Revision: 1.0 $Purpose: --> <a:screen xmlns:a="http://www.leaf-framework.org/application"> <a:view> <a:link id="hn1310_hn_expenses_app_approval_print_link" url="${/request/@context_path}/modules/hn/HN1310/hn_expenses_app_approval_print.lsc"/> <a:link id="hn1310_hn_expenses_app_create_entrance_link" url="${/request/@context_path}/modules/hn/HN1310/hn_expenses_app_create_detail.lview"/> <a:link id="hn1310_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <script type="text/javascript"><![CDATA[ function hn1310_query() { $('hn1310_hn_expenses_app_query_result_ds').query(); } function hn1310_reset() { $('hn1310_hn_expenses_app_query_ds').reset(); } function hn1310_add() { var ds_id = 'hn1310_hn_expenses_app_query_result_ds'; var param = {}; param['function_code'] = 'HN1310D'; param['function_usage'] = 'CREATE'; param['url_title'] = '资金用款申请'; param['winid'] = 'hn1310_hn_expenses_app_detail_add_winid'; hls_doc_get_layout_code('hn1310_get_layout_code_link_id', param, 'hn1310_hn_expenses_app_create_entrance_link', ds_id); } function hn1310_export() { $('hn1310_hn_expenses_app_query_grid')._export(); } function hn1310_expenses_open_detail(id) { var ds_id = 'hn1310_hn_expenses_app_query_result_ds'; var record = $(ds_id).findById(id); var param = record.data; param['function_code'] = 'HN1310D'; param['function_usage'] = 'MODIFY'; if (record.get('wfl_status') == 'APPROVING' || record.get('wfl_status') == 'APPROVED') { param['function_code'] = 'HN1310WFL'; param['function_usage'] = 'QUERY'; } if ('${/session/@user_id}' != record.get('owner_user_id')){ param['function_code'] = 'HN1310WFL'; param['function_usage'] = 'QUERY'; } param['url_title'] = '资金用款申请'; param['expenses_id'] = record.get('expenses_id'); param['winid'] = 'hn1310_hn_expenses_app_detail_winid'; hls_doc_get_layout_code('hn1310_get_layout_code_link_id', param, 'hn1310_hn_expenses_app_create_entrance_link', ds_id); } function hn1310_expenses_number_renderer(value, record, name) { if (name == 'expenses_number') { return '<a href="javascript:hn1310_expenses_open_detail(' + record.id + ')">' + value + '</a>'; } } function hn1210_print() { var url = $('hn1310_hn_expenses_app_approval_print_link').getUrl(); var records = $('hn1310_hn_expenses_app_query_result_ds').getSelected(); var param; var record = records[0]; if (record) { if (record.get('wfl_status') == 'APPROVED') { param = '?expenses_id=' + record.get('expenses_id'); param = param+'&cdd_list_id=' + record.get('cdd_list_id'); param = param+'&instance_id=' + record.get('wfl_instance_id'); param = param+'&templt_name=hn_expenses_app_approval.xml'; url = url + param; window.open(url); } else { Leaf.showMessage('提示','无法打印未审批通过的单据'); } } } ]]></script> <a:dataSets> <a:dataSet id="hn_common_wfl_status_ds" lookupCode="HN_COMMON_WFL_STATUS"/> <a:dataSet id="hn1310_hn_expenses_app_query_ds" autoCreate="true"> <a:fields> <a:field name="expenses_number"/> <a:field name="expenses_name"/> <a:field name="wfl_status"/> <a:field name="wfl_status_desc" displayField="code_value_name" options="hn_common_wfl_status_ds" returnField="wfl_status" valueField="code_value"/> </a:fields> </a:dataSet> <a:dataSet id="hn1310_hn_expenses_app_query_result_ds" autoPageSize="true" autoQuery="true" model="hn.HN1310.hn_expenses_app_query" queryDataSet="hn1310_hn_expenses_app_query_ds" selectable="true" selectionModel="single"/> </a:dataSets> <a:screenBody> <a:screenTopToolbar> <a:screenTitle/> <a:gridButton click="hn1310_reset" text="重置"/> <a:gridButton click="hn1310_query" text="HLS.QUERY"/> <a:gridButton click="hn1310_add" text="新增"/> <a:gridButton click="hn1310_export" text="导出"/> <a:gridButton click="hn1210_print" text="用款申请单打印"/> </a:screenTopToolbar> <a:form column="4" labelWidth="120" marginWidth="30" title="查询条件"> <a:textField name="expenses_number" bindTarget="hn1310_hn_expenses_app_query_ds" prompt="投资业务编号"/> <a:textField name="expenses_name" bindTarget="hn1310_hn_expenses_app_query_ds" prompt="投资业务名称"/> <a:comboBox name="wfl_status_desc" bindTarget="hn1310_hn_expenses_app_query_ds" prompt="审批状态"/> </a:form> <a:grid id="hn1310_hn_expenses_app_query_grid" bindTarget="hn1310_hn_expenses_app_query_result_ds" marginHeight="200" marginWidth="30" navBar="true"> <a:columns> <a:column name="expenses_number" prompt="资金用款申请编号" renderer="hn1310_expenses_number_renderer" width="150"/> <a:column name="expenses_name" prompt="资金用款申请名称" width="200"/> <a:column name="expenses_amount" align="right" prompt="用款金额" renderer="Leaf.formatMoney"/> <a:column name="expenses_date" prompt="用款日期" renderer="Leaf.formatDate"/> <a:column name="owner_user_id_n" prompt="经办人"/> <a:column name="wfl_status_n" prompt="审批状态"/> </a:columns> </a:grid> </a:screenBody> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> </a:view> </a:screen>