|
@@ -19,8 +19,11 @@ use Yansongda\Supports\Arr;
|
|
|
* @property int audit_time
|
|
|
* @property int over_time
|
|
|
* @property int rm_time
|
|
|
+ * @property int user_trans_com_id
|
|
|
+ * @property string user_trans_no
|
|
|
* @property bool is_wait_audit
|
|
|
* @property bool has_money
|
|
|
+ * @property bool is_goods_back
|
|
|
* @property string audit_remark
|
|
|
* @property float amount_last
|
|
|
* @method static static|Query FilterRefund($status=null)
|
|
@@ -31,6 +34,7 @@ class Refund Extends Model
|
|
|
protected $name='order_info_refund';
|
|
|
protected $append=[
|
|
|
'timeline',
|
|
|
+ 'is_goods_back',
|
|
|
];
|
|
|
const REFUND_ING=100;
|
|
|
const REFUND_PASS=200;
|
|
@@ -61,11 +65,11 @@ class Refund Extends Model
|
|
|
const REFUND_TYPE_ALL=2;
|
|
|
const REFUND_TYPE_HHBX=5;
|
|
|
public static $refundTypes=[
|
|
|
- self::REFUND_TYPE_MONEY=>'仅退款',
|
|
|
+ self::REFUND_TYPE_MONEY=>'取消订单',
|
|
|
self::REFUND_TYPE_ALL=>'退款退货',
|
|
|
self::REFUND_TYPE_HHBX=>'换货/维修',
|
|
|
];
|
|
|
- public static $refundTypeGoods=[self::REFUND_TYPE_ALL,];
|
|
|
+ public static $refundTypeGoods=[self::REFUND_TYPE_ALL,self::REFUND_TYPE_HHBX];
|
|
|
public static $refundTypeMoney=[self::REFUND_TYPE_MONEY,self::REFUND_TYPE_ALL];
|
|
|
const REASON_QU=1;
|
|
|
public static $reasons=[
|
|
@@ -378,6 +382,9 @@ class Refund Extends Model
|
|
|
public function gethasMoneyAttr($_,$model){
|
|
|
return $this->isRefundMoney();
|
|
|
}
|
|
|
+ public function getIsGoodsBackAttr($_,$model){
|
|
|
+ return $this->refund_status==self::REFUND_PASS && in_array($this->refund_type,self::getRefundTypeGoods());
|
|
|
+ }
|
|
|
public function getTimelineAttr(){
|
|
|
$arr=[
|
|
|
[
|