Browse Source

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

sunhao 5 years ago
parent
commit
93325367c8

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

343
             $team_id = DB::table('admin')->where('id', $admin_id)->pluck('team_id');
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
             $search_admin = 0;
347
             $search_admin = 0;
348
             $admin_id = $self_id;
348
             $admin_id = $self_id;
349
         }
349
         }
596
             $team_id = DB::table('admin')->where('id', $admin_id)->pluck('team_id');
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
             $search_admin = 0;
600
             $search_admin = 0;
601
             $admin_id = $self_id;
601
             $admin_id = $self_id;
602
         }
602
         }
737
         //销售列表
737
         //销售列表
738
         //销售团队
738
         //销售团队
739
         $team_ids = Admin::getTeams();
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
         $salers = DB::table('admin')->whereIn('id', $ids)->lists('realname', 'id');
742
         $salers = DB::table('admin')->whereIn('id', $ids)->lists('realname', 'id');
743
  
743
  

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

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

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

38
         $offset = ($page-1) * $pageSize;
38
         $offset = ($page-1) * $pageSize;
39
 
39
 
40
         $self_role = session('role_name');
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
             $admin_id = $request->input('admin_id');
42
             $admin_id = $request->input('admin_id');
43
             $search_admin = 1;
43
             $search_admin = 1;
