Browse Source

商品默认仓库逻辑以及提取公共仓库配置以及卖家云配置到配置文件

shensong00 4 years ago
parent
commit
15b4426725

+ 13 - 1
app/Http/Controllers/Admin/FxOrderController.php

27
 
27
 
28
 class FxOrderController extends Controller
28
 class FxOrderController extends Controller
29
 {
29
 {
30
+    protected $warehouse = [];
31
+
32
+    public function __construct()
33
+    {
34
+        $this->warehouse = config('constants.WAREHOUSE');
35
+        $is_fx = env('IS_FX');
36
+        if($is_fx > 0) {
37
+            unset($this->warehouse[1]);
38
+            unset($this->warehouse[2]);
39
+        }
40
+    }
41
+
30
 	public function orderindex(Request $request){
42
 	public function orderindex(Request $request){
31
         $page = (int)$request->input('page');
43
         $page = (int)$request->input('page');
32
         $pageSize = 20;
44
         $pageSize = 20;
1476
             $v['receiverMobile'] = substr($v['receiverMobile'], 0, 3).'****'.substr($v['receiverMobile'], 7);
1488
             $v['receiverMobile'] = substr($v['receiverMobile'], 0, 3).'****'.substr($v['receiverMobile'], 7);
1477
             $v['status_name'] = $status_arr[$v['status']];   
1489
             $v['status_name'] = $status_arr[$v['status']];   
1478
             $v['address'] = $v['receiverState'].$v['receiverCity'].$v['receiverDistrict'].$v['receiverStreet'].$v['receiverAddress'];   
1490
             $v['address'] = $v['receiverState'].$v['receiverCity'].$v['receiverDistrict'].$v['receiverStreet'].$v['receiverAddress'];   
1479
-            $v['warehouse'] = $v['warehouse'] == 1? 'A仓库':'B仓库';      
1491
+            $v['warehouse'] = $this->warehouse[$v['warehouse']];
1480
             $v['is_fugou'] = $v['is_fugou'] == 1? '是':'否';      
1492
             $v['is_fugou'] = $v['is_fugou'] == 1? '是':'否';      
1481
             $v['is_refund'] = $v['is_refund'] == 1? '是':'否'; 
1493
             $v['is_refund'] = $v['is_refund'] == 1? '是':'否'; 
1482
             $v['payment_type'] = $payArr[$v['payment_type']];    
1494
             $v['payment_type'] = $payArr[$v['payment_type']];    

+ 14 - 12
app/Http/Controllers/Admin/FxStatisticsController.php

21
 
21
 
22
 class FxStatisticsController extends Controller
22
 class FxStatisticsController extends Controller
23
 {
23
 {
24
+    protected $warehouse = [];
25
+
26
+    public function __construct()
27
+    {
28
+        $this->warehouse = config('constants.WAREHOUSE');
29
+        $is_fx = env('IS_FX');
30
+        if($is_fx > 0) {
31
+            unset($this->warehouse[1]);
32
+            unset($this->warehouse[2]);
33
+        }
34
+    }
35
+
24
      /**
36
      /**
25
      * 发货财务明细
37
      * 发货财务明细
26
      */
38
      */
68
         
80
         
69
         $result = json_decode(json_encode($result), true);
81
         $result = json_decode(json_encode($result), true);
70
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
82
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
71
-        $wareArr = array(
72
-            0 => '其他',
73
-            1 => 'A仓',
74
-            2 => 'B仓',
75
-            3 => 'C仓',
76
-        );
83
+        $wareArr = $this->warehouse;
77
         foreach($result as $k=>&$v){
84
         foreach($result as $k=>&$v){
78
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;            
85
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;            
79
             $v['payment_type'] = $payArr[$v['payment_type']];
86
             $v['payment_type'] = $payArr[$v['payment_type']];
115
         
122
         
116
         $result = json_decode(json_encode($result), true);
123
         $result = json_decode(json_encode($result), true);
117
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
124
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
118
-        $wareArr = array(
119
-            0 => '其他',
120
-            1 => 'A仓',
121
-            2 => 'B仓',
122
-            3 => 'C仓',
123
-        );
125
+        $wareArr = $this->warehouse;
124
         foreach($result as $k=>&$v){
126
         foreach($result as $k=>&$v){
125
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;            
127
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;            
126
             $v['payment_type'] = $payArr[$v['payment_type']];
128
             $v['payment_type'] = $payArr[$v['payment_type']];

+ 18 - 1
app/Http/Controllers/Admin/GoodsController.php

23
 
23
 
24
 class GoodsController extends Controller
24
 class GoodsController extends Controller
25
 {
25
 {
26
+    protected $warehouse = [];
27
+
28
+    public function __construct()
29
+    {
30
+        $this->warehouse = config('constants.WAREHOUSE');
31
+        $is_fx = env('IS_FX');
32
+        if($is_fx > 0) {
33
+            unset($this->warehouse[1]);
34
+            unset($this->warehouse[2]);
35
+        }
36
+    }
37
+
26
 	public function index(Request $request){
38
 	public function index(Request $request){
27
         $page = (int)$request->input('page');
39
         $page = (int)$request->input('page');
28
         $pageSize = 20;
40
         $pageSize = 20;
426
             echo '0';die;
438
             echo '0';die;
427
         }
439
         }
428
         $is_fx = env('IS_FX');
440
         $is_fx = env('IS_FX');
429
-        $result = Goods::select('gs.id as sku_id', 'goods.id as goods_id', 'goods.name', 'gs.propsName', 'gs.price', 'gs.is_weigh', 'gs.quantity', 'gs.is_white', 'gs.is_not_fx')->leftJoin('goods_skus as gs', 'gs.goodsCode', '=', 'goods.id')->where('goods.name', 'like', '%'.$name.'%')->where('goods.is_del', 0)->where('gs.is_del', 0)->orderBy('goods.id', 'desc')->get();
441
+        $result = Goods::select('gs.id as sku_id', 'goods.id as goods_id', 'goods.name', 'gs.propsName', 'gs.price',
442
+            'gs.is_weigh', 'gs.quantity', 'gs.is_white', 'gs.is_not_fx', 'gs.warehouse')->leftJoin('goods_skus as gs',
443
+            'gs.goodsCode', '=', 'goods.id')->where('goods.name', 'like', '%'.$name.'%')->where('goods.is_del', 0)
444
+            ->where('gs.is_del', 0)->orderBy('goods.id', 'desc')->get();
430
         $result = json_decode(json_encode($result), true);
445
         $result = json_decode(json_encode($result), true);
431
         foreach($result as $k=>&$v){
446
         foreach($result as $k=>&$v){
432
             //计算实际库存 -还未到卖家云的量
447
             //计算实际库存 -还未到卖家云的量
439
                     unset($result[$k]); 
454
                     unset($result[$k]); 
440
                 }
455
                 }
441
             }
456
             }
457
+
458
+            $v['warehouse_name'] = $this->warehouse[$v['warehouse']];
442
         }
459
         }
443
 
460
 
444
         $result = array_values($result); 
461
         $result = array_values($result); 

+ 89 - 60
app/Http/Controllers/Admin/OrderController.php

28
 
28
 
29
 class OrderController extends Controller
29
 class OrderController extends Controller
30
 {
30
 {
31
-	public function orderindex(Request $request){
31
+    protected $warehouse = [];
32
+
33
+    public function __construct()
34
+    {
35
+        $this->warehouse = config('constants.WAREHOUSE');
36
+        $is_fx = env('IS_FX');
37
+        if($is_fx > 0) {
38
+            unset($this->warehouse[1]);
39
+            unset($this->warehouse[2]);
40
+        }
41
+    }
42
+
43
+    public function orderindex(Request $request){
32
         $page = (int)$request->input('page');
44
         $page = (int)$request->input('page');
33
         $pageSize = 20;
45
         $pageSize = 20;
34
         if($page<=0){
46
         if($page<=0){
127
                 $v['pre_cost'] = 0;
139
                 $v['pre_cost'] = 0;
128
                 foreach($goods as $item){
140
                 foreach($goods as $item){
129
                     $goods_name = Goods::where('id', $item->goods_id)->pluck('name');
141
                     $goods_name = Goods::where('id', $item->goods_id)->pluck('name');
130
-                    $goods_sku_info = GoodsSkus::select('propsName', 'is_weigh', 'referenceCost', 'is_not_fx')->where('id', $item->sku_id)->first();
142
+                    $goods_sku_info = GoodsSkus::select('propsName', 'is_weigh', 'referenceCost', 'is_not_fx', 'warehouse')->where('id', $item->sku_id)->first();
131
                     if(!empty($goods_sku_info)){
143
                     if(!empty($goods_sku_info)){
132
                         $props_name = $goods_sku_info->propsName;
144
                         $props_name = $goods_sku_info->propsName;
133
                         $is_weigh = $goods_sku_info->is_weigh;
145
                         $is_weigh = $goods_sku_info->is_weigh;
134
                         $weigh_note = $is_weigh==1 ? '重量(斤)':'数量';
146
                         $weigh_note = $is_weigh==1 ? '重量(斤)':'数量';
135
                         if(!$item->gift_id) $v['pre_cost'] += $goods_sku_info->referenceCost * $item->num;
147
                         if(!$item->gift_id) $v['pre_cost'] += $goods_sku_info->referenceCost * $item->num;
136
 
148
 
137
-                        if( $goods_sku_info->is_not_fx == 1 && $v['warehouse']==3 && $v['is_not_fx'] == 0 ){
149
+                        //若有商品不属于C仓并且现在所属仓库是C仓,审核时提醒转仓
150
+                        if( $goods_sku_info->warehouse != 3 && $v['warehouse']==3 && $v['is_not_fx'] == 0 ){
151
+//                        if( $goods_sku_info->is_not_fx == 1 && $v['warehouse']==3 && $v['is_not_fx'] == 0 ){
138
                             $v['is_not_fx'] = 1;
152
                             $v['is_not_fx'] = 1;
139
                         }
153
                         }
140
                     }else{
154
                     }else{
141
                         $props_name = '';
155
                         $props_name = '';
142
                         $weigh_note = '数量';
156
                         $weigh_note = '数量';
143
                     }
157
                     }
158
+                    $goodsWarehouse = isset($this->warehouse[$goods_sku_info->warehouse]) ? $this->warehouse[$goods_sku_info->warehouse] : '';
144
                     
159
                     
145
-                    $v['goods'][] = $goods_name.'('.$props_name.')&nbsp; '.$weigh_note.':'.$item->num.'';
160
+                    $v['goods'][] = $goods_name.'('.$props_name.')&nbsp; '.$weigh_note.':'.$item->num.' '.$goodsWarehouse;
146
                 }
161
                 }
147
                 $v['pre_cost'] = round($v['pre_cost'], 2);
162
                 $v['pre_cost'] = round($v['pre_cost'], 2);
148
 
163
 
213
 
228
 
214
         $is_fx = env('IS_FX');
229
         $is_fx = env('IS_FX');
215
         return view('order/orderlist', ['result' =>$result,
230
         return view('order/orderlist', ['result' =>$result,
216
-            'page'              =>$page,
217
-            'count'             =>$count,
218
-            'pages'             =>$pages,
219
-            'admin_id'          =>$admin_id,
220
-            'team_id'           =>$team_id,
221
-            'stime'             =>$stime,
222
-            'etime'             =>$etime,
223
-            'adminlist'         =>$adminList,
224
-            'search_admin'      =>$search_admin,
225
-            'self_role'         =>$self_role,
226
-            'receiverName'         =>$receiverName,
227
-            'receiverMobile'       =>$receiverMobile,
228
-            'status'            =>$status,
229
-            'id'            =>$id,
230
-            'last_url'      => 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
231
-            'overtime'      => $overtime,
232
-            'warehouse'      => $warehouse,
233
-            'is_fx'      => $is_fx,
234
-            'thisTime'      => date('Y-m-d H:i:s'),
231
+            'page'                  => $page,
232
+            'count'                 => $count,
233
+            'pages'                 => $pages,
234
+            'admin_id'              => $admin_id,
235
+            'team_id'               => $team_id,
236
+            'stime'                 => $stime,
237
+            'etime'                 => $etime,
238
+            'adminlist'             => $adminList,
239
+            'search_admin'          => $search_admin,
240
+            'self_role'             => $self_role,
241
+            'receiverName'          => $receiverName,
242
+            'receiverMobile'        => $receiverMobile,
243
+            'status'                => $status,
244
+            'id'                    => $id,
245
+            'last_url'              => 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
246
+            'overtime'              => $overtime,
247
+            'warehouse'             => $warehouse,
248
+            'is_fx'                 => $is_fx,
249
+            'thisTime'              => date('Y-m-d H:i:s'),
250
+            'warehouseArr'          => $this->warehouse,
235
             ]);
251
             ]);
236
     }
252
     }
237
 
253
 
475
         })->where('id','>', 1)->where('is_use', 1)->get();
491
         })->where('id','>', 1)->where('is_use', 1)->get();
476
         $adminList = json_decode(json_encode($adminList), true);
492
         $adminList = json_decode(json_encode($adminList), true);
477
         return view('order/predictorderlist', ['result' =>$result,
493
         return view('order/predictorderlist', ['result' =>$result,
478
-            'page'              =>$page,
479
-            'count'             =>$count,
480
-            'pages'             =>$pages,
481
-            'admin_id'          =>$admin_id,
482
-            'team_id'           =>$team_id,
483
-            'stime'             =>$stime,
484
-            'etime'             =>$etime,
485
-            'adminlist'         =>$adminList,
486
-            'search_admin'      =>$search_admin,
487
-            'self_role'         =>$self_role,
488
-            'receiverName'         =>$receiverName,
489
-            'receiverMobile'       =>$receiverMobile,
490
-            'status'            =>$status,
491
-            'if_all'            =>$if_all,
492
-            'last_url'      => 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
494
+            'page'              => $page,
495
+            'count'             => $count,
496
+            'pages'             => $pages,
497
+            'admin_id'          => $admin_id,
498
+            'team_id'           => $team_id,
499
+            'stime'             => $stime,
500
+            'etime'             => $etime,
501
+            'adminlist'         => $adminList,
502
+            'search_admin'      => $search_admin,
503
+            'self_role'         => $self_role,
504
+            'receiverName'      => $receiverName,
505
+            'receiverMobile'    => $receiverMobile,
506
+            'status'            => $status,
507
+            'if_all'            => $if_all,
508
+            'last_url'          => 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
509
+            'warehouseArr'      => $this->warehouse,
493
             ]);
510
             ]);
494
     }
511
     }
495
 
512
 
540
             }
557
             }
541
         }
558
         }
542
 
559
 
543
-        return view('order/ordercreate', ['categorylist' => $catelist, 'adminlist'=>$adminList, 'teamlist'=>$teamList, 'self_role'=>$self_role, 'createTime'=>$createTime, 'm_gift'=>$m_gift, 'b_gift'=>$b_gift]);
560
+        return view('order/ordercreate', [
561
+            'categorylist'  => $catelist,
562
+            'adminlist'     => $adminList,
563
+            'teamlist'      => $teamList,
564
+            'self_role'     => $self_role,
565
+            'createTime'    => $createTime,
566
+            'm_gift'        => $m_gift,
567
+            'b_gift'        => $b_gift,
568
+            'warehouseArr'  => $this->warehouse,
569
+            ]);
544
     }
570
     }
