|
@@ -0,0 +1,359 @@
|
|
1
|
+<?php
|
|
2
|
+/**
|
|
3
|
+ * Created by Sublime.
|
|
4
|
+ * User: hao
|
|
5
|
+ * Date: 19/08/30
|
|
6
|
+ * Time: 上午11:20
|
|
7
|
+ */
|
|
8
|
+namespace App\Http\Controllers\Admin;
|
|
9
|
+
|
|
10
|
+use App\Http\Controllers\Controller;
|
|
11
|
+use App\Logs;
|
|
12
|
+use App\CustTotal;
|
|
13
|
+use App\CustDetail;
|
|
14
|
+use Illuminate\Http\Request;
|
|
15
|
+use Illuminate\Support\Facades\DB;
|
|
16
|
+
|
|
17
|
+class StatisticsController extends Controller
|
|
18
|
+{
|
|
19
|
+ /**
|
|
20
|
+ * 当日数据统计
|
|
21
|
+ */
|
|
22
|
+ public function fanDay(Request $request){
|
|
23
|
+ $page = (int)$request->input('page');
|
|
24
|
+ $pageSize = 20;
|
|
25
|
+ if($page<=0){
|
|
26
|
+ $page = 1;
|
|
27
|
+ }
|
|
28
|
+
|
|
29
|
+ $offset = ($page-1) * $pageSize;
|
|
30
|
+
|
|
31
|
+ $stime = $request->input('stime');
|
|
32
|
+ $etime = $request->input('etime');
|
|
33
|
+
|
|
34
|
+ $count = CustTotal::select(DB::raw('count(distinct dtime) as total'))->where(function($query) use($stime, $etime){
|
|
35
|
+ if($stime) $query->where('dtime', '>=', $stime);
|
|
36
|
+ if($etime) $query->where('dtime', '<=', $etime);
|
|
37
|
+ })->where('is_del',0)->first();
|
|
38
|
+ $count = $count->total;
|
|
39
|
+ if ($count > 1) {
|
|
40
|
+ // 总页数
|
|
41
|
+ $pages = ceil($count/$pageSize);
|
|
42
|
+ }else{
|
|
43
|
+ // 总页数
|
|
44
|
+ $pages = 1;
|
|
45
|
+ }
|
|
46
|
+
|
|
47
|
+ $result = CustTotal::select(DB::raw('sum(total_cost) as total_cost, sum(total_fan_add) as total_fan_add, dtime'))->where(function($query) use($stime, $etime){
|
|
48
|
+ if($stime) $query->where('dtime', '>=', $stime);
|
|
49
|
+ if($etime) $query->where('dtime', '<=', $etime);
|
|
50
|
+ })->where('is_del',0)->groupBy('dtime')->orderBy('dtime', 'desc')->offset($offset)->limit($pageSize)->get();
|
|
51
|
+ $result = json_decode(json_encode($result),true);
|
|
52
|
+ foreach($result as $k=>&$v){
|
|
53
|
+ #进粉成本
|
|
54
|
+ $v['cost_fan'] = $v['total_fan_add']>0? round($v['total_cost'] / $v['total_fan_add'], 2) : '';
|
|
55
|
+ #当日微信粉
|
|
56
|
+ $custDetail = CustDetail::select(DB::raw('sum(fan_add) as wx_fan_add, sum(new_reply) as total_new_reply, sum(old_consult) as total_old_consult'))->where('dtime', $v['dtime'])->where('is_del', 0)->first();
|
|
57
|
+ $v['wx_fan_add'] = $custDetail->wx_fan_add; //当日微信粉数
|
|
58
|
+ $v['total_new_reply'] = $custDetail->total_new_reply; //当日微信新粉回复
|
|
59
|
+ $v['total_old_consult'] = $custDetail->total_old_consult; //当日微信老粉询价
|
|
60
|
+ $v['new_reply_rate'] = $v['wx_fan_add']>0? round($v['total_new_reply'] / $v['wx_fan_add'], 2) * 100 .'%' : ''; //当日新粉回复率
|
|
61
|
+
|
|
62
|
+ #当日微信粉成本
|
|
63
|
+ $v['cost_wx_fan'] = $v['wx_fan_add']>0? round($v['total_cost'] / $v['wx_fan_add'], 2) : '';
|
|
64
|
+ #当日订单数、销售额
|
|
65
|
+ $order = DB::table('order')->select(DB::raw('sum(receivedAmount) as order_amount, count(1) as order_count'))->where('createTime','>=', $v['dtime'])->where('createTime','<', $v['dtime'].' 23:59:59')->where('is_del', 0)->first();
|
|
66
|
+ $v['order_count'] = $order->order_count;
|
|
67
|
+ $v['order_amount'] = $order->order_amount;
|
|
68
|
+
|
|
69
|
+ }
|
|
70
|
+
|
|
71
|
+ return view('statistics/fanDay', ['result' =>$result,
|
|
72
|
+ 'page' =>$page,
|
|
73
|
+ 'count' =>$count,
|
|
74
|
+ 'pages' =>$pages,
|
|
75
|
+ 'stime' =>$stime,
|
|
76
|
+ 'etime' =>$etime,
|
|
77
|
+ ]);
|
|
78
|
+ }
|
|
79
|
+
|
|
80
|
+ public function fanDay_export(Request $request){
|
|
81
|
+
|
|
82
|
+ $stime = $request->input('stime');
|
|
83
|
+ $etime = $request->input('etime');
|
|
84
|
+
|
|
85
|
+ $result = CustTotal::select(DB::raw('sum(total_cost) as total_cost, sum(total_fan_add) as total_fan_add, dtime'))->where(function($query) use($stime, $etime){
|
|
86
|
+ if($stime) $query->where('dtime', '>=', $stime);
|
|
87
|
+ if($etime) $query->where('dtime', '<=', $etime);
|
|
88
|
+ })->where('is_del',0)->groupBy('dtime')->orderBy('dtime', 'desc')->get();
|
|
89
|
+ $result = json_decode(json_encode($result),true);
|
|
90
|
+
|
|
91
|
+ $filename="当日数据统计.xls";
|
|
92
|
+ header("Content-type:application/vnd.ms-excel");
|
|
93
|
+ Header("Accept-Ranges:bytes");
|
|
94
|
+ Header("Content-Disposition:attachment;filename=".$filename); //$filename导出的文件名
|
|
95
|
+ header("Pragma: no-cache");
|
|
96
|
+ header("Expires: 0");
|
|
97
|
+ $data_str = '<html xmlns:o="urn:schemas-microsoft-com:office:office"
|
|
98
|
+ xmlns:x="urn:schemas-microsoft-com:office:excel"
|
|
99
|
+ xmlns="http://www.w3.org/TR/REC-html40">
|
|
100
|
+ <head>
|
|
101
|
+ <meta http-equiv="expires" content="Mon, 06 Jan 1999 00:00:01 GMT">
|
|
102
|
+ <meta http-equiv=Content-Type content="text/html; charset=gb2312">
|
|
103
|
+ <!--[if gte mso 9]><xml>
|
|
104
|
+ <x:ExcelWorkbook>
|
|
105
|
+ <x:ExcelWorksheets>
|
|
106
|
+ <x:ExcelWorksheet>
|
|
107
|
+ <x:Name></x:Name>
|
|
108
|
+ <x:WorksheetOptions>
|
|
109
|
+ <x:DisplayGridlines/>
|
|
110
|
+ </x:WorksheetOptions>
|
|
111
|
+ </x:ExcelWorksheet>
|
|
112
|
+ </x:ExcelWorksheets>
|
|
113
|
+ </x:ExcelWorkbook>
|
|
114
|
+ </xml><![endif]-->
|
|
115
|
+ </head>';
|
|
116
|
+ $data_str .= "
|
|
117
|
+ <table>
|
|
118
|
+ <tr>
|
|
119
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","日期")."</th>
|
|
120
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","当日投放金额")."</th>
|
|
121
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","当日公众号进粉")."</th>
|
|
122
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","当日进粉成本")."</th>
|
|
123
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","当日微信粉")."</th>
|
|
124
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","当日微信粉成本")."</th>
|
|
125
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","当日订单数")."</th>
|
|
126
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","当日销售额")."</th>
|
|
127
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","当日新粉回复量")."</th>
|
|
128
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","当日新粉回复率")."</th>
|
|
129
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","当日老粉主动咨询量")."</th>
|
|
130
|
+
|
|
131
|
+ </tr>";
|
|
132
|
+ foreach ($result as $k => $v)
|
|
133
|
+ {
|
|
134
|
+ #进粉成本
|
|
135
|
+ $v['cost_fan'] = $v['total_fan_add']>0 ? round($v['total_cost'] / $v['total_fan_add'], 2) : '';
|
|
136
|
+ #当日微信粉
|
|
137
|
+ $custDetail = CustDetail::select(DB::raw('sum(fan_add) as wx_fan_add, sum(new_reply) as total_new_reply, sum(old_consult) as total_old_consult'))->where('dtime', $v['dtime'])->where('is_del', 0)->first();
|
|
138
|
+ $v['wx_fan_add'] = $custDetail->wx_fan_add; //当日微信粉数
|
|
139
|
+ $v['total_new_reply'] = $custDetail->total_new_reply; //当日微信新粉回复
|
|
140
|
+ $v['total_old_consult'] = $custDetail->total_old_consult; //当日微信老粉询价
|
|
141
|
+ $v['new_reply_rate'] = $v['wx_fan_add']>0 ? round($v['total_new_reply'] / $v['wx_fan_add'], 2) * 100 .'%' : ''; //当日新粉回复率
|
|
142
|
+
|
|
143
|
+ #当日微信粉成本
|
|
144
|
+ $v['cost_wx_fan'] = $v['wx_fan_add']>0 ? round($v['total_cost'] / $v['wx_fan_add'], 2) : '';
|
|
145
|
+ #当日订单数、销售额
|
|
146
|
+ $order = DB::table('order')->select(DB::raw('sum(receivedAmount) as order_amount, count(1) as order_count'))->where('createTime','>=', $v['dtime'])->where('createTime','<', $v['dtime'].' 23:59:59')->where('is_del', 0)->first();
|
|
147
|
+ $v['order_count'] = $order->order_count;
|
|
148
|
+ $v['order_amount'] = $order->order_amount;
|
|
149
|
+
|
|
150
|
+ $data_str .= "<tr>";
|
|
151
|
+ $data_str .= "<td>".$v['dtime']."</td>";
|
|
152
|
+ $data_str .= "<td>".$v['total_cost']."</td>";
|
|
153
|
+ $data_str .= "<td>".$v['total_fan_add']."</td>";
|
|
154
|
+ $data_str .= "<td>".$v['cost_fan']."</td>";
|
|
155
|
+ $data_str .= "<td>".$v['wx_fan_add']."</td>";
|
|
156
|
+ $data_str .= "<td>".$v['cost_wx_fan']."</td>";
|
|
157
|
+ $data_str .= "<td>".$v['order_count']."</td>";
|
|
158
|
+ $data_str .= "<td>".$v['order_amount']."</td>";
|
|
159
|
+ $data_str .= "<td>".$v['total_new_reply']."</td>";
|
|
160
|
+ $data_str .= "<td>".$v['new_reply_rate']."</td>";
|
|
161
|
+ $data_str .= "<td>".$v['total_old_consult']."</td>";
|
|
162
|
+
|
|
163
|
+ $data_str .= "</tr>";
|
|
164
|
+ }
|
|
165
|
+
|
|
166
|
+ $data_str .= "</table>";
|
|
167
|
+ echo $data_str;
|
|
168
|
+ exit;
|
|
169
|
+ }
|
|
170
|
+
|
|
171
|
+ /**
|
|
172
|
+ * 当日数据统计
|
|
173
|
+ */
|
|
174
|
+ public function orderDay(Request $request){
|
|
175
|
+ $page = (int)$request->input('page');
|
|
176
|
+ $pageSize = 20;
|
|
177
|
+ if($page<=0){
|
|
178
|
+ $page = 1;
|
|
179
|
+ }
|
|
180
|
+
|
|
181
|
+ $offset = ($page-1) * $pageSize;
|
|
182
|
+
|
|
183
|
+ $stime = $request->input('stime');
|
|
184
|
+ $etime = $request->input('etime');
|
|
185
|
+
|
|
186
|
+ $count = CustTotal::where(function($query) use($stime, $etime){
|
|
187
|
+ if($stime) $query->where('dtime', '>=', $stime);
|
|
188
|
+ if($etime) $query->where('dtime', '<=', $etime);
|
|
189
|
+ })->where('is_del',0)->count();
|
|
190
|
+ if ($count > 1) {
|
|
191
|
+ // 总页数
|
|
192
|
+ $pages = ceil($count/$pageSize);
|
|
193
|
+ }else{
|
|
194
|
+ // 总页数
|
|
195
|
+ $pages = 1;
|
|
196
|
+ }
|
|
197
|
+
|
|
198
|
+ $result = CustTotal::select(DB::raw('sum(total_cost) as total_cost, sum(total_fan_add) as total_fan_add, dtime'))->where(function($query) use($stime, $etime){
|
|
199
|
+ if($stime) $query->where('dtime', '>=', $stime);
|
|
200
|
+ if($etime) $query->where('dtime', '<=', $etime);
|
|
201
|
+ })->where('is_del',0)->groupBy('dtime')->orderBy('dtime', 'desc')->offset($offset)->limit($pageSize)->get();
|
|
202
|
+ $result = json_decode(json_encode($result),true);
|
|
203
|
+ foreach($result as $k=>&$v){
|
|
204
|
+ #当日微信好友数量
|
|
205
|
+ $custDetail = CustDetail::select(DB::raw('sum(fan_add) as wx_fan_add'))->where('dtime', $v['dtime'])->where('is_del', 0)->first();
|
|
206
|
+ $v['wx_fan_add'] = $custDetail->wx_fan_add; //当日微信粉数
|
|
207
|
+
|
|
208
|
+ #当日订单总计:
|
|
209
|
+ $order = DB::table('order')->select(DB::raw('sum(receivedAmount) as order_amount, count(1) as order_count, sum(cost) as order_cost'))->where('createTime','>=', $v['dtime'])->where('createTime','<', $v['dtime'].' 23:59:59')->where('is_del', 0)->first();
|
|
210
|
+ #当日新粉成单:
|
|
211
|
+ $phones = DB::table('customers')->where('fanTime', $v['dtime'])->lists('phone');
|
|
212
|
+ $new_order = DB::table('order')->select(DB::raw('sum(receivedAmount) as order_amount, count(1) as order_count'))->where('createTime','>=', $v['dtime'])->where('createTime','<', $v['dtime'].' 23:59:59')->where('is_del', 0)->whereIn('receiverMobile', $phones)->first();
|
|
213
|
+ // 1.当日新粉成单数
|
|
214
|
+ $v['new_order_count'] = $new_order->order_count;
|
|
215
|
+ // 2.当日新粉成交额
|
|
216
|
+ $v['new_order_amount'] = $new_order->order_amount;
|
|
217
|
+ // 3.老粉成单数
|
|
218
|
+ $v['old_order_count'] = $order->order_count - $new_order->order_count;
|
|
219
|
+ // 4.老粉成交额
|
|
220
|
+ $v['old_order_amount'] = $order->order_amount - $new_order->order_amount;
|
|
221
|
+ // 5.总成交额
|
|
222
|
+ $v['order_amount'] = $order->order_amount;
|
|
223
|
+
|
|
224
|
+ #复购单数、复购成交额
|
|
225
|
+ $fugou = DB::table('order')->select(DB::raw('sum(receivedAmount) as order_amount, count(1) as order_count'))->where('createTime','>=', $v['dtime'])->where('createTime','<', $v['dtime'].' 23:59:59')->where('is_del', 0)->where('is_fugou', 1)->first();
|
|
226
|
+ $v['fugou_order_count'] = $fugou->order_count;
|
|
227
|
+ $v['fugou_order_amount'] = $fugou->order_amount;
|
|
228
|
+ #货品成本
|
|
229
|
+ $v['order_cost'] = $order->order_cost;
|
|
230
|
+ #毛利
|
|
231
|
+ $v['profit'] = $v['order_amount'] - $v['order_cost'] - $v['total_cost'];
|
|
232
|
+ //综合成单率
|
|
233
|
+ $v['order_rate'] = '';
|
|
234
|
+
|
|
235
|
+ }
|
|
236
|
+
|
|
237
|
+ return view('statistics/orderDay', ['result' =>$result,
|
|
238
|
+ 'page' =>$page,
|
|
239
|
+ 'count' =>$count,
|
|
240
|
+ 'pages' =>$pages,
|
|
241
|
+ 'stime' =>$stime,
|
|
242
|
+ 'etime' =>$etime,
|
|
243
|
+ ]);
|
|
244
|
+ }
|
|
245
|
+
|
|
246
|
+ public function orderDay_export(Request $request){
|
|
247
|
+
|
|
248
|
+ $stime = $request->input('stime');
|
|
249
|
+ $etime = $request->input('etime');
|
|
250
|
+
|
|
251
|
+ $result = CustTotal::select(DB::raw('sum(total_cost) as total_cost, sum(total_fan_add) as total_fan_add, dtime'))->where(function($query) use($stime, $etime){
|
|
252
|
+ if($stime) $query->where('dtime', '>=', $stime);
|
|
253
|
+ if($etime) $query->where('dtime', '<=', $etime);
|
|
254
|
+ })->where('is_del',0)->groupBy('dtime')->orderBy('dtime', 'desc')->get();
|
|
255
|
+ $result = json_decode(json_encode($result),true);
|
|
256
|
+
|
|
257
|
+ $filename="分片数据统计.xls";
|
|
258
|
+ header("Content-type:application/vnd.ms-excel");
|
|
259
|
+ Header("Accept-Ranges:bytes");
|
|
260
|
+ Header("Content-Disposition:attachment;filename=".$filename); //$filename导出的文件名
|
|
261
|
+ header("Pragma: no-cache");
|
|
262
|
+ header("Expires: 0");
|
|
263
|
+ $data_str = '<html xmlns:o="urn:schemas-microsoft-com:office:office"
|
|
264
|
+ xmlns:x="urn:schemas-microsoft-com:office:excel"
|
|
265
|
+ xmlns="http://www.w3.org/TR/REC-html40">
|
|
266
|
+ <head>
|
|
267
|
+ <meta http-equiv="expires" content="Mon, 06 Jan 1999 00:00:01 GMT">
|
|
268
|
+ <meta http-equiv=Content-Type content="text/html; charset=gb2312">
|
|
269
|
+ <!--[if gte mso 9]><xml>
|
|
270
|
+ <x:ExcelWorkbook>
|
|
271
|
+ <x:ExcelWorksheets>
|
|
272
|
+ <x:ExcelWorksheet>
|
|
273
|
+ <x:Name></x:Name>
|
|
274
|
+ <x:WorksheetOptions>
|
|
275
|
+ <x:DisplayGridlines/>
|
|
276
|
+ </x:WorksheetOptions>
|
|
277
|
+ </x:ExcelWorksheet>
|
|
278
|
+ </x:ExcelWorksheets>
|
|
279
|
+ </x:ExcelWorkbook>
|
|
280
|
+ </xml><![endif]-->
|
|
281
|
+ </head>';
|
|
282
|
+ $data_str .= "
|
|
283
|
+ <table>
|
|
284
|
+ <tr>
|
|
285
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","日期")."</th>
|
|
286
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","当日进粉数量")."</th>
|
|
287
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","当日微信好友数量")."</th>
|
|
288
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","当日新粉成单数")."</th>
|
|
289
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","当日新粉成交额")."</th>
|
|
290
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","老粉成单数")."</th>
|
|
291
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","老粉成交额")."</th>
|
|
292
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","复购单数")."</th>
|
|
293
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","复购成交额")."</th>
|
|
294
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","总成交额")."</th>
|
|
295
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","总投放成本")."</th>
|
|
296
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","货品成本")."</th>
|
|
297
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","毛利")."</th>
|
|
298
|
+ <th>".iconv("UTF-8", "GB2312//IGNORE","综合成单率")."</th>
|
|
299
|
+
|
|
300
|
+ </tr>";
|
|
301
|
+
|
|
302
|
+ foreach ($result as $k => $v)
|
|
303
|
+ {
|
|
304
|
+ #当日微信好友数量
|
|
305
|
+ $custDetail = CustDetail::select(DB::raw('sum(fan_add) as wx_fan_add'))->where('dtime', $v['dtime'])->where('is_del', 0)->first();
|
|
306
|
+ $v['wx_fan_add'] = $custDetail->wx_fan_add; //当日微信粉数
|
|
307
|
+
|
|
308
|
+ #当日订单总计:
|
|
309
|
+ $order = DB::table('order')->select(DB::raw('sum(receivedAmount) as order_amount, count(1) as order_count, sum(cost) as order_cost'))->where('createTime','>=', $v['dtime'])->where('createTime','<', $v['dtime'].' 23:59:59')->where('is_del', 0)->first();
|
|
310
|
+ #当日新粉成单:
|
|
311
|
+ $phones = DB::table('customers')->where('fanTime', $v['dtime'])->lists('phone');
|
|
312
|
+ $new_order = DB::table('order')->select(DB::raw('sum(receivedAmount) as order_amount, count(1) as order_count'))->where('createTime','>=', $v['dtime'])->where('createTime','<', $v['dtime'].' 23:59:59')->where('is_del', 0)->whereIn('receiverMobile', $phones)->first();
|
|
313
|
+ // 1.当日新粉成单数
|
|
314
|
+ $v['new_order_count'] = $new_order->order_count;
|
|
315
|
+ // 2.当日新粉成交额
|
|
316
|
+ $v['new_order_amount'] = $new_order->order_amount;
|
|
317
|
+ // 3.老粉成单数
|
|
318
|
+ $v['old_order_count'] = $order->order_count - $new_order->order_count;
|
|
319
|
+ // 4.老粉成交额
|
|
320
|
+ $v['old_order_amount'] = $order->order_amount - $new_order->order_amount;
|
|
321
|
+ // 5.总成交额
|
|
322
|
+ $v['order_amount'] = $order->order_amount;
|
|
323
|
+
|
|
324
|
+ #复购单数、复购成交额
|
|
325
|
+ $fugou = DB::table('order')->select(DB::raw('sum(receivedAmount) as order_amount, count(1) as order_count'))->where('createTime','>=', $v['dtime'])->where('createTime','<', $v['dtime'].' 23:59:59')->where('is_del', 0)->where('is_fugou', 1)->first();
|
|
326
|
+ $v['fugou_order_count'] = $fugou->order_count;
|
|
327
|
+ $v['fugou_order_amount'] = $fugou->order_amount;
|
|
328
|
+ #货品成本
|
|
329
|
+ $v['order_cost'] = $order->order_cost;
|
|
330
|
+ #毛利
|
|
331
|
+ $v['profit'] = $v['order_amount'] - $v['order_cost'] - $v['total_cost'];
|
|
332
|
+ //综合成单率
|
|
333
|
+ $v['order_rate'] = '';
|
|
334
|
+
|
|
335
|
+ $data_str .= "<tr>";
|
|
336
|
+ $data_str .= "<td>".$v['dtime']."</td>";
|
|
337
|
+ $data_str .= "<td>".$v['total_fan_add']."</td>";
|
|
338
|
+ $data_str .= "<td>".$v['wx_fan_add']."</td>";
|
|
339
|
+ $data_str .= "<td>".$v['new_order_count']."</td>";
|
|
340
|
+ $data_str .= "<td>".$v['new_order_amount']."</td>";
|
|
341
|
+ $data_str .= "<td>".$v['old_order_count']."</td>";
|
|
342
|
+ $data_str .= "<td>".$v['old_order_amount']."</td>";
|
|
343
|
+ $data_str .= "<td>".$v['fugou_order_count']."</td>";
|
|
344
|
+ $data_str .= "<td>".$v['fugou_order_amount']."</td>";
|
|
345
|
+ $data_str .= "<td>".$v['order_amount']."</td>";
|
|
346
|
+ $data_str .= "<td>".$v['total_cost']."</td>";
|
|
347
|
+ $data_str .= "<td>".$v['order_cost']."</td>";
|
|
348
|
+ $data_str .= "<td>".$v['profit']."</td>";
|
|
349
|
+ $data_str .= "<td>".$v['order_rate']."</td>";
|
|
350
|
+
|
|
351
|
+ $data_str .= "</tr>";
|
|
352
|
+ }
|
|
353
|
+
|
|
354
|
+ $data_str .= "</table>";
|
|
355
|
+ echo $data_str;
|
|
356
|
+ exit;
|
|
357
|
+ }
|
|
358
|
+}
|
|
359
|
+
|