Browse Source

充值表订单加id

sunhao 5 years ago
parent
commit
3656d987be

+ 6 - 8
app/Http/Controllers/Admin/StatisticsController.php

@@ -5106,8 +5106,8 @@ class StatisticsController extends Controller
5106 5106
             $consum = Order::select(DB::raw('count(1) as order_count, sum(receivedAmount) as order_amount'))->where('team_id', $v['team_id'])->where('payment_type', 4)->where('is_del', 0)->where('createTime', '>=', $v['date'])->where('createTime', '<=', $v['date'] . ' 23:59:59')->first();
5107 5107
             $v['order_count'] = $consum->order_count;
5108 5108
             $v['order_amount'] = $consum->order_amount;
5109
-            //剩余的金额
5110
-            $v['day_amount'] = $v['deposit_amount'] - $v['order_amount'];
5109
+            //剩余的金额
5110
+            //$v['day_amount'] = $v['deposit_amount'] - $v['order_amount'];
5111 5111
 
5112 5112
         }
5113 5113
 
@@ -5169,13 +5169,11 @@ class StatisticsController extends Controller
5169 5169
             $consum = Order::select(DB::raw('count(1) as order_count, sum(receivedAmount) as order_amount'))->where('team_id', $v['team_id'])->where('payment_type', 4)->where('is_del', 0)->where('createTime', '>=', $v['date'])->where('createTime', '<=', $v['date'] . ' 23:59:59')->first();
5170 5170
             $v['order_count'] = $consum->order_count;
5171 5171
             $v['order_amount'] = $consum->order_amount;
5172
-            //剩余是的金额
5173
-            $v['day_amount'] = $v['deposit_amount'] - $v['order_amount'];
5174 5172
 
5175 5173
         }
5176 5174
 
5177
-        $indexKey = ['team_name','date','pay_amount','discount','deposit_amount','pay_amount_total','discount_total','deposit_amount_total','order_amount','order_count','day_amount'];
5178
-        $title = ['团队', '日期', '当日充值金额', '当日赠送金额', '当日实得金额', '累计充值金额', '累计赠送金额', '累计实得总金额', '当日消费金额', '当日订单数', '剩余实得金额'];
5175
+        $indexKey = ['team_name','date','pay_amount','discount','deposit_amount','pay_amount_total','discount_total','deposit_amount_total','order_amount','order_count'];
5176
+        $title = ['团队', '日期', '当日充值金额', '当日赠送金额', '当日实得金额', '累计充值金额', '累计赠送金额', '累计实得总金额', '当日消费金额', '当日订单数'];
5179 5177
         $filename = 'chongzhihuizong_'.date('Y-m-d_H').'.xlsx';
5180 5178
         return Order::export_excel($result, $filename, $indexKey, $title); 
5181 5179
     }
@@ -5368,8 +5366,8 @@ class StatisticsController extends Controller
5368 5366
             $v['cust_name'] = CustomerInfo::where('phone', $v['phone'])->pluck('name');
5369 5367
         }
5370 5368
 
5371
-        $indexKey = ['team_name','createTime','cust_name','money','admin_name'];
5372
-        $title = ['团队', '下单时间', '客户名称', '消费金额', '销售名称'];
5369
+        $indexKey = ['team_name', 'id', 'createTime','cust_name','money','admin_name'];
5370
+        $title = ['团队', '订单号', '下单时间', '客户名称', '消费金额', '销售名称'];
5373 5371
         $filename = 'xiaofeimingxi_'.date('Y-m-d_H').'.xlsx';
5374 5372
         return Order::export_excel($result, $filename, $indexKey, $title); 
5375 5373
 

+ 2 - 0
resources/views/statistics/consumDetail.blade.php

@@ -27,6 +27,7 @@
27 27
                 <thead>
28 28
                 <tr class="text-c">
29 29
                     <th width="5%">团队</th>
30
+                    <th width="5%">订单号</th>
30 31
                     <th width="5%">下单时间</th>
31 32
                     <th width="5%">客户名称</th>
32 33
                     <th width="5%">消费金额</th>
@@ -38,6 +39,7 @@
38 39
                     @foreach($result as $a)
39 40
                         <tr class="text-c" style=" text-align:center;">                           
40 41
                             <td>{{$a['team_name']}}</td>                            
42
+                            <td>{{$a['id']}}</td>
41 43
                             <td>{{$a['createTime']}}</td>
42 44
                             <td>{{$a['cust_name']}}</td>
43 45
                             <td>{{$a['money']}}</td>

+ 0 - 2
resources/views/statistics/depositDayReport.blade.php

@@ -36,7 +36,6 @@
36 36
                     <th width="4%">累计实得总金额</th>
37 37
                     <th width="4%">当日消费金额</th>
38 38
                     <th width="4%">当日订单数</th>
39
-                    <th width="4%">剩余实得金额</th>
40 39
                                                                 
41 40
                 </tr>
42 41
                 </thead>
@@ -54,7 +53,6 @@
54 53
                             <td>{{$a['deposit_amount_total']}}</td>
55 54
                             <td>{{$a['order_amount']}}</td>
56 55
                             <td>{{$a['order_count']}}</td>
57
-                            <td>{{$a['day_amount']}}</td>
58 56
                             
59 57
                         </tr>
60 58
                     @endforeach