更新开票申请

This commit is contained in:
yaooo 2023-11-03 17:43:28 +08:00
parent 8f8be7f559
commit 653ea397cf
2 changed files with 17 additions and 4 deletions

View File

@ -104,3 +104,16 @@ function isAuthExpense($uid)
$count = Db::name('DataAuth')->where($map)->count(); $count = Db::name('DataAuth')->where($map)->count();
return $count; return $count;
} }
//是否是发票管理员,count>1即有权限
function isAuthInvoice($uid)
{
if($uid == 1){
return 1;
}
$map = [];
$map[] = ['name', '=', 'finance_admin'];
$map[] = ['', 'exp', Db::raw("FIND_IN_SET('{$uid}',conf_1)")];
$count = Db::name('DataAuth')->where($map)->count();
return $count;
}

View File

@ -383,16 +383,16 @@ class FinanceExpense extends ApiController
} }
} }
//获取报销流程 //获取报销流程
public function get_expense_flow() public function get_expense_flow()
{ {
$this->uid = JWT_UID; $this->uid = JWT_UID;
$loginAdmin = Db::name('Admin')->where(['id' => $this->uid])->find(); $loginAdmin = Db::name('Admin')->where(['id' => $this->uid])->find();
$this->did = $loginAdmin['did']; $this->did = $loginAdmin['did'];
$department = $this->did; $department = $this->did;
$flows = get_type_department_flows(6, $department); $flows = get_type_department_flows(6, $department);
$this->apiSuccess('获取成功', $flows); $this->apiSuccess('获取成功', $flows);
} }
//查看 //查看
public function view() public function view()