正在显示
11 个修改的文件
包含
172 行增加
和
60 行删除
@@ -10,10 +10,12 @@ return [ | @@ -10,10 +10,12 @@ return [ | ||
10 | 'Cloud_type 1' => '上午', | 10 | 'Cloud_type 1' => '上午', |
11 | 'Cloud_type 2' => '下午', | 11 | 'Cloud_type 2' => '下午', |
12 | 'Plane_type' => '飞机类型', | 12 | 'Plane_type' => '飞机类型', |
13 | - 'Plane_type 1' => '飞机一', | ||
14 | - 'Plane_type 2' => '飞机二', | ||
15 | - 'Plane_type 3' => '飞机三', | ||
16 | - 'Plane_type 4' => '飞机四', | 13 | + 'Plane_type 1' => '飞机一', |
14 | + 'Plane_type 2' => '飞机二', | ||
15 | + 'Plane_type 3' => '飞机三', | ||
16 | + 'Plane_type 4' => '飞机四', | ||
17 | + 'Plane_type 5' => '飞机五', | ||
18 | + 'Plane_type 6' => '飞机六', | ||
17 | 'Createtime' => '创建时间', | 19 | 'Createtime' => '创建时间', |
18 | 'Updatetime' => '更改时间', | 20 | 'Updatetime' => '更改时间', |
19 | 'Time.title' => '时间' | 21 | 'Time.title' => '时间' |
@@ -15,6 +15,8 @@ return [ | @@ -15,6 +15,8 @@ return [ | ||
15 | 'Plane_type 2' => '飞机二', | 15 | 'Plane_type 2' => '飞机二', |
16 | 'Plane_type 3' => '飞机三', | 16 | 'Plane_type 3' => '飞机三', |
17 | 'Plane_type 4' => '飞机四', | 17 | 'Plane_type 4' => '飞机四', |
18 | + 'Plane_type 5' => '飞机五', | ||
19 | + 'Plane_type 6' => '飞机六', | ||
18 | 'Createtime' => '创建时间', | 20 | 'Createtime' => '创建时间', |
19 | 'Updatetime' => '更改时间', | 21 | 'Updatetime' => '更改时间', |
20 | 'User_id' => '预约人', | 22 | 'User_id' => '预约人', |
@@ -8,13 +8,13 @@ use think\Model; | @@ -8,13 +8,13 @@ use think\Model; | ||
8 | class Moban extends Model | 8 | class Moban extends Model |
9 | { | 9 | { |
10 | 10 | ||
11 | - | ||
12 | 11 | ||
13 | - | 12 | + |
13 | + | ||
14 | 14 | ||
15 | // 表名 | 15 | // 表名 |
16 | protected $name = 'moban'; | 16 | protected $name = 'moban'; |
17 | - | 17 | + |
18 | // 自动写入时间戳字段 | 18 | // 自动写入时间戳字段 |
19 | protected $autoWriteTimestamp = 'int'; | 19 | protected $autoWriteTimestamp = 'int'; |
20 | 20 | ||
@@ -29,9 +29,9 @@ class Moban extends Model | @@ -29,9 +29,9 @@ class Moban extends Model | ||
29 | 'cloud_type_text', | 29 | 'cloud_type_text', |
30 | 'plane_type_text' | 30 | 'plane_type_text' |
31 | ]; | 31 | ]; |
32 | - | ||
33 | 32 | ||
34 | - | 33 | + |
34 | + | ||
35 | public function getStatusList() | 35 | public function getStatusList() |
36 | { | 36 | { |
37 | return ['1' => __('Status 1'), '2' => __('Status 2')]; | 37 | return ['1' => __('Status 1'), '2' => __('Status 2')]; |
@@ -44,7 +44,7 @@ class Moban extends Model | @@ -44,7 +44,7 @@ class Moban extends Model | ||
44 | 44 | ||
45 | public function getPlaneTypeList() | 45 | public function getPlaneTypeList() |
46 | { | 46 | { |
47 | - return ['1' => __('Plane_type 1'), '2' => __('Plane_type 2'),'3' => __('Plane_type 3'),'4' => __('Plane_type 4')]; | 47 | + return ['1' => __('Plane_type 1'), '2' => __('Plane_type 2'),'3' => __('Plane_type 3'),'4' => __('Plane_type 4'),'5' => __('Plane_type 5'),'6' => __('Plane_type 6')]; |
48 | } | 48 | } |
49 | 49 | ||
50 | 50 |
@@ -44,7 +44,7 @@ class Sun extends Model | @@ -44,7 +44,7 @@ class Sun extends Model | ||
44 | 44 | ||
45 | public function getPlaneTypeList() | 45 | public function getPlaneTypeList() |
46 | { | 46 | { |
47 | - return ['1' => __('Plane_type 1'), '2' => __('Plane_type 2'), '3' => __('Plane_type 3'), '4' => __('Plane_type 4')]; | 47 | + return ['1' => __('Plane_type 1'), '2' => __('Plane_type 2'), '3' => __('Plane_type 3'), '4' => __('Plane_type 4'),'5' => __('Plane_type 5'),'6' => __('Plane_type 6')]; |
48 | } | 48 | } |
49 | 49 | ||
50 | 50 |
@@ -7,18 +7,18 @@ | @@ -7,18 +7,18 @@ | ||
7 | <div class="widget-body no-padding"> | 7 | <div class="widget-body no-padding"> |
8 | <div id="toolbar" class="toolbar"> | 8 | <div id="toolbar" class="toolbar"> |
9 | <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a> | 9 | <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a> |
10 | - <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('planename/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a> | 10 | +<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('planename/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>--> |
11 | <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('planename/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a> | 11 | <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('planename/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a> |
12 | - <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('planename/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a> | ||
13 | - <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('planename/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a> | ||
14 | - | ||
15 | - <div class="dropdown btn-group {:$auth->check('planename/multi')?'':'hide'}"> | ||
16 | - <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a> | ||
17 | - <ul class="dropdown-menu text-left" role="menu"> | ||
18 | - <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li> | ||
19 | - <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li> | ||
20 | - </ul> | ||
21 | - </div> | 12 | +<!-- <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('planename/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>--> |
13 | +<!-- <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('planename/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>--> | ||
14 | +<!----> | ||
15 | +<!-- <div class="dropdown btn-group {:$auth->check('planename/multi')?'':'hide'}">--> | ||
16 | +<!-- <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>--> | ||
17 | +<!-- <ul class="dropdown-menu text-left" role="menu">--> | ||
18 | +<!-- <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>--> | ||
19 | +<!-- <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>--> | ||
20 | +<!-- </ul>--> | ||
21 | +<!-- </div>--> | ||
22 | 22 | ||
23 | 23 | ||
24 | </div> | 24 | </div> |
@@ -315,7 +315,7 @@ class Index extends Api | @@ -315,7 +315,7 @@ class Index extends Api | ||
315 | } | 315 | } |
316 | }) | 316 | }) |
317 | */ | 317 | */ |
318 | - public function TableList() | 318 | + public function TableList() |
319 | { | 319 | { |
320 | $date = input('date'); | 320 | $date = input('date'); |
321 | $day = strtotime(date($date)); | 321 | $day = strtotime(date($date)); |
@@ -401,14 +401,72 @@ class Index extends Api | @@ -401,14 +401,72 @@ class Index extends Api | ||
401 | $shangwu4[$k]['bvip'] = null; | 401 | $shangwu4[$k]['bvip'] = null; |
402 | } | 402 | } |
403 | } | 403 | } |
404 | - foreach ($shangwu1 as $key => $vo) { | ||
405 | - $up1[] = array_merge($vo, $shangwu2[$key]); | 404 | + //上午时间飞机五 |
405 | + $shangwu5 = Db::name('sun') | ||
406 | + ->alias('s') | ||
407 | + ->join('time t', 't.id=s.type_id') | ||
408 | + ->where($map) | ||
409 | + ->where(['s.cloud_type' => 1]) | ||
410 | + ->where(['s.plane_type' => 5]) | ||
411 | + ->join('planename p', 'p.id=s.plane_type') | ||
412 | + ->field('s.id as cid,p.name as cname,s.plane_type as cplane_type,s.status as cstatus,s.user_id as cuser_id') | ||
413 | + ->select(); | ||
414 | + foreach ($shangwu5 as $k => $v) { | ||
415 | + if ($v['cuser_id'] != null) { | ||
416 | + $user = Db::name('user')->where(['id' => $v['cuser_id']])->find(); | ||
417 | + $shangwu5[$k]['cnickname'] = $user['nickname']; | ||
418 | + $shangwu5[$k]['cvip'] = $user['vip']; | ||
419 | + } else { | ||
420 | + $shangwu5[$k]['cnickname'] = null; | ||
421 | + $shangwu5[$k]['cvip'] = null; | ||
422 | + } | ||
406 | } | 423 | } |
407 | - foreach ($shangwu3 as $key => $vo) { | ||
408 | - $up2[] = array_merge($vo, $shangwu4[$key]); | 424 | + //上午时间飞机六 |
425 | + $shangwu6 = Db::name('sun') | ||
426 | + ->alias('s') | ||
427 | + ->join('time t', 't.id=s.type_id') | ||
428 | + ->where($map) | ||
429 | + ->where(['s.cloud_type' => 1]) | ||
430 | + ->where(['s.plane_type' => 6]) | ||
431 | + ->join('planename p', 'p.id=s.plane_type') | ||
432 | + ->field('s.id as did,p.name as dname,s.plane_type as dplane_type,s.status as dstatus,s.user_id as duser_id') | ||
433 | + ->select(); | ||
434 | + foreach ($shangwu6 as $k => $v) { | ||
435 | + if ($v['duser_id'] != null) { | ||
436 | + $user = Db::name('user')->where(['id' => $v['duser_id']])->find(); | ||
437 | + $shangwu6[$k]['dnickname'] = $user['nickname']; | ||
438 | + $shangwu6[$k]['dvip'] = $user['vip']; | ||
439 | + } else { | ||
440 | + $shangwu6[$k]['dnickname'] = null; | ||
441 | + $shangwu6[$k]['dvip'] = null; | ||
442 | + } | ||
409 | } | 443 | } |
410 | - foreach ($up1 as $key => $vo) { | ||
411 | - $up[] = array_merge($vo, $up2[$key]); | 444 | + if (!empty($shangwu5) && !empty($shangwu6)) { |
445 | + foreach ($shangwu1 as $key => $vo) { | ||
446 | + $up1[] = array_merge($vo, $shangwu2[$key]); | ||
447 | + } | ||
448 | + foreach ($shangwu3 as $key => $vo) { | ||
449 | + $up2[] = array_merge($vo, $shangwu4[$key]); | ||
450 | + } | ||
451 | + foreach ($shangwu5 as $key => $vo) { | ||
452 | + $up3[] = array_merge($vo, $shangwu6[$key]); | ||
453 | + } | ||
454 | + foreach ($up1 as $key => $vo) { | ||
455 | + $up4[] = array_merge($vo, $up2[$key]); | ||
456 | + } | ||
457 | + foreach ($up4 as $key => $vo) { | ||
458 | + $up[] = array_merge($vo, $up3[$key]); | ||
459 | + } | ||
460 | + } else { | ||
461 | + foreach ($shangwu1 as $key => $vo) { | ||
462 | + $up1[] = array_merge($vo, $shangwu2[$key]); | ||
463 | + } | ||
464 | + foreach ($shangwu3 as $key => $vo) { | ||
465 | + $up2[] = array_merge($vo, $shangwu4[$key]); | ||
466 | + } | ||
467 | + foreach ($up1 as $key => $vo) { | ||
468 | + $up[] = array_merge($vo, $up2[$key]); | ||
469 | + } | ||
412 | } | 470 | } |
413 | //$up 上午 | 471 | //$up 上午 |
414 | //$down 下午 | 472 | //$down 下午 |
@@ -492,14 +550,72 @@ class Index extends Api | @@ -492,14 +550,72 @@ class Index extends Api | ||
492 | $xiawu4[$k]['bvip'] = null; | 550 | $xiawu4[$k]['bvip'] = null; |
493 | } | 551 | } |
494 | } | 552 | } |
495 | - foreach ($xiawu1 as $key => $vo) { | ||
496 | - $down1[] = array_merge($vo, $xiawu2[$key]); | 553 | + //下午时间飞机五 |
554 | + $xiawu5 = Db::name('sun') | ||
555 | + ->alias('s') | ||
556 | + ->join('time t', 't.id=s.type_id') | ||
557 | + ->where($map) | ||
558 | + ->where(['s.cloud_type' => 2]) | ||
559 | + ->where(['s.plane_type' => 5]) | ||
560 | + ->join('planename p', 'p.id=s.plane_type') | ||
561 | + ->field('s.id as cid,p.name as cname,s.plane_type as cplane_type,s.status as cstatus,s.user_id as cuser_id') | ||
562 | + ->select(); | ||
563 | + foreach ($xiawu5 as $k => $v) { | ||
564 | + if ($v['cuser_id'] != null) { | ||
565 | + $user = Db::name('user')->where(['id' => $v['cuser_id']])->find(); | ||
566 | + $xiawu5[$k]['cnickname'] = $user['nickname']; | ||
567 | + $xiawu5[$k]['cvip'] = $user['vip']; | ||
568 | + } else { | ||
569 | + $xiawu5[$k]['cnickname'] = null; | ||
570 | + $xiawu5[$k]['cvip'] = null; | ||
571 | + } | ||
497 | } | 572 | } |
498 | - foreach ($xiawu3 as $key => $vo) { | ||
499 | - $down2[] = array_merge($vo, $xiawu4[$key]); | 573 | + //下午时间飞机六 |
574 | + $xiawu6 = Db::name('sun') | ||
575 | + ->alias('s') | ||
576 | + ->join('time t', 't.id=s.type_id') | ||
577 | + ->where($map) | ||
578 | + ->where(['s.cloud_type' => 2]) | ||
579 | + ->where(['s.plane_type' => 6]) | ||
580 | + ->join('planename p', 'p.id=s.plane_type') | ||
581 | + ->field('s.id as did,p.name as dname,s.plane_type as dplane_type,s.status as dstatus,s.user_id as duser_id') | ||
582 | + ->select(); | ||
583 | + foreach ($xiawu6 as $k => $v) { | ||
584 | + if ($v['duser_id'] != null) { | ||
585 | + $user = Db::name('user')->where(['id' => $v['duser_id']])->find(); | ||
586 | + $xiawu6[$k]['dnickname'] = $user['nickname']; | ||
587 | + $xiawu6[$k]['dvip'] = $user['vip']; | ||
588 | + } else { | ||
589 | + $xiawu6[$k]['dnickname'] = null; | ||
590 | + $xiawu6[$k]['dvip'] = null; | ||
591 | + } | ||
500 | } | 592 | } |
501 | - foreach ($down1 as $key => $vo) { | ||
502 | - $down[] = array_merge($vo, $down2[$key]); | 593 | + if (!empty($xiawu5) && !empty($xiawu6)) { |
594 | + foreach ($xiawu1 as $key => $vo) { | ||
595 | + $down1[] = array_merge($vo, $xiawu2[$key]); | ||
596 | + } | ||
597 | + foreach ($xiawu3 as $key => $vo) { | ||
598 | + $down2[] = array_merge($vo, $xiawu4[$key]); | ||
599 | + } | ||
600 | + foreach ($xiawu5 as $key => $vo) { | ||
601 | + $down3[] = array_merge($vo, $xiawu6[$key]); | ||
602 | + } | ||
603 | + foreach ($down1 as $key => $vo) { | ||
604 | + $down4[] = array_merge($vo, $down2[$key]); | ||
605 | + } | ||
606 | + foreach ($down4 as $key => $vo) { | ||
607 | + $down[] = array_merge($vo, $down3[$key]); | ||
608 | + } | ||
609 | + } else { | ||
610 | + foreach ($xiawu1 as $key => $vo) { | ||
611 | + $down1[] = array_merge($vo, $xiawu2[$key]); | ||
612 | + } | ||
613 | + foreach ($xiawu3 as $key => $vo) { | ||
614 | + $down2[] = array_merge($vo, $xiawu4[$key]); | ||
615 | + } | ||
616 | + foreach ($down1 as $key => $vo) { | ||
617 | + $down[] = array_merge($vo, $down2[$key]); | ||
618 | + } | ||
503 | } | 619 | } |
504 | $list = [ | 620 | $list = [ |
505 | 'up' => $up, | 621 | 'up' => $up, |
@@ -231,8 +231,8 @@ class Api | @@ -231,8 +231,8 @@ class Api | ||
231 | /** | 231 | /** |
232 | * 前置操作 | 232 | * 前置操作 |
233 | * @access protected | 233 | * @access protected |
234 | - * @param string $method 前置操作方法名 | ||
235 | - * @param array $options 调用参数 ['only'=>[...]] 或者 ['except'=>[...]] | 234 | + * @param string $method 前置操作方法名 |
235 | + * @param array $options 调用参数 ['only'=>[...]] 或者 ['except'=>[...]] | ||
236 | * @return void | 236 | * @return void |
237 | */ | 237 | */ |
238 | protected function beforeAction($method, $options = []) | 238 | protected function beforeAction($method, $options = []) |
@@ -274,11 +274,11 @@ class Api | @@ -274,11 +274,11 @@ class Api | ||
274 | /** | 274 | /** |
275 | * 验证数据 | 275 | * 验证数据 |
276 | * @access protected | 276 | * @access protected |
277 | - * @param array $data 数据 | ||
278 | - * @param string|array $validate 验证器名或者验证规则数组 | ||
279 | - * @param array $message 提示信息 | ||
280 | - * @param bool $batch 是否批量验证 | ||
281 | - * @param mixed $callback 回调方法(闭包) | 277 | + * @param array $data 数据 |
278 | + * @param string|array $validate 验证器名或者验证规则数组 | ||
279 | + * @param array $message 提示信息 | ||
280 | + * @param bool $batch 是否批量验证 | ||
281 | + * @param mixed $callback 回调方法(闭包) | ||
282 | * @return array|string|true | 282 | * @return array|string|true |
283 | * @throws ValidateException | 283 | * @throws ValidateException |
284 | */ | 284 | */ |
@@ -598,7 +598,7 @@ class Api | @@ -598,7 +598,7 @@ class Api | ||
598 | if ($is_week == '周一') { | 598 | if ($is_week == '周一') { |
599 | $count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select(); | 599 | $count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select(); |
600 | if (!empty($count)) { | 600 | if (!empty($count)) { |
601 | - if (count($count) == 2) { | 601 | + if (count($count) > 1) { |
602 | $this->error('超过最大可预约次数', 0); | 602 | $this->error('超过最大可预约次数', 0); |
603 | die; | 603 | die; |
604 | } | 604 | } |
@@ -607,7 +607,7 @@ class Api | @@ -607,7 +607,7 @@ class Api | ||
607 | if ($is_week == '周二') { | 607 | if ($is_week == '周二') { |
608 | $count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select(); | 608 | $count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select(); |
609 | if (!empty($count)) { | 609 | if (!empty($count)) { |
610 | - if (count($count) == 2) { | 610 | + if (count($count) > 1) { |
611 | $this->error('超过最大可预约次数', 0); | 611 | $this->error('超过最大可预约次数', 0); |
612 | die; | 612 | die; |
613 | } | 613 | } |
@@ -616,7 +616,7 @@ class Api | @@ -616,7 +616,7 @@ class Api | ||
616 | if ($is_week == '周三') { | 616 | if ($is_week == '周三') { |
617 | $count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select(); | 617 | $count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select(); |
618 | if (!empty($count)) { | 618 | if (!empty($count)) { |
619 | - if (count($count) == 2) { | 619 | + if (count($count) > 1) { |
620 | $this->error('超过最大可预约次数', 0); | 620 | $this->error('超过最大可预约次数', 0); |
621 | die; | 621 | die; |
622 | } | 622 | } |
@@ -625,7 +625,7 @@ class Api | @@ -625,7 +625,7 @@ class Api | ||
625 | if ($is_week == '周四') { | 625 | if ($is_week == '周四') { |
626 | $count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select(); | 626 | $count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select(); |
627 | if (!empty($count)) { | 627 | if (!empty($count)) { |
628 | - if (count($count) == 2) { | 628 | + if (count($count) > 1) { |
629 | $this->error('超过最大可预约次数', 0); | 629 | $this->error('超过最大可预约次数', 0); |
630 | die; | 630 | die; |
631 | } | 631 | } |
@@ -634,7 +634,7 @@ class Api | @@ -634,7 +634,7 @@ class Api | ||
634 | if ($is_week == '周五') { | 634 | if ($is_week == '周五') { |
635 | $count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select(); | 635 | $count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select(); |
636 | if (!empty($count)) { | 636 | if (!empty($count)) { |
637 | - if (count($count) == 2) { | 637 | + if (count($count) > 1) { |
638 | $this->error('超过最大可预约次数', 0); | 638 | $this->error('超过最大可预约次数', 0); |
639 | die; | 639 | die; |
640 | } | 640 | } |
@@ -643,7 +643,7 @@ class Api | @@ -643,7 +643,7 @@ class Api | ||
643 | if ($is_week == '周六') { | 643 | if ($is_week == '周六') { |
644 | $count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select(); | 644 | $count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select(); |
645 | if (!empty($count)) { | 645 | if (!empty($count)) { |
646 | - if (count($count) == 2) { | 646 | + if (count($count) > 1) { |
647 | $this->error('超过最大可预约次数', 0); | 647 | $this->error('超过最大可预约次数', 0); |
648 | die; | 648 | die; |
649 | } | 649 | } |
@@ -652,7 +652,7 @@ class Api | @@ -652,7 +652,7 @@ class Api | ||
652 | if ($is_week == '周日') { | 652 | if ($is_week == '周日') { |
653 | $count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select(); | 653 | $count = Db::name('yuyue')->where(['user_id' => $user_id])->where($map)->select(); |
654 | if (!empty($count)) { | 654 | if (!empty($count)) { |
655 | - if (count($count) == 2) { | 655 | + if (count($count) > 1) { |
656 | $this->error('超过最大可预约次数', 0); | 656 | $this->error('超过最大可预约次数', 0); |
657 | die; | 657 | die; |
658 | } | 658 | } |
@@ -29,7 +29,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -29,7 +29,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
29 | {field: 'time.title', title: __('Time.title')}, | 29 | {field: 'time.title', title: __('Time.title')}, |
30 | {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status}, | 30 | {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status}, |
31 | {field: 'cloud_type', title: __('Cloud_type'), searchList: {"1":__('Cloud_type 1'),"2":__('Cloud_type 2')}, formatter: Table.api.formatter.normal}, | 31 | {field: 'cloud_type', title: __('Cloud_type'), searchList: {"1":__('Cloud_type 1'),"2":__('Cloud_type 2')}, formatter: Table.api.formatter.normal}, |
32 | - {field: 'plane_type', title: __('Plane_type'), searchList: {"1":__('Plane_type 1'),"2":__('Plane_type 2'),"3":__('Plane_type 3'),"4":__('Plane_type 4')}, formatter: Table.api.formatter.normal}, | 32 | + {field: 'plane_type', title: __('Plane_type'), searchList: {"1":__('Plane_type 1'),"2":__('Plane_type 2'),"3":__('Plane_type 3'),"4":__('Plane_type 4'),"5":__('Plane_type 5'),"6":__('Plane_type 6')}, formatter: Table.api.formatter.normal}, |
33 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, | 33 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, |
34 | {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, | 34 | {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, |
35 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} | 35 | {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate} |
@@ -8,7 +8,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -8,7 +8,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
8 | index_url: 'planename/index' + location.search, | 8 | index_url: 'planename/index' + location.search, |
9 | add_url: 'planename/add', | 9 | add_url: 'planename/add', |
10 | edit_url: 'planename/edit', | 10 | edit_url: 'planename/edit', |
11 | - del_url: 'planename/del', | 11 | + // del_url: 'planename/del', |
12 | multi_url: 'planename/multi', | 12 | multi_url: 'planename/multi', |
13 | table: 'planename', | 13 | table: 'planename', |
14 | } | 14 | } |
@@ -31,7 +31,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | @@ -31,7 +31,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin | ||
31 | // {field: 'type_id', title: __('Type_id')}, | 31 | // {field: 'type_id', title: __('Type_id')}, |
32 | {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3')}, formatter: Table.api.formatter.status,operate:false}, | 32 | {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3')}, formatter: Table.api.formatter.status,operate:false}, |
33 | {field: 'cloud_type', title: __('Cloud_type'), searchList: {"1":__('Cloud_type 1'),"2":__('Cloud_type 2')}, formatter: Table.api.formatter.normal,operate:false}, | 33 | {field: 'cloud_type', title: __('Cloud_type'), searchList: {"1":__('Cloud_type 1'),"2":__('Cloud_type 2')}, formatter: Table.api.formatter.normal,operate:false}, |
34 | - {field: 'plane_type', title: __('Plane_type'), searchList: {"1":__('Plane_type 1'),"2":__('Plane_type 2'),"3":__('Plane_type 3'),"4":__('Plane_type 4')}, formatter: Table.api.formatter.normal,operate:false}, | 34 | + {field: 'plane_type', title: __('Plane_type'), searchList: {"1":__('Plane_type 1'),"2":__('Plane_type 2'),"3":__('Plane_type 3'),"4":__('Plane_type 4'),"5":__('Plane_type 5'),"6":__('Plane_type 6')}, formatter: Table.api.formatter.normal,operate:false}, |
35 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, | 35 | {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime}, |
36 | {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime,operate:false}, | 36 | {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime,operate:false}, |
37 | // {field: 'user_id', title: __('User_id')}, | 37 | // {field: 'user_id', title: __('User_id')}, |
-
请 注册 或 登录 后发表评论