sunhao 5 years ago
parent
commit
da2ea17079

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

@@ -1019,6 +1019,7 @@ class OrderController extends Controller
1019 1019
         $aftersale_fee = $request->input('aftersale_fee');
1020 1020
         $aftersale_reason = $request->input('aftersale_reason');
1021 1021
         $aftersale_time = $request->input('aftersale_time');
1022
+        $refund_time = $request->input('refund_time');
1022 1023
         $refund_price = $request->input('refund_price');
1023 1024
 
1024 1025
         $data = array();
@@ -1038,8 +1039,14 @@ class OrderController extends Controller
1038 1039
         if(isset($aftersale_fee)) $data['aftersale_fee'] = trim($aftersale_fee);
1039 1040
         if(isset($aftersale_reason)) $data['aftersale_reason'] = trim($aftersale_reason);
1040 1041
         if(isset($aftersale_time)) $data['aftersale_time'] = trim($aftersale_time);
1042
+        if(isset($refund_time)) $data['refund_time'] = trim($refund_time);
1041 1043
         if(isset($refund_price)){
1042
-            if(empty($refund_price)) $refund_price = null; 
1044
+            if(empty($refund_price)){
1045
+                $refund_price = null; 
1046
+                $data['is_refund'] = 0;
1047
+            }else{
1048
+                $data['is_refund'] = 1;
1049
+            }
1043 1050
             $data['refund_price'] = $refund_price;
1044 1051
         }
1045 1052
         if($id>0 && !empty($data)){

+ 5 - 5
app/Http/Controllers/Admin/StatisticsController.php

@@ -1666,7 +1666,7 @@ class StatisticsController extends Controller
1666 1666
         $total_data['new_roi'] = $total_data['cost']>0 ? round($total_data['new_order_amount'] / $total_data['cost'], 4) * 100 .'%' : '';
1667 1667
 
1668 1668
         $indexKey = ['ad_time','city','total_cost','conversion_times','new_fan_count','new_order_count','new_order_amount','new_roi','order_count','order_amount','total_roi'];
1669
-        $title = ['日期', '城市', '投放成本', '加粉数', '新粉数量', '新粉成单数', '新粉收入', '新粉ROI', '累计成单数', '累计收入', '累计ROI'];
1669
+        $title = ['日期', '城市', '投放成本', '加粉数', '下单人数', '新粉成单数', '新粉收入', '新粉ROI', '累计成单数', '累计收入', '累计ROI'];
1670 1670
         $filename = 'district_roi_'.date('Y-m-d_H').'.xlsx';
1671 1671
         return Order::export_excel($result, $filename, $indexKey, $title);
1672 1672
     }
@@ -2060,7 +2060,7 @@ class StatisticsController extends Controller
2060 2060
         }
2061 2061
 
2062 2062
         $indexKey = ['ad_time','city','cost','gzh_count','fan_count','new_fan_order_count','new_fan_order_amount','new_roi','order_count','order_amount','total_roi'];
2063
-        $title = ['日期', '城市', '投放成本', '加粉数', '新粉数量', '新粉成单数', '新粉收入', '新粉ROI', '7日累计成单数', '7日累计收入', '7日累计ROI'];
2063
+        $title = ['日期', '城市', '投放成本', '加粉数', '下单人数', '新粉成单数', '新粉收入', '新粉ROI', '7日累计成单数', '7日累计收入', '7日累计ROI'];
2064 2064
         $filename = 'districtRoi7day_'.date('Y-m-d_H').'.xlsx';
2065 2065
         return Order::export_excel($result, $filename, $indexKey, $title);
2066 2066
     }
@@ -2143,7 +2143,7 @@ class StatisticsController extends Controller
2143 2143
         }
2144 2144
 
2145 2145
         $indexKey = ['city','cost','gzh_count','fan_count','new_fan_order_count','new_fan_order_amount','new_roi','order_count','order_amount','total_roi'];
2146
-        $title = ['城市', '投放成本', '加粉数', '新粉数量', '新粉成单数', '新粉收入', '新粉ROI', '7日累计成单数', '7日累计收入', '7日累计ROI'];
2146
+        $title = ['城市', '投放成本', '加粉数', '下单人数', '新粉成单数', '新粉收入', '新粉ROI', '7日累计成单数', '7日累计收入', '7日累计ROI'];
2147 2147
         $filename = 'districtRoi7day_'.date('Y-m-d_H').'.xlsx';
