|
|
@@ -24,6 +24,7 @@ class ShopGoodsForm extends Model
|
|
|
public $sellType;
|
|
|
public $goodsNo;
|
|
|
public $unit;
|
|
|
+ public $taxRate;
|
|
|
public $cover;
|
|
|
public $sellPrice;
|
|
|
public $sellPriceStandard;
|
|
|
@@ -84,6 +85,7 @@ class ShopGoodsForm extends Model
|
|
|
'storeNums' => '库存',
|
|
|
'content' => '产品详情',
|
|
|
'listOrder' => '排序',
|
|
|
+ 'taxRate' => '税率',
|
|
|
];
|
|
|
}
|
|
|
|
|
|
@@ -95,8 +97,8 @@ class ShopGoodsForm extends Model
|
|
|
{
|
|
|
$parentScenarios = parent::scenarios();
|
|
|
$customScenarios = [
|
|
|
- 'add' => ['goodsName','sellDiscount','giftType', 'sellType','goodsNo','unit','sellPrice','marketPrice','pricePv','storeNums', 'content','sort','cover', 'categoryType', 'sellPriceStandard'],
|
|
|
- 'edit' => ['id','goodsName','sellDiscount','giftType', 'sellType','goodsNo','unit','sellPrice','marketPrice','pricePv', 'storeNums', 'content','sort','cover', 'categoryType', 'sellPriceStandard'],
|
|
|
+ 'add' => ['goodsName','sellDiscount','giftType', 'sellType','goodsNo','unit','sellPrice','marketPrice','pricePv','storeNums', 'content','sort','cover', 'categoryType', 'sellPriceStandard', 'taxRate', 'taxAmount'],
|
|
|
+ 'edit' => ['id','goodsName','sellDiscount','giftType', 'sellType','goodsNo','unit','sellPrice','marketPrice','pricePv', 'storeNums', 'content','sort','cover', 'categoryType', 'sellPriceStandard', 'taxRate'],
|
|
|
'changeStatus' => ['selectedIds', 'status'],
|
|
|
];
|
|
|
return array_merge($parentScenarios, $customScenarios);
|
|
|
@@ -206,6 +208,7 @@ class ShopGoodsForm extends Model
|
|
|
//$shopGoods->POINT = $this->point;
|
|
|
$shopGoods->CONTENT = $this->content;
|
|
|
$shopGoods->STORE_NUMS = $this->storeNums;
|
|
|
+ $shopGoods->TAX_RATE = $this->taxRate;
|
|
|
$shopGoods->SORT = $this->sort;
|
|
|
$shopGoods->CATE_ID = '1';
|
|
|
$shopGoods->CREATED_AT = Date::nowTime();
|
|
|
@@ -249,6 +252,7 @@ class ShopGoodsForm extends Model
|
|
|
$model->SELL_PRICE = $this->sellPrice;
|
|
|
$model->MARKET_PRICE = $this->marketPrice;
|
|
|
$model->PRICE_PV = $this->pricePv;
|
|
|
+ $model->TAX_RATE = $this->taxRate;
|
|
|
//$model->POINT = $this->point;
|
|
|
$model->CONTENT = $this->content;
|
|
|
$model->STORE_NUMS = $this->storeNums;
|