Files
ops2/.workbuddy/memory/2026-04-23.md
T
2026-04-23 19:43:13 +08:00

32 lines
1.8 KiB
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-23 工作日志
## warehouse 模块前端开发
### 今日完成
- `apiWarehouse.go` 重写,参照 `apiWorkOrder.go` 模式
- 修复 4 处图片绑定查询 `hash` 未使用的问题
- 清理 6 处重复的 `AuthenticationAuthority` 调用
- 容器列表页 (`WarehouseContainerList.vue`) — 根容器列表 + 统计卡片
- 容器详情页 (`WarehouseContainerDetail.vue`) — 子容器/物品 Tab + 新增子容器弹窗
- 新增物品独立页 (`WarehouseAddItem.vue`) + 路由注册
- 路由: `/warehouse/container/:id/add-item`
- 物品 Tab 按钮从弹窗改为跳转独立页面
- 使用 `useDropzone` 组件上传图片
- 物品详情页 (`WarehouseItemDetail.vue`) — 物品信息 + 移动历史/关联工单 Tab
- 物品列表总览 (`WarehouseItemList.vue`)
- 路由: `/warehouse/items`,侧边栏入口「物品总览」
- 统计卡片(总数/已入库/未入库)
- 表格:名称/序列号/数量/位置/创建时间 + 跳转详情/删除
- 补充 i18n key(中/英双语)
### 踩坑
- 后端 `TabWarehouseItem.SerialNumber` JSON 字段名为 `serial_number`(小写),前端须对应
- `useDropzone` 组件通过 `dropzoneRef.value.return_files()` 获取已上传文件的 hash 数组
- `RouterLink` 在此项目为全局组件,无需 import
- `watch` 需要显式 import`import { ref, reactive, computed, onMounted, watch } from 'vue'`
- **项目没有 daisyUI**,所有样式均用纯 Tailwind CSS v4 实现
- 不用 `btn``tabs``tab``input-bordered``table``modal``join``form-control``badge``card` 等 daisyUI 类
- 用 Tailwind 自定义样式:`rounded-xl border border-gray-200 bg-white shadow dark:border-dk-muted dark:bg-dk-card`
- 加载动画用自定义 SVG spinner,不用 `loading loading-spinner`
- 弹窗用 `<dialog>` + Tailwind 固定定位,不用 daisyUI `modal`