<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2014-8-13 上午10:25:40  
    $Revision: 1.0  
    $Purpose: 抵质押物维护入口界面
-->
<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_mortgage_modify_link" url="${/request/@context_path}/modules/hls/HLS217N/hls_mortgage_modify.lview"/>
        <script type="text/javascript"><![CDATA[
            function open_mor_win(record_id, ds_id) {
                var record = $(ds_id).findById(record_id);
                var param = record.data;
                param['document_id'] = record.get('mortgage_id');
                param['function_code'] = 'HLS217D';
                param['function_usage'] = 'MODIFY';
                param['maintain_type'] = 'UPDATE';
            
                param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
                hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_mortgage_modify_link', ds_id);
            }
            
            window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
                if (name == 'mortgage_code' && value) {
                    return '<a href="javascript:open_mor_win(' + record.id + ',\'' + record.ds.id + '\')">' + value + '</a>';
                }
            };
            
            window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
                var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_mortgage');
                var records = $(ds_id).getSelected();
                if (records.length != 1) {
                    Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}');
                    return;
                }
                var record = records[0];
                open_mor_win(record.id, 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'], 'hls_mortgage');
                 
                 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=MORTGAGE&amp;function_code=HLS217"/>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>
