<?xml version="1.0" encoding="UTF-8"?> <a:screen xmlns:a="http://www.leaf-framework.org/application"> <a:init-procedure/> <a:view> <script type="text/javascript"><![CDATA[ function saveClick(){ if (document.getElementById('importFile').value){ var fileName = document.getElementById('importFile').value; var fileType = fileName.substr(fileName.lastIndexOf(".")); //if (fileType != '.xls'||fileType != '.xlsx'){ //alert('请选择正确的导入文件!'); //} else { document.getElementById('importForm').submit(); //} } } ]]></script> <a:dataSets> <a:dataSet id="label_ds" autoCreate="true"> <a:fields> <a:field name="label2" defaultValue="${l:STRICT_IMPORTED_TEMPLATE_DATA}"/> <a:field name="label3" defaultValue="${l:PRODUCT_MASTER_DATA_IMPORT}"/> <a:field name="label4" defaultValue="${l:IMPORTER_ONLY_SUPPORTS}"/> <a:field name="label5" defaultValue="${l:READ_THE_ABOVE_CAREFULLY}"/> <a:field name="label6" defaultValue="${l:THE_IMPORT_IS_COMPLETE}"/> </a:fields> </a:dataSet> </a:dataSets> <a:fieldSet style="margin-left:10px;margin-top:10px;" title="导入注意事项" width="400"> <a:label name="label2" bindTarget="label_ds" style="margin-left:10px;" width="380"/> <a:label name="label3" bindTarget="label_ds" style="margin-left:10px;" width="380"/> <a:label name="label4" bindTarget="label_ds" style="margin-left:10px;" width="380"/> <a:label name="label5" bindTarget="label_ds" style="color:#055A78;font-weight:bold;margin-left:10px;" width="380"/> <a:label name="label6" bindTarget="label_ds" style="color:#055A78;font-weight:bold;margin-left:10px;" width="380"/> </a:fieldSet> <a:fieldSet style="margin-left:10px;margin-top:10px;" title="导入文件" width="400"> <form name="upload" id="importForm" action="import_trans_upload.lview?batch_id=${/parameter/@batch_id}&contract_id=${/parameter/@contract_id}&adj_start_times=${/parameter/@adj_start_times}" enctype="multipart/form-data" method="post"> <label style="margin-left:10px;margin-top:10px;"><![CDATA[请选择文件:]]></label> <input name="CONTENT" id="importFile" style="margin-bottom:4px;width:160px;height:22px;" type="file"/> <input onclick="saveClick()" style="margin-left:50px;margin-top:10px;width:60px;" type="button" value="导入"/> </form> </a:fieldSet> </a:view> </a:screen>