64], [['remark', 'merchant_remark', 'express_no', 'merchant_express_no', 'merchant_express_content', 'mobile'], 'string', 'max' => 255], [['customer_name', 'express', 'merchant_customer_name', 'merchant_express'], 'string', 'max' => 65], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'cx_mch_id' => '平台商家ID', 'user_id' => '用户ID', 'order_id' => '订单ID', 'order_detail_id' => '关联订单详情', 'order_no' => '退款单号', 'type' => '售后类型:1=退货退款,2=换货', 'refund_price' => '退款金额', 'remark' => '用户退款备注、说明', 'pic_urls' => '用户上传图片凭证', 'status' => '状态:1=待商家处理,2=同意,3=拒绝', 'status_time' => '商家处理时间', 'merchant_remark' => '商家同意|拒绝备注、理由', 'is_send' => '用户是否发货:0=未发货,1=已发货', 'send_time' => '发货时间', 'customer_name' => '京东商家编号', 'express' => '快递公司', 'express_no' => '快递单号', 'address_id' => '退换货地址ID', 'is_confirm' => '商家确认操作', 'confirm_time' => '确认时间', 'merchant_customer_name' => '商家京东商家编号', 'merchant_express' => '商家发货快递公司', 'merchant_express_no' => '商家发货快递单号', 'created_at' => '添加时间', 'updated_at' => '更新时间', 'deleted_at' => '删除时间', 'is_delete' => '是否删除', 'refund_time' => '退款时间', 'is_refund' => '是否打款:0=否,1=是', 'reality_refund_price' => '商家实际退款金额', 'merchant_express_content' => '物流内容', 'mobile' => '联系方式', 'refund_data' => '售后数据', ]; } public function beforeSave($insert) { if(parent::beforeSave($insert)){ if($this->isNewRecord){ $this->created_at = time(); } $this->updated_at = time(); if($this->is_delete == 1) $this->deleted_at = time(); $this->htmlTagFilter(); return true; } else { return false; } } public function htmlTagFilter() { $this->remark = Model::htmlTagFilter($this->remark); $this->merchant_remark = Model::htmlTagFilter($this->merchant_remark); $this->merchant_customer_name = Model::htmlTagFilter($this->merchant_customer_name); $this->merchant_express = Model::htmlTagFilter($this->merchant_express); $this->merchant_express_no = Model::htmlTagFilter($this->merchant_express_no); $this->mobile = Model::htmlTagFilter($this->mobile); } }