Files
xinlong-shop-taro/.workbuddy/memory/2025-07-17.md
赵忠林 37bd61ea85 feat(order): 显示订单下单时间到时分
- 修改订单列表中 OrderCard 组件底部日期显示格式
- 由原先只显示年月日改为显示到时分(YYYY-MM-DD HH:mm)
- 兼容 ISO 格式时间字符串中的 T 分隔符与空格分隔符
- 提升订单时间显示的精确度和用户体验
2026-07-17 01:39:51 +08:00

23 lines
1.5 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.

# 2025-07-17 工作日志
## 门店订单管理页修复pages/store/orders/index.tsx
三个问题修复:
1. **确认完成按钮过早显示**`getOrderActions` 中"确认完成"原来对所有可操作订单都显示,改为仅在 `order.payStatus === true`(已确认收款)后才显示,避免占用位置。
2. **确认收款后仍可修改金额**`getOrderActions` 中"修改金额"原来对所有可操作订单都显示,改为仅在 `!order.payStatus`(未付款)时显示。确认收款后修改金额按钮自动隐藏。
3. **已关闭 Tab 混入待发货订单**`TABS` 配置中 `pending`(已关闭)的 params 原来同时包含 `statusFilter: 1`(待发货)和 `statusFilter: 8`(已关闭),导致待发货订单也出现。已改为只查 `statusFilter: 8`
### 操作按钮逻辑总结(修复后)
- **修改金额**:仅未付款(`!payStatus`)时显示
- **确认收款**仅线下付款payType=9且未付款时显示
- **确认完成**:仅已付款(`payStatus === true`)时显示
- **关闭订单**:所有可操作订单(非已完成、非已关闭)均显示
## 订单列表下单时间显示到时分components/common/OrderCard
`pages/order/list` 列表卡片(`OrderCard`)底部日期原为 `order.createTime?.slice(0, 10)`(仅显示 YYYY-MM-DD
改为 `order.createTime?.replace('T', ' ').slice(0, 16)`,显示「下单时间: YYYY-MM-DD HH:mm」`replace('T',' ')` 兼容后端 ISOT 分隔)与空格分隔两种时间格式。