新增审核撤回

master
chenzhi 4 years ago
parent 88d02f7be1
commit aa99f1f668

@ -930,6 +930,26 @@ class CompanyStatementController extends ThinkController
public function adminRefuse(){
$this->setVerifyStatus(0,-1,"admin");
}
public function adminCancel(){
$canCancel = [1,-1,-2];
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
$ids = $_REQUEST['ids'];
$dbres = $this->DBModel->field("id,verify_status,verify_log")->where("id in ({$ids})")->select();
foreach($dbres as $k=>&$v){
if(!in_array($v['verify_status'],$canCancel)) continue;
$v['verify_log'] = json_decode($v['verify_log'],true);
unset($v['verify_log']['admin_user'],$v['verify_log']['admin_time'],$v['verify_log']['pool_user'],$v['verify_log']['pool_time'],$v['verify_log']['pool_num']);
$v['verify_log'] = json_encode($v['verify_log']);
$v['verify_status'] = 0;
$v['confirm_log'] = '';
$v['confirm_status']=0;
$this->DBModel->save($v);
}
$this->ajaxReturn(array(
'status' => 1,
"info"=>"审核撤回成功"
));
}
public function launch(){
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
@ -2415,6 +2435,7 @@ class CompanyStatementController extends ThinkController
$mentBtn = [
"adminAgree"=>"<a class='butn' id='adminAgree'>管理员审核通过</a>",
"adminRefuse"=>"<a class='butn' id='adminRefuse' style='background-color: red;'>管理员审核拒绝</a>",
"adminCancel"=>"<a class='butn' id='adminCancel'>管理员审核撤回</a>",
"pool"=>"<a class='butn' id='pool'>发起汇总</a>",
"updateStatement"=>"<a class='butn' id='updateStatement' style='background-color: green;'>重算金额</a>",
"export"=>"<a class='butn' id='export'>批量导出</a>",

@ -468,7 +468,7 @@
});
});
$("#adminAgree,#adminRefuse,#verifyAgree,#verifyRefuse,#pool,#updateStatement,#delStatement").on("click",function(){
$("#adminAgree,#adminRefuse,#adminCancel,#verifyAgree,#verifyRefuse,#pool,#updateStatement,#delStatement").on("click",function(){
var id = $(this).attr("id");
if(id == "adminAgree"){
var opname = "管理员审批通过";
@ -480,6 +480,11 @@
var opurl = "{:U('adminRefuse')}";
var opst ="[未进行审批]";
var status = [0];
}else if(id=="adminCancel"){
var opname = "管理员审批撤回";
var opurl = "{:U('adminCancel')}";
var opst ="[管理员审批通过,管理员审批拒绝,汇总撤销]";
var status = [1,-1,-2];
}else if(id=="pool"){
var opname = "发起汇总";
var opurl = "{:U('pool_splice')}";

Loading…
Cancel
Save