545
     /**
571
     /**
546
      * 分组管理-进行添加操作
572
      * 分组管理-进行添加操作
1009
         }
1035
         }
1010
 
1036
 
1011
         return view('order/orderedit', [       
1037
         return view('order/orderedit', [       
1012
-            'order' => $order,
1038
+            'order'         => $order,
1013
             //'categorylist' => $catelist,
1039
             //'categorylist' => $catelist,
1014
-            'adminlist'=>$adminList,
1015
-            'teamlist'=>$teamList,
1016
-            'self_role'=>$self_role,
1017
-            'str_query'=> 'page='.$page.'&admin_id='.$admin_id.'&stime='.$stime.'&etime='.$etime.'&receiverName='.$receiverName.'&receiverMobile='.$receiverMobile,
1018
-            'last_url' => $last_url,
1040
+            'adminlist'     => $adminList,
1041
+            'teamlist'      => $teamList,
1042
+            'self_role'     => $self_role,
1043
+            'str_query'     => 'page='.$page.'&admin_id='.$admin_id.'&stime='.$stime.'&etime='.$etime.'&receiverName='.$receiverName.'&receiverMobile='.$receiverMobile,
1044
+            'last_url'      => $last_url,
1019
             'deposit_phone' => $deposit_phone,
1045
             'deposit_phone' => $deposit_phone,
1020
-            'm_gift' => $m_gift,
1021
-            'b_gift' => $b_gift,
1046
+            'm_gift'        => $m_gift,
1047
+            'b_gift'        => $b_gift,
1022
             'order_m_gifts' => $order_m_gifts,
1048
             'order_m_gifts' => $order_m_gifts,
1023
             'order_b_gifts' => $order_b_gifts,
1049
             'order_b_gifts' => $order_b_gifts,
1024
-            'cust_info' => $cust_info,
1050
+            'cust_info'     => $cust_info,
1051
+            'warehouseArr'  => $this->warehouse,
1025
         ]);
1052
         ]);
1026
 
1053
 
1027
     }
1054
     }
1973
             $v['receiverMobile'] = substr($v['receiverMobile'], 0, 3).'****'.substr($v['receiverMobile'], 7);
2000
             $v['receiverMobile'] = substr($v['receiverMobile'], 0, 3).'****'.substr($v['receiverMobile'], 7);
1974
             $v['status_name'] = $status_arr[$v['status']];   
2001
             $v['status_name'] = $status_arr[$v['status']];   
1975
             $v['address'] = $v['receiverState'].$v['receiverCity'].$v['receiverDistrict'].$v['receiverStreet'].$v['receiverAddress'];   
2002
             $v['address'] = $v['receiverState'].$v['receiverCity'].$v['receiverDistrict'].$v['receiverStreet'].$v['receiverAddress'];   
1976
-            $v['warehouse'] = $v['warehouse'] == 1? 'A仓库':'B仓库';      
2003
+            $v['warehouse'] = $this->warehouse[$v['warehouse']];
1977
             $v['is_fugou'] = $v['is_fugou'] == 1? '是':'否';      
2004
             $v['is_fugou'] = $v['is_fugou'] == 1? '是':'否';      
1978
             $v['is_refund'] = $v['is_refund'] == 1? '是':'否'; 
2005
             $v['is_refund'] = $v['is_refund'] == 1? '是':'否'; 
1979
             $v['payment_type'] = $payArr[$v['payment_type']];    
2006
             $v['payment_type'] = $payArr[$v['payment_type']];    
2779
         }
2806
         }
2780
 
2807
 
2781
         return view('order/customerServiceAfterSaleCreate',[
2808
         return view('order/customerServiceAfterSaleCreate',[
2782
-            'order'=>$order,
2809
+            'order'         => $order,
2783
             'deposit_phone' => $deposit_phone,
2810
             'deposit_phone' => $deposit_phone,
2784
-            'self_role' => $self_role,
2785
-            'm_gift' => $m_gift,
2786
-            'b_gift' => $b_gift,
2811
+            'self_role'     => $self_role,
2812
+            'm_gift'        => $m_gift,
2813
+            'b_gift'        => $b_gift,
2787
             'order_m_gifts' => $order_m_gifts,
2814
             'order_m_gifts' => $order_m_gifts,
2788
             'order_b_gifts' => $order_b_gifts,
2815
             'order_b_gifts' => $order_b_gifts,
2789
-            'cust_info' => $cust_info,
2816
+            'cust_info'     => $cust_info,
2817
+            'warehouseArr'  => $this->warehouse,
2790
             ]);
2818
             ]);
2791
     }
2819
     }
2792
 
2820
 
2966
         }
2994
         }
2967
 
2995
 
2968
         return view('order/customerServiceAfterSaleEdit',[
2996
         return view('order/customerServiceAfterSaleEdit',[
2969
-            'order' => $order,
2997
+            'order'         => $order,
2970
             'deposit_phone' => $deposit_phone,
2998
             'deposit_phone' => $deposit_phone,
2971
-            'self_role' => $self_role,
2972
-            'm_gift' => $m_gift,
2973
-            'b_gift' => $b_gift,
2999
+            'self_role'     => $self_role,
3000
+            'm_gift'        => $m_gift,
3001
+            'b_gift'        => $b_gift,
2974
             'order_m_gifts' => $order_m_gifts,
3002
             'order_m_gifts' => $order_m_gifts,
2975
             'order_b_gifts' => $order_b_gifts,
3003
             'order_b_gifts' => $order_b_gifts,
2976
-            'cust_info' => $cust_info,
2977
-            'id'=>$id,
3004
+            'cust_info'     => $cust_info,
3005
+            'id'            => $id,
3006
+            'warehouseArr'  => $this->warehouse,
2978
         ]);
3007
         ]);
2979
     }
3008
     }
2980
 
3009
 

+ 54 - 90
app/Http/Controllers/Admin/StatisticsController.php

34
 
34
 
35
 class StatisticsController extends Controller
35
 class StatisticsController extends Controller
36
 {
36
 {
37
+
38
+    protected $warehouse = [];
39
+
40
+    public function __construct()
41
+    {
42
+        $this->warehouse = config('constants.WAREHOUSE');
43
+    }
44
+
37
     /**
45
     /**
38
      * 当日数据统计
46
      * 当日数据统计
39
      */
