diff --git a/app/Http/Controllers/Admin/AdminController.php b/app/Http/Controllers/Admin/AdminController.php new file mode 100644 index 0000000..2729c9e --- /dev/null +++ b/app/Http/Controllers/Admin/AdminController.php @@ -0,0 +1,113 @@ +orderBy('listorder','desc')->get()); + + return view('admin.admin.add', $data); + } + + public function doadd() + { + unset($_POST["_token"]); + $_POST['pwd'] = md5($_POST['pwd']); + if(DB::table('admin')->insert($_POST)) + { + success_jump('添加成功!', route('admin_admin')); + } + else + { + error_jump('添加失败!请修改后重新添加'); + } + } + + public function edit() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{$id="";} + if(preg_match('/[0-9]*/',$id)){}else{exit;} + + $data['id'] = $id; + $data['post'] = object_to_array(DB::table('admin')->where('id', $id)->first(), 1); + $data['rolelist'] = object_to_array(DB::table('admin_role')->orderBy('listorder','desc')->get()); + + return view('admin.admin.edit', $data); + } + + public function doedit() + { + if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else {$id="";exit;} + + unset($_POST["_token"]); + $_POST['pwd'] = md5($_POST['pwd']); + if(DB::table('admin')->where('id', $id)->update($_POST)) + { + success_jump('修改成功!', route('admin_admin')); + } + else + { + error_jump('修改失败!'); + } + } + + //修改密码 + /* public function doedit() + { + if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else {$id="";exit;} + unset($_POST["_token"]); + + if(!empty($_POST["username"])){$data['username'] = $map['username'] = $_POST["username"];}else{error_jump('用户名不能为空');exit;}//用户名 + if(!empty($_POST["oldpwd"])){$map['pwd'] = md5($_POST["oldpwd"]);}else{error_jump('旧密码错误');exit;} + if($_POST["newpwd"]==$_POST["newpwd2"]){$data['pwd'] = md5($_POST["newpwd"]);}else{error_jump('密码错误');exit;} + if($_POST["oldpwd"]==$_POST["newpwd"]){error_jump('新旧密码不能一致!');exit;} + + $User = object_to_array(DB::table("admin")->where($map)->first(), 1); + + if($User) + { + if(DB::table('admin')->where('id', $id)->update($data)) + { + session_unset(); + session_destroy(); + success_jump('修改成功,请重新登录', route('admin_login'), 3); + } + } + else + { + error_jump('修改失败!旧用户名或密码错误'); + } + } */ + + public function del() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');} + + if(DB::table('admin')->whereIn("id", explode(',', $id))->delete()) + { + success_jump('删除成功'); + } + else + { + error_jump('删除失败!请重新提交'); + } + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Admin/UserRoleController.php b/app/Http/Controllers/Admin/AdminRoleController.php similarity index 76% rename from app/Http/Controllers/Admin/UserRoleController.php rename to app/Http/Controllers/Admin/AdminRoleController.php index 94eba00..b82911e 100644 --- a/app/Http/Controllers/Admin/UserRoleController.php +++ b/app/Http/Controllers/Admin/AdminRoleController.php @@ -4,7 +4,7 @@ namespace App\Http\Controllers\Admin; use App\Http\Controllers\Admin\CommonController; use DB; -class UserRoleController extends CommonController +class AdminRoleController extends CommonController { public function __construct() { @@ -13,24 +13,24 @@ class UserRoleController extends CommonController public function index() { - $posts = parent::pageList('admin_user_role', '', ['listorder','desc']); + $posts = parent::pageList('admin_role', '', ['listorder','desc']); $data['posts'] = $posts; - return view('admin.userrole.index', $data); + return view('admin.adminrole.index', $data); } public function add() { - return view('admin.userrole.add'); + return view('admin.adminrole.add'); } public function doadd() { unset($_POST["_token"]); - if(DB::table('admin_user_role')->insert($_POST)) + if(DB::table('admin_role')->insert($_POST)) { - success_jump('添加成功!', route('admin_userrole')); + success_jump('添加成功!', route('admin_adminrole')); } else { @@ -44,9 +44,9 @@ class UserRoleController extends CommonController if(preg_match('/[0-9]*/',$id)){}else{exit;} $data['id'] = $id; - $data['post'] = object_to_array(DB::table('admin_user_role')->where('id', $id)->first(), 1); + $data['post'] = object_to_array(DB::table('admin_role')->where('id', $id)->first(), 1); - return view('admin.userrole.edit', $data); + return view('admin.adminrole.edit', $data); } public function doedit() @@ -54,9 +54,9 @@ class UserRoleController extends CommonController if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else {$id="";exit;} unset($_POST["_token"]); - if(DB::table('admin_user_role')->where('id', $id)->update($_POST)) + if(DB::table('admin_role')->where('id', $id)->update($_POST)) { - success_jump('修改成功!', route('admin_userrole')); + success_jump('修改成功!', route('admin_adminrole')); } else { @@ -68,7 +68,7 @@ class UserRoleController extends CommonController { if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');} - if(DB::table('admin_user_role')->whereIn("id", explode(',', $id))->delete()) + if(DB::table('admin_role')->whereIn("id", explode(',', $id))->delete()) { success_jump('删除成功'); } @@ -104,7 +104,7 @@ class UserRoleController extends CommonController } } - return view('admin.userrole.permissions', $data); + return view('admin.adminrole.permissions', $data); } //角色权限设置 @@ -139,4 +139,4 @@ class UserRoleController extends CommonController error_jump('操作失败!'); } } -} +} \ No newline at end of file diff --git a/app/Http/Controllers/Admin/GoodsController.php b/app/Http/Controllers/Admin/GoodsController.php index 2317521..21972ec 100644 --- a/app/Http/Controllers/Admin/GoodsController.php +++ b/app/Http/Controllers/Admin/GoodsController.php @@ -153,7 +153,7 @@ class GoodsController extends CommonController { if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');} - if(DB::table('goods')->whereIn("id", explode(',', $id))->delete()) + if(DB::table('goods')->whereIn("id", explode(',', $id))->update(['status' => 1])) { success_jump("$id ,删除成功"); } diff --git a/app/Http/Controllers/Admin/LoginController.php b/app/Http/Controllers/Admin/LoginController.php index 77b44b4..41e8a87 100644 --- a/app/Http/Controllers/Admin/LoginController.php +++ b/app/Http/Controllers/Admin/LoginController.php @@ -36,16 +36,16 @@ class LoginController extends BaseController if(!empty($_POST["username"])){$username = $_POST["username"];}else{$username='';exit;}//用户名 if(!empty($_POST["pwd"])){$pwd = md5($_POST["pwd"]);}else{$pwd='';exit;}//密码 - $admin_user = DB::table('admin_user')->where(array('username' => $username, 'pwd' => $pwd))->orWhere(array('email' => $username, 'pwd' => $pwd))->first(); + $admin_user = DB::table('admin')->where(array('username' => $username, 'pwd' => $pwd))->orWhere(array('email' => $username, 'pwd' => $pwd))->first(); if($admin_user) { $admin_user_info = object_to_array($admin_user, 1); - $admin_user_info['rolename'] = DB::table('admin_user_role')->where(array('id'=>$admin_user->role_id))->value('name'); + $admin_user_info['rolename'] = DB::table('admin_role')->where(array('id'=>$admin_user->role_id))->value('name'); $_SESSION['admin_user_info'] = $admin_user_info; - DB::table('admin_user')->where(array('id'=>$admin_user->role_id))->update(array('logintime' => time())); + DB::table('admin')->where(array('id'=>$admin_user->role_id))->update(array('logintime' => time())); return redirect()->route('admin'); } @@ -69,7 +69,7 @@ class LoginController extends BaseController $data["username"] = "admin888"; $data["pwd"] = "21232f297a57a5a743894a0e4a801fc3"; - if(DB::table('admin_user')->where('id', 1)->update($data)) + if(DB::table('admin')->where('id', 1)->update($data)) { success_jump('密码恢复成功!', route('admin_login')); } @@ -94,7 +94,7 @@ class LoginController extends BaseController return 0; } - return DB::table("admin_user")->where($map)->count(); + return DB::table("admin")->where($map)->count(); } //测试 diff --git a/app/Http/Controllers/Admin/OrderController.php b/app/Http/Controllers/Admin/OrderController.php index bd4d798..496abb7 100644 --- a/app/Http/Controllers/Admin/OrderController.php +++ b/app/Http/Controllers/Admin/OrderController.php @@ -3,6 +3,9 @@ namespace App\Http\Controllers\Admin; use App\Http\Controllers\Admin\CommonController; use App\Http\Model\Order; +use App\Http\Model\OrderGoods; +use App\Http\Model\User; +use App\Http\Model\Region; use DB; class OrderController extends CommonController @@ -18,9 +21,24 @@ class OrderController extends CommonController $where = function ($query) use ($res) { if(isset($_REQUEST["keyword"])) { - $query->where('order_sn', 'like', '%'.$_REQUEST['keyword'].'%')->orWhere("name", "like", '%'.$_REQUEST['keyword'].'%'); + $query->where('order_sn', 'like', '%'.$_REQUEST['keyword'].'%')->orWhere("name", "like", '%'.$_REQUEST['keyword'].'%')->orWhere("mobile", "like", '%'.$_REQUEST['keyword'].'%'); + } + + if(isset($_REQUEST["mobile"])) + { + $query->where('mobile', 'like', '%'.$_REQUEST['mobile'].'%'); + } + + if(isset($_REQUEST["order_sn"])) + { + $query->where('order_sn', 'like', '%'.$_REQUEST['order_sn'].'%'); } + if(isset($_REQUEST["name"])) + { + $query->where("name", "like", '%'.$_REQUEST['name'].'%'); + } + //0或者不传表示全部,1待付款,2待发货,3待收货,4待评价(确认收货,交易成功),5退款/售后 if(isset($_REQUEST["status"])) { @@ -55,6 +73,10 @@ class OrderController extends CommonController $order_status_arr = Order::getOrderStatusText(object_to_array($value, 1)); $posts[$key]->order_status_text = $order_status_arr?$order_status_arr['text']:''; $posts[$key]->order_status_num = $order_status_arr?$order_status_arr['num']:''; + + $posts[$key]->province_name = Region::getRegionName($value->province); + $posts[$key]->city_name = Region::getRegionName($value->city); + $posts[$key]->district_name = Region::getRegionName($value->district); } $data['posts'] = $posts; @@ -62,6 +84,42 @@ class OrderController extends CommonController return view('admin.order.index', $data); } + public function detail() + { + if(!empty($_GET["id"])){$id = $_GET["id"];}else{$id="";} + if(preg_match('/[0-9]*/',$id)){}else{exit;} + + $data['id'] = $id; + $data['post'] = Order::where('id', $id)->first(); + + if($data['post']) + { + $order_status_arr = Order::getOrderStatusText($data['post']); + $data['post']['order_status_text'] = $order_status_arr?$order_status_arr['text']:''; + $data['post']['order_status_num'] = $order_status_arr?$order_status_arr['num']:''; + + $data['post']['province_name'] = Region::getRegionName($data['post']['province']); + $data['post']['city_name'] = Region::getRegionName($data['post']['city']); + $data['post']['district_name'] = Region::getRegionName($data['post']['district']); + + $data['post']['invoice_text'] = Order::getInvoiceText($data['post']); + $data['post']['place_type_text'] = Order::getPlaceTypeText($data['post']); + + $data['post']['user'] = User::where(array('id'=>$data['post']['user_id']))->first(); //下单人信息 + + $order_goods = OrderGoods::where(array('order_id'=>$data['post']['id']))->get(); //订单商品列表 + + foreach($order_goods as $k=>$v) + { + $order_goods[$k]['refund_status_text'] = OrderGoods::getRefundStatusText($v); + } + + $data['post']['goodslist'] = $order_goods; + } + //echo '
';print_r($data['post']);exit;
+        return view('admin.order.detail', $data);
+    }
+    
     public function doadd()
     {
         $_POST['add_time'] = time();//更新时间
diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php
index d7fce34..39e5bf2 100644
--- a/app/Http/Controllers/Admin/UserController.php
+++ b/app/Http/Controllers/Admin/UserController.php
@@ -13,7 +13,7 @@ class UserController extends CommonController
 	
     public function index()
     {
-        $posts = parent::pageList('admin_user');
+        $posts = parent::pageList('user');
 		
         $data['posts'] = $posts;
         
@@ -22,16 +22,13 @@ class UserController extends CommonController
     
     public function add()
     {
-		$data['rolelist'] = object_to_array(DB::table('admin_user_role')->orderBy('listorder','desc')->get());
-		
-        return view('admin.user.add', $data);
+        return view('admin.user.add');
     }
     
     public function doadd()
     {
 		unset($_POST["_token"]);
-		$_POST['pwd'] = md5($_POST['pwd']);
-		if(DB::table('admin_user')->insert($_POST))
+        if(DB::table('user')->insert($_POST))
         {
             success_jump('添加成功!', route('admin_user'));
         }
@@ -43,13 +40,12 @@ class UserController extends CommonController
     
     public function edit()
     {
-		if(!empty($_GET["id"])){$id = $_GET["id"];}else{$id="";}
+        if(!empty($_GET["id"])){$id = $_GET["id"];}else{$id="";}
         if(preg_match('/[0-9]*/',$id)){}else{exit;}
         
         $data['id'] = $id;
-		$data['post'] = object_to_array(DB::table('admin_user')->where('id', $id)->first(), 1);
-        $data['rolelist'] = object_to_array(DB::table('admin_user_role')->orderBy('listorder','desc')->get());
-		
+		$data['post'] = object_to_array(DB::table('user')->where('id', $id)->first(), 1);
+        
         return view('admin.user.edit', $data);
     }
 	
@@ -58,8 +54,7 @@ class UserController extends CommonController
         if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else {$id="";exit;}
         
 		unset($_POST["_token"]);
-		$_POST['pwd'] = md5($_POST['pwd']);
-		if(DB::table('admin_user')->where('id', $id)->update($_POST))
+		if(DB::table('user')->where('id', $id)->update($_POST))
         {
             success_jump('修改成功!', route('admin_user'));
         }
@@ -69,39 +64,11 @@ class UserController extends CommonController
 		}
     }
     
-	//修改密码
-    /* public function doedit()
-    {
-		if(!empty($_POST["id"])){$id = $_POST["id"];unset($_POST["id"]);}else {$id="";exit;}
-		unset($_POST["_token"]);
-		
-        if(!empty($_POST["username"])){$data['username'] = $map['username'] = $_POST["username"];}else{error_jump('用户名不能为空');exit;}//用户名
-        if(!empty($_POST["oldpwd"])){$map['pwd'] = md5($_POST["oldpwd"]);}else{error_jump('旧密码错误');exit;}
-        if($_POST["newpwd"]==$_POST["newpwd2"]){$data['pwd'] = md5($_POST["newpwd"]);}else{error_jump('密码错误');exit;}
-        if($_POST["oldpwd"]==$_POST["newpwd"]){error_jump('新旧密码不能一致!');exit;}
-        
-        $User = object_to_array(DB::table("user")->where($map)->first(), 1);
-        
-        if($User)
-        {
-            if(DB::table('user')->where('id', $id)->update($data))
-			{
-				session_unset();
-				session_destroy();
-				success_jump('修改成功,请重新登录', route('admin_login'), 3);
-			}
-        }
-        else
-        {
-            error_jump('修改失败!旧用户名或密码错误');
-        }
-    } */
-    
     public function del()
     {
-		if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');}
+        if(!empty($_GET["id"])){$id = $_GET["id"];}else{error_jump('删除失败!请重新提交');}
 		
-		if(DB::table('admin_user')->whereIn("id", explode(',', $id))->delete())
+		if(DB::table('user')->whereIn("id", explode(',', $id))->delete())
         {
             success_jump('删除成功');
         }
diff --git a/app/Http/Model/Order.php b/app/Http/Model/Order.php
index 5cf3634..0c2a135 100644
--- a/app/Http/Model/Order.php
+++ b/app/Http/Model/Order.php
@@ -24,7 +24,7 @@ class Order extends BaseModel
         $limit  = isset($limit) ? $limit : 10;
         $offset = isset($offset) ? $offset : 0;
         
-        $where['user_id'] = $user_id;
+        if(isset($user_id)){$where['user_id'] = $user_id;}
         $where['is_delete'] = 0;
         
         //0或者不传表示全部,1待付款,2待发货,3待收货,4待评价(确认收货,交易成功),5退款/售后
@@ -76,6 +76,10 @@ class Order extends BaseModel
                     $order_list[$k]['order_status_text'] = $order_status_arr?$order_status_arr['text']:'';
                     $order_list[$k]['order_status_num'] = $order_status_arr?$order_status_arr['num']:'';
                     
+                    $order_list[$k]['province_name'] = Region::getRegionName($v['province']);
+                    $order_list[$k]['city_name'] = Region::getRegionName($v['city']);
+                    $order_list[$k]['district_name'] = Region::getRegionName($v['district']);
+                    
                     $order_goods = OrderGoods::where(array('order_id'=>$v['id']))->get();
                     $order_list[$k]['goods_list'] = $order_goods;
                 }
@@ -278,4 +282,48 @@ class Order extends BaseModel
         
         return $res;
     }
