Procházet zdrojové kódy

运费成本可编辑

sunhao %!s(int64=5) %!d(string=před) roky
rodič
revize
f6a859b211

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

@@ -650,6 +650,7 @@ class OrderController extends Controller
650 650
         $logistics_id = $request->input('logistics_id');
651 651
         $cost = $request->input('cost');
652 652
         $freight_cost = $request->input('freight_cost');
653
+        $send_note = trim($request->input('send_note'));
653 654
         $buyerMemo = $request->input('buyerMemo');
654 655
         $sellerMemo = $request->input('sellerMemo');
655 656
 
@@ -665,6 +666,7 @@ class OrderController extends Controller
665 666
         }
666 667
         if(isset($buyerMemo)) $data['buyerMemo'] = $buyerMemo;
667 668
         if(isset($sellerMemo)) $data['sellerMemo'] = $sellerMemo;
669
+        if(isset($send_note)) $data['send_note'] = $send_note;
668 670
         if($id>0 && !empty($data)){
669 671
             $res = Order::where('id', $id)->update($data);
670 672
         }

+ 25 - 1
resources/views/order/warehouselist.blade.php

@@ -77,7 +77,11 @@
77 77
                                 <input id="freight_cost_2{{$a['id']}}" style="display: none" type='text' name='freight_cost' value="{{$a['freight_cost']}}" onblur="change_freight_cost({{$a['id']}})" />
78 78
                                 <span class="sort_icon" hidden  onClick='change_freight_cost_click("{{$a['id']}}","{{$a['freight_cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
79 79
                             </td> 
80
-                            <td>{{$a['send_note']}}</td>                                                         
80
+                            <td class ="change_logistics_id"> 
81
+                                <p id="send_note_1{{$a['id']}}">{{$a['send_note']}}</p> 
82
+                                <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>
83
+                                <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>
84
+                            </td>                                                         
81 85
                             <td>{{$a['createTime']}}</td>                                                                                                          
82 86
                                                                                                                                                                  
83 87
                         </tr>
@@ -233,6 +237,26 @@
233 237
             });
234 238
         }
235 239
 
240
+        function change_send_note_click(id, send_note){
241
+            $("#send_note_1"+id).hide();
242
+            $("#send_note_2"+id).show();
243
+            $("#send_note_2"+id).focus();
244
+        }
245
+
246
+        function change_send_note(id){
247
+            var send_note = $("#send_note_2"+id).val();
248
+            $.ajax({
249
+                url: '/admin/order/editLogisticsId?id='+id+'&send_note='+send_note,
250
+                type: 'get',
251
+                dateType: 'json',
252
+                success:function(msg){
253
+                    $("#send_note_1"+id).html(send_note);
254
+                    $("#send_note_1"+id).show();
255
+                    $("#send_note_2"+id).hide();
256
+                }
257
+            });
258
+        }
259
+
236 260
         //批量导入
237 261
         function importExcel(){
238 262
             $("#modal-demo1").modal("show");