Commit 30914bf3 by chenwq

```

feat(order): 添加确认提车功能和相关组件

- 在AuctionOrderController中新增confirmPickup API方法用于确认提车
- 创建OrderPickupInfoPanel组件显示提车信息和随车资料
- 创建OrderPickupConfirmPopup弹窗组件用于确认提车操作
- 在订单详情页根据订单状态动态渲染提车信息面板
- 添加提车相关的样式文件和静态图片资源
```
1 parent 86397cd7
......@@ -48,6 +48,15 @@ export class AuctionOrderController {
}
/**
* 确认提车
* @param orderId
* @return AuctionOrder
*/
static confirmPickup(axios: AxiosStatic, orderId: number): Promise<AxiosResponse<AuctionOrder>> {
return axios.post('order/confirmPickup', null, {params: {orderId: orderId}});
}
/**
* 查询订单状态,用于轮循操作
* @param orderId
* @return AuctionOrder.OrderState
......
......@@ -4,7 +4,9 @@
<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-pickup-info-panel v-if="order && order.orderState === 'WAIT_PICKUP'" :order="order"
:order-id="orderId" @order-updated="onOrderUpdated"></order-pickup-info-panel>
<order-payment-info-panel v-else-if="order" :order="order" :order-id="orderId"
@order-updated="onOrderUpdated"></order-payment-info-panel>
</view>
</view>
......@@ -19,6 +21,7 @@ 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";
import OrderPickupInfoPanel from "@/module/order/detail/OrderPickupInfoPanel.vue";
@Component({
components: {
......@@ -26,6 +29,7 @@ import OrderPaymentInfoPanel from "@/module/order/detail/OrderPaymentInfoPanel.v
OrderDetailSummary,
OrderDetailSteps,
OrderPaymentInfoPanel,
OrderPickupInfoPanel,
},
})
export default class OrderDetailPage extends Vue {
......
<template>
<uni-popup ref="popup" class="pickup-confirm-popup" type="center" background-color="transparent"
mask-background-color="rgba(0,0,0,.55)" :mask-click="false" z-index="10002">
<view class="pickup-confirm-dialog">
<view class="pickup-confirm-close" @click="dismiss">
<text class="pickup-confirm-close__line pickup-confirm-close__line--left"></text>
<text class="pickup-confirm-close__line pickup-confirm-close__line--right"></text>
</view>
<image class="pickup-confirm-car" src="/static/images/order/bg_car.png" mode="aspectFit"></image>
<text class="pickup-confirm-title">请确认车辆交接</text>
<text class="pickup-confirm-desc">确认后订单进入「待过户」且不可撤销,请务必在现场完成车辆与随车资料核对。</text>
<view class="pickup-confirm-points">
<text class="pickup-confirm-points__title">交接要点:</text>
<text class="pickup-confirm-points__item">1.车辆已到店,可提</text>
<text class="pickup-confirm-points__item">2.随车资料与档案勾选结果一致(见上方核对区)</text>
<text class="pickup-confirm-points__item">3.确认即视为交接完成,无需评估师到场</text>
</view>
<view class="pickup-confirm-check" @click="toggleChecked">
<view class="pickup-confirm-checkbox" :class="{ 'pickup-confirm-checkbox--checked': checked }">
<text v-if="checked" class="pickup-confirm-checkbox__mark">✓</text>
</view>
<text class="pickup-confirm-check__text">我已现场核对车辆及随车资料齐全</text>
</view>
<view class="pickup-confirm-actions">
<view class="pickup-confirm-btn pickup-confirm-btn--cancel" :class="{ 'pickup-confirm-btn--disabled': loading }"
@click="dismiss">
<text>取消</text>
</view>
<view class="pickup-confirm-btn pickup-confirm-btn--primary"
:class="{ 'pickup-confirm-btn--disabled': loading || !checked }" @click="confirm">
<text>{{ loading ? "确认中..." : "确认提车" }}</text>
</view>
</view>
</view>
</uni-popup>
</template>
<script lang="ts">
import { Component, Prop, Ref, Vue, Watch } from "vue-facing-decorator";
@Component({})
export default class OrderPickupConfirmPopup extends Vue {
@Prop({ type: Boolean, required: false, default: false })
show: boolean;
@Prop({ type: Boolean, required: false, default: false })
loading: boolean;
@Ref
popup: any;
checked = false;
@Watch("show", { immediate: true })
onShowChanged(): void {
if (this.show) {
this.checked = false;
this.openPopupShell();
return;
}
this.closePopupShell();
}
dismiss(): void {
if (this.loading) return;
this.$emit("dismiss");
}
toggleChecked(): void {
if (this.loading) return;
this.checked = !this.checked;
}
confirm(): void {
if (this.loading || !this.checked) return;
this.$emit("confirm");
}
private openPopupShell(): void {
setTimeout(() => {
this.popup?.open?.("center");
}, 0);
}
private closePopupShell(): void {
this.popup?.close?.();
}
}
</script>
<style scoped lang="scss">
.pickup-confirm-popup :deep(.uni-popup) {
z-index: 10002 !important;
}
.pickup-confirm-dialog {
position: relative;
width: 317px;
height: 470px;
max-width: calc(100vw - 32px);
padding: 16px 15px 20px;
box-sizing: border-box;
border-radius: 12px;
background: #fff;
display: flex;
flex-direction: column;
align-items: center;
}
.pickup-confirm-close {
position: absolute;
top: 17px;
right: 17px;
width: 18px;
height: 18px;
}
.pickup-confirm-close__line {
position: absolute;
top: 8px;
left: 1px;
width: 18px;
height: 1.5px;
border-radius: 1px;
background: #999;
}
.pickup-confirm-close__line--left {
transform: rotate(45deg);
}
.pickup-confirm-close__line--right {
transform: rotate(-45deg);
}
.pickup-confirm-car {
width: 140px;
height: 100px;
margin-top: 6px;
flex-shrink: 0;
}
.pickup-confirm-title {
margin-top: 10px;
font-size: 22px;
line-height: 30px;
color: #141E34;
font-weight: 500;
text-align: center;
}
.pickup-confirm-desc {
width: 100%;
margin-top: 12px;
font-size: 14px;
color: #f47f13;
text-align: center;
}
.pickup-confirm-points {
width: 100%;
margin-top: 24px;
padding: 8px 12px;
border-radius: 8px;
background: #f8f8f8;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.pickup-confirm-points__title {
margin-bottom: 4px;
font-size: 14px;
line-height: 18px;
color: #000000E5;
}
.pickup-confirm-points__item {
font-size: 12px;
line-height: 20px;
color: #999;
}
.pickup-confirm-check {
width: 100%;
margin-top: 24px;
display: flex;
align-items: center;
justify-content: center;
}
.pickup-confirm-checkbox {
width: 18px;
height: 18px;
margin-right: 6px;
border: 2px solid #d8d8d8;
background: #fff;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
}
.pickup-confirm-checkbox--checked {
border-color: #2768ff;
background: #2768ff;
}
.pickup-confirm-checkbox__mark {
font-size: 14px;
line-height: 14px;
color: #fff;
font-weight: 600;
}
.pickup-confirm-check__text {
font-size: 14px;
line-height: 18px;
color: #000000E5;
}
.pickup-confirm-actions {
width: 100%;
margin-top: 16px;
display: flex;
align-items: center;
gap: 18px;
}
.pickup-confirm-btn {
height: 56px;
border-radius: 28px;
flex: 1;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.pickup-confirm-btn text {
font-size: 17px;
line-height: 24px;
font-weight: 600;
}
.pickup-confirm-btn--cancel {
background: #eaf2ff;
}
.pickup-confirm-btn--cancel text {
color: #185efe;
}
.pickup-confirm-btn--primary {
background: #2768ff;
}
.pickup-confirm-btn--primary text {
color: #fff;
}
.pickup-confirm-btn--disabled {
opacity: 0.5;
pointer-events: none;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!