完成客户详情
parent
e8379b17fd
commit
1f9ff9ef5d
|
|
@ -68,6 +68,7 @@ class OldmenController extends AdminController
|
||||||
amisMake()->Operation()->label(__('admin.actions'))->buttons([
|
amisMake()->Operation()->label(__('admin.actions'))->buttons([
|
||||||
amisMake()->LinkAction()->label('入住')->icon('fa fa-plus')->link('live-in-do?oldman_id=${id}')->level('link')->hiddenOn('this.live_in == 1'),
|
amisMake()->LinkAction()->label('入住')->icon('fa fa-plus')->link('live-in-do?oldman_id=${id}')->level('link')->hiddenOn('this.live_in == 1'),
|
||||||
amisMake()->LinkAction()->label('续住')->icon('fa fa-plus')->link('live-continue-do?oldman_id=${id}')->level('link')->hiddenOn('this.live_in == 0'),
|
amisMake()->LinkAction()->label('续住')->icon('fa fa-plus')->link('live-continue-do?oldman_id=${id}')->level('link')->hiddenOn('this.live_in == 0'),
|
||||||
|
$this->showOldman(),
|
||||||
$this->rowEditButton(true, 'lg'),
|
$this->rowEditButton(true, 'lg'),
|
||||||
$this->rowDeleteButton()
|
$this->rowDeleteButton()
|
||||||
]),
|
]),
|
||||||
|
|
@ -76,6 +77,94 @@ class OldmenController extends AdminController
|
||||||
return $this->baseList($crud);
|
return $this->baseList($crud);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function showOldman(){
|
||||||
|
return amisMake()->DialogAction()->icon('fa-regular fa-eye')->label('查看')->level('link')->dialog(
|
||||||
|
amisMake()->Dialog()->title('查看详情')->body([
|
||||||
|
amisMake()->Grid()->columns([
|
||||||
|
//信息详情
|
||||||
|
amisMake()->Wrapper()->sm(6)->body([
|
||||||
|
amisMake()->Panel()->title('客人信息')
|
||||||
|
->subFormMode('horizontal')
|
||||||
|
->labelWidth(100)
|
||||||
|
->body([
|
||||||
|
amisMake()->form()->title('')->panelClassName('border-0')->mode('horizontal')
|
||||||
|
->static(true)->actions([])
|
||||||
|
->body([
|
||||||
|
amisMake()->FieldSetControl()->title('居住人信息')->collapsable(true)->body([
|
||||||
|
amisMake()->GroupControl()->body([
|
||||||
|
amisMake()->TextControl('name', '名称'),
|
||||||
|
amisMake()->RadiosControl('sex', '性别')->options([
|
||||||
|
1=>'男',2=>'女'
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
amisMake()->GroupControl()->body([
|
||||||
|
amisMake()->TextControl('card_no', '身份证号码'),
|
||||||
|
amisMake()->DateControl('birthday', '出生日期')->format('YYYY-MM-DD'),
|
||||||
|
]),
|
||||||
|
amisMake()->GroupControl()->body([
|
||||||
|
amisMake()->TextControl('card_complete_address', '详细地址'),
|
||||||
|
amisMake()->TextControl('age', '年龄'),
|
||||||
|
]),
|
||||||
|
amisMake()->GroupControl()->body([
|
||||||
|
amisMake()->TextControl('floor_name', '楼栋'),
|
||||||
|
amisMake()->TextControl('agreement_no', '协议号码'),
|
||||||
|
]),
|
||||||
|
amisMake()->GroupControl()->body([
|
||||||
|
amisMake()->RadiosControl('nurse_lv', '护理等级')->options(Keyword::getByParentKey('nurse_lv')->pluck('name', 'value')),
|
||||||
|
amis('static-mapping')->name('live_in')->label('状态')->map([
|
||||||
|
"0"=>"<span class='label label-info'>未入住</span>",
|
||||||
|
"1"=>"<span class='label label-success'>已入住</span>",
|
||||||
|
"*"=> '其他:${live_in}'
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
amisMake()->GroupControl()->body([
|
||||||
|
amisMake()->DateControl('live_in_at', '开始时间')->format('YYYY-MM-DD'),
|
||||||
|
amisMake()->DateControl('avliable_at', '截至时间')->format('YYYY-MM-DD'),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
amisMake()->FieldSetControl()->title('委托人信息')->className('mt-10')->collapsable(true)->body([
|
||||||
|
amisMake()->GroupControl()->body([
|
||||||
|
amisMake()->TextControl('client_name', '名称'),
|
||||||
|
amisMake()->TextControl('client_phone', '手机号'),
|
||||||
|
]),
|
||||||
|
amisMake()->GroupControl()->body([
|
||||||
|
amisMake()->TextControl('client_complete_address', '详细地址'),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
//入住缴费情况
|
||||||
|
amisMake()->Wrapper()->sm(6)->body([
|
||||||
|
amisMake()->Panel()->title('缴费记录')
|
||||||
|
->body([
|
||||||
|
amisMake()->CRUDTable()->affixHeader(false)
|
||||||
|
->title('')
|
||||||
|
->api(admin_url('consts').'?_action=getData&oldman_id=${id}')
|
||||||
|
->columns([
|
||||||
|
amisMake()->TableColumn('sn', '单据编号')->copyable(true),
|
||||||
|
amisMake()->TableColumn('const_type', '缴费类型')->type('mapping')->map(ConstFlow::typeMapLabel())->className('text-primary'),
|
||||||
|
amisMake()->TableColumn('start_at', '开始时间')->type('datetime'),
|
||||||
|
amisMake()->TableColumn('end_at', '截至时间')->type('datetime'),
|
||||||
|
amisMake()->TableColumn('money', '金额'),
|
||||||
|
amisMake()->TableColumn('created_at', '办理时间')->type('datetime'),
|
||||||
|
amisMake()->Operation()->label(__('admin.actions'))->buttons([
|
||||||
|
amisMake()->DialogAction()->icon('fa-regular fa-eye')->label('费用清单')->level('link')->dialog(
|
||||||
|
amisMake()->Dialog()->title('查看详情')->body([
|
||||||
|
\amisMake()->Service()->schemaApi(admin_url('flow-list-tabs?id=${id}'))
|
||||||
|
])->size('lg')->actions([])
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
])
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
])->size('xl')->actions([])
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function form(): Form
|
public function form(): Form
|
||||||
{
|
{
|
||||||
return $this->baseForm()->body([
|
return $this->baseForm()->body([
|
||||||
|
|
@ -114,14 +203,6 @@ class OldmenController extends AdminController
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function detail(): Form
|
|
||||||
{
|
|
||||||
return $this->baseDetail()->body([
|
|
||||||
TextControl::make()->static()->name('id')->label('ID'),
|
|
||||||
TextControl::make()->static()->name('created_at')->label(__('admin.created_at')),
|
|
||||||
TextControl::make()->static()->name('updated_at')->label(__('admin.updated_at'))
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取编辑页面
|
* 获取编辑页面
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
use Slowlyo\OwlAdmin\Admin;
|
use Slowlyo\OwlAdmin\Admin;
|
||||||
|
|
||||||
|
Admin::styles([
|
||||||
|
'.cxd-Panel-heading { border-width: 0; background: #4080ffc7 !important; }',
|
||||||
|
// '.cxd-Panel {box-shadow: none; }',
|
||||||
|
'.cxd-Panel-title { color:white;font-size: 16px; }'
|
||||||
|
]);
|
||||||
Loading…
Reference in New Issue