Browse Source

分销管理员,分销销售权限

sunhao 5 years ago
parent
commit
93325367c8

+ 3 - 3
app/Http/Controllers/Admin/CustReportController.php

@@ -343,7 +343,7 @@ class custReportController extends Controller
343 343
             $team_id = DB::table('admin')->where('id', $admin_id)->pluck('team_id');
344 344
         }
345 345
 
346
-        if($self_role == '销售'){
346
+        if($self_role == '销售' || $self_role == '分销销售'){
347 347
             $search_admin = 0;
348 348
             $admin_id = $self_id;
349 349
         }
@@ -596,7 +596,7 @@ class custReportController extends Controller
596 596
             $team_id = DB::table('admin')->where('id', $admin_id)->pluck('team_id');
597 597
         }
598 598
 
599
-        if($self_role == '销售'){
599
+        if($self_role == '销售' || $self_role == '分销销售'){
600 600
             $search_admin = 0;
601 601
             $admin_id = $self_id;
602 602
         }
@@ -737,7 +737,7 @@ class custReportController extends Controller
737 737
         //销售列表
738 738
         //销售团队
739 739
         $team_ids = Admin::getTeams();
740
-        $ids = DB::table('admin_role')->where('user_id','!=',3)->where('role_name', '销售')->lists('user_id');
740
+        $ids = DB::table('admin_role')->where('user_id','!=',3)->whereIn('role_name', ['销售', '分销销售'])->lists('user_id');
741 741
         //销售名字
742 742
         $salers = DB::table('admin')->whereIn('id', $ids)->lists('realname', 'id');
743 743
  

+ 2 - 2
app/Http/Controllers/Admin/CustomerDepositController.php

@@ -27,7 +27,7 @@ class CustomerDepositController extends Controller
27 27
         $self_id = session('admin_id');
28 28
         
29 29
         $saler_ids = null;
30
-        if($self_role == '管理员'){
30
+        if($self_role == '管理员' || $self_role == '分销管理员'){
31 31
             $team_id = DB::table('admin')->where('id', $self_id)->pluck('team_id');
32 32
             $saler_ids = DB::table('admin')->where('team_id', $team_id)->lists('id');
33 33
         }
@@ -136,7 +136,7 @@ class CustomerDepositController extends Controller
136 136
 
137 137
         $self_role = session('role_name');
138 138
         $team_id = null;
139
-        if($self_role == '管理员'){
139
+        if($self_role == '管理员' || $self_role == '分销管理员'){
140 140
             $admin_id = session('admin_id');
141 141
             $team_id = DB::table('admin')->where('id', $admin_id)->pluck('team_id');
142 142
         }

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

@@ -38,7 +38,7 @@ class OrderController extends Controller
38 38
         $offset = ($page-1) * $pageSize;
39 39
 
40 40
         $self_role = session('role_name');
41
-        if($self_role == '超级管理员' || $self_role == '团队主管' || $self_role == '管理员' || $self_role == '售后管理员'){
41
+        if($self_role == '超级管理员' || $self_role == '团队主管' || $self_role == '管理员' || $self_role == '售后管理员' || $self_role == '分销管理员'){
42 42
             $admin_id = $request->input('admin_id');
43 43
             $search_admin = 1;
44 44
         }else{
@@ -79,7 +79,7 @@ class OrderController extends Controller
79 79
             if($etime) $query->where('createTime', '<=', $etime);
80 80
             if($receiverName) $query->where('receiverName', 'like', $receiverName . '%');
81 81
             if($receiverMobile) $query->where('receiverMobile', $receiverMobile);
82
-            if($self_role == '管理员') $query->where('status','>',0);
82
+            if($self_role == '管理员' || $self_role == '分销管理员') $query->where('status','>',0);
83 83
             if(!empty($sale_ids)) $query->whereIn('admin_id', $sale_ids);
84 84
             if(($status>=0)) $query->where('status', $status);
85 85
             if(($id>0)) $query->where('id', $id);
@@ -99,7 +99,7 @@ class OrderController extends Controller
99 99
             if($etime) $query->where('createTime', '<=', $etime);
100 100
             if($receiverName) $query->where('receiverName', 'like', $receiverName . '%');
101 101
             if($receiverMobile) $query->where('receiverMobile', $receiverMobile);
102
-            if($self_role == '管理员') $query->where('status','>',0);
102
+            if($self_role == '管理员' || $self_role == '分销管理员') $query->where('status','>',0);
103 103
             if(!empty($sale_ids)) $query->whereIn('admin_id', $sale_ids);
104 104
             if(($status>=0)) $query->where('status', $status);
105 105
             if(($id>0)) $query->where('id', $id);
@@ -143,7 +143,7 @@ class OrderController extends Controller
143 143
             $v['receiverMobile'] = substr($v['receiverMobile'], 0, 3).'****'.substr($v['receiverMobile'], 7);
144 144
 
145 145
             #获取状态机
146
-            if($self_role == '销售' && !in_array($v['status'], [0]) ){
146
+            if( ($self_role == '销售' || $self_role == '分销销售') && !in_array($v['status'], [0]) ){
147 147
                 $v['enable_status'] = [];
148 148
             }else{
149 149
                 $v['enable_status'] = $this->getEnableStatus($v['status']);
@@ -435,7 +435,7 @@ class OrderController extends Controller
435 435
             $v['receiverMobile'] = substr($v['receiverMobile'], 0, 3).'****'.substr($v['receiverMobile'], 7);
436 436
 
437 437
             #获取状态机
438
-            if($self_role == '销售' && !in_array($v['status'], [0]) ){
438
+            if( ($self_role == '销售' || $self_role == '分销销售') && !in_array($v['status'], [0]) ){
439 439
                 $v['enable_status'] = [];
440 440
             }else{
441 441
                 $v['enable_status'] = $this->getEnableStatus($v['status']);
@@ -1368,14 +1368,14 @@ class OrderController extends Controller
1368 1368
     public function order_export(Request $request){
1369 1369
         
1370 1370
         $self_role = session('role_name');
1371
-        if($self_role == '超级管理员' || $self_role == '团队主管' || $self_role == '管理员' || $self_role == 'A仓库管理员' || $self_role == 'B仓库管理员' || $self_role == '售后管理员'){
1371
+        if($self_role == '超级管理员' || $self_role == '团队主管' || $self_role == '管理员' || $self_role == 'A仓库管理员' || $self_role == 'B仓库管理员' || $self_role == '售后管理员' || $self_role == '分销管理员'){
1372 1372
             $admin_id = $request->input('admin_id');
1373 1373
         }else{
1374 1374
             $admin_id = session('admin_id');
1375 1375
         }
1376 1376
 
1377 1377
         $is_saler = 0;
1378
-        if($self_role == '销售'){
1378
+        if($self_role == '销售' || $self_role == '分销销售'){
1379 1379
             $is_saler = 1;
1380 1380
         }
1381 1381
 
@@ -1420,7 +1420,7 @@ class OrderController extends Controller
1420 1420
             if($etime) $query->where('createTime', '<=', $etime);
1421 1421
             if($receiverName) $query->where('receiverName', 'like', $receiverName . '%');
1422 1422
             if($receiverMobile) $query->where('receiverMobile', $receiverMobile);
1423
-            if($self_role == '管理员') $query->where('status','>',0);
1423
+            if($self_role == '管理员' || $self_role == '分销管理员') $query->where('status','>',0);
1424 1424
             if(!empty($sale_ids)) $query->whereIn('admin_id', $sale_ids);
1425 1425
             if(($status>=0)) $query->where('status', $status);
1426 1426
             if(($id>0)) $query->where('id', $id);

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

@@ -768,7 +768,7 @@ class StatisticsController extends Controller
768 768
         $end_time = date('Y-m-d');
769 769
         
770 770
         $self_role = session('role_name');
771
-        if($self_role == '销售'){
771
+        if($self_role == '销售' || $self_role == '分销销售'){
772 772
             $admin_id = session('admin_id');
773 773
             #假如查看团队的
774 774
             if($is_self_team == 1){
@@ -884,7 +884,7 @@ class StatisticsController extends Controller
884 884
         $end_time = date('Y-m-d');
885 885
         
886 886
         $self_role = session('role_name');
887
-        if($self_role == '销售'){
887
+        if($self_role == '销售' || $self_role == '分销销售'){
888 888
             $admin_id = session('admin_id');
889 889
             #假如查看团队的
890 890
             if($is_self_team == 1){
@@ -1050,7 +1050,7 @@ class StatisticsController extends Controller
1050 1050
         $end_time = date('Y-m-d');
1051 1051
         
1052 1052
         $self_role = session('role_name');
1053
-        if($self_role == '销售'){
1053
+        if($self_role == '销售' || $self_role == '分销销售'){
1054 1054
             $admin_id = session('admin_id');
1055 1055
             #假如查看团队的
1056 1056
             if($is_self_team == 1){
@@ -1176,7 +1176,7 @@ class StatisticsController extends Controller
1176 1176
         $end_time = date('Y-m-d');
1177 1177
         
1178 1178
         $self_role = session('role_name');
1179
-        if($self_role == '销售'){
1179
+        if($self_role == '销售' || $self_role == '分销销售'){
1180 1180
             $admin_id = session('admin_id');
1181 1181
             #假如查看团队的
1182 1182
             if($is_self_team == 1){

+ 1 - 1
resources/views/custreport/detailcreate.blade.php

@@ -52,7 +52,7 @@
52 52
                 </div>
53 53
             </div>
54 54
             @if(0)
55
-            @if($self_role !='销售' )
55
+            @if($self_role !='销售' && $self_role != '分销销售')
56 56
             <div class="row cl">
57 57
                 <label class="form-label col-xs-4 col-sm-2">
58 58
                     选择销售员(不选默认当前用户):</label>

+ 1 - 1
resources/views/custreport/detailedit.blade.php

@@ -54,7 +54,7 @@
54 54
                 </div>
55 55
             </div>
56 56
             @if(0)
57
-            @if($self_role !='销售' )
57
+            @if($self_role !='销售' && $self_role != '分销销售')
58 58
             <div class="row cl">
59 59
                 <label class="form-label col-xs-4 col-sm-2">
60 60
                     选择销售员(不选默认当前用户):</label>

+ 1 - 1
resources/views/deposit/create.blade.php

@@ -81,7 +81,7 @@
81 81
                 </div>
82 82
             </div>
83 83
 
84
-            @if($self_role !='销售' )
84
+            @if($self_role !='销售' && $self_role != '分销销售')
85 85
             <div class="row cl">
86 86
                 <label class="form-label col-xs-4 col-sm-2">
87 87
                     选择销售员(不选默认当前用户):</label>

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

@@ -148,7 +148,7 @@
148 148
                 </div>
149 149
             </div>
150 150
 
151
-            @if($self_role !='销售' )
151
+            @if($self_role !='销售' && $self_role != '分销销售')
152 152
             <div class="row cl">
153 153
                 <label class="form-label col-xs-4 col-sm-2">
154 154
                     成本:</label>
@@ -268,7 +268,7 @@
268 268
                 </div>
269 269
             </div>
270 270
             @if(0)
271
-            @if($self_role !='销售' )
271
+            @if($self_role !='销售' && $self_role != '分销销售' )
272 272
             <div class="row cl">
273 273
                 <label class="form-label col-xs-4 col-sm-2">
274 274
                     选择销售员(不选默认当前用户):</label>

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

@@ -163,7 +163,7 @@
163 163
             </div>
164 164
             @endif
165 165
 
166
-            @if($self_role !='销售' )
166
+            @if($self_role !='销售' && $self_role != '分销销售' )
167 167
             <div class="row cl">
168 168
                 <label class="form-label col-xs-4 col-sm-2">
169 169
                     成本:</label>
@@ -342,7 +342,7 @@
342 342
                 </div>
343 343
             </div>
344 344
             @if(0)
345
-            @if($self_role !='销售' )
345
+            @if($self_role !='销售' && $self_role != '分销销售' )
346 346
             <div class="row cl">
347 347
                 <label class="form-label col-xs-4 col-sm-2">
348 348
                     选择销售员(不选默认当前用户):</label>

+ 8 - 8
resources/views/order/orderlist.blade.php

@@ -28,7 +28,7 @@
28 28
                <input class="input-text" style="width:5%;text-align:center" type="text" value="订单状态"/>
29 29
                 <select style="width:6%;text-align:center" id='status' name="status">
30 30
                     <option value="-1" @if($status=='-1') selected @endif>-- 请选择--</option>
31
-                    @if($self_role !='管理员' )<option value="0" @if($status==0) selected @endif>已录入</option> @endif
31
+                    @if($self_role !='管理员' && $self_role != '分销管理员' )<option value="0" @if($status==0) selected @endif>已录入</option> @endif
32 32
                     <option value="1" @if($status==1) selected @endif>待审核</option>
33 33
                     <option value="2" @if($status==2) selected @endif>已审核</option>
34 34
                     <option value="3" @if($status==3) selected @endif>已发货</option>
@@ -52,7 +52,7 @@
52 52
         </div>
53 53
         
54 54
         <div class="mt-20">
55
-            @if($overtime && $self_role !='销售')
55
+            @if($overtime && $self_role !='销售' && $self_role != '分销销售' && $self_role != '分销管理员')
56 56
                 <font color='red'>
57 57
                 超一天未发订单量:【{{$overtime['count']}}单】&nbsp; 订单ID:【
58 58
                     @foreach($overtime['list'] as $k=>$oid)
@@ -93,7 +93,7 @@
93 93
                     <th width="4%">所属销售</th> 
94 94
                     <th width="4%">订单状态</th>                  
95 95
                     <th width="4%">审核时间</th>                  
96
-                    @if($self_role =='销售' )<th width="5%">驳回原因</th>@endif                                    
96
+                    @if($self_role =='销售' || $self_role =='分销销售' )<th width="5%">驳回原因</th>@endif                                    
97 97
                     <th width="5%">买家备注</th>                  
98 98
                     <th width="5%">卖家备注</th>                                                        
99 99
                     <th width="5%">发货备注</th>                                                        
@@ -124,7 +124,7 @@
124 124
                             </td> 
125 125
                             <td>{{$a['delivery_date']}}</td> 
126 126
 
127
-                            @if($self_role =='销售' || ($self_role =='管理员' && $a['status']>0) ) 
127
+                            @if($self_role =='销售' || $self_role =='分销销售' || ($self_role =='管理员' || $self_role =='分销管理员' && $a['status']>0) ) 
128 128
                             <td>{{$a['logistics_id']}}</td>
129 129
                             @else                          
130 130
                             <td class ="change_logistics_id"> 
@@ -140,7 +140,7 @@
140 140
                             </td>
141 141
                             
142 142
                             @if($self_role !='销售' )
143
-                            @if($self_role =='管理员' && $a['status']>0)
143
+                            @if($self_role =='管理员' || $self_role =='分销管理员' && $a['status']>0)
144 144
                                 <td>{{$a['cost']}}</td>
145 145
                                 <td>{{$a['freight_cost']}}</td>
146 146
                             @else
@@ -194,10 +194,10 @@
194 194
                             <td>{{$a['admin_name']}}</td>
195 195
                             <td id="order_verify{{$a['id']}}">{{$a['status_name']}}</td>
196 196
                             <td>{{$a['verify_time']}}</td>
197
-                            @if($self_role =='销售' ) <td>@if($a['status'] == 0)<font color='red'> {{$a['refuse_reason']}} </font> @endif</td> @endif
197
+                            @if($self_role =='销售' || $self_role =='分销销售') <td>@if($a['status'] == 0)<font color='red'> {{$a['refuse_reason']}} </font> @endif</td> @endif
198 198
                            
199 199
                             <!--td id="refund{{$a['id']}}">@if($a['order_status']==2) <span class="btn btn-danger radius">退款</span> @else 正常<br><span class="btn btn-primary radius" onclick="order_refund({{$a['id']}})">设为退款</span> @endif</td --> 
200
-                            @if(($self_role =='销售' || $self_role =='管理员') && $a['status']>0)
200
+                            @if(($self_role =='销售' || $self_role =='管理员' || $self_role =='分销销售' ) && $a['status']>0)
201 201
                             <td>{{$a['buyerMemo']}}</td> 
202 202
                             <td>{{$a['sellerMemo']}}</td> 
203 203
                             <td>{{$a['send_note']}}</td> 
@@ -253,7 +253,7 @@
253 253
                                     @endforeach
254 254
                                 @endif
255 255
 
256
-                                @if(($self_role =='销售') && $a['status']>0)
256
+                                @if(($self_role =='销售' || $self_role =='分销销售') && $a['status']>0)
257 257
 
258 258
                                 @else
259 259
 

+ 74 - 21
resources/views/order/predictorderlist.blade.php

@@ -51,33 +51,40 @@
51 51
                 <thead>
52 52
                 <tr class="text-c">
53 53
                     <th width="4%"><!--input type="checkbox" id="selected-all"-->订单编号</th>
54
+                    <th width="4%">卖家云订单编号</th>
54 55
                     <th width="4%">买家名称</th>
55 56
                     <th width="4%">收货人</th>
56 57
                     <th width="4%">收货人手机号</th>
57
-                    <th width="6%">收货地址</th>
58
-                    <th width="9%">商品信息</th>
58
+                    <th width="5%">收货地址</th>
59
+                    <th width="8%">商品信息</th>
59 60
                     <th width="4%">预发货时间</th>
60
-                    <th width="6%">物流单号</th>                    
61
+                    <th width="5%">物流单号</th>                    
62
+                    <th width="4%">发货时间</th>                    
61 63
                     @if($self_role !='销售' ) 
62 64
                     <th width="3%">货品成本</th>
63 65
                     <th width="3%">运费成本</th>
64 66
                      @endif
65 67
                     <th width="4%">发货仓库</th>
66 68
                     <th width="4%">付款金额</th>                  
69
+                    <th width="4%">付款方式</th>                  
67 70
                     <th width="5%">下单时间</th>
68 71
                     <th width="4%">加粉时间</th>                   
69 72
                     <th width="2%">是否复购</th>                  
70 73
                     <th width="2%">是否退补单</th>                                                       
71 74
                     <th width="4%">应该退补差价</th> 
75
+                    <th width="4%">退补付款方式</th> 
72 76
                     <th width="5%">退补备注</th>                 
77
+                    <th width="5%">退补时间</th>                 
73 78
                     <th width="4%">所属销售</th> 
74 79
                     <th width="4%">订单状态</th>                  
75
-                    @if($self_role =='销售' )<th width="5%">驳回原因</th>@endif                  
76
-                                   
80
+                    <th width="4%">审核时间</th>                  
81
+                    @if($self_role =='销售' || $self_role =='分销销售' )<th width="5%">驳回原因</th>@endif                                    
77 82
                     <th width="5%">买家备注</th>                  
78 83
                     <th width="5%">卖家备注</th>                                                        
79 84
                     <th width="5%">发货备注</th>                                                        
80
-                                    
85
+                    <th width="5%">售后费用</th>                                                        
86
+                    <th width="5%">售后原因</th>                                                        
87
+                    <th width="5%">售后时间</th>                                                                      
81 88
                 </tr>
82 89
                 </thead>
83 90
                 <tbody>
@@ -85,6 +92,7 @@
85 92
                     @foreach($result as $a)
86 93
                         <tr class="text-c" style=" text-align:center;">                           
87 94
                             <td><!--input type="checkbox" name="id[]" value="{{$a['id']}}"--> {{$a['id']}}</td>                            
95
+                            <td>{{$a['orderCode']}}</td>                            
88 96
                             <td>{{$a['customerName']}}</td>                            
89 97
                             <td>{{$a['receiverName']}}</td>                            
90 98
                             <td>{{$a['receiverMobile']}}</td>                                                                                    
@@ -100,7 +108,7 @@
100 108
                             </td> 
101 109
                             <td>{{$a['delivery_date']}}</td> 
102 110
 
103
-                            @if($self_role =='销售' || ($self_role =='管理员' && $a['status']>0) ) 
111
+                            @if($self_role =='销售' || $self_role =='分销销售' || ($self_role =='管理员' || $self_role =='分销管理员' && $a['status']>0) ) 
104 112
                             <td>{{$a['logistics_id']}}</td>
105 113
                             @else                          
106 114
                             <td class ="change_logistics_id"> 
@@ -109,9 +117,14 @@
109 117
                                 <span class="sort_icon" hidden  onClick='change_logistics_click("{{$a['id']}}","{{$a['logistics_id']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
110 118
                             </td>
111 119
                             @endif
120
+                            <td class ="change_logistics_id"> 
121
+                                <p id="send_time_1{{$a['id']}}">{{$a['send_time']}}</p> 
122
+                                <input id="send_time_2{{$a['id']}}" style="display: none"  name='send_time' onblur="change_send_time({{$a['id']}})" value="{{$a['send_time']}}"  onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd' })" class=" Wdate" />
123
+                                <span class="sort_icon" hidden  onClick='change_send_time_click("{{$a['id']}}","{{$a['send_time']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
124
+                            </td>
112 125
                             
113 126
                             @if($self_role !='销售' )
114
-                            @if($self_role =='管理员' && $a['status']>0)
127
+                            @if($self_role =='管理员' || $self_role =='分销管理员' && $a['status']>0)
115 128
                                 <td>{{$a['cost']}}</td>
116 129
                                 <td>{{$a['freight_cost']}}</td>
117 130
                             @else
@@ -124,32 +137,51 @@
124 137
                                 <p id="freight_cost_1{{$a['id']}}">{{$a['freight_cost']}}</p> 
125 138
                                 <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']}})" />
126 139
                                 <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>
127
-                            </td> 
140
+                            </td>
128 141
                             @endif
129 142
                             @endif                          
130
-                            <td>@if($a['warehouse']==1) A仓库 @elseif($a['warehouse']==2) B仓库 @else @endif</td>                            
143
+                            <td>@if($a['warehouse']==1) A仓库 @elseif($a['warehouse']==2) B仓库 @elseif($a['warehouse']==3) C仓库 @else @endif</td>                            
131 144
                             <td>{{$a['receivedAmount']}}</td>                            
145
+                            <td>{{$a['payment_type']}}</td>                            
132 146
                             <td>{{$a['createTime']}}</td> 
133 147
                             <td>{{$a['fanTime']}}</td>                                                                                                         
134 148
                             <td>@if($a['is_fugou']==1) 是 @else 否 @endif</td>
135 149
                             <td>@if($a['is_refund']==1) 是 @else 否 @endif</td>
136
-                            <td>{{$a['refund_price']}}</td>
137
-                            @if(($self_role =='销售' || $self_role =='管理员') && $a['status']>0)
138
-                            <td>{{$a['refund_note']}}</td>
139
-                            @else
150
+                            <td class ="change_logistics_id"> 
151
+                                <p id="refund_price_1{{$a['id']}}">{{$a['refund_price']}}</p> 
152
+                                <input id="refund_price_2{{$a['id']}}" style="display: none" type='text' name='refund_price' value="{{$a['refund_price']}}" onblur='change_refund_price({{$a['id']}},"{{$a['refund_type']}}")' />
153
+                                <span class="sort_icon" hidden  onClick='change_refund_price_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
154
+                            </td>
155
+
156
+                            <td class ="change_logistics_id"> 
157
+                                <p id="refund_type_1{{$a['id']}}">{{$a['refund_type']}}</p> 
158
+                                <select id="refund_type_2{{$a['id']}}" style="display: none" name='refund_type' value="{{$a['refund_type']}}" onchange="change_refund_type({{$a['id']}})">
159
+                                    <option value='0'>-请选择-</option>
160
+                                    <option value='1'>微信支付</option>
161
+                                    <!--option value='2'>付款码支付</option-->
162
+                                    <option value='3'>个体户支付</option>
163
+                                </select>
164
+                                <span class="sort_icon" hidden  onClick='change_refund_type_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
165
+                            </td>
166
+                                                    
140 167
                             <td class ="change_logistics_id"> 
141 168
                                 <p id="refund_note_1{{$a['id']}}">{{$a['refund_note']}}</p> 
142 169
                                 <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>
143 170
                                 <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>
144 171
                             </td>
145
-                            @endif
172
+                            <td class ="change_logistics_id"> 
173
+                                <p id="refund_time_1{{$a['id']}}">{{$a['refund_time']}}</p> 
174
+                                <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" />
175
+                                <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>
176
+                            </td>
146 177
 
147 178
                             <td>{{$a['admin_name']}}</td>
148 179
                             <td id="order_verify{{$a['id']}}">{{$a['status_name']}}</td>
149
-                            @if($self_role =='销售' ) <td>@if($a['status'] == 0)<font color='red'> {{$a['refuse_reason']}} </font> @endif</td> @endif
180
+                            <td>{{$a['verify_time']}}</td>
181
+                            @if($self_role =='销售' || $self_role =='分销销售') <td>@if($a['status'] == 0)<font color='red'> {{$a['refuse_reason']}} </font> @endif</td> @endif
150 182
                            
151
-                            
152
-                            @if(($self_role =='销售' || $self_role =='管理员') && $a['status']>0)
183
+                            <!--td id="refund{{$a['id']}}">@if($a['order_status']==2) <span class="btn btn-danger radius">退款</span> @else 正常<br><span class="btn btn-primary radius" onclick="order_refund({{$a['id']}})">设为退款</span> @endif</td --> 
184
+                            @if(($self_role =='销售' || $self_role =='管理员' || $self_role =='分销销售' ) && $a['status']>0)
153 185
                             <td>{{$a['buyerMemo']}}</td> 
154 186
                             <td>{{$a['sellerMemo']}}</td> 
155 187
                             <td>{{$a['send_note']}}</td> 
@@ -170,9 +202,30 @@
170 202
                                 <p id="send_note_1{{$a['id']}}">{{$a['send_note']}}</p> 
171 203
                                 <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>
172 204
                                 <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>
173
-                            </td>  
174
-                            @endif                                                                                                  
175
-                            
205
+                            </td>                             
206
+                            @endif
207
+
208
+                            @if($self_role =='超级管理员' || $self_role =='售后管理员')
209
+                            <td class ="change_logistics_id"> 
210
+                                <p id="aftersale_fee_1{{$a['id']}}">{{$a['aftersale_fee']}}</p> 
211
+                                <input id="aftersale_fee_2{{$a['id']}}" style="display: none" type='text' name='aftersale_fee' value="{{$a['aftersale_fee']}}" onblur="change_aftersale_fee({{$a['id']}})" />
212
+                                <span class="sort_icon" hidden  onClick='change_aftersale_fee_click("{{$a['id']}}","{{$a['cost']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
213
+                            </td>
214
+                            <td class ="change_logistics_id"> 
215
+                                <p id="aftersale_reason_1{{$a['id']}}">{{$a['aftersale_reason']}}</p> 
216
+                                <textarea id="aftersale_reason_2{{$a['id']}}" rows=4 style="display: none"  name='aftersale_reason' onblur="change_aftersale_reason({{$a['id']}})" >{{$a['aftersale_reason']}}</textarea>
217
+                                <span class="sort_icon" hidden  onClick='change_aftersale_reason_click("{{$a['id']}}","{{$a['aftersale_reason']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
218
+                            </td>
219
+                            <td class ="change_logistics_id"> 
220
+                                <p id="aftersale_time_1{{$a['id']}}">{{$a['aftersale_time']}}</p> 
221
+                                <input id="aftersale_time_2{{$a['id']}}" style="display: none"  name='aftersale_time' onblur="change_aftersale_time({{$a['id']}})" value="{{$a['aftersale_time']}}"  onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss' })" class=" Wdate" />
222
+                                <span class="sort_icon" hidden  onClick='change_aftersale_time_click("{{$a['id']}}","{{$a['aftersale_time']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
223
+                            </td>
224
+                            @else
225
+                            <td>{{$a['aftersale_fee']}}</td>
226
+                            <td>{{$a['aftersale_reason']}}</td>
227
+                            <td>{{$a['aftersale_time']}}</td>
228
+                            @endif
176 229
                                                         
177 230
                         </tr>
178 231
                     @endforeach

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

@@ -4,7 +4,7 @@
4 4
     <div class="page-container">
5 5
         <div>
6 6
             <div>  
7
-                @if($self_role != '销售')  
7
+                @if($self_role != '销售' && $self_role != '分销销售')  
8 8
                 <input class="input-text" style="width:6%;text-align:center" type="text" value="所属团队"/>                
9 9
                 <select style="width:10%;text-align:center" id='team_id' name="team_id">
10 10
                     <option value="0" @if($team_id=='') selected @endif>-- 选择团队 --</option>

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

@@ -4,7 +4,7 @@
4 4
     <div class="page-container">
5 5
         <div>
6 6
             <div>  
7
-                @if($self_role != '销售')  
7
+                @if($self_role != '销售' && $self_role != '分销销售')  
8 8
                 <input class="input-text" style="width:6%;text-align:center" type="text" value="所属团队"/>                
9 9
                 <select style="width:10%;text-align:center" id='team_id' name="team_id">
10 10
                     <option value="0" @if($team_id=='') selected @endif>-- 选择团队 --</option>