<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: xuls  
    $Date: 2016-11-10 下午6:58:28  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true">
    <a:init-procedure/>
    <a:view>
        <a:link id="${/parameter/@layout_code}wfl_prj_project_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <a:link id="${/parameter/@layout_code}wfl_readonly_pageLink_projectQueryScreen_update_project" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_readonly.lview"/>
        <a:link id="${/parameter/@layout_code}wfl_readonly_pageLink_contractQueryScreen_update_contract" url="${/request/@context_path}/modules/cont/CON501N/con_contract_modify_query.lview"/>
        <script type="text/javascript"><![CDATA[
            function wfl_prj501_grid_update(record_id,ds_id) {
                var record = $(ds_id).findById(record_id);
                var param = record.data;
                param['document_id'] = record.get('project_id');
                param['function_code'] = 'PRJ501W';
                param['function_usage'] = 'QUERY';
                param['url_title'] = '租赁申请查询';
                param['pre_layout'] = 'pre_layout';
                hls_doc_get_layout_code('${/parameter/@layout_code}wfl_prj_project_get_layout_code_link_id', param, '${/parameter/@layout_code}wfl_readonly_pageLink_projectQueryScreen_update_project','','pre_layout_code');
            }
            function wfl_con501_grid_update(record_id,ds_id) {
                var record = $(ds_id).findById(record_id);
                var param = record.data;
                param['document_id'] = record.get('contract_id');
                param['function_code'] = 'CON501E';
                param['function_usage'] = 'QUERY';
                param['url_title'] = '合同查询';
                hls_doc_get_layout_code('${/parameter/@layout_code}wfl_prj_project_get_layout_code_link_id', param, '${/parameter/@layout_code}wfl_readonly_pageLink_contractQueryScreen_update_contract');
            }
            //超链接渲染
            window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record, bp_seq) {
                if (value) {
                    if (name == 'project_number') {
                        return '<a href="javascript:wfl_prj501_grid_update(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
                    } else if (name == 'contract_number') {
                        return '<a href="javascript:wfl_con501_grid_update(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
                    }
                }
                return value;
            };
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>