上传源代码版本
This commit is contained in:
10
.trae/specs/shipping-handover-fix/checklist.md
Normal file
10
.trae/specs/shipping-handover-fix/checklist.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# 出货交接单添加功能修复 - 验证清单
|
||||
|
||||
- [ ] 检查到货交接单的实现方式,确认它如何处理 POD 和 Remarks 字段
|
||||
- [ ] 修改出货交接单的 `processShippingHandoverForm` 函数,确保 POD 和 Remarks 字段在为空时传递 null 或 undefined
|
||||
- [ ] 测试无 POD 无备注的情况,确保能正常提交
|
||||
- [ ] 测试有 POD 无备注的情况,确保能正常提交
|
||||
- [ ] 测试无 POD 有备注的情况,确保能正常提交
|
||||
- [ ] 测试有 POD 有备注的情况,确保能正常提交
|
||||
- [ ] 验证修复后功能与到货交接单保持一致
|
||||
- [ ] 确保修复不影响其他功能模块的正常运行
|
||||
65
.trae/specs/shipping-handover-fix/spec.md
Normal file
65
.trae/specs/shipping-handover-fix/spec.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# 出货交接单添加功能修复 - 产品需求文档
|
||||
|
||||
## 概述
|
||||
- **Summary**: 修复出货交接单添加时出现的验证错误问题,确保 POD 和 Remarks 字段在没有上传文件或填写备注时也能正常提交。
|
||||
- **Purpose**: 解决用户在添加出货交接单时遇到的 400 错误,提升用户体验。
|
||||
- **Target Users**: 使用 LabelReplaceServer 系统添加出货交接单的操作人员。
|
||||
|
||||
## Goals
|
||||
- 修复出货交接单添加时的验证错误问题
|
||||
- 确保 POD 和 Remarks 字段在为空时能正常提交
|
||||
- 保持与后端 API 的兼容性
|
||||
|
||||
## Non-Goals (Out of Scope)
|
||||
- 不修改后端 API 验证逻辑
|
||||
- 不改变其他功能模块的行为
|
||||
- 不添加新的功能特性
|
||||
|
||||
## Background & Context
|
||||
- 当前在添加出货交接单时,如果没有上传 POD 图片或填写备注,会收到 400 错误,提示 "The POD field is required." 和 "The Remarks field is required."
|
||||
- 从前端代码分析,当没有上传文件时,POD 字段被设置为空字符串,Remarks 字段也可能为空字符串
|
||||
- 后端 API 似乎要求这些字段不为空
|
||||
|
||||
## Functional Requirements
|
||||
- **FR-1**: 当用户没有上传 POD 图片时,系统应该能正常提交出货交接单
|
||||
- **FR-2**: 当用户没有填写备注时,系统应该能正常提交出货交接单
|
||||
- **FR-3**: 修复后的功能应该与现有的到货交接单添加功能保持一致
|
||||
|
||||
## Non-Functional Requirements
|
||||
- **NFR-1**: 修复不应该影响其他功能模块的正常运行
|
||||
- **NFR-2**: 修复应该保持代码的可读性和可维护性
|
||||
- **NFR-3**: 修复后的功能应该与后端 API 完全兼容
|
||||
|
||||
## Constraints
|
||||
- **Technical**: 前端使用 jQuery 和 Bootstrap,后端使用 .NET Core
|
||||
- **Dependencies**: 依赖后端 API 的验证逻辑
|
||||
|
||||
## Assumptions
|
||||
- 后端 API 实际上接受 POD 和 Remarks 字段为 null 或 undefined,但不接受空字符串
|
||||
- 到货交接单的添加功能已经正确处理了类似情况
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
### AC-1: 无 POD 图片时能正常添加
|
||||
- **Given**: 用户未上传 POD 图片
|
||||
- **When**: 用户点击 "添加" 按钮提交出货交接单
|
||||
- **Then**: 系统成功添加出货交接单,不返回 400 错误
|
||||
- **Verification**: `programmatic`
|
||||
- **Notes**: POD 字段应该传递 null 或 undefined,而不是空字符串
|
||||
|
||||
### AC-2: 无备注时能正常添加
|
||||
- **Given**: 用户未填写备注
|
||||
- **When**: 用户点击 "添加" 按钮提交出货交接单
|
||||
- **Then**: 系统成功添加出货交接单,不返回 400 错误
|
||||
- **Verification**: `programmatic`
|
||||
- **Notes**: Remarks 字段应该传递 null 或 undefined,而不是空字符串
|
||||
|
||||
### AC-3: 有 POD 图片和备注时能正常添加
|
||||
- **Given**: 用户上传了 POD 图片并填写了备注
|
||||
- **When**: 用户点击 "添加" 按钮提交出货交接单
|
||||
- **Then**: 系统成功添加出货交接单,与修复前行为一致
|
||||
- **Verification**: `programmatic`
|
||||
|
||||
## Open Questions
|
||||
- [ ] 后端 API 对 POD 和 Remarks 字段的具体验证规则是什么?
|
||||
- [ ] 到货交接单是如何处理这些字段的?
|
||||
40
.trae/specs/shipping-handover-fix/tasks.md
Normal file
40
.trae/specs/shipping-handover-fix/tasks.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# 出货交接单添加功能修复 - 实现计划
|
||||
|
||||
## [ ] 任务 1: 分析到货交接单的实现方式
|
||||
- **Priority**: P0
|
||||
- **Depends On**: None
|
||||
- **Description**:
|
||||
- 查看到货交接单添加功能的实现代码,了解它如何处理 POD 和 Remarks 字段
|
||||
- 对比出货交接单的实现,找出差异
|
||||
- **Acceptance Criteria Addressed**: AC-3
|
||||
- **Test Requirements**:
|
||||
- `human-judgement` TR-1.1: 确认到货交接单的实现方式
|
||||
- `human-judgement` TR-1.2: 识别出货交接单与到货交接单实现的差异
|
||||
- **Notes**: 重点关注 `processArrivalHandoverForms` 函数的实现
|
||||
|
||||
## [ ] 任务 2: 修改出货交接单添加逻辑
|
||||
- **Priority**: P0
|
||||
- **Depends On**: 任务 1
|
||||
- **Description**:
|
||||
- 修改 `processShippingHandoverForm` 函数,确保 POD 和 Remarks 字段在为空时传递 null 或 undefined
|
||||
- 保持与到货交接单实现的一致性
|
||||
- **Acceptance Criteria Addressed**: AC-1, AC-2, AC-3
|
||||
- **Test Requirements**:
|
||||
- `programmatic` TR-2.1: 验证无 POD 图片时能正常提交
|
||||
- `programmatic` TR-2.2: 验证无备注时能正常提交
|
||||
- `programmatic` TR-2.3: 验证有 POD 图片和备注时能正常提交
|
||||
- **Notes**: 修改 `batch_query.html` 文件中的 `processShippingHandoverForm` 函数
|
||||
|
||||
## [ ] 任务 3: 测试修复结果
|
||||
- **Priority**: P1
|
||||
- **Depends On**: 任务 2
|
||||
- **Description**:
|
||||
- 测试出货交接单添加功能,验证修复是否成功
|
||||
- 测试各种场景:无 POD 无备注、有 POD 无备注、无 POD 有备注、有 POD 有备注
|
||||
- **Acceptance Criteria Addressed**: AC-1, AC-2, AC-3
|
||||
- **Test Requirements**:
|
||||
- `programmatic` TR-3.1: 测试无 POD 无备注的情况
|
||||
- `programmatic` TR-3.2: 测试有 POD 无备注的情况
|
||||
- `programmatic` TR-3.3: 测试无 POD 有备注的情况
|
||||
- `programmatic` TR-3.4: 测试有 POD 有备注的情况
|
||||
- **Notes**: 使用浏览器测试功能,确保所有场景都能正常提交
|
||||
Reference in New Issue
Block a user