sunhao 5 years ago
parent
commit
16276d66e5

+ 2 - 0
app/Http/Controllers/Admin/OrderController.php

@@ -1061,6 +1061,7 @@ class OrderController extends Controller
1061 1061
         $refund_note = $request->input('refund_note');
1062 1062
         $buyerMemo = $request->input('buyerMemo');
1063 1063
         $sellerMemo = $request->input('sellerMemo');
1064
+        $aftersale_fee = $request->input('aftersale_fee');
1064 1065
 
1065 1066
         $data = array();
1066 1067
         if(isset($logistics_id)) $data['logistics_id'] = $logistics_id;
@@ -1076,6 +1077,7 @@ class OrderController extends Controller
1076 1077
         if(isset($sellerMemo)) $data['sellerMemo'] = trim($sellerMemo);
1077 1078
         if(isset($send_note)) $data['send_note'] = trim($send_note);
1078 1079
         if(isset($refund_note)) $data['refund_note'] = trim($refund_note);
1080
+        if(isset($aftersale_fee)) $data['aftersale_fee'] = trim($aftersale_fee);
1079 1081
         if($id>0 && !empty($data)){
1080 1082
             $res = Order::where('id', $id)->update($data);
1081 1083
         }

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

@@ -83,6 +83,7 @@
83 83
                     <th width="5%">买家备注</th>                  
84 84
                     <th width="5%">卖家备注</th>                                                        
85 85
                     <th width="5%">发货备注</th>                                                        
86
+                    <th width="5%">售后费用</th>                                                        
86 87
                     <th width="5%">操作</th>                 
87 88
                 </tr>
88 89
                 </thead>
@@ -169,7 +170,17 @@
169 170
                                 <p id="send_note_1{{$a['id']}}">{{$a['send_note']}}</p> 
170 171
                                 <textarea id="send_note_2{{$a['id']}}" rows=4 style="display: none"  name='send_note' onblur="change_send_note({{$a['id']}})" >{{$a['send_note']}}</textarea>
171 172
                                 <span class="sort_icon" hidden  onClick='change_send_note_click("{{$a['id']}}","{{$a['send_note']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
172
-                            </td>  
173
+                            </td>                             
174
+                            @endif
175
+
176
+                            @if($self_role =='超级管理员' || $self_role =='售后管理员')
177
+                            <td class ="change_logistics_id"> 
178
+                                <p id="aftersale_fee_1{{$a['id']}}">{{$a['aftersale_fee']}}</p> 
179
+                                <textarea id="aftersale_fee_2{{$a['id']}}" rows=4 style="display: none"  name='aftersale_fee' onblur="change_aftersale_fee({{$a['id']}})" >{{$a['aftersale_fee']}}</textarea>
180
+                                <span class="sort_icon" hidden  onClick='change_aftersale_fee_click("{{$a['id']}}","{{$a['aftersale_fee']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
181
+                            </td>
182
+                            @else
183
+                            <td>{{$a['aftersale_fee']}}</td>
173 184
                             @endif
174 185
                             <td>
175 186
                                 @if($a['enable_status'])
@@ -405,6 +416,26 @@
405 416
             });
406 417
         }
407 418
 
419
+        function change_aftersale_fee_click(id, aftersale_fee){
420
+            $("#aftersale_fee_1"+id).hide();
421
+            $("#aftersale_fee_2"+id).show();
422
+            $("#aftersale_fee_2"+id).focus();
423
+        }
424
+
425
+        function change_aftersale_fee(id){
426
+            var aftersale_fee = $("#aftersale_fee_2"+id).val();
427
+            $.ajax({
428
+                url: '/admin/order/editLogisticsId?id='+id+'&aftersale_fee='+aftersale_fee,
429
+                type: 'get',
430
+                dateType: 'json',
431
+                success:function(msg){
432
+                    $("#aftersale_fee_1"+id).html(aftersale_fee);
433
+                    $("#aftersale_fee_1"+id).show();
434
+                    $("#aftersale_fee_2"+id).hide();
435
+                }
436
+            });
437
+        }
438
+
408 439
         function change_refund_note_click(id, refund_note){
409 440
             $("#refund_note_1"+id).hide();
410 441
             $("#refund_note_2"+id).show();

+ 2 - 2
resources/views/order/warehouselist.blade.php

@@ -63,7 +63,7 @@
63 63
                     <th width="5%">运费成本</th>                  
64 64
                     <th width="5%">发货备注</th>                  
65 65
                     <th width="5%">退补备注</th>                  
66
-                    <th width="6%">创建时间</th>                   
66
+                    <th width="6%">创建时间</th>                                      
67 67
                    
68 68
                 </tr>
69 69
                 </thead>
@@ -105,7 +105,7 @@
105 105
                                 <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>
106 106
                                 <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>
107 107
                             </td>                                                         
108
-                            <td>{{$a['createTime']}}</td>                                                                                                          
108
+                            <td>{{$a['createTime']}}</td>                                                                                                                                                                                                                   
109 109
                                                                                                                                                                  
110 110
                         </tr>
111 111
                     @endforeach