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
f32612a4
authored
Nov 21, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改添加店铺逻辑
parent
da3620d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
app/Admin/Controllers/PharmacyController.php
+4
-2
No files found.
app/Admin/Controllers/PharmacyController.php
View file @
f32612a4
...
...
@@ -128,7 +128,9 @@ protected function form()
$form
->
timeRange
(
'business_start'
,
'business_end'
,
'营业时间'
)
->
required
();
$form
->
map
(
'lat'
,
'lng'
,
'经纬度坐标'
);
// $form->select('user_id')->options(User::all()->pluck('openid', 'id'))->width(6)->help('实际后台操作可以不用关联');
$form
->
switch
(
'status'
);
if
(
$form
->
isEditing
())
{
$form
->
switch
(
'status'
);
}
$form
->
display
(
'created_at'
);
$form
->
display
(
'updated_at'
);
...
...
@@ -143,7 +145,7 @@ protected function form()
});
$form
->
saving
(
function
(
Form
$form
)
{
$status
=
$form
->
status
;
$pharmacistNum
=
PharmacistModel
::
where
(
'status'
,
1
)
->
count
();
$pharmacistNum
=
PharmacistModel
::
where
(
'status'
,
PharmacyModel
::
STATUS_TRUE
)
->
count
();
if
(
$status
==
1
&&
$pharmacistNum
<=
0
)
{
return
$form
->
response
()
->
error
(
'开启失败,至少添加并且启用一个药师才可以开启药店~'
);
}
...
...
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