From 35f2fe3f05d47d3eb54469657682c24d85663c5e Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 14 Jul 2020 16:08:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=AC=E5=8F=B8=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/function.php | 2 +- .../Controller/PartnerController.class.php | 14 ++++++---- Application/Admin/View/Partner/show.html | 26 +++++++++---------- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index 5604fc731..5e7fcaef4 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -873,7 +873,7 @@ function checkPhone($phone) { * @return false|int */ function checkNumber($num) { - return preg_match("/^([1-9][0-9]*)+(.[0-9]{1,3})?$/",$num); + return preg_match("/^([0-9]*)+(.[0-9]{1,3})?$/",$num); } //获取sdk类型名称 diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index 33156d45c..81a786b1a 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -218,7 +218,7 @@ class PartnerController extends ThinkController $map = ["_string"=>"1=1"]; $model = M("partner_verify", 'tab_'); - $data = $model->where($map)->page($page,$row)->select(); + $data = $model->where($map)->page($page,$row)->order("FIELD(verify_log,0,1,-1),create_time desc")->select(); foreach ($data as $k => &$v) { $v['partner_info'] = json_decode($v['partner_info'],true); if($v['partner_id'] == 0){ @@ -523,7 +523,7 @@ class PartnerController extends ThinkController if(!empty(I('reg_phone')) && !checkPhone(I('reg_phone'))) { $this->error('注册电话格式不正确'); } - if(!empty(I('taxation_rate'))) { + if(!empty(I('taxation_rate')) && I('taxation_rate') > 0) { if(!checkNumber(I('taxation_rate'))){ $this->error('税费费率格式错误'); }else{ @@ -532,7 +532,7 @@ class PartnerController extends ThinkController }else{ $save['taxation_rate']=0; } - if(!empty(I('channel_rate'))) { + if(!empty(I('channel_rate')) && I('channel_rate') > 0) { if(!checkNumber(I('channel_rate'))){ $this->error('渠道费率格式不对'); }else{ @@ -541,7 +541,7 @@ class PartnerController extends ThinkController }else{ $save['channel_rate']=0; } - if(!empty(I('invoice_rate'))) { + if(!empty(I('invoice_rate')) && I('invoice_rate') > 0) { if(!checkNumber(I('invoice_rate'))){ $this->error('开票税点格式不对'); }else{ @@ -553,7 +553,11 @@ class PartnerController extends ThinkController if(!empty(I('server_fee')) && !checkNumber(I('server_fee')) && I("has_server_fee") == 1) { $this->error('服务器费用格式不对'); }else{ - $save['server_fee']=0; + if(empty(I('server_fee'))){ + $save['server_fee']=0; + }else{ + $save['server_fee']=I('server_fee'); + } } $time = time(); $save['contract_start_time'] = strtotime($save['contract_start_time']); diff --git a/Application/Admin/View/Partner/show.html b/Application/Admin/View/Partner/show.html index f8cc6004f..290b4d20f 100644 --- a/Application/Admin/View/Partner/show.html +++ b/Application/Admin/View/Partner/show.html @@ -69,7 +69,7 @@ 开票税点: - % + % @@ -199,14 +199,14 @@ - *是否有预付款: + 是否有预付款: @@ -214,15 +214,15 @@ - *承担服务费: + 承担服务费: display: none;">  元 @@ -230,14 +230,14 @@ - *合作关系: + 合作关系: @@ -245,14 +245,14 @@ - *显示状态: + 显示状态: