Commit f589affe by mushishixian

过滤不需要记录的日志

parent f9f6f53b
......@@ -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)) {
......
......@@ -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
......
......@@ -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) {
......
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