Browse Source

用户列表增加按钮

lizhen_gitee 1 year ago
parent
commit
ac27384e85

+ 1 - 0
application/admin/controller/Lessonorder.php

@@ -55,6 +55,7 @@ class Lessonorder extends Backend
             $list = $this->model
                     ->with(['user','slot','lesson'])
                     ->where($where)
+                    ->where('lessonorder.order_status','NEQ',0)
                     ->order($sort, $order)
                     ->paginate($limit);
 

+ 1 - 0
application/admin/controller/Packageorder.php

@@ -55,6 +55,7 @@ class Packageorder extends Backend
             $list = $this->model
                     ->with(['user','package'])
                     ->where($where)
+                    ->where('packageorder.order_status',1)
                     ->order($sort, $order)
                     ->paginate($limit);
 

+ 1 - 0
application/admin/controller/Trylessonorder.php

@@ -53,6 +53,7 @@ class Trylessonorder extends Backend
             $list = $this->model
                     ->with(['user','trylesson'])
                     ->where($where)
+                    ->where('trylessonorder.order_status','IN',[10,20])
                     ->order($sort, $order)
                     ->paginate($limit);
 

+ 34 - 1
public/assets/js/backend/user/user.js

@@ -69,7 +69,40 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'emergency', title: __('Emergency'), operate: 'LIKE'},
                         {field: 'is_first', title: __('Is_first'), searchList: {"0":__('Is_first 0'),"1":__('Is_first 1')}, formatter: Table.api.formatter.normal},
 
-                        {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
+                        {field: 'operate', title: __('Operate'), table: table,
+                            buttons:[
+                                {
+                                    name:'trylessonorder',
+                                    text:'试课订单',
+                                    title:'试课订单',
+                                    icon:'fa fa-exclamation-circle',
+                                    classname:'btn btn-xs btn-info btn-dialog',
+                                    url:'trylessonorder/index/user_id/{ids}?dialog=1',
+                                    target:'_self',
+                                    extend:'data-area=["80%","80%"]'
+                                },
+                                {
+                                    name:'lessonorder',
+                                    text:'预约订单',
+                                    title:'预约订单',
+                                    icon:'fa fa-exclamation-circle',
+                                    classname:'btn btn-xs btn-info btn-dialog',
+                                    url:'lessonorder/index/user_id/{ids}?dialog=1',
+                                    target:'_self',
+                                    extend:'data-area=["80%","80%"]'
+                                },
+                                {
+                                    name:'packageorder',
+                                    text:'配套订单',
+                                    title:'配套订单',
+                                    icon:'fa fa-exclamation-circle',
+                                    classname:'btn btn-xs btn-info btn-dialog',
+                                    url:'packageorder/index/user_id/{ids}?dialog=1',
+                                    target:'_self',
+                                    extend:'data-area=["80%","80%"]'
+                                },
+                            ],
+                            events: Table.api.events.operate, formatter: Table.api.formatter.operate}
                     ]
                 ]
             });