Commit 3bff4201 by 杨树贤

修复

parent 9a02e09c
Showing with 13 additions and 0 deletions
...@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment