<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
          trace="true">
    <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="hls_bp_master_modify_link"
                url="${/request/@context_path}/modules/hls/HLS2110/hls_bp_master_360_query.lview"/>
        <a:link id="hls_bp_ccx_info_link"
                url="${/request/@context_path}/modules/hls/HLS236/hls_bp_master_query_ccx_report.lview"/>
        <a:link id="hls_bp_ccx_icinfo_link"
                url="${/request/@context_path}/modules/hls/HLS236/hls_bp_master_query_ccx_icinfo.lview"/>
        <script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>
        <script type="text/javascript"><![CDATA[
        stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_BP_RESULT', 'hls_bp_master');

        function open_bp_modify_win(ds_id, record_id) {
            var record = $(ds_id).findById(record_id);
            var param = record.data;
            var bp_class = record.get('bp_class');
            param['function_code'] = 'HLS2110A';
            param['bp_class'] =bp_class;
            param['function_usage'] = 'MODIFY';
            param['url_title'] = '客户360明细';
            hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_master_modify_link', ds_id);

        }

        function open_ccx_detail_win(ds_id, record_id) {
            var record = $(ds_id).findById(record_id);
            var param = record.data;
            param['function_code'] = 'HLS236Q';
            param['bp_id'] = record.get('bp_id');
            param['function_usage'] = 'MODIFY';
            param['url_title'] = '查询明细';
            hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_ccx_info_link', ds_id);

        }

        function open_ccx_icionfo_win(ds_id, record_id) {
            var record = $(ds_id).findById(record_id);
            var param = record.data;
            param['function_code'] = 'HLS236I';
            param['bp_id'] = record.get('bp_id');
            param['function_usage'] = 'MODIFY';
            param['url_title'] = '查询明细';
            hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_bp_ccx_icinfo_link', ds_id);

        }

        window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
            if (name == 'bp_code' && value) {
                return '<a href="javascript:open_bp_modify_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
            }
            if (name == 'detail') {
                return '<a href="javascript:open_ccx_detail_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
            }
            if (name == 'icinfo') {
                return '<a href="javascript:open_ccx_icionfo_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
            }
            return value;
        };

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

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

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