Commit 2901fea1 by lujunyi

药品必填

parent 94b734c8
......@@ -118,15 +118,15 @@ protected function form()
$form->text('product_name')->maxLength(64);
$form->text('spec')->required()->maxLength(128);
$form->text('preparation_pec')->maxLength(128);
$form->text('dosage_form')->required()->maxLength(128);
$form->text('dosage_form')->maxLength(128);
$form->select('unit')->options(DrugUnitModel::all()->pluck('name', 'name'));
$form->radio('drug_type')->options(DrugModel::DRUG_TYPE_MAP)->default(DrugModel::DRUG_TYPE_WM);
$form->text('factory')->required()->maxLength(128);
$form->text('approval_no')->required()->maxLength(64);
$form->text('factory')->maxLength(128);
$form->text('approval_no')->maxLength(64);
$form->text('mnemonic')->maxLength(64);
});
$form->column(6, function (Form $form) {
$form->text('standard_code')->required()->rules(function (Form $form) {
$form->text('standard_code')->rules(function (Form $form) {
// 如果不是编辑状态,则添加字段唯一验证
if (! $id = $form->model()->id) {
return 'unique:App\Models\DrugModel,standard_code';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment