<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <script type="text/javascript"><![CDATA[
        function query_bp_name_query_result_ds(){
				$('bp_name_query_result_ds').query();
			}
			
			 function onUpdate_bq_name(ds, record, name, value, oldvalue) {
                   if (name == 'creation_date_from') {
                    if (record.get('creation_date_to') == 'undefined' || record.get('creation_date_to') == null || record.get('creation_date_to') == '') {
                        record.set('creation_date_to', value);
                    }
                } else if (name == 'creation_date_to') {
                    if (record.get('creation_date_from') == 'undefined' || record.get('creation_date_from') == null || record.get('creation_date_from') == '') {
                        record.set('creation_date_from', value);
                    }
              }
			 }
		]]></script>
        <a:dataSets>
            <a:dataSet id="bp_name_query_query_ds">
                <a:fields>
                    <a:field name="user_id"/>
                    <a:field name="user_name" lovGridHeight="300" lovHeight="450" lovService="cont.CON921.bp_name">
                        <a:mapping>
                            <a:map from="user_id" to="user_id"/>
                            <a:map from="user_name" to="user_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="project_number"/>
                    <a:field name="id_card_no"/>
                    <a:field name="cell_phone"/>
                    <!-- <a:field name="user_id"/> -->
                </a:fields>
                <!--  <a:events>
                    <a:event name="update" handler="onUpdate_bq_name"/>
                </a:events> -->
            </a:dataSet>
            <a:dataSet id="bp_name_query_result_ds" autoQuery="true" model="cont.CON921.bp_name_query" queryDataSet="bp_name_query_query_ds">
                <a:fields>
                    <a:field name="user_id"/>
                    <a:field name="user_name"/>
                    <a:field name="project_number"/>
                    <a:field name="id_card_no"/>
                    <a:field name="cell_phone"/>
                    <a:field name="creation_date"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenTopToolbar>
            <a:screenTitle/>
            <a:gridButton click="query_bp_name_query_result_ds" text="查询"/>
        </a:screenTopToolbar>
        <a:form column="4" labelWidth="80" marginWidth="60" title="承租人查询">
            <!-- <a:lov name="user_name" bindTarget="bp_name_query_query_ds" prompt="选择用户"/> -->
            <!--  <a:textField name="cell_phone" bindTarget="bp_name_query_query_ds" prompt="承租人手机号"/> -->
            <!--  <a:textField name="project_number" bindTarget="bp_name_query_query_ds" prompt="项目编号"/> -->
            <!--  <a:datePicker name="creation_date_from" bindTarget="bp_name_query_query_ds" prompt="到达时间从"/> -->
            <a:dateTimePicker name="creation_date_from" bindTarget="bp_name_query_query_ds" prompt="到达时间从"/>
            <a:dateTimePicker name="creation_date_to" bindTarget="bp_name_query_query_ds" prompt="到达时间到"/>
            <!--    <a:datePicker name="creation_date_to" bindTarget="bp_name_query_query_ds" prompt="到达时间到"/> -->
            <!--  <a:textField name="id_card_no" bindTarget="bp_name_query_query_ds" prompt="承租人身份证号"/> -->
            <!--  <a:textField name="user_id" bindTarget="bp_name_query_query_ds" prompt="用户id"/> -->
        </a:form>
        <a:grid id="grid_id" bindTarget="bp_name_query_result_ds" marginHeight="280" marginWidth="60" navBar="true">
            <a:toolBar>
                <a:button type="excel"/>
            </a:toolBar>
            <a:columns>
                <a:column name="bp_name" prompt="申请人姓名" width="100"/>
                <a:column name="project_number" prompt="项目编号" width="100"/>
                <a:column name="invoice_agent_id_n" prompt="经销商" width="160"/>
                <a:column name="id_card_no" prompt="申请人身份证号" width="150"/>
                <a:column name="cell_phone" prompt="申请人手机号" width="120"/>
                <a:column name="address_on_resident_booklit" prompt="申请人户籍地址" width="150"/>
                <a:column name="living_address" prompt="申请人居住地址" width="150"/>
                <a:column name="work_unit" prompt="申请人公司名称" width="120"/>
                <a:column name="work_unit_address" prompt="申请人公司地址" width="150"/>
                <a:column name="relationship_sp" prompt="与申请人关系" width="100"/>
                <a:column name="bp_name_sp" prompt="亲属姓名" width="100"/>
                <a:column name="id_no_sp" prompt="亲属证件号码" width="150"/>
                <a:column name="cell_phone_sp" prompt="亲属手机号码" width="120"/>
                <a:column name="living_address_db" prompt="亲属居住地址" width="150"/>
                <a:column name="creation_date" prompt="到达时间" width="100"/>
            </a:columns>
            <!-- <a:editors>
                <a:textField id="grid_id_textField_id"/>
            </a:editors> -->
        </a:grid>
        <a:hBox/>
    </a:view>
</a:screen>
