Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵增煜
/
tzt-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
62c756e0
authored
Nov 21, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
药店手机验证
parent
fb159970
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
18 deletions
+21
-18
app/Admin/Controllers/PharmacistController.php
+21
-18
No files found.
app/Admin/Controllers/PharmacistController.php
View file @
62c756e0
...
...
@@ -139,25 +139,28 @@ protected function detail($id)
protected
function
form
()
{
return
Form
::
make
(
new
PharmacistRepository
(),
function
(
Form
$form
)
{
$form
->
display
(
'id'
)
->
width
(
4
);
$form
->
text
(
'name'
)
->
width
(
4
)
->
required
()
->
maxLength
(
32
,
'最多输入32个字符'
);
$form
->
text
(
'id_card'
)
->
width
(
4
)
->
required
()
->
maxLength
(
18
,
'最多输入18个字符'
);
$form
->
text
(
'license_number'
)
->
width
(
4
)
->
required
()
->
maxLength
(
32
,
'最多输入32个字符'
);
$form
->
mobile
(
'mobile'
)
->
width
(
4
)
->
required
()
->
rules
(
function
(
Form
$form
)
{
// 如果不是编辑状态,则添加字段唯一验证
if
(
!
$id
=
$form
->
model
()
->
id
)
{
return
'unique:App\Models\PharmacistModel,mobile'
;
}
$form
->
column
(
6
,
function
(
Form
$form
)
{
$form
->
display
(
'id'
);
$form
->
text
(
'name'
)
->
required
()
->
maxLength
(
32
,
'最多输入32个字符'
);
$form
->
mobile
(
'mobile'
)
->
required
()
->
rules
(
function
(
Form
$form
)
{
// 如果不是编辑状态,则添加字段唯一验证
if
(
!
$id
=
$form
->
model
()
->
id
)
{
return
'unique:App\Models\PharmacistModel,mobile'
;
}
});
$form
->
text
(
'id_card'
)
->
required
()
->
maxLength
(
18
,
'最多输入18个字符'
);
$form
->
text
(
'license_number'
)
->
required
()
->
maxLength
(
32
,
'最多输入32个字符'
);
$form
->
date
(
'practicing_license_expired_time'
)
->
required
();
$form
->
select
(
'pharmacy_id'
)
->
options
(
PharmacyModel
::
all
()
->
pluck
(
'name'
,
'id'
))
->
required
();
$form
->
switch
(
'status'
);
$form
->
display
(
'created_at'
);
$form
->
display
(
'updated_at'
);
});
$form
->
column
(
6
,
function
(
Form
$form
)
{
$form
->
image
(
'practicing_license'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
required
();
$form
->
image
(
'physician_license'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
required
();
$form
->
image
(
'signed_pic'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
);
});
$form
->
image
(
'practicing_license'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
width
(
4
)
->
required
();
$form
->
date
(
'practicing_license_expired_time'
)
->
width
(
4
)
->
required
();
$form
->
image
(
'physician_license'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
width
(
4
)
->
required
();
$form
->
image
(
'signed_pic'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
width
(
4
);
$form
->
select
(
'pharmacy_id'
)
->
options
(
PharmacyModel
::
all
()
->
pluck
(
'name'
,
'id'
))
->
width
(
4
)
->
required
();
$form
->
switch
(
'status'
)
->
width
(
4
);
$form
->
display
(
'created_at'
)
->
width
(
4
);
$form
->
display
(
'updated_at'
)
->
width
(
4
);
// 右上角按钮控制
$form
->
disableDeleteButton
();
// 去掉删除按钮
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment