diff --git a/Application/Admin/Controller/CompanyRelationController.class.php b/Application/Admin/Controller/CompanyRelationController.class.php index 81c3a25ee..ea53aec9e 100644 --- a/Application/Admin/Controller/CompanyRelationController.class.php +++ b/Application/Admin/Controller/CompanyRelationController.class.php @@ -72,7 +72,7 @@ class CompanyRelationController extends AdminController $where['is_payment'] = $params['is_payment']; } - $this->checkListOrCountAuthRestMap($where);//导出权限 + // $this->checkListOrCountAuthRestMap($where);//导出权限 $dbres = $this->DBModel->where($where)->order("id desc");; if(isset($params['export'])){ $dbres = $dbres->select(); @@ -153,7 +153,7 @@ class CompanyRelationController extends AdminController if(isset($params['status'])){ $where['status'] = $params['status']; } - $this->checkListOrCountAuthRestMap($where);//导出权限 + // $this->checkListOrCountAuthRestMap($where);//导出权限 $dbres = $this->DBlogModel->where($where)->order("FIELD(status,0,1,-1,-2,2),id desc");; if(isset($params['export'])){ $dbres = $dbres->select(); diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 84062767f..d52539bf1 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -727,7 +727,7 @@ class CompanyStatementController extends ThinkController $upwhere = "(first_company_type = 1 AND first_company_id NOT IN ({$up_company_id}) ) OR ( second_company_type = 1 AND second_company_id NOT IN ({$up_company_id}) )"; } $uprelation = M("company_relation","tab_")->field("first_company_id,first_company_type,second_company_id,second_company_type")->where($upwhere)->select(); - + foreach($uprelation as $k=>$v){ if($v['first_company_type'] == 0){ $senddata["up_company_id"][] = $v['second_company_id']; @@ -741,7 +741,7 @@ class CompanyStatementController extends ThinkController $downwhere = "1=1"; }else{ $dowm_company_id =implode(",",$dowm_company_id); - $downwhere = "(first_company_type = 1 AND first_company_id NOT IN ({$dowm_company_id}) ) OR ( second_company_type = 1 AND second_company_id NOT IN ({$dowm_company_id}) )"; + $downwhere = "(first_company_type = 2 AND first_company_id NOT IN ({$dowm_company_id}) ) OR ( second_company_type = 2 AND second_company_id NOT IN ({$dowm_company_id}) )"; } $downrelation = M("company_relation","tab_")->field("first_company_id,first_company_type,second_company_id,second_company_type")->where($downwhere)->select(); diff --git a/Application/Admin/View/CompanyStatement/editPcStatement.html b/Application/Admin/View/CompanyStatement/editPcStatement.html index 9d2f3547f..cc1fad06e 100644 --- a/Application/Admin/View/CompanyStatement/editPcStatement.html +++ b/Application/Admin/View/CompanyStatement/editPcStatement.html @@ -467,7 +467,7 @@ } //数据类 - var DATAOBJ = {$data|json_encode=###,JSON_UNESCAPED_UNICODE}; + var DATAOBJ = {$data|json_encode=###,JSON_UNESCAPED_UNICODE}; var YDATAOBJ = {$data|json_encode=###,JSON_UNESCAPED_UNICODE}; //事件类 var EVENT = { @@ -548,8 +548,15 @@ var td = DATAOBJ.statement_info[index]; var rname = $(this).attr("name"); + var ratio = 0; if( rname == "increment_ratio" || rname == "ratio"){ - var ratio = val; + ratio = val; + }else{ + if(DATAOBJ.withdraw_type==2){ + ratio = td['increment_ratio']; + }else{ + ratio = td['ratio']; + } } DATAOBJ.statement_money = PUBLIC.floatCut(DATAOBJ.statement_money,td['sum_money']); td['sum_money'] = Math.round(td['pay_amount']*ratio*(100-td['fax_ratio'])/100,2)/100; diff --git a/Application/Admin/View/CompanyStatement/editPuStatement.html b/Application/Admin/View/CompanyStatement/editPuStatement.html index 604ff0caa..9e99cba80 100644 --- a/Application/Admin/View/CompanyStatement/editPuStatement.html +++ b/Application/Admin/View/CompanyStatement/editPuStatement.html @@ -372,8 +372,11 @@ var td = DATAOBJ.statement_info[index]; var rname = $(this).attr("name"); + var ratio = 0; if( rname == "increment_ratio" || rname == "ratio"){ - var ratio = val; + ratio = val; + }else{ + ratio = td['ratio']; } DATAOBJ.statement_money = PUBLIC.floatCut(DATAOBJ.statement_money,td['sum_money']); td['sum_money'] = Math.round(td['pay_amount']*ratio)/100 - td['fine'] + (td['reward']-0); diff --git a/Application/Home/Controller/WithdrawController.class.php b/Application/Home/Controller/WithdrawController.class.php index 0558c03c7..1c78b1a17 100644 --- a/Application/Home/Controller/WithdrawController.class.php +++ b/Application/Home/Controller/WithdrawController.class.php @@ -153,27 +153,20 @@ class WithdrawController extends BaseController * 整合数据,全部成功则支付成功,否则为支付中 */ public function poolCount($poolid){ - $pool_id = $poolid; - $CompanyInfo = M("company_statement_info","tab_"); - if(count($pool_id) > 0){ - foreach($pool_id as $k=>$v){ - $f = $CompanyInfo->where("pool_id = {$v} AND pay_status <> 1")->find(); - if(empty($f)){ - //全部完成 - $this->setOneVerifyStatus(4,"payment",$v); - }else{ - //打款中 - $this->setOneVerifyStatus(3,"payment",$v); - } - } + $f = M("company_statement_info","tab_")->where("pool_id = {$poolid} AND pay_status <> 1")->find(); + if(empty($f)){ + //全部完成 + $this->setOneVerifyStatus(4,"payment",$poolid); + }else{ + //打款中 + $this->setOneVerifyStatus(3,"payment",$poolid); } } - protected function setOneVerifyStatus($change_status,$op_pre,$id) { $dbres = M("company_statement_pool","tab_")->field("id,verify_status,verify_log")->where("id = {$id}")->find(); $dbres['verify_log'] = json_decode($dbres['verify_log'],true); - $dbres['verify_log'][$op_pre.'_user']=$this->admininfo["mobile"]; + $dbres['verify_log'][$op_pre.'_user']=$_SESSION['onethink_home']['promote_auth']['account']; $dbres['verify_log'][$op_pre.'_time']=date("Y-m-d H:i:s"); $dbres['verify_log'] = json_encode($dbres['verify_log']); $dbres['verify_status']=$change_status;