Files
OMS/app/pos/view/admin/iso/import.html
2026-01-04 17:22:44 +08:00

77 lines
2.6 KiB
HTML

<!--
Copyright 2026 ShopeX (https://www.shopex.cn)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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>