<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2013-11-27 下午04:18:59  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:c="leaf.application.action" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
    <a:init-procedure>
        <a:model-query fetchAll="true" model="hls.HLS214.hls_bp_credit_info_req_query" rootPath="hls_bp_credit_info_req_rp"/>
    </a:init-procedure>
    <a:view>
        <a:link id="hld214_bp_credit_download_link" url="${/request/@context_path}/downloadFile.lview"/>
        <script type="text/javascript"><![CDATA[
            function hls_bp_credit_info_req_down_ren(value, record, name) {
                if (record.get('credit_info_req_id')) {
                    return '<a href="javascript:credit_down_win(' + record.get('credit_info_req_id') + ')">' + '${l:HLS.ATTACHMENT}' + '</a>';
                }
            }
            
            function credit_down_win(credit_info_req_id){
                new Leaf.Window({
                    id: 'credit_info_req_win_download',
                    url: $('hld214_bp_credit_download_link').getUrl() + '?header_id=' + credit_info_req_id + '&table_name=HLS_BP_CREDIT_INFO_REQ_FINANCE',
                    title: '${l:HLS.SUPPORTING_DOCUMENT}',
                    width: 850,
                    height: 400
                });
            }
            
            function hls_bp_credit_info_req_download_ren(value, record, name) {
                if (record.get('credit_info_req_id')) {
                    return '<a href="javascript:download_req(' + record.get('credit_info_req_id') + ')">' + '${l:HLS.ATTACHMENT}' + '</a>';
                }
            }
            
           
            
            function download_req(credit_info_req_id) {
                new Leaf.Window({
                    id: 'credit_info_req_win_download',
                    url: $('hld214_bp_credit_download_link').getUrl() + '?header_id=' + credit_info_req_id + '&table_name=HLS_BP_CREDIT_INFO_REQ',
                    title: '${l:HLS.SUPPORTING_DOCUMENT}',
                    width: 850,
                    height: 400
                });
            }
         
            
           
        ]]></script>
        <style><![CDATA[
			.item-label{
				font-size:14px;
				text-decoration:underline;
			}
		]]></style>
        <a:dataSets>
            <a:dataSet id="hls_bp_credit_info_req_result_ds" fetchAll="true" loadData="true" model="hls.HLS214.hls_bp_credit_info_req_query">
                <a:fields>
                    <a:field name="query_date" required="true"/>
                    <a:field name="hls_bp_credit_apply_attach" defaultValue="HLS.ATTACHMENT"/>
                    <a:field name="hls_bp_credit_apply_req_attach" defaultValue="附件"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:form title="HLS212.REQUEST_INFO">
                <a:placeHolder id="hls_bp_credit_info_req_ph"/>
                <a:fieldSet column="3" labelWidth="120" title="CON305.SEARCH_RESULT">
                    <a:datePicker name="query_date" bindTarget="hls_bp_credit_info_req_result_ds" prompt="HLS212.QUERY_DATE" readOnly="true"/>
                    <a:textField name="description" bindTarget="hls_bp_credit_info_req_result_ds" colspan="2" prompt="HLS.COMMENT" readOnly="true" width="400"/>
                    <a:label name="hls_bp_credit_apply_req_attach" bindTarget="hls_bp_credit_info_req_result_ds" prompt="" renderer="hls_bp_credit_info_req_down_ren"/>
                </a:fieldSet>
            </a:form>
        </a:screenBody>
    </a:view>
    <a:view-config>
        <c:create-config targetId="hls_bp_credit_info_req_ph">
            <p:switch test="/model/hls_bp_credit_info_req_rp/record/@bp_class">
                <p:case value="ORG">
                    <c:process-config>
                        <a:fieldSet column="3" labelWidth="120" title="HLS212.REQUEST_INFO">
                            <a:textField name="bp_code" bindTarget="hls_bp_credit_info_req_result_ds" prompt="HLS.BP_CODE" readOnly="true"/>
                            <a:textField name="bp_name" bindTarget="hls_bp_credit_info_req_result_ds" prompt="HLS.BP_NAME" readOnly="true"/>
                            <a:textField name="bp_class_desc" bindTarget="hls_bp_credit_info_req_result_ds" prompt="HLS.BP_CLASS" readOnly="true"/>
                            <a:textField name="loan_card_num" bindTarget="hls_bp_credit_info_req_result_ds" prompt="HLS212.LOAN_CARD_NUM" readOnly="true"/>
                            <a:textField name="loan_card_num_pwd" bindTarget="hls_bp_credit_info_req_result_ds" prompt="HLS212.LOAN_CARD_PWD" readOnly="true"/>
                            <a:textField name="organization_code" bindTarget="hls_bp_credit_info_req_result_ds" prompt="HLS212.ORGANIZATION_CODE" readOnly="true"/>
                        </a:fieldSet>
                    </c:process-config>
                </p:case>
                <p:case value="NP">
                    <c:process-config>
                        <a:fieldSet column="3" labelWidth="120" title="HLS212.REQUEST_INFO">
                            <a:textField name="bp_code" bindTarget="hls_bp_credit_info_req_result_ds" prompt="HLS.BP_CODE" readOnly="true"/>
                            <a:textField name="bp_name" bindTarget="hls_bp_credit_info_req_result_ds" prompt="HLS.BP_NAME" readOnly="true"/>
                            <a:textField name="bp_class_desc" bindTarget="hls_bp_credit_info_req_result_ds" prompt="HLS.BP_CLASS" readOnly="true"/>
                            <a:textField name="id_card_no" bindTarget="hls_bp_credit_info_req_result_ds" prompt="HLS212.LEGAL_ID_NO" readOnly="true"/>
                            <a:label name="hls_bp_credit_apply_attach" bindTarget="hls_bp_credit_info_req_result_ds" prompt="" renderer="hls_bp_credit_info_req_download_ren"/>
                        </a:fieldSet>
                    </c:process-config>
                </p:case>
            </p:switch>
        </c:create-config>
    </a:view-config>
</a:screen>
