mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-31 05:25:32 +08:00
66 lines
2.1 KiB
HTML
66 lines
2.1 KiB
HTML
<!--
|
||
Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||
See LICENSE file for license details.
|
||
-->
|
||
|
||
<form method="POST" action="<{$url}>&finder_vid=<{$env.get.finder_vid}>&finder_id=<{$env.get.finder_id}>" enctype="multipart/form-data" id="import-form">
|
||
<{toinput from=$env.post}>
|
||
<div class="tableform" id="upload">
|
||
<div class="division">
|
||
<table border="0" cellpadding="0" cellspacing="0" class="">
|
||
<tr>
|
||
<th>
|
||
下载模板:
|
||
</th>
|
||
<td style="text-align:left;">
|
||
<a target="_blank" href="<{$tmp_url}>">点击下载</a>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="division">
|
||
<table border="0" cellpadding="0" cellspacing="0" class="">
|
||
<tr>
|
||
<th>
|
||
导入文件:
|
||
</th>
|
||
<td style="text-align:left;">
|
||
<input type='file' name='import_file' id='ImportCSV' />
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="table-action">
|
||
<input type='hidden' id="import_type" name='import_type' value='add'/>
|
||
<{button label='导入' id="ImportBtn" class="btn-primary" type="submit"}>
|
||
<{button label='关闭' id="stopBtn" class="btn-secondary" type="button" isCloseDialogBtn="true" }>
|
||
</div>
|
||
|
||
<div class="notice-inline"><span id="iMsg" style="color:red;"></span></div>
|
||
|
||
<div class="error" style="display: none;"></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';
|
||
});
|
||
$('import-form').store('target', {
|
||
onComplete:function(resp){
|
||
state=false;
|
||
$('ImportBtn').style.cursor='pointer';
|
||
}
|
||
});
|
||
})();
|
||
</script>
|