<?xml version="1.0" encoding="UTF-8"?>
<!--
  create by nyl  2014-12-3 
  for contract context create
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
    <a:init-procedure>
        <a:model-query fetchAll="true" model="cont.CON620.get_sysdate" rootPath="sysdate"/>
    </a:init-procedure>
    <a:view>
        <a:link id="con636d_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <a:link id="con_contract_update_link_id" url="${/request/@context_path}/modules/cont/CON301/con_contract_query_n.lview"/>
        <script type="text/javascript"><![CDATA[
           function con636D_open_contract_win(ds_id,record_id) {
                var record = $(ds_id).findById(record_id);
                var param = record.data; 
                maintain_type = 'READONLY';
                param['function_code'] = 'CON301R';
                param['layout_code'] = 'CONTRACT_QUERY';
                param['function_usage'] = 'MODIFY';
                param['url_title'] = '合同明细';
                url_l = 'con_contract_update_link_id';
                param['maintain_type'] = maintain_type;
                new Leaf.Window({
                    id: 'con_get_layout_code_winid',
                    params: param,
                    url: $('con_contract_update_link_id').getUrl(),
                    title: param['url_title'] + '(' + 'CONTRACT_QUERY' + ')',
                    fullScreen: true,
                    draggable: true
                });
              //  hls_doc_get_layout_code('con636d_get_layout_code_link_id', param, 'con_contract_update_link_id', ds_id);
            }
 
            
            window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
            
                if (name == 'contract_number') {
                    return '<a href="javascript:con636D_open_contract_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
                }
            
                return value;
            };
            
             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'], 'exp_employees');
  
                if (ds.id == ds_id) {
                     qpara.employee_id = ${/parameter/@employee_id};
                    aut_authority_list_validate_query(ds, qpara);
            
                }
            };
        
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CON636D"/>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>
