撤回权限bug修改

This commit is contained in:
hdm 2022-07-20 15:04:03 +08:00
parent 9ec27cbae8
commit aa451885a1
3 changed files with 24 additions and 12 deletions

View File

@ -541,14 +541,14 @@ class Expense extends BaseController
{
$param = get_params();
$detail = Db::name('Expense')->where(['id' => $param['id']])->find();
$check_admin_ids = explode(",", strval($detail['check_admin_ids']));
if (!in_array($this->uid, $check_admin_ids)){
return to_assign(1,'您没权限审核该审批');
}
//当前审核节点详情
$step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>2,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find();
//审核通过
if($param['status'] == 1){
$check_admin_ids = explode(",", strval($detail['check_admin_ids']));
if (!in_array($this->uid, $check_admin_ids)){
return to_assign(1,'您没权限审核该审批');
}
//多人会签审批
if($step['flow_type'] == 4){
//查询当前会签记录数
@ -657,6 +657,10 @@ class Expense extends BaseController
}
}
else if($param['status'] == 2){
$check_admin_ids = explode(",", strval($detail['check_admin_ids']));
if (!in_array($this->uid, $check_admin_ids)){
return to_assign(1,'您没权限审核该审批');
}
//拒绝审核,数据操作
$param['check_status'] = 3;
$param['last_admin_id'] = $this->uid;

View File

@ -473,14 +473,14 @@ class Invoice extends BaseController
{
$param = get_params();
$detail = Db::name('Invoice')->where(['id' => $param['id']])->find();
$check_admin_ids = explode(",", strval($detail['check_admin_ids']));
if (!in_array($this->uid, $check_admin_ids)){
return to_assign(1,'您没权限审核该审批');
}
//当前审核节点详情
$step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>3,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find();
//审核通过
if($param['status'] == 1){
$check_admin_ids = explode(",", strval($detail['check_admin_ids']));
if (!in_array($this->uid, $check_admin_ids)){
return to_assign(1,'您没权限审核该审批');
}
//多人会签审批
if($step['flow_type'] == 4){
//查询当前会签记录数
@ -589,6 +589,10 @@ class Invoice extends BaseController
}
}
else if($param['status'] == 2){
$check_admin_ids = explode(",", strval($detail['check_admin_ids']));
if (!in_array($this->uid, $check_admin_ids)){
return to_assign(1,'您没权限审核该审批');
}
//拒绝审核,数据操作
$param['check_status'] = 3;
$param['last_admin_id'] = $this->uid;

View File

@ -446,14 +446,14 @@ class Approve extends BaseController
{
$param = get_params();
$detail = Db::name('Approve')->where('id',$param['id'])->find();
$check_admin_ids = explode(",", strval($detail['check_admin_ids']));
if (!in_array($this->uid, $check_admin_ids)){
return to_assign(1,'您没权限审核该审批');
}
//当前审核节点详情
$step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>1,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find();
//审核通过
if($param['status'] == 1){
$check_admin_ids = explode(",", strval($detail['check_admin_ids']));
if (!in_array($this->uid, $check_admin_ids)){
return to_assign(1,'您没权限审核该审批');
}
//多人会签审批
if($step['flow_type'] == 4){
//查询当前会签记录数
@ -564,6 +564,10 @@ class Approve extends BaseController
}
}
else if($param['status'] == 2){
$check_admin_ids = explode(",", strval($detail['check_admin_ids']));
if (!in_array($this->uid, $check_admin_ids)){
return to_assign(1,'您没权限审核该审批');
}
//拒绝审核,数据操作
$param['check_status'] = 3;
$param['last_admin_id'] = $this->uid;