<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2014-7-21 下午04:29:18  
    $Revision: 1.0  	
    $Purpose: 贷款卡维护
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:view>
        <a:link id="hls_bp_master_load_card_create_link" url="${/request/@context_path}/modules/hls/HLS100/hls_bp_master_load_card_create.lview"/>
        <script type="text/javascript"><![CDATA[
            function hls_bp_master_load_card_hd_add() {
                var win = new Leaf.Window({
                    id: 'hls_bp_master_load_card_create_win',
                    url: $('hls_bp_master_load_card_create_link').getUrl(),
                    params: {
                        'winid': 'hls_bp_master_load_card_create_win'
                    },
                    fullScreen: true
                });
            
                win.on('close', function() {
                    hls_bp_master_load_card_hd_query();
                });
            }
            
            function hls_bp_master_load_card_hd_query() {
                $('hls_bp_master_load_card_hd_result_ds').query();
            }
            
            function open_load_card_create_win(load_card_hd_id){
                var win = new Leaf.Window({
                    id: 'hls_bp_master_load_card_create_win',
                    url: $('hls_bp_master_load_card_create_link').getUrl(),
                    params: {
                        'winid': 'hls_bp_master_load_card_create_win',
                        'load_card_hd_id':load_card_hd_id
                    },
                    fullScreen: true
                });
            
                win.on('close', function() {
                    hls_bp_master_load_card_hd_query();
                });
            }
            
            function bp_code_renderer(value,record,name){
                return '<a href="javascript:open_load_card_create_win('+record.get('load_card_hd_id')+')">'+value+'</a>';
            }
            
        ]]></script>
        <a:dataSets>
            <a:dataSet id="hls_bp_master_load_card_hd_query_ds">
                <a:fields>
                    <a:field name="bp_code" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="600">
                        <a:mapping>
                            <a:map from="bp_code" to="bp_code"/>
                            <a:map from="bp_id" to="bp_id"/>
                            <a:map from="bp_name" to="bp_name"/>
                        </a:mapping>
                    </a:field>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="hls_bp_master_load_card_hd_result_ds" autoPageSize="true" autoQuery="true" model="hls.HLS100.hls_bp_master_load_card_query" queryDataSet="hls_bp_master_load_card_hd_query_ds">
                <a:fields>
                    <a:field name="bp_name" lovService="basic.hls_bp_master_v_for_lov" prompt="商业伙伴">
                        <a:mapping>
                            <a:map from="bp_id" to="bp_id"/>
                        </a:mapping>
                    </a:field>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="hls_bp_master_load_card_hd_query" text="HLS.QUERY"/>
                <a:gridButton click="hls_bp_master_load_card_hd_add" text="HLS.NEW"/>
            </a:screenTopToolbar>
            <a:form column="2" labelWidth="120" title="查询条件">
                <a:lov name="bp_code" bindTarget="hls_bp_master_load_card_hd_query_ds" prompt="商业伙伴编号"/>
                <a:textField name="bp_name" bindTarget="hls_bp_master_load_card_hd_query_ds" prompt="商业伙伴名称"/>
            </a:form>
            <a:grid bindTarget="hls_bp_master_load_card_hd_result_ds" marginHeight="170" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="bp_code" prompt="商业伙伴编号" renderer="bp_code_renderer"/>
                    <a:column name="bp_name" prompt="商业伙伴名称" width="200"/>
                    <a:column name="query_method" prompt="查询方式"/>
                    <a:column name="loan_amount" align="right" prompt="贷款金额" renderer="Leaf.formatMoney"/>
                    <a:column name="note" align="right" prompt="银票" renderer="Leaf.formatMoney"/>
                    <a:column name="point_date" align="center" prompt="时间点" renderer="Leaf.formatDate"/>
                    <a:column name="bill_amount" align="right" prompt="保理金额" renderer="Leaf.formatMoney"/>
                    <a:column name="guarantee_amount" align="right" prompt="承兑汇票金额" renderer="Leaf.formatMoney"/>
                    <a:column name="gua_letter_amount" align="right" prompt="保函金额" renderer="Leaf.formatMoney"/>
                    <a:column name="factoring_amount" align="right" prompt="对外担保金额" renderer="Leaf.formatMoney"/>
                    <a:column name="description" prompt="备注" width="200"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>
