提交 a250b350 authored 作者: chengye's avatar chengye

tet

上级 abef0155
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
*/ */
namespace app\api\controller\v2\common; namespace app\api\controller\v2\common;
use app\em\controller\Invoice;
use app\em\controller\WriteOff; use app\em\controller\WriteOff;
use app\em\model\EmAccount; use app\em\model\EmAccount;
use app\em\model\EmPayment; use app\em\model\EmPayment;
...@@ -26,8 +25,13 @@ class Payment ...@@ -26,8 +25,13 @@ class Payment
'message' => $res, 'message' => $res,
'data' => '' 'data' => ''
]); ]);
if ($data['action'] == 1) return $this->update($data['numb'],$data['status'],$data['mes']); if ($data['action'] == 1) {
else return $this->dropNumb($data['numb']); Log::record(date('Y-m-d H:i:s').' OA单号:'.$data['numb'].' 接口操作:单据状态更新');
return $this->update($data['numb'],$data['status'],$data['mes']);
} else {
Log::record(date('Y-m-d H:i:s').' OA单号:'.$data['numb'].' 接口操作:单据状态作废');
return $this->dropNumb($data['numb']);
}
} }
//更新payment状态 //更新payment状态
...@@ -46,7 +50,6 @@ class Payment ...@@ -46,7 +50,6 @@ class Payment
$res = (new WriteOff())->writeOffFromPayment($payment->account_id, $payment->payment_id); $res = (new WriteOff())->writeOffFromPayment($payment->account_id, $payment->payment_id);
return json([ return json([
'code' => 200, 'code' => 200,
'message' => $mes ?: '已成功付款', 'message' => $mes ?: '已成功付款',
......
...@@ -13,8 +13,12 @@ class EmPayment extends Base ...@@ -13,8 +13,12 @@ class EmPayment extends Base
return date('Y-m-d H:i:s',$val); return date('Y-m-d H:i:s',$val);
} }
public function setPayDateAttr($val){ public function setPayDateAttr($val){
if(is_int($val) && strlen($val) >= 10) return $val;
if(date('Y-m-d H:i:s',strtotime($val)) == $val){
return strtotime($val); return strtotime($val);
} }
return 0;
}
//缴费单+search //缴费单+search
public function getPaymentList($map,$Nowpage,$limits){ public function getPaymentList($map,$Nowpage,$limits){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论