<?xml version="1.0" encoding="UTF-8"?>

<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure>
        <a:model-query fetchAll="true" model="basic.hls_lease_channel_for_lov" rootPath="con1350_lease_list"/>
        <a:model-query defaultWhereClause="t1.business_type in (&apos;LEASE&apos;,&apos;LEASEBACK&apos;)" fetchAll="true" model="basic.hls_business_type_for_lov" rootPath="business_type_path"/>
        <a:model-query fetchAll="true" model="cont.CON1350.con_req_status" rootPath="req_status_ds"/>
    </a:init-procedure>
    <a:view>
        <script type="text/javascript"><![CDATA[
        function con_delay_query() {
            $('con_delay_grid_ds').query();
        }

        function con_delay_reset(){
            $('con_delay_form_ds').reset();
        }

        function con_delay_export() {
            $('source_to_grid')._export();
        }


        ]]></script>
        <a:dataSet id="con1350_lease_channel_ds">
            <a:datas dataSource="/model/con1350_lease_list"/>
        </a:dataSet>
        <a:dataSet id="business_type_ds">
            <a:datas dataSource="/model/business_type_path"/>
        </a:dataSet>
        <a:dataSet id="req_status_ds">
            <a:datas dataSource="/model/req_status_ds"/>
        </a:dataSet>
        <a:dataSets>
            <a:dataSet id="con_delay_form_ds">
                <a:fields>
                    <a:field name="lease_channel_n" displayField="description" options="con1350_lease_channel_ds"
                             returnField="lease_channel" valueField="lease_channel"/>
                    <a:field name="lease_channel" />
                    <a:field name="business_type_n" displayField="description" options="business_type_ds" returnField="business_type" valueField="business_type"/>
                    <a:field name="business_type" />
                    <a:field name="req_status_n" displayField="value_name" options="req_status_ds" returnField="req_status" valueField="value_code" defaultValue="审批通过"/>
                    <a:field name="req_status" defaultValue="APPROVED"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="con_delay_grid_ds"
                       model="cont.CON1350.con_delay_form"
                       queryDataSet="con_delay_form_ds" selectable="true" selectionModel="single">
            </a:dataSet>
        </a:dataSets>

        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="con_delay_query" text="查询"/>
                <a:gridButton click="con_delay_reset" text="重置"/>
                <a:gridButton click="con_delay_export" text="导出"/>
            </a:screenTopToolbar>
            <a:form column="4" marginWidth="100" title="查询条件">
                <a:textField name="contract_number" bindTarget="con_delay_form_ds" prompt="合同编号"/>
                <a:textField name="bp_agent_name" bindTarget="con_delay_form_ds" prompt="代理商名称" />
                <a:textField name="extra_nam" bindTarget="con_delay_form_ds" prompt="代理商简称" />
                <a:numberField name="repayment_date_day" bindTarget="con_delay_form_ds" prompt="还款日" allowDecimals="false"/>
                <a:datePicker name="req_date_from" bindTarget="con_delay_form_ds" prompt="申请日期从"/>
                <a:datePicker name="req_date_to" bindTarget="con_delay_form_ds" prompt="申请日期到"/>
                <a:datePicker name="delay_deal_time_from" bindTarget="con_delay_form_ds" prompt="延期处理日期从"/>
                <a:datePicker name="delay_deal_time_to" bindTarget="con_delay_form_ds" prompt="延期处理日期到"/>
                <a:comboBox name="req_status_n" bindTarget="con_delay_form_ds" prompt="申请状态" />
            </a:form>
            <a:grid id="source_to_grid" bindTarget="con_delay_grid_ds" navBar="true" height="400" marginWidth="100">
                <a:columns>
                    <a:column name="change_req_number" align="center" prompt="变更申请编号" width="130"/>
                    <a:column name="bp_agent_name" align="center" prompt="代理商名称" width="100"/>
                    <a:column name="extra_nam" align="center" prompt="代理商简称" width="100" />
                    <a:column name="bp_name" align="center" prompt="客户名称" width="100"/>
                    <a:column name="contract_number" align="center" prompt="合同编号" width="100"/>
                    <a:column name="business_type_n" align="center" prompt="业务类型" width="100"/>
                    <a:column name="lease_channel_n" align="center" prompt="商业模式" width="100"/>
                    <a:column name="lease_execution_date" align="center" prompt="执行日期" width="100" renderer="Leaf.formatDate"/>
                    <a:column name="repayment_date_day" align="center" prompt="还款日" width="100"/>
                    <a:column name="lease_times" align="center" prompt="变更后融资期数" width="100"/>
                    <a:column name="delay_type_n" align="center" prompt="延期类型" width="100"/>
                    <a:column name="start_date" align="center" prompt="延期开始日期" width="100" renderer="Leaf.formatDate"/>
                    <a:column name="end_date" align="center" prompt="延期结束日期" width="100" renderer="Leaf.formatDate"/>
                    <a:column name="req_date" align="center" prompt="申请日期" width="100" renderer="Leaf.formatDate"/>
                    <a:column name="delay_deal_time" align="center" prompt="延期处理日期" width="100" renderer="Leaf.formatDate"/>
                    <a:column name="delay_month_rent" align="center" prompt="延期月租金" width="100" renderer="Leaf.formatMoney"/>
                    <a:column name="req_status_n" align="center" prompt="申请状态" width="100"/>
                    <a:column name="due_amount" align="center" prompt="手续费应收" width="100" renderer="Leaf.formatMoney"/>
                    <a:column name="received_amount" align="center" prompt="手续费实收" width="100" renderer="Leaf.formatMoney"/>
                    <a:column name="created_by_n" align="center" prompt="操作人" width="100"/>
                    <a:column name="contract_status_n" align="center" prompt="合同状态" width="100"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>