更新审核机制
This commit is contained in:
parent
5bf3d2ca1e
commit
c8fb615970
|
@ -184,22 +184,6 @@ class FinanceExpense extends ApiController
|
|||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
if($flow[0]['flow_type'] == 1){
|
||||
//部门负责人
|
||||
$leader = get_department_leader($admin_id);
|
||||
if($leader == 0){
|
||||
$this->apiError('审批流程设置有问题:当前部门负责人还未设置,请联系HR或者管理员');
|
||||
}
|
||||
}
|
||||
else if($flow[0]['flow_type'] == 2){
|
||||
//上级部门负责人
|
||||
$leader = get_department_leader($admin_id,1);
|
||||
if($leader == 0){
|
||||
$this->apiError('审批流程设置有问题:上级部门负责人还未设置,请联系HR或者管理员');
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
$dbRes = false;
|
||||
|
|
|
@ -173,6 +173,7 @@ class FinanceInvoice extends ApiController
|
|||
$this->apiError("银行地址不能为空");
|
||||
}
|
||||
}
|
||||
if (!isset($param['check_admin_ids'])) {
|
||||
foreach($flow as $item) {
|
||||
// 当前部门负责人
|
||||
if ($item['flow_type'] == 1) {
|
||||
|
@ -211,6 +212,7 @@ class FinanceInvoice extends ApiController
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($param['id']) && $param['id'] > 0) {
|
||||
try {
|
||||
validate(InvoiceCheck::class)->scene('edit')->check($param);
|
||||
|
|
|
@ -147,6 +147,7 @@ class OaApprove extends ApiController
|
|||
}
|
||||
$flow_list = Db::name('Flow')->where('id',$param['flow_id'])->value('flow_list');
|
||||
$flow = unserialize($flow_list);
|
||||
if (!isset($param['check_admin_ids'])) {
|
||||
foreach($flow as $item) {
|
||||
// 当前部门负责人
|
||||
if ($item['flow_type'] == 1) {
|
||||
|
@ -185,6 +186,7 @@ class OaApprove extends ApiController
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($param['id']) && $param['id'] > 0) {
|
||||
$param['update_time'] = time();
|
||||
$param['check_status'] = 0;
|
||||
|
|
|
@ -152,7 +152,6 @@ class Expense extends BaseController
|
|||
|
||||
$flow_list = Db::name('Flow')->where('id',$param['flow_id'])->value('flow_list');
|
||||
$flow = unserialize($flow_list);
|
||||
halt($flow);
|
||||
if (!isset($param['check_admin_ids'])) {
|
||||
foreach($flow as $item) {
|
||||
// 当前部门负责人
|
||||
|
@ -192,22 +191,6 @@ class Expense extends BaseController
|
|||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
if($flow[0]['flow_type'] == 1){
|
||||
//部门负责人
|
||||
$leader = get_department_leader($admin_id);
|
||||
if($leader == 0){
|
||||
return to_assign(1,'审批流程设置有问题:当前部门负责人还未设置,请联系HR或者管理员');
|
||||
}
|
||||
}
|
||||
else if($flow[0]['flow_type'] == 2){
|
||||
//上级部门负责人
|
||||
$leader = get_department_leader($admin_id,1);
|
||||
if($leader == 0){
|
||||
return to_assign(1,'审批流程设置有问题:上级部门负责人还未设置,请联系HR或者管理员');
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
$dbRes = false;
|
||||
|
|
|
@ -152,6 +152,7 @@ class Invoice extends BaseController
|
|||
return to_assign(1, '银行地址不能为空');
|
||||
}
|
||||
}
|
||||
if (!isset($param['check_admin_ids'])) {
|
||||
foreach($flow as $item) {
|
||||
// 当前部门负责人
|
||||
if ($item['flow_type'] == 1) {
|
||||
|
@ -190,6 +191,7 @@ class Invoice extends BaseController
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($param['id']) && $param['id'] > 0) {
|
||||
try {
|
||||
validate(InvoiceCheck::class)->scene('edit')->check($param);
|
||||
|
|
|
@ -253,7 +253,7 @@ class Approve extends BaseController
|
|||
}
|
||||
$flow_list = Db::name('Flow')->where('id',$param['flow_id'])->value('flow_list');
|
||||
$flow = unserialize($flow_list);
|
||||
|
||||
if (!isset($param['check_admin_ids'])) {
|
||||
foreach($flow as $item) {
|
||||
// 当前部门负责人
|
||||
if ($item['flow_type'] == 1) {
|
||||
|
@ -292,6 +292,7 @@ class Approve extends BaseController
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($param['id'] > 0) {
|
||||
$param['update_time'] = time();
|
||||
$param['check_status'] = 0;
|
||||
|
|
Loading…
Reference in New Issue