原价和成本价必须是数字
This commit is contained in:
parent
0ba62d4ada
commit
ed6eea3382
|
|
@ -34,10 +34,11 @@ class ProductRequest extends FormRequest
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'descriptions.*.name' => 'required|string|min:3|max:128',
|
'descriptions.*.name' => 'required|string|min:3|max:128',
|
||||||
// 'descriptions.*.description' => 'required|string',
|
|
||||||
'brand_id' => 'int',
|
'brand_id' => 'int',
|
||||||
'skus.*.sku' => 'required|string',
|
'skus.*.sku' => 'required|string',
|
||||||
'skus.*.price' => 'required|numeric',
|
'skus.*.price' => 'required|numeric',
|
||||||
|
'skus.*.origin_price' => 'required|numeric',
|
||||||
|
'skus.*.cost_price' => 'required|numeric',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -47,7 +48,9 @@ class ProductRequest extends FormRequest
|
||||||
'descriptions.*.name' => trans('product.name'),
|
'descriptions.*.name' => trans('product.name'),
|
||||||
'brand_id' => trans('product.brand'),
|
'brand_id' => trans('product.brand'),
|
||||||
'skus.*.sku' => trans('product.sku'),
|
'skus.*.sku' => trans('product.sku'),
|
||||||
'skus.*.price' => trans('product.price')
|
'skus.*.price' => trans('product.price'),
|
||||||
|
'skus.*.origin_price' => trans('product.origin_price'),
|
||||||
|
'skus.*.cost_price' => trans('product.cost_price'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ return [
|
||||||
'name' => 'Name',
|
'name' => 'Name',
|
||||||
'sku' => 'SKU',
|
'sku' => 'SKU',
|
||||||
'price' => 'Price',
|
'price' => 'Price',
|
||||||
|
'origin_price' => 'Origin Price',
|
||||||
|
'cost_price' => 'Cost Price',
|
||||||
'brand' => 'Brand',
|
'brand' => 'Brand',
|
||||||
'category' => 'Category',
|
'category' => 'Category',
|
||||||
'model' => 'Model',
|
'model' => 'Model',
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ return [
|
||||||
'name' => '名称',
|
'name' => '名称',
|
||||||
'sku' => 'SKU',
|
'sku' => 'SKU',
|
||||||
'price' => '价格',
|
'price' => '价格',
|
||||||
|
'origin_price' => '原价',
|
||||||
|
'cost_price' => '成本价',
|
||||||
'brand' => '品牌',
|
'brand' => '品牌',
|
||||||
'category' => '分类',
|
'category' => '分类',
|
||||||
'model' => '型号',
|
'model' => '型号',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue