Files
OMS/app/desktop/view/common/import.html
2025-12-28 23:13:25 +08:00

36 lines
1.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--
Copyright © ShopeX http://www.shopex.cn. All rights reserved.
See LICENSE file for license details.
-->
<{if $use_import_template}>
<form method="post" action="index.php?app=<{$env.get.app}>&ctl=<{$env.get.ctl}>&act=exportTemplate" class="tableform" target="download" enctype="multipart/form-data">
模板下载:
<button class="btn btn-primary" type="submit"><span><span>下载</span></span></button>
</form>
<{/if}>
<form action='<{$thisUrl}>&action=to_import' method='post' target="uploadframe" enctype="multipart/form-data" id="import_form" class="tableform">
<h4><{t}>上传.CSV文件<{/t}></h4>
<div class="division" >
<input type='file' name='import_file' id='ImportCSV'/>
</div>
<div class="table-action">
<{button label=$___desktop="导入"|t:'desktop' id="ImportBtn" type="submit"}>
</div>
</form>
<script>
(function(){
var state;
$('ImportBtn').addEvent('click',function(e){
if(state||!$('ImportCSV').value.length)return false;
state=true;
this.style.cursor='not-allowed';
});
$('ImportCSV').addEvent('change',function(e){
state=false;
$('ImportBtn').style.cursor='pointer';
});
})();
</script>