Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
note-library
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7809728b
authored
Aug 24, 2023
by
孙龙
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'feature/sl/20230823-打印客户标签优化' into 'master'
优化 See merge request
!5
parents
b4dd3d93
5883d1d2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
app/Http/Controllers/AjaxController.php
app/Http/Controllers/AjaxController.php
View file @
7809728b
...
...
@@ -217,9 +217,14 @@ Class AjaxController extends Controller
$data
[
'attribute'
]
=
$attribute
;
$id
=
$request
->
input
(
"t_id"
,
0
);
$isAdmin
=
(
new
PermController
)
->
getUserRole
(
$request
);
if
(
intval
(
$id
)
>
0
){
//----------------------------修改模板------------------------------------------------------------------
if
(
$isAdmin
==
1
){
$count
=
TemplateListModel
::
where
(
"id"
,
intval
(
$id
))
->
count
(
"id"
);
}
else
{
$count
=
TemplateListModel
::
where
(
"id"
,
intval
(
$id
))
->
where
(
"create_userid"
,
$request
->
user
->
userId
)
->
count
(
"id"
);
}
if
(
$count
<=
0
){
return
$this
->
ajaxReturn
(
-
1
,
"没找到属于您的模板信息"
);
}
...
...
@@ -229,7 +234,7 @@ Class AjaxController extends Controller
}
if
(
$template_name
!=
$templateInfo
->
template_name
){
$count
=
TemplateListModel
::
where
(
"create_userid"
,
$
request
->
user
->
userId
)
->
where
(
"template_name"
,
$template_name
)
->
count
(
"id"
);
$count
=
TemplateListModel
::
where
(
"create_userid"
,
$
templateInfo
->
create_userid
)
->
where
(
"template_name"
,
$template_name
)
->
count
(
"id"
);
if
(
$count
>
0
){
return
$this
->
ajaxReturn
(
-
1
,
"模板名称已经存在,请修改模板名称再提交!"
);
}
...
...
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