Files
OMS/app/finance/view/bill/bill_account_get.html
2026-01-04 19:08:31 +08:00

73 lines
3.1 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.
-->
<form method="post" action="index.php" id="add_form">
<input type="hidden" value='<{$json}>' id="json" />
<div>
<table class="gridlist" style="*width:97%;">
<tr>
<th><{t}>进度:<{/t}></th>
<td colspan='2'>
<div style="border:1px solid #CCC;width:360px;overflow:hidden;float:left;background:#FFF;padding:1px;">
<div id="processBar" style="background:#7493D1;width:1%;height:15px;">&nbsp;</div>
</div>&nbsp;<span id="processPercent">0%</span>
</td>
</table>
<table class="table-action" style="*width:97%;">
<tr>
<td colspan='2'>
<{button id="down1" class="btn-primary" label=$___b2c="开始"|t:'b2c' type="button"}>
<{button id="down2" class="btn-primary" label=$___b2c="下载中"|t:'b2c' type="button" style="display:none;"}>
<{button type="button" class="btn-secondary" id="return-btn" label="完成" style="display:none;" onclick="javascript:this.getParent('.dialog').retrieve('instance').close();"}></td>
</tr>
</table>
</div>
</form>
<script>
$('down1').addEvent('click',function(){
// $E('.btn-close',this.dialog_head).style.display = 'none';
uploadToTaobao(1);
});
function setProcessBar(id,w){
document.getElementById(id).style.width = w;
}
function uploadToTaobao(page_no){
var percent = '1%';
document.getElementById('return-btn').style.display="none";
document.getElementById('down1').style.display="none";
document.getElementById('down2').style.display="inline";
new Request({
url:'index.php?app=finance&ctl=bill_setting&act=do_bill_account_get',
data:'',
method:'post',
onSuccess:function(responseText){
var cd = responseText.split('@');
setProcessBar('processBar',Math.round(cd[1])+'%');
document.getElementById('processPercent').innerHTML = Math.round(cd[1])+'%';
if (cd[0] == 'finish') {
document.getElementById('down2').style.display="none";
document.getElementById('return-btn').style.display="inline";
}else{
document.getElementById('processPercent').innerHTML = '失败';
document.getElementById('return-btn').style.display="inline";
}
}
}).send();
}
</script>