sunhao 5 years ago
parent
commit
91826f4378

+ 6 - 1
app/Http/Controllers/Admin/OrderController.php

@@ -215,7 +215,7 @@ class OrderController extends Controller
215 215
             if($receiverMobile) $query->where('receiverMobile', $receiverMobile);
216 216
             $query->where('createTime', '>=', $_start);
217 217
             if($id>0) $query->where('id', $id);
218
-        })->where('is_del',0)->where('warehouse', $warehouse)->where('status', '>', 1)->where('delivery_date', '<=', $today_date)->orderBy('id', 'desc')->offset($offset)->limit($pageSize)->get();
218
+        })->where('is_del',0)->where('warehouse', $warehouse)->where('status', '>', 1)->where('delivery_date', '<=', $today_date)->orderBy('verify_time', 'asc')->offset($offset)->limit($pageSize)->get();
219 219
 
220 220
         $result = json_decode(json_encode($result),true);
221 221
                 
@@ -233,6 +233,8 @@ class OrderController extends Controller
233 233
             'receiverName'         =>$receiverName,
234 234
             'receiverMobile'       =>$receiverMobile,
235 235
             'id'       =>$id,
236
+            'today'    =>$today_date,
237
+            'yestoday'    => date('Y-m-d', strtotime('-1 day')),
236 238
             ]);
237 239
     }
238 240
 
@@ -752,6 +754,9 @@ class OrderController extends Controller
752 754
                 $order->refuse_reason = $refuse_reason;
753 755
             }
754 756
         }
757
+        if($order->status == 2 || $order->status == 0){
758
+            $order->verify_time = date('Y-m-d H:i:s'); //审核时间
759
+        }
755 760
         $res = $order ->save(); 
756 761
         if($res){
757 762
             #记录操作日志

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

@@ -65,6 +65,7 @@
65 65
                     <th width="5%">退补备注</th>                 
66 66
                     <th width="4%">所属销售</th> 
67 67
                     <th width="4%">订单状态</th>                  
68
+                    <th width="4%">审核时间</th>                  
68 69
                     @if($self_role =='销售' )<th width="5%">驳回原因</th>@endif                                    
69 70
                     <th width="5%">买家备注</th>                  
70 71
                     <th width="5%">卖家备注</th>                                                        
@@ -124,6 +125,7 @@
124 125
 
125 126
                             <td>{{$a['admin_name']}}</td>
126 127
                             <td id="order_verify{{$a['id']}}">{{$a['status_name']}}</td>
128
+                            <td>{{$a['verify_time']}}</td>
127 129
                             @if($self_role =='销售' ) <td>@if($a['status'] == 0)<font color='red'> {{$a['refuse_reason']}} </font> @endif</td> @endif
128 130
                            
129 131
                             <!--td id="refund{{$a['id']}}">@if($a['order_status']==2) <span class="btn btn-danger radius">退款</span> @else 正常<br><span class="btn btn-primary radius" onclick="order_refund({{$a['id']}})">设为退款</span> @endif</td --> 

+ 6 - 4
resources/views/order/warehouselist.blade.php

@@ -40,13 +40,14 @@
40 40
             <table class="table table-border table-bordered table-bg table-hover table-sort">
41 41
                 <thead>
42 42
                 <tr class="text-c">
43
-                    <th width="8%">订单编号</th>
43
+                    <th width="5%">订单编号</th>
44 44
                     <th width="5%">买家名称</th>
45 45
                     <th width="5%">收货人</th>
46 46
                     <th width="6%">收货人手机号</th>
47 47
                     <th width="10%">收货地址</th>
48 48
                     <th width="12%">商品信息</th>
49
-                    <th width="7%">预发货时间</th>
49
+                    <th width="6%">预发货时间</th>
50
+                    <th width="6%">审核时间</th>
50 51
                     <th width="6%">物流单号</th>                    
51 52
                     <th width="5%">货品成本</th>                  
52 53
                     <th width="5%">运费成本</th>                  
@@ -59,14 +60,15 @@
59 60
                 <tbody>
60 61
                 @if($result)
61 62
                     @foreach($result as $a)
62
-                        <tr class="text-c" style=" text-align:center;">                           
63
+                        <tr class="text-c" style=" text-align:center; ">                           
63 64
                             <td>{{$a['id']}}</td>                            
64 65
                             <td>{{$a['customerName']}}</td>                            
65 66
                             <td>{{$a['receiverName']}}</td>                            
66 67
                             <td>{{$a['receiverMobile']}}</td>                            
67 68
                             <td>{{$a['receiverState']}}{{$a['receiverCity']}}{{$a['receiverDistrict']}}{{$a['receiverStreet']}}{{$a['receiverAddress']}}</td>                            
68 69
                             <td>{{$a['goods_note']}}</td>                            
69
-                            <td>{{$a['delivery_date']}}</td>                            
70
+                            <td style="@if($a['delivery_date'] < $yestoday && !$a['logistics_id']) background-color: #FF0000; @elseif($a['delivery_date'] < $today && !$a['logistics_id']) background-color: #f37b1d; @endif">{{$a['delivery_date']}}</td>                            
71
+                            <td>{{$a['verify_time']}}</td>                            
70 72
                             <td class ="change_logistics_id"> 
71 73
                                 <p id="logi_1{{$a['id']}}">{{$a['logistics_id']}}</p> 
72 74
                                 <input id="logi_2{{$a['id']}}" style="display: none" type='text' autofocus="autofocus" name='logistics_id' value="{{$a['logistics_id']}}" onblur="change_logistics_id({{$a['id']}})" />