<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wangwei  
    $Date: 2015-1-16 下午1:12:54  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
    <!-- <a:init-procedure>
        <model-query fetchAll="true" model="cont.CON440.con_prj_agent_record_sysdate" rootpath="sysdate_path"/>
    </a:init-procedure> -->
    <a:view>
        <script type="text/javascript"><![CDATA[
            function con_contract_info_query() {
                $('risk_approved_record_ds').query();
            }
            
            console.log('${/request/@context_path}/autocrud/cont.CON440.con_prj_agent_record_his/query?bp_id=${/parameter/@bp_id}');
            // function date_to_limit(record, name, value) {
                // var myDate = new Date();
                // var now_date = myDate.toLocaleDateString(); //获取当前时间
                // var date_to = record.get('date_to');
                // alert(date_to);
            // }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="for_query_ds" autoCreate="true">
                <a:fields>
                    <a:field name="bp_id"/>
                    <a:field name="bp_name" lovGridHeight="300" lovHeight="500" lovService="cont.CON440.con_prj_agent_record_agent_lov" lovWidth="900">
                        <a:mapping>
                            <a:map from="bp_name" to="bp_name"/>
                            <a:map from="bp_id" to="bp_id"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="date_from"/>
                    <a:field name="date_to"/>
                </a:fields>
                <!-- <a:events>
            <a:event name="upadte" handler="date_to_limit"/>
            </a:events> -->
            </a:dataSet>
            <a:dataSet id="risk_approved_record_ds" autoPageSize="true" model="cont.CON440.con_prj_agent_record_his" queryDataSet="for_query_ds">
                <a:fields>
                    <a:field name="bp_name"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:gridButton id="hls_standard_his_id" click="con_contract_info_query" text="查询"/>
            </a:screenTopToolbar>
            <a:form column="4" labelWidth="150" marginWidth="80" title="查询条件">
                <a:lov name="bp_name" bindTarget="for_query_ds" prompt="经销商名称"/>
                <a:datePicker name="date_from" bindTarget="for_query_ds" prompt="起始日期从"/>
                <a:datePicker name="date_to" bindTarget="for_query_ds" prompt="起始日期到"/>
            </a:form>
            <a:grid bindTarget="risk_approved_record_ds" marginHeight="180" marginWidth="80" navBar="true">
                <a:toolBar>
                    <a:button type="excel"/>
                </a:toolBar>
                <a:columns>
                    <a:column name="bp_name" prompt="经销商名称" width="160"/>
                    <a:column name="agent_sub_num" prompt="经销商申请件数" width="160"/>
                    <a:column name="zl_num" prompt="信审助理审批件数" width="160"/>
                    <a:column name="zy_num" prompt="信审专员审批件数" width="160"/>
                    <a:column name="zg_num" prompt="信审主管审批件数" width="160"/>
                    <a:column name="zj_num" prompt="信审总监审批件数" width="160"/>
                    <a:column name="zjl_num" prompt="总经理审批件数" width="160"/>
                    <a:column name="ch_num" prompt="初审件数" width="160"/>
                    <a:column name="fh_num" prompt="复审件数" width="160"/>
                </a:columns>
                <a:editors>
                    <a:textArea id="tex_area_e" height="100" width="300"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>
