|
@@ -27,6 +27,7 @@ use Yansongda\Supports\Arr;
|
|
|
* @property bool is_goods_back
|
|
|
* @property bool need_rec
|
|
|
* @property bool need_tk
|
|
|
+ * @property bool need_complete
|
|
|
* @property string audit_remark
|
|
|
* @property string order_no
|
|
|
* @property float amount_last
|
|
@@ -43,6 +44,7 @@ class Refund Extends Model
|
|
|
'need_rec',
|
|
|
'need_tk',
|
|
|
'is_pass',
|
|
|
+ 'need_complete',
|
|
|
];
|
|
|
const REFUND_ING=100;
|
|
|
const REFUND_PASS=200;
|
|
@@ -321,6 +323,12 @@ class Refund Extends Model
|
|
|
}
|
|
|
}*/
|
|
|
}
|
|
|
+ public function makeComplete(){
|
|
|
+ $refund=$this;
|
|
|
+ $refund->over_time=time();
|
|
|
+ $refund->refund_status=Refund::REFUND_OVER;
|
|
|
+ return $refund->save();
|
|
|
+ }
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -415,6 +423,12 @@ class Refund Extends Model
|
|
|
public function getNeedTkAttr($_,$model){
|
|
|
return $this->refund_status==self::REFUND_REFUNDING;
|
|
|
}
|
|
|
+ #是否需要完成
|
|
|
+ public function getNeedCompleteAttr($_,$model){
|
|
|
+ $con1 = $this->refund_type==self::REFUND_TYPE_HHBX;
|
|
|
+ $con2 = $model['refund_status']==self::REFUND_RUNNING;
|
|
|
+ return $con1 && $con2;
|
|
|
+ }
|
|
|
public function getTimelineAttr(){
|
|
|
$arr=[
|
|
|
[
|