4
0
Fork 0

form price

master
panliang 2022-09-23 16:55:07 +08:00
parent 568b551aae
commit be44da76fa
2 changed files with 2 additions and 2 deletions

View File

@ -259,7 +259,7 @@ class GoodsController extends AdminController
->move('goods/content');
if ($isCreating || !$model->spec) {
$form->number('price')->min(0)->attribute('step', 0.01);
$form->currency('price')->symbol('¥');
} else {
$form->display('help', '提示')->value('商品其他信息, 请到 <a href="'.admin_route('goods_sku.index', ['goods' => $model->id]).'" target="_blank">货品列表<a/> 去修改');
}

View File

@ -100,7 +100,7 @@ class GoodsSkuController extends Controller
$unqiue = Rule::unique('goods_sku', 'sn')->ignore($form->model()->id);
$form->text('sn')->rules([$unqiue], ['unique' => '货号已经存在'])->required();
$form->text('name')->default($goods->name);
$form->number('price')->min(0)->attribute('step', 0.01)->default($goods->price);
$form->currency('price')->symbol('¥');
$form->number('stock')->min(0)->default($goods->stock);
$form->hidden('spec')->customFormat(fn ($v) => json_encode($v));