<?xml version="1.0" encoding="UTF-8"?>

<!--
    $Author: chenlingfeng7543
$Date: 2018/12/20 21:19
$Revision: 1.0
$Purpose: 商业伙伴授信维护
-->
<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="basic.get_sys_default_time" rootPath="sys_default_time"/>
    </a:init-procedure>
    <a:view>
        <a:link id="hls361_hls_bp_master_credit_assign_link" url="${/request/@context_path}/modules/hls/HLS361/hls_bp_master_credit_assign.lview"/>
        <a:link id="hls361_hls_bp_master_credit_detail_link" url="${/request/@context_path}/modules/hls/HLS361/hls_bp_master_credit_detail.lview"/>
        <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>

        <script type="text/javascript"><![CDATA[

        function open_assign_win(id, name) {
            var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
            var param = record.data;
            param['function_code'] = 'HLS361A';
            param['function_usage'] = 'MODIFY';
            param['maintain_type'] = 'UPDATE';
            param['url_title'] = '信息维护';
            hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls361_hls_bp_master_credit_assign_link', null);

        }

        function open_detail_win(id, name) {
            var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];

            var param = record.data;
            param['function_code'] = 'HLS361D';
            param['function_usage'] = 'MODIFY';
            param['maintain_type'] = 'UPDATE';
            param['url_title'] = '信息维护';
            hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls361_hls_bp_master_credit_detail_link', null);
        }

        //超链接渲染
        window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) {
            var link_function = '';
            window['${/parameter/@bp_seq}${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
            if (name == 'record_detail') {
                link_function = 'open_detail_win';
                return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>';
            }
            if (name == 'assign_record') {
                link_function = 'open_assign_win';
                return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\');">' + config_record.get('prompt') + '</a>';
            }
        };


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