liyinglin 2 years ago
parent d4ac3f5d3e
commit a593047b55

@ -11,7 +11,7 @@ class AskSubmitForm extends Form
{
public function buildForm()
{
$this->add("project_id", Field::SELECT, ["label" => "所属项目/医院", "empty_value" => "请选择", "choices" => (new Project())->get()->pluck("name", "id")->toArray()]);
// $this->add("project_id", Field::SELECT, ["label" => "所属项目/医院", "empty_value" => "请选择", "choices" => (new Project())->get()->pluck("name", "id")->toArray()]);
$this->add("visit", Field::TEXT, ["label" => "拜访人员", "rules" => "required"]);
$this->add("date", Field::DATE, ["label" => "考核日期", "rules" => "required"]);
$this->add("department", Field::TEXT, ["label" => "科室", "rules" => "required"]);

@ -331,7 +331,7 @@ class ProjectController extends CommonController
"label" => "所属项目/医院", "empty_value" => "请选择",
"choices" => (new ParamedicLevel())->where(function ($query) use ($project_ids) {
if ($project_ids) {
$query->whereIn("project_id", [4]);
$query->whereIn("project_id", $project_ids);
}
})->get()->pluck("name", "id")->toArray()
]);

Loading…
Cancel
Save