<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hsx
    $Date: 2018年8月8日17:29:18
    $Revision: 1.0  
    $Purpose:罚息减免查询
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" dynamiccreateenabled="true" trace="true">
    <a:view>
        <a:link id="${/parameter/@layout_code}_con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <script src="${/request/@context_path}/javascripts/jquery-1.6.4.min.js" type="text/javascript"/>
        <a:link id="${/parameter/@layout_code}_contract_penalty_modify_link" url="${/request/@context_path}/modules/cont/CON1020/contract_penalty_reduction_create.lview"/>
        <script type="text/javascript"><![CDATA[
            jQuery.noConflict();

            function open_contract_win123() {
                var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_case_record');
                var param = {};
                param['function_code'] = 'CON1020_C';
                param['maintain_type'] = 'INSERT';
                param['url_title'] = '罚息减免新建';
                param['winid'] = '${/parameter/@layout_code}_create_win_id'
                hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}_contract_penalty_modify_link', ds_id);
            }


            function open_contract_detail_win(ds_id, record_id) {
                var record = $(ds_id).findById(record_id);
                var param = record.data;
                if (record.data.status=='APPROVED'||record.data.status=='APPROVING') {
                param['function_code'] = 'CON1020_C_R';
                param['function_usage'] = 'QUERY';
                param['maintain_type'] = 'QUERY';
                }else{
                param['function_code'] = 'CON1020_C';
                param['function_usage'] = 'INSERT';
                param['maintain_type'] = 'INSERT';
                }
                param['case_status_submit'] = record.data.status;
                param['maintain_type'] = 'INSERT';
                param['record_id'] = record.data.record_id;
                param['url_title'] = '罚息减免维护';
                param['winid'] = '${/parameter/@layout_code}_maintain_win_id'
                hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}_contract_penalty_modify_link', ds_id);
            }


            window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
                open_contract_win123();
            };

            //超链接渲染
            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_contract_detail_win;
                    return '<a href="javascript:open_contract_detail_win(\'' + record.ds.id + '\',\'' + record.id + '\');">查看明细</a>';
                }
            };
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>