From 921491df945ecf2b9885a572e58acb9da1157304 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Sat, 4 Nov 2023 11:35:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=B0=E8=B4=A6=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/common.php | 13 +++++++++++++ app/finance/controller/Income.php | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/api/common.php b/app/api/common.php index dede962..25ec19f 100644 --- a/app/api/common.php +++ b/app/api/common.php @@ -117,3 +117,16 @@ function isAuthInvoice($uid) $count = Db::name('DataAuth')->where($map)->count(); return $count; } + +//是否是到账管理员,count>1即有权限 +function isAuthIncome($uid) +{ + if($uid == 1){ + return 1; + } + $map = []; + $map[] = ['name', '=', 'finance_admin']; + $map[] = ['', 'exp', Db::raw("FIND_IN_SET('{$uid}',conf_2)")]; + $count = Db::name('DataAuth')->where($map)->count(); + return $count; +} \ No newline at end of file diff --git a/app/finance/controller/Income.php b/app/finance/controller/Income.php index 2767b4e..e3c075a 100644 --- a/app/finance/controller/Income.php +++ b/app/finance/controller/Income.php @@ -46,7 +46,7 @@ class Income extends BaseController } } - //查看 + //新增 public function add() { $param = get_params();