<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hp  
    $Date: 2014-9-28 下午2:02:27  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <a:link id="pageLink_relation_assign" url="${/request/@context_path}/modules/hls/HLS1010/hls_bp_relation_save.lview"/>
        <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
        <script type="text/javascript"><![CDATA[
            function employeeDs_grid_add() {
                $('employeeDs_grid').showEditorByRecord($('employeeDs').create());
            }
            
            function employeeDs_grid_clear() {
                $('employeeDs_grid').clear();
            }
            
            function employeeDs_grid_submit() {
                var ds = $('employeeDs');
                if (ds.validate()) {
                    ds.submit();
                }
            }
            
            function exp_1050_next() {
                history.go(1);
            }
            
            function exp_1050_back() {
                history.go(-1);
            }
            
            function exp_1050_quit() {
                location.href = $('sys_service_welcome_link').getUrl();
            }
            
            function query_bp_master_ds() {
                $('bp_master_ds').query();
            }
            
            function resetEmployees() {
                $('bp_master_query_ds').reset();
            }
             
             function winOpen_relation_assign(bp_id) {
                new Leaf.Window({
                    id: 'bp_relation_assign_window',
                    url: $('pageLink_relation_assign').getUrl(),
                    params:{
                    	bp_id:bp_id
                    },
                    title:'关系维护' ,//'${l:HLS_BP_MASTER.ASSIGN_RELATION}',
                    fullScreen:true,
                    height: 450,
                    width: 1000
                });
            }
            function render_relation_assign(value, record, name){
                 return '<a href="javascript:winOpen_relation_assign(' + record.get('bp_id') + ')">关系维护</a>';
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="bp_master_query_ds">
                <a:fields>
                    <a:field name="bp_type" defaultValue="INSURER"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="bp_master_ds" autoQuery="false" model="hls.HLS1010.hls_bp_master_lv" pageSize="15" queryDataSet="bp_master_query_ds" selectable="true"/>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="exp_1050_back" text="HLS.BACK"/>
                <a:gridButton click="exp_1050_next" text="HLS.FORWARD"/>
                <a:gridButton click="exp_1050_quit" text="HLS.EXIT"/>
                <a:gridButton click="query_bp_master_ds" text="HLS.QUERY"/>
                <a:gridButton click="reset_bp_master_ds" text="HLS.RESET"/>
            </a:screenTopToolbar>
            <a:form/>
            <a:grid id="employeeDs_grid" bindTarget="bp_master_ds" marginHeight="180" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="bp_code" align="left" prompt="保险公司编码" width="100"/>
                    <a:column name="bp_name" align="left" prompt="保险公司名称" width="120"/>
                    <a:column name="bp_category_n" align="left" prompt="类别" width="100"/>
                    <a:column name="bp_type_n" align="left" prompt="类型" width="100"/>
                    <a:column name="bp_class_n" align="left" prompt="分类" width="90"/>
                    <a:column name="relation_assign" align="center" prompt="关系维护" renderer="render_relation_assign" width="70"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>
