Files
ops2/.workbuddy/memory/2026-04-14.md
T
2026-04-14 12:14:45 +08:00

13 lines
976 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 2026-04-14
## 修复 mapstructure IgnoreUntaggedField 编译错误
- `DecoderConfig` 不存在 `IgnoreUntaggedField` 字段,移除后改为 JSON 中转方案(`json.Marshal` + `json.Unmarshal`),绕过 mapstructure 字段名匹配问题,编译通过。
## 新增订单编辑功能
- 抽取公共组件 `src/components/PurchaseOrderForm.vue`,供 addorder/editorder 共用(标题/备注/链接/款式标签/费用明细/图片上传)
- 创建 `src/views/purchase/editorder.vue`:路由参数 `:id` 加载订单 → 回填 → 调用 `/purchase/updateorder` 保存
- 后端新增 `POST /purchase/updateorder` 接口:更新基本字段 + 重建费用明细 + 重建图片绑定 + 写操作日志,编译通过
- 前端 `purchase.js` 新增 `updateOrder(id, data)` 方法
- 注册路由 `purchase/editorder/:id`ShowOrder.vue 顶部加编辑按钮
- i18n 补充:`purchase.edit_order``purchase_addorder.edit_order``message.loading`(中英双语)