+    
+    //获取发票类型文字:0不索要发票,1个人,2企业
+    public static function getInvoiceText($where)
+    {
+        $res = '';
+        if($where['invoice'] == 0)
+        {
+            $res = '不索要发票';
+        }
+        elseif($where['invoice'] == 1)
+        {
+            $res = '个人';
+        }
+        elseif($where['invoice'] == 2)
+        {
+            $res = '企业';
+        }
+        
+        return $res;
+    }
+    
+    //获取订单来源文字:1pc,2weixin,3app,4wap
+    public static function getPlaceTypeText($where)
+    {
+        $res = '';
+        if($where['place_type'] === 1)
+        {
+            $res = 'pc';
+        }
+        elseif($where['place_type'] === 2)
+        {
+            $res = 'weixin';
+        }
+        elseif($where['place_type'] === 3)
+        {
+            $res = 'app';
+        }
+        elseif($where['place_type'] === 4)
+        {
+            $res = 'wap';
+        }
+        
+        return $res;
+    }
 }
\ No newline at end of file
diff --git a/app/Http/Model/OrderGoods.php b/app/Http/Model/OrderGoods.php
index c46f6d7..7641ecc 100644
--- a/app/Http/Model/OrderGoods.php
+++ b/app/Http/Model/OrderGoods.php
@@ -20,4 +20,28 @@ class OrderGoods extends BaseModel
      * @var bool
      */
     public $timestamps = false;
+    
+    //获取退货状态文字:0无退货,1退款中,2退款成功,3不同意退款
+    public static function getRefundStatusText($where)
+    {
+        $res = '';
+        if($where['refund_status'] == 0)
+        {
+            $res = '无退货';
+        }
+        elseif($where['refund_status'] == 1)
+        {
+            $res = '退款中';
+        }
+        elseif($where['refund_status'] == 2)
+        {
+            $res = '退款成功';
+        }
+        elseif($where['refund_status'] == 3)
+        {
+            $res = '不同意退款';
+        }
+        
+        return $res;
+    }
 }
\ No newline at end of file
diff --git a/resources/views/admin/admin/add.blade.php b/resources/views/admin/admin/add.blade.php
new file mode 100644
index 0000000..772a67f
--- /dev/null
+++ b/resources/views/admin/admin/add.blade.php
@@ -0,0 +1,64 @@
+@extends('admin.layouts.app')
+@section('title', '管理员添加')
+
+@section('content')
+
管理员列表 > 管理员添加
+ +
{{ csrf_field() }} + + + + + + + + + + + + + + + + + + + + + +
用户名:
密码:
邮箱:
角色: + +
  
+ +@endsection \ No newline at end of file diff --git a/resources/views/admin/admin/edit.blade.php b/resources/views/admin/admin/edit.blade.php new file mode 100644 index 0000000..65b5341 --- /dev/null +++ b/resources/views/admin/admin/edit.blade.php @@ -0,0 +1,67 @@ +@extends('admin.layouts.app') +@section('title', '管理员修改') + +@section('content') +
管理员列表 > 管理员修改
+ +
{{ csrf_field() }} + + + + + + + + + + + + + + + + + + + + + +
用户名:" class="required" style="width:30%" placeholder="在此输入用户名">
密码:
邮箱:" style="width:30%">
角色: + +
  
