mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-31 05:25:32 +08:00
47 lines
1.6 KiB
HTML
47 lines
1.6 KiB
HTML
<!--
|
|
Copyright 2012-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.
|
|
-->
|
|
|
|
<{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>
|