2148 2148
         return Order::export_excel($result, $filename, $indexKey, $title);
2149 2149
     }
@@ -2234,7 +2234,7 @@ class StatisticsController extends Controller
2234 2234
         }
2235 2235
 
2236 2236
         $indexKey = ['ad_time','city','cost','gzh_count','fan_count','new_fan_order_count','new_fan_order_amount','new_roi','order_count','order_amount','total_roi'];
2237
-        $title = ['日期', '城市', '投放成本', '加粉数', '新粉数量', '新粉成单数', '新粉收入', '新粉ROI', '累计成单数', '累计收入', '累计ROI'];
2237
+        $title = ['日期', '城市', '投放成本', '加粉数', '下单人数', '新粉成单数', '新粉收入', '新粉ROI', '累计成单数', '累计收入', '累计ROI'];
2238 2238
         $filename = 'districtRoi30day_'.date('Y-m-d_H').'.xlsx';
2239 2239
         return Order::export_excel($result, $filename, $indexKey, $title);
2240 2240
     }
@@ -2317,7 +2317,7 @@ class StatisticsController extends Controller
2317 2317
         }
2318 2318
 
2319 2319
         $indexKey = ['city','cost','gzh_count','fan_count','new_fan_order_count','new_fan_order_amount','new_roi','order_count','order_amount','total_roi'];
2320
-        $title = ['城市', '投放成本', '加粉数', '新粉数量', '新粉成单数', '新粉收入', '新粉ROI', '累计成单数', '累计收入', '累计ROI'];
2320
+        $title = ['城市', '投放成本', '加粉数', '下单人数', '新粉成单数', '新粉收入', '新粉ROI', '累计成单数', '累计收入', '累计ROI'];
2321 2321
         $filename = 'districtRoi30day_'.date('Y-m-d_H').'.xlsx';
2322 2322
         return Order::export_excel($result, $filename, $indexKey, $title);
2323 2323
     }

+ 29 - 1
resources/views/order/orderlist.blade.php

@@ -76,6 +76,7 @@
76 76
                     <th width="2%">是否退补单</th>                                                       
77 77
                     <th width="4%">应该退补差价</th> 
78 78
                     <th width="5%">退补备注</th>                 
79
+                    <th width="5%">退补时间</th>                 
79 80
                     <th width="4%">所属销售</th> 
80 81
                     <th width="4%">订单状态</th>                  
81 82
                     <th width="4%">审核时间</th>                  
@@ -145,7 +146,11 @@
145 146
                                 <textarea id="refund_note_2{{$a['id']}}" rows=4 style="display: none"  name='refund_note' onblur="change_refund_note({{$a['id']}})" >{{$a['refund_note']}}</textarea>
146 147
                                 <span class="sort_icon" hidden  onClick='change_refund_note_click("{{$a['id']}}","{{$a['refund_note']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
147 148
                             </td>
148
-
149
+                            <td class ="change_logistics_id"> 
150
+                                <p id="refund_time_1{{$a['id']}}">{{$a['refund_time']}}</p> 
151
+                                <input id="refund_time_2{{$a['id']}}" style="display: none"  name='refund_time' onblur="change_refund_time({{$a['id']}})" value="{{$a['refund_time']}}"  onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss' })" class=" Wdate" />
152
+                                <span class="sort_icon" hidden  onClick='change_refund_time_click("{{$a['id']}}","{{$a['refund_time']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
153
+                            </td>
149 154
 
150 155
                             <td>{{$a['admin_name']}}</td>
151 156
                             <td id="order_verify{{$a['id']}}">{{$a['status_name']}}</td>
@@ -475,6 +480,29 @@
475 480
             });
476 481
         }
477 482
 
