Bläddra i källkod

课程表和预约订单,都新增字段

lizhen_gitee 6 månader sedan
förälder
incheckning
00cf22750a

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

@@ -63,7 +63,7 @@ class Lessonorder extends Backend
                 
                 $row->getRelation('user')->visible(['firstname','lastname']);
 				$row->getRelation('slot')->visible(['starttime','endtime']);
-				$row->getRelation('lesson')->visible(['name','name_en']);
+				$row->getRelation('lesson')->visible(['name','name_en','type']);
 				$row->getRelation('coach')->visible(['nickname']);
             }
 

+ 1 - 1
application/admin/controller/Lessonslot.php

@@ -63,7 +63,7 @@ class Lessonslot extends Backend
             foreach ($list as $row) {
                 
                 $row->getRelation('coach')->visible(['nickname']);
-				$row->getRelation('lesson')->visible(['name','name_en']);
+				$row->getRelation('lesson')->visible(['name','name_en','type']);
 				$row->getRelation('danceroom')->visible(['name','name_en']);
             }
 

+ 3 - 0
application/admin/lang/en/lessonorder.php

@@ -41,5 +41,8 @@ return [
     'Slot.endtime'     => 'end time',
     'Lesson.name'      => 'Lesson name',
     'Lesson.name_en'   => 'Lesson name(en)',
+    'Lesson.type'            => 'Lesson Type',
+    'Lesson.type 1'          => 'Public',
+    'Lesson.type 2'          => 'Private',
     'Coach.nickname'   => 'Instructor'
 ];

+ 4 - 1
application/admin/lang/en/lessonslot.php

@@ -27,5 +27,8 @@ return [
     'Is_show 0'     => 'INTERNAL USE ONLY',
     'Coach.nickname'  => 'Coach nickname',
     'Lesson.name'     => 'Lesson name',
-    'Lesson.name_en'  => 'Lesson name(en)'
+    'Lesson.name_en'  => 'Lesson name(en)',
+    'Lesson.type'            => 'Lesson Type',
+    'Lesson.type 1'          => 'Public',
+    'Lesson.type 2'          => 'Private',
 ];

+ 3 - 0
application/admin/lang/zh-cn/lessonorder.php

@@ -41,5 +41,8 @@ return [
     'Slot.endtime'       => '结束时间',
     'Lesson.name'        => '课程标题',
     'Lesson.name_en'     => '课程标题(en)',
+    'Lesson.type'            => '课程类型',
+    'Lesson.type 1'          => '普通课',
+    'Lesson.type 2'          => '私教课',
     'Coach.nickname'     => '教练',
 ];

+ 3 - 0
application/admin/lang/zh-cn/lessonslot.php

@@ -30,6 +30,9 @@ return [
     'Coach.nickname'         => '教练昵称',
     'Lesson.name'            => '课程标题',
     'Lesson.name_en'         => '课程标题(en)',
+    'Lesson.type'            => '课程类型',
+    'Lesson.type 1'          => '普通课',
+    'Lesson.type 2'          => '私教课',
     'Danceroom.name'         => '舞蹈室',
     'Danceroom.name_en'      => '舞蹈室(en)',
 

+ 1 - 0
public/assets/js/backend/lessonorder.js

@@ -39,6 +39,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'lesson_id', title: __('Lesson_id')},
                         {field: 'lesson.name', title: __('Lesson.name'), operate: 'LIKE'},
                         {field: 'lesson.name_en', title: __('Lesson.name_en'), operate: 'LIKE'},
+                        {field: 'lesson.type', title: __('Lesson.type'),searchList: {"1":__('Lesson.type 1'),"2":__('Lesson.type 2')}, formatter: Table.api.formatter.normal},
                         {field: 'coach.nickname', title: __('Coach.nickname'), operate: 'LIKE'},
                         {field: 'order_amount', title: __('Order_amount'), operate:'BETWEEN'},
                         {field: 'order_status', title: __('Order_status'), searchList: {"0":__('Order_status 0'),"10":__('Order_status 10'),"20":__('Order_status 20'),"30":__('Order_status 30'),"40":__('Order_status 40')}, formatter: Table.api.formatter.status},

+ 1 - 0
public/assets/js/backend/lessonslot.js

@@ -41,6 +41,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'lesson_id', title: __('Lesson_id')},
                         {field: 'lesson.name', title: __('Lesson.name'), operate: 'LIKE'},
                         {field: 'lesson.name_en', title: __('Lesson.name_en'), operate: 'LIKE'},
+                        {field: 'lesson.type', title: __('Lesson.type'),searchList: {"1":__('Lesson.type 1'),"2":__('Lesson.type 2')}, formatter: Table.api.formatter.normal},
 //                        {field: 'address', title: __('Address'), operate: 'LIKE'},
                         {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"20":__('Status 20'),"30":__('Status 30')}, formatter: Table.api.formatter.status},
 //                        {field: 'remark', title: __('Remark'), operate: 'LIKE'},