This commit is contained in:
xman 2025-05-19 19:09:46 +08:00
parent 8ba818b8f5
commit 416c20735f

View File

@ -135,6 +135,7 @@ class Auditorder extends Backend
} }
$params['audit_admin_id'] = $this->auth->id; $params['audit_admin_id'] = $this->auth->id;
$params['audit_time'] = date('Y-m-d H:i:s');
$result = $row->allowField(true)->save($params); $result = $row->allowField(true)->save($params);
@ -144,6 +145,7 @@ class Auditorder extends Backend
$hookParams['remark'] = $params['audit_remark']; $hookParams['remark'] = $params['audit_remark'];
Hook::listen('order_change',$hookParams); Hook::listen('order_change',$hookParams);
if($params['status'] == Order::STATUS_CHECKONCE){
//未通过审核,通知派单员,重新配置 //未通过审核,通知派单员,重新配置
Message::create([ Message::create([
'to_id' => $row->dispatch_admin_id, 'to_id' => $row->dispatch_admin_id,
@ -151,6 +153,9 @@ class Auditorder extends Backend
'title' => '订单'.$row->order_no.'财务审核未通过,请重新配置', 'title' => '订单'.$row->order_no.'财务审核未通过,请重新配置',
'content' => '订单编号:'.$row->order_no.',审核说明:'.$params['audit_remark'].',审核人:'.$this->auth->nickname 'content' => '订单编号:'.$row->order_no.',审核说明:'.$params['audit_remark'].',审核人:'.$this->auth->nickname
]); ]);
}
Db::commit(); Db::commit();
} catch (ValidateException|PDOException|Exception $e) { } catch (ValidateException|PDOException|Exception $e) {
Db::rollback(); Db::rollback();