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
40a2d47b
authored
Apr 27, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
06419166
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
24 deletions
app/Http/Services/LogService.php
app/Http/Services/SupplierContactService.php
app/Http/Services/SupplierService.php
app/Http/Services/SupplierSkuAuditRulerService.php
resources/views/web/AuditSupplier.blade.php
app/Http/Services/LogService.php
View file @
40a2d47b
...
...
@@ -120,13 +120,15 @@ class LogService
$result
[]
=
$content
;
}
if
(
$key
==
'extra_fee'
)
{
$oldFee
=
json_decode
(
$oldSupplier
[
'extra_fee'
],
true
);
$newFee
=
json_decode
(
$newSupplier
[
'extra_fee'
],
true
);
$content
=
"采购附加费由 [商品总价不满"
.
$oldFee
[
'cn'
][
'max'
]
.
"元,收取"
.
$oldFee
[
'cn'
][
'price'
]
.
"元;商品总价不满"
.
$oldFee
[
'cn'
][
'max'
]
.
"美金,收取"
.
$oldFee
[
'cn'
][
'price'
]
.
"元;] 修改为 [商品总价不满"
.
$newFee
[
'hk'
][
'max'
]
.
"元,收取"
.
$newFee
[
'hk'
][
'price'
]
.
"元;商品总价不满"
.
$newFee
[
'hk'
][
'max'
]
.
"美金,收取"
.
$newFee
[
'hk'
][
'price'
]
.
"元;]"
;
$result
[]
=
$content
;
if
(
!
empty
(
$oldSupplier
[
'extra_fee'
]))
{
$oldFee
=
json_decode
(
$oldSupplier
[
'extra_fee'
],
true
);
$newFee
=
json_decode
(
$newSupplier
[
'extra_fee'
],
true
);
$content
=
"采购附加费由 [商品总价不满"
.
$oldFee
[
'cn'
][
'max'
]
.
"元,收取"
.
$oldFee
[
'cn'
][
'price'
]
.
"元;商品总价不满"
.
$oldFee
[
'cn'
][
'max'
]
.
"美金,收取"
.
$oldFee
[
'cn'
][
'price'
]
.
"元;] 修改为 [商品总价不满"
.
$newFee
[
'hk'
][
'max'
]
.
"元,收取"
.
$newFee
[
'hk'
][
'price'
]
.
"元;商品总价不满"
.
$newFee
[
'hk'
][
'max'
]
.
"美金,收取"
.
$newFee
[
'hk'
][
'price'
]
.
"元;]"
;
$result
[]
=
$content
;
}
}
}
$result
=
array_unique
(
$result
);
...
...
app/Http/Services/SupplierContactService.php
View file @
40a2d47b
...
...
@@ -75,17 +75,21 @@ class SupplierContactService
if
(
$result
)
{
//修改供应商为审核状态
$supplierModel
=
new
SupplierChannelModel
();
$supplierStatus
=
$supplierModel
->
where
(
'supplier_id'
,
$contact
[
'supplier_id'
])
->
value
(
'status'
);
$supplierModel
->
where
(
'supplier_id'
,
$contact
[
'supplier_id'
])
->
update
([
'update_time'
=>
time
(),
'status'
=>
1
,
]);
$logService
=
new
LogService
();
$content
=
!
empty
(
$contact
[
'contact_id'
])
?
'修改联系人'
:
'添加联系人'
;
$remark
=
json_encode
([
'old_contact'
=>
$oldContact
,
'new_contact'
=>
$newContact
,
]);
$logService
->
AddLog
(
$contact
[
'supplier_id'
],
LogModel
::
UPDATE_OPERATE
,
'修改供应商基本资料'
,
$content
,
$remark
);
//待审核(没有完善过联系人的,不需要记录日志,让其继续保持一条日志,就叫新增供应商)
if
(
$supplierStatus
!=
-
1
)
{
$logService
=
new
LogService
();
$content
=
!
empty
(
$contact
[
'contact_id'
])
?
'修改联系人'
:
'添加联系人'
;
$remark
=
json_encode
([
'old_contact'
=>
$oldContact
,
'new_contact'
=>
$newContact
,
]);
$logService
->
AddLog
(
$contact
[
'supplier_id'
],
LogModel
::
UPDATE_OPERATE
,
'修改供应商基本资料'
,
$content
,
$remark
);
}
}
return
$result
;
...
...
app/Http/Services/SupplierService.php
View file @
40a2d47b
...
...
@@ -87,7 +87,6 @@ class SupplierService
//走事务
$dataResult
=
DB
::
connection
(
'web'
)
->
transaction
(
function
()
use
(
$channel
)
{
$redis
=
new
RedisModel
();
$model
=
new
SupplierChannelModel
();
$extraFax
=
[
'supplier_id'
=>
$channel
[
'supplier_id'
],
...
...
@@ -128,6 +127,7 @@ class SupplierService
$supplierAddressService
->
saveAddress
(
$address
);
$extraFaxService
=
new
SupplierExtraFeeService
();
$extraFaxService
->
saveSupplierExtraFee
(
$extraFax
);
$this
->
saveRatioToRedis
(
$supplierId
);
$this
->
saveSkuAuditRulerToRedis
(
$supplierId
,
$channel
[
'sku_audit_ruler'
]);
$this
->
saveSkuUploadRulerToRedis
(
$supplierId
,
$channel
[
'sku_upload_ruler'
]);
...
...
app/Http/Services/SupplierSkuAuditRulerService.php
View file @
40a2d47b
...
...
@@ -59,7 +59,11 @@ class SupplierSkuAuditRulerService
'3'
=>
1
,
'4'
=>
1
];
if
(
empty
(
$auditData
))
{
$auditRuler
[
'skip'
]
=
0
;
$auditRuler
[
'audit_ruler'
]
=
$defaultRuler
;
return
json_encode
(
$auditRuler
);
}
$rulers
=
[];
foreach
(
$defaultRuler
as
$key
=>
$ruler
)
{
if
(
empty
(
$auditData
[
$key
]))
{
...
...
resources/views/web/AuditSupplier.blade.php
View file @
40a2d47b
...
...
@@ -19,14 +19,16 @@
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
审核内容 :
</label>
<div
class=
"layui-input-block block-42"
style=
"padding-top: 7px"
>
{{$auditContent['action'] .' : '}}
@if(is_array($auditContent['content']))
@foreach($auditContent['content'] as $content)
{{$content}}
@endforeach
@endif
</div>
<div
class=
"layui-input-block block-42"
style=
"padding-top: 7px"
>
{{$auditContent['action'] .' : '}}
@if(is_array($auditContent['content']))
@foreach($auditContent['content'] as $content)
{{$content}}
@endforeach
@else
{{$auditContent['content']}}
@endif
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
审核意见 :
</label>
...
...
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