|
@@ -46,19 +46,22 @@ class OrderController extends AdminController
|
|
}
|
|
}
|
|
$grid->column('id', __('Id'));
|
|
$grid->column('id', __('Id'));
|
|
$grid->column('orderUser.nickname', __('预约用户'));
|
|
$grid->column('orderUser.nickname', __('预约用户'));
|
|
- $grid->column('orderPatient.appoint_start_time', __('预约开始时间'))->display(function ($w){
|
|
|
|
- return date('Y-m-d H:i:s',$w);
|
|
|
|
|
|
+ $grid->column('orderPatient.appoint_start_time', __('预约时间'))->display(function ($w){
|
|
|
|
+ return date('Y-m-d H:i',$w).'至'.date('H:i',$this->orderPatient->appoint_end_time);
|
|
});
|
|
});
|
|
- $grid->column('orderPatient.appoint_end_time', __('预约结束时间'))->display(function ($w){
|
|
|
|
- if(empty($w)) return '';
|
|
|
|
- return date('Y-m-d H:i:s',$w);
|
|
|
|
|
|
+// $grid->column('orderPatient.appoint_end_time', __('预约结束时间'))->display(function ($w){
|
|
|
|
+// if(empty($w)) return '';
|
|
|
|
+// return date('Y-m-d H:i',$w);
|
|
|
|
+// });
|
|
|
|
+ $grid->column('orderPatient.phone', __('电话号码'))->display(function ($p){
|
|
|
|
+ if(empty($p)) return $this->user->phone;
|
|
|
|
+ return $p;
|
|
});
|
|
});
|
|
- $grid->column('orderPatient.phone', __('电话号码'));
|
|
|
|
|
|
|
|
- $grid->column('orderPatient.name', __('预约患者'))->display(function ($w){
|
|
|
|
|
|
+ $grid->column('orderPatient.name', __('预约患者'));
|
|
|
|
+ $grid->column('orderPatient.sex', __('患者性别'))->display(function ($w){
|
|
return $w==1?'男':'女';
|
|
return $w==1?'男':'女';
|
|
});
|
|
});
|
|
- $grid->column('orderPatient.sex', __('患者性别'));
|
|
|
|
$grid->column('orderPatient.birthday', __('患者年龄'))->display(function ($w){
|
|
$grid->column('orderPatient.birthday', __('患者年龄'))->display(function ($w){
|
|
return birthday_to_age($w);
|
|
return birthday_to_age($w);
|
|
});;
|
|
});;
|
|
@@ -76,7 +79,7 @@ class OrderController extends AdminController
|
|
// if(!empty($actions->row->order_status) && $actions->row->order_status < 2){
|
|
// if(!empty($actions->row->order_status) && $actions->row->order_status < 2){
|
|
// $actions->add(new Reserved());
|
|
// $actions->add(new Reserved());
|
|
// }
|
|
// }
|
|
- if(!empty($actions->row->order_status) && $actions->row->order_status<= 3){
|
|
|
|
|
|
+ if(!empty($actions->row->order_status) && ($actions->row->order_status<= 3 || $actions->row->order_status == 7) ){
|
|
$actions->add(new OrderCancel());
|
|
$actions->add(new OrderCancel());
|
|
$actions->add(new Finished());
|
|
$actions->add(new Finished());
|
|
}
|
|
}
|