<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: lhj
    $Date: 2019-01-16
    $Revision: 1.0
    $Purpose:执行管理报表
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
          trace="true">
    <a:view>
        <script type="text/javascript"><![CDATA[
        //导出
        window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {

            var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
            var grid_id = ds_id.replace('ds', 'layout_grid_id');
            $(grid_id)._export(null,'执行管理');


        };
        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'], 'con_contract');

            if (ds == $(ds_id)) {
                aut_authority_list_validate_query(ds, qpara);

            }
        };

        window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
            var date = new Date();
            date.setDate(1);
            var month = parseInt(date.getMonth()+1);
            var day = date.getDate();
            if (month < 10) {
                month = '0' + month
            }
            if (day < 10) {
                day = '0' + day
            }
            record.set('lease_execution_date_from', date.getFullYear() + '-' + month + '-' + day);
            var currentMonth=date.getMonth();
            var nextMonth=++currentMonth;
            var nextMonthFirstDay=new Date(date.getFullYear(),nextMonth,1);
            var oneDay=1000*60*60*24;
            record.set('lease_execution_date_to', new Date(nextMonthFirstDay-oneDay));
        };


        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CON1270"/>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>