47
      */
2111
         
2119
         
2112
         $result = json_decode(json_encode($result), true);
2120
         $result = json_decode(json_encode($result), true);
2113
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
2121
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
2114
-        $wareArr = array(
2115
-            0 => '其他',
2116
-            1 => 'A仓',
2117
-            2 => 'B仓',
2118
-            3 => 'C仓',
2119
-            4 => 'D仓',
2120
-        );
2122
+        $wareArr = $this->warehouse;
2121
         foreach($result as $k=>&$v){
2123
         foreach($result as $k=>&$v){
2122
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;
2124
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;
2123
             //$v['true_amount'] = $v['receivedAmount'] + $v['refund_price'] - $v['aftersale_fee'];
2125
             //$v['true_amount'] = $v['receivedAmount'] + $v['refund_price'] - $v['aftersale_fee'];
2130
         $teamList = json_decode(json_encode($teamList), true);
2132
         $teamList = json_decode(json_encode($teamList), true);
2131
 
2133
 
2132
         return view('/statistics/aftersaleFinanceList',[
2134
         return view('/statistics/aftersaleFinanceList',[
2133
-            'result'   =>   $result,
2134
-            'team_id'   =>   $team_id,
2135
-            'stime'   =>   $stime,
2136
-            'etime'   =>   $etime,
2137
-            'page'   =>   $page,
2138
-            'count'   =>   $count,
2139
-            'pages'   =>   $pages,
2140
-            'teamlist'   =>   $teamList,
2141
-            'warehouse'   =>   $warehouse,
2135
+            'result'        => $result,
2136
+            'team_id'       => $team_id,
2137
+            'stime'         => $stime,
2138
+            'etime'         => $etime,
2139
+            'page'          => $page,
2140
+            'count'         => $count,
2141
+            'pages'         => $pages,
2142
+            'teamlist'      => $teamList,
2143
+            'warehouse'     => $warehouse,
2144
+            'warehouseArr'  => $this->warehouse,
2142
         ]);
2145
         ]);
2143
     } 
2146
     } 
