diff --git a/Application/Payment/Controller/ExcelPaymentController.class.php b/Application/Payment/Controller/ExcelPaymentController.class.php index a49897f34..ed5e1f085 100644 --- a/Application/Payment/Controller/ExcelPaymentController.class.php +++ b/Application/Payment/Controller/ExcelPaymentController.class.php @@ -162,11 +162,19 @@ class ExcelPaymentController extends BaseController $company_info = $v['company_info']; // $v['statement_begin_time'] = $statement_begin_time; // $v['statement_end_time'] = $statement_end_time; + + $statement_time = explode('-',$v['statement_info'][0]['game_list'][0]['statement_time']); + $v['batch_num'] = $batch; $v['statement_info'] = json_encode($v['statement_info'],JSON_UNESCAPED_UNICODE); $v['company_info'] = json_encode($v['company_info'],JSON_UNESCAPED_UNICODE); $v['company_type'] = 2; $v['create_time'] = time(); + + + $v['statement_begin_time'] = strtotime(str_replace('.','-',$statement_time[0])); + $v['statement_end_time'] = strtotime(str_replace('.','-',$statement_time[1])); + $v['statement_num'] = "JS_".date('Ymd').date('His').$v['company_id'].sp_random_string(5); $dm = [ "mobile"=>$this->admininfo['mobile'], @@ -464,4 +472,63 @@ class ExcelPaymentController extends BaseController } + /** + * 验证订单 + */ + public function checkOrder() { + + if(!$_REQUEST['ids']) { + $this->ajaxReturn(['data'=>[]]); + } + + $ids = $_REQUEST['ids']; + + $data = M("excel_statement_info","tab_") + ->field("id,statement_money,company_name,statement_begin_time,statement_end_time,pay_time") + ->where(['id'=>['in',$ids]]) + ->select(); + + + $return = []; + + foreach ($data as $key => $value) { + + $check_data = M("excel_statement_info","tab_") + ->where([ + 'statement_money'=>$value['statement_money'], + 'company_name'=>$value['company_name'], + 'statement_begin_time'=>$value['statement_begin_time'], + 'statement_end_time'=>$value['statement_end_time'], +// 'id'=>['neq',$value['id']], + 'pay_status'=>1 + ]) + ->select(); + + $check_company_statement_info = M("company_statement_info","tab_") + ->where([ + 'pay_status'=>1, + 'company_name'=>$value['company_name'], + 'statement_begin_time'=>$value['statement_begin_time'], + 'statement_end_time'=>$value['statement_end_time'], + 'statement_money'=>$value['statement_money'], + ]) + ->select(); + + + + $return = array_merge($return,$check_data,$check_company_statement_info); + + } + + foreach ($return as $key => $value) { + + $return[$key]['time'] = ($value['statement_begin_time']?date("Y-m-d",$value['statement_begin_time']):'无').'-'.($value['statement_end_time']?date("Y-m-d",$value['statement_end_time']):'无'); + $return[$key]['pay_time'] = date("Y-m-d H:m:s",$value['pay_time']); + + } + + $this->ajaxReturn(['data'=>$return]); + + } + } diff --git a/Application/Payment/Controller/PaymentController.class.php b/Application/Payment/Controller/PaymentController.class.php index 57de57726..6d27b89b1 100644 --- a/Application/Payment/Controller/PaymentController.class.php +++ b/Application/Payment/Controller/PaymentController.class.php @@ -65,6 +65,14 @@ class PaymentController extends BaseController $map['i.pay_time'] = ['ELT', strtotime($_REQUEST['pay_time_end']) + 86399]; } + if (isset($_REQUEST['verifytime_start']) && isset($_REQUEST['verifytime_end'])) { + $map['i.verify_time'] = ['between', [strtotime($_REQUEST['verifytime_start']), strtotime($_REQUEST['verifytime_end']) + 86399]]; + } elseif (isset($_REQUEST['verifytime_start'])) { + $map['i.verify_time'] = ['EGT', strtotime($_REQUEST['verifytime_start'])]; + } elseif (isset($_REQUEST['verifytime_end'])) { + $map['i.verify_time'] = ['ELT', strtotime($_REQUEST['verifytime_end']) + 86399]; + } + if(isset($_REQUEST['company_type'])){ $map['i.company_type'] = $_REQUEST['company_type']; } @@ -84,7 +92,7 @@ class PaymentController extends BaseController $map['i.pay_type'] = $_REQUEST['pay_type']; } - +// dump($map); $CompanyInfo = M("company_statement_info","tab_") ->alias('i') @@ -493,6 +501,10 @@ class PaymentController extends BaseController $this->error('手机号不能为空'); } + if(strlen($data['mobile']) < 11) { + $this->error('手机号格式错误'); + } + $is_hav = M("payment_member") ->where("id = {$data['id']}") ->find(); diff --git a/Application/Payment/View/ExcelPayment/lists.html b/Application/Payment/View/ExcelPayment/lists.html index bd6b0714f..8223d12da 100644 --- a/Application/Payment/View/ExcelPayment/lists.html +++ b/Application/Payment/View/ExcelPayment/lists.html @@ -97,6 +97,25 @@ content: ''; padding: 0; } + ::-webkit-scrollbar { + width: 3px; + height: 3px; + } + ::-webkit-scrollbar-track { + border-radius: 3px; /*滚动条的背景区域的圆角*/ + } + ::-webkit-scrollbar-thumb { + border-radius: 3px; /*滚动条的圆角*/ + background-color: #ccc; /*滚动条的背景颜色*/ + } + + ::-webkit-scrollbar-thumb:hover { + background-color: #bbb; + } + + ::-webkit-scrollbar-thumb:active { + cursor: pointer; + + + @@ -278,18 +359,12 @@ window.location.reload(); } - var pay_status = "{$_GET['pay_stauts']}"; - - function pay_tip() { - console.log(document.domain); - if (pay_status == '1') { - layer.msg('打款成功'); - } else if(pay_status == '0') { - layer.msg('打款失败'); - } - } - pay_tip(); $(function(){ + + $("#back").click(function() { + $('#window').hide(); + }); + $(".viewPool").click(function () { var id = $(this).data("id"); var url = "{:U('viewPool')}"+"&id="+id @@ -450,8 +525,76 @@ content: url }); - }) + }); + + function checkPaymentOrder() { + + var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { + + var verifystatus = $(elem).data('verifystatus'); + if($(elem).data("pay") == 1 && verifystatus == 1){ + return $(elem).val(); + } + + }).get(); + console.log(text) + // text = "47,99,100"; + $("#tbody").empty(); + $.ajax({ + type:'post', + dataType:'json', + data: {'ids':text}, + url:"{:U('checkOrder')}", + success:function(data) { + if (data.data.length >0) { + var datas = data.data; + var str = ""; + + $('#window').show(); + for (var key in datas) { + + str += "" + datas[key]['company_name'] + "" + + ""+ datas[key]['time'] + "" + + ""+ datas[key]['statement_money'] + "" + + ""+ datas[key]['pay_time'] + ""; + + } + + $("#tbody").append(str); + + return true; + } else { + doPayment(); + return false; + } + }, + error:function() { + alert('服务器开小差了,请稍后再试。'); + } + }) + } + + function doPayment() { + + var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { + var verifystatus = $(elem).data('verifystatus'); + if($(elem).data("pay") == 1 && verifystatus == 1){ + return $(elem).val(); + } + + }).get(); + + text = text.join(","); + window.location.href = "{:U('showPayment')}"+"&ids="+text; + } + + $("#commit").on("click",function () { + doPayment(); + }); + $("#doPayment").on("click",function(){ + + var verifytip = 0; var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { var verifystatus = $(elem).data('verifystatus'); @@ -473,6 +616,10 @@ layer.msg("请先选择需要打款的结算单,仅大于0.1元的打款单才能进行打款"); return; } + + checkPaymentOrder(); + return; + text = text.join(","); window.location.href = "{:U('showPayment')}"+"&ids="+text; }) diff --git a/Application/Payment/View/ExcelPayment/showPayment.html b/Application/Payment/View/ExcelPayment/showPayment.html index b41e768b3..e1028c3b8 100644 --- a/Application/Payment/View/ExcelPayment/showPayment.html +++ b/Application/Payment/View/ExcelPayment/showPayment.html @@ -159,7 +159,7 @@