Files
OMS/app/console/view/admin/vop/download_vopbill.html
2025-12-28 23:13:25 +08:00

99 lines
3.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.
-->
<div class="tableform">
<form id="custom-bill-sync">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<th style="width: auto;">店铺:</th>
<td><{input type="select" name="shop_id" rows=$shop valueColumn="shop_id" labelColumn="name" class="dailog-batch-ipt" required=1}></td>
</tr>
<tr>
<th style="width: auto;">VOP账单类型</th>
<td>
<select name="bill_type">
<option value="bills">账单</option>
<option value="items">货款账单</option>
<option value="discount">折扣账单</option>
</select>
</td>
</tr>
<tr>
<th style="width: auto;">唯品会账单号:</th>
<td><{input type="text" name="bill_number" class="dailog-batch-ipt" required=1}></td>
</tr>
<tr id="time-range">
<th style="width: auto;">开始时间:</th>
<td><{input type='time' name='start_time' class="dailog-batch-ipt" value=$start_time}></td>
</tr>
<tr id="time-range">
<th style="width: auto;">结束时间:</th>
<td><{input type='time' name='end_time' class="dailog-batch-ipt" value=$end_time}></td>
</tr>
</tbody>
</table>
</form>
<div class="division" style="display:none;" id="information">
<span id="iRequest"></span> <br />
<span id="iTotal" style="color:#083E96"></span> <br/>
<span id="iSucc" style="color:green"></span><br/>
<span id="iFail" style="color:red"></span>
</div>
<div class="console">
<p class="iErrsg"></p>
</div>
<div class="table-action">
<{button label="开始" class="btn-primary" name="Start" id="btn-run"}>
<{button label="关闭" class="btn-secondary" isCloseDialogBtn="true" }>
</div>
</div>
<{if $notice}><div class="notice"><{$notice}></div><{/if}>
<script>
(function(){
$('btn-run').addEvent('click', function(){
doRun();
});
var doTotal, doSucc, doFail;
function doRun(){
//$('information').style.display ='';
$('btn-run').disabled = true;
$('btn-run').set('html', '<span><span>数据处理中,请稍候!</span></span>');
doAjaxProcess(1);
}
/**
* 执行一次AJAX调用
*/
function doAjaxProcess(idx) {
//$('iRequest').set('html', idx);
new Request({url:'<{$request_url}>',method:'post',data:$('custom-bill-sync').toQueryString(),
onComplete:function(result){
var ret = JSON.decode(result);
if (ret['err_msg']) {
$E('.iErrsg').adopt(new Element('div',{html:ret['err_msg']}));
}else{
$('btn-run').set('html', '<span><span>处理已完成</span></span>');
//$('information').set('html', '处理已完成');
}
},
onRequest:function(){
$('btn-run').disabled = true;
$('btn-run').set('html', '<span><span>数据下载中,请稍候!</span></span>');
}
}).send();
}
}());
</script>