add-admin-order_over_time

This commit is contained in:
lccsw
2022-09-06 16:37:32 +08:00
parent 9d3e3d4d03
commit dfce6f62c0
2 changed files with 25 additions and 2 deletions
+12 -2
View File
@@ -137,6 +137,16 @@ class Ordersv2List
$where["{$this->t1}.bill_time <="] = $bill_time[1] . ' 23:59:59';
}
}
//交付时间
if ($params['over_time']) {
$over_time = explode(' ~ ', $params['over_time']);
if ($over_time[0]) {
$where["{$this->t1}.over_time >="] = $over_time[0] . ' 00:00:00';
}
if ($over_time[1]) {
$where["{$this->t1}.over_time <="] = $over_time[1] . ' 23:59:59';
}
}
if(strlen($params['is_bill'])){
if($params['is_bill']){
$where["{$this->t1}.bill_time <> '0000-00-00 00:00:00'"] = null;
@@ -239,7 +249,7 @@ class Ordersv2List
}elseif($params['status_pid'] == 21){ //退款时间排序
$orderby = "{$this->t1}.refund_time desc";
} else {
$orderby = "{$this->t1}.c_time desc";
$orderby = strlen($params['status_pid']) ? "{$this->t1}.over_time desc,{$this->t1}.c_time desc" : "{$this->t1}.c_time desc";
}
if (strlen($params['status_pid']) && $params['status'] && $params['status_pid']!=21 &&$params['status']<21) {
$where["{$this->t2}.pid_status"] = $params['status_pid'];
@@ -499,7 +509,7 @@ class Ordersv2List
order_time,bill_time,item_id,over_time";
$count = $this->ci->mdOrders->count($where);
$rows = $this->ci->mdOrders->select($where, 'c_time desc', $page, $size, $fileds);
$rows = $this->ci->mdOrders->select($where, 'over_time desc,c_time desc', $page, $size, $fileds);
$lists = [];
if ($count) {
//客户来源
+13
View File
@@ -225,6 +225,16 @@
</div>
</div>
</div>
<?}else{?>
<div class="am-form-group fl" style="margin-bottom: 0px;">
<label class="am-para-label w100">交付时间:</label>
<div class="am-form-group fl">
<div class="am-para-inline w300">
<input id="id-over-time" name="over_time" type="text" value="<?= $params['over_time'] ?>"
placeholder="交付时间范围" autocomplete="off"/>
</div>
</div>
</div>
<?}?>
<div class="am-form-group" style="margin-bottom: 0px;"></div>
<div class="am-form-group fl" style="margin-bottom: 0px;">
@@ -305,6 +315,9 @@
laydate.render({
elem: '#id-bill-time', range: '~'
});
laydate.render({
elem: '#id-over-time', range: '~'
});
$('.id-day-btn').click(function () {
var type = $(this).data('date'), date = '', nowDate = new Date();
var beginDate = '', endDate = '';