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();