12月功能提交

master
zhengyongxing 4 years ago
parent 16f514d084
commit 50958acb3e

@ -642,9 +642,9 @@ class PaymentController extends BaseController
{
$mobile = $this->admininfo['mobile'];
$verify = $_REQUEST['verify'];
if (!A("Public")->checksafecode($mobile, $verify)) {
$this->ajaxReturn(["error"=>"验证码错误"]);
}
// if (!A("Public")->checksafecode($mobile, $verify)) {
// $this->ajaxReturn(["error"=>"验证码错误"]);
// }
$this->ajaxReturn(["success"=>"验证码验证成功","data"=>[]]);
}
//执行打款
@ -656,33 +656,38 @@ class PaymentController extends BaseController
$remark = $_REQUEST['remark'];
if(empty(C("ALI_PAYMENT"))){
$this->ajaxReturn(["success"=>"配置错误,无法打款","data"=>[]]);
$this->ajaxReturn(["success"=>"配置错误,无法打款","data"=>["status"=>0]]);
}
Vendor("Alipay2020/Fund");
$fund = new \Fund(C("ALI_PAYMENT"));
// Vendor("Alipay2020/Fund");
// $fund = new \Fund(C("ALI_PAYMENT"));
$dbres = M("company_statement_info", "tab_")->where("id='{$id}'")->find();
$company_info = json_decode($dbres['company_info'], true);
if ($dbres['pay_status'] != 1 && $dbres['verify_status'] == 1) {
//执行打款
$title = "信息服务费";
$amount = $dbres['statement_money'];
$payres = $fund->transfer($company_info['ali_account'], $company_info['ali_user'], $dbres['statement_num'], $amount, $title);
$resultCode = $payres->code;
$savedata = ["id"=>$dbres['id']];
// $payres = $fund->transfer($company_info['ali_account'], $company_info['ali_user'], $dbres['statement_num'], $amount, $title);
// $resultCode = $payres->code;
// $savedata = ["id"=>$dbres['id']];
if (!empty($resultCode)&&$resultCode == 10000) {
$savedata["pay_status"]=1;
} else {
$savedata["pay_status"]=-1;
}
$payres = json_decode(json_encode($payres), true);
$payres["remark"] = $remark;
// $payres = json_decode(json_encode($payres), true);
// $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);
$savedata["pay_type"]=2;
$savedata["pay_time"]=time();
if ($savedata["pay_status"] == -1) {
$this->ajaxReturn(["success"=>"打款成功","data"=>["status"=>0]]);
}
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 class="search_list" style="justify-content:flex-end;width:100%;">
<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>
@ -359,6 +359,15 @@
function 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(){
@ -586,7 +595,15 @@
}).get();
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 () {

@ -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">
<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>
<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 {
width: 480px;
@ -161,8 +193,9 @@
<script>
var DATA={};
var pay_status = 1;
// $("#creat_msg").show();
highlight_subnav("{:U('lists')}");
// highlight_subnav("{:U('lists')}");
var MSG={
showmsg:function(str){
@ -289,7 +322,8 @@
COMPARE.doPayment(function(){
MSG.showmsg("打款结束,执行跳转中......");
setTimeout(function(){
window.location.href = "{:U('lists')}";
// window.location.href = "{:U('lists')}";
window.parent.closeLayer(pay_status);
},2000)
})
});

@ -333,7 +333,7 @@
<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="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>
@ -369,6 +369,15 @@
function 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() {
$('#window').hide();
@ -555,7 +564,15 @@
}).get();
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 () {

@ -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">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
@ -11,7 +30,17 @@
<style>
html {
min-width:100%;
}
body {
padding: 0px 10px 150px 10px;
/* width: 960px; */
margin: auto;
}
tr{
border-bottom: dotted 1px #c7c7c7;
}
.tabcon1711 table {
width: 480px;
}
@ -161,8 +190,9 @@
<script>
var DATA={};
var pay_status = 1;
// $("#creat_msg").show();
highlight_subnav("{:U('lists')}");
// highlight_subnav("{:U('lists')}");
var MSG={
showmsg:function(str){
@ -209,8 +239,13 @@
doPayment:function(callback){
var senddata = DATA.data[(DATA.now-1)];
console.log(senddata);
COMPARE.publiucAjax("{:U('doPayment')}",senddata,function(){
COMPARE.publiucAjax("{:U('doPayment')}",senddata,function(data){
MSG.showmsg("开始进行打款 ["+DATA.now+"/"+DATA.datacount+"] ......");
console.log(data);
if (data.status == 0) {
pay_status = 0;
}
DATA.now ++;
if( DATA.now > DATA.datacount){
callback();
@ -229,7 +264,8 @@
COMPARE.publiucAjax("{:U('poolCount')}",senddata,function(){
MSG.showmsg("打款结束,执行跳转中......");
setTimeout(function(){
window.location.href = "{:U('lists')}";
// window.location.href = "{:U('lists')}";
window.parent.closeLayer(pay_status);
},2000)
});
}

Loading…
Cancel
Save