<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author:  Yimeng
    $Date: 2015-05-08 下午01:58:31  
    $Revision: 1.0  
    $Purpose: 
-->
<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="con_contract_update_link_id" url="${/request/@context_path}/modules/cont/CON501N/con_contract_modify.lview"/> -->
        <a:link id="con_contract_penatly_link" url="${/request/@context_path}/modules/cont/CON733/con_contract_penatly_change_detail.lview"/>
        <a:link id="con733_create_debt_exemption_link" model="cont.CON733.con_create_debt_exemption" modelaction="execute"/>
        <a:link id="con_contract_copy_link" model="cont.CON733.con_create_debt_exemption" modelaction="update"/>
        <script type="text/javascript"><![CDATA[
            
            window['${/parameter/@layout_code}_con734_req_query'] = function(id, ds_id, name) {
                var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
                var param = record.data;
                param['document_id'] = record.get('change_req_id');
                param['function_code'] = 'CON733W';
                param['document_type'] = 'DEBT_EXEMPTION_REQ';
                param['layout_code'] = 'CCR_DEBT_EXEMPTION_1';
                param['url_title'] = '罚息免除';
                hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_penatly_link',ds_id);
            };
            
            //超链接
            window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record, bp_seq) {
                var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_debt_exemption_req');
                var link_function = '${/parameter/@layout_code}_con734_req_query';
                window['${/parameter/@bp_seq}${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
                if (name == 'change_req_number') {
                    return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + ds_id + '\',\'' + name + '\');">' + record.get('change_req_number') + '</a>';
                }
            };
            
            //申请明细
            window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
                var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_debt_exemption_req');
                var record = $(ds_id).getSelected();
                
                if (record.length == 0){
                    Leaf.showMessage('${l:PROMPT}','请先选择一条数据！');
                    return;
                }else if(record.length > 1){
                    Leaf.showMessage('${l:PROMPT}','请勿选择多条数据！');
                    $(ds_id).unSelectAll();
                    return;
                }
                
                var param = record[0].data;
                param['document_id'] = record[0].get('change_req_id');
                param['function_code'] = 'CON733W';
                param['document_type'] = 'DEBT_EXEMPTION_REQ';
                param['layout_code'] = 'CCR_DEBT_EXEMPTION_1';
                param['url_title'] = '罚息免除';
                hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_penatly_link',ds_id);
            };
            
             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'], 'con_contract');
            
                if (ds.id == 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=CONTRACT&amp;function_code=CON734"/>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>
