|
|
@@ -48,7 +48,7 @@ class ShopGoodsForm extends Model
|
|
|
{
|
|
|
return [
|
|
|
[['id','sellDiscount','giftType','sellType','goodsNo', 'goodsName', 'unit', 'sellPrice', 'marketPrice', 'pricePv', 'storeNums', 'content', 'sort','status','cover'], 'trim'],
|
|
|
- [['goodsName','sellDiscount','giftType','sellType','goodsNo', 'storeNums','sellPrice','marketPrice','pricePv', 'sort','status','cover'], 'required'],
|
|
|
+ [['goodsName','sellDiscount','giftType','goodsNo', 'storeNums','sellPrice','marketPrice','pricePv', 'sort','status','cover'], 'required'],
|
|
|
[['id'], 'required', 'on'=>'edit'],
|
|
|
[['id'], 'exist', 'targetClass'=>ShopGoods::class, 'targetAttribute'=>'ID'],
|
|
|
[['sellPrice','marketPrice','pricePv'], 'price'],
|
|
|
@@ -152,7 +152,8 @@ class ShopGoodsForm extends Model
|
|
|
//$shopGoods->TYPE = $this->type;
|
|
|
$shopGoods->SELL_DISCOUNT = $this->sellDiscount;
|
|
|
$shopGoods->GIFT_TYPE = implode(',',$this->giftType);
|
|
|
- $shopGoods->SELL_TYPE = implode(',',$this->sellType);
|
|
|
+ // $shopGoods->SELL_TYPE = implode(',',$this->sellType);
|
|
|
+ $shopGoods->SELL_TYPE = '1,2,3';
|
|
|
$shopGoods->GOODS_NO = $this->goodsNo;
|
|
|
$shopGoods->UNIT = $this->unit ? $this->unit : '个';
|
|
|
$shopGoods->COVER = $this->cover ? $this->cover : '';
|
|
|
@@ -195,7 +196,8 @@ class ShopGoodsForm extends Model
|
|
|
$model->TYPE = 0;
|
|
|
$model->SELL_DISCOUNT = $this->sellDiscount;
|
|
|
$model->GIFT_TYPE = implode(',',$this->giftType);
|
|
|
- $model->SELL_TYPE = implode(',',$this->sellType);
|
|
|
+ // $model->SELL_TYPE = implode(',',$this->sellType);
|
|
|
+ $model->SELL_TYPE = '1,2,3';
|
|
|
$model->GOODS_NO = $this->goodsNo;
|
|
|
$model->UNIT = $this->unit ? $this->unit : '个';
|
|
|
$model->COVER = $this->cover ? $this->cover : '';
|