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
fb159970
authored
Nov 21, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
药店手机验证
parent
b1a91d40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
22 deletions
+26
-22
app/Admin/Controllers/PharmacyController.php
+26
-22
No files found.
app/Admin/Controllers/PharmacyController.php
View file @
fb159970
...
@@ -114,29 +114,33 @@ protected function detail($id)
...
@@ -114,29 +114,33 @@ protected function detail($id)
protected
function
form
()
protected
function
form
()
{
{
return
Form
::
make
(
new
PharmacyRepository
(),
function
(
Form
$form
)
{
return
Form
::
make
(
new
PharmacyRepository
(),
function
(
Form
$form
)
{
$form
->
display
(
'id'
)
->
width
(
4
);
$form
->
column
(
6
,
function
(
Form
$form
)
{
$form
->
text
(
'name'
)
->
width
(
4
)
->
required
()
->
maxLength
(
64
,
'最多输入64个字符'
);
$form
->
display
(
'id'
);
$form
->
image
(
'business_license'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
width
(
4
)
->
required
();
$form
->
text
(
'name'
)
->
required
()
->
maxLength
(
64
,
'最多输入64个字符'
);
$form
->
image
(
'drug_biz_license'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
width
(
4
)
->
required
();
$form
->
text
(
'area'
)
->
required
()
->
maxLength
(
64
,
'最多输入64个字符'
);
$form
->
image
(
'food_biz_license'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
width
(
4
)
->
required
();
$form
->
text
(
'address'
)
->
required
()
->
maxLength
(
128
,
'最多输入128个字符'
);
$form
->
image
(
'med_device_biz_license'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
width
(
4
)
->
required
();
$form
->
mobile
(
'mobile'
)
->
required
()
->
help
(
'药店登录账号'
)
->
rules
(
function
(
Form
$form
)
{
$form
->
image
(
'drug_info_service_cert'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
width
(
4
)
->
required
();
// 如果不是编辑状态,则添加字段唯一验证
$form
->
image
(
'pre_packaged_food'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
width
(
4
)
->
required
();
if
(
!
$id
=
$form
->
model
()
->
id
)
{
$form
->
text
(
'area'
)
->
width
(
4
)
->
required
()
->
maxLength
(
64
,
'最多输入64个字符'
);
return
'unique:App\Models\PharmacyModel,mobile'
;
$form
->
text
(
'address'
)
->
width
(
4
)
->
required
()
->
maxLength
(
128
,
'最多输入128个字符'
);
}
$form
->
mobile
(
'mobile'
)
->
width
(
4
)
->
required
()
->
help
(
'药店登录账号'
)
->
rules
(
function
(
Form
$form
)
{
});
// 如果不是编辑状态,则添加字段唯一验证
$form
->
timeRange
(
'business_start'
,
'business_end'
,
'营业时间'
)
->
required
();
if
(
!
$id
=
$form
->
model
()
->
id
)
{
$form
->
map
(
'lat'
,
'lng'
,
'经纬度坐标'
);
return
'unique:App\Models\PharmacyModel,mobile'
;
// $form->select('user_id')->options(User::all()->pluck('openid', 'id'))->width(6)->help('实际后台操作可以不用关联');
}
$form
->
switch
(
'status'
);
$form
->
display
(
'created_at'
);
$form
->
display
(
'updated_at'
);
});
$form
->
column
(
6
,
function
(
Form
$form
)
{
$form
->
image
(
'business_license'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
required
();
$form
->
image
(
'drug_biz_license'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
required
();
$form
->
image
(
'food_biz_license'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
required
();
$form
->
image
(
'med_device_biz_license'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
required
();
$form
->
image
(
'drug_info_service_cert'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
required
();
$form
->
image
(
'pre_packaged_food'
)
->
accept
(
'jpg,png,jpeg'
)
->
uniqueName
()
->
autoUpload
()
->
retainable
()
->
removable
(
false
)
->
required
();
});
});
$form
->
timeRange
(
'business_start'
,
'business_end'
,
'营业时间'
)
->
required
();
$form
->
map
(
'lat'
,
'lng'
,
'经纬度坐标'
);
// $form->select('user_id')->options(User::all()->pluck('openid', 'id'))->width(4)->help('实际后台操作可以不用关联');
$form
->
switch
(
'status'
)
->
width
(
4
);
$form
->
display
(
'created_at'
)
->
width
(
4
);
$form
->
display
(
'updated_at'
)
->
width
(
4
);
$form
->
saving
(
function
(
Form
$form
)
{
$form
->
saving
(
function
(
Form
$form
)
{
$status
=
$form
->
status
;
$status
=
$form
->
status
;
$pharmacistNum
=
PharmacistModel
::
where
(
'status'
,
1
)
->
count
();
$pharmacistNum
=
PharmacistModel
::
where
(
'status'
,
1
)
->
count
();
...
...
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