diff --git a/src/pages/store/center/index.tsx b/src/pages/store/center/index.tsx index cbe0166..5a93fd3 100644 --- a/src/pages/store/center/index.tsx +++ b/src/pages/store/center/index.tsx @@ -31,7 +31,7 @@ const OP_LABEL: Record = { const OP_DESC: Record = { pay: '变更支付状态为已付款', - complete: '同时变更支付状态为已付款、发货状态为已完成、订单状态为已完成', + complete: '同时变更支付状态为已付款、收货状态为已收货、订单状态为已完成', } // ─── 图片上传 ───────────────────────────────────────────────────── @@ -114,13 +114,9 @@ function isOrderActionable(order: ShopOrder): boolean { function getOrderActions(order: ShopOrder): { label: string; type: OpType }[] { if (!isOrderActionable(order)) return [] const actions: { label: string; type: OpType }[] = [] - // 未付款 → 可确认收款,也可直接确认完成 - if (order.payStatus === false || order.payStatus === null) { - actions.push({label: '确认收款', type: 'pay'}) - actions.push({label: '确认完成', type: 'complete'}) - } - // 已付款但未完成 → 可确认完成 - if (order.payStatus && order.orderStatus !== 1 && order.orderStatus !== 2) { + // 货到付款:未付款 / 已付款 都直接"确认完成", + // 确认完成会同时设置 payStatus=true,无需单独的"确认收款"按钮 + if (order.orderStatus !== 1 && order.orderStatus !== 2) { actions.push({label: '确认完成', type: 'complete'}) } return actions @@ -276,10 +272,11 @@ export default function StoreCenterPage() { updateData.payStatus = true updateData.payTime = formatDateTime(new Date()) } else if (opType === 'complete') { - // 确认完成:变更支付状态为已付款、发货状态为已完成、订单状态为已完成 + // 确认完成:用户已收到货 updateData.payStatus = true updateData.payTime = formatDateTime(new Date()) - updateData.deliveryStatus = 20 // 发货状态 → 已完成 + updateData.deliveryStatus = 30 // 发货状态 → 已收货 + updateData.deliveryTime = formatDateTime(new Date()) // 收货时间 updateData.orderStatus = 1 // 订单状态 → 已完成 updateData.sendEndImg = JSON.stringify(proofImages) // 配送员送达拍照(JSON数组) }