<?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_legal_info_req_query" rootPath="hls_bp_legal_info_req_rp"/>
    </a:init-procedure>
    <a:view>
        <a:link id="hld214_bp_legal_download_link" url="${/request/@context_path}/downloadFile.lview"/>
        <script type="text/javascript"><![CDATA[
            function hls_bp_credit_info_req_upload_ren(value, record, name) {
                if (name == 'hls_bp_legal_pste_attach') {
                    if (record.get('legal_info_req_id')) {
                        return '<a href="javascript:pste_down_win(' + record.get('legal_info_req_id') + ')">' + '${l:HLS.ATTACHMENT}' + '</a>';
                    }
                } else if (name == 'hls_bp_legal_fl_reg_attach') {
                    if (record.get('legal_info_req_id')) {
                        return '<a href="javascript:fl_reg_down_win(' + record.get('legal_info_req_id') + ')">' + '${l:HLS.ATTACHMENT}' + '</a>';
                    }
                } else if (name == 'hls_bp_legal_ac_pledge_attach') {
                    if (record.get('legal_info_req_id')) {
                        return '<a href="javascript:ac_pledge_down_win(' + record.get('legal_info_req_id') + ')">' + '${l:HLS.ATTACHMENT}' + '</a>';
                    }
                }
            
            }
            
            
            function pste_down_win(legal_info_req_id) {
                new Leaf.Window({
                    id: 'legal_info_req_win_download',
                    url: $('hld214_bp_legal_download_link').getUrl() + '?header_id=' + legal_info_req_id + '&table_name=HLS_BP_CREDIT_INFO_REQ_PSTE',
                    title: '${l:HLS.SUPPORTING_DOCUMENT}',
                    width: 850,
                    height: 400
                });
            }
            
            function fl_reg_down_win(legal_info_req_id) {
                new Leaf.Window({
                    id: 'legal_info_req_win_download',
                    url: $('hld214_bp_legal_download_link').getUrl() + '?header_id=' + legal_info_req_id + '&table_name=HLS_BP_CREDIT_INFO_REQ_FL_REG',
                    title: '${l:HLS.SUPPORTING_DOCUMENT}',
                    width: 850,
                    height: 400
                });
            }
            
            function ac_pledge_down_win(legal_info_req_id) {
                new Leaf.Window({
                    id: 'legal_info_req_win_download',
                    url: $('hld214_bp_legal_download_link').getUrl() + '?header_id=' + legal_info_req_id + '&table_name=HLS_BP_CREDIT_INFO_REQ_AC_PLEDGE',
                    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_legal_info_req_result_ds" fetchAll="true" loadData="true" model="hls.HLS214.hls_bp_legal_info_req_query">
                <a:fields>
                    <a:field name="pste_query_date" readOnly="true"/>
                    <a:field name="fl_reg_query_date" readOnly="true"/>
                    <a:field name="ac_pledge_query_date" readOnly="true"/>
                    <a:field name="pste_note" readOnly="true"/>
                    <a:field name="fl_reg_note" readOnly="true"/>
                    <a:field name="ac_pledge_note" readOnly="true"/>
                    <a:field name="hls_bp_legal_pste_attach" defaultValue="附件" readOnly="true"/>
                    <a:field name="hls_bp_legal_fl_reg_attach" defaultValue="附件" readOnly="true"/>
                    <a:field name="hls_bp_legal_ac_pledge_attach" defaultValue="附件" readOnly="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:form title="HLS212.REQUEST_INFO">
                <a:placeHolder id="hls_bp_legal_info_req_ph"/>
                <a:fieldSet column="3" labelWidth="120" title="HLS212.PSTE_LEGAL_INFO" width="780">
                    <a:datePicker name="pste_query_date" bindTarget="hls_bp_legal_info_req_result_ds" prompt="HLS212.QUERY_DATE"/>
                    <a:textField name="pste_note" bindTarget="hls_bp_legal_info_req_result_ds" colspan="2" prompt="HLS.COMMENT" width="300"/>
                    <a:label name="hls_bp_legal_pste_attach" bindTarget="hls_bp_legal_info_req_result_ds" prompt="" renderer="hls_bp_credit_info_req_upload_ren"/>
                </a:fieldSet>
                <a:fieldSet column="3" labelWidth="120" title="HLS212.FL_REG_LEGAL_INFO" width="780">
                    <a:datePicker name="fl_reg_query_date" bindTarget="hls_bp_legal_info_req_result_ds" prompt="HLS212.QUERY_DATE"/>
                    <a:textField name="fl_reg_note" bindTarget="hls_bp_legal_info_req_result_ds" colspan="2" prompt="HLS.COMMENT" width="300"/>
                    <a:label name="hls_bp_legal_fl_reg_attach" bindTarget="hls_bp_legal_info_req_result_ds" prompt="" renderer="hls_bp_credit_info_req_upload_ren"/>
                </a:fieldSet>
                <a:fieldSet column="3" labelWidth="120" title="HLS212.AC_PLEDGE_LEGAL_INFO" width="780">
                    <a:datePicker name="ac_pledge_query_date" bindTarget="hls_bp_legal_info_req_result_ds" prompt="HLS212.QUERY_DATE"/>
                    <a:textField name="ac_pledge_note" bindTarget="hls_bp_legal_info_req_result_ds" colspan="2" prompt="HLS.COMMENT" width="300"/>
                    <a:label name="hls_bp_legal_ac_pledge_attach" bindTarget="hls_bp_legal_info_req_result_ds" prompt="" renderer="hls_bp_credit_info_req_upload_ren"/>
                </a:fieldSet>
            </a:form>
        </a:screenBody>
    </a:view>
    <a:view-config>
        <c:create-config targetId="hls_bp_legal_info_req_ph">
            <p:switch test="/model/hls_bp_legal_info_req_rp/record/@bp_class">
                <p:case value="ORG">
                    <c:process-config>
                        <a:fieldSet column="2" labelWidth="120" title="HLS212.REQUEST_INFO">
                            <a:textField name="bp_code" bindTarget="hls_bp_legal_info_req_result_ds" prompt="HLS.BP_CODE" readOnly="true"/>
                            <a:textField name="bp_name" bindTarget="hls_bp_legal_info_req_result_ds" prompt="HLS.BP_NAME" readOnly="true" width="200"/>
                            <a:textField name="bp_class_desc" bindTarget="hls_bp_legal_info_req_result_ds" prompt="HLS.BP_CLASS" readOnly="true"/>
                            <a:textField name="organization_code" bindTarget="hls_bp_legal_info_req_result_ds" prompt="HLS212.ORGANIZATION_CODE" readOnly="true" width="200"/>
                        </a:fieldSet>
                    </c:process-config>
                </p:case>
                <p:case value="NP">
                    <c:process-config>
                        <a:fieldSet column="2" labelWidth="120" title="HLS212.REQUEST_INFO">
                            <a:textField name="bp_code" bindTarget="hls_bp_legal_info_req_result_ds" prompt="HLS.BP_CODE" readOnly="true"/>
                            <a:textField name="bp_name" bindTarget="hls_bp_legal_info_req_result_ds" prompt="HLS.BP_NAME" readOnly="true" width="200"/>
                            <a:textField name="bp_class_desc" bindTarget="hls_bp_legal_info_req_result_ds" prompt="HLS.BP_CLASS" readOnly="true"/>
                            <a:textField name="id_card_no" bindTarget="hls_bp_legal_info_req_result_ds" prompt="HLS212.LEGAL_ID_NO" readOnly="true" width="200"/>
                        </a:fieldSet>
                    </c:process-config>
                </p:case>
            </p:switch>
        </c:create-config>
    </a:view-config>
</a:screen>
