优化时间

master
chenzhi 3 years ago
parent be65b78d73
commit 2fb7c989c5

@ -425,7 +425,6 @@ class StatementWarningController extends AdminController
$time =strtotime($info['count_year'].'-'.$info['count_month']."-1");
$nextMonth = explode('-', date('Y-m',strtotime('+32 day',$time)) );
$this->statementWarningModel->where([
'count_year'=>$nextMonth[0],
'count_month'=>$nextMonth[1],

@ -53,7 +53,7 @@
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">财务预警表</h3>
<p class="description_text">每日凌晨五点自动更新,如需获取时时数据,请手动进行【月份重算】/ 预警月份与时时表一个月</p>
<p class="description_text">每日凌晨五点自动更新,如需获取时时数据,请手动进行【月份重算】/ 预警月份与时时表一个月</p>
</div>
<style>
@ -234,14 +234,10 @@
var today = new Date();
today.setTime(today.getTime());
var year = today.getFullYear();
var month = today.getMonth()+1;
var month = today.getMonth()+1;//可以超出一个月
if(subtimeArr[0] > year){
layer.msg('要重算的月份必须小于当前时间');
return false;
}
if(subtimeArr[0] == year && subtimeArr[1] >= month){
layer.msg('要重算的月份必须小于当前月份');
if((subtimeArr[0]*12 + (subtimeArr[1]-0) ) > (year*12+month+1) ){
layer.msg('要重算的月份最多大于当前1个月');
return false;
}

Loading…
Cancel
Save