feat: 移除PDI和订单号字段,新增设备巡检模块
- 从物料跟踪页面移除订单号列和表单字段 - 从导航菜单移除PDI管理,添加设备巡检 - 新增InspectionLocation和InspectionRecord后端模型和API - 新增设备巡检前端页面(左侧点位列表,右侧设备和历史记录)
This commit is contained in:
37
backend/app/schemas/inspection.py
Normal file
37
backend/app/schemas/inspection.py
Normal file
@@ -0,0 +1,37 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class InspectionLocationCreate(BaseModel):
|
||||
code: str
|
||||
name: str
|
||||
description: Optional[str] = None
|
||||
sort_order: int = 0
|
||||
|
||||
|
||||
class InspectionLocationOut(InspectionLocationCreate):
|
||||
id: int
|
||||
created_at: datetime
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class InspectionRecordCreate(BaseModel):
|
||||
location_id: int
|
||||
equipment_code: Optional[str] = None
|
||||
equipment_name: Optional[str] = None
|
||||
scan_code: Optional[str] = None
|
||||
inspector: str
|
||||
result: str = "normal"
|
||||
notes: Optional[str] = None
|
||||
|
||||
|
||||
class InspectionRecordOut(InspectionRecordCreate):
|
||||
id: int
|
||||
location_name: Optional[str] = None
|
||||
created_at: datetime
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
Reference in New Issue
Block a user