| xqd
@@ -28,20 +28,17 @@ class VaccineUserController extends AdminController
|
|
|
{
|
|
|
$grid = new Grid(new Order());
|
|
|
$is_amdin = Admin::user()->isRole('administrator');
|
|
|
-
|
|
|
if(!$is_amdin){
|
|
|
$grid->model()->where(['organization_id'=>Admin::user()->org_id,'product_type'=>4]);
|
|
|
}
|
|
|
- $grid->model()->GroupBy('patient_id');
|
|
|
-
|
|
|
-
|
|
|
|
|
|
+ $grid->model()->GroupBy('patient_id');
|
|
|
$grid->column('orderPatient.name', __('姓名'));
|
|
|
$grid->column('orderUser.nickname', __('监护人'));
|
|
|
$grid->column('orderPatient.phone', __('监护人手机号'));
|
|
|
$grid->column('orderPatient.birthday', __('出生日期'));
|
|
|
$grid->column('patient_id', __('备注'))->display(function ($w){
|
|
|
- return PatientRemark::where(['org_id'=>Admin::user()->org_id,'patient_id'=>$w])->value('remark');
|
|
|
+ return PatientRemark::where(['org_id'=>intval(Admin::user()->org_id),'patient_id'=>$w,'type'=>2])->value('remark');
|
|
|
});
|
|
|
|
|
|
$grid->filter(function ($flter){
|
| xqd
@@ -63,23 +60,6 @@ class VaccineUserController extends AdminController
|
|
|
{
|
|
|
$show = new Show(Order::findOrFail($id));
|
|
|
|
|
|
- $show->field('id', __('Id'));
|
|
|
- $show->field('user_id', __('User id'));
|
|
|
- $show->field('docter_id', __('Docter id'));
|
|
|
- $show->field('patient_id', __('Patient id'));
|
|
|
- $show->field('organization_id', __('Organization id'));
|
|
|
- $show->field('order_sn', __('Order sn'));
|
|
|
- $show->field('payment_type', __('Payment type'));
|
|
|
- $show->field('product_type', __('Product type'));
|
|
|
- $show->field('order_status', __('Order status'));
|
|
|
- $show->field('payment_status', __('Payment status'));
|
|
|
- $show->field('total_amount', __('Total amount'));
|
|
|
- $show->field('payment_amount', __('Payment amount'));
|
|
|
- $show->field('discount_amount', __('Discount amount'));
|
|
|
- $show->field('payment_time', __('Payment time'));
|
|
|
- $show->field('created_at', __('Created at'));
|
|
|
- $show->field('updated_at', __('Updated at'));
|
|
|
-
|
|
|
return $show;
|
|
|
}
|
|
|
|
| xqd
@@ -92,20 +72,14 @@ class VaccineUserController extends AdminController
|
|
|
{
|
|
|
$form = new Form(new Order());
|
|
|
|
|
|
- $form->number('user_id', __('User id'));
|
|
|
- $form->number('docter_id', __('Docter id'));
|
|
|
- $form->number('patient_id', __('Patient id'));
|
|
|
- $form->number('organization_id', __('Organization id'));
|
|
|
- $form->text('order_sn', __('Order sn'));
|
|
|
- $form->switch('payment_type', __('Payment type'))->default(1);
|
|
|
- $form->switch('product_type', __('Product type'))->default(1);
|
|
|
- $form->switch('order_status', __('Order status'))->default(1);
|
|
|
- $form->switch('payment_status', __('Payment status'))->default(1);
|
|
|
- $form->number('total_amount', __('Total amount'));
|
|
|
- $form->number('payment_amount', __('Payment amount'));
|
|
|
- $form->number('discount_amount', __('Discount amount'));
|
|
|
- $form->number('payment_time', __('Payment time'));
|
|
|
-
|
|
|
+ $form->setAction('/cdms/api/paitent_remark');
|
|
|
+ $form->hidden('patient_id');
|
|
|
+ $org_id = Admin::user()->org_id;
|
|
|
+ $form->hidden('org_id')->default(intval($org_id));
|
|
|
+ $form->hidden('type')->default(2);
|
|
|
+ $form->textarea('remark','备注')->default(function () use ($org_id,$form){
|
|
|
+ return PatientRemark::where(['org_id'=>intval($org_id),'patient_id'=>$form->model()->patient_id,'type'=>2])->value('remark');
|
|
|
+ });
|
|
|
return $form;
|
|
|
}
|
|
|
}
|