<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: WANGWEI 
    $Date: 2015-12-18 上午10:30:25  
    $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="con301_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <a:link id="con301_con_contract_info_link" url="${/request/@context_path}/modules/prj/PRJ506/virtual_contract_query.lview"/>
        <script type="text/javascript"><![CDATA[
            function virtual_con_link(record_id, name){
                var record = window['${/parameter/@layout_code}_hls_link_render_record'][record_id + '---' + name];
                var head_ds=  get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
                var param = record.data;
                param['function_code'] = 'C0N301D_CON';
                //param['document_id'] = record.get('project_id');
                param['function_usage'] = 'QUERY';
                param['maintain_type'] = 'READONLY';
                param['cond_para2'] = record.get('hn_industry_classification');
                param['url_title'] = '合同明细';
                param['winid']='con301_virtual_contract_query_detail_link_id';
                hls_doc_get_layout_code('con301_get_layout_code_link_id', param, 'con301_con_contract_info_link',head_ds);
            }
           
               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==='virtual_con_number'){
                    link_function = 'virtual_con_link';
                     if (record.get('project_id')) {
                        return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + value + '</a>';
                    }
                }
                return value;
            };
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>
