文件
yjyf/yjyf-app/components/FeeDetailDrawer.vue
MiAn 0370cb9bd6 feat: 新增师傅入驻审核与接单状态联动功能
- 新增师傅资质审核模块及权限
- 未审核通过的师傅默认禁用接单状态
- 新增售后退款申诉功能与相关界面
- 新增用户钱包管理及充值功能
- 更新服务定价矩阵相关数据库结构
- 修复微信支付证书验证问题
2026-11-17 10:28:01 +08:00

221 行
4.8 KiB
Vue

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

<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">
<!-- 商品总价 -->
<view class="fee-row">
<text class="fee-label">商品总价</text>
<text class="fee-value">¥{{ baseAmount }}</text>
</view>
<!-- 增项服务 -->
<view class="fee-row" v-if="Number(addonAmount) > 0">
<text class="fee-label">增项服务费</text>
<text class="fee-value">¥{{ addonAmount }}</text>
</view>
<!-- 楼层上楼费 -->
<view class="fee-row" v-if="Number(floorAmount) > 0">
<text class="fee-label">步梯搬运费</text>
<text class="fee-value">¥{{ floorAmount }}</text>
</view>
<!-- 加急费 -->
<view class="fee-row" v-if="Number(urgentAmount) > 0">
<text class="fee-label">加急服务费</text>
<text class="fee-value">¥{{ 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">- ¥{{ discountAmount || '0.00' }}</text>
</view>
<!-- 应付合计高亮行 -->
<view class="fee-divider"></view>
<view class="fee-row total-row">
<text class="fee-label total-label">应付合计</text>
<text class="fee-value total-value">¥{{ payAmount || '0.00' }}</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 },
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 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>