From 6d4fce53ebfb265b9f3d6661533cb7ba56668986 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 23 Nov 2020 14:34:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BA=BF=E4=B8=8B=E6=89=93?= =?UTF-8?q?=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ompanyStatementOfflineController.class.php | 5 +-- .../View/CompanyStatementOffline/lists.html | 34 +++++++++++++------ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementOfflineController.class.php b/Application/Admin/Controller/CompanyStatementOfflineController.class.php index bd559b24c..04cbf863e 100644 --- a/Application/Admin/Controller/CompanyStatementOfflineController.class.php +++ b/Application/Admin/Controller/CompanyStatementOfflineController.class.php @@ -109,8 +109,9 @@ class CompanyStatementOfflineController extends ThinkController } public function doPayment() { - if(!isset($_REQUEST['ids'])) $this->error("参数错误"); + if(!isset($_REQUEST['ids']) || !isset($_REQUEST['payment_time'])) $this->error("参数错误"); $ids = $_REQUEST['ids']; + $payment_time = $_REQUEST['payment_time']; //获取所有的母单id $companyStatementInfo = M("company_statement_info","tab_"); $statementPool = $companyStatementInfo->where("id in ($ids) and pay_status <> 1")->field("pool_id,count(id) count")->group("pool_id")->select(); @@ -128,7 +129,7 @@ class CompanyStatementOfflineController extends ThinkController $saveData = [ "pay_type"=>3, "pay_status"=>1, - "pay_info"=>json_encode(["payment_user"=>$_SESSION['onethink_admin']['user_auth']["username"],"payment_time"=>date("Y-m-d H:i:s")]) + "pay_info"=>json_encode(["payment_user"=>$_SESSION['onethink_admin']['user_auth']["username"],"payment_time"=>$payment_time]) ]; $ires = $companyStatementInfo->where("id in ($ids)")->save($saveData); diff --git a/Application/Admin/View/CompanyStatementOffline/lists.html b/Application/Admin/View/CompanyStatementOffline/lists.html index 935c60ec7..5e167bb4c 100644 --- a/Application/Admin/View/CompanyStatementOffline/lists.html +++ b/Application/Admin/View/CompanyStatementOffline/lists.html @@ -291,17 +291,31 @@ } text = text.join(","); + var date = false; - if(confirm){ - layer.confirm('【警告】确认打款后将不可回退,如需继续请点击确认', { - btn: ['确认','取消'], - title:false - }, function(){ + layer.open({ + title : '打款时间确认', + content : ``, + success : function() { + $('#deposit_recept_time').datetimepicker({ + format: 'yyyy-mm-dd', + language: "zh-CN", + minView: 2, + autoclose: true + }); + $("#deposit_recept_time").datetimepicker("setDate", new Date()); + }, + yes : function(index, layero) { + date = $('#deposit_recept_time').val(); + if (!date) { + layer.msg('请选择打款时间'); + return true; + } _doAgreeApply(); - }); - }else{ - _doAgreeApply(); - } + + return true; + } + }); function _doAgreeApply(){ //执行 @@ -310,7 +324,7 @@ url: "{:U('doPayment')}", dataType: 'json', async: false, - data: {ids:text}, + data: {ids:text,payment_time:date}, success:function(data){ if(data.status==1){ layer.msg("" + data.info + "");