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
7c037059
authored
Nov 24, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
进入审核中判断条件新增
parent
f99e3ecf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
20 deletions
app/Http/Controllers/Api/SupplierAttachmentApiController.php
app/Http/Services/SupplierAuditService.php
app/Http/Controllers/Api/SupplierAttachmentApiController.php
View file @
7c037059
...
...
@@ -74,24 +74,6 @@ class SupplierAttachmentApiController extends Controller
}
}
//判断是否要进入审核中状态,因为部分字段修改是不需要走审核的
private
function
checkNeedAudit
(
$oldAttachment
,
$newAttachment
)
{
$notNeedAuditField
=
[
'remark'
,
];
$diff
=
array_diff
(
$oldAttachment
,
$newAttachment
);
unset
(
$diff
[
'update_time'
]);
$changeField
=
array_keys
(
$diff
);
foreach
(
$changeField
as
$filed
)
{
//只要有一个不存在于不需要审核的字段,就返回需要审核
if
(
!
in_array
(
$filed
,
$notNeedAuditField
))
{
return
true
;
}
}
return
false
;
}
//删除
public
function
DeleteSupplierAttachment
(
$request
)
{
...
...
app/Http/Services/SupplierAuditService.php
View file @
7c037059
...
...
@@ -448,6 +448,14 @@ class SupplierAuditService
//判断是否要进入审核中状态,因为部分字段修改是不需要走审核的,这是更新之前的校验
public
function
checkNeedAudit
(
$supplierId
,
$channel
)
{
//只要不是已通过状态,修改任何字段都需要审核
$model
=
new
SupplierChannelModel
;
$status
=
$model
->
where
(
'supplier_id'
,
$supplierId
)
->
value
(
'status'
);
if
(
$status
!=
SupplierChannelModel
::
STATUS_PASSED
)
{
return
true
;
}
$notNeedAuditField
=
[
'register_company_name'
,
'supplier_name_en'
,
...
...
@@ -458,8 +466,6 @@ class SupplierAuditService
'system_tags'
,
'customer_tags'
,
'sku_tag'
,
'sku_tag'
,
'sku_tag'
,
'sku_upload_ruler'
,
'sku_audit_ruler'
,
'stockup_type'
...
...
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