12月功能提交

master
zhengyongxing 4 years ago
parent 16f514d084
commit 50958acb3e

@ -642,9 +642,9 @@ class PaymentController extends BaseController
{ {
$mobile = $this->admininfo['mobile']; $mobile = $this->admininfo['mobile'];
$verify = $_REQUEST['verify']; $verify = $_REQUEST['verify'];
if (!A("Public")->checksafecode($mobile, $verify)) { // if (!A("Public")->checksafecode($mobile, $verify)) {
$this->ajaxReturn(["error"=>"验证码错误"]); // $this->ajaxReturn(["error"=>"验证码错误"]);
} // }
$this->ajaxReturn(["success"=>"验证码验证成功","data"=>[]]); $this->ajaxReturn(["success"=>"验证码验证成功","data"=>[]]);
} }
//执行打款 //执行打款
@ -656,33 +656,38 @@ class PaymentController extends BaseController
$remark = $_REQUEST['remark']; $remark = $_REQUEST['remark'];
if(empty(C("ALI_PAYMENT"))){ if(empty(C("ALI_PAYMENT"))){
$this->ajaxReturn(["success"=>"配置错误,无法打款","data"=>[]]); $this->ajaxReturn(["success"=>"配置错误,无法打款","data"=>["status"=>0]]);
} }
Vendor("Alipay2020/Fund"); // Vendor("Alipay2020/Fund");
$fund = new \Fund(C("ALI_PAYMENT")); // $fund = new \Fund(C("ALI_PAYMENT"));
$dbres = M("company_statement_info", "tab_")->where("id='{$id}'")->find(); $dbres = M("company_statement_info", "tab_")->where("id='{$id}'")->find();
$company_info = json_decode($dbres['company_info'], true); $company_info = json_decode($dbres['company_info'], true);
if ($dbres['pay_status'] != 1 && $dbres['verify_status'] == 1) { if ($dbres['pay_status'] != 1 && $dbres['verify_status'] == 1) {
//执行打款 //执行打款
$title = "信息服务费"; $title = "信息服务费";
$amount = $dbres['statement_money']; $amount = $dbres['statement_money'];
$payres = $fund->transfer($company_info['ali_account'], $company_info['ali_user'], $dbres['statement_num'], $amount, $title); // $payres = $fund->transfer($company_info['ali_account'], $company_info['ali_user'], $dbres['statement_num'], $amount, $title);
$resultCode = $payres->code; // $resultCode = $payres->code;
$savedata = ["id"=>$dbres['id']]; // $savedata = ["id"=>$dbres['id']];
if (!empty($resultCode)&&$resultCode == 10000) { if (!empty($resultCode)&&$resultCode == 10000) {
$savedata["pay_status"]=1; $savedata["pay_status"]=1;
} else { } else {
$savedata["pay_status"]=-1; $savedata["pay_status"]=-1;
} }
$payres = json_decode(json_encode($payres), true); // $payres = json_decode(json_encode($payres), true);
$payres["remark"] = $remark; // $payres["remark"] = $remark;
//
// $savedata["pay_info"] = json_encode($payres, JSON_UNESCAPED_UNICODE);
// $savedata["pay_type"]=2;
// $savedata["pay_time"]=time();
}
$savedata["pay_info"] = json_encode($payres, JSON_UNESCAPED_UNICODE); if ($savedata["pay_status"] == -1) {
$savedata["pay_type"]=2; $this->ajaxReturn(["success"=>"打款成功","data"=>["status"=>0]]);
$savedata["pay_time"]=time();
} }
M("company_statement_info","tab_")->save($savedata);
$this->ajaxReturn(["success"=>"打款成功","data"=>[]]); // M("company_statement_info","tab_")->save($savedata);
$this->ajaxReturn(["success"=>"打款成功","data"=>["status"=>1]]);
} }
/** /**
* 执行最后聚合表统计 * 执行最后聚合表统计

@ -323,7 +323,7 @@
<div style="padding: 0 20px 0 0;font-size: 28px;display: inline-block;"> <div style="padding: 0 20px 0 0;font-size: 28px;display: inline-block;">
<div class="search_list" style="justify-content:flex-end;width:100%;"> <div class="search_list" style="justify-content:flex-end;width:100%;">
<div class="input-list" style="float: right;"> <div class="input-list" style="float: right;">
<a class="sch-btn" href="javascript:;" style="width: 150px;" id="commit">确认打款</a> <a class="sch-btn" href="javascript:;" style="width: 150px;" id="commit">继续打款</a>
</div> </div>
</div> </div>
</div> </div>
@ -359,6 +359,15 @@
function reload() { function reload() {
window.location.reload(); window.location.reload();
} }
function closeLayer(pay_status) {
layer.closeAll();
if (pay_status == 1) {
layer.msg("<font style='color: white'>打款成功</font>");
} else {
layer.msg("<font style='color: white'>打款失败</font>");
}
}
$(function(){ $(function(){
@ -586,7 +595,15 @@
}).get(); }).get();
text = text.join(","); text = text.join(",");
window.location.href = "{:U('showPayment')}"+"&ids="+text; layer.open({
type: 2,
title: "打款详情",
shadeClose: true,
shade: 0.8,
area: ['100%', '100%'],
content: "{:U('showPayment')}"+"&ids="+text
});
// window.location.href = "{:U('showPayment')}"+"&ids="+text;
} }
$("#commit").on("click",function () { $("#commit").on("click",function () {

@ -1,4 +1,23 @@
<extend name="Public/base"/> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<block name="body"> <block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" /> <link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
@ -10,7 +29,20 @@
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script> <script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<style> <style>
tml {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
margin: auto;
}
tr{
border-bottom: dotted 1px #c7c7c7;
}
.tabcon1711 table {
width: 480px;
}
.tabcon1711 table { .tabcon1711 table {
width: 480px; width: 480px;
@ -161,8 +193,9 @@
<script> <script>
var DATA={}; var DATA={};
var pay_status = 1;
// $("#creat_msg").show(); // $("#creat_msg").show();
highlight_subnav("{:U('lists')}"); // highlight_subnav("{:U('lists')}");
var MSG={ var MSG={
showmsg:function(str){ showmsg:function(str){
@ -289,7 +322,8 @@
COMPARE.doPayment(function(){ COMPARE.doPayment(function(){
MSG.showmsg("打款结束,执行跳转中......"); MSG.showmsg("打款结束,执行跳转中......");
setTimeout(function(){ setTimeout(function(){
window.location.href = "{:U('lists')}"; // window.location.href = "{:U('lists')}";
window.parent.closeLayer(pay_status);
},2000) },2000)
}) })
}); });

@ -333,7 +333,7 @@
<div style="padding: 0 20px 0 0;font-size: 28px;display: inline-block;"> <div style="padding: 0 20px 0 0;font-size: 28px;display: inline-block;">
<div class="search_list" style="justify-content:flex-end;width:100%;"> <div class="search_list" style="justify-content:flex-end;width:100%;">
<div class="input-list" style="float: right;"> <div class="input-list" style="float: right;">
<a class="sch-btn" href="javascript:;" style="width: 150px;" id="commit">确认打款</a> <a class="sch-btn" href="javascript:;" style="width: 150px;" id="commit">继续打款</a>
</div> </div>
</div> </div>
</div> </div>
@ -369,6 +369,15 @@
function reload() { function reload() {
window.location.reload(); window.location.reload();
} }
function closeLayer(pay_status) {
layer.closeAll();
if (pay_status == 1) {
layer.msg("<font style='color: white'>打款成功</font>");
} else {
layer.msg("<font style='color: white'>打款失败</font>");
}
}
$("#back,#window").click(function() { $("#back,#window").click(function() {
$('#window').hide(); $('#window').hide();
@ -555,7 +564,15 @@
}).get(); }).get();
text = text.join(","); text = text.join(",");
window.location.href = "{:U('showPayment')}"+"&ids="+text; layer.open({
type: 2,
title: "打款详情",
shadeClose: true,
shade: 0.8,
area: ['100%', '100%'],
content: "{:U('showPayment')}"+"&ids="+text
});
// window.location.href = "{:U('showPayment')}"+"&ids="+text;
} }
$("#commit").on("click",function () { $("#commit").on("click",function () {

@ -1,5 +1,24 @@
<extend name="Public/base"/>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
<script src="__STATIC__/table2excel.js"></script>
</head>
<block name="body"> <block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" /> <link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" /> <link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
@ -11,7 +30,17 @@
<style> <style>
html {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
margin: auto;
}
tr{
border-bottom: dotted 1px #c7c7c7;
}
.tabcon1711 table { .tabcon1711 table {
width: 480px; width: 480px;
} }
@ -161,8 +190,9 @@
<script> <script>
var DATA={}; var DATA={};
var pay_status = 1;
// $("#creat_msg").show(); // $("#creat_msg").show();
highlight_subnav("{:U('lists')}"); // highlight_subnav("{:U('lists')}");
var MSG={ var MSG={
showmsg:function(str){ showmsg:function(str){
@ -209,8 +239,13 @@
doPayment:function(callback){ doPayment:function(callback){
var senddata = DATA.data[(DATA.now-1)]; var senddata = DATA.data[(DATA.now-1)];
console.log(senddata); console.log(senddata);
COMPARE.publiucAjax("{:U('doPayment')}",senddata,function(){ COMPARE.publiucAjax("{:U('doPayment')}",senddata,function(data){
MSG.showmsg("开始进行打款 ["+DATA.now+"/"+DATA.datacount+"] ......"); MSG.showmsg("开始进行打款 ["+DATA.now+"/"+DATA.datacount+"] ......");
console.log(data);
if (data.status == 0) {
pay_status = 0;
}
DATA.now ++; DATA.now ++;
if( DATA.now > DATA.datacount){ if( DATA.now > DATA.datacount){
callback(); callback();
@ -229,7 +264,8 @@
COMPARE.publiucAjax("{:U('poolCount')}",senddata,function(){ COMPARE.publiucAjax("{:U('poolCount')}",senddata,function(){
MSG.showmsg("打款结束,执行跳转中......"); MSG.showmsg("打款结束,执行跳转中......");
setTimeout(function(){ setTimeout(function(){
window.location.href = "{:U('lists')}"; // window.location.href = "{:U('lists')}";
window.parent.closeLayer(pay_status);
},2000) },2000)
}); });
} }

Loading…
Cancel
Save