2144
 
2147
 
2186
         
2189
         
2187
         $result = json_decode(json_encode($result), true);
2190
         $result = json_decode(json_encode($result), true);
2188
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
2191
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
2189
-        $wareArr = array(
2190
-            0 => '其他',
2191
-            1 => 'A仓',
2192
-            2 => 'B仓',
2193
-            3 => 'C仓',
2194
-            4 => 'D仓',
2195
-        );
2192
+        $wareArr = $this->warehouse;
2196
         foreach($result as $k=>&$v){
2193
         foreach($result as $k=>&$v){
2197
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;            
2194
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;            
2198
             $v['payment_type'] = $payArr[$v['payment_type']];
2195
             $v['payment_type'] = $payArr[$v['payment_type']];
2216
         $teamList = json_decode(json_encode($teamList), true);
2213
         $teamList = json_decode(json_encode($teamList), true);
2217
 
2214
 
2218
         return view('/statistics/refundFinanceList',[
2215
         return view('/statistics/refundFinanceList',[
2219
-            'result'   =>   $result,
2220
-            'team_id'   =>   $team_id,
2221
-            'stime'   =>   $stime,
2222
-            'etime'   =>   $etime,
2223
-            'page'   =>   $page,
2224
-            'count'   =>   $count,
2225
-            'pages'   =>   $pages,
2226
-            'teamlist'   =>   $teamList,
2227
-            'warehouse'   =>   $warehouse,
2216
+            'result'        => $result,
2217
+            'team_id'       => $team_id,
2218
+            'stime'         => $stime,
2219
+            'etime'         => $etime,
2220
+            'page'          => $page,
2221
+            'count'         => $count,
2222
+            'pages'         => $pages,
2223
+            'teamlist'      => $teamList,
2224
+            'warehouse'     => $warehouse,
2225
+            'warehouseArr'  => $this->warehouse
2228
         ]);
2226
         ]);
2229
     } 
2227
     } 
2230
 
2228
 
2272
         
2270
         
2273
         $result = json_decode(json_encode($result), true);
2271
         $result = json_decode(json_encode($result), true);
