<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: sf
    $Date: 2016-11-24 上午9:18:19
    $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="BmLink_MainScreen_functionHit" model="sys.sys_page_function_visit" modelaction="update"/>
        <a:link id="hls_lease_item_gps_import_link"
                url="${/request/@context_path}/modules/hls/HLS204N/hls_lease_item_gps_import.lview"/>
        <script><![CDATA[
        //导入按钮
        window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
            var url_l = $('hls_lease_item_gps_import_link').getUrl();
            var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_lease_item_gps');
            var win = new Leaf.Window({
                id: 'hls_lease_item_gps_import_link_win',
                url: url_l,
                params: {
                    'winid': 'hls_lease_item_gps_import_link_win',
                    'session_id': '${/session/@session_id}',
                    'parent_ds_id': ds_id
                },
                title: '导入',
                width: 420,
                height: 320
            });
            // win.on('close', function () {
            //     $(ds_id).query();
            // });
        };

        //加载事件
        window['${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
          var ds_id = '${/parameter/@layout_code}_F_QUERY__ds';
          var r = $(ds_id).getAt(0);
          r.set('period_from',new Date().format('yyyy-mm').toString());
          r.set('period_from_n',new Date().format('yyyy-mm').toString());
          r.set('period_to',new Date().format('yyyy-mm').toString());
          r.set('period_to_n',new Date().format('yyyy-mm').toString());
        };

        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>