483
+        function change_refund_time_click(id, refund_time){
484
+            $("#refund_time_1"+id).hide();
485
+            $("#refund_time_2"+id).show();
486
+            $("#refund_time_2"+id).focus();
487
+        }
488
+
489
+        function change_refund_time(id){
490
+            var refund_time = $("#refund_time_2"+id).val();
491
+            if(!refund_time){
492
+                return false;
493
+            }
494
+            $.ajax({
495
+                url: '/admin/order/editLogisticsId?id='+id+'&refund_time='+refund_time,
496
+                type: 'get',
497
+                dateType: 'json',
498
+                success:function(msg){
499
+                    $("#refund_time_1"+id).html(refund_time);
500
+                    $("#refund_time_1"+id).show();
501
+                    $("#refund_time_2"+id).hide();
502
+                }
503
+            });
504
+        }
505
+
478 506
         function change_aftersale_reason_click(id, aftersale_reason){
479 507
             $("#aftersale_reason_1"+id).hide();
480 508
             $("#aftersale_reason_2"+id).show();

+ 2 - 2
resources/views/statistics/districtRoi.blade.php

@@ -34,7 +34,7 @@
34 34
                 <ul>
35 35
                     <li>总投放成本:&yen;{{$total_data['cost']}}&nbsp;&nbsp;&nbsp;&nbsp;
36 36
                     总加粉数:{{$total_data['conversion_times']}}&nbsp;&nbsp;&nbsp;&nbsp;
37
-                    总新粉数量:{{$total_data['fan_count']}}&nbsp;&nbsp;&nbsp;&nbsp;
37
+                    总下单人数:{{$total_data['fan_count']}}&nbsp;&nbsp;&nbsp;&nbsp;
38 38
                     新粉成单数:{{$total_data['new_order_count']}}&nbsp;&nbsp;&nbsp;&nbsp;
39 39
                     新粉收入:&yen;{{$total_data['new_order_amount']}}&nbsp;&nbsp;&nbsp;&nbsp;
40 40
                     新粉ROI:{{$total_data['new_roi']}}&nbsp;&nbsp;&nbsp;&nbsp;
@@ -53,7 +53,7 @@
53 53
                     <th width="5%">城市</th>
54 54
                     <th width="5%">投放成本</th>
55 55
                     <th width="5%">加粉数</th>
56
-                    <th width="5%">新粉数量</th>
56
+                    <th width="5%">下单人数</th>
57 57
                     <th width="5%">新粉成单数</th>
58 58
                     <th width="5%">新粉收入</th>
59 59
                     <th width="5%">新粉ROI</th>

+ 1 - 1
resources/views/statistics/districtRoi30day.blade.php

@@ -35,7 +35,7 @@
35 35
                     <th width="5%">城市</th>
36 36
                     <th width="5%">投放成本</th>
37 37
                     <th width="5%">加粉数</th>
38
-                    <th width="5%">新粉数量</th>
38
+                    <th width="5%">下单人数</th>
39 39
                     <th width="5%">新粉成单数</th>
40 40
                     <th width="5%">新粉收入</th>
41 41
                     <th width="5%">新粉ROI</th>

+ 1 - 1
resources/views/statistics/districtRoi30dayTotal.blade.php

@@ -29,7 +29,7 @@
29 29
                     <th width="5%">城市</th>
30 30
                     <th width="5%">投放成本</th>
31 31
                     <th width="5%">加粉数</th>
32
-                    <th width="5%">新粉数量</th>
32
+                    <th width="5%">下单人数</th>
33 33
                     <th width="5%">新粉成单数</th>
34 34
                     <th width="5%">新粉收入</th>
35 35
                     <th width="5%">新粉ROI</th>

+ 1 - 1
resources/views/statistics/districtRoi7day.blade.php

@@ -35,7 +35,7 @@
35 35
                     <th width="5%">城市</th>
36 36
                     <th width="5%">投放成本</th>
37 37
                     <th width="5%">加粉数</th>
38
-                    <th width="5%">新粉数量</th>
38
+                    <th width="5%">下单人数</th>
39 39
                     <th width="5%">新粉成单数</th>
40 40
                     <th width="5%">新粉收入</th>
41 41
                     <th width="5%">新粉ROI</th>

+ 1 - 1
resources/views/statistics/districtRoi7dayTotal.blade.php

@@ -29,7 +29,7 @@
29 29
                     <th width="5%">城市</th>
30 30
                     <th width="5%">投放成本</th>
31 31
                     <th width="5%">加粉数</th>
32
-                    <th width="5%">新粉数量</th>
32
+                    <th width="5%">下单人数</th>
33 33
                     <th width="5%">新粉成单数</th>
34 34
                     <th width="5%">新粉收入</th>
35 35
                     <th width="5%">新粉ROI</th>