From b96d88048b8eebbfe6398c1572fb85267c86a5a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Wed, 1 Jul 2026 17:17:27 +0800 Subject: [PATCH] =?UTF-8?q?feat(store):=20=E4=BC=98=E5=8C=96=E9=97=A8?= =?UTF-8?q?=E5=BA=97=E4=B8=AD=E5=BF=83=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=92=8CCheckout=E8=AE=A2=E5=8D=95=E5=88=9B=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Checkout创建订单时直接传递payStatus和payTime字段防止未付款订单被删除 - 门店中心Tab改为三个(全部、待处理、已完成),并合并多个statusFilter查询 - 操作按钮逻辑调整为根据订单状态判断,已完成及已关闭订单无操作和删除按钮 - 状态文案和颜色适配完善,添加订单送达凭证照片预览功能 - 确认完成操作强制上传配送凭证照片,凭证支持JSON数组格式存储 - 收款操作支持上传凭证照片并追加至备注中 - 优化订单列表加载逻辑,多个请求结果合并去重并按创建时间降序排序 - 代码格式调整及UI细节优化,提升代码一致性和用户体验 --- src/pages/store/center/index.tsx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) 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数组) }