2274
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
2272
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
2275
-        $wareArr = array(
2276
-            0 => '其他',
2277
-            1 => 'A仓',
2278
-            2 => 'B仓',
2279
-            3 => 'C仓',
2280
-            4 => 'D仓',
2281
-        );
2273
+        $wareArr = $this->warehouse;
2282
         foreach($result as $k=>&$v){
2274
         foreach($result as $k=>&$v){
2283
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;            
2275
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;            
2284
             $v['payment_type'] = $payArr[$v['payment_type']];
2276
             $v['payment_type'] = $payArr[$v['payment_type']];
2290
         $teamList = json_decode(json_encode($teamList), true);
2282
         $teamList = json_decode(json_encode($teamList), true);
2291
 
2283
 
2292
         return view('/statistics/sendFinanceList',[
2284
         return view('/statistics/sendFinanceList',[
2293
-            'result'   =>   $result,
2294
-            'team_id'   =>   $team_id,
2295
-            'stime'   =>   $stime,
2296
-            'etime'   =>   $etime,
2297
-            'page'   =>   $page,
2298
-            'count'   =>   $count,
2299
-            'pages'   =>   $pages,
2300
-            'teamlist'   =>   $teamList,
2301
-            'warehouse'   =>   $warehouse,
2285
+            'result'        => $result,
2286
+            'team_id'       => $team_id,
2287
+            'stime'         => $stime,
2288
+            'etime'         => $etime,
2289
+            'page'          => $page,
2290
+            'count'         => $count,
2291
+            'pages'         => $pages,
2292
+            'teamlist'      => $teamList,
2293
+            'warehouse'     => $warehouse,
2294
+            'warehouseArr'  => $this->warehouse,
2302
         ]);
2295
         ]);
2303
     } 
2296
     } 
2304
 
2297
 
2323
         
2316
         
2324
         $result = json_decode(json_encode($result), true);
2317
         $result = json_decode(json_encode($result), true);
2325
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
2318
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
2326
-        $wareArr = array(
2327
-            0 => '其他',
2328
-            1 => 'A仓',
2329
-            2 => 'B仓',
2330
-            3 => 'C仓',
2331
-            4 => 'D仓',
2332
-        );
2319
+        $wareArr = $this->warehouse;
2333
         foreach($result as $k=>&$v){
2320
         foreach($result as $k=>&$v){
2334
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;
2321
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;
2335
             //$v['true_amount'] = $v['receivedAmount'] + $v['refund_price'] - $v['aftersale_fee'];
2322
             //$v['true_amount'] = $v['receivedAmount'] + $v['refund_price'] - $v['aftersale_fee'];
2365
         
2352
         
2366
         $result = json_decode(json_encode($result), true);
2353
         $result = json_decode(json_encode($result), true);
2367
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
2354
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
2368
-        $wareArr = array(
2369
-            0 => '其他',
2370
-            1 => 'A仓',
2371
-            2 => 'B仓',
2372
-            3 => 'C仓',
2373
-            4 => 'D仓',
2374
-        );
2355
+        $wareArr = $this->warehouse;
2375
         foreach($result as $k=>&$v){
2356
         foreach($result as $k=>&$v){
2376
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;            
2357
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;            
2377
             $v['payment_type'] = $payArr[$v['payment_type']];
2358
             $v['payment_type'] = $payArr[$v['payment_type']];
2418
         
2399
         
2419
         $result = json_decode(json_encode($result), true);
2400
         $result = json_decode(json_encode($result), true);
2420
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
2401
         $payArr = [1=>'微信支付', 2=>'付款码支付', 3=>'个体户支付', 4=>'充值卡支付'];
2421
-        $wareArr = array(
2422
-            0 => '其他',
2423
-            1 => 'A仓',
2424
-            2 => 'B仓',
2425
-            3 => 'C仓',
2426
-            4 => 'D仓',
2427
-        );
2402
+        $wareArr = $this->warehouse;
2428
         foreach($result as $k=>&$v){
2403
         foreach($result as $k=>&$v){
2429
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;            
2404
             $v['team_name'] = $v['team_id']>0 ? $teams[$v['team_id']] : '';;            
2430
             $v['payment_type'] = $payArr[$v['payment_type']];
2405
             $v['payment_type'] = $payArr[$v['payment_type']];
4059
             if($warehouse>0) $query->where('warehouse', '=', $warehouse);
4034
             if($warehouse>0) $query->where('warehouse', '=', $warehouse);
4060
         })->whereNotNull('send_time')->where('warehouse','>',0)->where('logistics_id','>','')->where('is_del', 0)->groupBy('warehouse')->groupBy('send_time')->orderBy('send_time', 'desc')->offset($offset)->limit($pageSize)->get();
4035
         })->whereNotNull('send_time')->where('warehouse','>',0)->where('logistics_id','>','')->where('is_del', 0)->groupBy('warehouse')->groupBy('send_time')->orderBy('send_time', 'desc')->offset($offset)->limit($pageSize)->get();
4061
 
4036
 
4062
-        $wareArr = array(
4063
-            0 => '其他',
4064
-            1 => 'A仓',
4065
-            2 => 'B仓',
4066
-            3 => 'C仓',
4067
-            4 => 'D仓',
4068
-        );
4037
+        $wareArr = $this->warehouse;
4069
         foreach($result as $k=>&$item){
4038
         foreach($result as $k=>&$item){
4070
             $item->warehouse = $wareArr[$item->warehouse];
4039
             $item->warehouse = $wareArr[$item->warehouse];
4071
         }
4040
         }
4079
 
4048
 
4080
 
4049
 
4081
         return view('statistics/warehouseFinanceList', ['result'=>$result,
4050
         return view('statistics/warehouseFinanceList', ['result'=>$result,
4082
-            'page'              =>$page,
4083
-            'count'             =>$count,
4084
-            'pages'             =>$pages,  
4085
-            'warehouse'         =>$warehouse,
4086
-            'stime'             =>$stime,  
4087
-            'etime'             =>$etime,  
4088
-            'total'             =>$total,
4051
+            'page'              => $page,
4052
+            'count'             => $count,
4053
+            'pages'             => $pages,
4054
+            'warehouse'         => $warehouse,
4055
+            'stime'             => $stime,
4056
+            'etime'             => $etime,
4057
+            'total'             => $total,
4058
+            'warehouseArr'      => $this->warehouse,
4089
         ]);
4059
         ]);
4090
 
4060
 
4091
     }   
4061
     }   
4103
             if($warehouse>0) $query->where('warehouse', '=', $warehouse);
4073
             if($warehouse>0) $query->where('warehouse', '=', $warehouse);
4104
         })->whereNotNull('send_time')->where('warehouse','>',0)->where('logistics_id','>','')->where('is_del', 0)->groupBy('warehouse')->groupBy('send_time')->orderBy('send_time', 'desc')->get();
4074
         })->whereNotNull('send_time')->where('warehouse','>',0)->where('logistics_id','>','')->where('is_del', 0)->groupBy('warehouse')->groupBy('send_time')->orderBy('send_time', 'desc')->get();
4105
 
4075
 
