fix(order): 优化订单状态判断与收货流程

- 移除货到付款场景下的"确认收款"按钮,统一使用"确认完成"操作设置 payStatus=true
- 确认完成时新增设置 deliveryStatus=30(已收货)和 deliveryTime,保持与后台确认收货逻辑一致
- sendEndImg 字段改为 JSON 数组格式,兼容多图保存,避免 OSS URL 中逗号解析错误
- 修复 OrderCard.getCardStatus 判断顺序错误,确保 orderStatus=1(已完成)优先判定,区分已收货和待收货状态显示颜色与文案
This commit is contained in:
2026-07-01 17:23:46 +08:00
parent b96d88048b
commit ceadb463c5
2 changed files with 11 additions and 2 deletions

View File

@@ -19,10 +19,13 @@ const getCardStatus = (order: ShopOrder): { text: string; color: string } => {
if (orderStatus === 4 || orderStatus === 7) return { text: '退款申请中', color: '#ee0a24' }
if (orderStatus === 5) return { text: '退款被拒绝', color: '#ee0a24' }
// 终态orderStatus=1 必须最先判断,盖过 deliveryStatus/payStatus
if (orderStatus === 1) return { text: '已完成', color: '#0e932e' }
if (!payStatus) return { text: '待付款', color: '#ee0a24' }
if (deliveryStatus === 10) return { text: '待发货', color: '#4b9cf5' }
if (deliveryStatus === 20 || deliveryStatus === 30) return { text: '待收货', color: '#4b9cf5' }
if (orderStatus === 1) return { text: '已完成', color: '#0e932e' }
if (deliveryStatus === 20) return { text: '待收货', color: '#4b9cf5' }
if (deliveryStatus === 30) return { text: '已收货', color: '#0e932e' }
return { text: '已付款', color: '#0e932e' }
}