From 1da5da1ea51edf5088526f2fe54fa92d6a3c576c Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 22 Jun 2020 17:34:53 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=B0=B8=E6=98=9F-=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=8F=90=E7=8E=B0=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/WithdrawController.class.php | 7 ++++++- Application/Home/View/default/Withdraw/index.html | 12 ++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Application/Home/Controller/WithdrawController.class.php b/Application/Home/Controller/WithdrawController.class.php index 1c78b1a17..d554827b3 100644 --- a/Application/Home/Controller/WithdrawController.class.php +++ b/Application/Home/Controller/WithdrawController.class.php @@ -145,7 +145,12 @@ class WithdrawController extends BaseController } $this->poolCount($dbres['pool_id']); M("company_statement_info","tab_")->save($savedata); - $this->ajaxReturn(["msg"=>"打款成功","data"=>$dbres,"status"=>1]); + + if ($savedata["pay_status"] == -1) { + $this->ajaxReturn(["msg"=>"提现失败","data"=>$dbres,"status"=>0]); + } + + $this->ajaxReturn(["msg"=>"提现成功","data"=>$dbres,"status"=>1]); } /** diff --git a/Application/Home/View/default/Withdraw/index.html b/Application/Home/View/default/Withdraw/index.html index a00a87bde..b7728142f 100644 --- a/Application/Home/View/default/Withdraw/index.html +++ b/Application/Home/View/default/Withdraw/index.html @@ -326,14 +326,10 @@ dataType: "json", data: { id:id }, success: function (result) { - if (result.status == 0) { - layer.msg(result.msg); - } else { - layer.msg('提现成功~'); - setTimeout(function () { - location.reload(); - }, 1000); - } + layer.msg(result.msg); + setTimeout(function () { + location.reload(); + }, 1000); }, error: function () { From 42dc519712b61892b20122604d4b708f06916ad4 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 22 Jun 2020 17:38:20 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B0=B8=E6=98=9F-=E6=89=93=E6=AC=BE?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/WithdrawController.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Application/Home/Controller/WithdrawController.class.php b/Application/Home/Controller/WithdrawController.class.php index d554827b3..d31682cc3 100644 --- a/Application/Home/Controller/WithdrawController.class.php +++ b/Application/Home/Controller/WithdrawController.class.php @@ -158,13 +158,13 @@ class WithdrawController extends BaseController * 整合数据,全部成功则支付成功,否则为支付中 */ public function poolCount($poolid){ - $f = M("company_statement_info","tab_")->where("pool_id = {$poolid} AND pay_status <> 1")->find(); - if(empty($f)){ - //全部完成 - $this->setOneVerifyStatus(4,"payment",$poolid); - }else{ + $f = M("company_statement_info","tab_")->field("id")->where("pool_id = {$poolid} AND pay_status <> 1")->find(); + if(isset($f['id'])){ //打款中 $this->setOneVerifyStatus(3,"payment",$poolid); + }else{ + //全部完成 + $this->setOneVerifyStatus(4,"payment",$poolid); } } protected function setOneVerifyStatus($change_status,$op_pre,$id) From a629654ccb23c001719a320d53b44355927c927f Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 22 Jun 2020 18:01:09 +0800 Subject: [PATCH 3/4] =?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 --- .../Controller/WithdrawController.class.php | 7 +++++-- .../Home/View/default/Withdraw/index.html | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/WithdrawController.class.php b/Application/Home/Controller/WithdrawController.class.php index d31682cc3..30a300ca2 100644 --- a/Application/Home/Controller/WithdrawController.class.php +++ b/Application/Home/Controller/WithdrawController.class.php @@ -37,6 +37,7 @@ class WithdrawController extends BaseController $map["promote.id"] = get_pid(); $map['tab_company_statement_info.company_type'] = ['in',"1,2"]; + $map['tab_company_statement_info.verify_status'] = 1; if ($_REQUEST['pay_status'] || $_REQUEST['pay_status'] == '0') { $map['pay_status'] = $_REQUEST['pay_status']; @@ -140,11 +141,12 @@ class WithdrawController extends BaseController $savedata["pay_time"]=time(); } else { - $this->poolCount($dbres['pool_id']); + // $this->poolCount($dbres['pool_id']); $this->ajaxReturn(["msg"=>"已经打款过","data"=>$dbres,"status"=>0]); } - $this->poolCount($dbres['pool_id']); + M("company_statement_info","tab_")->save($savedata); + // $this->poolCount($dbres['pool_id']); if ($savedata["pay_status"] == -1) { $this->ajaxReturn(["msg"=>"提现失败","data"=>$dbres,"status"=>0]); @@ -159,6 +161,7 @@ class WithdrawController extends BaseController */ public function poolCount($poolid){ $f = M("company_statement_info","tab_")->field("id")->where("pool_id = {$poolid} AND pay_status <> 1")->find(); + if(isset($f['id'])){ //打款中 $this->setOneVerifyStatus(3,"payment",$poolid); diff --git a/Application/Home/View/default/Withdraw/index.html b/Application/Home/View/default/Withdraw/index.html index b7728142f..ca094517c 100644 --- a/Application/Home/View/default/Withdraw/index.html +++ b/Application/Home/View/default/Withdraw/index.html @@ -327,6 +327,7 @@ data: { id:id }, success: function (result) { layer.msg(result.msg); + poolCount(result.data.pool_id); setTimeout(function () { location.reload(); }, 1000); @@ -339,6 +340,22 @@ }); + function poolCount(pool_id) { + + $.ajax({ + async: false, + url: "{:U('poolCount')}", + type: "POST", + dataType: "json", + data: { poolid:pool_id }, + success: function (result) { + }, + error: function () { + } + }); + + } + $('.i_cancel').click(function () { location.reload(); }); From 2229e16a9df1b9ee5f3c8292fa8620984aef1e74 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 22 Jun 2020 18:03:30 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B0=B8=E6=98=9F-=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/View/default/Withdraw/index.html | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Application/Home/View/default/Withdraw/index.html b/Application/Home/View/default/Withdraw/index.html index ca094517c..27ce2abd7 100644 --- a/Application/Home/View/default/Withdraw/index.html +++ b/Application/Home/View/default/Withdraw/index.html @@ -326,11 +326,13 @@ dataType: "json", data: { id:id }, success: function (result) { - layer.msg(result.msg); - poolCount(result.data.pool_id); - setTimeout(function () { - location.reload(); - }, 1000); + poolCount(result.data.pool_id,function(){ + layer.msg(result.msg); + setTimeout(function () { + location.reload(); + }, 1000); + }); + }, error: function () { @@ -340,7 +342,7 @@ }); - function poolCount(pool_id) { + function poolCount(pool_id,callback) { $.ajax({ async: false, @@ -349,6 +351,7 @@ dataType: "json", data: { poolid:pool_id }, success: function (result) { + callback(); }, error: function () { }