|
|
@@ -13,9 +13,11 @@
|
|
|
<text v-if="order.status === 'paid' && !order.fulfillStatus" class="status-hint">商家正在准备中,请耐心等待</text>
|
|
|
<text v-if="order.status === 'completed'" class="status-hint">订单已完成,感谢购买</text>
|
|
|
<text v-if="order.status === 'cancelled'" class="status-hint">订单已取消</text>
|
|
|
- <text v-if="order.refundStatus === 1" class="status-hint">退款申请处理中,请耐心等待</text>
|
|
|
- <text v-if="order.refundStatus === 2" class="status-hint">退款已完成,金额将原路返回</text>
|
|
|
+ <text v-if="order.status === 'pending_refund'" class="status-hint">退款申请待审核,请耐心等待</text>
|
|
|
+ <text v-if="order.status === 'refunding' || order.status === 'refund_pending'" class="status-hint">退款处理中,金额将原路到账</text>
|
|
|
+ <text v-if="order.status === 'refunded'" class="status-hint">退款已完成,金额已原路返回</text>
|
|
|
</view>
|
|
|
+ <view class="section">
|
|
|
<text class="section-title">订单信息</text>
|
|
|
<view class="info-row">
|
|
|
<text class="info-label">订单编号</text>
|
|
|
@@ -106,7 +108,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view v-if="order.status === 'shipped' || order.status === 'completed'" class="section">
|
|
|
+ <view v-if="order.status === 'pending_receipt' || order.status === 'completed'" class="section">
|
|
|
<text class="section-title">物流信息</text>
|
|
|
<view class="info-row">
|
|
|
<text class="info-label">物流公司</text>
|
|
|
@@ -131,11 +133,11 @@
|
|
|
<!-- 履约确认收货按钮:线上服务/自取需要在供应商确认后用户才能确认 -->
|
|
|
<button v-if="order.fulfillStatus === 'confirmed_by_vendor' && (order.deliveryMethod === 4 || order.deliveryMethod === 5)" class="btn-confirm-receive" @click="onConfirmReceive">确认收货</button>
|
|
|
<button v-if="order.fulfillStatus === 'confirmed_by_vendor' && (order.deliveryMethod === 2 || order.deliveryMethod === 3)" class="btn-confirm-receive" @click="onConfirmReceive">确认收货</button>
|
|
|
- <button v-if="order.status === 'shipped'" class="btn-confirm-receive" @click="onConfirmReceive">确认收货</button>
|
|
|
- <button v-if="order.status === 'paid' || order.status === 'shipped' || order.status === 'pending_receipt'" class="btn-after-sales" @click="onApplyAfterSales">申请售后</button>
|
|
|
+
|
|
|
+ <button v-if="order.status === 'paid' || order.status === 'pending_receipt'" class="btn-after-sales" @click="onApplyAfterSales">申请售后</button>
|
|
|
<button v-if="order.status === 'completed'" class="btn-buy-again" @click="onBuyAgain">再次购买</button>
|
|
|
- <button v-if="order.refundStatus === 1 && order.status === 'refunding'" class="btn-cancel-refund" @click="onCancelRefund">取消退款申请</button>
|
|
|
- <button v-if="order.status === 'completed' || order.status === 'refunding' || order.status === 'refunded'" class="btn-after-sales" @click="onAfterSales">售后记录</button>
|
|
|
+ <button v-if="order.status === 'pending_refund'" class="btn-cancel-refund" @click="onCancelRefund">取消退款申请</button>
|
|
|
+ <button v-if="order.status === 'completed' || order.status === 'pending_refund' || order.status === 'refunding' || order.status === 'refund_pending' || order.status === 'refunded'" class="btn-after-sales" @click="onAfterSales">售后记录</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -279,18 +281,24 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getDisplayStatus() {
|
|
|
- if (this.order.refundStatus === 1) return 'refunding'
|
|
|
- if (this.order.refundStatus === 2) return 'refunded'
|
|
|
+ // 主状态优先(后端已按新口径写 pending_refund/refunding/pending_receipt 等)
|
|
|
+ var st = this.order.status
|
|
|
+ if (st === 'pending_refund' || st === 'refunding' || st === 'refund_pending' || st === 'refunded' || st === 'pending_receipt') {
|
|
|
+ return st
|
|
|
+ }
|
|
|
+ // 旧数据兜底:退款驳回
|
|
|
if (this.order.refundStatus === 3) return 'refund-rejected'
|
|
|
- return this.order.status
|
|
|
+ return st
|
|
|
},
|
|
|
getDisplayStatusText() {
|
|
|
const map = {
|
|
|
pending: '待支付',
|
|
|
paid: '待发货',
|
|
|
- shipped: '待收货',
|
|
|
+ pending_receipt: '待收货',
|
|
|
completed: '已完成',
|
|
|
+ pending_refund: '待退款',
|
|
|
refunding: '退款中',
|
|
|
+ refund_pending: '退款中',
|
|
|
refunded: '已退款',
|
|
|
cancelled: '已取消',
|
|
|
'refund-rejected': '退款驳回'
|
|
|
@@ -439,6 +447,9 @@ export default {
|
|
|
.order-status-section .status-pending { background: linear-gradient(135deg, $brand-primary, $brand-primary-light); }
|
|
|
.order-status-section .status-paid { background: linear-gradient(135deg, $status-info-deep-2, $status-info-light); }
|
|
|
.order-status-section .status-shipped { background: linear-gradient(135deg, $status-info-deep-2, $status-info-light); }
|
|
|
+.order-status-section .status-pending_receipt { background: linear-gradient(135deg, $status-info-deep-2, $status-info-light); }
|
|
|
+.order-status-section .status-pending_refund { background: linear-gradient(135deg, $status-warning-deep, $status-warning); }
|
|
|
+.order-status-section .status-refund_pending { background: linear-gradient(135deg, $status-warning-deep, $status-warning); }
|
|
|
.order-status-section .status-completed { background: linear-gradient(135deg, $status-success-strong-2, #4ADE80); }
|
|
|
.order-status-section .status-refunding { background: linear-gradient(135deg, $status-warning-deep, $status-warning); }
|
|
|
.order-status-section .status-refunded { background: linear-gradient(135deg, $facade-text-slate, $facade-text-gray-400); }
|