From df878183ee868cd9a42a6b1cdb013371076d3c59 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 9 Jul 2020 10:20:57 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=93=E6=AC=BE?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/update.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Data/update.sql b/Data/update.sql index b635d2f92..85d53e9c7 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -2147,3 +2147,18 @@ CREATE TABLE `tab_market_altogether` ( ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; INSERT INTO `tab_tool`(`id`, `name`, `title`, `config`, `type`, `status`) VALUES (59, 'tax_radio', '公司税费', '{"tax_radio":1.5,"time":1589361782}', 1, 1) + + + + +--20200709 chenzhi +CREATE TABLE `tab_payment_member` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID', + `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`), + KEY `mobile` (`mobile`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='打款登陆账号'; + + From e9c3355c90c33714cdb61c8d9bebe2ae43092348 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 9 Jul 2020 11:44:50 +0800 Subject: [PATCH 2/9] =?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 3/9] =?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 @@ {$data.company_name} {$data.company_type} - {$data.valid} + {$data.create_time} {$data.batch_num} @@ -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 @@ {$vo.batch_num} {$vo.statement_money} {$vo.remark} - + 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; + }