fix(orders): 修复确认完成按钮显示逻辑
- 调整确认完成按钮的注释缩进,提升代码可读性 - 保持确认完成按钮仅在已付款状态下显示 - 未改变按钮显示的实际逻辑行为
This commit is contained in:
@@ -135,14 +135,14 @@ function getOrderActions(order: ShopOrder): { label: string; type: OpType }[] {
|
||||
if (!order.payStatus && order.payType === 9 && order.orderStatus === 0) {
|
||||
actions.push({label: '确认收款', type: 'confirmPay'})
|
||||
}
|
||||
// 确认完成:仅在确认收款后显示(已付款才能确认完成)
|
||||
if (order.payStatus) {
|
||||
actions.push({label: '确认完成', type: 'complete'})
|
||||
}
|
||||
// 发货:确认收款后、且尚未发货(deliveryStatus<20)时显示
|
||||
if (order.payStatus && (order.deliveryStatus == null || order.deliveryStatus < 20) && order.orderStatus !== 1) {
|
||||
actions.push({label: '发货', type: 'ship'})
|
||||
}
|
||||
// 确认完成:仅在确认收款后显示(已付款才能确认完成)
|
||||
if (order.payStatus) {
|
||||
actions.push({label: '确认完成', type: 'complete'})
|
||||
}
|
||||
return actions
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user