<?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:view>
        <a:link id="con_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <script type="text/javascript"><![CDATA[
            function con621_open_contract_win(record_id, ds_id) {
            
                var legal_record = $(ds_id).getCurrentRecord();
                var url_id = 'leg_downloadFile_id';
                var url = $(url_id).getUrl() + '?table_name=LEG_LEGAL_LETTER&header_id=' + legal_record.data['legal_letter_id'];
                new Leaf.Window({
                    url: url,
                    title: '附件',
                    id: 'leg_legal_letter_id',
                    width: 850,
                    height: 400
                });
            }
            
            window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
                 
                $('${/parameter/@winid}').close();
            
            };
            
            
            function con620n_attachment_win(record_id,ds_id){
                 var record = $(ds_id).findById(record_id);
                
                var url_id =  'leg_uploadFile_id';
   
                var url = $(url_id).getUrl() + '?table_name=CON_DUNNING&header_id=' + record.data['collection_id'];
                new Leaf.Window({
                    url: url,
                    title: '附件',
                    id: 'leg_legal_letter_id',
                    width: 850,
                    height: 400
                }); 
            }
            
            window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
                if (name == 'attachment') {
                    return '<a href="javascript:con620n_attachment_win(\'' + record.id + '\',\'' + record.ds.id + '\')">' + '附件' + '</a>';
                }
                return value;
            };
      
 
              //查询时调用(grid,table,gridBox)
            window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) {
 
            };
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>
