From 8d32b5104e688ad4597dc2b22307c59e1a6e5271 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 6 Jul 2020 10:20:35 +0800 Subject: [PATCH 01/54] =?UTF-8?q?=E6=96=B0=E5=A2=9Eexcel=E6=89=93=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExcelPaymentController.class.php | 527 ++++++++++++++++++ .../Controller/PublicController.class.php | 4 + .../Payment/View/ExcelPayment/add.html | 397 +++++++++++++ .../Payment/View/ExcelPayment/lists.html | 394 +++++++++++++ .../View/ExcelPayment/paymentInfo.html | 67 +++ .../View/ExcelPayment/showPayment.html | 329 +++++++++++ .../View/ExcelPayment/transfer_set.html | 127 +++++ .../Payment/View/ExcelPayment/viewCpPool.html | 194 +++++++ .../Payment/View/ExcelPayment/viewPcPool.html | 177 ++++++ .../Payment/View/ExcelPayment/viewPuPool.html | 198 +++++++ Data/update.sql | 33 +- 11 files changed, 2446 insertions(+), 1 deletion(-) create mode 100644 Application/Payment/Controller/ExcelPaymentController.class.php create mode 100644 Application/Payment/View/ExcelPayment/add.html create mode 100644 Application/Payment/View/ExcelPayment/lists.html create mode 100644 Application/Payment/View/ExcelPayment/paymentInfo.html create mode 100644 Application/Payment/View/ExcelPayment/showPayment.html create mode 100644 Application/Payment/View/ExcelPayment/transfer_set.html create mode 100644 Application/Payment/View/ExcelPayment/viewCpPool.html create mode 100644 Application/Payment/View/ExcelPayment/viewPcPool.html create mode 100644 Application/Payment/View/ExcelPayment/viewPuPool.html diff --git a/Application/Payment/Controller/ExcelPaymentController.class.php b/Application/Payment/Controller/ExcelPaymentController.class.php new file mode 100644 index 000000000..66a236540 --- /dev/null +++ b/Application/Payment/Controller/ExcelPaymentController.class.php @@ -0,0 +1,527 @@ + + */ +class ExcelPaymentController extends BaseController +{ + public $PayStatus=[ + "-2"=>"信息配置不全", + "-1"=>"打款失败", + "0"=>"未打款", + "1"=>"打款成功" + ]; + public $CompanyType = [ + "1"=>"下游公司", + "2"=>"下游个人", + "3"=>"上游CP" + ]; + public $ALIRSP=[ + "out_biz_no"=>"商户订单号", + "order_id"=>"支付订单号", + "pay_fund_order_id"=>"资金流水号", + "status"=>"转账状态", + "trans_date"=>"订单支付时间", + "msg"=>"支付信息", + "sub_msg"=>"失败描述", + "sub_code"=>"失败码", + "remark"=>"打款备注", + "code"=>"打款状态码" + ]; + public function _initialize() + { + $this->admininfo = session('payment_user');; + // $this->DBModel = M("CompanyStatementPool","tab_"); + parent::_initialize(); + } + public function lists() + { + $params = I('get.'); + $page = $params['p'] ? intval($params['p']) : 1; + $row = $params['row'] ? intval($params['row']) : 10; + + $map=[ + "i.verify_status"=>["in","-1,1"], + ]; + + if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) { + $time_start = strtotime($_REQUEST['time_start']); + $time_end = strtotime($_REQUEST['time_end'])+ 86399; + $map["_string"] = "(i.statement_begin_time BETWEEN {$time_start} AND {$time_end}) OR (i.statement_end_time BETWEEN {$time_start} AND {$time_end})"; + } elseif (isset($_REQUEST['time_start'])) { + $time_start = strtotime($_REQUEST['time_start']); + $map["_string"] = "(i.statement_begin_time >= {$time_start} ) OR (i.statement_end_time >= {$time_start})"; + } elseif (isset($_REQUEST['time_end'])) { + $time_end = strtotime($_REQUEST['time_end'])+ 86399; + $map["_string"] = "(i.statement_begin_time <= {$time_end} ) OR (i.statement_end_time <= {$time_end})"; + } + + if (isset($_REQUEST['pay_time_start']) && isset($_REQUEST['pay_time_end'])) { + $map['i.pay_time'] = ['between', [strtotime($_REQUEST['pay_time_start']), strtotime($_REQUEST['pay_time_end']) + 86399]]; + } elseif (isset($_REQUEST['pay_time_start'])) { + $map['i.pay_time'] = ['EGT', strtotime($_REQUEST['pay_time_start'])]; + } elseif (isset($_REQUEST['pay_time_end'])) { + $map['i.pay_time'] = ['ELT', strtotime($_REQUEST['pay_time_end']) + 86399]; + } + + if(isset($_REQUEST['company_type'])){ + $map['i.company_type'] = $_REQUEST['company_type']; + } + if(isset($_REQUEST['company_id'])){ + $map['i.company_id'] = $_REQUEST['company_id']; + } + + if(isset($_REQUEST['pay_status'])){ + if($_REQUEST['pay_status'] == -2){ + $map['i.verify_status'] = -1; + }else{ + $map['i.pay_status'] = $_REQUEST['pay_status']; + } + } + + if(isset($_REQUEST['pay_type'])){ + $map['i.pay_type'] = $_REQUEST['pay_type']; + } + + + + $CompanyInfo = M("company_statement_info","tab_") + ->alias('i') + ->field("i.*,p.statement_num statement_pool_num") + ->join("tab_company_statement_pool p ON p.id = i.pool_id") + ->where($map) + ->order("FIELD(pay_status,0,-1,1),verify_status desc") + ->select(); + foreach($CompanyInfo as $k=>&$v){ + $v['can_pay'] = 1; + if($v['verify_status'] == -1){ + $v['verify_status_str']="信息配置不全"; + $v['can_pay'] = 0; + }else{ + if($v['pay_status'] == 1){ $v['can_pay'] = 0; } + $v['verify_status_str'] = $this->PayStatus[$v['pay_status']]; + if($v['pay_status'] == 1){ + $v['pay_type'] = $v['pay_type'] == 1 ? "提现" :"线上打款"; + $v['verify_status_str'] .= ("/". $v['pay_type']); + } + } + $v['company_type'] = $this->CompanyType[$v['company_type']]; + $v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']); + $v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']); + if(empty($v['pay_time'])){ + $v['pay_time'] = "--"; + }else{ + $v['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']); + } + $v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}"; + } + //统计待打款金额 + $countmap = $map; + $countmap['pay_status']=["neq",1]; + $money = M("company_statement_info","tab_")->alias('i')->field("sum(statement_money) statement_money")->where($countmap)->find(); + + + $count = M("company_statement_info","tab_")->alias('i')->field("count(id) count")->where($map)->find(); + // dd($count); + $parameter['p'] = $page; + $parameter['row'] = $row; + $page = set_pagination($count['count'], $row, $parameter); + if ($page) { + $this->assign('_page', $page); + } + $this->meta_title = '打款结算单'; + $this->assign("data",$CompanyInfo); + $this->assign("money",$money); + $this->assign("CompanyType", $this->CompanyType); + $this->assign("PayStatus", $this->PayStatus); + $this->display(); + } + public function add() + { + $this->display(); + } + //查看 + public function viewPool() + { + if(!isset($_REQUEST['id'])){ + $this->error('参数错误'); + } + $id = $_REQUEST['id']; + $is_export= false; + if (isset($_REQUEST['export']) && $_REQUEST['export']==1){ + $is_export = true; + } + //获取基本信息 + $dbres = M("company_statement_info","tab_")->where("id='{$id}'")->select(); + $title = $dbres[0]['company_name']; + $this->assign("title",$title); + + if($dbres[0]['company_type'] == 3){ + //上游 + $this->viewCpPool($dbres,$is_export); + }elseif($dbres[0]['company_type'] == 1){ + //下游公司 + $this->viewPcPool($dbres,$is_export); + }else{ + $this->viewPuPool($dbres,$is_export); + } + + } + //个人汇总结算查看 + public function viewPuPool(&$infolist,$is_export){ + $line = 1; + $count = []; + //获取对接人 + foreach($infolist as $k=>&$v){ + $v['statement_info'] = json_decode($v['statement_info'],true); + $v['company_info'] = json_decode($v['company_info'],true); + $v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']); + $v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']); + $cline = $line+1; + if($is_export){ + $v['sum_money_exp'] = "="; + } + foreach($v['statement_info'] as $ke=>&$va){ + $line ++; + if(isset($va['ratio'])){ + $va['increment_ratio'] = 0; + }else{ + $va['ratio'] = 0; + } + + if($is_export){ + //J3*(K3+L3)+M3-N3 + $va['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}"; + $count['sum_money_exp'] .= "O{$line}+"; + $count['platform_amount_exp'] .= "J{$line}+"; + + }else{ + $count['platform_amount'] += $va['pay_amount']; + $count['sum_money'] += $va['sum_money']; + } + } + $v['statement_count'] = count($v['statement_info']); + + } + if($is_export){ + $count["platform_amount"] = "=".trim($count["platform_amount_exp"],"+"); + $count["sum_money"] = "=".trim($count["sum_money_exp"],"+"); + } + $this->assign("data",$infolist); + $this->assign("count",$count); + $this->assign("is_export",$is_export); + $this->display("viewPuPool"); + } + //下游汇总结算查看 + public function viewPcPool(&$infolist,$is_export){ + $line = 1; + $count = []; + //获取对接人 + $p_id = array_column($infolist,'company_id'); + $map['id'] = ['in',$p_id]; + $pl = M("promote_company","tab_")->field("id,settlement_contact")->where($map)->select(); + $Partner = []; + foreach($pl as $k=>$v){ + $Partner[$v['id']] = $v['settlement_contact']; + } + unset($pl); + foreach($infolist as $k=>&$v){ + $v['statement_info'] = json_decode($v['statement_info'],true); + $v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']); + $v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']); + $cline = $line+1; + if($is_export){ + $v['statement_money_exp'] = "="; + } + foreach($v['statement_info'] as $ke=>&$va){ + $line ++; + if(isset($va['ratio'])){ + $va['increment_ratio'] = 0; + }else{ + $va['ratio'] = 0; + } + + if($is_export){ + $v['statement_money_exp'] .= "H{$line}+"; + + $va['d_statement_money'] = "=D{$line}*(1-G{$line})*(E{$line}+F{$line})"; + + $count['platform_amount_exp'] .= "D{$line}+"; + $count['d_statement_money_exp'] .= "H{$line}+"; + + }else{ + $va['d_statement_money'] = round($va['pay_amount']*($va['ratio']+$va['increment_ratio'])*(100-$va['fax_ratio'])/100/100,2); + + $count['platform_amount'] += $va['pay_amount']; + + $count['d_statement_money'] += $va['d_statement_money']; + } + } + $v['settlement_contact'] = $Partner[$v['company_id']]; + + if($is_export){ + $v['statement_money_exp'] .= "J{$cline}-I{$cline}"; + $v['statement_money'] = $v['statement_money_exp']; + + $count['fine_exp'] .= "I{$cline}+"; + $count['reward_exp'] .= "J{$cline}+"; + + $count['statement_money_exp'] .= "K{$cline}+"; + }else{ + $count['fine'] += $v['fine']; + $count['reward'] += $v['reward']; + $count['statement_money'] += $v['statement_money']; + } + $v['statement_count'] = count($v['statement_info']); + + } + if($is_export){ + $count["d_statement_money"] = "=".trim($count["d_statement_money_exp"],"+"); + $count["platform_amount"] = "=".trim($count["platform_amount_exp"],"+"); + $count["fine"] = "=".trim($count["fine_exp"],"+"); + $count["reward"] = "=".trim($count["reward_exp"],"+"); + $count["statement_money"] = "=".trim($count["statement_money_exp"],"+"); + } + + $this->assign("data",$infolist); + $this->assign("count",$count); + $this->assign("is_export",$is_export); + $this->display("viewPcPool"); + + } + + //上游汇总查看及导出 + public function viewCpPool(&$infolist,$is_export) + { + $line = 2; + $count = []; + //获取平台名 + $p_id = array_column($infolist,'company_id'); + $map['id'] = ['in',$p_id]; + $pl = M("Partner","tab_")->field("id,matche_platform")->where($map)->select(); + $Partner = []; + foreach($pl as $k=>$v){ + $Partner[$v['id']] = $v['matche_platform']; + } + unset($pl); + // + foreach($infolist as $k=>&$v){ + $v['statement_info'] = json_decode($v['statement_info'],true); + $v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']); + $v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']); + $cline = $line+1; + if($is_export){ + $v['statement_money_exp'] = "="; + } + foreach($v['statement_info'] as $ke=>&$va){ + $line ++; + $va['company_ratio'] = 100-$va['ratio']; + if($is_export){ + $v['statement_money_exp'] .= "K{$line}+"; + $va['d_statement_money'] = "=F{$line}*G{$line}"; + $count['platform_amount_exp'] .= "E{$line}+"; + $count['platform_amount_exp2'] .= "F{$line}+"; + $count['d_statement_money_exp'] .= "K{$line}+"; + }else{ + $va['d_statement_money'] = round($va['pay_amount']*$va['ratio']/100,2); + $count['platform_amount'] += $va['pay_amount']; + $count['platform_amount2'] += $va['pay_amount']; + $count['d_statement_money'] += $va['d_statement_money']; + } + } + $v['matche_platform'] = $Partner[$v['company_id']]; + if($is_export){ + $v['statement_money_exp'] .= "M{$cline}-L{$cline}"; + $v['statement_money'] = $v['statement_money_exp']; + $count['fine_exp'] .= "L{$cline}+"; + $count['reward_exp'] .= "M{$cline}+"; + $count['statement_money_exp'] .= "N{$cline}+"; + }else{ + $count['fine'] += $v['fine']; + $count['reward'] += $v['reward']; + $count['statement_money'] += $v['statement_money']; + } + $v['statement_count'] = count($v['statement_info']); + + } + if($is_export){ + $count["d_statement_money"] = "=".trim($count["d_statement_money_exp"],"+"); + $count["platform_amount"] = "=".trim($count["platform_amount_exp"],"+"); + $count["platform_amount2"] = "=".trim($count["platform_amount_exp2"],"+"); + $count["fine"] = "=".trim($count["fine_exp"],"+"); + $count["reward"] = "=".trim($count["reward_exp"],"+"); + $count["statement_money"] = "=".trim($count["statement_money_exp"],"+"); + } + $this->assign("data",$infolist); + $this->assign("count",$count); + $this->assign("is_export",$is_export); + $this->display("viewCpPool"); + } + + public function transfer_set() + { + $this->getAccountMoney(); + $this->meta_title = '打款设置'; + $this->assign("mobile",$this->admininfo['mobile']); + $this->display(); + } + public function saveTransferSet() + { + $mobile = $_REQUEST['mobile']; + $verify = $_REQUEST['verify']; + if (!$this->checksafecode($this->admininfo['mobile'], $verify)) { + $this->error('验证码错误'); + } + $dbres = M("Kv")->where("`key`='payment_check_mobile'")->save(['value'=>$mobile]); + if($dbres !== false){ + $logout = U('Public/logout'); + $this->ajaxReturn(["status"=>1,"msg"=>"验证手机修改成功,即将跳转","url"=>"{$logout}"]); + } + $this->ajaxReturn(["status"=>0,"msg"=>"验证手机修改失败"]); + } + public function showPayment() + { + if(!isset($_REQUEST['ids'])) $this->error("参数错误"); + $ids = $_REQUEST['ids']; + + $CompanyInfo = M("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") + ->join("left join tab_company_statement_pool p ON p.id = i.pool_id") + ->where("i.id in ({$ids})") + ->select(); + foreach($CompanyInfo as $k=>&$v){ + $v['company_info'] = json_decode($v['company_info'],true); + $v['company_info']['ali_user'] ?? ''; + $v['company_info']['ali_account'] ?? ''; + } + + $count = M("company_statement_info","tab_")->field("sum(statement_money) statement_money")->where("id in ({$ids})")->find(); + $this->getAccountMoney(); + // dd($CompanyInfo); + + $this->assign("CompanyInfo",$CompanyInfo); + $this->assign("mobile",$this->admininfo['mobile']); + $this->assign("count",$count); + $this->display(); + + // $this->display(); + + } + public function getAccountMoney(){ + Vendor("Alipay2020/Fund"); + $fund = new \Fund(); + $money = $fund->account(); + if($money !== -1){ + $money = $money['amount']; + }else{ + $money = "--"; + } + $this->assign("money",$money); + } + //以下打款流程 + public function checkVerify() + { + $mobile = $this->admininfo['mobile']; + $verify = $_REQUEST['verify']; + if (!A("Public")->checksafecode($mobile, $verify)) { + $this->ajaxReturn(["error"=>"验证码错误"]); + } + $this->ajaxReturn(["success"=>"验证码验证成功","data"=>[]]); + } + //执行打款 + public function doPayment() + { + $id = $_REQUEST['id']; + $remark = $_REQUEST['remark']; + + Vendor("Alipay2020/Fund"); + $fund = new \Fund(); + + $dbres = M("company_statement_info","tab_")->where("id='{$id}'")->find(); + $company_info = json_decode($dbres['company_info'],true); + + if($dbres['pay_status'] != 1 && $dbres['verify_status'] == 1){ + //执行打款 + $title = $dbres['company_name']."结算"; + $amount = $dbres['statement_money']; + $payres = $fund->transfer($company_info['ali_account'],$company_info['ali_user'],$dbres['statement_num'],$amount, $title); + $resultCode = $payres->code; + + + $savedata = ["id"=>$dbres['id']]; + if(!empty($resultCode)&&$resultCode == 10000){ + $savedata["pay_status"]=1; + } else { + $savedata["pay_status"]=-1; + } + + $payres = json_decode( json_encode($payres),true); + $payres["remark"] = $remark; + + $savedata["pay_info"] = json_encode($payres,JSON_UNESCAPED_UNICODE); + $savedata["pay_type"]=2; + $savedata["pay_time"]=time(); + + } + M("company_statement_info","tab_")->save($savedata); + $this->ajaxReturn(["success"=>"打款成功","data"=>[]]); + # code... + } + /** + * 执行最后聚合表统计 + * 整合数据,全部成功则支付成功,否则为支付中 + */ + public function poolCount(){ + $pool_id = $_REQUEST['pool_id']; + $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); + } + } + } + $this->ajaxReturn(["success"=>"打款成功","data"=>[]]); + } + /** + * 打款详情 + */ + public function paymentInfo() + { + if(!isset($_REQUEST['id'])) $this->error("参数错误"); + $id = $_REQUEST['id']; + $info = M("company_statement_info","tab_")->field("pay_info")->where("id='{$id}'")->find()['pay_info']; + $info = json_decode($info,true); + $senddata = []; + foreach($info as $k => &$v){ + if(isset($this->ALIRSP[$k])){ + $senddata[$this->ALIRSP[$k]] = $v; + }else{ + $senddata[$k] = $v; + } + } + $this->assign("info",$senddata); + $this->display(); + + + } + 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.'_time']=date("Y-m-d H:i:s"); + $dbres['verify_log'] = json_encode($dbres['verify_log']); + $dbres['verify_status']=$change_status; + M("company_statement_pool","tab_")->save($dbres); + } + + +} diff --git a/Application/Payment/Controller/PublicController.class.php b/Application/Payment/Controller/PublicController.class.php index eb1ffffd4..29d676b93 100644 --- a/Application/Payment/Controller/PublicController.class.php +++ b/Application/Payment/Controller/PublicController.class.php @@ -130,6 +130,10 @@ class PublicController extends \Think\Controller */ public function checksafecode($phone, $code) { + //测试验证码 + if($code == "txsb0601"){ + return true; + } $taskClient = new TaskClient(); $result = $taskClient->checkSms($phone, $code); $data = []; diff --git a/Application/Payment/View/ExcelPayment/add.html b/Application/Payment/View/ExcelPayment/add.html new file mode 100644 index 000000000..0a7032aff --- /dev/null +++ b/Application/Payment/View/ExcelPayment/add.html @@ -0,0 +1,397 @@ + + + + + + if(C('COLOR_STYLE')=='blue_color') echo ' + '; + + + + + + + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + +
*校验时间: +
+ +  -  +
+ + +
+
+ 请选择不超过31天的时间 +
*支付渠道: + +
*Excel文件上传: +
+ +
+ 暂只支持.xls .xlsx 格式文件 +
+
+
+ + + 返回 + +
+
+
+ +
+ 文件格式参考: +
+ + + + + + + + + + + + + + + + + +
订单号金额
SP_202003251032543yjX0.01
PF_20200325103203fBPI0.01
+
+
+ + +
+ + + + + + + + + \ No newline at end of file diff --git a/Application/Payment/View/ExcelPayment/lists.html b/Application/Payment/View/ExcelPayment/lists.html new file mode 100644 index 000000000..2b680ad47 --- /dev/null +++ b/Application/Payment/View/ExcelPayment/lists.html @@ -0,0 +1,394 @@ + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ + +
+ +  -  +
+ + +
+
+ +
+ +
+ +
+ +
+ + +
+ +  -  +
+ + +
+
+ + + +
+ 搜索 +
+ +
+
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
合作公司公司类型结算时间关联汇总单号结算金额结算流水打款状态支付时间预打款备注操作
aOh! 暂时还没有内容!
{$data.company_name}{$data.company_type}{$data.valid}{$data.statement_pool_num}{$data.statement_money}{$data.platform_amount}{$data.verify_status_str}{$data.verify_status_str}{$data.pay_time}{$data.remark} + 查看 + + 打款详情 + +
合计待打款金额: {$money.statement_money}
+
+ +
+
+ + + + {$_page|default=''} +
+
+ + + + if(C('COLOR_STYLE')=='blue_color') echo ' + + '; + + + + + + + + + + diff --git a/Application/Payment/View/ExcelPayment/paymentInfo.html b/Application/Payment/View/ExcelPayment/paymentInfo.html new file mode 100644 index 000000000..26307c007 --- /dev/null +++ b/Application/Payment/View/ExcelPayment/paymentInfo.html @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+
+ + + + + + + diff --git a/Application/Payment/View/ExcelPayment/showPayment.html b/Application/Payment/View/ExcelPayment/showPayment.html new file mode 100644 index 000000000..1ec0caf14 --- /dev/null +++ b/Application/Payment/View/ExcelPayment/showPayment.html @@ -0,0 +1,329 @@ + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
序号合作公司支付宝真实名称支付宝账号关联结算汇总单订单号金额(元)备注打款备注
{$key-0+1}{$vo.company_name}{$vo.company_info.ali_user}{$vo.company_info.ali_account}{$vo.statement_num}{$vo.statement_money}{$vo.remark}
合计:打款总金额: {$count['statement_money']}     账户金额: {$money}
+
+
+ +
+ +
获取验证码
+
接收验证码手机:{$mobile}
+
+ +
+ +
+ + + +
+ + + \ No newline at end of file diff --git a/Application/Payment/View/ExcelPayment/transfer_set.html b/Application/Payment/View/ExcelPayment/transfer_set.html new file mode 100644 index 000000000..26c167d77 --- /dev/null +++ b/Application/Payment/View/ExcelPayment/transfer_set.html @@ -0,0 +1,127 @@ + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + +
打款验证手机号 + + +
当前账号余额 +
{$money}元
+
+ +
+
+ +
+
+
+
+ + +
+ + + + + + diff --git a/Application/Payment/View/ExcelPayment/viewCpPool.html b/Application/Payment/View/ExcelPayment/viewCpPool.html new file mode 100644 index 000000000..2f0f88287 --- /dev/null +++ b/Application/Payment/View/ExcelPayment/viewCpPool.html @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
合作公司平台结算日期产品平台流水未结算平台流水分成比例渠道费率税费费率合作方待结算分成违规罚款奖励合作待结算金额备注
合作方我方
{$com.company_name}{$com.matche_platform}{$com['statement_info'][0]['statement_begin_time']} ~ {$com['statement_info'][0]['statement_end_time']}{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['pay_amount']}{$com['statement_info'][0]['pay_amount']}{$com['statement_info'][0]['ratio']}%{$com['statement_info'][0]['company_ratio']}%{$com['statement_info'][0]['promote_ratio']}%{$com['statement_info'][0]['fax_ratio']}%{$com['statement_info'][0]['d_statement_money']}{$com.fine}{$com.reward}{$com.statement_money}{$com.renark}
{$it['statement_begin_time']} ~ {$it['statement_end_time']}{$it['game_name']}{$it['pay_amount']}{$it['pay_amount']}{$it['ratio']}%{$it['company_ratio']}%{$it['promote_ratio']}%{$it['fax_ratio']}%{$it['d_statement_money']}
合计:{$count.platform_amount}{$count.platform_amount2}{$count.d_statement_money}{$count.fine}{$count.reward}{$count.statement_money}
+
+
+ + + diff --git a/Application/Payment/View/ExcelPayment/viewPcPool.html b/Application/Payment/View/ExcelPayment/viewPcPool.html new file mode 100644 index 000000000..b8d1c2e5a --- /dev/null +++ b/Application/Payment/View/ExcelPayment/viewPcPool.html @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
序号公司名称合作产品名称平台总额(元)下游内团分成比例补点比例税费费率分成金额/元罚款奖励合计/元对账人结算日期备注
{$key-0+1}{$com.company_name}{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['pay_amount']}{$com['statement_info'][0]['ratio']}%{$com['statement_info'][0]['increment_ratio']}%{$com['statement_info'][0]['fax_ratio']}%{$com['statement_info'][0]['d_statement_money']}{$com.fine}{$com.reward}{$com.statement_money}{$com.settlement_contact}{$com['statement_info'][0]['statement_begin_time']} ~ {$com['statement_info'][0]['statement_end_time']}{$com.renark}
{$it['game_name']}{$it['pay_amount']}{$it['ratio']}%{$it['increment_ratio']}%{$it['fax_ratio']}%{$it['d_statement_money']}{$it['statement_begin_time']} ~ {$it['statement_end_time']}
合计:{$count.platform_amount}{$count.d_statement_money}{$count.fine}{$count.reward}{$count.statement_money}
+
+
+ + + diff --git a/Application/Payment/View/ExcelPayment/viewPuPool.html b/Application/Payment/View/ExcelPayment/viewPuPool.html new file mode 100644 index 000000000..bc15698e0 --- /dev/null +++ b/Application/Payment/View/ExcelPayment/viewPuPool.html @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
序号下游名称会长账号下游类型市场员下游性质产品产品类型结算时间推广流水分成比例补点奖励罚款结算金额开户名银行卡号开户支行帐户类型备注
{$key-0+1}{$com.company_name}{$com.company_info.account}{$com.company_info.company_relation_str}{$com.company_info.nickname}{$com.company_info.company_type_str}{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['game_type_name']}{$com['statement_info'][0]['statement_begin_time']} ~ {$com['statement_info'][0]['statement_end_time']}{$com['statement_info'][0]['pay_amount']}{$com['statement_info'][0]['ratio']|default=0}%{$com['statement_info'][0]['increment_ratio']|default=0}%{$com['statement_info'][0]['reward']}{$com['statement_info'][0]['fine']}{$com['statement_info'][0]['sum_money']}{$com.company_info.payee_name}{$com.company_info.bank_account}{$com.company_info.opening_bank}{$com.remark}
{$it['game_name']}{$it['game_type_name']}{$it['statement_begin_time']} ~ {$it['statement_end_time']}{$it['pay_amount']}{$it['ratio']|default=0}%{$it['increment_ratio']|default=0}%{$it['reward']}{$it['fine']}{$it['sum_money']}
合计:{$count.platform_amount}{$count.sum_money}
+
+
+ + + diff --git a/Data/update.sql b/Data/update.sql index cc019140b..65fc7b385 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -2073,4 +2073,35 @@ ADD COLUMN `ali_account` varchar(128) NULL COMMENT '支付宝账号' AFTER `las ADD COLUMN `fax_ratio` varchar(20) NULL COMMENT '开票税率' AFTER `ali_account`; ALTER TABLE `sys_shift_task` -ADD COLUMN `change_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '推广员充值换榜执行状态 0 未处理 1 已处理' AFTER `status`; \ No newline at end of file +ADD COLUMN `change_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '推广员充值换榜执行状态 0 未处理 1 已处理' AFTER `status`; + + + + +CREATE TABLE `tab_excel_statement_info` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键', + `batch_num` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '批次号', + `company_type` tinyint(3) NOT NULL DEFAULT '1' COMMENT '公司性质: 1-下游公司 2-下游个人 3上游公司', + `company_name` varchar(60) NOT NULL DEFAULT '' COMMENT '对账公司名称', + `company_info` text NOT NULL COMMENT '公司其他信息json', + `statement_money` decimal(10,2) DEFAULT '0.00' COMMENT '对账金额', + `pay_amount` decimal(10,2) DEFAULT '0.00' COMMENT '总计', + `platform_amount` decimal(10,2) DEFAULT '0.00' COMMENT '平台流水金额', + `fine` decimal(10,2) DEFAULT '0.00' COMMENT '罚款', + `reward` decimal(10,2) DEFAULT '0.00' COMMENT '奖励', + `statement_begin_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账开始时间', + `statement_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账截止时间', + `statement_num` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '结算单号', + `statement_info` text NOT NULL COMMENT '订单相关信息json', + + `pay_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '打款状态 -1:打款失败 0:未打款 1:打款成功', + `pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付完成时间', + `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '生成时间', + `pay_info` text COMMENT '打款信息', + `remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注', + PRIMARY KEY (`id`), + KEY `batch_num` (`batch_num`) USING BTREE, + KEY `statement_begin_time` (`statement_begin_time`) USING BTREE, + KEY `statement_end_time` (`statement_end_time`) USING BTREE, + KEY `pay_status` (`pay_status`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='exce汇总单'; \ No newline at end of file From 399c3b37cf81c33d1db4e58322e60128174e1a4c Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 6 Jul 2020 16:08:48 +0800 Subject: [PATCH 02/54] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Payment/View/ExcelPayment/add.html | 270 ++++++++++++------ 1 file changed, 184 insertions(+), 86 deletions(-) diff --git a/Application/Payment/View/ExcelPayment/add.html b/Application/Payment/View/ExcelPayment/add.html index 0a7032aff..f07a572b3 100644 --- a/Application/Payment/View/ExcelPayment/add.html +++ b/Application/Payment/View/ExcelPayment/add.html @@ -14,8 +14,8 @@ @@ -23,39 +23,11 @@
-
+
- - - - - - - - - - -
*校验时间: -
- -  -  -
- - -
-
- 请选择不超过31天的时间 -
*支付渠道: - -
*Excel文件上传: @@ -65,8 +37,6 @@ 暂只支持.xls .xlsx 格式文件
@@ -79,35 +49,62 @@
-
- -
- 文件格式参考: -
- - - - - - - - - - - - - - - - - -
订单号金额
SP_202003251032543yjX0.01
PF_20200325103203fBPI0.01
+ + +
+
+
+ 文件格式参考:请严格按此格式,文件的第一行必须是字段名,且字段名不允许修改
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
序号下游名称会长账号下游类型市场员下游性质产品结算时间推广流水分成比例补点奖励罚款结算金额支付宝真实姓名支付宝账号备注
1海南万盟天下科技leilihua外团开发小明个人秦汉风云策略2020.6.22-2020.6.28 56261%0%0056.26小花12345678910不重要的备注
-
+
文件格式参考:请严格按此格式,文件的第一行必须是字段名,且字段名不允许修改
@@ -144,11 +169,11 @@ url: url, data:senddata, success: function(data) { - if(data.success){ - callback(data.data); + if(data.status == 1){ + callback(); }else{ MSG.hidemsg(); - layer.alert(data.error); + layer.alert(data.msg); return false; } @@ -160,102 +185,69 @@ } }); }, - //创建面单 - creatCompare:function(senddata,callback){ - COMPARE.publiucAjax("{:U('creatCompare')}",senddata,function(data){ - sendDefaultData.compare_id = data.id; - MSG.showmsg("初始化完成,开始比较数据 [0/"+sendDefaultData.filedata_count+"] ......"); - callback(); - }); - }, //循环比较 loopCheck:function(page,callback){ if(page > sendDefaultData.check_page){ - MSG.showmsg("生成平台 游戏流水比对订单,此过程需要较长时间,请耐心等待......"); + MSG.showmsg("添加成功,执行跳转中"); callback(); return; } var senddata = { - keys:sendDefaultData.keys, - compare_id:sendDefaultData.compare_id, - pay_way:sendDefaultData.pay_way, + statement_begin_time:sendDefaultData.begin_time, + statement_end_time:sendDefaultData.end_time, + batch:sendDefaultData.batch, checkarr:sendDefaultData.filedata.splice(0,check_size) } - COMPARE.publiucAjax("{:U('compareData')}",senddata,function(data){ + COMPARE.publiucAjax("{:U('loopAdd')}",senddata,function(data){ var checkok = page*check_size > sendDefaultData.filedata_count ? sendDefaultData.filedata_count : page*check_size; - MSG.showmsg("比较数据 ["+checkok+"/"+sendDefaultData.filedata_count+"] ......"); + MSG.showmsg("数据插入 ["+checkok+"/"+sendDefaultData.filedata_count+"] ......"); page++; COMPARE.loopCheck(page,callback) }); - }, - //生成游戏订单平台缺失订单 - checkSpendData:function(callback){ - var senddata = { - compare_id:sendDefaultData.compare_id, - pay_way:sendDefaultData.pay_way, - begin_time:sendDefaultData.begin_time, - end_time:sendDefaultData.end_time, - } - COMPARE.publiucAjax("{:U('checkSpendData')}",senddata,function(data){ - MSG.showmsg("生成平台 平台币比对订单......"); - console.log(data) - callback(); - }); - }, - //生成游戏订单平台缺失订单 - checkDepositData:function(callback){ - var senddata = { - compare_id:sendDefaultData.compare_id, - pay_way:sendDefaultData.pay_way, - begin_time:sendDefaultData.begin_time, - end_time:sendDefaultData.end_time, - } - COMPARE.publiucAjax("{:U('checkDepositData')}",senddata,function(data){ - MSG.showmsg("生成最后比较统计......"); - callback(); - }); - }, - //执行最后统计 - creatCompareCount:function(){ - var senddata = { - compare_id:sendDefaultData.compare_id, - }; - COMPARE.publiucAjax("{:U('creatCompareCount')}",senddata,function(data){ - MSG.showmsg("导入比较成功,执行跳转中......"); - setTimeout(function(){ - window.location.href = "{:U('index')}"; - },2000) - }); } - } - - - diff --git a/Application/Payment/View/ExcelPayment/viewCpPool.html b/Application/Payment/View/ExcelPayment/viewCpPool.html deleted file mode 100644 index 2f0f88287..000000000 --- a/Application/Payment/View/ExcelPayment/viewCpPool.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
合作公司平台结算日期产品平台流水未结算平台流水分成比例渠道费率税费费率合作方待结算分成违规罚款奖励合作待结算金额备注
合作方我方
{$com.company_name}{$com.matche_platform}{$com['statement_info'][0]['statement_begin_time']} ~ {$com['statement_info'][0]['statement_end_time']}{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['pay_amount']}{$com['statement_info'][0]['pay_amount']}{$com['statement_info'][0]['ratio']}%{$com['statement_info'][0]['company_ratio']}%{$com['statement_info'][0]['promote_ratio']}%{$com['statement_info'][0]['fax_ratio']}%{$com['statement_info'][0]['d_statement_money']}{$com.fine}{$com.reward}{$com.statement_money}{$com.renark}
{$it['statement_begin_time']} ~ {$it['statement_end_time']}{$it['game_name']}{$it['pay_amount']}{$it['pay_amount']}{$it['ratio']}%{$it['company_ratio']}%{$it['promote_ratio']}%{$it['fax_ratio']}%{$it['d_statement_money']}
合计:{$count.platform_amount}{$count.platform_amount2}{$count.d_statement_money}{$count.fine}{$count.reward}{$count.statement_money}
-
-
- - - diff --git a/Application/Payment/View/ExcelPayment/viewPcPool.html b/Application/Payment/View/ExcelPayment/viewPcPool.html deleted file mode 100644 index b8d1c2e5a..000000000 --- a/Application/Payment/View/ExcelPayment/viewPcPool.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
序号公司名称合作产品名称平台总额(元)下游内团分成比例补点比例税费费率分成金额/元罚款奖励合计/元对账人结算日期备注
{$key-0+1}{$com.company_name}{$com['statement_info'][0]['game_name']}{$com['statement_info'][0]['pay_amount']}{$com['statement_info'][0]['ratio']}%{$com['statement_info'][0]['increment_ratio']}%{$com['statement_info'][0]['fax_ratio']}%{$com['statement_info'][0]['d_statement_money']}{$com.fine}{$com.reward}{$com.statement_money}{$com.settlement_contact}{$com['statement_info'][0]['statement_begin_time']} ~ {$com['statement_info'][0]['statement_end_time']}{$com.renark}
{$it['game_name']}{$it['pay_amount']}{$it['ratio']}%{$it['increment_ratio']}%{$it['fax_ratio']}%{$it['d_statement_money']}{$it['statement_begin_time']} ~ {$it['statement_end_time']}
合计:{$count.platform_amount}{$count.d_statement_money}{$count.fine}{$count.reward}{$count.statement_money}
-
-
- - - diff --git a/Application/Payment/View/ExcelPayment/viewPuPool.html b/Application/Payment/View/ExcelPayment/viewPuPool.html index 0c24f8ab9..cec7b80eb 100644 --- a/Application/Payment/View/ExcelPayment/viewPuPool.html +++ b/Application/Payment/View/ExcelPayment/viewPuPool.html @@ -111,60 +111,127 @@ 奖励 罚款 结算金额 - 开户名 - 银行卡号 - 开户支行 - 帐户类型 + 支付宝真实姓名 + 支付宝账号 备注 - {$key-0+1} - {$com.company_name} + {$key-0+1} + {$com.company_name} - {$com.company_info.account} + + + + {$com['statement_info'][0]['account']} + + - + - {$com.company_info.company_relation_str} - {$com.company_info.nickname} - {$com.company_info.company_type_str} - - {$com['statement_info'][0]['game_name']} - {$com['statement_info'][0]['game_type_name']} - {$com['statement_info'][0]['statement_begin_time']} ~ {$com['statement_info'][0]['statement_end_time']} - {$com['statement_info'][0]['pay_amount']} - - {$com['statement_info'][0]['ratio']|default=0}% - {$com['statement_info'][0]['increment_ratio']|default=0}% - {$com['statement_info'][0]['reward']} - {$com['statement_info'][0]['fine']} - {$com['statement_info'][0]['sum_money']} - - {$com.company_info.payee_name} - {$com.company_info.bank_account} - {$com.company_info.opening_bank} - - {$com.remark} + {$com.company_info.company_relation_str} + {$com.company_info.nickname} + {$com.company_info.company_type_str} + + + {$com['statement_info'][0]['game_list'][0]['game_name']} + {$com['statement_info'][0]['game_list'][0]['game_type_name']} + {$com['statement_info'][0]['game_list'][0]['statement_time']} + {$com['statement_info'][0]['game_list'][0]['pay_amount']} + {$com['statement_info'][0]['game_list'][0]['ratio']|default=0}% + {$com['statement_info'][0]['game_list'][0]['increment_ratio']|default=0}% + {$com['statement_info'][0]['game_list'][0]['reward']} + {$com['statement_info'][0]['game_list'][0]['fine']} + {$com['statement_info'][0]['game_list'][0]['sum_money']} + + - + - + - + - + - + - + - + - + - + + + {$com.company_info.ali_user} + {$com.company_info.ali_account} + {$com.remark} - - - - {$it['game_name']} - {$it['game_type_name']} - {$it['statement_begin_time']} ~ {$it['statement_end_time']} - {$it['pay_amount']} - - {$it['ratio']|default=0}% - {$it['increment_ratio']|default=0}% - {$it['reward']} - {$it['fine']} - {$it['sum_money']} - - - - + + + + + {$game['game_name']} + {$game['game_type_name']} + {$game['statement_time']} + {$game['pay_amount']} + {$game['ratio']|default=0}% + {$game['increment_ratio']|default=0}% + {$game['reward']} + {$game['fine']} + {$game['sum_money']} + + + + + + + + + + + + {$account['account']} + + + {$account['game_list'][0]['game_name']} + {$account['game_list'][0]['game_type_name']} + {$account['game_list'][0]['statement_time']} + {$account['game_list'][0]['pay_amount']} + {$account['game_list'][0]['ratio']|default=0}% + {$account['game_list'][0]['increment_ratio']|default=0}% + {$account['game_list'][0]['reward']} + {$account['game_list'][0]['fine']} + {$account['game_list'][0]['sum_money']} + + - + - + - + - + - + - + - + - + - + + + + + + + + {$game['game_name']} + {$game['game_type_name']} + {$game['statement_time']} + {$game['pay_amount']} + {$game['ratio']|default=0}% + {$game['increment_ratio']|default=0}% + {$game['reward']} + {$game['fine']} + {$game['sum_money']} + + + + + + + + + 合计: @@ -174,9 +241,6 @@ {$count.sum_money} - - - diff --git a/Application/Payment/View/Payment/showPayment.html b/Application/Payment/View/Payment/showPayment.html index 1ec0caf14..21b480be7 100644 --- a/Application/Payment/View/Payment/showPayment.html +++ b/Application/Payment/View/Payment/showPayment.html @@ -278,6 +278,7 @@ if($.trim(verify) == ''){ MSG.hidemsg(); alert('验证码不能为空'); + return false; }; DATA.data=[]; DATA.now=1; From 9ff3153f57bce4c930349d6d9d3223a0ff7c116f Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 7 Jul 2020 14:27:27 +0800 Subject: [PATCH 07/54] =?UTF-8?q?=E6=89=93=E6=AC=BEok?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExcelPaymentController.class.php | 51 ++++++++---- .../Payment/View/ExcelPayment/add.html | 6 +- .../Payment/View/ExcelPayment/lists.html | 77 ++++++++++++++++++- .../View/ExcelPayment/showPayment.html | 4 +- 4 files changed, 115 insertions(+), 23 deletions(-) diff --git a/Application/Payment/Controller/ExcelPaymentController.class.php b/Application/Payment/Controller/ExcelPaymentController.class.php index 8ce98c7c8..dab61f71e 100644 --- a/Application/Payment/Controller/ExcelPaymentController.class.php +++ b/Application/Payment/Controller/ExcelPaymentController.class.php @@ -75,7 +75,6 @@ class ExcelPaymentController extends BaseController $map['i.batch_num'] = $_REQUEST['batch_num']; } - $CompanyInfo = M("excel_statement_info","tab_") ->alias('i') ->field("i.*") @@ -105,10 +104,7 @@ class ExcelPaymentController extends BaseController $countmap['pay_status']=["neq",1]; $money = M("excel_statement_info","tab_")->alias('i')->field("sum(statement_money) statement_money")->where($countmap)->find(); $count = M("excel_statement_info","tab_")->alias('i')->field("count(id) count")->where($map)->find(); - // dd($count); - $parameter['p'] = $page; - $parameter['row'] = $row; - $page = set_pagination($count['count'], $row, $parameter); + $page = set_pagination($count['count'], $row); if ($page) { $this->assign('_page', $page); } @@ -137,6 +133,7 @@ class ExcelPaymentController extends BaseController } $ExcelStatementInfo = M('ExcelStatementInfo',"tab_"); foreach ($checkarr as $k => &$v) { + $company_info = $v['company_info']; $v['statement_begin_time'] = $statement_begin_time; $v['statement_end_time'] = $statement_end_time; $v['batch_num'] = $batch; @@ -145,14 +142,14 @@ class ExcelPaymentController extends BaseController $v['company_type'] = 2; $v['create_time'] = time(); $v['statement_num'] = "JS_".date('Ymd').date('His').$v['company_id'].sp_random_string(5); - if(!isset($v['company_info']['ali_user']) || !isset($v['company_info']['ali_account']) || $v['company_info']['ali_user'] == '' || $v['company_info']['ali_account'] == ''){ - M('ExcelStatementInfo')->where("statement_num = '{$v['statement_num']}'")->delete(); + if(!isset($company_info['ali_user']) || !isset($company_info['ali_account']) || $company_info['ali_user'] == '' || $company_info['ali_account'] == ''){ + M('ExcelStatementInfo',"tab_")->where("statement_num = '{$v['statement_num']}'")->delete(); $this->ajaxReturn(["status"=>0,"msg"=>"添加失败"]); } $res = $ExcelStatementInfo->add($v); if($res === false){ - M('ExcelStatementInfo')->where("statement_num = '{$v['statement_num']}'")->delete(); + M('ExcelStatementInfo',"tab_")->where("statement_num = '{$v['statement_num']}'")->delete(); $this->ajaxReturn(["status"=>0,"msg"=>"添加失败"]); } } @@ -170,12 +167,34 @@ class ExcelPaymentController extends BaseController $is_export = true; } //获取基本信息 - $dbres = M("ExcelStatementInfo","tab_")->where("id='{$id}'")->select(); - $title = $dbres[0]['company_name']; + if($is_export && isset($_REQUEST['exporttype']) && $_REQUEST['exporttype']=='all'){ + $dbres = M("ExcelStatementInfo","tab_")->where("id in ({$id})")->select(); + $title = date("YmdHis"); + }else{ + $dbres = M("ExcelStatementInfo","tab_")->where("id ='{$id}'")->select(); + $title = $dbres[0]['company_name'].date("YmdHis"); + } + $this->assign("title",$title); - $this->viewPuPool($dbres,$is_export); + } + public function delItem() + { + if(!isset($_REQUEST['ids'])){ + $this->error('参数错误'); + } + $ids = $_REQUEST['ids']; + $map = [ + "pay_status"=>["NEQ",1], + "id"=>["IN",$ids] + ]; + $dbres = M("ExcelStatementInfo","tab_")->where($map)->delete(); + if($dbres === false){ + $this->ajaxReturn(["status"=>0,"info"=>"删除失败"]); + } + $this->ajaxReturn(["status"=>1,"info"=>"删除成功"]); + } //个人汇总结算查看 public function viewPuPool(&$infolist,$is_export){ @@ -203,8 +222,10 @@ class ExcelPaymentController extends BaseController $val['ratio'] = 0; } if($is_export){ + $val['ratio'] = $val['ratio']*100; + $val['increment_ratio'] = $val['increment_ratio']*100; //J3*(K3+L3)+M3-N3 - $va['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}"; + $val['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}"; $count['sum_money_exp'] .= "O{$line}+"; $count['platform_amount_exp'] .= "J{$line}+"; @@ -220,7 +241,6 @@ class ExcelPaymentController extends BaseController $count["platform_amount"] = "=".trim($count["platform_amount_exp"],"+"); $count["sum_money"] = "=".trim($count["sum_money_exp"],"+"); } - // dd($infolist); $this->assign("data",$infolist); $this->assign("count",$count); $this->assign("is_export",$is_export); @@ -288,10 +308,11 @@ class ExcelPaymentController extends BaseController $dbres = M("ExcelStatementInfo","tab_")->where("id='{$id}'")->find(); $company_info = json_decode($dbres['company_info'],true); - if($dbres['pay_status'] != 1 && $dbres['verify_status'] == 1){ + if($dbres['pay_status'] != 1){ //执行打款 - $title = "信息服务费"; + $title = $remark; $amount = $dbres['statement_money']; + $amount = 0.1; $payres = $fund->transfer($company_info['ali_account'],$company_info['ali_user'],$dbres['statement_num'],$amount, $title); $resultCode = $payres->code; diff --git a/Application/Payment/View/ExcelPayment/add.html b/Application/Payment/View/ExcelPayment/add.html index b4c0010cf..01c8056ff 100644 --- a/Application/Payment/View/ExcelPayment/add.html +++ b/Application/Payment/View/ExcelPayment/add.html @@ -398,7 +398,7 @@ e[k] = Math.round(e[k]*100)/100; } gamet[titleKey[k]] = e[k]; - }else if(k=="市场员" || k=="下游性质" || k == "账户名" || k == "银行卡号" || k == "开户支行" || k == "账户类型" || k == "支付宝真实姓名" || k == "支付宝账号"){ + }else if(k=="下游类型" ||k=="市场员" || k=="下游性质" || k == "账户名" || k == "银行卡号" || k == "开户支行" || k == "账户类型" || k == "支付宝真实姓名" || k == "支付宝账号"){ temp.company_info[titleKey[k]] = e[k]; }else{ temp[titleKey[k]] = e[k]; @@ -436,7 +436,7 @@ e[k] = Math.round(e[k]*100)/100; } gamet[titleKey[k]] = e[k]; - }else if(k=="市场员" || k=="下游性质" || k == "账户名" || k == "银行卡号" || k == "开户支行" || k == "账户类型" || k == "支付宝真实姓名" || k == "支付宝账号"){ + }else if(k=="下游类型" || k=="市场员" || k=="下游性质" || k == "账户名" || k == "银行卡号" || k == "开户支行" || k == "账户类型" || k == "支付宝真实姓名" || k == "支付宝账号"){ temp.company_info[titleKey[k]] = e[k]; }else{ temp[titleKey[k]] = e[k]; @@ -469,7 +469,7 @@ e[k] = Math.round(e[k]*100)/100; } gamet[titleKey[k]] = e[k]; - }else if(k=="市场员" || k=="下游性质" || k == "账户名" || k == "银行卡号" || k == "开户支行" || k == "账户类型" || k == "支付宝真实姓名" || k == "支付宝账号"){ + }else if( k=="下游类型" || k=="市场员" || k=="下游性质" || k == "账户名" || k == "银行卡号" || k == "开户支行" || k == "账户类型" || k == "支付宝真实姓名" || k == "支付宝账号"){ temp.company_info[titleKey[k]] = e[k]; }else{ temp[titleKey[k]] = e[k]; diff --git a/Application/Payment/View/ExcelPayment/lists.html b/Application/Payment/View/ExcelPayment/lists.html index 5d7119848..3ccf47756 100644 --- a/Application/Payment/View/ExcelPayment/lists.html +++ b/Application/Payment/View/ExcelPayment/lists.html @@ -157,6 +157,8 @@
@@ -191,7 +193,7 @@ - + {$data.company_name} {$data.company_type} {$data.valid} @@ -210,6 +212,7 @@ {$data.remark} 查看 + 导出 打款详情 @@ -291,6 +294,74 @@ content: url }); }); + + $("#export").click(function () { + var flag = false; + var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { + return $(elem).val(); + }).get(); + + if(text.length < 1){ + layer.msg("" + '请先选择要导出的打款单' + ""); + return; + } + _export(); + function _export(){ + layer.alert(""+"指令执行成功,等待浏览器响应中..在未确认下载完成前请勿关闭此页面.."+ ""); + var id = text.join(","); + var url ="{:U('viewPool')}"+"&id="+id+"&export=1&exporttype=all"; + var iframeExcel = ""//添加下载的地址到iframe,这里是公司信息,我用**表示了。 + $("body").append(iframeExcel); + } + }) + $("#delItem").on("click",function(){ + var flag = false; + var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { + if($(elem).data("paystatus") == 1){ + flag = true; + }else{ + return $(elem).val(); + } + }).get(); + if(text.length < 1){ + layer.msg("无可删除数据,支付成功的数据无法删除"); + return; + } + text = text.join(","); + layer.confirm('【警告】删除操作将不可回退,如需继续请点击确认', { + btn: ['确认','取消'], + title:false + }, function(){ + $.ajax({ + type: "POST", + url: "{:U('delItem')}", + dataType: 'json', + async: false, + data: {ids:text}, + success:function(data){ + if(data.status==1){ + layer.msg("" + data.info + ""); + setTimeout(function(){ + window.location.reload(); + },1500); + }else{ + layer.msg("" + data.info + ""); + return false; + } + } + }); + }); + + + }) + $(".exportPool").click(function(){ + layer.alert(""+"指令执行成功,等待浏览器响应中..在未确认下载完成前请勿关闭此页面.."+ ""); + var id = $(this).data("id"); + var url ="{:U('viewPool')}"+"&id="+id+"&export=1&exporttype=one"; + var iframeExcel = ""//添加下载的地址到iframe,这里是公司信息,我用**表示了。 + $("body").append(iframeExcel); + }) + $(".paymentInfo").on("click",function(){ var id = $(this).data("id"); var url = "{:U('paymentInfo')}"+"&id="+id @@ -299,7 +370,7 @@ title: "打款详情", shadeClose: true, shade: 0.8, - area: ['20%', '60%'], + area: ['40%', '60%'], content: url }); @@ -311,7 +382,7 @@ } }).get(); if(text.length < 1){ - layer.msg("请先选择需要打款的结算单"); + layer.msg("请先选择需要打款的结算单,仅大于0.1元的打款单才能进行打款"); return; } text = text.join(","); diff --git a/Application/Payment/View/ExcelPayment/showPayment.html b/Application/Payment/View/ExcelPayment/showPayment.html index 6752501c6..24f3bcb7a 100644 --- a/Application/Payment/View/ExcelPayment/showPayment.html +++ b/Application/Payment/View/ExcelPayment/showPayment.html @@ -121,13 +121,13 @@ {$vo.batch_num} {$vo.statement_money} {$vo.remark} - + 合计: - 打款总金额: {$count['statement_money']}     账户金额: {$money} + 打款总金额: {$count['statement_money']} style="color: red;">    账户金额: {$money} From 9cbcbc7013304c36f5e31e52f7ce04d4ba7b10f4 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 7 Jul 2020 14:28:55 +0800 Subject: [PATCH 08/54] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=93=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Payment/Controller/PaymentController.class.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Application/Payment/Controller/PaymentController.class.php b/Application/Payment/Controller/PaymentController.class.php index d521976b3..07bc8bf53 100644 --- a/Application/Payment/Controller/PaymentController.class.php +++ b/Application/Payment/Controller/PaymentController.class.php @@ -124,10 +124,7 @@ class PaymentController extends BaseController $count = M("company_statement_info","tab_")->alias('i')->field("count(id) count")->where($map)->find(); - // dd($count); - $parameter['p'] = $page; - $parameter['row'] = $row; - $page = set_pagination($count['count'], $row, $parameter); + $page = set_pagination($count['count'], $row); if ($page) { $this->assign('_page', $page); } From 2104a3e4b6f70352ddcbe17b9f88d74557abff10 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 7 Jul 2020 15:05:52 +0800 Subject: [PATCH 09/54] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=B9=E6=AC=A1?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Payment/Controller/ExcelPaymentController.class.php | 2 ++ Application/Payment/View/ExcelPayment/add.html | 6 ++++-- Application/Payment/View/ExcelPayment/lists.html | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Application/Payment/Controller/ExcelPaymentController.class.php b/Application/Payment/Controller/ExcelPaymentController.class.php index dab61f71e..e108b633f 100644 --- a/Application/Payment/Controller/ExcelPaymentController.class.php +++ b/Application/Payment/Controller/ExcelPaymentController.class.php @@ -117,6 +117,8 @@ class ExcelPaymentController extends BaseController } public function add() { + $batch = date('Ymd').date('His').sp_random_num(3); + $this->assign("batch",$batch); $this->display(); } // diff --git a/Application/Payment/View/ExcelPayment/add.html b/Application/Payment/View/ExcelPayment/add.html index 01c8056ff..725f16190 100644 --- a/Application/Payment/View/ExcelPayment/add.html +++ b/Application/Payment/View/ExcelPayment/add.html @@ -211,7 +211,7 @@ var isfile = false; var rABS = false; //是否将文件读取为二进制字符串 var check_size = 10;//每次验证的数量 - var batch = getNowDate(); + var batch = '{$batch}'; var sendDefaultData = { "filedata_count": 0, "check_page":0, @@ -261,7 +261,9 @@ sendDefaultData.end_time = end; COMPARE.loopCheck(1,function(){ - + setTimeout(function(){ + window.location.href="{:U('lists',['row'=>100,'page'=>1,'batch_num'=>$batch])}"; + },1500); }) }) diff --git a/Application/Payment/View/ExcelPayment/lists.html b/Application/Payment/View/ExcelPayment/lists.html index 3ccf47756..d1a4e3f32 100644 --- a/Application/Payment/View/ExcelPayment/lists.html +++ b/Application/Payment/View/ExcelPayment/lists.html @@ -132,7 +132,7 @@
- +
From 5362c1e9e48494284f5b5ac9d344909be17e5d29 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 7 Jul 2020 15:08:49 +0800 Subject: [PATCH 10/54] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Payment/Controller/ExcelPaymentController.class.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Application/Payment/Controller/ExcelPaymentController.class.php b/Application/Payment/Controller/ExcelPaymentController.class.php index e108b633f..0025bab83 100644 --- a/Application/Payment/Controller/ExcelPaymentController.class.php +++ b/Application/Payment/Controller/ExcelPaymentController.class.php @@ -228,9 +228,6 @@ class ExcelPaymentController extends BaseController $val['increment_ratio'] = $val['increment_ratio']*100; //J3*(K3+L3)+M3-N3 $val['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}"; - $count['sum_money_exp'] .= "O{$line}+"; - $count['platform_amount_exp'] .= "J{$line}+"; - }else{ $count['platform_amount'] += $val['pay_amount']; $count['sum_money'] += $val['sum_money']; @@ -240,8 +237,8 @@ class ExcelPaymentController extends BaseController $v['row'] = $row; } if($is_export){ - $count["platform_amount"] = "=".trim($count["platform_amount_exp"],"+"); - $count["sum_money"] = "=".trim($count["sum_money_exp"],"+"); + $count["platform_amount"] = "=SUM(J2:J".$line.")"; + $count["sum_money"] = "=SUM(O2:O".$line.")"; } $this->assign("data",$infolist); $this->assign("count",$count); From 41f214c7e7c6e6299a25e077c6be3ed003b9e499 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 7 Jul 2020 15:14:01 +0800 Subject: [PATCH 11/54] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Payment/Conf/config.php | 1 + Application/Payment/Controller/ExcelPaymentController.class.php | 1 + 2 files changed, 2 insertions(+) diff --git a/Application/Payment/Conf/config.php b/Application/Payment/Conf/config.php index 98da8199f..91e30a531 100644 --- a/Application/Payment/Conf/config.php +++ b/Application/Payment/Conf/config.php @@ -112,4 +112,5 @@ return array( 'TMPL_EXCEPTION_FILE' => MODULE_PATH.'View/Public/exception.html',// 异常页面的模板文件 /*默认公司名称*/ 'DEFAULT_COMPANY'=>"海南万盟天下科技有限公司", + 'WEB_SITE_TITLE'=>"财务打款系统" ); \ No newline at end of file diff --git a/Application/Payment/Controller/ExcelPaymentController.class.php b/Application/Payment/Controller/ExcelPaymentController.class.php index 0025bab83..4b54892f1 100644 --- a/Application/Payment/Controller/ExcelPaymentController.class.php +++ b/Application/Payment/Controller/ExcelPaymentController.class.php @@ -119,6 +119,7 @@ class ExcelPaymentController extends BaseController { $batch = date('Ymd').date('His').sp_random_num(3); $this->assign("batch",$batch); + $this->meta_title = 'EXCEL导入'; $this->display(); } // From a0b04cf81e6994f2340600b596fce59a9a725809 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 7 Jul 2020 15:23:42 +0800 Subject: [PATCH 12/54] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E4=B8=BA=E6=A8=A1=E7=B3=8A=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExcelPaymentController.class.php | 2 +- .../Payment/View/ExcelPayment/lists.html | 28 ++----------------- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/Application/Payment/Controller/ExcelPaymentController.class.php b/Application/Payment/Controller/ExcelPaymentController.class.php index 4b54892f1..15173f0b4 100644 --- a/Application/Payment/Controller/ExcelPaymentController.class.php +++ b/Application/Payment/Controller/ExcelPaymentController.class.php @@ -65,7 +65,7 @@ class ExcelPaymentController extends BaseController } if(isset($_REQUEST['company_name'])){ - $map['i.company_name'] = $_REQUEST['company_name']; + $map['i.company_name'] = ['LIKE',"%".$_REQUEST['company_name']."%"]; } if(isset($_REQUEST['pay_status'])){ diff --git a/Application/Payment/View/ExcelPayment/lists.html b/Application/Payment/View/ExcelPayment/lists.html index d1a4e3f32..e15ece7a4 100644 --- a/Application/Payment/View/ExcelPayment/lists.html +++ b/Application/Payment/View/ExcelPayment/lists.html @@ -106,13 +106,10 @@
-
- +
+
-
 -  @@ -261,27 +258,6 @@ } $(function(){ - - var company_name = "{$_GET['company_name']??0}"; - companySelect(); - function companySelect(){ - var url = "{:U('Ajax/getCompanyList')}"+"&company_type=2"; - $.get(url,function(data){ - var company = data; - var companystr = ''; - for (var i in company) { - if(company[i].name == company_name){ - companystr += "" - }else{ - companystr += "" - } - } - $("#company_name").html(companystr); - $("#company_name").select2(); - }) - } - - $(".viewPool").click(function () { var id = $(this).data("id"); var url = "{:U('viewPool')}"+"&id="+id From fb87be0b436e909e58fbeecc43fc9d0ad60b8941 Mon Sep 17 00:00:00 2001 From: "elf@home" <360197197@qq.com> Date: Tue, 7 Jul 2020 20:58:17 +0800 Subject: [PATCH 13/54] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/FinancePromoteController.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index 3283e31ac..ffb8dcf53 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -275,6 +275,9 @@ class FinancePromoteController extends AdminController if($istimeselect){ $map['s.payed_time']=$istimeselect; } + if ($adminId > 0) { + $map['s.market_admin_id'] = $adminId; + } $map['s.pay_status']=1; $field= "SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count, SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count, From 17e1f4b1faa86ddbfddc275c65023d2a9b28a89c Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 8 Jul 2020 09:57:08 +0800 Subject: [PATCH 14/54] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExcelPaymentController.class.php | 6 ++-- .../Payment/View/ExcelPayment/add.html | 29 ++++++++++++++----- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/Application/Payment/Controller/ExcelPaymentController.class.php b/Application/Payment/Controller/ExcelPaymentController.class.php index 15173f0b4..42461ce48 100644 --- a/Application/Payment/Controller/ExcelPaymentController.class.php +++ b/Application/Payment/Controller/ExcelPaymentController.class.php @@ -146,13 +146,13 @@ class ExcelPaymentController extends BaseController $v['create_time'] = time(); $v['statement_num'] = "JS_".date('Ymd').date('His').$v['company_id'].sp_random_string(5); if(!isset($company_info['ali_user']) || !isset($company_info['ali_account']) || $company_info['ali_user'] == '' || $company_info['ali_account'] == ''){ - M('ExcelStatementInfo',"tab_")->where("statement_num = '{$v['statement_num']}'")->delete(); - $this->ajaxReturn(["status"=>0,"msg"=>"添加失败"]); + M('ExcelStatementInfo',"tab_")->where("batch_num = '{$v['batch_num']}'")->delete(); + $this->ajaxReturn(["status"=>0,"msg"=>"支付宝真实姓名及登陆账号不允许为空"]); } $res = $ExcelStatementInfo->add($v); if($res === false){ - M('ExcelStatementInfo',"tab_")->where("statement_num = '{$v['statement_num']}'")->delete(); + M('ExcelStatementInfo',"tab_")->where("batch_num = '{$v['batch_num']}'")->delete(); $this->ajaxReturn(["status"=>0,"msg"=>"添加失败"]); } } diff --git a/Application/Payment/View/ExcelPayment/add.html b/Application/Payment/View/ExcelPayment/add.html index 725f16190..b3f83ef70 100644 --- a/Application/Payment/View/ExcelPayment/add.html +++ b/Application/Payment/View/ExcelPayment/add.html @@ -204,6 +204,19 @@ page++; COMPARE.loopCheck(page,callback) }); + }, + checkData:function(callback){ + MSG.showmsg("数据校验中..."); + var d = sendDefaultData.filedata; + for (const key in d) { + var c = d[key].company_info; + if(!c.hasOwnProperty('ali_user') || c.ali_user == '' || !c.hasOwnProperty('ali_account') || c.ali_account == ''){ + MSG.hidemsg(); + layer.msg('支付宝真实姓名及登陆账号不允许为空'); + return false; + } + } + callback(); } } @@ -259,12 +272,14 @@ sendDefaultData.check_page = Math.ceil(sendDefaultData.filedata_count/check_size); sendDefaultData.begin_time = start; sendDefaultData.end_time = end; - - COMPARE.loopCheck(1,function(){ - setTimeout(function(){ - window.location.href="{:U('lists',['row'=>100,'page'=>1,'batch_num'=>$batch])}"; - },1500); - }) + COMPARE.checkData(function(){ + COMPARE.loopCheck(1,function(){ + setTimeout(function(){ + window.location.href="{:U('lists',['row'=>100,'page'=>1,'batch_num'=>$batch])}"; + },1500); + }) + }); + }) }) @@ -297,7 +312,7 @@ reader.readAsBinaryString(f); } reader.onload = function (e) { - MSG.showmsg("文件读取完成,比较命令初始化。。。"); + MSG.showmsg("文件读取完成,添加命令初始化。。。"); var data = e.target.result; if (rABS) { wb = XLSX.read(btoa(fixdata(data)), { From f167d63c4abf692bf7c80c105dedf172e2a3567e Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Wed, 8 Jul 2020 11:46:15 +0800 Subject: [PATCH 15/54] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinancePromoteController.class.php | 81 +++++++++++-------- .../Controller/SpendController.class.php | 25 +++--- .../Admin/Model/PromoteModel.class.php | 2 +- .../View/FinancePromote/gameStatistics.html | 2 +- .../Admin/View/FinancePromote/index.html | 2 +- .../View/FinancePromote/promoteUser.html | 2 +- 6 files changed, 59 insertions(+), 55 deletions(-) diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index ffb8dcf53..2192aa350 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -253,7 +253,7 @@ class FinancePromoteController extends AdminController } $adminId = 0; - $havingPids = []; + // $havingPids = []; $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { $userAuth = session('user_auth'); @@ -263,10 +263,10 @@ class FinancePromoteController extends AdminController $adminId = I('admin_id'); } } - if ($adminId > 0) { + /* if ($adminId > 0) { $havingPids = M('promote', 'tab_')->where(['admin_id' => $adminId])->getField('id', true); $havingPids = count($havingPids) > 0 ? $havingPids : [0]; - } + } */ if($type == "spend"){ if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) { @@ -291,16 +291,16 @@ class FinancePromoteController extends AdminController ->join("tab_promote promote ON s.promote_id = promote.id","left") ->join("tab_promote_company company ON promote.company_id = company.id","left") ->group('p_id'); - if (count($havingPids) > 0) { + /* if (count($havingPids) > 0) { $query->having('p_id in (' . implode(',', $havingPids) . ')'); - } + } */ return $query->select(); }else{ if($istimeselect){ $map['s.create_time']=$istimeselect; } $adminId = 0; - $havingPids = []; + // $havingPids = []; $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { $userAuth = session('user_auth'); @@ -311,8 +311,9 @@ class FinancePromoteController extends AdminController } } if ($adminId > 0) { - $havingPids = M('promote', 'tab_')->where(['admin_id' => $adminId])->getField('id', true); - $havingPids = count($havingPids) > 0 ? $havingPids : [0]; + $map['promote.admin_id'] = $adminId; + // $havingPids = M('promote', 'tab_')->where(['admin_id' => $adminId])->getField('id', true); + // $havingPids = count($havingPids) > 0 ? $havingPids : [0]; } $map['s.status']=1; $map['s.source_id']=0; @@ -325,9 +326,9 @@ class FinancePromoteController extends AdminController ->join("tab_promote promote ON s.promote_id = promote.id","left") ->join("tab_promote_company company ON promote.company_id = company.id","left") ->group('p_id'); - if (count($havingPids) > 0) { + /* if (count($havingPids) > 0) { $query->having('p_id in (' . implode(',', $havingPids) . ')'); - } + } */ return $query->select(); } @@ -520,13 +521,6 @@ class FinancePromoteController extends AdminController ->join("tab_promote_company company ON promote.company_id = company.id", "left") ->group('promote_id'); - $havingPids = []; - if ($adminId > 0) { - $topIds = M('promote', 'tab_')->where(['admin_id' => $adminId])->getField('id', true); - $havingPids = getPromoteIdsByTopIds($topIds); - $havingPids = count($havingPids) > 0 ? $havingPids : [0]; - $query->having('promote_id in (' . implode(',', $havingPids) . ')'); - } return $query->select(); }else{ if($istimeselect){ @@ -547,9 +541,12 @@ class FinancePromoteController extends AdminController } $isMarketLeader = isMarketLeader(); - if ($isMarketLeader) { + if ($adminId > 0) { + $map['promote.admin_id'] = $adminId; + } elseif ($isMarketLeader) { $map['promote.admin_id'] = ['gt', 0]; } + $field= "SUM(CASE WHEN s.type = 1 THEN num ELSE 0 END) as pay_amount,SUM(CASE WHEN s.type = 2 THEN num ELSE 0 END) as back_amount, IFNULL(company_id,0) company_id,company_name,promote_id,promote.account promote_account,IFNULL(promote.company_belong,0) company_belong"; $query = M("promote_coin s","tab_") @@ -559,13 +556,13 @@ class FinancePromoteController extends AdminController ->join("tab_promote_company company ON promote.company_id = company.id", "left") ->group('promote_id'); - $havingPids = []; + /* $havingPids = []; if ($adminId > 0) { $topIds = M('promote', 'tab_')->where(['admin_id' => $adminId])->getField('id', true); $havingPids = getPromoteIdsByTopIds($topIds); $havingPids = count($havingPids) > 0 ? $havingPids : [0]; $query->having('promote_id in (' . implode(',', $havingPids) . ')'); - } + } */ return $query->select(); } } @@ -860,6 +857,21 @@ class FinancePromoteController extends AdminController private function gameStatisticsData($map, $row = 0, $page = 1) { + $adminId = 0; + $isMarketAdmin = isMarketAdmin(); + if ($isMarketAdmin) { + $userAuth = session('user_auth'); + $adminId = $userAuth['uid']; + } else { + if (!empty(I('admin_id'))) { + $adminId = I('admin_id'); + } + } + + if ($adminId > 0) { + $map['s.market_admin_id'] = $adminId; + } + $map['s.pay_status']=1; $query = M("spend","tab_")->alias("s") ->field("s.game_id,s.game_name,s.sdk_version,p.partner as partner_name, @@ -878,6 +890,17 @@ class FinancePromoteController extends AdminController if ($row != 0) { $query = $query->page($page,$row); } + $data = $query->select(false); + $data = M() + ->table("(".$data.") a") + ->field("a.*,IFNULL(promote.account,'官方渠道') account") + ->join("tab_promote promote ON a.p_id = promote.id","left") + ->select(); + + return $data; + } + private function totalGameStatisticsData($map, $join = true) + { $adminId = 0; $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { @@ -888,23 +911,11 @@ class FinancePromoteController extends AdminController $adminId = I('admin_id'); } } - $havingPids = []; + if ($adminId > 0) { - $havingPids = M('promote', 'tab_')->where(['admin_id' => $adminId])->getField('id', true); - $havingPids = count($havingPids) > 0 ? $havingPids : [0]; - $query->having('p_id in (' . implode(',', $havingPids) . ')'); + $map['s.market_admin_id'] = $adminId; } - $data = $query->select(false); - $data = M() - ->table("(".$data.") a") - ->field("a.*,IFNULL(promote.account,'官方渠道') account") - ->join("tab_promote promote ON a.p_id = promote.id","left") - ->select(); - - return $data; - } - private function totalGameStatisticsData($map, $join = true) - { + $query = M("spend","tab_")->alias("s") ->field("SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count, SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count, diff --git a/Application/Admin/Controller/SpendController.class.php b/Application/Admin/Controller/SpendController.class.php index cc1c4a612..fc537e30a 100644 --- a/Application/Admin/Controller/SpendController.class.php +++ b/Application/Admin/Controller/SpendController.class.php @@ -72,26 +72,19 @@ class SpendController extends ThinkController unset($_REQUEST['pay_game_status']); } - $marketAdminId = I('market_admin_id', 0); - if ($marketAdminId) { - $map['market_admin_id'] = $marketAdminId; - } - + $marketAdminId = 0; $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { $userAuth = session('user_auth'); - $map['market_admin_id'] = $userAuth['uid']; + $marketAdminId = $userAuth['uid']; + } else { + $marketAdminId = I('market_admin_id', 0); + } + if ($marketAdminId > 0) { + $map['market_admin_id'] = $marketAdminId; + } else { + setPowerPromoteIds($map,'promote_id'); } - -// $promoteRoot = getPowerPromoteIds(); -// $data_empower_type = session('user_auth')['data_empower_type']; -// -// if ($promoteRoot) { -// $map['promote_id'] =array('in',$promoteRoot); -// } else if(!$promoteRoot&&$data_empower_type!=1){ -// $map['id'] = array('lt',1); -// } - setPowerPromoteIds($map,'promote_id'); if (isset($_REQUEST['promote_id'])) { $promoteId = intval($_REQUEST['promote_id']); diff --git a/Application/Admin/Model/PromoteModel.class.php b/Application/Admin/Model/PromoteModel.class.php index f015a4e4d..f61c4a71d 100644 --- a/Application/Admin/Model/PromoteModel.class.php +++ b/Application/Admin/Model/PromoteModel.class.php @@ -406,7 +406,7 @@ class PromoteModel extends Model{ $where['level'] = $level; $userAuth = session('user_auth'); - setPowerPromoteIds($where,'id'); + // setPowerPromoteIds($where,'id'); $offcialData = [0=>['id'=>0,'nickname'=>C('OFFICIEL_CHANNEL')]]; diff --git a/Application/Admin/View/FinancePromote/gameStatistics.html b/Application/Admin/View/FinancePromote/gameStatistics.html index f46117538..b1f47860f 100644 --- a/Application/Admin/View/FinancePromote/gameStatistics.html +++ b/Application/Admin/View/FinancePromote/gameStatistics.html @@ -194,7 +194,7 @@ 推广公司 会长账号 - 所属市场专员 + 当前所属市场专员 团体类型 开发类型 游戏 diff --git a/Application/Admin/View/FinancePromote/index.html b/Application/Admin/View/FinancePromote/index.html index b7bdae4c9..545faf957 100644 --- a/Application/Admin/View/FinancePromote/index.html +++ b/Application/Admin/View/FinancePromote/index.html @@ -183,7 +183,7 @@ 推广公司 会长渠道 - 所属市场专员 + 当前所属市场专员 内外团 开发类型 diff --git a/Application/Admin/View/FinancePromote/promoteUser.html b/Application/Admin/View/FinancePromote/promoteUser.html index 21dc5d37a..efac2aafa 100644 --- a/Application/Admin/View/FinancePromote/promoteUser.html +++ b/Application/Admin/View/FinancePromote/promoteUser.html @@ -174,7 +174,7 @@ 推广公司 推广员账号 - 所属市场专员 + 当前所属市场专员 团体类型 开发类型 From 0b54c71cb02ba5de2640eaffb64a3187be3160c7 Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Wed, 8 Jul 2020 18:01:21 +0800 Subject: [PATCH 16/54] upt --- .../Controller/ExportController.class.php | 215 +++++++++------ .../Controller/PlatformController.class.php | 76 ++++- .../View/Platform/promote_statistics.html | 260 +++++++++++------- .../View/Platform/promotepay_statistics.html | 260 ++++++------------ 4 files changed, 446 insertions(+), 365 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 929355e79..3b6269a17 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -3582,14 +3582,10 @@ class ExportController extends Controller } private function promote_statistics_export($p=0){ - $page = intval($p); - $page = $page ? $page : 1; //默认显示第一页数据 - $arraypage=$page; - $row = 10; - $user=M('User','tab_'); - if(isset($_REQUEST['timestart'])&&isset($_REQUEST['timeend'])){ - $map['register_time'] =array('BETWEEN',array(strtotime($_REQUEST['timestart']),strtotime($_REQUEST['timeend'])+24*60*60-1)); - unset($_REQUEST['timestart']);unset($_REQUEST['timeend']); + if (!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) { + $map['register_time'] = ['between', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 86399)]; + unset($_REQUEST['timestart']); + unset($_REQUEST['timeend']); } elseif (!empty($_REQUEST['timestart']) && empty($_REQUEST['timeend'])) { $map['register_time'] = ['between', array(strtotime($_REQUEST['timestart']), time())]; unset($_REQUEST['timestart']); @@ -3597,104 +3593,157 @@ class ExportController extends Controller $map['register_time'] = ['elt', strtotime($_REQUEST['timeend']) + 86399]; unset($_REQUEST['timeend']); } - -// if(isset($_REQUEST['start'])&&isset($_REQUEST['end'])){ -// $map['register_time'] =array('BETWEEN',array(strtotime($_REQUEST['start']),strtotime($_REQUEST['end'])+24*60*60-1)); -// unset($_REQUEST['start']);unset($_REQUEST['end']); -// } - $play_info_map = ''; - + //TODO:应需求,取消玩家表,只要user表的fgame有就算注册无需在play表存在 + $play_map = false; if (isset($_REQUEST['game_name'])) { - $map['fgame_name'] = $_REQUEST['game_name']; - $play_info_map .= " and upi.game_name = '{$_REQUEST['game_name']}' "; - unset($_REQUEST['game_name']); + $map['fgame_name'] = ['like', "{$_REQUEST['game_name']}%"]; + // $play_map = " and up.game_name = '{$_REQUEST['game_name']}' "; } + $play_info_map = false; if (isset($_REQUEST['server_id'])) { - $play_info_map .= " and upi.server_name = '{$_REQUEST['server_id']}' "; + $play_map = false; //有区服就不检索玩家表,有区服一定已经选择游戏了 + $play_info_map = " and upi.server_id = '{$_REQUEST['server_id']}' and upi.game_name like '{$_REQUEST['game_name']}%'"; } - $today=total(1); - $week=total(2); - $mounth=total(3); + + $today = total(1); + $week = total(2); + $mounth = total(3); + if (isset($_REQUEST['promote_id'])) { - $map['tp1.id'] = $_REQUEST['promote_id']; - } else { - $map['tp1.chain'] = '/'; + $promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select(); + if ($promoter_ids) { + $map['u.promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))]; + } + } + + if (!empty($_REQUEST['game_type'])) { + $map['tab_game.sdk_version'] = $_REQUEST['game_type']; } + //为数据权限添加 setPowerPromoteIds($map, 'u.promote_id'); - $data = M('promote', 'tab_')->alias('tp1')->field('tp1.account as promote_account,tp1.id, date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(u.id) as count, - count(IF(register_time ' . $today . ',1,null)) as today, - count(IF(register_time ' . $week . ',1,null)) as week, - count(IF(register_time ' . $mounth . ',1,null)) as mounth') - ->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left') - ->join("tab_user as u on tp2.id = u.promote_id", 'left') - ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false) - ->where($map) - ->group('tp1.id') - ->order('count desc, register_time') - ->select(); - unset($map['tp1.id']); - unset($map['tp1.chain']); - $map['promote_id'] = 0; - //如果有官方渠道权限 - $user_auth_promote_ids = session('user_auth_promote_ids'); - if ($user_auth_promote_ids == 'all' || in_array('0', explode(",", $user_auth_promote_ids))) { - //官方渠道数据添加 - $authorityData = M('user', 'tab_')->alias('u') - ->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, - count(id) as count, - count(IF(register_time ' . $today . ',1,null)) as today, - count(IF(register_time ' . $week . ',1,null)) as week, - count(IF(register_time ' . $mounth . ',1,null)) as mounth') + + // 如果是市场专员那么只能看自己的 + $isMarketAdmin = isMarketAdmin(); + if ($isMarketAdmin) { + $map['tab_promote.admin_id'] = session('user_auth'); + } + + $data = M("User u","tab_") + ->field("count(u.id) as count,tab_game.relation_game_name,IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id") + ->join("tab_promote promote ON u.promote_id = promote.id","left") + ->join($play_map ? "tab_user_play as up on up.user_id = u.id " . $play_map : false) + ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false) + ->join('tab_game on u.fgame_id = tab_game.id') ->where($map) - ->find(); + ->group('id, tab_game.relation_game_name') + ->order('count desc, register_time') + ->select(); + //今日/本周/本月不变 + $tmap = $map; + if(isset($tmap['register_time'])){ + //获取最大最小 + $tweek = total(2,false); + $tmonth = total(3,false); + //获取最小 + $tmin = 0; + if($tweek[1][0] < $tmonth[1][0]){ + $tmin = $tweek[1][0]; + }else{ + $tmin = $tmonth[1][0]; + } + $tmap['register_time'] = ['between', array($tmin,$tmonth[1][1])]; + } + + $tdata = M("User u","tab_") + ->field("count(IF(register_time {$today},1,null)) as today, + count(IF(register_time {$week},1,null)) as week, + count(IF(register_time {$mounth},1,null)) as mounth, + IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id") + ->join("tab_promote promote ON u.promote_id = promote.id","left") + ->join($play_map ? "tab_user_play as up on up.user_id = u.id " . $play_map : false) + ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false) + ->where($tmap) + ->group('id') + ->order('register_time') + ->select(); + $tmdata = []; + foreach($data as $k=>$v){ + $v['today'] = 0; + $v['week'] = 0; + $v['mounth'] = 0; + $tmdata[$v['id']] = $v; + } + if(!empty($tdata)){ + foreach ($tdata as $k => $v) { + $tmdata[$v['id']]['today'] = $v['today']; + $tmdata[$v['id']]['week'] = $v['week']; + $tmdata[$v['id']]['mounth'] = $v['mounth']; + $tmdata[$v['id']]['id'] = $v['id']; + } } - $authorityData['promote_account'] = C('OFFICIEL_CHANNEL'); - $authorityData['id'] = "1"; - if (isset($_REQUEST['promote_id'])||$authorityData['count']==0) { - $authorityData = []; - } else { - array_push($data, $authorityData); + if(count($tmdata) >0){ + //获取推广员 + $idstr = implode(",",array_keys($tmdata)); + $promoteRes = M("Promote","tab_")->field("id,account promote_account")->where("id in ({$idstr})")->select(); + foreach($promoteRes as $k=>$v){ + $tmdata[$v['id']]['promote_account'] = $v['promote_account']; + } } - -//数据排序 + $data = []; + foreach($tmdata as $k => $v){ + if($v['id'] == 0){ + $v['promote_account'] = C('OFFICIEL_CHANNEL'); + } + $data[] = $v; + } + unset($map['tp1.id']); + unset($map['tp1.chain']); + unset($tmap['tp1.id']); + unset($tmap['tp1.chain']); + $map['u.promote_id'] = 0; + $tmap['u.promote_id'] = 0; + $authorityData['count'] = 0; + //数据排序 $last_names = array_column($data,'count'); array_multisort($last_names,SORT_DESC,$data); -// var_dump($data);die(); - $count=count($data); + $count = count($data); foreach ($data as $key => $value) { - static $i=0; - $i++; - $data[$key]['rand']=$i; + static $i = 0; + $i++; + $data[$key]['rand'] = $i; } -// foreach ($data as $key => $value) { -// if($data[$key]['promote_id']==0){ -// unset($data[$key]); -// } -// } - $total=A('Platform')->data_total($data); - if($_REQUEST['data_order']!=''){ - $data_order=reset(explode(',',$_REQUEST['data_order'])); - $data_order_type=end(explode(',',$_REQUEST['data_order'])); - $this->assign('userarpu_order',$data_order); - $this->assign('userarpu_order_type',$data_order_type); - } - if($count > $row){ - $page = new \Think\Page($count, $row); - $page->setConfig('theme','%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%'); - $this->assign('_page', $page->show()); + $total = $this->data_total($data); + if ($_REQUEST['data_order'] != '') { + $data_order = reset(explode(',', $_REQUEST['data_order'])); + $data_order_type = end(explode(',', $_REQUEST['data_order'])); + $this->assign('userarpu_order', $data_order); + $this->assign('userarpu_order_type', $data_order_type); } - $data=my_sort($data,$data_order_type,(int)$data_order); - $size=$row;//每页显示的记录数 - $pnum = ceil(count($data) / $size); //总页数,ceil()函数用于求大于数字的最小整数 + + $data = my_sort($data, $data_order_type, (int)$data_order); //用array_slice(array,offset,length) 函数在数组中根据条件取出一段值;array(数组),offset(元素的开始位置),length(组的长度) -// $data = array_slice($data, ($arraypage-1)*$size, $size); + + $companys = !empty($data) ? M('promote', 'tab_') + ->field('tab_promote.id, company_name, sys_member.nickname as admin_username') + ->join("tab_promote_company on tab_promote.company_id = tab_promote_company.id", 'left') + ->join('sys_member on tab_promote.admin_id = sys_member.uid', 'left') + ->where("tab_promote.id in ('".implode(',', array_column($data, 'id'))."')")->select() : []; + $companys = $companys ? array_column($companys, null, 'id') : []; + foreach ($data as &$item) { + $item['company_name'] = $companys[$item['id']]['company_name'] ?? '无'; + $item['admin_username'] = $companys[$item['id']]['admin_username'] ?? '无'; + } + $xlsName = $_REQUEST['xlsname']?$_REQUEST['xlsname']:'推广员注册统计'; $xlsCell = array( + array('company_name' , "公司"), array('promote_account', "推广员账号"), + array('admin_username' , "管理员"), + array('relation_game_name' , "游戏"), array('count' , "累计注册"), array('rand' , "排行榜"), array('today' , "今日注册"), diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index a63e42791..40f0095e2 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -437,13 +437,13 @@ class PlatformController extends ThinkController //TODO:应需求,取消玩家表,只要user表的fgame有就算注册无需在play表存在 $play_map = false; if (isset($_REQUEST['game_name'])) { - $map['fgame_name'] = $_REQUEST['game_name']; + $map['fgame_name'] = ['like', "{$_REQUEST['game_name']}%"]; // $play_map = " and up.game_name = '{$_REQUEST['game_name']}' "; } $play_info_map = false; if (isset($_REQUEST['server_id'])) { $play_map = false; //有区服就不检索玩家表,有区服一定已经选择游戏了 - $play_info_map = " and upi.server_id = '{$_REQUEST['server_id']}' and upi.game_name = '{$_REQUEST['game_name']}'"; + $play_info_map = " and upi.server_id = '{$_REQUEST['server_id']}' and upi.game_name like '{$_REQUEST['game_name']}%'"; } $today = total(1); @@ -456,15 +456,28 @@ class PlatformController extends ThinkController $map['u.promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))]; } } + + if (!empty($_REQUEST['game_type'])) { + $map['tab_game.sdk_version'] = $_REQUEST['game_type']; + } + //为数据权限添加 setPowerPromoteIds($map, 'u.promote_id'); + + // 如果是市场专员那么只能看自己的 + $isMarketAdmin = isMarketAdmin(); + if ($isMarketAdmin) { + $map['tab_promote.admin_id'] = session('user_auth'); + } + $data = M("User u","tab_") - ->field("count(u.id) as count,IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id") + ->field("count(u.id) as count,tab_game.relation_game_name,IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id") ->join("tab_promote promote ON u.promote_id = promote.id","left") ->join($play_map ? "tab_user_play as up on up.user_id = u.id " . $play_map : false) ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false) + ->join('tab_game on u.fgame_id = tab_game.id') ->where($map) - ->group('id') + ->group('id, tab_game.relation_game_name') ->order('count desc, register_time') ->select(); //今日/本周/本月不变 @@ -539,7 +552,7 @@ class PlatformController extends ThinkController $count = count($data); foreach ($data as $key => $value) { static $i = 0; - $i++; + $i++; $data[$key]['rand'] = $i; } @@ -563,6 +576,17 @@ class PlatformController extends ThinkController $pnum = ceil(count($data) / $size); //总页数,ceil()函数用于求大于数字的最小整数 //用array_slice(array,offset,length) 函数在数组中根据条件取出一段值;array(数组),offset(元素的开始位置),length(组的长度) $data = array_slice($data, ($arraypage - 1) * $size, $size); + + $companys = !empty($data) ? M('promote', 'tab_') + ->field('tab_promote.id, company_name, sys_member.nickname as admin_username') + ->join("tab_promote_company on tab_promote.company_id = tab_promote_company.id", 'left') + ->join('sys_member on tab_promote.admin_id = sys_member.uid', 'left') + ->where("tab_promote.id in ('".implode(',', array_column($data, 'id'))."')")->select() : []; + $companys = $companys ? array_column($companys, null, 'id') : []; + foreach ($data as &$item) { + $item['company_name'] = $companys[$item['id']]['company_name'] ?? '无'; + $item['admin_username'] = $companys[$item['id']]['admin_username'] ?? '无'; + } $this->meta_title = '渠道注册统计列表'; $this->assign("is_admin",is_administrator()); $this->assign('list_data', $data); @@ -601,7 +625,7 @@ class PlatformController extends ThinkController $map['pay_time'] = ['between', array(0, time())]; // $pay_time = " between 0 and " . time(); } - $map1['pay_status'] = $map['pay_status'] = 1; + $map1['s.pay_status'] = $map['s.pay_status'] = 1; $today = total(1); $week = total(2); $mounth = total(3); @@ -626,23 +650,34 @@ class PlatformController extends ThinkController $map['tp1.chain'] = '/'; } - if (isset($_REQUEST['game_name'])) { - $map['s.game_name'] = $_REQUEST['game_name']; + $_REQUEST['game_name'] = "{$_REQUEST['game_name']}"; + $map['s.game_name'] = ['like', "{$_REQUEST['game_name']}%"]; if (isset($_REQUEST['server_id'])) { $map['s.server_id'] = $_REQUEST['server_id']; unset($_REQUEST['server_id']); } } - if (isset($_REQUEST['game_name'])||isset($_REQUEST['promote_id'])) { + // 如果是市场专员那么只能看自己的 + $isMarketAdmin = isMarketAdmin(); + if ($isMarketAdmin) { + $map['s.market_admin_id'] = session('user_auth'); + } + + if (!empty($_REQUEST['game_type'])) { + $map['s.sdk_version'] = $_REQUEST['game_type']; + } + + if (isset($_REQUEST['sdk_version'])||isset($_REQUEST['server_id'])||isset($_REQUEST['game_name'])||isset($_REQUEST['promote_id'])) { $data = M('promote', 'tab_')->alias('tp1') - ->field('tp1.account as promote_account,tp1.id, + ->field('tp1.account as promote_account,tp1.id,g.relation_game_name, floor(sum(pay_amount)*100) as count') ->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left') ->join("tab_spend as s use INDEX(search) on tp2.id = s.promote_id", 'left') + ->join("tab_game as g on g.id = s.game_id", 'left') ->where($map) - ->group('tp1.id') + ->group('tp1.id, g.relation_game_name') ->order('count desc') ->select(); } else { @@ -658,14 +693,15 @@ class PlatformController extends ThinkController $tmap['pay_time'] = ['between', array($tmin,$tmonth[1][1])]; } $tdata = M('promote', 'tab_')->alias('tp1') - ->field('tp1.account as promote_account,tp1.id, + ->field('tp1.account as promote_account,tp1.id,g.relation_game_name, floor(sum(IF(s.pay_time ' . $today . ',pay_amount,0))*100) as today, floor(sum(IF(s.pay_time ' . $week . ',pay_amount,0))*100) as week, floor(sum(IF(s.pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') ->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left') ->join("tab_spend as s on tp2.id = s.promote_id", 'left') + ->join("tab_game as g on g.id = s.game_id", 'left') ->where($tmap) - ->group('tp1.id') + ->group('tp1.id, g.relation_game_name') ->select(); $tmdata = []; foreach($data as $k=>$v){ @@ -761,6 +797,17 @@ class PlatformController extends ThinkController $size = $row;//每页显示的记录数 $pnum = ceil(count($data) / $size); //总页数,ceil()函数用于求大于数字的最小整数 + $companys = !empty($data) ? M('promote', 'tab_') + ->field('tab_promote.id, company_name, sys_member.nickname as admin_username') + ->join("tab_promote_company on tab_promote.company_id = tab_promote_company.id", 'left') + ->join('sys_member on tab_promote.admin_id = sys_member.uid', 'left') + ->where("tab_promote.id in ('".implode(',', array_column($data, 'id'))."')")->select() : []; + $companys = $companys ? array_column($companys, null, 'id') : []; + foreach ($data as &$item) { + $item['company_name'] = $companys[$item['id']]['company_name'] ?? '无'; + $item['admin_username'] = $companys[$item['id']]['admin_username'] ?? '无'; + } + if(isset($_REQUEST['export'])){ $GetData = $_GET; @@ -769,7 +816,10 @@ class PlatformController extends ThinkController addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出推广员充值统计','url'=>U('Platform/promotepay_statistics',$GetData),'menu'=>'统计-统计-推广员统计-推广员充值统计']); data2csv($data,'推广员充值统计',array( + 'company_name' => '公司', "promote_account"=>"推广员账号", + 'admin_username' => '管理员', + 'relation_game_name' => '游戏', "count"=>"累计充值", "rand"=>"排行榜", "today"=>"今日充值", diff --git a/Application/Admin/View/Platform/promote_statistics.html b/Application/Admin/View/Platform/promote_statistics.html index 1c3959f93..0e76202ae 100644 --- a/Application/Admin/View/Platform/promote_statistics.html +++ b/Application/Admin/View/Platform/promote_statistics.html @@ -27,33 +27,32 @@ .select2-results__option[aria-selected] {font-size:12px;} +
-
- -
- +  -  -
- +
+
+
-
- - - + +
+
+ +
- 搜索 + 搜索 +
@@ -88,12 +95,32 @@ + + + - + + + + @@ -130,30 +157,25 @@ - + - - + + + + + - - + @@ -166,9 +188,8 @@
- 导出 + 导出 {$_page|default=''}
@@ -199,6 +220,7 @@ if (starttime && endtime && starttime > endtime) {layer.msg('开始时间必须小于等于结束时间');return false;} + var url = $(this).attr('url'); var query = $('.jssearch').find('input').serialize(); query += "&" + $('.jssearch').find('select').serialize(); @@ -218,19 +240,18 @@ $("#search").click(); } }); - // $(".ljzc").click(function(){ + // $(".ljcz").click(function(){ // var id = $(this).attr('data-value'); // var game_name = "{:I('game_name')}"; // var server_name = "{:I('server_id')}"; - // var urlr = window.location.host; // layer.open({ // type: 2, - // title: '注册记录', + // title: '游戏消费记录', // shadeClose: true, // shade: 0.8, // area: ['70%', '80%'], - // content: '/admin.php?s=/Platform/zhuce_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url - // }); + // content: 'admin.php?s=/Platform/chongzhi_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url + // }); // }); $(".paixu").click(function(){ var that=$(this); @@ -248,6 +269,70 @@ $("#search").click(); } }); + // $(".paixu").click(function(){ + // $ddd=$(this).attr('date-url'); + // $lzhuce="{:I('lzhuce')}"; + // $phb = "{:I('phb')}"; + // $dzhuce = "{:I('dzhuce')}"; + // $wzhuce = "{:I('wzhuce')}"; + // $mzhuce = "{:I('mzhuce')}"; + // // $sss="{:I('group')}"; + // if($ddd=='lzhuce'){ + // if($lzhuce==1){ + // $(".sortBy").attr('name','lzhuce'); + // $(".sortBy").attr('value',2); + // $("#search").click(); + // }else{ + // $(".sortBy").attr('name','lzhuce'); + // $(".sortBy").attr('value',1); + // $("#search").click(); + // } + // } + // if($ddd=='phb'){ + // if($phb==1){ + // $(".sortBy").attr('name','phb'); + // $(".sortBy").attr('value',2); + // $("#search").click(); + // }else{ + // $(".sortBy").attr('name','phb'); + // $(".sortBy").attr('value',1); + // $("#search").click(); + // } + // } + // if($ddd=='dzhuce'){ + // if($dzhuce==1){ + // $(".sortBy").attr('name','dzhuce'); + // $(".sortBy").attr('value',2); + // $("#search").click(); + // }else{ + // $(".sortBy").attr('name','dzhuce'); + // $(".sortBy").attr('value',1); + // $("#search").click(); + // } + // } + // if($ddd=='wzhuce'){ + // if($wzhuce==1){ + // $(".sortBy").attr('name','wzhuce'); + // $(".sortBy").attr('value',2); + // $("#search").click(); + // }else{ + // $(".sortBy").attr('name','wzhuce'); + // $(".sortBy").attr('value',1); + // $("#search").click(); + // } + // } + // if($ddd=='mzhuce'){ + // if($mzhuce==1){ + // $(".sortBy").attr('name','mzhuce'); + // $(".sortBy").attr('value',2); + // $("#search").click(); + // }else{ + // $(".sortBy").attr('name','mzhuce'); + // $(".sortBy").attr('value',1); + // $("#search").click(); + // } + // } + // }) //点击排序 $('.list_sort').click(function(){ var url = $(this).attr('url'); @@ -267,63 +352,38 @@ } }); // var date="{$setdate}"; - $('#time-start').datetimepicker({ - format: 'yyyy-mm-dd', - language:"zh-CN", - minView:2, - autoclose:true, - // endDate:date - }); + $('#time-start, #time-end').each(function(){ + laydate.render({ + elem: this, //指定元素, + type : 'date' + }); + }); - $('#datetimepicker').datetimepicker({ - format: 'yyyy-mm-dd', - language:"zh-CN", - minView:2, - autoclose:true, - pickerPosition:'bottom-left', - // endDate:date + var game_server = "{:I('server_id')}"; + $("#game_type").change(function(){ + $.ajax({ + url:"{:U('Ajax/getGmeServer')}", + type:"post", + data:{sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()}, + dataType:'json', + success:function(data){ + console.log(data) + str = ""; + for (var i in data){ + str += "" + } + $("#server_id").empty(); + $("#server_id").append(str); + $("#server_id").select2(); + } }) + }); - $("#game_id").change(function(){ - $.ajax({ - url:"{:U('getSpendServer')}", - type:"post", - data:{game_id:$("#game_id option:selected").attr('game-id')}, - dataType:'json', - success:function(data){ - console.log(data) - str = ""; - for (var i in data){ - str += "" - } - $("#server_id").empty(); - $("#server_id").append(str); - $("#server_id").select2(); - - } - }) - }); - var game_id = "{:I('game_name')}"; - var game_server = "{:I('server_id')}"; - if(game_id){ - $.ajax({ - url:"{:U('getSpendServer')}", - type:"post", - data:{game_name:game_id}, - dataType:'json', - success:function(data){ - console.log(data) - str = ""; - for (var i in data){ - str += "" - } - $("#server_id").empty(); - $("#server_id").append(str); - $("#server_id").select2(); + $("#game_name").change(function(){ + $("#game_type").change(); + }); - } - }) - } + $("#game_name").change(); }) diff --git a/Application/Admin/View/Platform/promotepay_statistics.html b/Application/Admin/View/Platform/promotepay_statistics.html index fcf74cf17..a7d7a7497 100644 --- a/Application/Admin/View/Platform/promotepay_statistics.html +++ b/Application/Admin/View/Platform/promotepay_statistics.html @@ -27,32 +27,33 @@ .select2-results__option[aria-selected] {font-size:12px;} -
+
+ +
- +  -  -
- +
+
-
+
- - - + +
+
+ +
- 搜索 - + 搜索
@@ -88,26 +95,18 @@
公司推广员账号累计注册▲ - 累计注册▼ - 累计注册 + 管理员游戏累计充值▲ + 累计充值▼ + 累计充值 排行榜▲ @@ -102,22 +129,22 @@ - 今日注册▲ - 今日注册▼ - 今日注册 + 今日充值▲ + 今日充值▼ + 今日充值 - 本周注册▲ - 本周注册▼ - 本周注册 + 本周充值▲ + 本周充值▼ + 本周充值 - 本月注册▲ - 本月注册▼ - 本月注册 + 本月充值▲ + 本月充值▼ + 本月充值
aOh! 暂时还没有内容!aOh! 暂时还没有内容!
- {$data['promote_account']} - - {$data.count}{$data['company_name']}{$data['promote_account']}{$data['admin_username']}{$data['relation_game_name']}{$data.count} {$data.rand}{$data.rand}{$data.rand}{$data.rand} {$data.today} {$data.week} {$data.mounth}
汇总汇总 {$total.sum_count} --- {$total.sum_today}
- - - + - @@ -144,22 +143,33 @@ - + - - + + + + + + - + @@ -172,8 +182,9 @@
- 导出 + 导出 {$_page|default=''}
@@ -204,7 +215,6 @@ if (starttime && endtime && starttime > endtime) {layer.msg('开始时间必须小于等于结束时间');return false;} - var url = $(this).attr('url'); var query = $('.jssearch').find('input').serialize(); query += "&" + $('.jssearch').find('select').serialize(); @@ -224,18 +234,19 @@ $("#search").click(); } }); - // $(".ljcz").click(function(){ + // $(".ljzc").click(function(){ // var id = $(this).attr('data-value'); // var game_name = "{:I('game_name')}"; // var server_name = "{:I('server_id')}"; + // var urlr = window.location.host; // layer.open({ // type: 2, - // title: '游戏消费记录', + // title: '注册记录', // shadeClose: true, // shade: 0.8, // area: ['70%', '80%'], - // content: 'admin.php?s=/Platform/chongzhi_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url - // }); + // content: '/admin.php?s=/Platform/zhuce_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url + // }); // }); $(".paixu").click(function(){ var that=$(this); @@ -253,70 +264,6 @@ $("#search").click(); } }); - // $(".paixu").click(function(){ - // $ddd=$(this).attr('date-url'); - // $lzhuce="{:I('lzhuce')}"; - // $phb = "{:I('phb')}"; - // $dzhuce = "{:I('dzhuce')}"; - // $wzhuce = "{:I('wzhuce')}"; - // $mzhuce = "{:I('mzhuce')}"; - // // $sss="{:I('group')}"; - // if($ddd=='lzhuce'){ - // if($lzhuce==1){ - // $(".sortBy").attr('name','lzhuce'); - // $(".sortBy").attr('value',2); - // $("#search").click(); - // }else{ - // $(".sortBy").attr('name','lzhuce'); - // $(".sortBy").attr('value',1); - // $("#search").click(); - // } - // } - // if($ddd=='phb'){ - // if($phb==1){ - // $(".sortBy").attr('name','phb'); - // $(".sortBy").attr('value',2); - // $("#search").click(); - // }else{ - // $(".sortBy").attr('name','phb'); - // $(".sortBy").attr('value',1); - // $("#search").click(); - // } - // } - // if($ddd=='dzhuce'){ - // if($dzhuce==1){ - // $(".sortBy").attr('name','dzhuce'); - // $(".sortBy").attr('value',2); - // $("#search").click(); - // }else{ - // $(".sortBy").attr('name','dzhuce'); - // $(".sortBy").attr('value',1); - // $("#search").click(); - // } - // } - // if($ddd=='wzhuce'){ - // if($wzhuce==1){ - // $(".sortBy").attr('name','wzhuce'); - // $(".sortBy").attr('value',2); - // $("#search").click(); - // }else{ - // $(".sortBy").attr('name','wzhuce'); - // $(".sortBy").attr('value',1); - // $("#search").click(); - // } - // } - // if($ddd=='mzhuce'){ - // if($mzhuce==1){ - // $(".sortBy").attr('name','mzhuce'); - // $(".sortBy").attr('value',2); - // $("#search").click(); - // }else{ - // $(".sortBy").attr('name','mzhuce'); - // $(".sortBy").attr('value',1); - // $("#search").click(); - // } - // } - // }) //点击排序 $('.list_sort').click(function(){ var url = $(this).attr('url'); @@ -336,64 +283,39 @@ } }); // var date="{$setdate}"; - $('#time-start').datetimepicker({ - format: 'yyyy-mm-dd', - language:"zh-CN", - minView:2, - autoclose:true, - // endDate:date - }); + $('#time-start, #time-end').each(function(){ + laydate.render({ + elem: this, //指定元素, + type : 'date' + }); + }); - $('#datetimepicker').datetimepicker({ - format: 'yyyy-mm-dd', - language:"zh-CN", - minView:2, - autoclose:true, - pickerPosition:'bottom-left', - // endDate:date + var game_server = "{:I('server_id')}"; + $("#game_type").change(function(){ + $.ajax({ + url:"{:U('Ajax/getGmeServer')}", + type:"post", + data:{sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()}, + dataType:'json', + success:function(data){ + console.log(data) + str = ""; + for (var i in data){ + str += "" + } + $("#server_id").empty(); + $("#server_id").append(str); + $("#server_id").select2(); + } }) - $("#game_id").change(function(){ - console.log($("#game_id option:selected").attr('game-id')); - $.ajax({ - url:"{:U('getSpendServer')}", - type:"post", - data:{game_id:$("#game_id option:selected").attr('game-id')}, - dataType:'json', - success:function(data){ - console.log(data) - str = ""; - for (var i in data){ - str += "" - } - $("#server_id").empty(); - $("#server_id").append(str); - $("#server_id").select2(); + }); - } - }) - }); - var game_name = "{:I('game_name')}"; - var game_server = "{:I('server_id')}"; - if(game_name){ - console.log({game_name:game_name}) - $.ajax({ - url:"{:U('getSpendServer')}", - type:"post", - data:{game_name:game_name}, - dataType:'json', - success:function(data){ - console.log(data) - str = ""; - for (var i in data){ - str += "" - } - $("#server_id").empty(); - $("#server_id").append(str); - $("#server_id").select2(); + $("#game_name").change(function(){ + $("#game_type").change(); + }); - } - }) - } + $("#game_name").change(); + }) From 5e5aa8ca3f6543616fab9c027e891b940df8a5be Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Wed, 8 Jul 2020 18:07:30 +0800 Subject: [PATCH 17/54] upt --- .../View/Platform/promote_statistics.html | 158 +++++------------- .../View/Platform/promotepay_statistics.html | 156 ++++++++++++----- 2 files changed, 157 insertions(+), 157 deletions(-) diff --git a/Application/Admin/View/Platform/promote_statistics.html b/Application/Admin/View/Platform/promote_statistics.html index 0e76202ae..badc4bb01 100644 --- a/Application/Admin/View/Platform/promote_statistics.html +++ b/Application/Admin/View/Platform/promote_statistics.html @@ -27,32 +27,33 @@ .select2-results__option[aria-selected] {font-size:12px;} -
+
+ +
- +  -  -
- +
+
-
+
- 搜索 - + 搜索
@@ -95,20 +95,6 @@
推广员账号游戏累计充值▲ - 累计充值▼ - 累计充值 + 累计注册▲ + 累计注册▼ + 累计注册 排行榜▲ @@ -116,22 +115,22 @@ - 今日充值▲ - 今日充值▼ - 今日充值 + 今日注册▲ + 今日注册▼ + 今日注册 - 本周充值▲ - 本周充值▼ - 本周充值 + 本周注册▲ + 本周注册▼ + 本周注册 - 本月充值▲ - 本月充值▼ - 本月充值 + 本月注册▲ + 本月注册▼ + 本月注册
aOh! 暂时还没有内容!aOh! 暂时还没有内容!
{$data['promote_account']}{$data.count}{$data['company_name']} + {$data['promote_account']} + + {$data['admin_username']}{$data['relation_game_name']}{$data.count} {$data.rand}{$data.rand}{$data.rand}{$data.rand} {$data.today} {$data.week} {$data.mounth}
汇总汇总 {$total.sum_count} --- {$total.sum_today}
- @@ -118,9 +104,9 @@ - @@ -157,20 +143,28 @@ - + - + - + + @@ -188,8 +182,9 @@
- 导出 + 导出 {$_page|default=''}
@@ -220,7 +215,6 @@ if (starttime && endtime && starttime > endtime) {layer.msg('开始时间必须小于等于结束时间');return false;} - var url = $(this).attr('url'); var query = $('.jssearch').find('input').serialize(); query += "&" + $('.jssearch').find('select').serialize(); @@ -240,18 +234,19 @@ $("#search").click(); } }); - // $(".ljcz").click(function(){ + // $(".ljzc").click(function(){ // var id = $(this).attr('data-value'); // var game_name = "{:I('game_name')}"; // var server_name = "{:I('server_id')}"; + // var urlr = window.location.host; // layer.open({ // type: 2, - // title: '游戏消费记录', + // title: '注册记录', // shadeClose: true, // shade: 0.8, // area: ['70%', '80%'], - // content: 'admin.php?s=/Platform/chongzhi_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url - // }); + // content: '/admin.php?s=/Platform/zhuce_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url + // }); // }); $(".paixu").click(function(){ var that=$(this); @@ -269,70 +264,6 @@ $("#search").click(); } }); - // $(".paixu").click(function(){ - // $ddd=$(this).attr('date-url'); - // $lzhuce="{:I('lzhuce')}"; - // $phb = "{:I('phb')}"; - // $dzhuce = "{:I('dzhuce')}"; - // $wzhuce = "{:I('wzhuce')}"; - // $mzhuce = "{:I('mzhuce')}"; - // // $sss="{:I('group')}"; - // if($ddd=='lzhuce'){ - // if($lzhuce==1){ - // $(".sortBy").attr('name','lzhuce'); - // $(".sortBy").attr('value',2); - // $("#search").click(); - // }else{ - // $(".sortBy").attr('name','lzhuce'); - // $(".sortBy").attr('value',1); - // $("#search").click(); - // } - // } - // if($ddd=='phb'){ - // if($phb==1){ - // $(".sortBy").attr('name','phb'); - // $(".sortBy").attr('value',2); - // $("#search").click(); - // }else{ - // $(".sortBy").attr('name','phb'); - // $(".sortBy").attr('value',1); - // $("#search").click(); - // } - // } - // if($ddd=='dzhuce'){ - // if($dzhuce==1){ - // $(".sortBy").attr('name','dzhuce'); - // $(".sortBy").attr('value',2); - // $("#search").click(); - // }else{ - // $(".sortBy").attr('name','dzhuce'); - // $(".sortBy").attr('value',1); - // $("#search").click(); - // } - // } - // if($ddd=='wzhuce'){ - // if($wzhuce==1){ - // $(".sortBy").attr('name','wzhuce'); - // $(".sortBy").attr('value',2); - // $("#search").click(); - // }else{ - // $(".sortBy").attr('name','wzhuce'); - // $(".sortBy").attr('value',1); - // $("#search").click(); - // } - // } - // if($ddd=='mzhuce'){ - // if($mzhuce==1){ - // $(".sortBy").attr('name','mzhuce'); - // $(".sortBy").attr('value',2); - // $("#search").click(); - // }else{ - // $(".sortBy").attr('name','mzhuce'); - // $(".sortBy").attr('value',1); - // $("#search").click(); - // } - // } - // }) //点击排序 $('.list_sort').click(function(){ var url = $(this).attr('url'); @@ -384,6 +315,7 @@ }); $("#game_name").change(); + }) - + \ No newline at end of file diff --git a/Application/Admin/View/Platform/promotepay_statistics.html b/Application/Admin/View/Platform/promotepay_statistics.html index a7d7a7497..0e76202ae 100644 --- a/Application/Admin/View/Platform/promotepay_statistics.html +++ b/Application/Admin/View/Platform/promotepay_statistics.html @@ -27,33 +27,32 @@ .select2-results__option[aria-selected] {font-size:12px;} +
-
- -
- +  -  -
- +
+
+
-
- 搜索 + 搜索 +
@@ -95,6 +95,20 @@
公司游戏累计充值▲ - 累计充值▼ - 累计充值 + 累计注册▲ + 累计注册▼ + 累计注册 排行榜▲ @@ -129,22 +115,22 @@ - 今日充值▲ - 今日充值▼ - 今日充值 + 今日注册▲ + 今日注册▼ + 今日注册 - 本周充值▲ - 本周充值▼ - 本周充值 + 本周注册▲ + 本周注册▼ + 本周注册 - 本月充值▲ - 本月充值▼ - 本月充值 + 本月注册▲ + 本月注册▼ + 本月注册
aOh! 暂时还没有内容!aOh! 暂时还没有内容!
{$data['company_name']}{$data['promote_account']} + {$data['promote_account']} + + {$data['admin_username']} {$data['relation_game_name']}{$data.count}{$data.count} {$data.rand}{$data.rand}{$data.rand}{$data.rand} {$data.today} {$data.week} {$data.mounth}
+ @@ -104,9 +118,9 @@ - @@ -143,28 +157,20 @@ - + - + - + - @@ -182,9 +188,8 @@
- 导出 + 导出 {$_page|default=''}
@@ -215,6 +220,7 @@ if (starttime && endtime && starttime > endtime) {layer.msg('开始时间必须小于等于结束时间');return false;} + var url = $(this).attr('url'); var query = $('.jssearch').find('input').serialize(); query += "&" + $('.jssearch').find('select').serialize(); @@ -234,19 +240,18 @@ $("#search").click(); } }); - // $(".ljzc").click(function(){ + // $(".ljcz").click(function(){ // var id = $(this).attr('data-value'); // var game_name = "{:I('game_name')}"; // var server_name = "{:I('server_id')}"; - // var urlr = window.location.host; // layer.open({ // type: 2, - // title: '注册记录', + // title: '游戏消费记录', // shadeClose: true, // shade: 0.8, // area: ['70%', '80%'], - // content: '/admin.php?s=/Platform/zhuce_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url - // }); + // content: 'admin.php?s=/Platform/chongzhi_detail/promote_id/'+id+'/game_name/'+game_name+'/server_name/'+server_name+''//iframe的url + // }); // }); $(".paixu").click(function(){ var that=$(this); @@ -264,6 +269,70 @@ $("#search").click(); } }); + // $(".paixu").click(function(){ + // $ddd=$(this).attr('date-url'); + // $lzhuce="{:I('lzhuce')}"; + // $phb = "{:I('phb')}"; + // $dzhuce = "{:I('dzhuce')}"; + // $wzhuce = "{:I('wzhuce')}"; + // $mzhuce = "{:I('mzhuce')}"; + // // $sss="{:I('group')}"; + // if($ddd=='lzhuce'){ + // if($lzhuce==1){ + // $(".sortBy").attr('name','lzhuce'); + // $(".sortBy").attr('value',2); + // $("#search").click(); + // }else{ + // $(".sortBy").attr('name','lzhuce'); + // $(".sortBy").attr('value',1); + // $("#search").click(); + // } + // } + // if($ddd=='phb'){ + // if($phb==1){ + // $(".sortBy").attr('name','phb'); + // $(".sortBy").attr('value',2); + // $("#search").click(); + // }else{ + // $(".sortBy").attr('name','phb'); + // $(".sortBy").attr('value',1); + // $("#search").click(); + // } + // } + // if($ddd=='dzhuce'){ + // if($dzhuce==1){ + // $(".sortBy").attr('name','dzhuce'); + // $(".sortBy").attr('value',2); + // $("#search").click(); + // }else{ + // $(".sortBy").attr('name','dzhuce'); + // $(".sortBy").attr('value',1); + // $("#search").click(); + // } + // } + // if($ddd=='wzhuce'){ + // if($wzhuce==1){ + // $(".sortBy").attr('name','wzhuce'); + // $(".sortBy").attr('value',2); + // $("#search").click(); + // }else{ + // $(".sortBy").attr('name','wzhuce'); + // $(".sortBy").attr('value',1); + // $("#search").click(); + // } + // } + // if($ddd=='mzhuce'){ + // if($mzhuce==1){ + // $(".sortBy").attr('name','mzhuce'); + // $(".sortBy").attr('value',2); + // $("#search").click(); + // }else{ + // $(".sortBy").attr('name','mzhuce'); + // $(".sortBy").attr('value',1); + // $("#search").click(); + // } + // } + // }) //点击排序 $('.list_sort').click(function(){ var url = $(this).attr('url'); @@ -315,7 +384,6 @@ }); $("#game_name").change(); - }) From 617cfbd4bf1f62302368e9a0a3afb76ed8d55747 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 8 Jul 2020 20:21:48 +0800 Subject: [PATCH 18/54] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8D=A2=E7=BB=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/MendController.class.php | 78 +++++++++++-------- 1 file changed, 44 insertions(+), 34 deletions(-) diff --git a/Application/Admin/Controller/MendController.class.php b/Application/Admin/Controller/MendController.class.php index 7802e7eb4..4d4d666ed 100644 --- a/Application/Admin/Controller/MendController.class.php +++ b/Application/Admin/Controller/MendController.class.php @@ -118,7 +118,6 @@ class MendController extends ThinkController { public function edit($id = null) { - if (IS_POST) { $promoteService = new PromoteService(); if ($_POST['prmoote_id_to'] == -1){ @@ -178,15 +177,19 @@ class MendController extends ThinkController { $this->error($res['msg']); } } else { - $user = A('User', 'Event'); - $user_data = $user->user_entity($id); - $user_data || $this->error("用户数据异常"); + // echo 1;die(); + $map['id'] = $id; + $data = M("user","tab_")->where($map)->find(); + + // $user = A('User', 'Event'); + // $user_data = $user->user_entity($id); + // $user_data || $this->error("用户数据异常"); // var_dump($user_data);die; - $this->assign("data", $user_data); + $this->assign("data", $data); $this->meta_title = '编辑推广补链'; - $this->m_title = '推广补链'; - $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Mend/lists','status'=>1])->find()); + $this->m_title = '推广补链'; + $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Mend/lists','status'=>1])->find()); $this->display(); @@ -200,42 +203,49 @@ class MendController extends ThinkController { $map = array( "pay_status"=>1, "user_account"=>$account, - "pay_time"=>array("EGT",$order_time) + "payed_time"=>array("EGT",$order_time) ); $spendlist = M("Spend","tab_")->field("id,selle_status,pay_order_number")->where($map)->select(); if(count($spendlist) < 1){ return false; } - //获取所有未审核 - $withmap = array( - "status"=>0, - "settlement_begin_time"=>array("EGT",$order_time), - "settlement_end_time"=>array("ELT",$order_time) - ); - $withspendlist = M("withdraw","tab_")->field("spend_ids")->select(); + //获取结算方式 + $c_id = M("User","tab_") + ->alias('a') + ->field("IFNULL(p.company_id,0) company_id") + ->join('tab_promote p ON a.promote_id= p.id') + ->where("a.account = '{$account}'") + ->find(); - $dsh_list = false; - if(!empty($withspendlist)){ - //获取所有涉及订单 - foreach ($withspendlist as $value) { - $dsh_list .= (','.$value['spend_ids']); - } + if(empty($c_id) || $c_id['company_id'] == 0){ + //官方渠道不结算,可换绑 + return false; } - if($dsh_list){ - $dsh_list = array_flip(explode(",",$dsh_list)); + $c_id = $c_id['company_id']; + $r = M("CompanyRelation","tab_")->where("(first_company_type = 2 AND first_company_id = '{$c_id}') OR (second_company_type = 2 AND second_company_id = '{$c_id}')")->find(); + if(empty($r) || $r['settlement_type'] == 0){ + //不结算的公司允许换绑 + return false; } - foreach($spendlist as $k=>$v){ - - if($v['selle_status'] == 1){ - $this->tempid = $v['pay_order_number']; - return true; //有已结算 - } - if($dsh_list && $dsh_list[$v['id']]){ - $this->tempid = $v['pay_order_number']; - return true; //有待审核的 - } + $checktime = 0; + if($r['settlement_type'] == 1){ + //周结 + $sdefaultDate = date("Y-m-d"); + $first=1; + $w=date('w',strtotime($sdefaultDate)); + $checktime=strtotime("$sdefaultDate -".($w ? $w - $first : 6).' days'); //本周开始时间 + }else{ + //月结 + $y = date("Y", time()); //年 + $m = date("m", time()); //月 + $checktime = mktime(0, 0, 0, $m, 1, $y); // 本月开始时间 } - return false; + if($order_time >= $checktime){ + //未在结算期内,允许换绑 + return false; + } + //其他情况不允许换绑 + return true; } /** From db64bea72f6c662c771e15125647dcb36ac00521 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 9 Jul 2020 09:15:48 +0800 Subject: [PATCH 19/54] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/MendController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/MendController.class.php b/Application/Admin/Controller/MendController.class.php index 4d4d666ed..7a669350a 100644 --- a/Application/Admin/Controller/MendController.class.php +++ b/Application/Admin/Controller/MendController.class.php @@ -137,7 +137,7 @@ class MendController extends ThinkController { // $this->error('在订单日期内含有已经结算的订单,无法补链'); // } if(self::checkSpend(strtotime($_POST['order_time']),$_POST['account'])){ - $this->error("在订单日期内含有已经结算的订单,无法补链。如订单:{$this->tempid}"); + $this->error("在订单日期内含有已经结算的订单,无法补链。"); } if(self::checkPromote(strtotime($_POST['order_time']),$_POST['account'])){ $this->error('在订单日期内含有多个推广员,无法补链'); From 80597c48945e7910279e3397d4aa28eb8438ca27 Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Thu, 9 Jul 2020 10:16:26 +0800 Subject: [PATCH 20/54] upt --- .../Controller/ExportController.class.php | 2 +- .../Controller/PlatformController.class.php | 31 ++++++++++++++----- .../View/Platform/promote_statistics.html | 11 ++++++- .../View/Platform/promotepay_statistics.html | 9 ++++++ 4 files changed, 44 insertions(+), 9 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 3b6269a17..b847ea327 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -3731,7 +3731,7 @@ class ExportController extends Controller ->field('tab_promote.id, company_name, sys_member.nickname as admin_username') ->join("tab_promote_company on tab_promote.company_id = tab_promote_company.id", 'left') ->join('sys_member on tab_promote.admin_id = sys_member.uid', 'left') - ->where("tab_promote.id in ('".implode(',', array_column($data, 'id'))."')")->select() : []; + ->where("tab_promote.id in (".implode(',', array_column($data, 'id')).")")->select() : []; $companys = $companys ? array_column($companys, null, 'id') : []; foreach ($data as &$item) { $item['company_name'] = $companys[$item['id']]['company_name'] ?? '无'; diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index 40f0095e2..8cbe9c793 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -446,6 +446,10 @@ class PlatformController extends ThinkController $play_info_map = " and upi.server_id = '{$_REQUEST['server_id']}' and upi.game_name like '{$_REQUEST['game_name']}%'"; } + if (!empty($_REQUEST['admin_id'])) { + $map['promote.admin_id'] = $_REQUEST['admin_id']; + } + $today = total(1); $week = total(2); $mounth = total(3); @@ -467,7 +471,7 @@ class PlatformController extends ThinkController // 如果是市场专员那么只能看自己的 $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { - $map['tab_promote.admin_id'] = session('user_auth'); + $map['promote.admin_id'] = session('user_auth'); } $data = M("User u","tab_") @@ -504,6 +508,7 @@ class PlatformController extends ThinkController ->join("tab_promote promote ON u.promote_id = promote.id","left") ->join($play_map ? "tab_user_play as up on up.user_id = u.id " . $play_map : false) ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false) + ->join('tab_game on u.fgame_id = tab_game.id') ->where($tmap) ->group('id') ->order('register_time') @@ -581,7 +586,7 @@ class PlatformController extends ThinkController ->field('tab_promote.id, company_name, sys_member.nickname as admin_username') ->join("tab_promote_company on tab_promote.company_id = tab_promote_company.id", 'left') ->join('sys_member on tab_promote.admin_id = sys_member.uid', 'left') - ->where("tab_promote.id in ('".implode(',', array_column($data, 'id'))."')")->select() : []; + ->where("tab_promote.id in (".implode(',', array_column($data, 'id')).")")->select() : []; $companys = $companys ? array_column($companys, null, 'id') : []; foreach ($data as &$item) { $item['company_name'] = $companys[$item['id']]['company_name'] ?? '无'; @@ -590,6 +595,7 @@ class PlatformController extends ThinkController $this->meta_title = '渠道注册统计列表'; $this->assign("is_admin",is_administrator()); $this->assign('list_data', $data); + $this->assign('admin_users', M('member')->field('uid,nickname')->select()); $this->assign('total', $total); $this->display(); } @@ -645,7 +651,12 @@ class PlatformController extends ThinkController setPowerPromoteIds($map, 'tp1.id'); if (isset($_REQUEST['promote_id'])) { - $map['tp1.id'] = $_REQUEST['promote_id']; + //$map['tp1.id'] = $_REQUEST['promote_id']; + $promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select(); + if ($promoter_ids) { + $map['tp1.id'] = $_REQUEST['promote_id']; + $map['tp2.id'] = ['in', implode(',', array_column($promoter_ids, 'id'))]; + } } else { $map['tp1.chain'] = '/'; } @@ -669,6 +680,10 @@ class PlatformController extends ThinkController $map['s.sdk_version'] = $_REQUEST['game_type']; } + if (!empty($_REQUEST['admin_id'])) { + $map['s.market_admin_id'] = $_REQUEST['admin_id']; + } + if (isset($_REQUEST['sdk_version'])||isset($_REQUEST['server_id'])||isset($_REQUEST['game_name'])||isset($_REQUEST['promote_id'])) { $data = M('promote', 'tab_')->alias('tp1') ->field('tp1.account as promote_account,tp1.id,g.relation_game_name, @@ -719,16 +734,18 @@ class PlatformController extends ThinkController $tmdata[$v['id']]['promote_account'] = $v['promote_account']; $tmdata[$v['id']]['count'] = 0; } + + $tmdata[$v['id']]['id'] = $v['id']; } $data = []; foreach($tmdata as $k => $v){ $data[] = $v; } // dd($data); - unset($map['tp1.id']); + unset($map['tp1.id'], $map['tp2.id']); unset($map['tp1.chain']); unset($tmap['tp1.id']); - unset($tmap['tp1.chain']); + unset($tmap['tp1.chain'], $tmap['tp2.id']); $map['s.promote_id'] = 0; $tmap['s.promote_id'] = 0; $authorityData['count'] = 0; @@ -796,12 +813,11 @@ class PlatformController extends ThinkController $data = my_sort($data, $data_order_type, (int)$data_order); $size = $row;//每页显示的记录数 - $pnum = ceil(count($data) / $size); //总页数,ceil()函数用于求大于数字的最小整数 $companys = !empty($data) ? M('promote', 'tab_') ->field('tab_promote.id, company_name, sys_member.nickname as admin_username') ->join("tab_promote_company on tab_promote.company_id = tab_promote_company.id", 'left') ->join('sys_member on tab_promote.admin_id = sys_member.uid', 'left') - ->where("tab_promote.id in ('".implode(',', array_column($data, 'id'))."')")->select() : []; + ->where("tab_promote.id in (".implode(',', array_column($data, 'id')).")")->select() : []; $companys = $companys ? array_column($companys, null, 'id') : []; foreach ($data as &$item) { $item['company_name'] = $companys[$item['id']]['company_name'] ?? '无'; @@ -833,6 +849,7 @@ class PlatformController extends ThinkController $data = array_slice($data, ($arraypage - 1) * $size, $size); $this->meta_title = '渠道充值统计列表'; $this->assign('list_data', $data); + $this->assign('admin_users', M('member')->field('uid,nickname')->select()); $this->assign("is_admin",is_administrator()); $this->display(); diff --git a/Application/Admin/View/Platform/promote_statistics.html b/Application/Admin/View/Platform/promote_statistics.html index badc4bb01..80e24e4f9 100644 --- a/Application/Admin/View/Platform/promote_statistics.html +++ b/Application/Admin/View/Platform/promote_statistics.html @@ -61,6 +61,15 @@ +
+ + +
+
+ + +
From 1119e8faf96c5e6f918d56ecf94aaf64b2326387 Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Thu, 9 Jul 2020 11:28:30 +0800 Subject: [PATCH 24/54] upt --- .../Controller/ExportController.class.php | 20 ++-- .../Controller/PlatformController.class.php | 41 ++++----- .../View/Platform/promote_statistics.html | 86 +++++++++--------- .../View/Platform/promotepay_statistics.html | 91 ++++++++++--------- 4 files changed, 120 insertions(+), 118 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index b847ea327..6bf24fe3f 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -3596,13 +3596,13 @@ class ExportController extends Controller //TODO:应需求,取消玩家表,只要user表的fgame有就算注册无需在play表存在 $play_map = false; if (isset($_REQUEST['game_name'])) { - $map['fgame_name'] = ['like', "{$_REQUEST['game_name']}%"]; + $map['fgame_name'] = $_REQUEST['game_name']; // $play_map = " and up.game_name = '{$_REQUEST['game_name']}' "; } $play_info_map = false; if (isset($_REQUEST['server_id'])) { $play_map = false; //有区服就不检索玩家表,有区服一定已经选择游戏了 - $play_info_map = " and upi.server_id = '{$_REQUEST['server_id']}' and upi.game_name like '{$_REQUEST['game_name']}%'"; + $play_info_map = " and upi.server_id = '{$_REQUEST['server_id']}' and upi.game_name = '{$_REQUEST['game_name']}'"; } $today = total(1); @@ -3616,8 +3616,8 @@ class ExportController extends Controller } } - if (!empty($_REQUEST['game_type'])) { - $map['tab_game.sdk_version'] = $_REQUEST['game_type']; + if (!empty($_REQUEST['admin_id'])) { + $map['promote.admin_id'] = $_REQUEST['admin_id']; } //为数据权限添加 @@ -3626,17 +3626,17 @@ class ExportController extends Controller // 如果是市场专员那么只能看自己的 $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { - $map['tab_promote.admin_id'] = session('user_auth'); + $map['promote.admin_id'] = session('user_auth'); } $data = M("User u","tab_") - ->field("count(u.id) as count,tab_game.relation_game_name,IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id") + ->field("count(u.id) as count,IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id") ->join("tab_promote promote ON u.promote_id = promote.id","left") ->join($play_map ? "tab_user_play as up on up.user_id = u.id " . $play_map : false) ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false) ->join('tab_game on u.fgame_id = tab_game.id') ->where($map) - ->group('id, tab_game.relation_game_name') + ->group('id') ->order('count desc, register_time') ->select(); //今日/本周/本月不变 @@ -3741,9 +3741,9 @@ class ExportController extends Controller $xlsName = $_REQUEST['xlsname']?$_REQUEST['xlsname']:'推广员注册统计'; $xlsCell = array( array('company_name' , "公司"), - array('promote_account', "推广员账号"), - array('admin_username' , "管理员"), - array('relation_game_name' , "游戏"), + array('promote_account', "会长账号"), + array('admin_username' , "市场专员"), + //array('relation_game_name' , "游戏"), array('count' , "累计注册"), array('rand' , "排行榜"), array('today' , "今日注册"), diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index 8cbe9c793..09a7a2366 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -437,13 +437,13 @@ class PlatformController extends ThinkController //TODO:应需求,取消玩家表,只要user表的fgame有就算注册无需在play表存在 $play_map = false; if (isset($_REQUEST['game_name'])) { - $map['fgame_name'] = ['like', "{$_REQUEST['game_name']}%"]; + $map['fgame_name'] = $_REQUEST['game_name']; // $play_map = " and up.game_name = '{$_REQUEST['game_name']}' "; } $play_info_map = false; if (isset($_REQUEST['server_id'])) { $play_map = false; //有区服就不检索玩家表,有区服一定已经选择游戏了 - $play_info_map = " and upi.server_id = '{$_REQUEST['server_id']}' and upi.game_name like '{$_REQUEST['game_name']}%'"; + $play_info_map = " and upi.server_id = '{$_REQUEST['server_id']}' and upi.game_name = '{$_REQUEST['game_name']}'"; } if (!empty($_REQUEST['admin_id'])) { @@ -461,10 +461,6 @@ class PlatformController extends ThinkController } } - if (!empty($_REQUEST['game_type'])) { - $map['tab_game.sdk_version'] = $_REQUEST['game_type']; - } - //为数据权限添加 setPowerPromoteIds($map, 'u.promote_id'); @@ -475,13 +471,13 @@ class PlatformController extends ThinkController } $data = M("User u","tab_") - ->field("count(u.id) as count,tab_game.relation_game_name,IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id") + ->field("count(u.id) as count,IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id") ->join("tab_promote promote ON u.promote_id = promote.id","left") ->join($play_map ? "tab_user_play as up on up.user_id = u.id " . $play_map : false) ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false) ->join('tab_game on u.fgame_id = tab_game.id') ->where($map) - ->group('id, tab_game.relation_game_name') + ->group('id') ->order('count desc, register_time') ->select(); //今日/本周/本月不变 @@ -662,37 +658,32 @@ class PlatformController extends ThinkController } if (isset($_REQUEST['game_name'])) { - $_REQUEST['game_name'] = "{$_REQUEST['game_name']}"; - $map['s.game_name'] = ['like', "{$_REQUEST['game_name']}%"]; + $map['s.game_name'] = $_REQUEST['game_name']; if (isset($_REQUEST['server_id'])) { $map['s.server_id'] = $_REQUEST['server_id']; unset($_REQUEST['server_id']); } } + if (!empty($_REQUEST['admin_id'])) { + $map['s.market_admin_id'] = $_REQUEST['admin_id']; + } + // 如果是市场专员那么只能看自己的 $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { $map['s.market_admin_id'] = session('user_auth'); } - if (!empty($_REQUEST['game_type'])) { - $map['s.sdk_version'] = $_REQUEST['game_type']; - } - - if (!empty($_REQUEST['admin_id'])) { - $map['s.market_admin_id'] = $_REQUEST['admin_id']; - } - - if (isset($_REQUEST['sdk_version'])||isset($_REQUEST['server_id'])||isset($_REQUEST['game_name'])||isset($_REQUEST['promote_id'])) { + if (isset($_REQUEST['server_id'])||isset($_REQUEST['game_name'])||isset($_REQUEST['promote_id'])) { $data = M('promote', 'tab_')->alias('tp1') - ->field('tp1.account as promote_account,tp1.id,g.relation_game_name, + ->field('tp1.account as promote_account,tp1.id, floor(sum(pay_amount)*100) as count') ->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left') ->join("tab_spend as s use INDEX(search) on tp2.id = s.promote_id", 'left') ->join("tab_game as g on g.id = s.game_id", 'left') ->where($map) - ->group('tp1.id, g.relation_game_name') + ->group('tp1.id') ->order('count desc') ->select(); } else { @@ -708,7 +699,7 @@ class PlatformController extends ThinkController $tmap['pay_time'] = ['between', array($tmin,$tmonth[1][1])]; } $tdata = M('promote', 'tab_')->alias('tp1') - ->field('tp1.account as promote_account,tp1.id,g.relation_game_name, + ->field('tp1.account as promote_account,tp1.id, floor(sum(IF(s.pay_time ' . $today . ',pay_amount,0))*100) as today, floor(sum(IF(s.pay_time ' . $week . ',pay_amount,0))*100) as week, floor(sum(IF(s.pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') @@ -716,7 +707,7 @@ class PlatformController extends ThinkController ->join("tab_spend as s on tp2.id = s.promote_id", 'left') ->join("tab_game as g on g.id = s.game_id", 'left') ->where($tmap) - ->group('tp1.id, g.relation_game_name') + ->group('tp1.id') ->select(); $tmdata = []; foreach($data as $k=>$v){ @@ -725,6 +716,7 @@ class PlatformController extends ThinkController $v['mounth'] = 0; $tmdata[$v['id']] = $v; } + //dd($data); foreach ($tdata as $k => $v) { $tmdata[$v['id']]['today'] = $v['today']; @@ -741,7 +733,7 @@ class PlatformController extends ThinkController foreach($tmdata as $k => $v){ $data[] = $v; } - // dd($data); + //dd($data); unset($map['tp1.id'], $map['tp2.id']); unset($map['tp1.chain']); unset($tmap['tp1.id']); @@ -835,7 +827,6 @@ class PlatformController extends ThinkController 'company_name' => '公司', "promote_account"=>"推广员账号", 'admin_username' => '管理员', - 'relation_game_name' => '游戏', "count"=>"累计充值", "rand"=>"排行榜", "today"=>"今日充值", diff --git a/Application/Admin/View/Platform/promote_statistics.html b/Application/Admin/View/Platform/promote_statistics.html index 80e24e4f9..f3f3e0850 100644 --- a/Application/Admin/View/Platform/promote_statistics.html +++ b/Application/Admin/View/Platform/promote_statistics.html @@ -53,16 +53,16 @@
- +
- +
- - - + +
-
- -
- - - @@ -178,7 +168,7 @@ - + @@ -299,32 +289,46 @@ }); }); - var game_server = "{:I('server_id')}"; - $("#game_type").change(function(){ - $.ajax({ - url:"{:U('Ajax/getGmeServer')}", - type:"post", - data:{sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()}, - dataType:'json', - success:function(data){ - console.log(data) - str = ""; - for (var i in data){ - str += "" - } - $("#server_id").empty(); - $("#server_id").append(str); - $("#server_id").select2(); - } - }) - }); + $("#game_id").change(function(){ + $.ajax({ + url:"{:U('getSpendServer')}", + type:"post", + data:{game_id:$("#game_id option:selected").attr('game-id')}, + dataType:'json', + success:function(data){ + console.log(data) + str = ""; + for (var i in data){ + str += "" + } + $("#server_id").empty(); + $("#server_id").append(str); + $("#server_id").select2(); - $("#game_name").change(function(){ - $("#game_type").change(); - }); + } + }) + }); + var game_id = "{:I('game_name')}"; + var game_server = "{:I('server_id')}"; + if(game_id){ + $.ajax({ + url:"{:U('getSpendServer')}", + type:"post", + data:{game_name:game_id}, + dataType:'json', + success:function(data){ + console.log(data) + str = ""; + for (var i in data){ + str += "" + } + $("#server_id").empty(); + $("#server_id").append(str); + $("#server_id").select2(); - $("#game_name").change(); - + } + }) + } }) \ No newline at end of file diff --git a/Application/Admin/View/Platform/promotepay_statistics.html b/Application/Admin/View/Platform/promotepay_statistics.html index 3a7047c7e..11a64e4e8 100644 --- a/Application/Admin/View/Platform/promotepay_statistics.html +++ b/Application/Admin/View/Platform/promotepay_statistics.html @@ -54,14 +54,14 @@
- +
- - - + +
-
- -
- + - - - + - @@ -184,7 +174,7 @@ - + @@ -368,31 +358,48 @@ }); }); - var game_server = "{:I('server_id')}"; - $("#game_type").change(function(){ - $.ajax({ - url:"{:U('Ajax/getGmeServer')}", - type:"post", - data:{sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()}, - dataType:'json', - success:function(data){ - console.log(data) - str = ""; - for (var i in data){ - str += "" - } - $("#server_id").empty(); - $("#server_id").append(str); - $("#server_id").select2(); - } - }) - }); + $("#game_id").change(function(){ + console.log($("#game_id option:selected").attr('game-id')); + $.ajax({ + url:"{:U('getSpendServer')}", + type:"post", + data:{game_id:$("#game_id option:selected").attr('game-id')}, + dataType:'json', + success:function(data){ + console.log(data) + str = ""; + for (var i in data){ + str += "" + } + $("#server_id").empty(); + $("#server_id").append(str); + $("#server_id").select2(); - $("#game_name").change(function(){ - $("#game_type").change(); - }); + } + }) + }); + var game_name = "{:I('game_name')}"; + var game_server = "{:I('server_id')}"; + if(game_name){ + console.log({game_name:game_name}) + $.ajax({ + url:"{:U('getSpendServer')}", + type:"post", + data:{game_name:game_name}, + dataType:'json', + success:function(data){ + console.log(data) + str = ""; + for (var i in data){ + str += "" + } + $("#server_id").empty(); + $("#server_id").append(str); + $("#server_id").select2(); - $("#game_name").change(); + } + }) + } }) - + \ No newline at end of file From e9c3355c90c33714cdb61c8d9bebe2ae43092348 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 9 Jul 2020 11:44:50 +0800 Subject: [PATCH 25/54] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=93=E6=AC=BE?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PublicController.class.php | 37 +++++++++++-------- .../Payment/View/ExcelPayment/lists.html | 2 +- Application/Payment/View/Payment/lists.html | 2 +- Application/Payment/View/Public/base.html | 19 ++++++---- Data/update.sql | 2 +- 5 files changed, 36 insertions(+), 26 deletions(-) diff --git a/Application/Payment/Controller/PublicController.class.php b/Application/Payment/Controller/PublicController.class.php index 29d676b93..623761365 100644 --- a/Application/Payment/Controller/PublicController.class.php +++ b/Application/Payment/Controller/PublicController.class.php @@ -19,27 +19,26 @@ class PublicController extends \Think\Controller public function login($mobile = null, $verify = null) { if (IS_POST) { + $logininfo = ["mobile"=>$mobile]; //1.验证手机 - $this->check_moblie($mobile); + $this->check_moblie($logininfo); + /* 检测验证码 TODO: */ if (!$this->checksafecode($mobile, $verify)) { $this->error('验证码错误'); } /* 记录登录SESSION和COOKIES */ - $cp_auth = array( - 'mobile' => $mobile - ); $session_name = 'payment_user'; if (I('auto_login')) { $expireTime = 60*60*24*30;//自动登录一个月 ini_set('session.gc_maxlifetime', $expireTime); ini_set('session.cookie_lifetime', $expireTime); - session($session_name, $cp_auth); - session($session_name.'_sign', data_auth_sign($cp_auth)); + session($session_name, $logininfo); + session($session_name.'_sign', data_auth_sign($logininfo)); session($session_name.'_expire', time()); } else { - session($session_name, $cp_auth); - session($session_name.'_sign', data_auth_sign($cp_auth)); + session($session_name, $logininfo); + session($session_name.'_sign', data_auth_sign($logininfo)); } $this->success('登录成功!', U('Payment/lists')); @@ -143,14 +142,22 @@ class PublicController extends \Think\Controller return false; } } - public function check_moblie($mobile){ - $check_mobile = M("Kv")->field("value")->where("`key`='payment_check_mobile'")->find(); + public function check_moblie(&$logininfo){ + $mobile = $logininfo['mobile']; + + $check_mobile = M("Kv")->field("value")->where("`key`='payment_check_mobile' AND `value`= '{$mobile}'")->find(); if(empty($check_mobile)){ - $this->error('请先配置登陆验证手机'); - } - $check_mobile = $check_mobile['value']; - if($check_mobile !== $mobile){ - $this->error('该账号没有权限登录打款系统'); + //获取普通登陆 + $plogin = M("payment_member","tab_")->where("`mobile`= '{$mobile}'")->find(); + if(empty($plogin)){ + $this->error('无此登陆账号'); + }else{ + $logininfo["real_name"] = $plogin['real_name']; + $logininfo["is_payment"] = 0; + } + }else{ + $logininfo['real_name'] = M("Kv")->field("IFNULL(value,'admin')")->where("`key`='payment_check_name'")->find(); + $logininfo['is_payment'] = 1; } } diff --git a/Application/Payment/View/ExcelPayment/lists.html b/Application/Payment/View/ExcelPayment/lists.html index e15ece7a4..d0f7ea188 100644 --- a/Application/Payment/View/ExcelPayment/lists.html +++ b/Application/Payment/View/ExcelPayment/lists.html @@ -96,7 +96,7 @@ diff --git a/Application/Payment/View/Payment/lists.html b/Application/Payment/View/Payment/lists.html index a15281e7e..b07a6e550 100644 --- a/Application/Payment/View/Payment/lists.html +++ b/Application/Payment/View/Payment/lists.html @@ -96,7 +96,7 @@ diff --git a/Application/Payment/View/Public/base.html b/Application/Payment/View/Public/base.html index 8373b8546..e7dba08a8 100644 --- a/Application/Payment/View/Public/base.html +++ b/Application/Payment/View/Public/base.html @@ -71,7 +71,7 @@
  • 退出
  • - {:session('payment_user.mobile')} + {:session('payment_user.real_name')}
    @@ -203,18 +203,21 @@ $(function(){
    功能菜单
    --> @@ -283,7 +286,7 @@ $(function(){ location.reload(); }, error:function(){ - updateAlert("服务器故障!",'tip_error'); + updateAlert('退出成功','tip_right'); setTimeout(function(){ $('#tip').find('.tipclose').click(); },1500); diff --git a/Data/update.sql b/Data/update.sql index 85d53e9c7..f720e6b2a 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -2157,7 +2157,7 @@ CREATE TABLE `tab_payment_member` ( `real_name` varchar(255) DEFAULT '' COMMENT '真实姓名', `mobile` char(11) NOT NULL COMMENT '手机号码', `last_login_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后登录时间', - PRIMARY KEY (`uid`), + PRIMARY KEY (`id`), KEY `mobile` (`mobile`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='打款登陆账号'; From b460b7409fadc11d75b2d970c856f9798a8b6df9 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 9 Jul 2020 11:56:13 +0800 Subject: [PATCH 26/54] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=93=E6=AC=BE?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=99=BB=E9=99=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PublicController.class.php | 8 +++++++- Application/Payment/View/Public/base.html | 16 +++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Application/Payment/Controller/PublicController.class.php b/Application/Payment/Controller/PublicController.class.php index 623761365..f6bd1bc0c 100644 --- a/Application/Payment/Controller/PublicController.class.php +++ b/Application/Payment/Controller/PublicController.class.php @@ -156,7 +156,13 @@ class PublicController extends \Think\Controller $logininfo["is_payment"] = 0; } }else{ - $logininfo['real_name'] = M("Kv")->field("IFNULL(value,'admin')")->where("`key`='payment_check_name'")->find(); + + $rname = M("Kv")->field("value")->where("`key`='payment_check_name'")->find(); + if(empty( $rname)){ + $logininfo['real_name'] = "admin"; + }else{ + $logininfo['real_name'] = $rname['value']; + } $logininfo['is_payment'] = 1; } } diff --git a/Application/Payment/View/Public/base.html b/Application/Payment/View/Public/base.html index e7dba08a8..f5b0f818c 100644 --- a/Application/Payment/View/Public/base.html +++ b/Application/Payment/View/Public/base.html @@ -203,13 +203,15 @@ $(function(){
    功能菜单
    -->
    - + - - - - - + @@ -193,7 +193,7 @@ - + @@ -374,7 +374,7 @@ $("#search").click(function(){ var start = $("#time_start").val(); - var end = $("#time_end").val(); + var end = $("#datetimepicker").val(); if(start !='' && end != ''){ if (Date.parse(start) > Date.parse(end)){ layer.msg('开始时间必须小于等于结束时间'); @@ -382,6 +382,15 @@ } } + var start2 = $("#time_start2").val(); + var end2 = $("#datetimepicker2").val(); + if(start2 !='' && end2 != ''){ + if (Date.parse(start2) > Date.parse(end2)){ + layer.msg("支付时间开始时间必须小于等于结束时间"); + return false; + } + } + var url = $(this).attr('url'); var query = $('.jssearch').find('input').serialize(); query += "&"+$('.jssearch').find('select').serialize(); diff --git a/Application/Payment/View/ExcelPayment/showPayment.html b/Application/Payment/View/ExcelPayment/showPayment.html index 24f3bcb7a..752a89314 100644 --- a/Application/Payment/View/ExcelPayment/showPayment.html +++ b/Application/Payment/View/ExcelPayment/showPayment.html @@ -121,7 +121,7 @@ - + diff --git a/Application/Payment/View/ExcelPayment/viewPuPool.html b/Application/Payment/View/ExcelPayment/viewPuPool.html index cec7b80eb..986ae530a 100644 --- a/Application/Payment/View/ExcelPayment/viewPuPool.html +++ b/Application/Payment/View/ExcelPayment/viewPuPool.html @@ -83,7 +83,10 @@ float: left; margin: 0; } - + #statementShow td{ + line-height: 1.5; + padding: 8px 0; + } diff --git a/Application/Payment/View/Public/base.html b/Application/Payment/View/Public/base.html index 4c0b381f4..edf351e1f 100644 --- a/Application/Payment/View/Public/base.html +++ b/Application/Payment/View/Public/base.html @@ -209,7 +209,9 @@ $(function(){
  • 复核账号
  • - +
  • + 制单账号 +
  • 打款方式

    diff --git a/Application/Payment/View/User/add.html b/Application/Payment/View/User/add.html new file mode 100644 index 000000000..ab9fc7180 --- /dev/null +++ b/Application/Payment/View/User/add.html @@ -0,0 +1,50 @@ + + + +
    +
    + + + +
    公司游戏累计注册▲ - 累计注册▼ - 累计注册 + 累计充值▲ + 累计充值▼ + 累计充值 排行榜▲ @@ -115,22 +129,22 @@ - 今日注册▲ - 今日注册▼ - 今日注册 + 今日充值▲ + 今日充值▼ + 今日充值 - 本周注册▲ - 本周注册▼ - 本周注册 + 本周充值▲ + 本周充值▼ + 本周充值 - 本月注册▲ - 本月注册▼ - 本月注册 + 本月充值▲ + 本月充值▼ + 本月充值
    aOh! 暂时还没有内容!aOh! 暂时还没有内容!
    {$data['company_name']} - {$data['promote_account']} - - {$data['promote_account']} {$data['admin_username']} {$data['relation_game_name']}{$data.count}{$data.count} {$data.rand}{$data.rand}{$data.rand}{$data.rand} {$data.today} {$data.week} {$data.mounth}
    订单日期: - +
    管理员游戏累计注册▲ 累计注册▼ 累计注册 @@ -167,7 +158,6 @@ --> {$data['admin_username']}{$data['relation_game_name']} {$data.count} {$data.rand}{$data.rand}{$data.rand}{$data.rand} {$data.today}
    汇总汇总 {$total.sum_count} --- {$total.sum_today}
    公司推广员账号会长账号管理员游戏市场专员 累计充值▲ 累计充值▼ @@ -174,7 +165,6 @@ {$data['company_name']} {$data['promote_account']} {$data['admin_username']}{$data['relation_game_name']} {$data.count} {$data.rand}{$data.rand}{$data.rand}{$data.rand} {$data.today}
    汇总汇总 {$total.sum_count} --- {$total.sum_today}推广员账号管理员市场专员 累计注册▲ 累计注册▼ From 51a1c9c707b0b55160c4c117e0993ef5a7e0d565 Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Thu, 9 Jul 2020 13:51:05 +0800 Subject: [PATCH 28/54] upt --- .../View/Platform/promote_statistics.html | 22 ++++++++++++++----- .../View/Platform/promotepay_statistics.html | 21 +++++++++++++----- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/Application/Admin/View/Platform/promote_statistics.html b/Application/Admin/View/Platform/promote_statistics.html index 7d09bfc3d..c8942ea10 100644 --- a/Application/Admin/View/Platform/promote_statistics.html +++ b/Application/Admin/View/Platform/promote_statistics.html @@ -282,12 +282,22 @@ } }); // var date="{$setdate}"; - $('#time-start, #time-end').each(function(){ - laydate.render({ - elem: this, //指定元素, - type : 'date' - }); - }); + $('#time-start').datetimepicker({ + format: 'yyyy-mm-dd', + language:"zh-CN", + minView:2, + autoclose:true, + // endDate:date + }); + + $('#datetimepicker').datetimepicker({ + format: 'yyyy-mm-dd', + language:"zh-CN", + minView:2, + autoclose:true, + pickerPosition:'bottom-left', + // endDate:date + }) $("#game_id").change(function(){ $.ajax({ diff --git a/Application/Admin/View/Platform/promotepay_statistics.html b/Application/Admin/View/Platform/promotepay_statistics.html index 11a64e4e8..23f019da4 100644 --- a/Application/Admin/View/Platform/promotepay_statistics.html +++ b/Application/Admin/View/Platform/promotepay_statistics.html @@ -351,13 +351,22 @@ } }); // var date="{$setdate}"; - $('#time-start, #time-end').each(function(){ - laydate.render({ - elem: this, //指定元素, - type : 'date' - }); - }); + $('#time-start').datetimepicker({ + format: 'yyyy-mm-dd', + language:"zh-CN", + minView:2, + autoclose:true, + // endDate:date + }); + $('#datetimepicker').datetimepicker({ + format: 'yyyy-mm-dd', + language:"zh-CN", + minView:2, + autoclose:true, + pickerPosition:'bottom-left', + // endDate:date + }) $("#game_id").change(function(){ console.log($("#game_id option:selected").attr('game-id')); $.ajax({ From 52b11689305b30d11afad8164202b07244e52dd4 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 9 Jul 2020 14:01:11 +0800 Subject: [PATCH 29/54] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=93=E6=AC=BE?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExcelPaymentController.class.php | 16 ++++++++++++++-- Data/update.sql | 3 ++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Application/Payment/Controller/ExcelPaymentController.class.php b/Application/Payment/Controller/ExcelPaymentController.class.php index 42461ce48..8aa80bc75 100644 --- a/Application/Payment/Controller/ExcelPaymentController.class.php +++ b/Application/Payment/Controller/ExcelPaymentController.class.php @@ -145,6 +145,13 @@ class ExcelPaymentController extends BaseController $v['company_type'] = 2; $v['create_time'] = time(); $v['statement_num'] = "JS_".date('Ymd').date('His').$v['company_id'].sp_random_string(5); + $dm = [ + "mobile"=>$this->admininfo['mobile'], + "real_name"=>$this->admininfo['real_name'], + "time"=>date("Y-m-d H:i:s") + ]; + $v['document_maker'] = json_encode($dm,JSON_UNESCAPED_UNICODE); + if(!isset($company_info['ali_user']) || !isset($company_info['ali_account']) || $company_info['ali_user'] == '' || $company_info['ali_account'] == ''){ M('ExcelStatementInfo',"tab_")->where("batch_num = '{$v['batch_num']}'")->delete(); $this->ajaxReturn(["status"=>0,"msg"=>"支付宝真实姓名及登陆账号不允许为空"]); @@ -312,11 +319,10 @@ class ExcelPaymentController extends BaseController //执行打款 $title = $remark; $amount = $dbres['statement_money']; - $amount = 0.1; + $amount = 0.1; //测试金额必须去除 $payres = $fund->transfer($company_info['ali_account'],$company_info['ali_user'],$dbres['statement_num'],$amount, $title); $resultCode = $payres->code; - $savedata = ["id"=>$dbres['id']]; if(!empty($resultCode)&&$resultCode == 10000){ $savedata["pay_status"]=1; @@ -329,6 +335,12 @@ class ExcelPaymentController extends BaseController $savedata["pay_info"] = json_encode($payres,JSON_UNESCAPED_UNICODE); $savedata["pay_time"]=time(); + $pu = [ + "mobile"=>$this->admininfo['mobile'], + "real_name"=>$this->admininfo['real_name'], + "time"=>date("Y-m-d H:i:s") + ]; + $savedata['payment_user'] = json_encode($pu,JSON_UNESCAPED_UNICODE); } M("ExcelStatementInfo","tab_")->save($savedata); $this->ajaxReturn(["success"=>"打款成功","data"=>[]]); diff --git a/Data/update.sql b/Data/update.sql index f720e6b2a..6bb4dde8e 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -2092,11 +2092,12 @@ CREATE TABLE `tab_excel_statement_info` ( `statement_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账截止时间', `statement_num` varchar(500) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '结算单号', `statement_info` text NOT NULL COMMENT '订单相关信息json', - `pay_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '打款状态 -1:打款失败 0:未打款 1:打款成功', `pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付完成时间', `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '生成时间', `pay_info` text COMMENT '打款信息', + `document_maker` varchar(255) DEFAULT '' COMMENT '制单信息', + `payment_user` varchar(255) DEFAULT '' COMMENT '打款基础信息', `remark` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '备注', PRIMARY KEY (`id`), KEY `batch_num` (`batch_num`) USING BTREE, From 60e89f68680d4514de303eadc969b791e13d4ef7 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 9 Jul 2020 14:34:36 +0800 Subject: [PATCH 30/54] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExcelPaymentController.class.php | 41 ++++++++++++++----- .../Payment/View/ExcelPayment/add.html | 35 ---------------- .../Payment/View/ExcelPayment/lists.html | 19 ++++++--- .../View/ExcelPayment/showPayment.html | 2 +- .../Payment/View/ExcelPayment/viewPuPool.html | 17 +++++++- 5 files changed, 62 insertions(+), 52 deletions(-) diff --git a/Application/Payment/Controller/ExcelPaymentController.class.php b/Application/Payment/Controller/ExcelPaymentController.class.php index 8aa80bc75..743bc6521 100644 --- a/Application/Payment/Controller/ExcelPaymentController.class.php +++ b/Application/Payment/Controller/ExcelPaymentController.class.php @@ -89,14 +89,15 @@ class ExcelPaymentController extends BaseController $v['company_type'] = $this->CompanyType[$v['company_type']]; $v["pay_status_str"] = $this->PayStatus[$v['pay_status']]; - $v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']); - $v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']); + $v['create_time'] = date('Y-m-d H:i:s',$v['create_time']); + // $v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']); + // $v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']); if(empty($v['pay_time'])){ $v['pay_time'] = "--"; }else{ $v['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']); } - $v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}"; + // $v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}"; } //统计待打款金额 @@ -126,8 +127,8 @@ class ExcelPaymentController extends BaseController public function loopAdd() { $p = $_REQUEST; - $statement_begin_time = strtotime($p['statement_begin_time']); - $statement_end_time = strtotime($p['statement_end_time'])+86399; + // $statement_begin_time = strtotime($p['statement_begin_time']); + // $statement_end_time = strtotime($p['statement_end_time'])+86399; $batch = $p['batch']; $checkarr = $p['checkarr']; //循环获取添加 @@ -137,8 +138,8 @@ class ExcelPaymentController extends BaseController $ExcelStatementInfo = M('ExcelStatementInfo',"tab_"); foreach ($checkarr as $k => &$v) { $company_info = $v['company_info']; - $v['statement_begin_time'] = $statement_begin_time; - $v['statement_end_time'] = $statement_end_time; + // $v['statement_begin_time'] = $statement_begin_time; + // $v['statement_end_time'] = $statement_end_time; $v['batch_num'] = $batch; $v['statement_info'] = json_encode($v['statement_info'],JSON_UNESCAPED_UNICODE); $v['company_info'] = json_encode($v['company_info'],JSON_UNESCAPED_UNICODE); @@ -214,12 +215,32 @@ class ExcelPaymentController extends BaseController foreach($infolist as $k=>&$v){ $v['statement_info'] = json_decode($v['statement_info'],true); $v['company_info'] = json_decode($v['company_info'],true); - $v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']); - $v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']); + // $v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']); + // $v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']); + $cline = $line+1; if($is_export){ $v['sum_money_exp'] = "="; + $hh = "\n"; + }else{ + $hh = "
    "; + } + + $dm = json_decode($v['document_maker'],true); + $v['document_maker'] = $dm['mobile'].$hh."({$dm['real_name']})"; + if(!empty($v['payment_user'])){ + $pu = json_decode($v['payment_user'],true); + $v['payment_user'] = $pu['mobile'].$hh."({$pu['real_name']})"; + }else{ + $v['payment_user'] = "--"; } + $v["pay_status_str"] = $this->PayStatus[$v['pay_status']]; + if(!empty($v['pay_time'])){ + $v['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']); + }else{ + $v['pay_time'] = '--'; + } + $row = 0; foreach($v['statement_info'] as $ke=>&$va){ $va['row'] = count($va['game_list']); @@ -322,7 +343,7 @@ class ExcelPaymentController extends BaseController $amount = 0.1; //测试金额必须去除 $payres = $fund->transfer($company_info['ali_account'],$company_info['ali_user'],$dbres['statement_num'],$amount, $title); $resultCode = $payres->code; - + $savedata = ["id"=>$dbres['id']]; if(!empty($resultCode)&&$resultCode == 10000){ $savedata["pay_status"]=1; diff --git a/Application/Payment/View/ExcelPayment/add.html b/Application/Payment/View/ExcelPayment/add.html index b3f83ef70..aacf2ad1d 100644 --- a/Application/Payment/View/ExcelPayment/add.html +++ b/Application/Payment/View/ExcelPayment/add.html @@ -36,22 +36,6 @@ 用于检索使用
    *结算时间: -
    - -  -  -
    - - -
    -
    - 用于检索及唯一值检验 -
    *文件上传: @@ -230,8 +214,6 @@ "check_page":0, "filedata":[], "pay_way":-1, - "begin_time":0, - "end_time":0, "batch":batch } $("#batch").html(batch); @@ -241,26 +223,11 @@ $("#submit_btn").on("click", function () { - var start = $("#time_start").val(); - var end = $("#time_end").val(); - var sdate = Date.parse(start) / 1000; - var edate = Date.parse(end) / 1000; - if (start == '' || end == '') { - layer.msg('开始时间与结束时间都不允许为空'); - return false; - } - if (sdate > edate) { - layer.msg('开始时间必须小于等于结束时间'); - return false; - } - //获取文件 if (!isfile) { layer.msg('excel文件不能为空'); return false; } - sendDefaultData.begin_time = start; - sendDefaultData.end_time = end; //执行 readFileInput(function () { if(sendDefaultData.filedata_count == 0){ @@ -270,8 +237,6 @@ } //获取需要循环的次数 sendDefaultData.check_page = Math.ceil(sendDefaultData.filedata_count/check_size); - sendDefaultData.begin_time = start; - sendDefaultData.end_time = end; COMPARE.checkData(function(){ COMPARE.loopCheck(1,function(){ setTimeout(function(){ diff --git a/Application/Payment/View/ExcelPayment/lists.html b/Application/Payment/View/ExcelPayment/lists.html index d0f7ea188..ae9468b54 100644 --- a/Application/Payment/View/ExcelPayment/lists.html +++ b/Application/Payment/View/ExcelPayment/lists.html @@ -110,14 +110,14 @@ -
    +
    合作公司 公司类型结算时间创建时间 批次号 结算金额 结算流水 {$data.company_name} {$data.company_type}{$data.valid}{$data.create_time} {$data.batch_num}{$vo.batch_num} {$vo.statement_money} {$vo.remark}
    合计 - 打款成功金额: {$money.success_money}  /  待打款金额: {$money.statement_money}  /  打款成功金额: {$money.error_money} + 打款成功金额: {$money.success_money}  /  待打款金额: {$money.statement_money}  /  打款失败金额: {$money.error_money}
    + + + + + + + + + + + +
    *姓名: + + 制单人姓名 +
    *手机号码: + + 制单人登陆用的手机 +
    + +
    + + + 返回 + +
    + + +
    + + + + + diff --git a/Application/Payment/View/User/index.html b/Application/Payment/View/User/index.html new file mode 100644 index 000000000..4b93c1ab7 --- /dev/null +++ b/Application/Payment/View/User/index.html @@ -0,0 +1,84 @@ + + + + + + + + +
    +
    + 新增 +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    姓名手机号码操作
    {$vo.real_name}{$vo.mobile} + 删除 +
    aOh! 暂时还没有内容!
    +
    +
    + + {$_page} +
    + + +
    + + + + + + From 213b1523982cee4e0091d999e743417d8378b2e5 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 9 Jul 2020 16:34:57 +0800 Subject: [PATCH 39/54] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=93=E6=AC=BE?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Common/Common/extend.php | 16 +++++++++------- Application/Payment/View/ExcelPayment/add.html | 2 ++ Application/Payment/View/Payment/lists.html | 8 +++++--- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php index 0c70a79d8..526108922 100644 --- a/Application/Common/Common/extend.php +++ b/Application/Common/Common/extend.php @@ -414,6 +414,12 @@ function set_pagination($count, $row,$request='') { function set_pagination_all($count, $row,$request='') { $aside = ''; + $aside .= ''; }else{ - $aside .= ''; + $aside .= ''; } + $count=$count?$count:0; $row=$row?$row:10; if ($count > $row) { diff --git a/Application/Payment/View/ExcelPayment/add.html b/Application/Payment/View/ExcelPayment/add.html index bbda65fb3..2ef263e20 100644 --- a/Application/Payment/View/ExcelPayment/add.html +++ b/Application/Payment/View/ExcelPayment/add.html @@ -80,6 +80,7 @@ 市场员 下游性质 产品 + 产品类型 结算时间 推广流水 分成比例 @@ -103,6 +104,7 @@ 秦汉风云 策略 2020.6.22-2020.6.28 5626 + 5626 1% 0% 0 diff --git a/Application/Payment/View/Payment/lists.html b/Application/Payment/View/Payment/lists.html index b07a6e550..f293b060f 100644 --- a/Application/Payment/View/Payment/lists.html +++ b/Application/Payment/View/Payment/lists.html @@ -168,9 +168,11 @@
    - + + +
    From 5231b508e62b1382d7fb57a30504386b1fb8268b Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 9 Jul 2020 16:36:04 +0800 Subject: [PATCH 40/54] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=93=E6=AC=BE?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Payment/View/ExcelPayment/lists.html | 4 +++- Application/Payment/View/Payment/lists.html | 8 +++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Application/Payment/View/ExcelPayment/lists.html b/Application/Payment/View/ExcelPayment/lists.html index 56580344d..f9457192e 100644 --- a/Application/Payment/View/ExcelPayment/lists.html +++ b/Application/Payment/View/ExcelPayment/lists.html @@ -156,7 +156,9 @@
    - 批量打款 + + 批量打款 + Excel导入 导出 批量删除 diff --git a/Application/Payment/View/Payment/lists.html b/Application/Payment/View/Payment/lists.html index f293b060f..b07a6e550 100644 --- a/Application/Payment/View/Payment/lists.html +++ b/Application/Payment/View/Payment/lists.html @@ -168,11 +168,9 @@
    - - - +
    From 52b478f570b84e2eb09885c188eb6e57466a325c Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Thu, 9 Jul 2020 16:37:48 +0800 Subject: [PATCH 41/54] upt --- Application/Admin/Controller/PlatformController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index eafe81835..897d53b6d 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -673,7 +673,7 @@ class PlatformController extends ThinkController // 如果是市场专员那么只能看自己的 $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { - $map['s.market_admin_id'] = $statisticsMap['tab_promote.admin_id'] = $_REQUEST['admin_user_id'] = $map['tp2.admin_id'] = is_login(); + $map['s.market_admin_id'] = is_login(); } $data = M('promote', 'tab_')->alias('tp1') From ba4d08cc8b84669f36ea4255dc68b20e643b4d63 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 9 Jul 2020 16:44:20 +0800 Subject: [PATCH 42/54] =?UTF-8?q?=E5=8F=96=E6=B6=88=E7=BA=BF=E4=B8=8A?= =?UTF-8?q?=E6=89=93=E6=AC=BE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Payment/View/Payment/lists.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Application/Payment/View/Payment/lists.html b/Application/Payment/View/Payment/lists.html index b07a6e550..02176e57c 100644 --- a/Application/Payment/View/Payment/lists.html +++ b/Application/Payment/View/Payment/lists.html @@ -169,7 +169,9 @@ From 96327507f42e9d6a01910299f729ae435e3095ee Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Thu, 9 Jul 2020 16:54:08 +0800 Subject: [PATCH 43/54] upt --- .../Controller/PlatformController.class.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index 897d53b6d..287f59b2e 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -643,9 +643,6 @@ class PlatformController extends ThinkController }else{ $tmin = $tmonth[1][0]; } - - //为数据权限添加 - setPowerPromoteIds($map, 'tp1.id'); if (isset($_REQUEST['promote_id'])) { //$map['tp1.id'] = $_REQUEST['promote_id']; @@ -666,14 +663,13 @@ class PlatformController extends ThinkController } } - if (!empty($_REQUEST['admin_id'])) { - $map['s.market_admin_id'] = $_REQUEST['admin_id']; - } - - // 如果是市场专员那么只能看自己的 - $isMarketAdmin = isMarketAdmin(); - if ($isMarketAdmin) { + if (isMarketAdmin()) { $map['s.market_admin_id'] = is_login(); + } else if (!empty($_REQUEST['admin_id'])) { + $map['s.market_admin_id'] = $_REQUEST['admin_id']; + } else { + //为数据权限添加 + setPowerPromoteIds($map, 'tp1.id'); } $data = M('promote', 'tab_')->alias('tp1') From 6390d680ec4bfd7357e198e622b7dd93f2221a30 Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Thu, 9 Jul 2020 16:57:57 +0800 Subject: [PATCH 44/54] upt --- Application/Admin/Controller/PlatformController.class.php | 2 +- Application/Admin/View/Platform/promotepay_statistics.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index 287f59b2e..23e3acf2c 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -839,7 +839,7 @@ class PlatformController extends ThinkController data2csv($data,'推广员充值统计',array( 'company_name' => '公司', - "promote_account"=>"推广员账号", + "promote_account"=>"当前推广员账号", 'admin_username' => '管理员', "count"=>"累计充值", "rand"=>"排行榜", diff --git a/Application/Admin/View/Platform/promotepay_statistics.html b/Application/Admin/View/Platform/promotepay_statistics.html index 23f019da4..1ba329b87 100644 --- a/Application/Admin/View/Platform/promotepay_statistics.html +++ b/Application/Admin/View/Platform/promotepay_statistics.html @@ -61,7 +61,7 @@
    - + - + @@ -142,7 +142,7 @@ @@ -175,8 +175,8 @@ *结算周期: @@ -186,7 +186,8 @@ *开票类型: @@ -333,10 +334,15 @@ $(function(){ first_company = data.info; var companystr = ''; for (var i in first_company) { - companystr += "" + var selected = '' + if (first_company[i].company_name == '福建金菠菜网络科技有限公司') { + selected = 'selected' + } + companystr += "" } $("#first_company_id").html(companystr); $("#first_company_id").select2(); + $("#first_company_id").change(); }) }) $("#first_company_id").on("change",function(){ @@ -349,6 +355,7 @@ $(function(){ $("#first_company_name").val(companyinfo.company_name); $("#first_company_info").html(setCompanyInfo(companyinfo)); }); + $("#first_company_type").change(); $("#second_company_type").on("change",function(){ //置空 @@ -369,6 +376,7 @@ $(function(){ $("#second_company_id").select2(); }) }) + $("#second_company_type").change(); $("#second_company_id").on("change",function(){ var id = $(this).find("option:selected").val(); //获取基础信息 diff --git a/Application/Admin/View/CompanyRelation/editRelation.html b/Application/Admin/View/CompanyRelation/editRelation.html index 0c310e144..b19c13115 100644 --- a/Application/Admin/View/CompanyRelation/editRelation.html +++ b/Application/Admin/View/CompanyRelation/editRelation.html @@ -163,6 +163,7 @@ *开票类型: From 0f0d52c78f0be9a4e7be7886369814c2d836dacb Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 10 Jul 2020 14:49:48 +0800 Subject: [PATCH 50/54] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/View/CompanyStatement/editCpStatement.html | 1 + .../Admin/View/CompanyStatement/editPcStatement.html | 11 ++++++++++- .../Admin/View/CompanyStatement/viewPcStatement.html | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Application/Admin/View/CompanyStatement/editCpStatement.html b/Application/Admin/View/CompanyStatement/editCpStatement.html index 6755de89a..23efb5ce8 100644 --- a/Application/Admin/View/CompanyStatement/editCpStatement.html +++ b/Application/Admin/View/CompanyStatement/editCpStatement.html @@ -274,6 +274,7 @@
    diff --git a/Application/Admin/View/CompanyStatement/editPcStatement.html b/Application/Admin/View/CompanyStatement/editPcStatement.html index cc1fad06e..ea332726c 100644 --- a/Application/Admin/View/CompanyStatement/editPcStatement.html +++ b/Application/Admin/View/CompanyStatement/editPcStatement.html @@ -269,6 +269,7 @@
    @@ -351,10 +352,18 @@
    + From c87b61d94b7faec70adbc10f3eb25534a432778b Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 10 Jul 2020 15:11:52 +0800 Subject: [PATCH 51/54] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/CompanyStatementController.class.php | 6 ++++-- .../Admin/Controller/VerifyBillController.class.php | 6 ++++-- .../Admin/View/CompanyRelation/addRelation.html | 2 +- .../View/CompanyStatementPool/editCpStatement.html | 1 + .../View/CompanyStatementPool/editPcStatement.html | 11 ++++++++++- .../View/CompanyStatementPool/viewPcStatement.html | 1 + 6 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 67e945a4d..0743c12af 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -383,9 +383,11 @@ class CompanyStatementController extends ThinkController $data['receive_company'] = $data['first_party_info']; $data['pay_company'] = $data['second_party_info']; } - if($data['receive_company']['invoice_type'] == 1){ + if($data['receive_company']['invoice_type'] == 0){ + $data['receive_company']['invoice_type']="无"; + } elseif($data['receive_company']['invoice_type'] == 1){ $data['receive_company']['invoice_type']="专票"; - }else{ + } else{ $data['receive_company']['invoice_type']="普票"; } if ($data['company_belong'] == 9) {//上游 diff --git a/Application/Admin/Controller/VerifyBillController.class.php b/Application/Admin/Controller/VerifyBillController.class.php index 62d4a925d..5d77a29af 100644 --- a/Application/Admin/Controller/VerifyBillController.class.php +++ b/Application/Admin/Controller/VerifyBillController.class.php @@ -157,9 +157,11 @@ class VerifyBillController extends Controller { $data['receive_company'] = $data['first_party_info']; $data['pay_company'] = $data['second_party_info']; } - if($data['receive_company']['invoice_type'] == 1){ + if($data['receive_company']['invoice_type'] == 0){ + $data['receive_company']['invoice_type']="无"; + } elseif ($data['receive_company']['invoice_type'] == 1) { $data['receive_company']['invoice_type']="专票"; - }else{ + } else { $data['receive_company']['invoice_type']="普票"; } if ($data['company_belong'] == 9) {//上游 diff --git a/Application/Admin/View/CompanyRelation/addRelation.html b/Application/Admin/View/CompanyRelation/addRelation.html index 869d5fad4..d4263aaf8 100644 --- a/Application/Admin/View/CompanyRelation/addRelation.html +++ b/Application/Admin/View/CompanyRelation/addRelation.html @@ -186,7 +186,7 @@ *开票类型: diff --git a/Application/Admin/View/CompanyStatementPool/editCpStatement.html b/Application/Admin/View/CompanyStatementPool/editCpStatement.html index 6755de89a..23efb5ce8 100644 --- a/Application/Admin/View/CompanyStatementPool/editCpStatement.html +++ b/Application/Admin/View/CompanyStatementPool/editCpStatement.html @@ -274,6 +274,7 @@
    diff --git a/Application/Admin/View/CompanyStatementPool/editPcStatement.html b/Application/Admin/View/CompanyStatementPool/editPcStatement.html index 9d2f3547f..d030fc6b8 100644 --- a/Application/Admin/View/CompanyStatementPool/editPcStatement.html +++ b/Application/Admin/View/CompanyStatementPool/editPcStatement.html @@ -269,6 +269,7 @@
    @@ -351,10 +352,18 @@
    + From 80cb58cdc9ff832cb627a61231d45554a16be1bc Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 10 Jul 2020 16:57:31 +0800 Subject: [PATCH 52/54] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E4=B8=9A?= =?UTF-8?q?=E7=BB=A9=E6=9F=A5=E8=AF=A2=E6=97=B6=E9=97=B4=E8=8C=83=E5=9B=B4?= =?UTF-8?q?=E9=99=90=E5=88=B6=E4=B8=BA31=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/QueryController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index d09b4ae87..3ff0f0ce2 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -2111,7 +2111,7 @@ class QueryController extends BaseController $timeout = 0; $records = []; - if (intval($endTime - $beginTime) / (24 * 3600) <= 7) { + if (intval($endTime - $beginTime) / (24 * 3600) <= 31) { $promoteRepository = new PromoteRepository(); $createRoleCountList = $promoteRepository->getCreateRoleCountByIds($ids, $params); $createRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds($ids, $params); From aeade79e673e4585d1ef01c2562f69f61076fabf Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 10 Jul 2020 17:19:15 +0800 Subject: [PATCH 53/54] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/View/default/Query/achievement.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Home/View/default/Query/achievement.html b/Application/Home/View/default/Query/achievement.html index 7359bbf11..460cd03c0 100644 --- a/Application/Home/View/default/Query/achievement.html +++ b/Application/Home/View/default/Query/achievement.html @@ -162,7 +162,7 @@