|
|
|
@ -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");
|
|
|
|
|