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

84 lines
2.5 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.
-->
<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>