<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2013-12-3 下午04:57:12  
    $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:view>
        <a:link id="hls312_bp_legal_download_link" url="${/request/@context_path}/downloadFile.lview"/>
        <script type="text/javascript"><![CDATA[
            function hls_bp_credit_info_req_download_ren(value, record, name) {
                var legal_info_req_id = record.get('legal_info_req_id');
                var table_name;
                if (name == 'hls_bp_legal_pste_attach') {
                    table_name = 'HLS_BP_CREDIT_INFO_REQ_PSTE';
                } else if (name == 'hls_bp_legal_fl_reg_attach') {
                    table_name = 'HLS_BP_CREDIT_INFO_REQ_FL_REG';
                } else if (name == 'hls_bp_legal_ac_pledge_attach') {
                    table_name = 'HLS_BP_CREDIT_INFO_REQ_AC_PLEDGE';
                } else {
                    return;
                }
                return '<a href="javascript:open_query_result_attach_win(' + legal_info_req_id + ',\'' + table_name + '\')">' + '${l:HLS.ATTACHMENT}' + '</a>';
            }
            
            function open_query_result_attach_win(legal_info_req_id, table_name) {
                new Leaf.Window({
                    id: 'legal_info_req_win_download',
                    url: $('hls312_bp_legal_download_link').getUrl() + '?header_id=' + legal_info_req_id + '&table_name=' + table_name,
                    title: '${l:HLS.SUPPORTING_DOCUMENT}',
                    width: 850,
                    height: 400
                });
            }
        ]]></script>
        <style><![CDATA[
			.item-label{
				font-size:14px;
				text-decoration:underline;
			}
		]]></style>
        <a:screenBody>
            <a:placeHolder id="legal_query_result_ph"/>
        </a:screenBody>
    </a:view>
    <a:view-config>
        <c:create-config targetId="legal_query_result_ph">
            <p:switch test="/parameter/@bp_class">
                <p:case value="ORG">
                    <c:process-config>
                        <a:fieldSet column="3" labelWidth="120" title="HLS212.PSTE_LEGAL_INFO" width="780">
                            <a:datePicker name="pste_query_date" bindTarget="hls_bp_legal_org_result_ds" prompt="HLS212.QUERY_DATE" readOnly="true"/>
                            <a:textField name="pste_note" bindTarget="hls_bp_legal_org_result_ds" colspan="2" prompt="HLS.COMMENT" readOnly="true" width="400"/>
                            <a:label name="hls_bp_legal_pste_attach" bindTarget="hls_bp_legal_org_result_ds" prompt="" readOnly="true" renderer="hls_bp_credit_info_req_download_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_org_result_ds" prompt="HLS212.QUERY_DATE" readOnly="true"/>
                            <a:textField name="fl_reg_note" bindTarget="hls_bp_legal_org_result_ds" colspan="2" prompt="HLS.COMMENT" readOnly="true" width="400"/>
                            <a:label name="hls_bp_legal_fl_reg_attach" bindTarget="hls_bp_legal_org_result_ds" prompt="" readOnly="true" renderer="hls_bp_credit_info_req_download_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_org_result_ds" prompt="HLS212.QUERY_DATE" readOnly="true"/>
                            <a:textField name="ac_pledge_note" bindTarget="hls_bp_legal_org_result_ds" colspan="2" prompt="HLS.COMMENT" readOnly="true" width="400"/>
                            <a:label name="hls_bp_legal_ac_pledge_attach" bindTarget="hls_bp_legal_org_result_ds" prompt="" readOnly="true" renderer="hls_bp_credit_info_req_download_ren"/>
                        </a:fieldSet>
                    </c:process-config>
                </p:case>
                <p:case value="NP">
                    <c:process-config>
                        <a:fieldSet column="3" labelWidth="120" title="HLS212.PSTE_LEGAL_INFO" width="780">
                            <a:datePicker name="pste_query_date" bindTarget="hls_bp_legal_np_result_ds" prompt="HLS212.QUERY_DATE" readOnly="true"/>
                            <a:textField name="pste_note" bindTarget="hls_bp_legal_np_result_ds" colspan="2" prompt="HLS.COMMENT" readOnly="true" width="400"/>
                            <a:label name="hls_bp_legal_pste_attach" bindTarget="hls_bp_legal_np_result_ds" prompt="" readOnly="true" renderer="hls_bp_credit_info_req_download_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_np_result_ds" prompt="HLS212.QUERY_DATE" readOnly="true"/>
                            <a:textField name="fl_reg_note" bindTarget="hls_bp_legal_np_result_ds" colspan="2" prompt="HLS.COMMENT" readOnly="true" width="400"/>
                            <a:label name="hls_bp_legal_fl_reg_attach" bindTarget="hls_bp_legal_np_result_ds" prompt="" readOnly="true" renderer="hls_bp_credit_info_req_download_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_np_result_ds" prompt="HLS212.QUERY_DATE" readOnly="true"/>
                            <a:textField name="ac_pledge_note" bindTarget="hls_bp_legal_np_result_ds" colspan="2" prompt="HLS.COMMENT" readOnly="true" width="400"/>
                            <a:label name="hls_bp_legal_ac_pledge_attach" bindTarget="hls_bp_legal_np_result_ds" prompt="" readOnly="true" 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>
