采购功能差不多了

This commit is contained in:
2026-04-14 16:15:21 +08:00
parent 3a38c34ea0
commit 80c4f11b12
5 changed files with 95 additions and 34 deletions
+1 -1
View File
@@ -13,5 +13,5 @@
}
]
},
"lastUpdated": 1776153171221
"lastUpdated": 1776154347507
}
+4 -10
View File
@@ -1,12 +1,6 @@
# 2026-04-14
# 2026-04-14 工作记录
## 修复 mapstructure IgnoreUntaggedField 编译错误
- `DecoderConfig` 不存在 `IgnoreUntaggedField` 字段,移除后改为 JSON 中转方案(`json.Marshal` + `json.Unmarshal`),绕过 mapstructure 字段名匹配问题,编译通过。
## showorder.vue 编辑权限控制
## 新增订单编辑功能
- 抽取公共组件 `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`(中英双语)
- 后端 `/getorder` 接口返回 `canModify` 字段,由 `canModifyPurchase(user.ID, order.UserID)` 判断
- 前端 showorder.vue 编辑按钮条件改为 `v-if="canModify"`