Merge pull request 'feature/finance_payment_20210115' (#199) from feature/finance_payment_20210115 into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/199
master
廖金灵 4 years ago
commit 57bf0929b3

@ -930,6 +930,26 @@ class CompanyStatementController extends ThinkController
public function adminRefuse(){ public function adminRefuse(){
$this->setVerifyStatus(0,-1,"admin"); $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(){ public function launch(){
if(!isset($_REQUEST['ids'])) $this->error("参数错误"); if(!isset($_REQUEST['ids'])) $this->error("参数错误");
@ -2415,6 +2435,7 @@ class CompanyStatementController extends ThinkController
$mentBtn = [ $mentBtn = [
"adminAgree"=>"<a class='butn' id='adminAgree'>管理员审核通过</a>", "adminAgree"=>"<a class='butn' id='adminAgree'>管理员审核通过</a>",
"adminRefuse"=>"<a class='butn' id='adminRefuse' style='background-color: red;'>管理员审核拒绝</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>", "pool"=>"<a class='butn' id='pool'>发起汇总</a>",
"updateStatement"=>"<a class='butn' id='updateStatement' style='background-color: green;'>重算金额</a>", "updateStatement"=>"<a class='butn' id='updateStatement' style='background-color: green;'>重算金额</a>",
"export"=>"<a class='butn' id='export'>批量导出</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"); var id = $(this).attr("id");
if(id == "adminAgree"){ if(id == "adminAgree"){
var opname = "管理员审批通过"; var opname = "管理员审批通过";
@ -480,6 +480,11 @@
var opurl = "{:U('adminRefuse')}"; var opurl = "{:U('adminRefuse')}";
var opst ="[未进行审批]"; var opst ="[未进行审批]";
var status = [0]; var status = [0];
}else if(id=="adminCancel"){
var opname = "管理员审批撤回";
var opurl = "{:U('adminCancel')}";
var opst ="[管理员审批通过,管理员审批拒绝,汇总撤销]";
var status = [1,-1,-2];
}else if(id=="pool"){ }else if(id=="pool"){
var opname = "发起汇总"; var opname = "发起汇总";
var opurl = "{:U('pool_splice')}"; var opurl = "{:U('pool_splice')}";

@ -323,7 +323,7 @@
return; return;
} }
if(text.length < 1){ if(text.length < 1){
layer.msg("<font style='color:white'>" + '请先选择要导出的公司' + "</font>"); layer.msg("<font style='color:white'>" + '请先选择要查看的公司' + "</font>");
return; return;
} }

Loading…
Cancel
Save