Browse Source

运费成本

sunhao 5 years ago
parent
commit
5fbb0e0ca4
1 changed files with 31 additions and 2 deletions
  1. 31 2
      resources/views/order/orderlist.blade.php

+ 31 - 2
resources/views/order/orderlist.blade.php

@@ -54,7 +54,10 @@
54 54
                     <th width="9%">商品信息</th>
55 55
                     <th width="4%">预发货时间</th>
56 56
                     <th width="6%">物流单号</th>                    
57
-                    @if($self_role !='销售' ) <th width="3%">成本</th> @endif
57
+                    @if($self_role !='销售' ) 
58
+                    <th width="3%">货品成本</th>
59
+                    <th width="3%">运费成本</th>
60
+                     @endif
58 61
                     <th width="4%">发货仓库</th>
59 62
                     <th width="4%">付款金额</th>                  
60 63
                     <th width="5%">下单时间</th>
@@ -98,12 +101,18 @@
98 101
                             @if($self_role !='销售' )
99 102
                             @if($self_role =='管理员' && $a['status']>0)
100 103
                                 <td>{{$a['cost']}}</td>
104
+                                <td>{{$a['freight_cost']}}</td>
101 105
                             @else
102 106
                             <td class ="change_logistics_id"> 
103 107
                                 <p id="cost_1{{$a['id']}}">{{$a['cost']}}</p> 
104 108
                                 <input id="cost_2{{$a['id']}}" style="display: none" type='text' name='cost' value="{{$a['cost']}}" onblur="change_cost({{$a['id']}})" />
105 109
                                 <span class="sort_icon" hidden  onClick='change_cost_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
106
-                            </td>  
110
+                            </td> 
111
+                            <td class ="change_logistics_id"> 
112
+                                <p id="freight_cost_1{{$a['id']}}">{{$a['freight_cost']}}</p> 
113
+                                <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']}})" />
114
+                                <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>
115
+                            </td>
107 116
                             @endif
108 117
                             @endif                          
109 118
                             <td>@if($a['warehouse']==1) A仓库 @elseif($a['warehouse']==2) B仓库 @else @endif</td>                            
@@ -306,6 +315,26 @@
306 315
             });
307 316
         }
308 317
 
318
+        function change_freight_cost_click(id, freight_cost){
319
+            $("#freight_cost_1"+id).hide();
320
+            $("#freight_cost_2"+id).show();
321
+            $("#freight_cost_2"+id).focus();
322
+        }
323
+
324
+        function change_freight_cost(id){
325
+            var freight_cost = $("#freight_cost_2"+id).val();
326
+            $.ajax({
327
+                url: '/admin/order/editLogisticsId?id='+id+'&freight_cost='+freight_cost,
328
+                type: 'get',
329
+                dateType: 'json',
330
+                success:function(msg){
331
+                    $("#freight_cost_1"+id).html(freight_cost);
332
+                    $("#freight_cost_1"+id).show();
333
+                    $("#freight_cost_2"+id).hide();
334
+                }
335
+            });
336
+        } 
337
+
309 338
         function change_buyerMemo_click(id, buyerMemo){
310 339
             $("#buyerMemo_1"+id).hide();
311 340
             $("#buyerMemo_2"+id).show();