Files
OMS/app/ome/view/admin/order/timing.html
2026-01-04 19:08:31 +08:00

76 lines
2.5 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 action="index.php?app=ome&ctl=admin_order_auto&act=doTimingConfirm" method="post" id="disForm">
<table class="tableform">
<tbody>
<tr>
<td colspan="2" style="color:red">设置后在定时审单生效前无法手工获取订单,针对所有明细生效</td>
</tr>
<tr>
<th>定时审单时间:</th>
<td>
<{input type="date" name="timing_confirm_time" vtype="date" }>
</td>
</tr>
<tr>
<th></th>
<td>
<{foreach from=$orderIds key=key item=item}>
<input type="hidden" name='order_id[]' value=<{$item}> />
<{/foreach}>
</td>
</tr>
</tbody>
</table>
</form>
<{area inject=".mainFoot"}>
<div class="table-action">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td><button class="btn btn-primary" id="btnSubmit" ><span><span><{t}>确定<{/t}></span></span></button></td>
</tr>
</tbody>
</table>
</div>
<{/area}>
<script>
$('disForm').store('target',{
onRequest:function(){
$('btnSubmit').set('disabled',true);
},
onSuccess:function(response){
$('btnSubmit').set('disabled',false);
$('btnSubmit').getParent('.dialog').retrieve('instance').close();
finderGroup['<{$env.get.finder_id}>'].refresh();
}
});
$('btnSubmit').addEvent('click',function(e){
e.stop();
var oTime = $E('input[name="timing_confirm_time"]').value;
oTime = new Date(oTime.replace(/\-/g, "\/"));
var oYesterday = new Date();
oYesterday.setTime(oYesterday.getTime()-24*60*60*1000);
if(oYesterday < oTime) {
$('disForm').fireEvent('submit', {stop: $empty});
} else {
alert('请设置今天及今天之后的日期');
}
});
</script>