@@ -92,7 +92,22 @@ class CompanyTakeCash extends Backend
'updatetime' => time(),
];
+ Db::startTrans();
$rs = Db::name('company_take_cash')->where('id',$id)->update($data);
+ if($rs === false){
+ Db::rollback();
+ $this->error('审核失败');
+ }
+ if($status == 2){
+ //归还钱
+ $wallet_rs = model('walletcompany')->lockChangeAccountRemain($info['user_id'],'money',$info['money'],206,'提现退还:'.$info['money'],'company_take_cash',$info['id']);
+ if($wallet_rs['status'] === false){
+ $this->error($wallet_rs['msg']);
+
+ Db::commit();
$this->success('审核完成');
}
@@ -13,7 +13,7 @@ class ExceptionHandle extends Handle
public function render(Exception $e)
{
- return parent::render($e);
+ //return parent::render($e);
$statuscode = $code = 500;
$msg = $e->getMessage();
// 验证异常
@@ -15,6 +15,7 @@ return [
203 => '售出套餐', //增加,仅限微信支付的套餐订单
204 => '用户充值', //增加,跟着104一起加
205 => '提现', //减少
+ 206 => '提现拒绝退回', //增加
],
'moneyname' => [
'money' => '储值卡',
@@ -54,6 +54,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
extend: 'data-area=["80%","80%"]',
url:'company_take_cash/audit/id/{ids}?dialog=1',
target:'_self',
+ hidden:function(row){
+ return row.status==0 ? false : true;
},
events: Table.api.events.operate, formatter: Table.api.formatter.operate}