From 65bcd07ca7496b6b1110133364e3e2fabb5f0841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Fri, 17 Jul 2026 15:10:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(orders):=20=E4=BC=98=E5=8C=96=E7=BA=BF?= =?UTF-8?q?=E4=B8=8B=E4=BB=98=E6=AC=BE=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=92=8C=E5=8F=91=E8=B4=A7=E6=93=8D=E4=BD=9C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整确认收款操作描述为“确认已收到线下付款” - 增加线下付款已发货待收款状态显示处理 - 支持线下付款订单先发货后确认收款的发货操作 - 修改发货按钮显示条件,提升线下付款订单兼容性 --- src/pages/store/orders/index.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/pages/store/orders/index.tsx b/src/pages/store/orders/index.tsx index 446f320..2f5f2c3 100644 --- a/src/pages/store/orders/index.tsx +++ b/src/pages/store/orders/index.tsx @@ -38,7 +38,7 @@ const OP_LABEL: Record = { } const OP_DESC: Record = { - confirmPay: '确认已收到线下付款,订单将进入待发货状态', + confirmPay: '确认已收到线下付款', complete: '同时变更支付状态为已付款、收货状态为已收货、订单状态为已完成', editPrice: '修改订单实付金额', ship: '选择发货人员并生成发货单,订单将进入已发货状态', @@ -101,6 +101,8 @@ function getStatusText(order: ShopOrder): string { if (order.orderStatus === 1) return '已完成' if (order.orderStatus === 2) return '已关闭' if (order.payStatus === false || order.payStatus === null) { + // 线下付款·已发货待收款(先发货后结款) + if (order.payType === 9 && order.deliveryStatus === 20) return '已发货待收款' // 线下付款待确认收款 if (order.payType === 9) return '待确认收款' return '待收款' @@ -135,9 +137,14 @@ function getOrderActions(order: ShopOrder): { label: string; type: OpType }[] { if (!order.payStatus && order.payType === 9 && order.orderStatus === 0) { actions.push({label: '确认收款', type: 'confirmPay'}) } - // 发货:确认收款后、且尚未发货(deliveryStatus<20)时显示 - if (order.payStatus && (order.deliveryStatus == null || order.deliveryStatus < 20) && order.orderStatus !== 1) { - actions.push({label: '发货', type: 'ship'}) + // 发货: + // - 已付款且未发货:正常发货 + // - 线下付款未付款且未发货:支持先发货后结款 + if (order.orderStatus !== 1) { + const notShipped = order.deliveryStatus == null || order.deliveryStatus < 20 + if (notShipped && (order.payStatus || order.payType === 9)) { + actions.push({label: '发货', type: 'ship'}) + } } // 确认完成:仅在确认收款后显示(已付款才能确认完成) if (order.payStatus) {