Merge branch 'feature/finance_statement_three' of wmtx/platform into master

优化允许撤销汇总进行直接汇总
master
万盟天下 4 years ago committed by Gogs
commit 1cf104727d

@ -710,16 +710,17 @@ class CompanyStatementController extends ThinkController
}
foreach ($dbres as $k=>$v) {
if($v['verify_status'] != 1) continue;
if($v['company_belong'] == 9){
//上游
$this->setDf($datas['up'],$v);
} elseif($v['withdraw_type'] == 3&&$v['company_type']==1){
$this->setDf($datas['complement_down'],$v);
} elseif($v['withdraw_type'] == 3&&$v['company_type']==2){
$this->setDf($datas['complement_user'],$v);
} else {
$this->setDf($datas['down'],$v);
if($v['verify_status'] == 1 || $v['verify_status'] == -2){
if($v['company_belong'] == 9){
//上游
$this->setDf($datas['up'],$v);
} elseif($v['withdraw_type'] == 3&&$v['company_type']==1){
$this->setDf($datas['complement_down'],$v);
} elseif($v['withdraw_type'] == 3&&$v['company_type']==2){
$this->setDf($datas['complement_user'],$v);
} else {
$this->setDf($datas['down'],$v);
}
}
}
@ -770,7 +771,7 @@ class CompanyStatementController extends ThinkController
M("company_lack_statement_info","tab_")->where("id in ({$v['del_lack_ids']})")->save(["is_pool"=>1]);
}
//修改结算单规则
$this->updatePoolVerifyStatus($v['statement_ids'],1,2,"pool",$v['statement_num']);
$this->updatePoolVerifyStatus($v['statement_ids'],2,"pool",$v['statement_num']);
}
$this->ajaxReturn(array(
'status' => 1,
@ -778,10 +779,10 @@ class CompanyStatementController extends ThinkController
));
}
//结算单规则
protected function updatePoolVerifyStatus($ids,$old_status,$change_status,$op_pre,$num){
protected function updatePoolVerifyStatus($ids,$change_status,$op_pre,$num){
$dbres = $this->DBModel->field("id,verify_status,verify_log")->where("id in ({$ids})")->select();
foreach($dbres as $k=>&$v){
if($v['verify_status'] != $old_status) continue;
// 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");

@ -475,8 +475,8 @@
}else if(id=="pool"){
var opname = "发起汇总";
var opurl = "{:U('pool')}";
var opst ="[审批通过]";
var status = [1];
var opst ="[审批通过,汇总撤销]";
var status = [1,-2];
}else if(id=="updateStatement"){
var opname = "重算金额";
var opurl = "{:U('updateStatement')}";
@ -510,7 +510,7 @@
return;
}
text = text.join(",");
console.log(text);
if(flag){
layer.confirm(opname+"仅会对"+opst+"的申请进行处理,选择中包含其他的状态的申请将被忽略,点击取消停止操作",{title:false}, function(index){
layer.close(index);

Loading…
Cancel
Save