- 升级系统版本至1.0.100 - 新增订单详情页物流、资质等信息展示 - 优化师傅报价页收益计算与显示 - 新增企业资质管理模块 - 优化后台标签页管理与交互 - 修复标签解析与地址脱敏问题 - 优化预约时段选择逻辑 - 调整服务类型配置界面布局
235 行
5.2 KiB
Vue
235 行
5.2 KiB
Vue
<template>
|
||
<view class="drawer-mask" v-if="visible" @tap="close">
|
||
<view class="drawer-sheet" @tap.stop>
|
||
<!-- 标题栏(1:1 复刻 frame_006:左对齐“费用明细”,右侧关闭叉) -->
|
||
<view class="drawer-head">
|
||
<text class="dh-title">费用明细</text>
|
||
<view class="dh-close clickable-hover" @tap="close">
|
||
<image class="dh-close-img" src="/static/icons/close.svg" mode="aspectFit" />
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 费用明细列表(1:1 复刻 frame_006) -->
|
||
<view class="drawer-body">
|
||
<template v-if="priceType === 'custom'">
|
||
<view class="fee-row">
|
||
<text class="fee-label">我的意向出价</text>
|
||
<text class="fee-value">¥{{ fmt(baseAmount) }}</text>
|
||
</view>
|
||
</template>
|
||
<template v-else>
|
||
<!-- 商品基础费 -->
|
||
<view class="fee-row">
|
||
<text class="fee-label">商品基础费</text>
|
||
<text class="fee-value">¥{{ fmt(baseAmount) }}</text>
|
||
</view>
|
||
|
||
<!-- 增项服务 -->
|
||
<view class="fee-row" v-if="Number(addonAmount) > 0">
|
||
<text class="fee-label">增项服务费</text>
|
||
<text class="fee-value">¥{{ fmt(addonAmount) }}</text>
|
||
</view>
|
||
|
||
<!-- 楼层上楼费 -->
|
||
<view class="fee-row" v-if="Number(floorAmount) > 0">
|
||
<text class="fee-label">步梯搬运费</text>
|
||
<text class="fee-value">¥{{ fmt(floorAmount) }}</text>
|
||
</view>
|
||
|
||
<!-- 加急费 -->
|
||
<view class="fee-row" v-if="Number(urgentAmount) > 0">
|
||
<text class="fee-label">加急服务费</text>
|
||
<text class="fee-value">¥{{ fmt(urgentAmount) }}</text>
|
||
</view>
|
||
|
||
<!-- 优惠券抵扣(红底白字“券”徽章 + 红色负值,1:1 复刻 frame_006) -->
|
||
<view class="fee-row" v-if="Number(discountAmount) > 0">
|
||
<view class="coupon-label-wrap">
|
||
<view class="quan-badge">券</view>
|
||
<text class="fee-label">优惠券</text>
|
||
</view>
|
||
<text class="fee-value discount">- ¥{{ fmt(discountAmount) }}</text>
|
||
</view>
|
||
</template>
|
||
|
||
<!-- 应付合计高亮行 -->
|
||
<view class="fee-divider"></view>
|
||
<view class="fee-row total-row">
|
||
<text class="fee-label total-label">应付合计</text>
|
||
<text class="fee-value total-value">¥{{ fmt(payAmount) }}</text>
|
||
</view>
|
||
<view class="fee-guarantee-tip">
|
||
<image class="fgt-ico" src="/static/icons/home-guarantee.svg" mode="aspectFit" />
|
||
<text class="fgt-txt">平台明码标价,资金全程托管保障,无师傅私下加价</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script setup>
|
||
defineProps({
|
||
visible: { type: Boolean, default: false },
|
||
priceType: { type: String, default: 'fixed' },
|
||
baseAmount: { type: [Number, String], default: '0.00' },
|
||
addonAmount: { type: [Number, String], default: '0.00' },
|
||
floorAmount: { type: [Number, String], default: '0.00' },
|
||
urgentAmount: { type: [Number, String], default: '0.00' },
|
||
discountAmount: { type: [Number, String], default: '0.00' },
|
||
payAmount: { type: [Number, String], default: '0.00' }
|
||
});
|
||
|
||
const emit = defineEmits(['update:visible']);
|
||
|
||
function fmt(val) {
|
||
const num = Number(val);
|
||
return (isNaN(num) ? 0 : num).toFixed(2);
|
||
}
|
||
|
||
function close() {
|
||
emit('update:visible', false);
|
||
}
|
||
</script>
|
||
|
||
<style scoped>
|
||
.drawer-mask {
|
||
position: fixed;
|
||
inset: 0;
|
||
background: rgba(0, 0, 0, 0.55);
|
||
z-index: 999;
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
.drawer-sheet {
|
||
background: #FFFFFF;
|
||
border-top-left-radius: 24rpx;
|
||
border-top-right-radius: 24rpx;
|
||
padding: 32rpx 32rpx calc(48rpx + env(safe-area-inset-bottom));
|
||
display: flex;
|
||
flex-direction: column;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.drawer-head {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding-bottom: 24rpx;
|
||
}
|
||
|
||
.dh-title {
|
||
font-size: 32rpx;
|
||
font-weight: 700;
|
||
color: #1F1F1F;
|
||
}
|
||
|
||
.dh-close {
|
||
width: 56rpx;
|
||
height: 56rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
.dh-close-img {
|
||
width: 30rpx;
|
||
height: 30rpx;
|
||
opacity: 0.6;
|
||
}
|
||
|
||
.drawer-body {
|
||
padding: 8rpx 0;
|
||
}
|
||
|
||
.fee-row {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 22rpx 0;
|
||
}
|
||
|
||
.fee-label {
|
||
font-size: 30rpx;
|
||
color: #1F1F1F;
|
||
}
|
||
|
||
.fee-value {
|
||
font-size: 30rpx;
|
||
font-weight: 600;
|
||
color: #1F1F1F;
|
||
}
|
||
|
||
.coupon-label-wrap {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12rpx;
|
||
}
|
||
|
||
.quan-badge {
|
||
width: 36rpx;
|
||
height: 36rpx;
|
||
border-radius: 6rpx;
|
||
background: #E8331B;
|
||
color: #FFFFFF;
|
||
font-size: 22rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.fee-value.discount {
|
||
color: #E8331B;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.fee-divider {
|
||
height: 1rpx;
|
||
background: #F0F0F2;
|
||
margin: 16rpx 0;
|
||
}
|
||
|
||
.total-row {
|
||
padding-top: 10rpx;
|
||
}
|
||
|
||
.total-label {
|
||
font-size: 32rpx;
|
||
font-weight: 700;
|
||
color: #1F1F1F;
|
||
}
|
||
|
||
.total-value {
|
||
font-size: 36rpx;
|
||
font-weight: 700;
|
||
color: #F0710D;
|
||
}
|
||
|
||
.fee-guarantee-tip {
|
||
margin-top: 24rpx;
|
||
background: #FFF7F0;
|
||
border-radius: 12rpx;
|
||
padding: 14rpx 20rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12rpx;
|
||
}
|
||
|
||
.fgt-ico {
|
||
width: 28rpx;
|
||
height: 28rpx;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.fgt-txt {
|
||
font-size: 22rpx;
|
||
color: #F0710D;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.clickable-hover:active {
|
||
opacity: 0.85;
|
||
}
|
||
</style>
|