+ +@endsection \ No newline at end of file diff --git a/resources/views/admin/admin/edit222.blade.php b/resources/views/admin/admin/edit222.blade.php new file mode 100644 index 0000000..0bdafea --- /dev/null +++ b/resources/views/admin/admin/edit222.blade.php @@ -0,0 +1,58 @@ +密码修改_后台管理@include('admin.common.header') +
+
+ + +
+

密码修改

+
{{ csrf_field() }} + + + + + + + + + + + + + + + + + + + + + +
用户名:" style="width:30%">
旧密码:
新密码:
确认密码:
  
+
+ + \ No newline at end of file diff --git a/resources/views/admin/admin/index.blade.php b/resources/views/admin/admin/index.blade.php new file mode 100644 index 0000000..fa86294 --- /dev/null +++ b/resources/views/admin/admin/index.blade.php @@ -0,0 +1,26 @@ +@extends('admin.layouts.app') +@section('title', '管理员列表') + +@section('content') +

管理员列表

[ 添加管理员 ]

+ +
+ + + + + + + + + + + + + + + +
ID用户名邮箱状态管理
id; ?>username; ?>email; ?>status==0){echo '正常';}elseif($row->status==1){echo '禁用';}elseif($row->status==2){echo '禁用';} ?>修改id<>1){ ?> | 删除
+ + +@endsection \ No newline at end of file diff --git a/resources/views/admin/user/register.blade.php b/resources/views/admin/admin/register.blade.php similarity index 100% rename from resources/views/admin/user/register.blade.php rename to resources/views/admin/admin/register.blade.php diff --git a/resources/views/admin/userrole/add.blade.php b/resources/views/admin/adminrole/add.blade.php similarity index 86% rename from resources/views/admin/userrole/add.blade.php rename to resources/views/admin/adminrole/add.blade.php index 5b735a8..531c83d 100644 --- a/resources/views/admin/userrole/add.blade.php +++ b/resources/views/admin/adminrole/add.blade.php @@ -2,9 +2,9 @@ @section('title', '添加角色') @section('content') -
角色列表 > 添加角色
+
角色列表 > 添加角色
-
{{ csrf_field() }} +{{ csrf_field() }} diff --git a/resources/views/admin/userrole/edit.blade.php b/resources/views/admin/adminrole/edit.blade.php similarity index 88% rename from resources/views/admin/userrole/edit.blade.php rename to resources/views/admin/adminrole/edit.blade.php index f5ee5a6..7a90dc5 100644 --- a/resources/views/admin/userrole/edit.blade.php +++ b/resources/views/admin/adminrole/edit.blade.php @@ -2,9 +2,9 @@ @section('title', '角色修改') @section('content') -
角色列表 > 角色修改
+
角色列表 > 角色修改
-{{ csrf_field() }} +{{ csrf_field() }}
diff --git a/resources/views/admin/userrole/index.blade.php b/resources/views/admin/adminrole/index.blade.php similarity index 55% rename from resources/views/admin/userrole/index.blade.php rename to resources/views/admin/adminrole/index.blade.php index feb6d51..715ece7 100644 --- a/resources/views/admin/userrole/index.blade.php +++ b/resources/views/admin/adminrole/index.blade.php @@ -2,7 +2,7 @@ @section('title', '角色管理') @section('content') -

角色管理

[ 添加角色 ]

+

角色管理

[ 添加角色 ]

@@ -18,7 +18,7 @@ - +
name; ?> des; ?> status==0){echo '启用';}else{echo '禁用';} ?>id<>1){ ?>权限设置 | 修改id<>1){ ?> | 删除id<>1){ ?>权限设置 | 修改id<>1){ ?> | 删除
diff --git a/resources/views/admin/userrole/permissions.blade.php b/resources/views/admin/adminrole/permissions.blade.php similarity index 86% rename from resources/views/admin/userrole/permissions.blade.php rename to resources/views/admin/adminrole/permissions.blade.php index c090ee7..fe4457b 100644 --- a/resources/views/admin/userrole/permissions.blade.php +++ b/resources/views/admin/adminrole/permissions.blade.php @@ -2,9 +2,9 @@ @section('title', '角色权限设置') @section('content') -

角色权限设置

[ 角色列表 ]

+

角色权限设置

[ 角色列表 ]

-
{{ csrf_field() }} +
{{ csrf_field() }}
    diff --git a/resources/views/admin/order/detail.blade.php b/resources/views/admin/order/detail.blade.php new file mode 100644 index 0000000..afb0497 --- /dev/null +++ b/resources/views/admin/order/detail.blade.php @@ -0,0 +1,138 @@ +@extends('admin.layouts.app') +@section('title', '订单列表') + +@section('content') + + +
    +
    +
    + 当前可执行操作: +
    + + + +
    +
    +
    + +

    基本信息

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    订单编号订单状态下单人下单时间支付方式支付时间配送方式快递单号发货时间
    订单来源:客户留言:
    + +

    收货人信息

    + +
    + + + + + + + + + + + + +
    收货人姓名电话详细地址
    + +

    商品信息

    + +
    + + + + + + + + + + +$v){ ?> + + + + + + + + + + + +
    商品缩略图商品名称商品价格数量合计退货/退款退货退款理由
    + + +

    发票信息

    + +
    + + + + + + + + + + + + +
    发票类型发票抬头纳税人识别号
    + + +

    费用结算

    + +
    + + + + + + + + + + + + + + + + + + +
    商品总金额邮费优惠券积分其它费用应付金额
    +---
    + +@endsection \ No newline at end of file diff --git a/resources/views/admin/order/index.blade.php b/resources/views/admin/order/index.blade.php index db5d858..2dc2757 100644 --- a/resources/views/admin/order/index.blade.php +++ b/resources/views/admin/order/index.blade.php @@ -2,26 +2,54 @@ @section('title', '订单列表') @section('content') -

    订单管理

    + -
    - - - - - - - - - + +
    +
    +
    + + +
    +
    + + +
    + + +
    + +
    +
    + + +
    +
    + +
    + +
    +
    +
    + +
    编号-SN名称是否显示更新时间管理
    + + + + + + + + - - - - - + + + + + + diff --git a/resources/views/admin/user/add.blade.php b/resources/views/admin/user/add.blade.php index 9a28139..772a67f 100644 --- a/resources/views/admin/user/add.blade.php +++ b/resources/views/admin/user/add.blade.php @@ -2,9 +2,9 @@ @section('title', '管理员添加') @section('content') -
    管理员列表 > 管理员添加
    +
    管理员列表 > 管理员添加
    -{{ csrf_field() }} +{{ csrf_field() }}
    订单编号SN-ID支付信息收货人订单状态来源管理
    id.'-'.$row->order_sn; ?>add_time; ?>否";} ?>add_time); ?>修改 删除order_sn.'-'.$row->id; ?>, 金额:order_amount; ?>
    下单时间:add_time); ?>
    pay_money){echo '支付金额:'.$row->pay_money;} ?>out_trade_no){echo ', 流水号:'.$row->out_trade_no;} ?>pay_name){echo '
    '.$row->pay_name.', ';} ?>pay_time){echo '支付时间:'.date('Y-m-d H:i:s',$row->pay_time);} ?>
    name.'[TEL:'.$row->mobile.']'; ?>
    province_name; ?>city_name; ?>district_name; ?>
    order_status_text=='待发货'){echo ''.$row->order_status_text.'';}else{echo $row->order_status_text;} ?>place_type==1){echo 'pc';}elseif($row->place_type==2){echo 'weixin';}elseif($row->place_type==3){echo 'app';}elseif($row->place_type==4){echo 'wap';} ?>详情
    diff --git a/resources/views/admin/user/edit.blade.php b/resources/views/admin/user/edit.blade.php index 29ff355..65b5341 100644 --- a/resources/views/admin/user/edit.blade.php +++ b/resources/views/admin/user/edit.blade.php @@ -2,9 +2,9 @@ @section('title', '管理员修改') @section('content') -
    管理员列表 > 管理员修改
    +
    管理员列表 > 管理员修改
    -{{ csrf_field() }} +{{ csrf_field() }}
    diff --git a/resources/views/admin/user/index.blade.php b/resources/views/admin/user/index.blade.php index 87e7cae..fa86294 100644 --- a/resources/views/admin/user/index.blade.php +++ b/resources/views/admin/user/index.blade.php @@ -2,7 +2,7 @@ @section('title', '管理员列表') @section('content') -

    管理员列表

    [ 添加管理员 ]

    +

    管理员列表

    [ 添加管理员 ]

    @@ -18,7 +18,7 @@ - +
    username; ?> email; ?> status==0){echo '正常';}elseif($row->status==1){echo '禁用';}elseif($row->status==2){echo '禁用';} ?>修改id<>1){ ?> | 删除修改id<>1){ ?> | 删除
    diff --git a/routes/web.php b/routes/web.php index cbff2fb..b243d91 100644 --- a/routes/web.php +++ b/routes/web.php @@ -297,6 +297,7 @@ Route::group(['prefix' => 'fladmin', 'namespace' => 'Admin', 'middleware' => ['w Route::get('/goodstype/del', 'GoodsTypeController@del')->name('admin_goodstype_del'); //订单 Route::get('/order', 'OrderController@index')->name('admin_order'); + Route::get('/order/detail', 'OrderController@detail')->name('admin_order_detail'); Route::get('/order/edit', 'OrderController@edit')->name('admin_order_edit'); Route::post('/order/doedit', 'OrderController@doedit')->name('admin_order_doedit'); Route::get('/order/del', 'OrderController@del')->name('admin_order_del'); @@ -345,22 +346,29 @@ Route::group(['prefix' => 'fladmin', 'namespace' => 'Admin', 'middleware' => ['w Route::get('/sysconfig/edit', 'SysconfigController@edit')->name('admin_sysconfig_edit'); Route::post('/sysconfig/doedit', 'SysconfigController@doedit')->name('admin_sysconfig_doedit'); Route::get('/sysconfig/del', 'SysconfigController@del')->name('admin_sysconfig_del'); - //用户管理 + //会员管理 Route::get('/user', 'UserController@index')->name('admin_user'); Route::get('/user/add', 'UserController@add')->name('admin_user_add'); Route::post('/user/doadd', 'UserController@doadd')->name('admin_user_doadd'); Route::get('/user/edit', 'UserController@edit')->name('admin_user_edit'); Route::post('/user/doedit', 'UserController@doedit')->name('admin_user_doedit'); Route::get('/user/del', 'UserController@del')->name('admin_user_del'); + //管理员管理 + Route::get('/admin', 'AdminController@index')->name('admin_admin'); + Route::get('/admin/add', 'AdminController@add')->name('admin_admin_add'); + Route::post('/admin/doadd', 'AdminController@doadd')->name('admin_admin_doadd'); + Route::get('/admin/edit', 'AdminController@edit')->name('admin_admin_edit'); + Route::post('/admin/doedit', 'AdminController@doedit')->name('admin_admin_doedit'); + Route::get('/admin/del', 'AdminController@del')->name('admin_admin_del'); //角色管理 - Route::get('/userrole', 'UserRoleController@index')->name('admin_userrole'); - Route::get('/userrole/add', 'UserRoleController@add')->name('admin_userrole_add'); - Route::post('/userrole/doadd', 'UserRoleController@doadd')->name('admin_userrole_doadd'); - Route::get('/userrole/edit', 'UserRoleController@edit')->name('admin_userrole_edit'); - Route::post('/userrole/doedit', 'UserRoleController@doedit')->name('admin_userrole_doedit'); - Route::get('/userrole/del', 'UserRoleController@del')->name('admin_userrole_del'); - Route::get('/userrole/permissions', 'UserRoleController@permissions')->name('admin_userrole_permissions'); //权限设置 - Route::post('/userrole/dopermissions', 'UserRoleController@dopermissions')->name('admin_userrole_dopermissions'); + Route::get('/adminrole', 'AdminRoleController@index')->name('admin_adminrole'); + Route::get('/adminrole/add', 'AdminRoleController@add')->name('admin_adminrole_add'); + Route::post('/adminrole/doadd', 'AdminRoleController@doadd')->name('admin_adminrole_doadd'); + Route::get('/adminrole/edit', 'AdminRoleController@edit')->name('admin_adminrole_edit'); + Route::post('/adminrole/doedit', 'AdminRoleController@doedit')->name('admin_adminrole_doedit'); + Route::get('/adminrole/del', 'AdminRoleController@del')->name('admin_adminrole_del'); + Route::get('/adminrole/permissions', 'AdminRoleController@permissions')->name('admin_adminrole_permissions'); //权限设置 + Route::post('/adminrole/dopermissions', 'AdminRoleController@dopermissions')->name('admin_adminrole_dopermissions'); //菜单管理 Route::get('/menu', 'MenuController@index')->name('admin_menu'); Route::get('/menu/add', 'MenuController@add')->name('admin_menu_add');