Browse Source

超一天订单高亮显示

sunhao 5 years ago
parent
commit
e21a3e09bf

+ 11 - 0
app/Http/Controllers/Admin/OrderController.php

@@ -127,6 +127,16 @@ class OrderController extends Controller
127 127
 
128 128
             $v['status_name'] = $status_arr[$v['status']];            
129 129
         }
130
+
131
+        $yestoday = date('Y-m-d', strtotime('-1 day'));
132
+        //获取超时未发订单
133
+        $order_overtime = Order::where('is_del',0)->where('status', '>', 1)->where('delivery_date', '<', $yestoday)->where('createTime', '>=', '2019-09-18')->where('logistics_id', '=', '')->lists('id');
134
+       
135
+        $overtime = [];
136
+        if(!empty($order_overtime)){
137
+            $overtime['list'] = json_decode(json_encode($order_overtime), true);
138
+            $overtime['count'] = count($order_overtime);           
139
+        }
130 140
         
131 141
         #销售筛选
132 142
         //$saler_ids = DB::table('admin_role')->where('role_name', '销售')->lists('user_id');
@@ -150,6 +160,7 @@ class OrderController extends Controller
150 160
             'status'            =>$status,
151 161
             'id'            =>$id,
152 162
             'last_url'      => 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
163
+            'overtime'      => $overtime,
153 164
             ]);
154 165
     }
155 166
 

+ 10 - 0
resources/views/order/orderlist.blade.php

@@ -43,6 +43,16 @@
43 43
         </div>
44 44
         
45 45
         <div class="mt-20">
46
+            @if($overtime)
47
+                <font color='red'>
48
+                超一天未发订单量:【{{$overtime['count']}}单】&nbsp; 订单ID:【
49
+                    @foreach($overtime['list'] as $k=>$oid)
50
+                        @if($k == $overtime['count']-1) <a style="text-decoration: underline;color:blue;" href='index?id={{$oid}}'>{{$oid}}</a> @else <a style="text-decoration: underline;color:blue;"  href='index?id={{$oid}}'>{{$oid}},</a>  @endif
51
+                    @endforeach
52
+                    】
53
+                </font>
54
+
55
+            @endif
46 56
             <table class="table table-border table-bordered table-bg table-hover table-sort">
47 57
                 <thead>
48 58
                 <tr class="text-c">

+ 11 - 1
resources/views/order/warehouselist.blade.php

@@ -37,6 +37,16 @@
37 37
         </div>
38 38
         
39 39
         <div class="mt-20">
40
+            @if($overtime)
41
+                <font color='red'>
42
+                超一天未发订单量:【{{$overtime['count']}}单】&nbsp; 订单ID:【
43
+                    @foreach($overtime['list'] as $k=>$oid)
44
+                        @if($k == $overtime['count']-1) <a style="text-decoration: underline;color:blue;" href='warehouse?id={{$oid}}'>{{$oid}}</a> @else <a style="text-decoration: underline;color:blue;"  href='warehouse?id={{$oid}}'>{{$oid}},</a>  @endif
45
+                    @endforeach
46
+                    】
47
+                </font>
48
+
49
+            @endif
40 50
             <table class="table table-border table-bordered table-bg table-hover table-sort">
41 51
                 <thead>
42 52
                 <tr class="text-c">
@@ -60,7 +70,7 @@
60 70
                 <tbody>
61 71
                 @if($result)
62 72
                     @foreach($result as $a)
63
-                        <tr class="text-c" style=" text-align:center; @if($a['delivery_date'] < $yestoday && !$a['logistics_id']) background-color: #FF0000; @elseif($a['delivery_date'] < $today && !$a['logistics_id']) background-color: #f37b1d; @endif">                           
73
+                        <tr class="text-c" style="text-align:center; @if($a['delivery_date'] < $yestoday && !$a['logistics_id']) background-color: #FF0000; @elseif($a['delivery_date'] < $today && !$a['logistics_id']) background-color: #f37b1d; @endif">                           
64 74
                             <td>{{$a['id']}}</td>                            
65 75
                             <td>{{$a['customerName']}}</td>                            
66 76
                             <td>{{$a['receiverName']}}</td>