|
@@ -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
|
|