审核流程细节优化,操作日志搜索bug修改

This commit is contained in:
hdm 2022-07-14 17:46:47 +08:00
parent b05f4ed2ba
commit b49e193c6c
6 changed files with 21 additions and 21 deletions

View File

@ -119,7 +119,7 @@ class Index extends BaseController
}
$param['create_time'] = time();
$param['uid'] = $this->uid;
$param['did'] = get_login_admin('did');
$param['did'] = $this->did;
Db::startTrans();
try {
if (empty($param['desc'])) {

View File

@ -341,7 +341,7 @@ class Expense extends BaseController
}
$param['create_time'] = time();
$param['admin_id'] = $admin_id;
$param['did'] = get_login_admin('did');
$param['did'] = $this->did;
Db::startTrans();
try {
if (!isset($param['check_admin_ids'])) {
@ -444,7 +444,7 @@ class Expense extends BaseController
}
View::assign('expense', $expense);
}
$department = get_login_admin('did');
$department = $this->did;
//获取报销审批流程
$flows = get_type_flows(6,$department);
$expense_cate = Db::name('ExpenseCate')->where(['status' => 1])->select()->toArray();
@ -622,7 +622,7 @@ class Expense extends BaseController
//审核通过数据操作
$param['last_admin_id'] = $this->uid;
$param['flow_admin_ids'] = $detail['flow_admin_ids'].$this->uid.',';
$res = Db::name('Expense')->strict(false)->field('check_step_sort,check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
$res = Db::name('Expense')->strict(false)->field('check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
if($res!==false){
$checkData=array(
'action_id' => $detail['id'],
@ -662,7 +662,7 @@ class Expense extends BaseController
$param['last_admin_id'] = $this->uid;
$param['flow_admin_ids'] = $detail['flow_admin_ids'].$this->uid.',';
$param['check_admin_ids'] ='';
$res = Db::name('Expense')->strict(false)->field('check_step_sort,check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
$res = Db::name('Expense')->strict(false)->field('check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
if($res!==false){
$checkData=array(
'action_id' => $detail['id'],
@ -697,7 +697,7 @@ class Expense extends BaseController
$param['check_status'] = 4;
$param['check_admin_ids'] ='';
$param['check_step_sort'] =0;
$res = Db::name('Expense')->strict(false)->field('check_step_sort,check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
$res = Db::name('Expense')->strict(false)->field('check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
if($res!==false){
$checkData=array(
'action_id' => $detail['id'],

View File

@ -378,7 +378,7 @@ class Invoice extends BaseController
}
View::assign('detail', $detail);
}
$department = get_login_admin('did');
$department = $this->did;
//获取发票审批流程
$flows = get_type_flows(7,$department);
View::assign('user', get_admin($this->uid));
@ -430,9 +430,9 @@ class Invoice extends BaseController
if(in_array($this->uid,$check_user_ids)){
$is_check_admin = 1;
//当前审核节点详情
$step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>3,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find();
if($step['flow_type'] == 4){
$check_count = Db::name('FlowRecord')->where(['action_id'=>$detail['id'],'type'=>3,'step_id'=>$step['id'],'check_user_id'=>$this->uid])->count();
//$step = Db::name('FlowStep')->where(['action_id'=>$detail['id'],'type'=>3,'sort'=>$detail['check_step_sort'],'delete_time'=>0])->find();
if($flows['flow_type'] == 4){
$check_count = Db::name('FlowRecord')->where(['action_id'=>$detail['id'],'type'=>3,'step_id'=>$flows['id'],'check_user_id'=>$this->uid])->count();
if($check_count>0){
$is_check_admin = 0;
}
@ -554,7 +554,7 @@ class Invoice extends BaseController
//审核通过数据操作
$param['last_admin_id'] = $this->uid;
$param['flow_admin_ids'] = $detail['flow_admin_ids'].$this->uid.',';
$res = Db::name('Invoice')->strict(false)->field('check_step_sort,check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
$res = Db::name('Invoice')->strict(false)->field('check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
if($res!==false){
$checkData=array(
'action_id' => $detail['id'],
@ -594,7 +594,7 @@ class Invoice extends BaseController
$param['last_admin_id'] = $this->uid;
$param['flow_admin_ids'] = $detail['flow_admin_ids'].$this->uid.',';
$param['check_admin_ids'] ='';
$res = Db::name('Invoice')->strict(false)->field('check_step_sort,check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
$res = Db::name('Invoice')->strict(false)->field('check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
if($res!==false){
$checkData=array(
'action_id' => $detail['id'],
@ -629,7 +629,7 @@ class Invoice extends BaseController
$param['check_status'] = 4;
$param['check_admin_ids'] ='';
$param['check_step_sort'] =0;
$res = Db::name('Invoice')->strict(false)->field('check_step_sort,check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
$res = Db::name('Invoice')->strict(false)->field('check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
if($res!==false){
$checkData=array(
'action_id' => $detail['id'],

View File

@ -294,7 +294,7 @@ const moduleInit = ['tool','formSelects','employeepicker'];
$('#uploadImg' + _id).remove();
})
//选择收件人类型
//选择抬头类型
form.on('radio(type)', function (data) {
if(data.value==2){
$('.invoice-type').hide();

View File

@ -22,10 +22,10 @@ class Log extends BaseController
$param = get_params();
$where = array();
if (!empty($param['keywords'])) {
$where[] = ['name|rule_menu|param_id', 'like', '%' . $param['keywords'] . '%'];
$where[] = ['name|content|param_id', 'like', '%' . $param['keywords'] . '%'];
}
if (!empty($param['action'])) {
$where[] = ['title','=',$param['action']];
$where[] = ['action','=',$param['action']];
}
$rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit'];
$content = DB::name('AdminLog')

View File

@ -266,7 +266,7 @@ class Approve extends BaseController
sendMessage($users,21,$msg);
} else {
$param['create_admin_id'] = $this->uid;
$param['department_id'] = get_login_admin('did');
$param['department_id'] = $this->did;
$param['create_time'] = time();
if (!isset($param['check_admin_ids'])) {
@ -341,7 +341,7 @@ class Approve extends BaseController
}
View::assign('detail', $detail);
}
$department = get_login_admin('did');
$department = $this->did;
//获取审批流程
$flows = get_flows($type,$department);
$moban=Db::name('FlowType')->where('id',$type)->value('name');
@ -528,7 +528,7 @@ class Approve extends BaseController
//审核通过数据操作
$param['last_admin_id'] = $this->uid;
$param['flow_admin_ids'] = $detail['flow_admin_ids'].$this->uid.',';
$res = Db::name('Approve')->strict(false)->field('check_step_sort,check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
$res = Db::name('Approve')->strict(false)->field('check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
if($res!==false){
$checkData=array(
'action_id' => $detail['id'],
@ -569,7 +569,7 @@ class Approve extends BaseController
$param['last_admin_id'] = $this->uid;
$param['flow_admin_ids'] = $detail['flow_admin_ids'].$this->uid.',';
$param['check_admin_ids'] ='';
$res = Db::name('Approve')->strict(false)->field('check_step_sort,check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
$res = Db::name('Approve')->strict(false)->field('check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
if($res!==false){
$checkData=array(
'action_id' => $detail['id'],
@ -603,7 +603,7 @@ class Approve extends BaseController
//撤销审核,数据操作
$param['check_status'] = 4;
$param['check_admin_ids'] ='';
$res = Db::name('Approve')->strict(false)->field('check_step_sort,check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
$res = Db::name('Approve')->strict(false)->field('check_step_sort,check_status,last_admin_id,flow_admin_ids,check_admin_ids')->update($param);
if($res!==false){
$checkData=array(
'action_id' => $detail['id'],