From 7b60d5afdc4436e717747c1222668a640fde754c Mon Sep 17 00:00:00 2001 From: hdm Date: Wed, 31 Aug 2022 15:02:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=89=B9=E5=8F=91=E9=80=81=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E7=9A=84=E6=A0=87=E9=A2=98=E9=94=99=E8=AF=AF=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Index.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/api/controller/Index.php b/app/api/controller/Index.php index f36f935..48ca787 100644 --- a/app/api/controller/Index.php +++ b/app/api/controller/Index.php @@ -306,21 +306,25 @@ class Index extends BaseController //日常审核 $detail = Db::name('Approve')->where(['id' => $id])->find(); $subject = '一个日常审批'; + $msg_title_type = $detail['type']; } else if($type==2){ //报销审核 $detail = Db::name('Expense')->where(['id' => $id])->find(); $subject = '一个报销审批'; + $msg_title_type = 22; } else if($type==3){ //发票审核 $detail = Db::name('Invoice')->where(['id' => $id])->find(); $subject = '一个发票审批'; + $msg_title_type = 23; } else if($type==4){ //合同审核 $detail = Db::name('Contract')->where(['id' => $id])->find(); $subject = '一个合同审批'; + $msg_title_type = 24; } if (empty($detail)){ return to_assign(1,'审批数据错误'); @@ -446,7 +450,7 @@ class Index extends BaseController $msg=[ 'create_time'=>date('Y-m-d H:i:s',$detail['create_time']), 'action_id'=>$id, - 'title' => Db::name('FlowType')->where('id',$checkData['type'])->value('title'), + 'title' => Db::name('FlowType')->where('id',$msg_title_type)->value('title'), 'from_uid'=>$detail['admin_id'] ]; if($param['check_status'] == 1){ @@ -522,7 +526,7 @@ class Index extends BaseController $msg=[ 'create_time'=>date('Y-m-d H:i:s',$detail['create_time']), 'action_id'=>$detail['id'], - 'title' => Db::name('FlowType')->where('id',$checkData['type'])->value('title'), + 'title' => Db::name('FlowType')->where('id',$msg_title_type)->value('title'), 'from_uid'=>$detail['admin_id'] ]; $users = $detail['admin_id'];