<?xml version="1.0" encoding="UTF-8"?>
<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="hls.HLS030.hls_doc_layout_main" rootPath="layout_main_path"/>
        <a:model-query fetchAll="true" model="cont.CON500.hls_doc_layout_button" rootPath="layout_main_button_path"/>
        <a:model-query defaultWhereClause="t1.parent_table is null and t1.tab_type!=&apos;TAB&apos; and t1.enabled_flag=&apos;Y&apos; and rownum=1" fetchAll="true" model="cont.CON500.con_hls_doc_layout_tab_query" rootPath="base_table_path"/>
    </a:init-procedure>
    <a:view>
        <a:link id="con110_submit_link" model="cont.CON110.submit_change_req" modelaction="execute"/>
        <script type="text/javascript"><![CDATA[
            
            // function con110_submit_click() {
                // var root_ds = $('${/model/base_table_path/record/@tab_code}_${/model/base_table_path/record/@base_table}_ds');
                // var req_record = root_ds.getAt(0);
                // if (root_ds.validate()) {
                    // if (req_record.dirty) {
                        // Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
                        // return;
                    // }
                    // var winid = '${/parameter/@winid}';
                    // Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS.ARE_YOU_SURE_TO_SUBMIT}', function() {
                        // Leaf.request({
                            // url: $('con110_submit_link').getUrl(),
                            // para: {
                                // change_req_id: '${/parameter/@change_req_id}'
                            // },
                            // success: function(res) {
                                // $('${/parameter/@winid}').close();
                                // Leaf.Masker.unmask(Ext.getBody());
                            // },
                            // failure: function() {
                                // Leaf.Masker.unmask(Ext.getBody());
                            // },
                            // error: function() {
                                // Leaf.Masker.unmask(Ext.getBody());
                            // },
                            // scope: this
                        // });
                    // });
                // }
            // }
            
            // function con110_close_win() {
                // $('${/parameter/@winid}').close();
            // }
            //加载时调用(grid,table,gridBox)
           var count_flag=0;
            window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function(ds, record) {
                 var ds_id=get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_change_req_flt_test');
               if(ds.id==ds_id&&count_flag<1){
                   count_flag=count_flag+1;
                   $(ds_id).setQueryParameter('change_req_id','${/parameter/@change_req_id}');
                   $(ds_id).query();
                 }
               };
               
           //查询时调用(grid,table,gridBox)
            window['${/parameter/@bp_seq}${/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_change_req_flt_test');
               if(ds.id==ds_id){
                   $(ds_id).setQueryParameter('change_req_id','${/parameter/@change_req_id}');
                 }
               };
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>
