<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: lpc 9874
    $Date: 2017/11/20 14:35:56 $
    $Revision: 1.0 $
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure><![CDATA[     
    ]]></a:init-procedure>
    <a:view>
        <script type="text/javascript"><![CDATA[
            function choose_function(record) {
                if (!record.get('report_path')) {
                    return true;
                } else {
                    return false;
                }
            }
            
            function view_pdf(source_path) {
                var oWin = window.open(source_path);
            }
            
            function open_pdf_file(value, record, name) {
                if (value) {
                    return '<a href=javascript:view_pdf(\'' + value + '\')>' + '贷前审核报告-' + record.get('report_time') +'.pdf</a>';
                }
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="vfs_command_ds" autoQuery="true" fetchAll="false" model="hls.HLS235.t_td_report" pageSize="15" queryUrl="${/request/@context_path}/autocrud/hls.HLS235.t_td_report/query?bp_id=${/parameter/@bp_id}">
                <a:fields>
                    <a:field name="bp_name"/>
                    <a:field name="bp_category_n"/>
                    <a:field name="report_time"/>
                    <a:field name="report_path"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:grid bindTarget="vfs_command_ds" height="350" navBar="true" width="800">
                <!-- <a:toolBar>
                    <a:button type="delete"/>
                </a:toolBar> -->
                <a:columns>
                    <a:column name="bp_name" align="center" prompt="商业伙伴名称" width="150"/>
                    <a:column name="bp_category_n" align="center" prompt="商业伙伴类别" width="80"/>
                    <a:column name="report_time" align="center" prompt="请求时间" width="150"/>
                    <a:column name="report_path" align="center" prompt="文件预览" renderer="open_pdf_file" width="393"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>
