优化汇总审核流程

master
chenzhi 4 years ago
parent d7eb2b75a2
commit bd125be3dd

@ -27,8 +27,8 @@ class CompanyStatementPoolController extends ThinkController
"-2"=>"拒绝打款",
"-1"=>"审批拒绝",
"0"=>"未审批",
"1"=>"审批通过",
"2"=>"待打款",
"1"=>"打款信息确认",
"2"=>"审批通过",
"3"=>"打款中",
"4"=>"打款成功",
"5"=>"无需打款"
@ -152,8 +152,10 @@ class CompanyStatementPoolController extends ThinkController
if(isset($v['verify_log']['payment_user'])){
if($v['verify_status'] == -2){
$ts = "拒绝打款";
}elseif($v['verify_status'] == 1){
$ts = "打款信息确认";
}elseif($v['verify_status'] == 2){
$ts = "待打款";
$ts = "打款信息确认";
}elseif($v['verify_status'] == 3){
$ts = "打款中";
}elseif($v['verify_status'] == 4){
@ -901,10 +903,10 @@ class CompanyStatementPoolController extends ThinkController
//审批通过
public function verifyAgree(){
$this->setVerifyStatus(0,1,"verify");
$this->setVerifyStatus([0,1],2,"verify");
}
public function verifyRefuse(){
$this->setVerifyStatus(0,-1,"verify");
$this->setVerifyStatus([0,1],-1,"verify");
}
//审批撤回
public function verifyReturn() {
@ -913,12 +915,14 @@ class CompanyStatementPoolController extends ThinkController
$dbres = $this->DBModel->field("id,verify_status,verify_log")->where("id in ({$ids})")->select();
foreach($dbres as $k=>&$v){
if($v['verify_status'] != -1&&$v['verify_status'] != 1) continue;
$VerifyStatus = $v['verify_status'];
if(!in_array($VerifyStatus,[-1,1,2])) continue;
$v['verify_log'] = json_decode($v['verify_log'],true);
unset($v['verify_log']['verify_user']);
unset($v['verify_log']['verify_time']);
if(isset($v['verify_log']['payment_user'])) unset($v['verify_log']['payment_user']);
if(isset($v['verify_log']['payment_time'])) unset($v['verify_log']['payment_time']);
$v['verify_log'] = json_encode($v['verify_log']);
$v['verify_status']=0;
$this->DBModel->save($v);
@ -954,7 +958,12 @@ class CompanyStatementPoolController extends ThinkController
$ids = $_REQUEST['ids'];
$dbres = $this->DBModel->field("id,verify_status,verify_log")->where("id in ({$ids})")->select();
foreach($dbres as $k=>&$v){
if(is_array($old_status)){
if(!in_array($v['verify_status'],$old_status)) continue;
}else{
if($v['verify_status'] != $old_status) continue;
}
$v['verify_log'] = json_decode($v['verify_log'],true);
$v['verify_log'][$op_pre.'_user']=$this->admininfo["username"];
$v['verify_log'][$op_pre.'_time']=date("Y.m.d H:i:s");
@ -1043,8 +1052,12 @@ class CompanyStatementPoolController extends ThinkController
}
$CompanyInfo->save($savedata);
}
$this->ajaxReturn(array(
'status' => 1,
"info"=>"打款信息编辑成功"
));
//修改状态
$this->setOneVerifyStatus(2,"payment",$_REQUEST['pool_id'],$mgs = "打款信息确认");
// $this->setOneVerifyStatus(2,"payment",$_REQUEST['pool_id'],$mgs = "打款信息确认");
}
//查看打款信息
public function viewPayment(){
@ -1446,16 +1459,16 @@ class CompanyStatementPoolController extends ThinkController
case '-2':
case '-1':
case '0':
$optist = ["viewPool","reCount","cancelPool"];
$optist = ["viewPool","reCount","cancelPool","setPayment"];
break;
case '1':
$optist = ["viewPool","addRemark","viewRemark","editRemark","viewVoucher","editVoucher","uploadVoucher","setPayment","setUlPayment"];
$optist = ["viewPool","addRemark","viewRemark","editRemark","viewVoucher","editVoucher","uploadVoucher","editPayment","setUlPayment"];
break;
case '2':
$optist = ["viewPool","addRemark","viewRemark","editRemark","viewVoucher","editVoucher","uploadVoucher","editPayment"];
$optist = ["viewPool","addRemark","viewRemark","editRemark","viewVoucher","editVoucher","uploadVoucher"];
break;
case '3':
$optist = ["viewPool","addRemark","viewRemark","editRemark","viewVoucher","editVoucher","uploadVoucher","editPayment","viewPayment"];
$optist = ["viewPool","addRemark","viewRemark","editRemark","viewVoucher","editVoucher","uploadVoucher","viewPayment"];
break;
case '4':
$optist = ["viewPool","addRemark","viewRemark","editRemark","viewVoucher","editVoucher","uploadVoucher","viewPayment"];

@ -314,12 +314,12 @@
var opname = "审批通过";
var opurl = "{:U('verifyAgree')}";
var opst ="[未进行审批]";
var status = [0];
var status = [0,1];
}else if(id=="verifyRefuse"){
var opname = "审批拒绝";
var opurl = "{:U('verifyRefuse')}";
var opst ="[未进行审批]";
var status = [0];
var status = [0,1];
}
var confirm = confirm ? confirm :false;
@ -392,7 +392,7 @@
var status = false;
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
console.log($(elem).data("status"))
if($(elem).data("status") == 1 || $(elem).data("status") == -1){
if($(elem).data("status") == 1 || $(elem).data("status") == -1 || $(elem).data("status") == 2){
return $(elem).val();
} else {
status = true;

Loading…
Cancel
Save