cost search dt_init

This commit is contained in:
qianhy
2023-02-03 15:22:39 +08:00
committed by lccsw
parent 9e38e6e608
commit 3b2adf79a3
2 changed files with 11 additions and 0 deletions
+10
View File
@@ -129,6 +129,16 @@ class Cost extends HD_Controller{
$where["bill_time <="] = $bill_time[1] . ' 23:59:59';
}
}
else{
if (!$params['bt_init']){
$params['bt_init'] = 1;
$time1 = date("Y-m-d",mktime(0, 0 , 0,date("m"),1,date("Y")));
$time2 = date("Y-m-d",mktime(23,59,59,date("m"),date("t"),date("Y")));
$params['bill_time'] = $time1 . ' ~ ' . $time2;
$where["bill_time >="] = $time1 . ' 00:00:00';
$where["bill_time <="] = $time2 . ' 23:59:59';
}
}
return $where;
}
+1
View File
@@ -73,6 +73,7 @@
<a class="mr10 id-day-btn" href="javascript:void (0);" data-date="weeks" data-btn="bill">本周</a>
<a class="mr10 id-day-btn" href="javascript:void (0);" data-date="month" data-btn="bill">本月</a>
</div>
<input id="id-bt-init" name="bt_init" type="hidden" value="<?= $params['bt_init'] ?>"/>
</div>
</div>
<div class="am-form-group" style="margin-bottom: 0px;"></div>