ETest-Vue-FastAPI/订单详情样品查询修复完成.txt

31 lines
1.1 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

=== 订单详情样品查询修复完成 ===
问题: 从工单生成的订单,点击查看详情时看不到对应的样品列表
原因: 样品的 test_order_id 仍然指向原始订单,不是新生成的订单
解决方案: 通过工单的 order_id 查询样品
修改的文件:
✅ ruoyi-fastapi-backend/module_admin/system/dao/test_eut_dao.py
✅ ruoyi-fastapi-backend/module_admin/system/service/test_eut_service.py
✅ ruoyi-fastapi-backend/module_admin/system/controller/test_eut_controller.py
✅ ruoyi-fastapi-frontend/src/views/system/test_order/index.vue
实现逻辑:
1. 后端添加 order_id_from_work_order 参数
2. 当指定该参数时,通过工单查询样品
3. 前端检查订单是否有关联工单workOrderCount > 0
4. 如果有,传递 orderIdFromWorkOrder 参数
5. 如果没有,使用原有的 testOrderId 参数
下一步:
1. 重启后端服务
2. 点击从工单生成的订单ID 36-39
3. 查看订单详情
4. 应该能看到对应的样品列表
相关文档:
- 订单详情样品查询修复说明.md (详细说明)
- 工单生成订单功能实现进度.md (总体进度)