Commit ff8f0844 by chenwq

```

feat(order): 新增订单详情页面及优化订单状态处理

- 新增订单详情页面(OrderDetailPage),包含订单概要和步骤展示
- 添加优惠券选择弹窗组件(OrderCouponSheetPopup)和核销确认弹窗(OrderCouponVerifyPopup)
- 创建订单详情步骤组件(OrderDetailSteps)显示支付、提车、过户、完成等状态
- 创建订单详情概要组件(OrderDetailSummary)展示订单基本信息
- 更新国际化文案,将"待付车款"统一改为"待支付"
- 注释掉原订单列表中的合同签署相关逻辑,调整跳转到统一详情页
- 移除拍卖订单页面中的合同签署按钮和警告文本

BREAKING CHANGE: 订单流程交互方式变更,合同签署功能暂时禁用
```
1 parent e21f635f
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
"auctionOrder": { "auctionOrder": {
"orderState": { "orderState": {
"CONTRACT_UNSIGNED": "待签署合同", "CONTRACT_UNSIGNED": "待签署合同",
"UNPAID": "待付车款", "UNPAID": "待支付",
"WAIT_PICKUP": "待提车", "WAIT_PICKUP": "待提车",
"TRANSFERRING": "待过户", "TRANSFERRING": "待过户",
"COMPLETED": "已完成", "COMPLETED": "已完成",
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
"PREVIEW": "预展中", "PREVIEW": "预展中",
"AUCTIONING": "拍卖中", "AUCTIONING": "拍卖中",
"CONTRACT_UNSIGNED": "待签署合同", "CONTRACT_UNSIGNED": "待签署合同",
"UNPAID": "待付车款", "UNPAID": "待支付",
"WAIT_PICKUP": "待提车", "WAIT_PICKUP": "待提车",
"TRANSFERRING": "待过户", "TRANSFERRING": "待过户",
"COMPLETED": "已完成", "COMPLETED": "已完成",
......
...@@ -55,14 +55,14 @@ ...@@ -55,14 +55,14 @@
</view> </view>
<view class="recharge-footer"> <view class="recharge-footer">
<view class="warning-text" v-if="order.orderState==='CONTRACT_UNSIGNED'"> <!-- <view class="warning-text" v-if="order.orderState==='CONTRACT_UNSIGNED'">
<template v-if="getRemainingBreachContract(order)>0"> <template v-if="getRemainingBreachContract(order)>0">
<van-count-down class="red-count-down" :time="getRemainingBreachContract(order)" format="HH:mm:ss 后将违约"/> <van-count-down class="red-count-down" :time="getRemainingBreachContract(order)" format="HH:mm:ss 后将违约"/>
</template> </template>
<template v-else> <template v-else>
请尽快签署合同并付款 请尽快签署合同并付款
</template> </template>
</view> </view> -->
<view class="warning-text" v-if="order.orderState==='UNPAID'"> <view class="warning-text" v-if="order.orderState==='UNPAID'">
<template v-if="getRemainingBreachContract(order)>0"> <template v-if="getRemainingBreachContract(order)>0">
<template v-if="order.auditState!=='UNAUDITED'"> <template v-if="order.auditState!=='UNAUDITED'">
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<van-button v-if="order.orderState!=='COMPLETED'&&order.orderState!=='CANCELED'" type="default" round @click="appealOrder(order)" size="small">申诉</van-button> <van-button v-if="order.orderState!=='COMPLETED'&&order.orderState!=='CANCELED'" type="default" round @click="appealOrder(order)" size="small">申诉</van-button>
<van-button v-if="order.orderState!=='CONTRACT_UNSIGNED'&&order.orderState!=='UNPAID'" type="default" round @click="contactService(order)" size="small">联系客服</van-button> <van-button v-if="order.orderState!=='CONTRACT_UNSIGNED'&&order.orderState!=='UNPAID'" type="default" round @click="contactService(order)" size="small">联系客服</van-button>
<van-button v-if="order.orderState==='CONTRACT_UNSIGNED'" type="primary" hairline round @click="viewAuctionOrder(order)" size="small">立即签署</van-button> <!-- <van-button v-if="order.orderState==='CONTRACT_UNSIGNED'" type="primary" hairline round @click="viewAuctionOrder(order)" size="small">立即签署</van-button> -->
<van-button v-if="order.orderState==='WAIT_PICKUP'" type="primary" hairline round @click="viewAuctionOrder(order)" size="small">确认提车</van-button> <van-button v-if="order.orderState==='WAIT_PICKUP'" type="primary" hairline round @click="viewAuctionOrder(order)" size="small">确认提车</van-button>
<van-button v-if="order.orderState==='TRANSFERRING'" type="primary" hairline round @click="viewAuctionOrder(order)" size="small"> <van-button v-if="order.orderState==='TRANSFERRING'" type="primary" hairline round @click="viewAuctionOrder(order)" size="small">
<template v-if="order.auditState==='REJECTED'"> <template v-if="order.auditState==='REJECTED'">
...@@ -199,32 +199,34 @@ export default class AuctionOrderPage extends PaginationComponent<AuctionOrder> ...@@ -199,32 +199,34 @@ export default class AuctionOrderPage extends PaginationComponent<AuctionOrder>
uni.navigateTo({url: '/module/order/appeal/ViewAppeal?orderId=' + order.orderId}); uni.navigateTo({url: '/module/order/appeal/ViewAppeal?orderId=' + order.orderId});
return; return;
} }
switch (order.orderState) {
case 'CONTRACT_UNSIGNED':
BurialPoint.burialPoint(this.$auth.getAuthentication(), 'auction_orderlist_sign_click', order.orderId.toString(), this.currentPath);
uni.navigateTo({url: '/module/order/contract/ContractPage?orderId=' + order.orderId});
break;
case 'COMPLETED':
uni.navigateTo({url: '/module/order/OrderComplete?orderId=' + order.orderId});
break;
case "UNPAID":
BurialPoint.burialPoint(this.$auth.getAuthentication(), 'auction_orderlist_pay_click', order.orderId.toString(), this.currentPath); BurialPoint.burialPoint(this.$auth.getAuthentication(), 'auction_orderlist_pay_click', order.orderId.toString(), this.currentPath);
uni.navigateTo({url: '/module/order/payment/PaymentPage?orderId=' + order.orderId}); uni.navigateTo({url: '/module/order/OrderDetailPage?orderId=' + order.orderId});
break; // switch (order.orderState) {
case "WAIT_PICKUP": // case 'CONTRACT_UNSIGNED':
BurialPoint.burialPoint(this.$auth.getAuthentication(), 'auction_orderlist_pickup_click', order.orderId.toString(), this.currentPath); // BurialPoint.burialPoint(this.$auth.getAuthentication(), 'auction_orderlist_sign_click', order.orderId.toString(), this.currentPath);
uni.navigateTo({url: '/module/order/pickup/PickUpVehiclePage?orderId=' + order.orderId}); // uni.navigateTo({url: '/module/order/contract/ContractPage?orderId=' + order.orderId});
break; // break;
case "TRANSFERRING": // case 'COMPLETED':
if (order.auditState === 'REJECTED') { // uni.navigateTo({url: '/module/order/OrderComplete?orderId=' + order.orderId});
BurialPoint.burialPoint(this.$auth.getAuthentication(), 'auction_orderlist_resubmit_click', order.orderId.toString(), this.currentPath); // break;
} // case "UNPAID":
uni.navigateTo({url: '/module/order/transfer/UploadTransferPage?orderId=' + order.orderId}); // BurialPoint.burialPoint(this.$auth.getAuthentication(), 'auction_orderlist_pay_click', order.orderId.toString(), this.currentPath);
break; // uni.navigateTo({url: '/module/order/payment/PaymentPage?orderId=' + order.orderId});
case "CANCELED": // break;
BurialPoint.burialPoint(this.$auth.getAuthentication(), 'auction_orderlist_cancelview_click', order.orderId.toString(), this.currentPath); // case "WAIT_PICKUP":
break; // BurialPoint.burialPoint(this.$auth.getAuthentication(), 'auction_orderlist_pickup_click', order.orderId.toString(), this.currentPath);
} // uni.navigateTo({url: '/module/order/pickup/PickUpVehiclePage?orderId=' + order.orderId});
// break;
// case "TRANSFERRING":
// if (order.auditState === 'REJECTED') {
// BurialPoint.burialPoint(this.$auth.getAuthentication(), 'auction_orderlist_resubmit_click', order.orderId.toString(), this.currentPath);
// }
// uni.navigateTo({url: '/module/order/transfer/UploadTransferPage?orderId=' + order.orderId});
// break;
// case "CANCELED":
// BurialPoint.burialPoint(this.$auth.getAuthentication(), 'auction_orderlist_cancelview_click', order.orderId.toString(), this.currentPath);
// break;
// }
} }
onSearch(): void { onSearch(): void {
......
<template>
<view class="order-detail-page">
<custom-nav-bar title="订单详情" :show-back="true" :status-bar-height="statusBarHeight"></custom-nav-bar>
<view class="order-detail-main" :style="{ paddingTop: statusBarHeight + 44 + 'px' }">
<order-detail-summary v-if="order" :order="order"></order-detail-summary>
<order-detail-steps v-if="order" :order="order"></order-detail-steps>
<order-payment-info-panel v-if="order" :order="order" :order-id="orderId"
@order-updated="onOrderUpdated"></order-payment-info-panel>
</view>
</view>
</template>
<script lang="ts">
import { Component, Vue } from "vue-facing-decorator";
import { onLoad } from "@dcloudio/uni-app";
import CustomNavBar from "@/components/CustomNavBar.vue";
import { AuctionOrderController } from "@/api/AuctionOrderController";
import { AuctionOrder } from "lib/src/entity/auction/entity/AuctionOrder";
import OrderDetailSummary from "@/module/order/detail/OrderDetailSummary.vue";
import OrderDetailSteps from "@/module/order/detail/OrderDetailSteps.vue";
import OrderPaymentInfoPanel from "@/module/order/detail/OrderPaymentInfoPanel.vue";
@Component({
components: {
CustomNavBar,
OrderDetailSummary,
OrderDetailSteps,
OrderPaymentInfoPanel,
},
})
export default class OrderDetailPage extends Vue {
orderId: number;
order: AuctionOrder = null;
statusBarHeight = 0;
created(): void {
onLoad((option) => {
this.statusBarHeight = uni.getWindowInfo().statusBarHeight;
this.orderId = Number(option.orderId);
this.loadData();
});
}
loadData(): void {
AuctionOrderController.getAuctionOrderDetailById(this.axios, this.orderId)
.then((res) => {
this.order = res.data;
})
.catch(() => {
uni.showToast({ title: "订单加载失败", icon: "none" });
});
}
onOrderUpdated(order: AuctionOrder): void {
this.order = order;
}
}
</script>
<style scoped lang="scss">
.order-detail-page {
min-height: 100vh;
background: #f5f7fb;
}
.order-detail-page :deep(.custom-nav) {
background: #fff;
}
.order-detail-main {
min-height: 100vh;
box-sizing: border-box;
padding-left: 12px;
padding-right: 12px;
padding-bottom: calc(116px + env(safe-area-inset-bottom));
}
</style>
<template>
<uni-popup ref="popup" class="contract-coupon-verify-popup" type="center" background-color="transparent"
mask-background-color="rgba(0,0,0,.55)" :mask-click="false" z-index="10002">
<view class="coupon-verify-dialog">
<image class="coupon-verify-dialog__illu" :src="illuSrc" mode="widthFix" />
<text class="coupon-verify-dialog__title">确认核销优惠券吗</text>
<view class="coupon-verify-dialog__btn coupon-verify-dialog__btn--outline"
:class="{ 'coupon-verify-dialog__btn--disabled': loading }" @click="$emit('dismiss')">
<text class="coupon-verify-dialog__btn-txt">不核销</text>
</view>
<view class="coupon-verify-dialog__btn coupon-verify-dialog__btn--primary"
:class="{ 'coupon-verify-dialog__btn--disabled': loading }" @click="$emit('confirm')">
<text class="coupon-verify-dialog__btn-txt coupon-verify-dialog__btn-txt--inv">{{
loading ? "核销中…" : "确认核销"
}}</text>
</view>
</view>
</uni-popup>
</template>
<script lang="ts">
import { Component, Prop, Ref, Vue } from "vue-facing-decorator";
@Component({})
export default class OrderCouponVerifyPopup extends Vue {
@Prop({ type: String, required: true })
illuSrc: string;
@Prop({ type: Boolean, required: false, default: false })
loading: boolean;
@Ref
popup: any;
open(): void {
this.popup?.open?.("center");
}
close(): void {
this.popup?.close?.();
}
}
</script>
<style scoped lang="scss">
.contract-coupon-verify-popup :deep(.uni-popup) {
z-index: 10002 !important;
}
.coupon-verify-dialog {
width: 296px;
max-width: 86vw;
padding: 24px 20px 20px;
background: #fff;
border-radius: 16px;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
}
.coupon-verify-dialog__illu {
width: 100px;
height: 100px;
margin-bottom: 16px;
}
.coupon-verify-dialog__title {
font-size: 16px;
font-weight: 600;
color: #323233;
margin-bottom: 22px;
text-align: center;
line-height: 1.35;
}
.coupon-verify-dialog__btn {
width: 100%;
border-radius: 24px;
padding: 12px 16px;
box-sizing: border-box;
text-align: center;
margin-bottom: 12px;
}
.coupon-verify-dialog__btn:last-of-type {
margin-bottom: 0;
}
.coupon-verify-dialog__btn-txt {
font-size: 15px;
font-weight: 500;
color: #323233;
}
.coupon-verify-dialog__btn-txt--inv {
color: #fff;
}
.coupon-verify-dialog__btn--outline {
background: #fff;
border-width: 1px;
border-style: solid;
border-color: #dcdee0;
}
.coupon-verify-dialog__btn--primary {
background: #185efe;
}
.coupon-verify-dialog__btn--disabled {
opacity: 0.55;
pointer-events: none;
}
</style>
<template>
<view class="progress-card" v-if="order">
<view class="steps-row">
<view v-for="(step, index) in steps" :key="step.key" class="step-item">
<view class="step-top">
<view class="step-circle" :class="{ 'step-circle--active': step.active }">
<text>{{ index + 1 }}</text>
</view>
<view v-if="index < steps.length - 1" class="step-line"></view>
</view>
<text class="step-label" :class="{ 'step-label--active': step.active }">{{ step.label }}</text>
</view>
</view>
</view>
</template>
<script lang="ts">
import { Component, Prop, Vue } from "vue-facing-decorator";
import { AuctionOrder } from "lib/src/entity/auction/entity/AuctionOrder";
@Component({})
export default class OrderDetailSteps extends Vue {
@Prop({ type: Object, required: true })
order: AuctionOrder;
get steps() {
const state = this.order?.orderState;
const activeIndex =
state === "WAIT_PICKUP" ? 1 :
state === "TRANSFERRING" ? 2 :
state === "COMPLETED" ? 3 : 0;
return [
{ key: "pay", label: "支付车款", active: activeIndex === 0 },
{ key: "pickup", label: "提车", active: activeIndex === 1 },
{ key: "transfer", label: "过户", active: activeIndex === 2 },
{ key: "done", label: "完成", active: activeIndex === 3 },
];
}
}
</script>
<style scoped lang="scss">
.progress-card {
margin-top: 12px;
padding: 16px 18px 12px;
background: #fff;
border-radius: 12px 12px 0 0;
border-bottom: 1px solid #f0f1f3;
box-sizing: border-box;
}
.steps-row {
display: flex;
}
.step-item {
flex: 1;
min-width: 0;
}
.step-top {
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.step-circle {
width: 24px;
height: 24px;
border-radius: 50%;
background: #f2f3f5;
color: #b0b5bd;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
flex-shrink: 0;
}
.step-circle--active {
background: #246bfe;
color: #fff;
}
.step-line {
position: absolute;
left: calc(50% + 18px);
width: calc(100% - 36px);
height: 1px;
background: #e4e7eb;
}
.step-label {
display: block;
margin-top: 8px;
font-size: 13px;
color: #a2a8b0;
line-height: 18px;
text-align: center;
}
.step-label--active {
color: #246bfe;
font-weight: 600;
}
</style>
<template>
<view class="order-summary-card" v-if="order">
<view class="order-summary-head">
<view class="order-code-row">
<text class="order-code-label">订单编号:</text>
<text class="order-code-value">{{ order.orderCode || order.orderId }}</text>
</view>
<text class="order-state-text">{{ orderStateText }}</text>
</view>
<view class="order-time-row">
<text>中拍时间:</text>
<text>{{ order.createTime }}</text>
</view>
<view class="vehicle-row">
<image class="vehicle-cover" :src="order.vehicle?.cover?.url" mode="aspectFill" />
<view class="vehicle-info">
<text class="vehicle-title">{{ vehicleTitle }}</text>
<text class="vehicle-meta">车架号:{{ vinText }}</text>
<text class="vehicle-meta">车源号:{{ sourceNoText }}</text>
</view>
</view>
</view>
</template>
<script lang="ts">
import { Component, Prop, Vue } from "vue-facing-decorator";
import { AuctionOrder } from "lib/src/entity/auction/entity/AuctionOrder";
@Component({})
export default class OrderDetailSummary extends Vue {
@Prop({ type: Object, required: true })
order: AuctionOrder;
get orderStateText(): string {
const state = this.order?.orderState;
if (state === "UNPAID") return "待支付";
if (state === "WAIT_PICKUP") return "待提车";
if (state === "TRANSFERRING") return "待过户";
if (state === "COMPLETED") return "已完成";
if (state === "CONTRACT_UNSIGNED") return "待签约";
return "待支付";
}
get vehicleTitle(): string {
const v = this.order?.vehicle;
if (!v) return "";
const city = v.ownership?.carCityName?.replace("市", "") ?? "";
const series = v.baseInfo?.carSeriesName ?? "";
const type = v.baseInfo?.carTypeName ?? "";
return `【${city}】${series} ${type}`.trim();
}
get vinText(): string {
return this.order?.vehicle?.baseInfo?.vin || "--";
}
get sourceNoText(): string {
return this.order?.vehicle?.baseInfo?.sourceNo || "--";
}
}
</script>
<style scoped lang="scss">
.order-summary-card {
margin-top: 12px;
padding: 16px;
background: linear-gradient(180deg, #edf4ff 0%, #fff 42%);
border-radius: 12px;
box-sizing: border-box;
}
.order-summary-head {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 4px;
}
.order-code-row {
display: flex;
align-items: center;
min-width: 0;
}
.order-code-label,
.order-code-value {
font-size: 16px;
color: #1f2933;
line-height: 22px;
}
.order-code-label {
font-weight: 600;
}
.order-state-text {
font-size: 14px;
color: #185efe;
flex-shrink: 0;
}
.order-time-row {
display: flex;
align-items: center;
font-size: 12px;
color: #8a9099;
line-height: 18px;
margin-bottom: 14px;
}
.vehicle-row {
display: flex;
align-items: center;
}
.vehicle-cover {
width: 132px;
height: 100px;
border-radius: 8px;
background: #f2f3f5;
flex-shrink: 0;
}
.vehicle-info {
flex: 1;
min-width: 0;
margin-left: 12px;
display: flex;
flex-direction: column;
}
.vehicle-title {
font-size: 15px;
font-weight: 600;
color: #111827;
line-height: 22px;
margin-bottom: 8px;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.vehicle-meta {
font-size: 12px;
color: #9aa0a6;
line-height: 20px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
...@@ -156,6 +156,13 @@ ...@@ -156,6 +156,13 @@
} }
}, },
{ {
"path": "OrderDetailPage",
"style": {
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "transfer/UploadTransferPage", "path": "transfer/UploadTransferPage",
"style": { "style": {
"navigationBarTitleText": "上传过户资料", "navigationBarTitleText": "上传过户资料",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!