From 073589d566a907ea82420092c464856a8e38e5e4 Mon Sep 17 00:00:00 2001 From: "HDM58\\hdm58" Date: Wed, 19 Jul 2023 09:53:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=90=88=E5=90=8C=E7=9A=84?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/contract/controller/Index.php | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/app/contract/controller/Index.php b/app/contract/controller/Index.php index 2c3d0ed..ad3612e 100644 --- a/app/contract/controller/Index.php +++ b/app/contract/controller/Index.php @@ -129,19 +129,21 @@ class Index extends BaseController $param['update_time'] = time(); $old = Db::name('Contract')->where(['id' => $param['id']])->find(); $auth = isAuth($this->uid,'contract_admin'); - if($this->uid!=$old['admin_id'] && $auth==0 && $old['check_status'] == 1){ - return to_assign(1, "只有录入人员和合同管理员有权限操作"); + if($old['check_status'] == 0 || $old['check_status'] == 4){ + if($this->uid!=$old['admin_id'] && $auth==0){ + return to_assign(1, "只有录入人员和合同管理员有权限操作"); + } + $res = contractList::strict(false)->field(true)->update($param); + if ($res) { + add_log('edit', $param['id'], $param); + to_log($this->uid,$param,$old); + return to_assign(); + } else { + return to_assign(1, '操作失败'); + } } - if($auth==0 && $old['check_status'] > 1){ - return to_assign(1, "只有合同管理员有权限操作"); - } - $res = contractList::strict(false)->field(true)->update($param); - if ($res) { - add_log('edit', $param['id'], $param); - to_log($this->uid,$param,$old); - return to_assign(); - } else { - return to_assign(1, '操作失败'); + else{ + return to_assign(1, "当前状态不允许编辑"); } } else { try {