forked from erp-dev/erp
2.9 KiB
2.9 KiB
Printing 模块字段说明(2025-12-12)
PrintingJob
来源:api_v1/views/printing/serializers.py 中的 PrintingJobDetailSerializer
| 字段 | 说明 |
|---|---|
id |
主键 |
printing_order / printing_order_id |
关联的印染主订单 ID 与人类可读编号 |
product / product_name / product_code |
关联产品 |
quantity / unit |
生产数量与单位 |
size |
一段尺寸 |
pieces |
件数 |
description |
备注 |
work_state |
业务进展枚举值,详见下表 |
work_state_display |
业务进展的中文描述 |
status / status_id |
stateflow 状态显示值与下一步节点 ID |
is_completed / has_started |
是否完成、是否已开始 |
business_object_id |
关联流程实例 ID |
created_at / updated_at |
创建、更新时间戳 |
work_state 枚举
定义于 printing.models.PrintingJobWorkStateEnum:
| 值 | 标识 |
|---|---|
0 |
生产中 |
1 |
待送货 |
2 |
待开单 |
3 |
已完结 |
Serializer 与 Model 完全同步,work_state 可在创建/更新接口提交(字段可选),返回时携带 work_state_display。
PlateOrder
来源:api_v1/views/printing/serializers.py 中的 PlateOrderDetailSerializer
PlateOrder 模型当前 没有 work_state 字段。主要字段如下(按序列化器顺序):
| 字段 | 说明 |
|---|---|
id / design_code |
主键与设计编号(空则回退为主键字符串) |
plate_type / plate_date / plate_method |
开版类型、时间、方式 |
plate_image / plate_image_url |
JSONField 存储的图片信息及其对外地址 |
image_name / plate_notes / reprint_reason |
图片名称、注意事项、复版原因 |
urgency_level / is_invalid |
紧急程度、是否作废 |
customer / customer_name / customer_phone / area / default_address |
客户与地址信息 |
salesperson / merchandiser / designer 及对应 *_name |
关联员工 |
style_name / fabric / fabric_source / width / production_method |
款式与面料信息 |
is_mark_frame / drawing_rating / color_matching_rating / sample_rating / difficulty_rating |
标记及评分字段 |
sample_meter / required_sample_meters |
样品米数及需求 |
required_completion_date / completion_date |
要求完成与实际完成时间 |
approval_result / is_ordered / customer_feedback |
审批结果、下单状态、客户反馈 |
process / process_name |
关联流程 ID 与名称 |
status / status_id / is_completed / has_started / progress_percentage / business_object_id / last_completed_state |
stateflow 状态相关字段 |
print_count |
打印次数 |
created_at / updated_at |
创建、更新时间戳 |
由于 PlateOrder 未包含 work_state,前端无需提交该字段;若后续业务需要,可在模型与序列化器中新增字段并同步更新本文档。