64], [['name', 'customer_name', 'express'], 'string', 'max' => 65], [['mobile', 'address', 'remark', 'seller_words', 'seller_remark', 'express_no', 'plugin_sign', 'location', 'city_name', 'city_info'], 'string', 'max' => 255], [['city_mobile'], 'string', 'max' => 100], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'cx_mch_id' => '平台商户ID', 'user_id' => '用户ID', 'order_no' => '订单号', 'total_price' => '订单总金额(含运费)', 'total_pay_price' => '实际支付总费用(含运费)', 'express_original_price' => '运费(后台修改前)', 'express_price' => '运费(后台修改后)', 'total_goods_price' => '订单商品总金额(优惠后)', 'total_goods_original_price' => '订单商品总金额(优惠前)', 'use_user_coupon_id' => '使用的用户优惠券id', 'coupon_discount_price' => '优惠券优惠金额', 'name' => '收件人姓名', 'mobile' => '收件人手机号', 'address' => '收件人地址', 'remark' => '用户订单备注', 'seller_words' => '商家留言', 'seller_remark' => '商家订单备注', 'is_pay' => '是否支付:0=未支付,1=已支付', 'pay_type' => '支付方式', 'pay_time' => '支付时间', 'is_send' => '是否发货:0=未发货,1=已发货', 'send_time' => '发货时间', 'customer_name' => '京东商家编号', 'express' => '物流公司', 'express_no' => '物流订单号', 'is_sale' => '是否过售后时间', 'is_confirm' => '收货状态:0=未收货,1=已收货', 'confirm_time' => '确认收货时间', 'cancel_status' => '订单取消状态:0=未取消,1=已取消,2=申请取消', 'cancel_time' => '订单取消时间', 'created_at' => '添加时间', 'updated_at' => '更新时间', 'deleted_at' => '删除时间', 'is_delete' => '是否删除:0=否,1=是', 'is_recycle' => '是否加入回收站:0=否,1=是', 'send_type' => '配送方式:0=快递配送,1=到店自提,2=同城配送,3=无配送,4=商家自配', 'plugin_sign' => '插件标识', 'support_pay_types' => '支持的支付方式,空表示支持系统设置支持的所有方式', 'is_comment' => '是否评价:0=否,1=是', 'comment_time' => '评价时间', 'apply_after_sale' => '是否申请售后', 'status' => '订单状态:1=进行中,0=已完成', 'auto_cancel_time' => '自动取消时间', 'auto_confirm_time' => '自动确认收货时间', 'auto_sales_time' => '自动售后时间', 'distance' => '同城配送距离,-1不在范围内,正数为距离M', 'city_mobile' => '同城配送联系方式', 'location' => '经纬度:纬度,经度', 'city_name' => '同城配送城市名称', 'city_info' => '同城配送城市信息', ]; } 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->name = Model::htmlTagFilter($this->name); $this->mobile = Model::htmlTagFilter($this->mobile); $this->address = Model::htmlTagFilter($this->address); $this->remark = Model::htmlTagFilter($this->remark); $this->seller_remark = Model::htmlTagFilter($this->seller_remark); $this->seller_words = Model::htmlTagFilter($this->seller_words); } //积分商城订单 public function getIntegralMallOrder() { return $this->hasOne(IntegralMallOrder::className(), ['order_id' => 'id'])->where(['is_delete' => 0]); } public static function statusLabels() { return [ '0' => '待支付', '1' => '已支付', // '2' => '已取消', '3' => '已完成', ]; } }