Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
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
3bff4201
authored
Mar 02, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复
parent
9a02e09c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
app/Http/Services/SupplierAuditService.php
app/Http/Services/SupplierAuditService.php
View file @
3bff4201
...
@@ -161,6 +161,10 @@ class SupplierAuditService
...
@@ -161,6 +161,10 @@ class SupplierAuditService
*/
*/
public
function
addApprove
(
$supplierId
,
$triggerReason
)
public
function
addApprove
(
$supplierId
,
$triggerReason
)
{
{
if
(
\isAdmin
())
{
return
true
;
}
$canIgnoreAudit
=
(
new
SupplierAuditService
())
->
checkCanIgnoreSupplierAudit
(
$supplierId
);
$canIgnoreAudit
=
(
new
SupplierAuditService
())
->
checkCanIgnoreSupplierAudit
(
$supplierId
);
if
(
$canIgnoreAudit
)
{
if
(
$canIgnoreAudit
)
{
return
true
;
return
true
;
...
@@ -448,6 +452,10 @@ class SupplierAuditService
...
@@ -448,6 +452,10 @@ class SupplierAuditService
//判断是否要进入审核中状态,因为部分字段修改是不需要走审核的,这是更新之前的校验
//判断是否要进入审核中状态,因为部分字段修改是不需要走审核的,这是更新之前的校验
public
function
checkNeedAudit
(
$supplierId
,
$channel
)
public
function
checkNeedAudit
(
$supplierId
,
$channel
)
{
{
// 如果是admin用户,直接跳过审核
if
(
isAdmin
())
{
return
false
;
}
//只要不是已通过状态,修改任何字段都需要审核
//只要不是已通过状态,修改任何字段都需要审核
$model
=
new
SupplierChannelModel
;
$model
=
new
SupplierChannelModel
;
...
@@ -518,6 +526,11 @@ class SupplierAuditService
...
@@ -518,6 +526,11 @@ class SupplierAuditService
//判断是否可以直接忽略修改审核
//判断是否可以直接忽略修改审核
public
function
checkCanIgnoreSupplierAudit
(
$supplierId
)
public
function
checkCanIgnoreSupplierAudit
(
$supplierId
)
{
{
// 如果是admin用户,直接跳过审核
if
(
isAdmin
())
{
return
true
;
}
$needReview
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
value
(
'need_review'
);
$needReview
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
value
(
'need_review'
);
//如果有忽略审核的权限并且不需要复审,那么状态就是不需要审核直接通过
//如果有忽略审核的权限并且不需要复审,那么状态就是不需要审核直接通过
if
(
checkPerm
(
'IgnoreUpdateAudit'
)
&&
!
$needReview
)
{
if
(
checkPerm
(
'IgnoreUpdateAudit'
)
&&
!
$needReview
)
{
...
...
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