<?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:view>

        <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
                modelaction="update"/>
        <a:link id="${/parameter/@layout_code}con_contract_query_link"
                url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
        <script type="text/javascript"><![CDATA[

        // window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
        //     var lnds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CONTRACT_RESULT', 'hls_journal_detail');
        //      $(lnds).query();
        //      debugger
        //     var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CONTRACT_AGENT', 'hls_journal_detail');
        //     $(ds_id).setQueryUrl('${/request/@context_path}/autocrud/cont.CON3400.contract_sales_report_query/query');
        //     $(ds_id).query();
        //
        // }

        window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) {
            console.log(ds.id)
            var lnds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CONTRACT_RESULT', 'hls_journal_detail');

            if(lnds==ds.id){

               var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CONTRACT_AGENT', 'hls_journal_detail');
               $(ds_id).setQueryUrl('${/request/@context_path}/autocrud/cont.CON3400.contract_sales_report_query/query');
               $(ds_id).query();
           }

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