255], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'order_id' => 'Order ID', 'goods_id' => 'Goods ID', 'num' => '商品数量', 'total_price' => '此商品的总价', 'integral_price' => '销售积分', 'integral_difference_price' => '积分差额', 'created_at' => 'Addtime', 'is_delete' => 'Is Delete', 'attr' => '商品规格', 'pic' => '商品规格图片', 'integral' => '获取积分', 'coin' => '贡献积分', 'share_base' => '固定基数', 'is_level' => '会员折扣', 'batch_price_tips' => '满减价格提示', 'supplier_price' => '供货商进价', 'goods_name' => '商品名称', 'goods_info' => '商品快照', 'delivery_type' => '配送方式,0:快递,1:自提', 'shop_id' => '自提点id,默认:0', 'order_transit_id' => '云仓转单id', "cost_price" => '成本价' ]; } public function afterSave($insert, $changedAttributes) { parent::afterSave($insert, $changedAttributes); BookingOrderExt::afterOrderDetailSave($insert, $changedAttributes, $this); \app\modules\admin\models\erp\InventoryForm::afterOrderDetailSave($this); \app\modules\admin\models\ActivityOrderRebateSelfForm::afterOrderDetailSave($this); } public function getGoods() { return $this->hasOne(Goods::className(), ['id'=>'goods_id']); } public function getOrder() { return $this->hasOne(Order::className(), ['id' => 'order_id']); } }