44
         }else{
44
         }else{
79
             if($etime) $query->where('createTime', '<=', $etime);
79
             if($etime) $query->where('createTime', '<=', $etime);
80
             if($receiverName) $query->where('receiverName', 'like', $receiverName . '%');
80
             if($receiverName) $query->where('receiverName', 'like', $receiverName . '%');
81
             if($receiverMobile) $query->where('receiverMobile', $receiverMobile);
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
             if(!empty($sale_ids)) $query->whereIn('admin_id', $sale_ids);
83
             if(!empty($sale_ids)) $query->whereIn('admin_id', $sale_ids);
84
             if(($status>=0)) $query->where('status', $status);
84
             if(($status>=0)) $query->where('status', $status);
85
             if(($id>0)) $query->where('id', $id);
85
             if(($id>0)) $query->where('id', $id);
99
             if($etime) $query->where('createTime', '<=', $etime);
99
             if($etime) $query->where('createTime', '<=', $etime);
100
             if($receiverName) $query->where('receiverName', 'like', $receiverName . '%');
100
             if($receiverName) $query->where('receiverName', 'like', $receiverName . '%');
101
             if($receiverMobile) $query->where('receiverMobile', $receiverMobile);
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
             if(!empty($sale_ids)) $query->whereIn('admin_id', $sale_ids);
103
             if(!empty($sale_ids)) $query->whereIn('admin_id', $sale_ids);
104
             if(($status>=0)) $query->where('status', $status);
104
             if(($status>=0)) $query->where('status', $status);
105
             if(($id>0)) $query->where('id', $id);
105
             if(($id>0)) $query->where('id', $id);
143
             $v['receiverMobile'] = substr($v['receiverMobile'], 0, 3).'****'.substr($v['receiverMobile'], 7);
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
                 $v['enable_status'] = [];
147
                 $v['enable_status'] = [];
148
             }else{
148
             }else{
149
                 $v['enable_status'] = $this->getEnableStatus($v['status']);
149
                 $v['enable_status'] = $this->getEnableStatus($v['status']);
435
             $v['receiverMobile'] = substr($v['receiverMobile'], 0, 3).'****'.substr($v['receiverMobile'], 7);
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
                 $v['enable_status'] = [];
439
                 $v['enable_status'] = [];
440
             }else{
440
             }else{
441
                 $v['enable_status'] = $this->getEnableStatus($v['status']);
441
                 $v['enable_status'] = $this->getEnableStatus($v['status']);
1368
     public function order_export(Request $request){
1368
     public function order_export(Request $request){
1369
         
1369
         
1370
         $self_role = session('role_name');
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
             $admin_id = $request->input('admin_id');
1372
             $admin_id = $request->input('admin_id');
1373
         }else{
1373
         }else{
1374
             $admin_id = session('admin_id');
1374
             $admin_id = session('admin_id');
1375
         }
1375
         }
1376
 
1376
 
1377
         $is_saler = 0;
1377
         $is_saler = 0;
1378
-        if($self_role == '销售'){
1378
+        if($self_role == '销售' || $self_role == '分销销售'){
1379
             $is_saler = 1;
1379
             $is_saler = 1;
1380
         }
1380
         }
1381
 
1381
 
1420
             if($etime) $query->where('createTime', '<=', $etime);
1420
             if($etime) $query->where('createTime', '<=', $etime);
1421
             if($receiverName) $query->where('receiverName', 'like', $receiverName . '%');
1421
             if($receiverName) $query->where('receiverName', 'like', $receiverName . '%');
1422
             if($receiverMobile) $query->where('receiverMobile', $receiverMobile);
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
             if(!empty($sale_ids)) $query->whereIn('admin_id', $sale_ids);
1424
             if(!empty($sale_ids)) $query->whereIn('admin_id', $sale_ids);
1425
             if(($status>=0)) $query->where('status', $status);
1425
             if(($status>=0)) $query->where('status', $status);
1426
             if(($id>0)) $query->where('id', $id);
1426
             if(($id>0)) $query->where('id', $id);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

51
                 <thead>
51
                 <thead>
52
                 <tr class="text-c">
52
                 <tr class="text-c">
53
                     <th width="4%"><!--input type="checkbox" id="selected-all"-->订单编号</th>
53
                     <th width="4%"><!--input type="checkbox" id="selected-all"-->订单编号</th>
54
+                    <th width="4%">卖家云订单编号</th>
54
                     <th width="4%">买家名称</th>
55
                     <th width="4%">买家名称</th>
55
                     <th width="4%">收货人</th>
56
                     <th width="4%">收货人</th>
56
                     <th width="4%">收货人手机号</th>
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
                     <th width="4%">预发货时间</th>
60
                     <th width="4%">预发货时间</th>
60
-                    <th width="6%">物流单号</th>                    
61
+                    <th width="5%">物流单号</th>                    
62
+                    <th width="4%">发货时间</th>                    
61
                     @if($self_role !='销售' ) 
63
                     @if($self_role !='销售' ) 
62
                     <th width="3%">货品成本</th>
64
                     <th width="3%">货品成本</th>
63
                     <th width="3%">运费成本</th>
65
                     <th width="3%">运费成本</th>
64
                      @endif
66
                      @endif
65
                     <th width="4%">发货仓库</th>
67
                     <th width="4%">发货仓库</th>
66
                     <th width="4%">付款金额</th>                  
68
                     <th width="4%">付款金额</th>                  
69
+                    <th width="4%">付款方式</th>                  
67
                     <th width="5%">下单时间</th>
70
                     <th width="5%">下单时间</th>
68
                     <th width="4%">加粉时间</th>                   
71
                     <th width="4%">加粉时间</th>                   
69
                     <th width="2%">是否复购</th>                  
72
                     <th width="2%">是否复购</th>                  
70
                     <th width="2%">是否退补单</th>                                                       
73
                     <th width="2%">是否退补单</th>                                                       
71
                     <th width="4%">应该退补差价</th> 
74
                     <th width="4%">应该退补差价</th> 
75
+                    <th width="4%">退补付款方式</th> 
72
                     <th width="5%">退补备注</th>                 
76
                     <th width="5%">退补备注</th>                 
77
+                    <th width="5%">退补时间</th>                 
73
                     <th width="4%">所属销售</th> 
78
                     <th width="4%">所属销售</th> 
74
                     <th width="4%">订单状态</th>                  
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
                     <th width="5%">买家备注</th>                  
82
                     <th width="5%">买家备注</th>                  
78
                     <th width="5%">卖家备注</th>                                                        
83
                     <th width="5%">卖家备注</th>                                                        
79
                     <th width="5%">发货备注</th>                                                        
84
                     <th width="5%">发货备注</th>                                                        
80
-                                    
85
+                    <th width="5%">售后费用</th>                                                        
86
+                    <th width="5%">售后原因</th>                                                        
87
+                    <th width="5%">售后时间</th>                                                                      
81
                 </tr>
88
                 </tr>
82
                 </thead>
89
                 </thead>
83
                 <tbody>
90
                 <tbody>
85
                     @foreach($result as $a)
92
                     @foreach($result as $a)
86
                         <tr class="text-c" style=" text-align:center;">                           
93
                         <tr class="text-c" style=" text-align:center;">                           
87
                             <td><!--input type="checkbox" name="id[]" value="{{$a['id']}}"--> {{$a['id']}}</td>                            
94
                             <td><!--input type="checkbox" name="id[]" value="{{$a['id']}}"--> {{$a['id']}}</td>                            
95
+                            <td>{{$a['orderCode']}}</td>                            
88
                             <td>{{$a['customerName']}}</td>                            
96
                             <td>{{$a['customerName']}}</td>                            
89
                             <td>{{$a['receiverName']}}</td>                            
97
                             <td>{{$a['receiverName']}}</td>                            
90
                             <td>{{$a['receiverMobile']}}</td>                                                                                    
98
                             <td>{{$a['receiverMobile']}}</td>                                                                                    
100
                             </td> 
108
                             </td> 
101
                             <td>{{$a['delivery_date']}}</td> 
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
                             <td>{{$a['logistics_id']}}</td>
112
                             <td>{{$a['logistics_id']}}</td>
105
                             @else                          
113
                             @else                          
106
                             <td class ="change_logistics_id"> 
114
                             <td class ="change_logistics_id"> 
109
                                 <span class="sort_icon" hidden  onClick='change_logistics_click("{{$a['id']}}","{{$a['logistics_id']}}")' style="cursor:pointer"><i class="Hui-iconfont">&#xe647;</i></span>
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
                             </td>
118
                             </td>
111
                             @endif
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
                             @if($self_role !='销售' )
126
                             @if($self_role !='销售' )
114
-                            @if($self_role =='管理员' && $a['status']>0)
127
+                            @if($self_role =='管理员' || $self_role =='分销管理员' && $a['status']>0)
115
                                 <td>{{$a['cost']}}</td>
128
                                 <td>{{$a['cost']}}</td>
116
                                 <td>{{$a['freight_cost']}}</td>
129
                                 <td>{{$a['freight_cost']}}</td>
117
                             @else
130
                             @else
124
                                 <p id="freight_cost_1{{$a['id']}}">{{$a['freight_cost']}}</p> 
137
                                 <p id="freight_cost_1{{$a['id']}}">{{$a['freight_cost']}}</p> 
125
                                 <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']}})" />
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
                                 <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>
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
                             @endif
141
                             @endif
129
                             @endif                          
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
                             <td>{{$a['receivedAmount']}}</td>                            
144
                             <td>{{$a['receivedAmount']}}</td>                            
145
+                            <td>{{$a['payment_type']}}</td>                            
132
                             <td>{{$a['createTime']}}</td> 
146
                             <td>{{$a['createTime']}}</td> 
133
                             <td>{{$a['fanTime']}}</td>                                                                                                         
147
                             <td>{{$a['fanTime']}}</td>                                                                                                         
134
                             <td>@if($a['is_fugou']==1) 是 @else 否 @endif</td>
148
                             <td>@if($a['is_fugou']==1) 是 @else 否 @endif</td>
135
                             <td>@if($a['is_refund']==1) 是 @else 否 @endif</td>
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
                             <td class ="change_logistics_id"> 
167
                             <td class ="change_logistics_id"> 
141
                                 <p id="refund_note_1{{$a['id']}}">{{$a['refund_note']}}</p> 
168
                                 <p id="refund_note_1{{$a['id']}}">{{$a['refund_note']}}</p> 
142
                                 <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>
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
                                 <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>
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
                             </td>
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
                             <td>{{$a['admin_name']}}</td>
178
                             <td>{{$a['admin_name']}}</td>
148
                             <td id="order_verify{{$a['id']}}">{{$a['status_name']}}</td>
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
                             <td>{{$a['buyerMemo']}}</td> 
185
                             <td>{{$a['buyerMemo']}}</td> 
154
                             <td>{{$a['sellerMemo']}}</td> 
186
                             <td>{{$a['sellerMemo']}}</td> 
155
                             <td>{{$a['send_note']}}</td> 
187
                             <td>{{$a['send_note']}}</td> 
170
                                 <p id="send_note_1{{$a['id']}}">{{$a['send_note']}}</p> 
202
                                 <p id="send_note_1{{$a['id']}}">{{$a['send_note']}}</p> 
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>
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
                                 <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>
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
                         </tr>
230
                         </tr>
178
                     @endforeach
231
                     @endforeach

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

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

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

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