Files
OMS/app/archive/view/archive.html
2026-01-04 17:22:44 +08:00

95 lines
3.0 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 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.
-->
<style>
.notice a {color: blue; font-size: 12px; font-weight: 700;margin-left: 4px; margin-right: 4px;}
.notify {border-color: #FFD324;font-size: 12px; }
.processBarBg {border:1px solid #999999; width:98%; margin:5px; height:25px;line-height:25px;padding:1px; background:#EEEEEE;}
.processBar {background:#3366cc; width:0px; padding-bottom:1px;overflow:hidden;}
</style>
<p></p>
<h4>数据归档</h4>
<div class="division" id="information">
本次获取大约 <span id="iTotal" style="color:#083E96"><{$pagenum}></span> 页订单每页500条 ,共<{$total}> 条订单
</div>
<div id="processBarBg" class="processBarBg">
<div id="processBar" class="processBar">
&nbsp;
</div>
</div>
<div class="table-action">
<{if $total>0}>
<{button label="开始" type="botton" name="Start" id="btn-run"}>
<{/if}>
</div>
<script>
var currentTime = <{$currentTime}>;
if ($('btn-run'))
{
$('btn-run').addEvent('click', function(){
doRun();
});
}
function doRun() {
doTotal = 0;
displayProcessInfo();
$('btn-run').disabled = true;
$('btn-run').set('html', '<span><span>数据处理中,请稍候!</span></span>');
doAjaxProcess(1);
}
/**
* 显示信息进度
*/
function displayProcessInfo() {
$('iTotal').set('html', getTotal());
}
function getTotal() {
displayTotal = '<{$pagenum}>';
return displayTotal;
}
function doAjaxProcess(idx) {
if (doTotal >= getTotal()) {
$('processBar').setStyle('width', '100%');
$('btn-run').set('html', '<span><span>处理已完成,关闭窗口!</span></span>');
setTimeout("$('btn-run').getParent('.dialog').retrieve('instance').close();",2000);
} else {
new Request({url:'index.php?app=archive&ctl=order&act=ajaxDoAuto',method:'post',data:'<{$params}>',
onComplete:function(result){
if(!result) return;
doTotal++;
displayProcessInfo();
$('processBar').setStyle('width', (doTotal*100/(getTotal())) + '%');
doAjaxProcess(idx+1);
}
}).send();
}
}
</script>