<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure/>
    <a:view>
        <script type="text/javascript"><![CDATA[
         function rent_payment_query_result_ds(){
				$('rent_payment_result_ds').query();
			}
		]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CON922"/>
        <a:dataSets>
            <a:dataSet id="inflow_ds">
                <a:datas>
                    <a:record name="INFLOW" code="INFLOW"/>
                    <a:record name="OUTFLOW" code="OUTFLOW"/>
                </a:datas>
            </a:dataSet>
            <a:dataSet id="con_write_off_ds" lookupCode="CON_WRITE_OFF_FLAG"/>
            <a:dataSet id="rent_payment_query_ds">
                <a:fields>
                    <a:field name="bp_name"/>
                    <a:field name="project_number"/>
                    <a:field name="contract_number"/>
                    <a:field name="dd_bank_account_name"/>
                    <a:field name="cf_direction_pic_n" displayField="name" options="inflow_ds" returnField="cf_direction_pic" valueField="code"/>
                    <a:field name="cf_direction_pic"/>
                    <a:field name="times"/>
                    <a:field name="write_off_flag_n" defaultValue="全部核销" displayfield="code_value_name" options="con_write_off_ds" returnfield="write_off_flag_n" valuefield="code_value_name"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="rent_payment_result_ds" autoQuery="true" model="cont.CON922.rent_payment" queryDataSet="rent_payment_query_ds">
                <a:fields>
                    <a:field name="bp_name"/>
                    <a:field name="project_number"/>
                    <a:field name="contract_number"/>
                    <a:field name="dd_bank_account_name"/>
                    <a:field name="cf_direction_pic"/>
                    <a:field name="cf_item_n"/>
                    <a:field name="id_card_no"/>
                    <a:field name="times"/>
                    <a:field name="due_date"/>
                    <a:field name="due_amount"/>
                    <a:field name="principal"/>
                    <a:field name="interest"/>
                    <a:field name="last_received_date"/>
                    <a:field name="received_amount"/>
                    <a:field name="received_principal"/>
                    <a:field name="received_interest"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenTopToolbar>
            <a:screenTitle/>
            <a:gridButton click="rent_payment_query_result_ds" text="查询"/>
        </a:screenTopToolbar>
        <a:form column="4" labelWidth="100" marginWidth="30" title="租金收支查询">
            <a:textField name="bp_name" bindTarget="rent_payment_query_ds" prompt="付款人"/>
            <a:textField name="project_number" bindTarget="rent_payment_query_ds" prompt="申请编号"/>
            <a:textField name="contract_number" bindTarget="rent_payment_query_ds" prompt="合同编号"/>
            <a:textField name="cf_item_n" bindTarget="rent_payment_query_ds" prompt="费用类型"/>
            <a:textField name="id_card_no" bindTarget="rent_payment_query_ds" prompt="承租人身份证"/>
            <a:comboBox name="write_off_flag_n" bindTarget="rent_payment_query_ds" prompt="核销标志"/>
            <!-- <a:textField name="cf_direction_pic" bindTarget="rent_payment_query_ds" prompt="收付标示"/> -->
            <a:comboBox name="cf_direction_pic_n" bindTarget="rent_payment_query_ds" prompt="收付标示"/>
            <a:datePicker name="due_date_from" bindTarget="rent_payment_query_ds" prompt="预计收款日从"/>
            <a:datePicker name="due_date_to" bindTarget="rent_payment_query_ds" prompt="预计收款日到"/>
            <a:datePicker name="last_received_date_from" bindTarget="rent_payment_query_ds" prompt="收支日期从"/>
            <a:datePicker name="last_received_date_to" bindTarget="rent_payment_query_ds" prompt="收支日期到"/>
        </a:form>
        <a:grid id="grid_id" bindTarget="rent_payment_result_ds" marginHeight="230" marginWidth="30" navBar="true">
            <a:toolBar>
                <!-- <a:button type="add"/>
                <a:button type="save"/>
                <a:button type="delete"/> -->
                <a:button type="excel"/>
                <!--  <a:button type="clear"/> -->
            </a:toolBar>
            <a:columns>
                <a:column name="project_number" prompt="申请编号" width="100"/>
                <a:column name="contract_number" prompt="合同编号" width="160"/>
                <a:column name="bp_name_n" prompt="经销商" width="160"/>
                <a:column name="bp_name" prompt="付款人" width="80"/>
                <a:column name="dd_bank_account_name" prompt="收款人" width="80"/>
                <a:column name="withhold_way_n" prompt="代扣方式" width="100"/>
                <a:column name="dd_remark" prompt="大额行号" width="150"/>
                <a:column name="direct_debit_bank_id" prompt="自动扣款银行" width="150"/>
                <a:column name="dd_bank_account_num" prompt="自动扣款账号" width="150"/>
                <a:column name="dd_bank_branch_name" prompt="自动扣款分行名称" width="150"/>
                <a:column name="id_card_no" prompt="承租人身份证" width="150"/>
                <a:column name="cf_direction_pic" prompt="收付标示" width="100"/>
                <a:column name="cf_item_n" prompt="费用类型" width="80"/>
                <a:column name="times" prompt="期数" width="60"/>
                <a:column name="due_date" prompt="计划收支日" renderer="Leaf.formatDate" width="100"/>
                <a:column name="due_amount" prompt="计划金额" renderer="Leaf.formatMoney" width="80"/>
                <a:column name="principal" prompt="计划本金" renderer="Leaf.formatMoney" width="80"/>
                <a:column name="interest" prompt="计划利息" renderer="Leaf.formatMoney" width="80"/>
                <a:column name="last_received_date" prompt="收支日期" renderer="Leaf.formatDate" width="100"/>
                <a:column name="received_amount" prompt="已核销金额" renderer="Leaf.formatMoney" width="80"/>
                <a:column name="received_principal" prompt="已收本金" renderer="Leaf.formatMoney" width="80"/>
                <a:column name="received_interest" prompt="已收利息" renderer="Leaf.formatMoney" width="80"/>
                <a:column name="overdue_days" prompt="逾期天数" width="80"/>
            </a:columns>
        </a:grid>
        <a:hBox/>
    </a:view>
</a:screen>