<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <a:link id="general_upload_excel_control_link" url="${/request/@context_path}/modules/acr/ACR520/acr_invoice_excel_execute.lview"/>
        <script type="text/javascript"><![CDATA[
            function saveClick() {
                if (document.getElementById('general_importFile').value) {
                    var fileName = document.getElementById('general_importFile').value;
                    var fileType = fileName.substr(fileName.lastIndexOf("."));
                    if (fileType != '.xls' && fileType != '.xlsx') {
                        alert('请选择正确的导入文件!');
                    } else {
                        document.getElementById('general_importForm').submit();
                    }
                }
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="csh713_label_ds" autoCreate="true">
                <a:fields>
                    <a:field name="label2" defaultValue="1、请严格按照导入模板整理数据,检查必输项是否缺失。"/>
                    <a:field name="label3" defaultValue="2、目前仅支持 MS Excel。"/>
                    <a:field name="label4" defaultValue="3、执行导入前,请先关闭Excel文件。"/>
                    <a:field name="label6" defaultValue="4、导入完毕后,请在系统中核对数据。"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:fieldSet style="margin-left:10px;margin-top:10px;" title="注意事项" width="400">
            <!--<a:label name="label1" bindTarget="label_ds" width="380"/>-->
            <a:label name="label2" bindTarget="csh713_label_ds" style="margin-left:10px;" width="380"/>
            <a:label name="label3" bindTarget="csh713_label_ds" style="margin-left:10px;" width="380"/>
            <a:label name="label4" bindTarget="csh713_label_ds" style="margin-left:10px;" width="380"/>
            <a:label name="label6" bindTarget="csh713_label_ds" style="margin-left:10px;" width="380"/>
        </a:fieldSet>
        <a:fieldSet style="margin-left:10px;margin-top:10px;" title="导入文件" width="400">
            <form name="upload" id="general_importForm" action="acr_invoice_excel_execute.lview" enctype="multipart/form-data" method="post">
                <input name="CONTENT" id="general_importFile" style="margin-bottom:4px;width:250px;height:22px;" type="file"/>
                <input onclick="saveClick()" style="margin-left:10px;margin-top:10px;width:60px;" type="button" value="导入"/>
            </form>
        </a:fieldSet>
    </a:view>
</a:screen>