From 4f0bad5c45bd19c5b3341cfe4bcdbb87ed5db36b Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 25 May 2021 10:23:46 +0800 Subject: [PATCH] =?UTF-8?q?5.26=E5=8A=9F=E8=83=BD=E4=B8=8A=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ompanyStatementOfflineController.class.php | 174 +++++++++++--- .../CompanyStatementPoolController.class.php | 36 ++- .../Controller/RefundController.class.php | 116 ++++++++- .../View/CompanyStatementOffline/lists.html | 14 +- .../setPartPayment.html | 39 ++- .../viewstatement.html | 223 ++++++++++++++++++ .../Admin/View/CompanySystemRatio/index.html | 4 +- Application/Admin/View/Refund/userCount.html | 156 +++++++++++- Data/update.sql | 9 +- 9 files changed, 717 insertions(+), 54 deletions(-) create mode 100644 Application/Admin/View/CompanyStatementOffline/viewstatement.html diff --git a/Application/Admin/Controller/CompanyStatementOfflineController.class.php b/Application/Admin/Controller/CompanyStatementOfflineController.class.php index 87d5e9f8f..de7ee83a1 100644 --- a/Application/Admin/Controller/CompanyStatementOfflineController.class.php +++ b/Application/Admin/Controller/CompanyStatementOfflineController.class.php @@ -149,10 +149,37 @@ class CompanyStatementOfflineController extends ThinkController $v['oplist'] = $this->OpAuth($v); } //pay_status - $field = "count(c.id) count,IFNULL(SUM(CASE WHEN pay_status = 1 THEN c.statement_money ELSE 0 END),0) as success_money, - IFNULL(SUM(CASE WHEN pay_status = 0 THEN c.statement_money ELSE 0 END),0) as statement_money, + $field = "count(c.id) count,IFNULL(SUM(CASE WHEN pay_status = 1 and pay_check=1 THEN c.statement_money ELSE 0 END),0) as success_money, + IFNULL(SUM(CASE WHEN pay_status = 0 or pay_status=2 THEN c.statement_money ELSE 0 END),0) as statement_money, IFNULL(SUM(CASE WHEN pay_status = -1 THEN c.statement_money ELSE 0 END),0) as error_money"; - $count = SM("company_statement_info","tab_")->alias("c")->field($field)->join("tab_company_statement_pool as p ON c.pool_id = p.id")->where($map)->find(); + $count = SM("company_statement_info","tab_") + ->alias("c") + ->field($field) + ->join("tab_company_statement_pool as p ON c.pool_id = p.id") + ->where($map) + ->find(); + + $countPart = SM("company_statement_info_part","tab_")->alias("c") + ->field("IFNULL(SUM(CASE WHEN pay_status = 0 THEN c.statement_money ELSE 0 END),0) as statement_money, + IFNULL(SUM(CASE WHEN pay_status = -1 THEN c.statement_money ELSE 0 END),0) as error_money") + ->join("tab_company_statement_pool as p ON c.pool_id = p.id") + ->where($map) + ->find(); + + $countSuccess = SM("company_statement_info_part","tab_")->alias("c") + ->field("IFNULL(SUM(CASE WHEN c.pay_status = 0 THEN c.statement_money ELSE 0 END),0) as statement_money, + IFNULL(SUM(CASE WHEN c.pay_status = 1 THEN c.statement_money ELSE 0 END),0) as success_money") + ->join("tab_company_statement_pool as p ON c.pool_id = p.id") + ->join("left join tab_company_statement_info i on c.info_id=i.id") + ->where($map) + ->where(['i.pay_status'=>['neq',1]]) + ->find(); + +// dump($countPart); +// dump($countSuccess);die(); + $count['success_money'] += $countSuccess['success_money']; + $count['statement_money'] -= $countSuccess['success_money']; + $count['error_money'] += $countPart['error_money']; $params['p'] = $page; $params['row'] = $row; @@ -554,18 +581,30 @@ class CompanyStatementOfflineController extends ThinkController $handleData[$value['info_id']] = $value['statement_money']; } + $payData = SM("company_statement_info_part","tab_") + ->field("sum(statement_money) statement_money,info_id") + ->group("info_id") + ->select(); + + $handlePayData = []; + foreach ($payData as $key => $value) { + $handlePayData[$value['info_id']] = $value['statement_money']; + } + if ($unPayInfoId) { $unPayData = $companyStatementInfo->where(['id'=>['in',$unPayInfoId]])->select(); foreach ($unPayData as $key => $value) { $time = date("Y-m-d H:i:s",time()); - $unPayAmount = $value['statement_money']-$handleData[$value['id']]; - $saveData['remark'] = "{$value['remark']} {$_SESSION['onethink_admin']['user_auth']['username']}于{$time}已打款{$handleData[$value['id']]},剩余{$unPayAmount}"; + $unPayAmount = $value['statement_money']-$handlePayData[$value['id']]; + if($handleData[$value['id']]) { + $saveData['remark'] = "{$value['remark']} {$_SESSION['onethink_admin']['user_auth']['username']}于{$time}已打款{$handleData[$value['id']]},剩余{$unPayAmount}"; + } SM("company_statement_info_part","tab_") ->where(['info_id'=>$value['id']]) ->save(["pay_status"=>1]); - if($value['statement_money'] - $handleData[$value['id']] <=0) { + if($value['statement_money'] - $handlePayData[$value['id']] <=0) { //打款成功 $companyStatementInfo->where(['id'=>$value['id']])->save([ "pay_check"=>1, @@ -583,19 +622,47 @@ class CompanyStatementOfflineController extends ThinkController $poolInfo = $companyStatementInfo->where("pool_id in ($poolIds) and pay_status <> 1")->field("pool_id,count(id) count")->group("pool_id")->select(); + $handlePoolInfo = []; + + foreach ($poolInfo as $key => $value) { + $handlePoolInfo[$value['pool_id']] = $value['count']; + } + // dump($yPoolInfo); // dump($poolInfo);die(); //全部就打款成功,否则打款中 $companyStatementPool = SM("company_statement_pool","tab_"); - foreach ($poolInfo as $k => $v) { - if($v['count'] == $yPoolInfo[$v['pool_id']]){ + +// dump($yPoolInfo);die(); + + foreach ($yPoolInfo as $k => $v) { + + if (!$handlePoolInfo[$k]) { //打款成功 - $this->setOneVerifyStatus(4,"payment",$v['pool_id']); - }else{ + $this->setOneVerifyStatus(4,"payment",$k); + } else { //打款中 - $this->setOneVerifyStatus(3,"payment",$v['pool_id']); + $this->setOneVerifyStatus(3,"payment",$k); } - } + +// if($v['count'] == $yPoolInfo[$v['pool_id']]){ +// //打款成功 +// $this->setOneVerifyStatus(4,"payment",$v['pool_id']); +// }else{ +// //打款中 +// $this->setOneVerifyStatus(3,"payment",$v['pool_id']); +// } + } + +// foreach ($poolInfo as $k => $v) { +// if($v['count'] == $yPoolInfo[$v['pool_id']]){ +// //打款成功 +// $this->setOneVerifyStatus(4,"payment",$v['pool_id']); +// }else{ +// //打款中 +// $this->setOneVerifyStatus(3,"payment",$v['pool_id']); +// } +// } $this->ajaxReturn(array( 'status' =>1, @@ -604,28 +671,75 @@ class CompanyStatementOfflineController extends ThinkController } public function viewStatement() { - if(!isset($_REQUEST['id'])){ - $this->error('参数错误'); - } +// if(!isset($_REQUEST['id'])){ +// $this->error('参数错误'); +// } +// $id = $_REQUEST['id']; +// $is_export= false; +// if (isset($_REQUEST['export']) && $_REQUEST['export']==1){ +// $is_export = true; +// } +// //获取基本信息 +// $dbres = SM("company_statement_info","tab_")->where("id='{$id}'")->select(); +// $title = $dbres[0]['company_name']; +// $this->assign("title",$title); +// +// if($dbres[0]['company_type'] == 3){ +// //上游 +// A("CompanyStatementPool")->viewCpPool($dbres,$is_export); +// }elseif($dbres[0]['company_type'] == 1){ +// //下游公司 +// A("CompanyStatementPool")->viewPcPool($dbres,$is_export); +// }else{ +// A("CompanyStatementPool")->viewPuPool($dbres,$is_export,["withdraw_type"=>3]); +// } + + + if(!isset($_REQUEST['id'])) $this->error("参数错误"); $id = $_REQUEST['id']; - $is_export= false; - if (isset($_REQUEST['export']) && $_REQUEST['export']==1){ - $is_export = true; + $CompanyInfo = M("company_statement_info","tab_") + ->alias('i') + ->field("i.id,i.pool_id,i.company_name,i.company_info,i.statement_money,i.remark,i.pay_status,i.verify_status,p.statement_num,i.statement_money,i.pay_check") + ->join("tab_company_statement_pool p ON p.id = i.pool_id") + ->where("i.id in({$id}) and (pay_check=1 or pay_check=2)") + ->select(); + +// $temp = $this->addPaymentPartInfo($CompanyInfo); +// $temp?$CompanyInfo=$temp:""; + + if ($CompanyInfo[0]['id']) { + $CompanyInfoSecord = M("company_statement_info_part","tab_") + ->alias('i') + ->field("i.id,i.pool_id,i.company_name,i.company_info,i.statement_money,i.remark,i.pay_status,i.verify_status,p.statement_num,i.statement_money,i.pay_check") + ->join("tab_company_statement_pool p ON p.id = i.pool_id") + ->where("i.info_id ={$CompanyInfo[0]['id']}") + ->select(); + } + if($CompanyInfoSecord) { + $CompanyInfo = $CompanyInfoSecord; } - //获取基本信息 - $dbres = SM("company_statement_info","tab_")->where("id='{$id}'")->select(); - $title = $dbres[0]['company_name']; - $this->assign("title",$title); - if($dbres[0]['company_type'] == 3){ - //上游 - A("CompanyStatementPool")->viewCpPool($dbres,$is_export); - }elseif($dbres[0]['company_type'] == 1){ - //下游公司 - A("CompanyStatementPool")->viewPcPool($dbres,$is_export); - }else{ - A("CompanyStatementPool")->viewPuPool($dbres,$is_export,["withdraw_type"=>3]); + $all_money = 0; + foreach($CompanyInfo as $k=>&$v){ + if($v['verify_status'] == 2){ + $v['is_payment'] = 2; + }else{ + $v['is_payment'] = 1; + } + + $v['company_info'] = json_decode($v['company_info'],true); + $v['company_info']['ali_user'] ?? ''; + $v['company_info']['ali_account'] ?? ''; + + $all_money += $v['statement_money']; + } + + $this->assign('all_money',$all_money); + $this->assign("CompanyInfo",$CompanyInfo); + $this->assign("id",$id); + $this->display(); + } public function export($ids=''){ diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 45f3f9828..cf136000d 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -1719,10 +1719,13 @@ class CompanyStatementPoolController extends ThinkController $id = $_REQUEST['id']; $CompanyInfo = SM("company_statement_info","tab_") ->alias('i') - ->field("i.id,i.pool_id,i.company_name,i.company_info,i.statement_money,p.statement_num,i.remark,i.pay_status,i.verify_status,p.statement_money all_money") + ->field("i.id,i.pool_id,i.company_name,i.company_info,i.statement_money,p.statement_num,i.remark,i.pay_status,i.verify_status,p.statement_money all_money,i.pay_status") ->join("tab_company_statement_pool p ON p.id = i.pool_id") ->where("pool_id='{$id}'") ->select(); + + $allPay = true; + foreach($CompanyInfo as $k=>&$v){ $v['company_info'] = json_decode($v['company_info'],true); $v['company_info']['ali_user'] ?? ''; @@ -1733,6 +1736,10 @@ class CompanyStatementPoolController extends ThinkController }else{ $v['is_payment'] = 1; } + //有一单未成功,就没有打款成功 + if ($v['pay_status']!=1) { + $allPay = false; + } $v['verify_status_str'] = $this->PayStatus[$v['pay_status']]; @@ -1743,6 +1750,10 @@ class CompanyStatementPoolController extends ThinkController } } } + //修改总单状态 + if ($allPay) { + M("company_statement_pool","tab_")->where(['id'=>$id])->save(['verify_status'=>4]); + } $this->assign("CompanyInfo",$CompanyInfo); $this->display(); @@ -2373,6 +2384,18 @@ class CompanyStatementPoolController extends ThinkController } //die(); + $dbres = $this->DBModel->field("id,verify_status,verify_log")->where(['id'=>$id])->find(); + $dbres['verify_log'] = json_decode($dbres['verify_log'],true); +// dump($dbres);die(); + if ($dbres['verify_log']['firstverify_user']) { +// $dbres['verify_log'] = json_decode($dbres['verify_log'],true); + $dbres['verify_log']['firstverify_user']=$this->admininfo["username"]; + $dbres['verify_log']['firstverify_time']=date("Y.m.d H:i:s"); + $dbres['verify_log'] = json_encode($dbres['verify_log']); + SM("company_statement_pool","tab_")->where(['id'=>$id])->save(["verify_log"=>$dbres['verify_log']]); + } + + SM("company_statement_pool","tab_")->where(['id'=>$id])->save(['pay_amount'=>$statement_amount,'statement_money'=>$statement_amount+$reward-$fine,'lack_statement_money'=>$statement_lack_amount+$lreward-$lfine]); $this->ajaxReturn(['status'=>1,'info'=>'保存成功']); @@ -2497,6 +2520,17 @@ class CompanyStatementPoolController extends ThinkController } //die(); + $dbres = $this->DBModel->field("id,verify_status,verify_log")->where(['id'=>$id])->find(); + $dbres['verify_log'] = json_decode($dbres['verify_log'],true); +// dump($dbres);die(); + if ($dbres['verify_log']['firstverify_user']) { +// $dbres['verify_log'] = json_decode($dbres['verify_log'],true); + $dbres['verify_log']['firstverify_user']=$this->admininfo["username"]; + $dbres['verify_log']['firstverify_time']=date("Y.m.d H:i:s"); + $dbres['verify_log'] = json_encode($dbres['verify_log']); + SM("company_statement_pool","tab_")->where(['id'=>$id])->save(["verify_log"=>$dbres['verify_log']]); + } + SM("company_statement_pool","tab_")->where(['id'=>$id])->save(['pay_amount'=>$statement_amount,'statement_money'=>$statement_amount+$reward-$fine,'lack_statement_money'=>$statement_lack_amount+$lreward-$lfine]); $this->ajaxReturn(['status'=>1,'info'=>'保存成功']); diff --git a/Application/Admin/Controller/RefundController.class.php b/Application/Admin/Controller/RefundController.class.php index fb90d1e54..76de36c51 100644 --- a/Application/Admin/Controller/RefundController.class.php +++ b/Application/Admin/Controller/RefundController.class.php @@ -9,38 +9,104 @@ use User\Api\UserApi as UserApi; */ class RefundController extends ThinkController { public function userCount(){ - if(!array_key_exists("count_date",$_REQUEST) && !array_key_exists("user_account",$_REQUEST)){ - $this->redirect(ACTION_NAME, array('count_date' => date('Y-m'))); - } +// if(!array_key_exists("count_date",$_REQUEST) && !array_key_exists("user_account",$_REQUEST)){ +// $this->redirect(ACTION_NAME, array('count_date' => date('Y-m'))); +// } $page = I('p', 1); $row = I('row', 10); if(isset($_REQUEST['user_account'])){ - $map['user_account']=array('like','%'.trim($_REQUEST['user_account']).'%'); + $map['tab_spend_refund.user_account']=array('like','%'.trim($_REQUEST['user_account']).'%'); } - if(isset($_REQUEST['count_date'])){ - $map['pay_time'] = ["BETWEEN",$this->getMonthTimeRange($_REQUEST['count_date'])]; + + if(isset($_REQUEST['partner'])){ + $map['partner']=array('like','%'.trim($_REQUEST['partner']).'%'); + } + + if(isset($_REQUEST['company_name'])){ + $map['company_name']=array('like','%'.trim($_REQUEST['company_name']).'%'); + } + + if(isset($_REQUEST['status'])){ + $map['tab_spend_refund.status']= $_REQUEST['status']; + } +// if(isset($_REQUEST['count_date'])){ +// $map['pay_time'] = ["BETWEEN",$this->getMonthTimeRange($_REQUEST['count_date'])]; +// } + + if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) { + $time_start = strtotime($_REQUEST['time_start']); + $time_end = strtotime($_REQUEST['time_end'])+ 86399; + $map["_string"] = "(tab_spend_refund.pay_time BETWEEN {$time_start} AND {$time_end})"; + } elseif (isset($_REQUEST['time_start'])) { + $time_start = strtotime($_REQUEST['time_start']); + $map["_string"] = "(tab_spend_refund.pay_time >= {$time_start} )"; + } elseif (isset($_REQUEST['time_end'])) { + $time_end = strtotime($_REQUEST['time_end'])+ 86399; + $map["_string"] = "(tab_spend_refund.pay_time <= {$time_end} )"; + } + + if (isset($_REQUEST['usetime_start']) && isset($_REQUEST['usetime_end'])) { + $time_start = strtotime($_REQUEST['usetime_start']); + $time_end = strtotime($_REQUEST['usetime_end'])+ 86399; + $map["_string"] = "( (check_time BETWEEN {$time_start} AND {$time_end}))"; + } elseif (isset($_REQUEST['usetime_start'])) { + $time_start = strtotime($_REQUEST['usetime_start']); + $map["_string"] = "( (check_time >= {$time_start} ) )"; + } elseif (isset($_REQUEST['usetime_end'])) { + $time_end = strtotime($_REQUEST['usetime_end'])+ 86399; + $map["_string"] = "( (check_time <= {$time_end} ) )"; } +// dump($map);die(); + $gameSql = M("game","tab_") + ->field("tab_game.id game_id,partner") + ->join("left join tab_partner on tab_game.partner_id=tab_partner.id") + ->where("1=1") + ->select(false); // $model = SM("spend_refund",'tab_'); $data = $model - ->where($map) - ->group("month,user_id") - ->order("month desc,refund_amount desc"); + ->field("tab_spend_refund.id,IFNULL(if(substring_index(substring_index(`chain`,'/',2),'/',-1)='',s.promote_id,substring_index(substring_index(`chain`,'/',2),'/',-1)),0) p_id, + s.`pay_time` pay_time,tab_spend_refund.user_id,tab_spend_refund.user_account,refund_amount,partner,game_name,company_name,promote.account,tab_spend_refund.status,admin,check_time") + ->join("left join tab_spend s on tab_spend_refund.s_id=s.id") + ->join("left join ({$gameSql}) g on s.game_id=g.game_id") + ->join("tab_promote promote ON s.promote_id = promote.id","left") + ->join("tab_promote_company company ON promote.company_id = company.id","left") + ->where($map) + ->select(false); + + $data = M()->table("(".$data.") a") + ->join("left join tab_promote pr on a.p_id = pr.id") + ->group("a.id") + ->order("month desc,refund_amount desc"); + if(isset($_REQUEST['export'])){ - $data = $data->field("CONCAT(' ',FROM_UNIXTIME(`pay_time`,'%Y-%m')) as month,user_id,user_account,sum(refund_amount) refund_amount")->select(); + $data = $data->field("a.id,CONCAT(' ',FROM_UNIXTIME(`pay_time`,'%Y-%m')) as month,user_id,user_account,sum(refund_amount) refund_amount,partner,game_name,company_name,pr.account top_account,a.status,admin,check_time")->select(); data2csv($data,'退款统计',array( "month"=>"月份", "user_account"=>"玩家账号", "refund_amount"=>"退款金额" )); } - $data = $data->field("FROM_UNIXTIME(`pay_time`,'%Y-%m') as month,user_id,user_account,sum(refund_amount) refund_amount")->page($page, $row)->select(); + $data = $data->field("a.id,FROM_UNIXTIME(`pay_time`,'%Y-%m') as month,user_id,user_account,sum(refund_amount) refund_amount,partner,game_name,company_name,pr.account top_account,a.status,admin,check_time")->page($page, $row)->select(); + +// var_dump($data);die(); + foreach ($data as $k => &$v) { + + $status = $v['status']?'已退款':"未退款"; + $time = date("Y-m-d H:i:s"); + if ($v['status']) { + $v['check_detail'] = "{$status}({$v['admin']}){$time}"; + } else { + $v['check_detail'] = "-----"; + } + $between = $this->getMonthTimeRange($v['month'],true); $v['jump_url'] = U("Spend/lists",['timestart'=>$between[0],'timeend'=>$between[1],'user_account'=>$v['user_account'],'is_refund'=>1]); } +// dump($data);die(); $allcount = $model->where($map)->getField("sum(refund_amount) refund_amount"); $count_sql = $model->field("FROM_UNIXTIME(`pay_time`,'%Y-%m') as month,user_id")->group("month,user_id")->where($map)->select(false); @@ -50,6 +116,14 @@ class RefundController extends ThinkController { if ($page) { $this->assign('_page', $page); } + +// dump($_SESSION['onethink_admin']['user_auth']['username']);die(); + + $Rule = strtolower(MODULE_NAME . '/' . CONTROLLER_NAME . '/' . ACTION_NAME . "_check"); + if ($this->checkRule($Rule, array('in', '1,2')) || IS_ROOT) { + $this->assign("check",true); + } + $this->assign("allcount",$allcount); $this->assign("data",$data); $this->assign("date_count",showMonthRange('2019-09-01',date('Y-m-d',time()))); @@ -67,6 +141,26 @@ class RefundController extends ThinkController { return [$start,$end]; } + public function refund() { + + $status = $_REQUEST['status']; + $id = $_REQUEST['ids']; + +// dump($_REQUEST);die(); + if (!$id) { + $this->ajaxReturn(['status'=>0,'msg'=>'数据错误']); + } + $is_save = M("spend_refund","tab_") + ->where(['id'=>['in',$id]]) + ->save(['status'=>$status,'check_time'=>time(),'admin'=>$_SESSION['onethink_admin']['user_auth']['username']]); + + if ($is_save) { + $this->ajaxReturn(['status'=>1,'msg'=>'操作成功']); + } else { + $this->ajaxReturn(['status'=>0,'msg'=>'操作失败']); + } + + } // public function lists(){ // if(isset($_REQUEST['user_account'])){ diff --git a/Application/Admin/View/CompanyStatementOffline/lists.html b/Application/Admin/View/CompanyStatementOffline/lists.html index 833ec0807..d534c1623 100644 --- a/Application/Admin/View/CompanyStatementOffline/lists.html +++ b/Application/Admin/View/CompanyStatementOffline/lists.html @@ -199,7 +199,7 @@ {$data.platform_amount} {$data.pay_check_str} {$data.payment} - {$data.statement_num} + {$data.statement_num} {$vo} @@ -251,6 +251,18 @@ } $(function(){ + $(".viewPool").click(function () { + var id = $(this).data("id"); + var url = "{:U('CompanyStatementPool/viewPool')}"+"&id="+id + layer.open({ + type: 2, + title: "海南万盟天下科技有限公司", + shadeClose: true, + shade: 0.8, + area: ['100%', '100%'], + content: url + }); + }); var company_id = "{$_GET['company_id']??0}"; $("#company_type").on("change",function(){ diff --git a/Application/Admin/View/CompanyStatementOffline/setPartPayment.html b/Application/Admin/View/CompanyStatementOffline/setPartPayment.html index 7a9dbc17a..8f64ca852 100644 --- a/Application/Admin/View/CompanyStatementOffline/setPartPayment.html +++ b/Application/Admin/View/CompanyStatementOffline/setPartPayment.html @@ -120,7 +120,7 @@ - + {$key-0+1} {$vo.company_name} @@ -138,6 +138,43 @@ {$vo.statement_num} {$vo.statement_money} + + + + {$key-0+1} + + + + + + + + + + + + + + + + + + {$vo.company_name} + + 是 + + + + + 否 + + + + + + {$vo.statement_num} + + 新增 diff --git a/Application/Admin/View/CompanyStatementOffline/viewstatement.html b/Application/Admin/View/CompanyStatementOffline/viewstatement.html new file mode 100644 index 000000000..8766e64eb --- /dev/null +++ b/Application/Admin/View/CompanyStatementOffline/viewstatement.html @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
序号合作公司是否支付宝打款户名帐号开户行关联结算汇总单订单号结算金额(元)备注
{$key-0+1}{$vo.company_name}{$vo.company_info.ali_user}{$vo.company_info.ali_account}{$vo.company_info.payee_name}{$vo.company_info.bank_account}{$vo.company_info.opening_bank}{$vo.statement_num}{$vo.statement_money}{$vo.remark}
合计:结算总金额:{$all_money}
+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/Application/Admin/View/CompanySystemRatio/index.html b/Application/Admin/View/CompanySystemRatio/index.html index bc7bea523..6cf71a3f9 100644 --- a/Application/Admin/View/CompanySystemRatio/index.html +++ b/Application/Admin/View/CompanySystemRatio/index.html @@ -48,7 +48,9 @@ .data_list table td{ line-height: 2; } - + tr{ + border-bottom: 1px solid #e6e6e6; + } .layui-layer-title { text-align: center; height: 42px; diff --git a/Application/Admin/View/Refund/userCount.html b/Application/Admin/View/Refund/userCount.html index 877526bc4..f8d26a48a 100644 --- a/Application/Admin/View/Refund/userCount.html +++ b/Application/Admin/View/Refund/userCount.html @@ -65,6 +65,12 @@ visibility: visible; line-height: 20px; } + .butnbox {padding:10px 0 10px;} + .butnbox .butnlist {overflow:hidden;clear:both;} + .butnbox .butnlist .butn,.butnbox .butnlist .butn:hover {text-decoration:none;border:none;} + .butnbox .butnlist .butn {display:inline-block;width:120px;height:28px;line-height:28px;text-align:center;color:#FFF;background:#3C95C8;border-radius:3px;} + .butnbox .butnlist .butn.last {background:#009900;} + .butnbox .butnlist .butn~.butn {margin-left:20px;} @@ -79,26 +85,67 @@
+ +
+ +  -  +
+ + +
+
-
-   +
+
+   +
+
+   +
+
+
-   + +  -  +
+ + +
-
+
+ +
@@ -109,8 +156,14 @@ + 月份 + 上游cp + 游戏 玩家账号 + 工会名称 + 会长名称 + 退款状态 退款金额 操作 @@ -130,8 +183,14 @@ + {$data.month} + {$data.partner} + {$data.game_name} {$data.user_account} + {$data.company_name} + {$data.top_account} + {$data.check_detail} {$data.refund_amount} 查看 @@ -174,6 +233,87 @@ highlight_subnav("{:U('userCount')}"); $(function(){ $(".select_gallery").select2(); + $('#time_start').datetimepicker({ + format: 'yyyy-mm-dd', + language: "zh-CN", + minView: 2, + autoclose: true + }); + $('#usetime_start').datetimepicker({ + format: 'yyyy-mm-dd', + language: "zh-CN", + minView: 2, + autoclose: true + }); + $('#usetime_end').datetimepicker({ + format: 'yyyy-mm-dd', + language: "zh-CN", + minView: 2, + autoclose: true + }); + + $('#datetimepicker').datetimepicker({ + format: 'yyyy-mm-dd', + language: "zh-CN", + minView: 2, + autoclose: true, + pickerPosition: 'bottom-left' + }); + + $(".check").on("click",function(){ + var tip = ''; + var status = $(this).attr("data-status"); + var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { + if($(elem).data("status") == 0 && status == 1){ + tip = "是否确认所选记录,已经退款完成?"; + return $(elem).val(); + } + + if ($(elem).data("status") == 1 && status == 0) { + tip = "是否确认将所选记录变更为未退款?"; + return $(elem).val(); + } + + }).get(); + + if(text.length < 1){ + layer.msg("" + '无需要进行操作'); + return; + } + text = text.join(","); + + layer.confirm(tip, { + btn: ['确认','取消'], + title:false + }, function(index){ + layer.close(index); + _doAgreeApply(); + }); + function _doAgreeApply(){ + //执行 + layer.load(2); + $.ajax({ + type: "POST", + url: "{:U('refund')}", + dataType: 'json', + async: true, + data: {ids:text,status:status}, + success:function(data){ + layer.closeAll('loading'); + if(data.status==1){ + layer.msg("" + data.msg + ""); + setTimeout(function(){ + window.location.reload(); + },1500); + }else{ + layer.msg("" + data.msg + ""); + return false; + } + } + }); + } + + }); //搜索功能 $("#search").click(function(){ diff --git a/Data/update.sql b/Data/update.sql index e26d53ea5..10c5e08be 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -2826,4 +2826,11 @@ CREATE TABLE `tab_business_affairs_award_pool` ( ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic; ALTER TABLE `tab_company_statement_info` -MODIFY COLUMN `remark` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '备注' AFTER `pay_info`; \ No newline at end of file +MODIFY COLUMN `remark` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '备注' AFTER `pay_info`; + +ALTER TABLE `tab_spend_refund` +ADD COLUMN `status` tinyint(1) NULL DEFAULT 0 COMMENT '退款状态' AFTER `create_time`, +ADD COLUMN `check_time` int(11) NULL DEFAULT 0 COMMENT '确认时间' AFTER `status`; + +ALTER TABLE `tab_spend_refund` +ADD COLUMN `admin` varchar(50) NULL DEFAULT '' COMMENT '操作人' AFTER `check_time`; \ No newline at end of file