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
f589affe
authored
Jun 21, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
过滤不需要记录的日志
parent
f9f6f53b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletions
app/Http/Controllers/SupplierController.php
app/Http/Services/SupplierService.php
resources/views/script/SupplierListScript.blade.php
app/Http/Controllers/SupplierController.php
View file @
f589affe
...
...
@@ -179,6 +179,7 @@ class SupplierController extends Controller
//获取最后一条非分配渠道员的日志
$logModel
=
new
LogModel
();
$auditContent
=
$logModel
->
where
(
'supplier_id'
,
$supplierId
)
->
where
(
'action'
,
'!='
,
'分配渠道开发员'
)
->
where
(
'action'
,
'!='
,
''
)
->
where
(
'type'
,
'!='
,
3
)
->
orderBy
(
'id'
,
'desc'
)
->
first
();
if
(
!
empty
(
$auditContent
))
{
...
...
app/Http/Services/SupplierService.php
View file @
f589affe
...
...
@@ -199,6 +199,18 @@ class SupplierService
$logAction
=
'新增供应商'
;
$logContent
=
'确认新增供应商'
;
}
//过滤掉没有修改的操作,不需要记录日志
if
(
!
empty
(
$oldSupplier
)
&&
!
empty
(
$newSupplier
))
{
$oldSupplier
=
$oldSupplier
->
toArray
();
$newSupplier
=
$newSupplier
->
toArray
();
unset
(
$oldSupplier
[
'update_time'
]);
unset
(
$newSupplier
[
'update_time'
]);
if
(
$oldSupplier
==
$newSupplier
)
{
return
$dataResult
;
}
}
$logService
->
AddLog
(
$this
->
newSupplierId
,
$logType
,
$logAction
,
$logContent
,
json_encode
([
'old_supplier'
=>
$oldSupplier
,
'new_supplier'
=>
$newSupplier
...
...
resources/views/script/SupplierListScript.blade.php
View file @
f589affe
...
...
@@ -218,7 +218,7 @@
let
status
=
data
[
0
].
status
;
let
canAuditAddSupplier
=
{{
checkPerm
(
"AuditAddSupplier"
)?
1
:
0
}};
if
(
canAuditAddSupplier
===
0
&&
status
===
-
1
)
{
layer
.
msg
(
'你没有
审核第一次新增
供应商的权限'
,
{
icon
:
5
})
layer
.
msg
(
'你没有
复审
供应商的权限'
,
{
icon
:
5
})
return
}
if
(
status
!==
1
&&
status
!==
-
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