diff --git a/frontend/src/components/StaffPicker.tsx b/frontend/src/components/StaffPicker.tsx index c422d26..1380ad0 100644 --- a/frontend/src/components/StaffPicker.tsx +++ b/frontend/src/components/StaffPicker.tsx @@ -4,7 +4,6 @@ import { searchStaff, type StaffSearchVO } from "@/api/staff"; interface Props { value: string; - staffId: number | null; onChange: (name: string, staffId: number | null) => void; disabled?: boolean; required?: boolean; @@ -27,7 +26,6 @@ const fieldControl: React.CSSProperties = { export default function StaffPicker({ value, - staffId, onChange, disabled, required, @@ -111,25 +109,6 @@ export default function StaffPicker({ > - {staffId != null && !disabled && ( - - 已绑定 - - )} {open && !disabled && (
- setForm((s) => ({ ...s, staffName: name, iStaffId: id })) + setForm((s) => ({ + ...s, + staffName: name, + iStaffId: id, + // Auto-fill 用户号 / 用户名 to the staff name on selection + // (matches prototype behavior — user can still override after). + ...(id != null ? { sUserNo: name, sUserName: name } : {}), + })) } disabled={disabled} required