4106
-        $wareArr = array(
4107
-            0 => '其他',
4108
-            1 => 'A仓',
4109
-            2 => 'B仓',
4110
-            3 => 'C仓',
4111
-            4 => 'D仓',
4112
-        );
4076
+        $wareArr = $this->warehouse;
4113
         foreach($result as $k=>&$item){
4077
         foreach($result as $k=>&$item){
4114
             $item->warehouse = $wareArr[$item->warehouse];
4078
             $item->warehouse = $wareArr[$item->warehouse];
4115
         }
4079
         }

+ 3 - 5
app/Order.php

213
       return $result;
213
       return $result;
214
     }
214
     }
215
 
215
 
216
-   	public static function mjApi($params = array()){  		
217
-      $accessKey = "B1E69297B5DA44DAB35099A5F28F41D9"; //erp 生成的 accessKey
218
-      $accessSecret = "4sN2LbylhOglelMP";
219
-//   		$accessKey = "F82A757089D84F89B1782EDC3A4DA82A"; //erp 生成的 accessKey
220
-//        $accessSecret = "wB2ueW8eQOHXNWcN";
216
+   	public static function mjApi($params = array()){
217
+        $accessKey = env('ERP_ACCESS_KEY');
218
+        $accessSecret = env('ERP_ACCESS_SECRET');
221
 	    $params["timestamp"] = time()."000";
219
 	    $params["timestamp"] = time()."000";
222
 	    $params["version"] = "v1";
220
 	    $params["version"] = "v1";
223
 	    $reqparams = $params;
221
 	    $reqparams = $params;

+ 3 - 5
app/OrderScript.php

150
       return $result;
150
       return $result;
151
     }
151
     }
152
 
152
 
153
-   	public static function mjApi($params = array()){  		
154
-      $accessKey = "B1E69297B5DA44DAB35099A5F28F41D9"; //erp 生成的 accessKey
155
-      $accessSecret = "4sN2LbylhOglelMP";
156
-   		//$accessKey = "F82A757089D84F89B1782EDC3A4DA82A"; //erp 生成的 accessKey     
157
-		  //$accessSecret = "wB2ueW8eQOHXNWcN";
153
+   	public static function mjApi($params = array()){
154
+        $accessKey = env('ERP_ACCESS_KEY');
155
+        $accessSecret = env('ERP_ACCESS_SECRET');
158
 	    $params["timestamp"] = time()."000";
156
 	    $params["timestamp"] = time()."000";
159
 	    $params["version"] = "v1";
157
 	    $params["version"] = "v1";
160
 	    $reqparams = $params;
158
 	    $reqparams = $params;

+ 1 - 4
resources/views/order/customerServiceAfterSaleCreate.blade.php

102
                 <font color='red'>* </font>发货仓库:</label>
102
                 <font color='red'>* </font>发货仓库:</label>
103
                 <div class="formControls col-xs-6 col-sm-6">
103
                 <div class="formControls col-xs-6 col-sm-6">
104
                     <span>
104
                     <span>
105
-                        @if($order['warehouse']=='1') A仓库  @endif
106
-                        @if($order['warehouse']=='2') B仓库 @endif
107
-                        @if($order['warehouse']=='3') C仓库 @endif
108
-                        @if($order['warehouse']=='4') D仓库 @endif
105
+                        {{$warehouseArr[$order['warehouse']]}}
109
                     </span>
106
                     </span>
110
                 </div>
107
                 </div>
111
             </div>
108
             </div>

+ 1 - 4
resources/views/order/customerServiceAfterSaleEdit.blade.php

100
                         <font color='red'>* </font>发货仓库:</label>
100
                         <font color='red'>* </font>发货仓库:</label>
101
                     <div class="formControls col-xs-6 col-sm-6">
101
                     <div class="formControls col-xs-6 col-sm-6">
102
                     <span>
102
                     <span>
103
-                        @if($order['warehouse']=='1') A仓库  @endif
104
-                        @if($order['warehouse']=='2') B仓库 @endif
105
-                        @if($order['warehouse']=='3') C仓库 @endif
106
-                        @if($order['warehouse']=='4') D仓库 @endif
103
+                        {{$warehouseArr[$order['warehouse']]}}
107
                     </span>
104
                     </span>
108
                     </div>
105
                     </div>
109
                 </div>
106
                 </div>

File diff suppressed because it is too large
+ 32 - 12
resources/views/order/ordercreate.blade.php


+ 6 - 10
resources/views/order/orderedit.blade.php

145
                     <span class="select-box">
145
                     <span class="select-box">
146
                         <select  size="1" name="warehouse" id='warehouse'>
146
                         <select  size="1" name="warehouse" id='warehouse'>
147
                             <option value="0" @if($order['warehouse']=='0') selected @endif>- 请选择 -</option>
147
                             <option value="0" @if($order['warehouse']=='0') selected @endif>- 请选择 -</option>
148
-                            <option value="1" @if($order['warehouse']=='1') selected @endif>A仓库</option>                            
149
-                            <option value="2" @if($order['warehouse']=='2') selected @endif>B仓库</option>                            
150
-                            <option value="3" @if($order['warehouse']=='3') selected @endif>C仓库</option>                            
151
-                            <option value="4" @if($order['warehouse']=='4') selected @endif>D仓库</option>                            
148
+                            @foreach($warehouseArr as $warehouseVal=>$warehouseName)
149
+                                <option value="{{$warehouseVal}}" @if($order['warehouse']==$warehouseVal) selected @endif>{{$warehouseName}}</option>
150
+                            @endforeach
152
                         </select>
151
                         </select>
153
                     </span>
152
                     </span>
154
                 </div>
153
                 </div>
157
             <div class="row cl">
156
             <div class="row cl">
158
                 <label class="form-label col-xs-4 col-sm-2">
157
                 <label class="form-label col-xs-4 col-sm-2">
159
                     <font color='red'>* </font>发货仓库:</label>
158
                     <font color='red'>* </font>发货仓库:</label>
160
-                <div class="formControls col-xs-6 col-sm-6">                        
161
-                    @if($order['warehouse']=='1') A仓库  @endif                          
162
-                    @if($order['warehouse']=='2') B仓库 @endif                          
163
-                    @if($order['warehouse']=='3') C仓库 @endif 
164
-                    @if($order['warehouse']=='4') D仓库 @endif 
165
-                    <input type="hidden" name="warehouse" id='warehouse' value="{{$order['warehouse']}}"/>                         
159
+                <div class="formControls col-xs-6 col-sm-6">
160
+                    {{$warehouseArr[$order['warehouse']]}}
161
+                    <input type="hidden" name="warehouse" id='warehouse' value="{{$order['warehouse']}}"/>
166
 
162
 
167
                 </div>
163
                 </div>
168
             </div>
164
             </div>

+ 10 - 13
resources/views/order/orderlist.blade.php

43
                 <input class="input-text" style="width:5%;text-align:center" type="text" value="发货仓库"/>
43
                 <input class="input-text" style="width:5%;text-align:center" type="text" value="发货仓库"/>
44
                 <select style="width:6%;text-align:center" id='warehouse' name="warehouse">
44
                 <select style="width:6%;text-align:center" id='warehouse' name="warehouse">
45
                     <option value="0" @if($warehouse=='0') selected @endif>-- 请选择--</option>
45
                     <option value="0" @if($warehouse=='0') selected @endif>-- 请选择--</option>
46
-                    @if($self_role != '分销销售' && $self_role != '分销管理员')
47
-                    <option value="1" @if($warehouse==1) selected @endif>A仓</option>
48
-                    <option value="2" @if($warehouse==2) selected @endif>B仓</option>
49
-                    @endif
50
-                    <option value="3" @if($warehouse==3) selected @endif>C仓</option>
51
-                    <option value="4" @if($warehouse==4) selected @endif>D仓</option>
52
-
46
+                    @foreach($warehouseArr as $warehouseVal=>$warehouseName)
47
+                        <option value="$warehouseVal" @if($warehouse==$warehouseVal) selected @endif>{{$warehouseName}}</option>
48
+                    @endforeach
53
                 </select> 
49
                 </select> 
54
                 <div style="float:right">
50
                 <div style="float:right">
55
                     <a class="btn btn-primary radius" onclick="user_search()" href="javascript:;">搜索</a>
51
                     <a class="btn btn-primary radius" onclick="user_search()" href="javascript:;">搜索</a>
168
                             </td>
164
                             </td>
169
                             @endif
165
                             @endif
170
                             @endif                          
166
                             @endif                          
171
-                            <td>@if($a['warehouse']==1) A仓库 @elseif($a['warehouse']==2) B仓库 @elseif($a['warehouse']==3) C仓库 @elseif($a['warehouse']==4) D仓库 @else @endif</td>                            
167
+                            <td>{{$warehouseArr[$a['warehouse']]}}</td>
172
                             <td>{{$a['receivedAmount']}}</td>                            
168
                             <td>{{$a['receivedAmount']}}</td>                            
173
                             <td>{{$a['payment_type']}}</td>                            
169
                             <td>{{$a['payment_type']}}</td>                            
174
                             <td>{{$a['createTime']}}</td> 
170
                             <td>{{$a['createTime']}}</td> 
288
 
284
 
289
                                 @if($a['status'] >= 3)
285
                                 @if($a['status'] >= 3)
290
 
286
 
291
-                                @elseif($a['status'] == 2 && $self_role !='超级管理员' && $self_role !='售后管理员')
287
+                                @elseif($a['status'] == 2 && $self_role !='超级管理员')
292
 
288
 
293
                                 @else
289
                                 @else
294
                                 <a style="text-decoration:none" onClick='order_del("删除","{{$a['id']}}","{{$a['is_cannot_del']}}")' href="javascript:;" title="删除"><span class="btn btn-danger radius">删除</span></a>
290
                                 <a style="text-decoration:none" onClick='order_del("删除","{{$a['id']}}","{{$a['is_cannot_del']}}")' href="javascript:;" title="删除"><span class="btn btn-danger radius">删除</span></a>
454
         function order_del(obj,id,is_cannot_del){
450
         function order_del(obj,id,is_cannot_del){
455
             var msg = '确认要删除吗?';
451
             var msg = '确认要删除吗?';
456
             if(is_cannot_del){
452
             if(is_cannot_del){
457
-                var msg = '该订单已打单待发货,请务必联系仓库管理员确认可以删除该订单,是否继续删除?'
453
+                var msg = '该订单已打单待发货,请务必联系超级管理员确认可以删除该订单,是否继续删除?'
458
             }
454
             }
459
             layer.confirm(msg,function(index){
455
             layer.confirm(msg,function(index){
460
                 location.href='/admin/order/delete/'+id;
456
                 location.href='/admin/order/delete/'+id;
861
 
857
 
862
         function order_verify(id, status, name, pre_cost_flag, is_not_fx){
858
         function order_verify(id, status, name, pre_cost_flag, is_not_fx){
863
             if( status == 2 && is_not_fx==1){
859
             if( status == 2 && is_not_fx==1){
864
-                if( !confirm('该订单需要转仓,请联系售后管理员!') ){
865
-                    return false;
866
-                }
860
+                confirm('该订单需要转仓,请联系售后管理员!');
861
+                return false;
867
             }
862
             }
868
             else if( status == 2 && pre_cost_flag==1){
863
             else if( status == 2 && pre_cost_flag==1){
864
+                //点击确定后继续向下执行,点击取消则return false
869
                 if( !confirm('该订单毛利低于<40%, 是否确定订单价格合理?') ){
865
                 if( !confirm('该订单毛利低于<40%, 是否确定订单价格合理?') ){
870
                     return false;
866
                     return false;
871
                 }
867
                 }
873
             else if( !confirm('确认'+name) ){
869
             else if( !confirm('确认'+name) ){
874
                 return false;
870
                 return false;
875
             }
871
             }
872
+
876
             var admin_id = $('#admin_id').val();
873
             var admin_id = $('#admin_id').val();
877
             var stime = $('#stime').val();
874
             var stime = $('#stime').val();
878
             var etime = $('#etime').val();
875
             var etime = $('#etime').val();

+ 1 - 1
resources/views/order/predictorderlist.blade.php

140
                             </td>
140
                             </td>
141
                             @endif
141
                             @endif
142
                             @endif                          
142
                             @endif                          
143
-                            <td>@if($a['warehouse']==1) A仓库 @elseif($a['warehouse']==2) B仓库 @elseif($a['warehouse']==3) C仓库 @elseif($a['warehouse']==4) D仓库 @else @endif</td>                            
143
+                            <td>{{$warehouseArr[$a['warehouse']]}}</td>
144
                             <td>{{$a['receivedAmount']}}</td>                            
144
                             <td>{{$a['receivedAmount']}}</td>                            
145
                             <td>{{$a['payment_type']}}</td>                            
145
                             <td>{{$a['payment_type']}}</td>                            
146
                             <td>{{$a['createTime']}}</td> 
146
                             <td>{{$a['createTime']}}</td> 

+ 3 - 5
resources/views/statistics/aftersaleFinanceList.blade.php

18
                 <input class="input-text" style="width:6%;text-align:center" type="text" value="所属仓库"/> 
18
                 <input class="input-text" style="width:6%;text-align:center" type="text" value="所属仓库"/> 
19
                 <select style="width:10%;text-align:center" id='warehouse' name="warehouse">
19
                 <select style="width:10%;text-align:center" id='warehouse' name="warehouse">
20
                     <option value="0" @if($warehouse==0) selected @endif>-- 选择仓库 --</option>
20
                     <option value="0" @if($warehouse==0) selected @endif>-- 选择仓库 --</option>
21
-                    <option value="1" @if($warehouse==1) selected @endif>A仓库</option>
22
-                    <option value="2" @if($warehouse==2) selected @endif>B仓库</option>
23
-                    <option value="3" @if($warehouse==3) selected @endif>C仓库</option>
24
-                    <option value="4" @if($warehouse==4) selected @endif>D仓库</option>
25
-                    
21
+                    @foreach($warehouseArr as $warehouseVal=>$warehouseName)
22
+                        <option value="{{$warehouseVal}}" @if($warehouse == $warehouseVal) selected @endif >{{$warehouseName}}</option>
23
+                    @endforeach
26
                 </select> 
24
                 </select> 
27
                               
25
                               
28
                 <a class="btn btn-primary radius"  style="margin-left: 5px" onclick="user_search()" href="javascript:;">搜索</a>
26
                 <a class="btn btn-primary radius"  style="margin-left: 5px" onclick="user_search()" href="javascript:;">搜索</a>

+ 3 - 5
resources/views/statistics/refundFinanceList.blade.php

18
                 <input class="input-text" style="width:6%;text-align:center" type="text" value="所属仓库"/> 
18
                 <input class="input-text" style="width:6%;text-align:center" type="text" value="所属仓库"/> 
19
                 <select style="width:10%;text-align:center" id='warehouse' name="warehouse">
19
                 <select style="width:10%;text-align:center" id='warehouse' name="warehouse">
20
                     <option value="0" @if($warehouse==0) selected @endif>-- 选择仓库 --</option>
20
                     <option value="0" @if($warehouse==0) selected @endif>-- 选择仓库 --</option>
21
-                    <option value="1" @if($warehouse==1) selected @endif>A仓库</option>
22
-                    <option value="2" @if($warehouse==2) selected @endif>B仓库</option>
23
-                    <option value="3" @if($warehouse==3) selected @endif>C仓库</option>
24
-                    <option value="4" @if($warehouse==4) selected @endif>D仓库</option>
25
-                    
21
+                    @foreach($warehouseArr as $warehouseVal=>$warehouseName)
22
+                        <option value="{{$warehouseVal}}" @if($warehouse == $warehouseVal) selected @endif>{{$warehouseName}}</option>
23
+                    @endforeach
26
                 </select> 
24
                 </select> 
27
                               
25
                               
28
                 <a class="btn btn-primary radius"  style="margin-left: 5px" onclick="user_search()" href="javascript:;">搜索</a>
26
                 <a class="btn btn-primary radius"  style="margin-left: 5px" onclick="user_search()" href="javascript:;">搜索</a>

+ 3 - 5
resources/views/statistics/sendFinanceList.blade.php

18
                 <input class="input-text" style="width:6%;text-align:center" type="text" value="所属仓库"/> 
18
                 <input class="input-text" style="width:6%;text-align:center" type="text" value="所属仓库"/> 
19
                 <select style="width:10%;text-align:center" id='warehouse' name="warehouse">
19
                 <select style="width:10%;text-align:center" id='warehouse' name="warehouse">
20
                     <option value="0" @if($warehouse==0) selected @endif>-- 选择仓库 --</option>
20
                     <option value="0" @if($warehouse==0) selected @endif>-- 选择仓库 --</option>
21
-                    <option value="1" @if($warehouse==1) selected @endif>A仓库</option>
22
-                    <option value="2" @if($warehouse==2) selected @endif>B仓库</option>
23
-                    <option value="3" @if($warehouse==3) selected @endif>C仓库</option>
24
-                    <option value="4" @if($warehouse==4) selected @endif>D仓库</option>
25
-                    
21
+                    @foreach($warehouseArr as $warehouseVal=>$warehouseName)
22
+                        <option value="{{$warehouseVal}}" @if($warehouse == $warehouseVal) selected @endif>{{$warehouseName}}</option>
23
+                    @endforeach
26
                 </select> 
24
                 </select> 
27
                               
25
                               
28
                 <a class="btn btn-primary radius"  style="margin-left: 5px" onclick="user_search()" href="javascript:;">搜索</a>
26
                 <a class="btn btn-primary radius"  style="margin-left: 5px" onclick="user_search()" href="javascript:;">搜索</a>

+ 3 - 5
resources/views/statistics/warehouseFinanceList.blade.php

7
                 <input class="input-text" style="width:6%;text-align:center" type="text" value="所属仓库"/> 
7
                 <input class="input-text" style="width:6%;text-align:center" type="text" value="所属仓库"/> 
8
                 <select style="width:10%;text-align:center" id='warehouse' name="warehouse">
8
                 <select style="width:10%;text-align:center" id='warehouse' name="warehouse">
9
                     <option value="0" @if($warehouse==0) selected @endif>-- 选择仓库 --</option>
9
                     <option value="0" @if($warehouse==0) selected @endif>-- 选择仓库 --</option>
10
-                    <option value="1" @if($warehouse==1) selected @endif>A仓库</option>
11
-                    <option value="2" @if($warehouse==2) selected @endif>B仓库</option>
12
-                    <option value="3" @if($warehouse==3) selected @endif>C仓库</option>
13
-                    <option value="4" @if($warehouse==4) selected @endif>D仓库</option>
14
-                    
10
+                    @foreach($warehouseArr as $warehouseVal=>$warehouseName)
11
+                        <option value="{{$warehouseVal}}" @if($warehouse == $warehouseVal) selected @endif >{{$warehouseName}}</option>
12
+                    @endforeach
15
                 </select>                          
13
                 </select>                          
16
                 <input class="input-text" style="width:6%;text-align:center" type="text" value="开始时间"/>
14
                 <input class="input-text" style="width:6%;text-align:center" type="text" value="开始时间"/>
17
                 <input id="stime" type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd' })" autocomplete="off" class="input-text Wdate" style="width:12%;text-align:center;margin-left: -5px" name="stime" value="{{$stime?$stime:''}}">
15
                 <input id="stime" type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd' })" autocomplete="off" class="input-text Wdate" style="width:12%;text-align:center;margin-left: -5px" name="stime" value="{{$stime?$stime:''}}">