<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wangwei  
    $Date: 2016-1-25 下午2:27:06  
    $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="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <a:link id="sdic100d_other_contract_detail_link_id" url="${/request/@context_path}/modules/sdic/SDIC100/sdic_other_contract_modify.lview"/>
        <script type="text/javascript"><![CDATA[
           function contract_number(id, name, query_only) {
                var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
                var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'sdic_other_contract');
                var param = {};
                param['contract_id'] = record.get('contract_id');
                if(record.get('closed_flag')=='N'){
                    param['function_code'] = 'SDIC120D';
                    param['function_usage'] = 'MODIFY';
                }else{
                    param['function_code'] = 'SDIC100D_WFL';
                    param['function_usage'] = 'QUERY';
                }
                    param['document_category'] =record.get('document_category');
                    param['document_type'] =record.get('document_type');
                    param['document_type_2nd'] =record.get('document_type');
                param['url_title'] = '其他业务明细';
                param['winid']='sdic100d_other_contract_detail_winid';
                hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'sdic100d_other_contract_detail_link_id', ds_id);
            }
            
             
            
          //超链接渲染
            window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
                var link_function = '';
                window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
                if (name == 'contract_number' && !record.isNew) {
                    link_function = 'contract_number';
                    return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">'+value+'</a>';
                }
            };    
      ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>
