From 5f6611fc30b8577806358cbe984babb48af2f5fd Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Fri, 10 Jan 2020 18:27:30 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E8=B5=84=E8=B4=A8=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/BaseController.class.php | 56 ++++- .../Controller/DownloadController.class.php | 3 +- .../Controller/FinanceController.class.php | 20 ++ .../Controller/PlayersController.class.php | 1 + .../Controller/PromoteController.class.php | 10 + .../Home/Controller/SafeController.class.php | 16 +- .../Home/View/default/Promote/index.html | 18 ++ .../Home/View/default/Public/setSafePwd.html | 212 ++++++++++++++++++ ThinkPHP/Library/Think/Controller.class.php | 7 + 9 files changed, 338 insertions(+), 5 deletions(-) create mode 100644 Application/Home/View/default/Public/setSafePwd.html diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php index 2cd6ba2c5..31c126422 100644 --- a/Application/Home/Controller/BaseController.class.php +++ b/Application/Home/Controller/BaseController.class.php @@ -15,7 +15,7 @@ class BaseController extends HomeController $this->login(); $loginer = $this->getLoginPromote(); - + $this->certifiCation(); $pid = is_login_promote(); define('PLEVEL', $loginer['parent_id']); define('PID', $pid); @@ -288,4 +288,58 @@ class BaseController extends HomeController $this->ajaxReturn($data); } + + //判断是否认证资质 + public function certifiCation() { + $pid = get_pid(); + $verInfo = M('promote','tab_')->field('ver_status,level,second_pwd')->where(['id' => $pid])->find(); + $ver_status = intval($verInfo['ver_status']); + $level = intval($verInfo['level']); + $second_pwd = $verInfo['second_pwd']; + $module_name = MODULE_NAME; + $controller_name = CONTROLLER_NAME; + $action_name = ACTION_NAME; + $rule_name = $module_name.'/'.$controller_name.'/'.$action_name; + if($level == 1) { + switch ($ver_status) { + case 0: + $this->verConAction($rule_name,$second_pwd,'请进行资质认证,认证成功后才可进行操作'); + break; + case 2: + $this->verConAction($rule_name,$second_pwd,'资质审核失败,请重新验证认证资料'); + break; + case 3: + $this->verConAction($rule_name,$second_pwd,'资质验证未审核,请联系管理员'); + break; + default: + break; + } + } + + } + + //判断控制器方法 + public function verConAction($rule_name,$second_pwd,$status='') { + switch ($rule_name) { + case 'Home/Safe/modifyBaseInfo': + break; + case 'Home/Safe/setSafePassword': + break; + case 'Home/Safe/verifySafePwd': + break; + case 'Home/Promote/index': + break; + case 'Home/Safe/verifyPassword': + break; + case 'Home/Safe/safeDocument': + break; + case 'Home/Promote/popRuleDetail': + break; + case 'Home/Promote/popRuleFinish': + break; + default: + $this->tips($status,U('Safe/modifyBaseInfo')); + break; + } + } } diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index c29528030..6d36d1428 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1918,7 +1918,7 @@ class DownloadController extends BaseController { } $csvData['extend'] = $this->encryption($v['extend']); $csvData['create_time'] = $v['create_time']; - $csvData['user_account'] = $v['user_account']; + $csvData['user_account'] = $this->encryption($v['user_account']); $csvData['game_name'] = $v['game_name']; $csvData['promote_id'] = $v['promote_id']; $csvData['server_name'] = $serverInfo['server_name']; @@ -2607,6 +2607,7 @@ class DownloadController extends BaseController { foreach ($data as $key => &$list) { $list['income'] = bcmul($list['pay_amount'], bcdiv($list['selle_ratio'], 100, 2), 2); $list['pay_time'] = date('Y-m-d H:i:s', $list['pay_time']); + $list['user_account'] = $this->encryption($list['user_account']); switch ($list['pay_way']) { case 2: case 3: diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index c0c245b2e..9e13c9c97 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -80,6 +80,12 @@ class FinanceController extends BaseController { //是否是会长 $this->purview(); + $id = get_pid(); + $safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find(); + if(empty($safePwd['second_pwd'])) { + $this->display('Public/setSafePwd'); + exit; + } //验证安全密码 $metaTitle = '结算中心'; $modelList = ['财务管理', $metaTitle]; @@ -152,6 +158,12 @@ class FinanceController extends BaseController { //是否是会长 $this->purview(); + $id = get_pid(); + $safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find(); + if(empty($safePwd['second_pwd'])) { + $this->display('Public/setSafePwd'); + exit; + } //验证安全密码 $metaTitle = '结算明细'; $modelList = ['财务管理', $metaTitle]; @@ -265,6 +277,7 @@ class FinanceController extends BaseController $list['income'] = bcmul($list['pay_amount'], bcdiv($list['selle_ratio'], 100, 2), 2); $list['pay_time'] = date('Y-m-d H:i:s', $list['pay_time']); + $list['user_account'] = encryption($list['user_account']); } } @@ -374,6 +387,12 @@ class FinanceController extends BaseController { //是否是会长 $this->purview(); + $id = get_pid(); + $safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find(); + if(empty($safePwd['second_pwd'])) { + $this->display('Public/setSafePwd'); + exit; + } //验证安全密码 $metaTitle = '提现记录'; $modelList = ['财务管理', $metaTitle]; @@ -513,6 +532,7 @@ class FinanceController extends BaseController foreach ($data as &$list) { $list['income'] = bcmul($list['pay_amount'], bcdiv($list['selle_ratio'], 100, 2), 2); $list['pay_time'] = date('Y-m-d H:i:s', $list['pay_time']); + $list['user_account'] = encryption($list['user_account']); switch ($list['pay_way']) { case 2: case 3: diff --git a/Application/Home/Controller/PlayersController.class.php b/Application/Home/Controller/PlayersController.class.php index 3cf12243a..edb710fc6 100644 --- a/Application/Home/Controller/PlayersController.class.php +++ b/Application/Home/Controller/PlayersController.class.php @@ -89,6 +89,7 @@ class PlayersController extends BaseController { } $rs[$key]['extend'] = encryption($v['extend']); $rs[$key]['create_time'] = date('Y-m-d H:i:s',$v['create_time']); + $rs[$key]['user_account'] = encryption($rs[$key]['user_account']); $promoteInfo = M('promote','tab_')->field("account")->where(['id' => intval($v['promote_id'])])->find(); $rs[$key]['promote_id']= $promoteInfo['account']; diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index d43e3250f..87937b618 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -44,6 +44,14 @@ class PromoteController extends BaseController $this->display('prepare'); exit(0); } + $tips = 0; + $message = ''; + if(!empty($_REQUEST['tips'])) { + $tips = 1; + } + if(!empty($_REQUEST['message'])) { + $message = $_REQUEST['message']; + } header("Content-type:text/html;charset=utf-8"); $user = D('Promote')->isLogin(); @@ -234,6 +242,8 @@ class PromoteController extends BaseController $this->assign("rz_count", $logCount - $readLogCount); $this->assign("today_open_server_list", $today_open_server_list); $this->assign("game_list", $game_list); + $this->assign("tips",$tips); + $this->assign("message",$message); $this->meta_title = "首页"; $this->display(); } diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index 260dc2c8c..90d4ba04b 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -26,6 +26,10 @@ class SafeController extends BaseController{ } } + + public function setSafePwd() { + $this->display('Public/setSafePwd'); + } public function setSafePassword() { $password = $_REQUEST['password']; @@ -153,15 +157,21 @@ class SafeController extends BaseController{ //修改用户信息 public function modifyBaseInfo() { + $id = get_pid(); + $safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find(); + if(empty($safePwd['second_pwd'])) { + $this->display('Public/setSafePwd'); + exit; + } $metaTitle = '基础信息'; $modelList = ['基础信息', $metaTitle]; $this->verifyPasswordView($modelList); - $id = get_pid(); - $ver_status = M('promote','tab_')->where(['id'=>$id])->getField('ver_status',true); + $ver_status = M('promote','tab_')->where(['id'=>$id])->getField('ver_status',true); + if($ver_status[0] == 1) { //return $this->display('editModify'); $this->redirect('editModify'); - + exit; } if($_POST) { $username = $_REQUEST['username']; //真实姓名 diff --git a/Application/Home/View/default/Promote/index.html b/Application/Home/View/default/Promote/index.html index 0c550f33c..ecfd87c9a 100644 --- a/Application/Home/View/default/Promote/index.html +++ b/Application/Home/View/default/Promote/index.html @@ -186,6 +186,24 @@ +
+
+ + + 设置安全密码 +
+
+
+ +
+ + + + + + + + + + + + + + + +
新密码: +
确认密码: +
+ + +
+
+ + + +
+
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/ThinkPHP/Library/Think/Controller.class.php b/ThinkPHP/Library/Think/Controller.class.php index ce0f2a1f3..403b15ec5 100644 --- a/ThinkPHP/Library/Think/Controller.class.php +++ b/ThinkPHP/Library/Think/Controller.class.php @@ -199,6 +199,13 @@ abstract class Controller { $this->dispatchJump($message,1,$jumpUrl,$ajax); } + protected function tips($message='',$jumpUrl='') { + C('HTML_CACHE_ON',false); + $this->redirect('Promote/index',array('tips'=>1,'message'=>$message)); + // $this->display(C('TMPL_ACTION_TIPS')); + exit ; + } + /** * Ajax方式返回数据到客户端 * @access protected From e5d8710f0a890caf285612b2017128dbb5e5744d Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 13 Jan 2020 15:20:53 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BD=9A=E6=AC=BE?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=90=8E=E6=95=B0=E6=8D=AE=E4=B8=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/Statement/createCpStatement.html | 11 +- .../Admin/View/Statement/editCpStatement.html | 230 ++++++++---------- 2 files changed, 107 insertions(+), 134 deletions(-) diff --git a/Application/Admin/View/Statement/createCpStatement.html b/Application/Admin/View/Statement/createCpStatement.html index 3a1df1843..ebca6d47e 100644 --- a/Application/Admin/View/Statement/createCpStatement.html +++ b/Application/Admin/View/Statement/createCpStatement.html @@ -644,14 +644,23 @@ var sort = $(this).data("change"); var val = $(this).val(); + var vdata = eval("DATAOBJ."+sort);//原先值 + var dom = $(this); + if(!CHECK.number.test(val)){ layer.msg('结算单中的罚款和税率必须是数字'); - $(this).val(0); + dom.val(vdata); return false; } + var str = "DATAOBJ."+sort+"='"+val+"';"; if(sort != 'fine'){ + if(val > 100 || val < 0){ + layer.msg('结算单中的税率不允许大于100和小于0'); + dom.val(vdata); + return false; + } eval(str); var index = $(this).data("index"); var td = DATAOBJ.statement_info[index]; diff --git a/Application/Admin/View/Statement/editCpStatement.html b/Application/Admin/View/Statement/editCpStatement.html index 61da150d9..588cd1514 100644 --- a/Application/Admin/View/Statement/editCpStatement.html +++ b/Application/Admin/View/Statement/editCpStatement.html @@ -456,91 +456,61 @@ } }) }, - deepCompare(x, y) { - var i, l, leftChain, rightChain; - function compare2Objects(x, y) { - var p; - if (isNaN(x) && isNaN(y) && typeof x === 'number' && typeof y === 'number') { - return true; - } - if (x === y) { - return true; - } - if ((typeof x === 'function' && typeof y === 'function') || - (x instanceof Date && y instanceof Date) || - (x instanceof RegExp && y instanceof RegExp) || - (x instanceof String && y instanceof String) || - (x instanceof Number && y instanceof Number)) { - return x.toString() === y.toString(); - } - if (!(x instanceof Object && y instanceof Object)) { - return false; - } - if (x.isPrototypeOf(y) || y.isPrototypeOf(x)) { - return false; - } - if (x.constructor !== y.constructor) { - return false; - } - if (x.prototype !== y.prototype) { - return false; - } - if (leftChain.indexOf(x) > -1 || rightChain.indexOf(y) > -1) { - return false; + floatAdd(a,b){ + return Math.round(a*100+b*100)/100; + }, + floatCut(a,b){ + return Math.round(a*100-b*100)/100; + }, + CompanyKeyName:{ + id:"公司表id", + partner:"公司名称", + link_man:'联系人', + link_phone:"联系电话", + address:'邮寄地址', + company_tax_no:'公司税号', + payee_name:'名称', + bank_account:"银行账号", + opening_bank:"开户行" + }, + checkCompanyKey(type,key){ + //获取公司名 + var company = ''; + if(key == "payee_name" || key == "bank_account" || key == "opening_bank"){ + if((DATAOBJ.statement_type == 0 && type == "first_party_info") || (DATAOBJ.statement_type == 1 && type == "second_party_info")){ + company = "收款方"; } - for (p in y) { - if (y.hasOwnProperty(p) !== x.hasOwnProperty(p)) { - return false; - } else if (typeof y[p] !== typeof x[p]) { - return false; - } + if((DATAOBJ.statement_type == 0 && type == "second_party_info")|| (DATAOBJ.statement_type == 1 && type == "first_party_info")){ + company = "付款方"; } - for (p in x) { - if (y.hasOwnProperty(p) !== x.hasOwnProperty(p)) { - return false; - } else if (typeof y[p] !== typeof x[p]) { - return false; - } - switch (typeof (x[p])) { - case 'object': - case 'function': - - leftChain.push(x); - rightChain.push(y); - - if (!compare2Objects(x[p], y[p])) { - return false; - } - - leftChain.pop(); - rightChain.pop(); - break; - - default: - if (x[p] !== y[p]) { - return false; - } - break; - } + }else{ + if(type == "first_party_info"){ + company = "甲方"; + }else{ + company = "乙方"; } - - return true; } - - if (arguments.length < 1) { - return true; + //获取键名 + try { + var keyname = company+PUBLIC.CompanyKeyName[key]; + } catch (error) { + var keyname = false; } - for (i = 1, l = arguments.length; i < l; i++) { - - leftChain = []; //Todo: this can be cached - rightChain = []; - - if (!compare2Objects(arguments[0], arguments[i])) { - return false; - } + //验证 + if(DATAOBJ[type][key] ===''){ + layer.msg(keyname+"不能为空"); + return false; + } + if(key == "link_phone" && !CHECK.mobile.test(DATAOBJ[type][key])){ + layer.msg(keyname+"格式错误"); + return false; + } + if(key == "bank_account" && !CHECK.BankNo.test(DATAOBJ[type][key])){ + layer.msg(keyname+"格式错误"); + return false; } return true; - } + }, } //数据类 @@ -570,37 +540,20 @@ } //验证甲方信息 for (const key in DATAOBJ.first_party_info) { - var t = DATAOBJ.first_party_info; - if (t[key] === '') { - layer.msg('甲方信息不全,请先补全 code:' + key); - return false; - } - if (key == "link_phone" && !CHECK.mobile.test(t[key])) { - layer.msg('甲方联系人手机号格式错误'); - return false; - } - if (key == "bank_account" && !CHECK.BankNo.test(t[key])) { - layer.msg('甲方银行卡号格式错误'); - return false; + var t = DATAOBJ.first_party_info; + var flag = PUBLIC.checkCompanyKey("first_party_info",key); + if(!flag){ + return flag; } } //乙方 for (const key in DATAOBJ.second_party_info) { - var t = DATAOBJ.second_party_info; - if (!t[key] || t[key] == '') { - layer.msg('乙方信息不全,请先补全 code:' + key); - return false; - } - if (key == "link_phone" && !CHECK.mobile.test(t[key])) { - layer.msg('乙方联系人手机号格式错误'); - return false; - } - if (key == "bank_account" && !CHECK.BankNo.test(t[key])) { - layer.msg('乙方银行卡号格式错误'); - return false; + var t = DATAOBJ.second_party_info; + var flag = PUBLIC.checkCompanyKey("second_party_info",key); + if(!flag){ + return flag; } } - console.log(DATAOBJ); layer.load(2); $("#createStatement").off("click");//自我解绑 @@ -633,56 +586,67 @@ }, statementchange() { $(".statementchange").off("blur"); - $(".statementchange").on("blur", function () { - + $(".statementchange").on("blur",function(){ var sort = $(this).data("change"); var val = $(this).val(); - if (!CHECK.number.test(val)) { + var vdata = eval("DATAOBJ."+sort);//原先值 + var dom = $(this); + + if(!CHECK.number.test(val)){ layer.msg('结算单中的罚款和税率必须是数字'); - $(this).val(0); + dom.val(vdata); return false; } - var str = "DATAOBJ." + sort + "='" + val + "';"; + + var str = "DATAOBJ."+sort+"='"+val+"';"; - if (sort != 'fine') { + if(sort != 'fine'){ + if(val > 100 || val < 0){ + layer.msg('结算单中的税率不允许大于100和小于0'); + dom.val(vdata); + return false; + } eval(str); var index = $(this).data("index"); var td = DATAOBJ.statement_info[index]; - if ($(this).attr("name") == "first_ratio") { - td['second_ratio'] = 100 - val; + if( $(this).attr("name") == "first_ratio"){ + td['second_ratio'] = 100-val; } - if ($(this).attr("name") == "second_ratio") { - td['first_ratio'] = 100 - val; + if( $(this).attr("name") == "second_ratio"){ + td['first_ratio'] = 100-val; } - if (DATAOBJ.statement_type == 0) { - var ratio = td['first_ratio'] / 100; - } else { - var ratio = td['second_ratio'] / 100; + if(DATAOBJ.statement_type == 0){ + var ratio = td['first_ratio']/100; + }else{ + var ratio = td['second_ratio']/100; } - DATAOBJ.statement_count['sum_money'] -= td['sum_money']; - - td['sum_money'] = Math.floor((td['pay_amount'] * (100 - td['promote_ratio']) / 100 * ratio * (100 - td['fax_ratio']) / 100) * 100) / 100; - DATAOBJ.statement_count['sum_money'] += (td['sum_money'] - 0); - } else { - DATAOBJ.fine = Math.floor(DATAOBJ.fine * 100) / 100; - if (val > DATAOBJ.statement_count['sum_money']) { + DATAOBJ.statement_count['sum_money'] = PUBLIC.floatCut(DATAOBJ.statement_count['sum_money'],td['sum_money']); + + td['sum_money'] = Math.round((td['pay_amount']*(100-td['promote_ratio'])/100*ratio*(100-td['fax_ratio'])/100)* 100) / 100 ; + + DATAOBJ.statement_count['sum_money']=PUBLIC.floatAdd(DATAOBJ.statement_count['sum_money'],td['sum_money']); + + }else{ + DATAOBJ.fine = Math.round(DATAOBJ.fine * 100) / 100 ; + if(!CHECK.money.test(val)){ + layer.msg('罚款金额格式错误'); + $(this).val(DATAOBJ.fine); + return false; + } + if(val > DATAOBJ.statement_count['sum_money']){ layer.msg('罚款金额过大,总计不允许为负数'); $(this).val(DATAOBJ.fine); return false; } - - DATAOBJ.statement_count['sum_money'] = (DATAOBJ.statement_count['sum_money'] - 0 + DATAOBJ.fine); - DATAOBJ.statement_count['pay_amount'] = (DATAOBJ.statement_count['pay_amount'] - 0 + DATAOBJ.fine); + console.log(str); + DATAOBJ.statement_count['sum_money'] =PUBLIC.floatAdd(DATAOBJ.statement_count['sum_money'],DATAOBJ.fine); + DATAOBJ.statement_count['pay_amount'] = PUBLIC.floatAdd(DATAOBJ.statement_count['pay_amount'],DATAOBJ.fine); eval(str); - DATAOBJ.statement_count['sum_money'] = DATAOBJ.statement_count['sum_money'] - DATAOBJ.fine; - DATAOBJ.statement_count['pay_amount'] = DATAOBJ.statement_count['pay_amount'] - DATAOBJ.fine; - + DATAOBJ.statement_count['sum_money'] =PUBLIC.floatCut(DATAOBJ.statement_count['sum_money'],DATAOBJ.fine); + DATAOBJ.statement_count['pay_amount'] = PUBLIC.floatCut(DATAOBJ.statement_count['pay_amount'],DATAOBJ.fine); } - DATAOBJ.statement_count['pay_amount'] = Math.floor(DATAOBJ.statement_count['pay_amount'] * 100) / 100; - DATAOBJ.statement_count['sum_money'] = Math.floor(DATAOBJ.statement_count['sum_money'] * 100) / 100; - TPLSHOW.showStatementList(true); }) } From 63b44a78ffe58198724dfcc01e8fa4e318c87d44 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 13 Jan 2020 15:22:38 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E4=B8=8B=E6=B8=B8=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=94=9F=E6=88=90bug=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../createDownstreamOrder.html | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/Application/Admin/View/StatementMangement/createDownstreamOrder.html b/Application/Admin/View/StatementMangement/createDownstreamOrder.html index 80857897f..359783339 100644 --- a/Application/Admin/View/StatementMangement/createDownstreamOrder.html +++ b/Application/Admin/View/StatementMangement/createDownstreamOrder.html @@ -258,7 +258,9 @@ data = response.data; console.log(data) for (var i in data){ - add += "" + if (data[i].company_id) { + add += "" + } } $("#company_name").empty(); $("#company_name").append(add); @@ -314,7 +316,7 @@ ""+sumAmount+"" + "-" + "-" + - ""+sum+"" + + ""+sum.toFixed(2)+"" + ""+ "\n" + "本月分成总金额(人民币大写):" + @@ -336,7 +338,7 @@ console.log(ext_field); $("tbody").empty(); - $("#company_name").val(""); + // $("#company_name").val(""); $("#settlement_type").text(""); $("#bank_card").val(""); $("#account_openin").val(""); @@ -358,7 +360,7 @@ success:function(data){ console.log($("#company_name option:selected").attr('company-type')) - $("#company_name").val(data.data.company_name); + // $("#company_name").val(data.data.company_name); $("#settlement_type").text(data.data.settlement_type); $("#bank_card").val(data.data.bank_card); $("#account_openin").val(data.data.account_openin); @@ -377,10 +379,14 @@ dataType: 'json', success: function (response) { add +=''; - data = response.data; - console.log(data) - for (var i in data){ - add += "" + var datas = response.data; + + var widthdrawNumber = datas[0].widthdraw_number; + + console.log(datas) + for (var i in datas){ + + add += "" } $("#ext_field").empty(); $("#ext_field").append(add); From f34b71114fcff1ae1adc385a66a510adcbb312b2 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 13 Jan 2020 15:23:44 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Statement/createCpStatement.html | 2 +- Application/Admin/View/Statement/editCpStatement.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/View/Statement/createCpStatement.html b/Application/Admin/View/Statement/createCpStatement.html index ebca6d47e..7fc34f48d 100644 --- a/Application/Admin/View/Statement/createCpStatement.html +++ b/Application/Admin/View/Statement/createCpStatement.html @@ -648,7 +648,7 @@ var dom = $(this); if(!CHECK.number.test(val)){ - layer.msg('结算单中的罚款和税率必须是数字'); + layer.msg('结算单中的罚款和税率必须是数字,且不能为空'); dom.val(vdata); return false; } diff --git a/Application/Admin/View/Statement/editCpStatement.html b/Application/Admin/View/Statement/editCpStatement.html index 588cd1514..e6663cfdf 100644 --- a/Application/Admin/View/Statement/editCpStatement.html +++ b/Application/Admin/View/Statement/editCpStatement.html @@ -593,7 +593,7 @@ var dom = $(this); if(!CHECK.number.test(val)){ - layer.msg('结算单中的罚款和税率必须是数字'); + layer.msg('结算单中的罚款和税率必须是数字,且不能为空'); dom.val(vdata); return false; } From 7431072bbf3f8491731508c3c0ab913f896ddee9 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Mon, 13 Jan 2020 16:11:57 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E4=BB=8Edev=E5=A4=8D=E5=88=B6=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/PromoteController.class.php | 4 ++-- Application/Admin/View/Promote/belong.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 268a0b1ab..4b15764c0 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -1181,8 +1181,8 @@ class PromoteController extends ThinkController */ public function belong($p = 1) { - if (strlen(I('company_belong'))) { - $map['pb.company_belong'] = I('company_belong'); + if (strlen(I('company_relation'))) { + $map['pb.company_relation'] = I('company_relation'); } if (strlen(I('verify_status'))) { diff --git a/Application/Admin/View/Promote/belong.html b/Application/Admin/View/Promote/belong.html index 462d97a6a..a9a61708a 100644 --- a/Application/Admin/View/Promote/belong.html +++ b/Application/Admin/View/Promote/belong.html @@ -59,7 +59,7 @@
- From 08f8c518a60979cadbea5b85e6082c8576ea9ee7 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Mon, 13 Jan 2020 16:13:01 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E4=BB=8Edev=E5=A4=8D=E5=88=B6=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PromoteController.class.php | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 4b15764c0..bb9a5ff77 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -1296,17 +1296,23 @@ class PromoteController extends ThinkController public function belong_verify() { $verify_status = $_REQUEST['verify_status']; - $res = M('promote_belong', 'tab_')->where(['id' => ['in', I('ids')]])->save(['verify_status' => $verify_status]); - if (!is_null($res)) { - $promote_belongs = M('promote_belong', 'tab_')->where(['id' => ['in', I('ids')]])->select(); - foreach ($promote_belongs as $promote_belong) { - $update = [ - 'company_belong' => $promote_belong['company_belong'], - 'company_relation' => $promote_belong['company_relation'] - ]; - $res = M("promote", "tab_") - ->where("chain like '%/{$promote_belong['promote_id']}/%' or id={$promote_belong['promote_id']} ") - ->save($update); + $res = M('promote_belong', 'tab_')->where(['id' => ['in', I('ids')]])->save([ + 'verify_status' => $verify_status, + 'approver_id' => getAdmin(), + 'approver_name' => getAdmin('username'), + ]); + if (!is_null($res) ) { + if ($verify_status == 1) {//审核通过才修改推广员的归属关系 + $promote_belongs = M('promote_belong', 'tab_')->where(['id' => ['in', I('ids')]])->select(); + foreach ($promote_belongs as $promote_belong) { + $update = [ + 'company_belong' => $promote_belong['company_belong'], + 'company_relation' => $promote_belong['company_relation'] + ]; + $res = M("promote", "tab_") + ->where("chain like '%/{$promote_belong['promote_id']}/%' or id={$promote_belong['promote_id']} ") + ->save($update); + } } $this->success("操作成功", U('belong')); } else { From 152ccbc2100d906ab3942a84dd2d96b70aed1428 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 13 Jan 2020 16:23:03 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=90=BD=E5=9C=B0?= =?UTF-8?q?=E9=A1=B5=E6=8C=89=E9=92=AE=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/View/default/Home/landingPage.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Home/View/default/Home/landingPage.html b/Application/Home/View/default/Home/landingPage.html index 44e7a7550..bb7b43c97 100644 --- a/Application/Home/View/default/Home/landingPage.html +++ b/Application/Home/View/default/Home/landingPage.html @@ -277,12 +277,12 @@
beta版下载
- +
¥10至尊下载
beta版下载
- +
From 3ab162ae650e8783ef1728c02bd880ab6d82f869 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 13 Jan 2020 17:32:53 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/update.sql | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/Data/update.sql b/Data/update.sql index 847724597..580b72df0 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -917,26 +917,6 @@ ADD COLUMN `beta_url` varchar(150) NOT NULL DEFAULT '' COMMENT 'Beta链接'; ALTER TABLE `tab_game` ADD COLUMN `pay_config` varchar(255) NOT NULL COMMENT '支付渠道 wx 微信 zfb 支付宝 quick 快捷 (gf 官方 sq 双乾'; -<<<<<<< HEAD --- 2019-12-30 --- 会长管理后台提现 cxj -ALTER TABLE `tab_withdraw` -ADD COLUMN `settlement_begin_time` int(10) NOT NULL DEFAULT 0 COMMENT '结算开始时间' AFTER `old_promote_account`; -ALTER TABLE `tab_withdraw` -ADD COLUMN `op_id` int(11) NOT NULL DEFAULT 0 COMMENT '操作id'; -ALTER TABLE `tab_withdraw` -ADD COLUMN `op_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '操作人:1-推广员 2-管理员 3-自动'; -ALTER TABLE `tab_withdraw` -ADD COLUMN `last_op_id` int(11) NOT NULL DEFAULT 0 COMMENT '最后操作人id', -ADD COLUMN `last_op_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '最后操作人:1-推广员 2-管理员 3-自动'; - --- 2019-12-31 --- 推广员结算类型 cxj -ALTER TABLE `tab_promote` -ADD COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 1 COMMENT '结算类型:1-周结 2-月结'; - -======= ->>>>>>> release ALTER TABLE tab_promote add `company_belong` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会归属:0-内团;1-外团'; ALTER TABLE tab_promote add `company_relation` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工会关系:0-自主开发及维护;1-只维护'; -- 游戏的合作方新增联系人,联系电话,邮寄地址,公司税号,收款方名称,银行账号,开户行 liuweiwen 2020-01-03 From 076daf0d4e0e3b381fcd74534d519098d6ad80c2 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 13 Jan 2020 18:02:29 +0800 Subject: [PATCH 9/9] =?UTF-8?q?query=E5=86=B2=E7=AA=81=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/QueryController.class.php | 49 +------------------ 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php index 678a0b0ba..91ba3c37a 100644 --- a/Application/Admin/Controller/QueryController.class.php +++ b/Application/Admin/Controller/QueryController.class.php @@ -1552,55 +1552,7 @@ class QueryController extends ThinkController $this->display(); } - public function getPromoteSettlementType() - { - $promoteId = intval(I('post.promote_id', 0)); - $settlementType = []; - if ($promoteId > 0) { - $promote = D('promote')->field('level, settlement_type')->where(array('id' => $promoteId))->find(); - if (empty($promote) || $promote['level'] != 1 || empty($promote['settlement_type'])) { - $settlementType = []; - } else { - $settlementType = WithdrawModel::$settlementTypeList; - unset($settlementType[WithdrawModel::SETTLEMENT_TYPE_OTHER]); - if ($promote['settlement_type'] == 1) { - unset($settlementType[WithdrawModel::SETTLEMENT_TYPE_MONTH]); - } else { - unset($settlementType[WithdrawModel::SETTLEMENT_TYPE_WEEK]); - unset($settlementType[WithdrawModel::SETTLEMENT_TYPE_RECOUP]); - } - } - } - $this->ajaxReturn(['settlement_type' => $settlementType]); - } - - public function getAmountBySettlementType() - { - $withdrawModel = new WithdrawModel(); - $promoteId = intval(I('promote_id', 0)); - $settlementType = intval(I('settlement_type', 0)); - $time = I('time', ''); - - if (empty($promoteId) || !in_array($settlementType, [2, 3])) { - $this->ajaxReturn(['balance' => 0]); - } - - $promote = M('promote', 'tab_')->find($promoteId); - if (empty($promote) || $promote['level'] != 1 || $promote['ver_status'] != 1 || empty($time)) { - $this->ajaxReturn(['balance' => 0]); - } - - $data['begin_time'] = strtotime($time); - $data['end_time'] = strtotime('+1 month', $data['begin_time']) - 1; - - if ($settlementType == 2) { - $balance = $withdrawModel->getMonthAmount($promote, $data); - } else { - $balance = $withdrawModel->getRecoupAmount($promote, $data); - } - $this->ajaxReturn(['balance' => $balance]); - } public function getChannelStream() { $map = []; @@ -1707,4 +1659,5 @@ class QueryController extends ThinkController } $this->ajaxReturn(['balance' => $balance]); } + }