优化打款

master
chenzhi 4 years ago
parent 42dc519712
commit a629654ccb

@ -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);

@ -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();
});

Loading…
Cancel
Save