|
|
|
@ -129,9 +129,6 @@ class ProductController extends AdminController |
|
|
|
} |
|
|
|
|
|
|
|
$form->text('title')->required(); |
|
|
|
// $form->currency('price')->symbol('¥')->required();
|
|
|
|
// $form->currency('original_price')->symbol('¥')->required();
|
|
|
|
// $form->number('stock')->required();
|
|
|
|
$form->hasMany('spec', function (NestedForm $form) { |
|
|
|
$form->hidden('id'); |
|
|
|
$form->text('name', '规格')->required()->readonly(); |
|
|
|
@ -148,7 +145,6 @@ class ProductController extends AdminController |
|
|
|
.has-many-spec .input-group>.form-control:not(:first-child){border-radius:.25rem;}'); |
|
|
|
Admin::script(file_get_contents(resource_path('js/supplier-batch-add-spec.js'))); |
|
|
|
})->useTable()->required(); |
|
|
|
//$form->number('service_persons')->min(1)->default(1)->required();
|
|
|
|
if ($form->isEditing() && in_array($form->model()->status, [ProductStatus::SOLD_OUT, ProductStatus::ON_SALE])) { |
|
|
|
$form->radio('status')->options([1 => '上架', -2 => '下架'])->default(1); |
|
|
|
} |
|
|
|
|