文件
yjyf/yjyf-app/components/FeeDetailDrawer.vue
MiAn 48e54631b6 feat: 移除步梯搬运费,所有商品搬运费改为0元
- 清除所有商品的步梯搬运收费配置,floor_fee和free_floor全部置0
- 订单详情、服务详情页移除步梯搬运费相关显示项
- 提现规则调整为全部金额需后台审核,取消小额免审自动转账
- 新增师傅端收支账单明细页面,支持查看结算和提现记录
- 更新提现相关配置,降低最低提现金额至0.1元,取消提现次数限制
2026-11-30 10:49:05 +08:00

229 行
5.0 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">
<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(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>