【订单】 优化# 去掉实付金额以及用户可预约半小时后时间段的服务

dev1.0
kaeery 2025-03-12 12:06:39 +08:00
parent 338c08442a
commit 8522757d3f
7 changed files with 59 additions and 42 deletions

View File

@ -130,8 +130,8 @@ const handleTimeSlot = (timeSlot: TimeSlotObj[]) => {
const startTime = time.getHours() + '' + (min <= 9 ? '0' + min : min) // 1030 --> 1030 const startTime = time.getHours() + '' + (min <= 9 ? '0' + min : min) // 1030 --> 1030
timeSlot.forEach(item => { timeSlot.forEach(item => {
const end = item.endTime.replace(':', '') const end = item.endTime.replace(':', '')
// //
item.disabled = Number(startTime) + 300 >= Number(end) item.disabled = Number(startTime) + 50 >= Number(end)
// console.log("startTime: " + startTime); // console.log("startTime: " + startTime);
// console.log("end: " + end); // console.log("end: " + end);
}) })

View File

@ -21,12 +21,12 @@
{{ orderInfo.appointTimeStart }} - {{ orderInfo.appointTimeEnd }} {{ orderInfo.appointTimeStart }} - {{ orderInfo.appointTimeEnd }}
</view> </view>
<view class="appointTitle mt-[16rpx]"></view> <view class="appointTitle mt-[16rpx]"></view>
<view class="mt-[16rpx]"> <!-- <view class="mt-[16rpx]">
实付金额: 实付金额:
<text class="text-[#f36161] text-base pl-1.5"> <text class="text-[#f36161] text-base pl-1.5">
¥{{ orderInfo.orderAmount }} ¥{{ orderInfo.orderAmount }}
</text> </text>
</view> </view> -->
</view> </view>
</view> </view>

View File

@ -84,14 +84,14 @@
<view>服务金额</view> <view>服务金额</view>
<view>¥{{ orderData.orderAmount }}</view> <view>¥{{ orderData.orderAmount }}</view>
</view> </view>
<view class="mt-[30rpx] flex justify-between" v-if="isUseCoupon"> <!-- <view class="mt-[30rpx] flex justify-between" v-if="isUseCoupon">
<view>抵扣金额</view> <view>抵扣金额</view>
<view class="text-primary">¥{{ orderData.deductionMoney }}</view> <view class="text-primary">¥{{ orderData.deductionMoney }}</view>
</view> </view>
<view class="mt-[30rpx] flex justify-between"> <view class="mt-[30rpx] flex justify-between">
<view>实付金额</view> <view>实付金额</view>
<view class="text-primary">¥{{ orderData.orderAmount }}</view> <view class="text-primary">¥{{ orderData.orderAmount }}</view>
</view> </view> -->
</view> </view>
<!-- 备注 --> <!-- 备注 -->
@ -106,10 +106,10 @@
<view>订单编号</view> <view>订单编号</view>
<view>{{ orderData.sn }}</view> <view>{{ orderData.sn }}</view>
</view> </view>
<view class="mt-[30rpx] flex justify-between"> <!-- <view class="mt-[30rpx] flex justify-between">
<view>支付方式</view> <view>支付方式</view>
<view>{{ orderData.payWayName }}</view> <view>{{ orderData.payWayName }}</view>
</view> </view> -->
<view class="mt-[30rpx] flex justify-between"> <view class="mt-[30rpx] flex justify-between">
<view>下单时间</view> <view>下单时间</view>
<view>{{ orderData.createTime }}</view> <view>{{ orderData.createTime }}</view>

View File

@ -2,7 +2,17 @@
<view class="container bg-white"> <view class="container bg-white">
<u-navbar :is-back="false" title="" class="flex">
<!-- #ifdef MP -->
<view class="navbar mp_navbar flex ml-[20rpx] pl-[20rpx]" @click="goPage('/bundle/pages/search/index')">
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="navbar h5_navbar flex ml-[20rpx] pl-[20rpx]" @click="goPage('/bundle/pages/search/index')">
<!-- #endif -->
<u-icon name="search" size="34" color="#888888"></u-icon>
<text class="flex items-center ml-[20rpx]">请输入关键词搜索</text>
</view>
</u-navbar>
<view class="flex main"> <view class="flex main">
<view class="content"> <view class="content">
@ -17,16 +27,16 @@
<z-paging ref="paging" v-model="categoryData" @query="queryList" :fixed="false" height="100%" :loading-more-enabled="false"> <z-paging ref="paging" v-model="categoryData" @query="queryList" :fixed="false" height="100%" :loading-more-enabled="false">
<!-- Content Start --> <!-- Content Start -->
<view class="content-box"> <view class="content-box">
<block v-for="(item2, index2) in categoryData" :key="item2.id"> <block v-for="(item2, index2) in categoryData" :key="item2.id">
<template v-if="index2 == current && !item2?.sons?.length"> <template v-if="index2 == current && !item2?.sons?.length">
<cate-card :param="item2"></cate-card> <cate-card :param="item2"></cate-card>
</template> </template>
<template v-if="index2 == current && item2?.sons?.length"> <template v-if="index2 == current && item2?.sons?.length">
<block v-for="(item3, index3) in item2.sons" :key="item3.id"> <block v-for="(item3, index3) in item2.sons" :key="item3.id">
<cate-card :param="item3" :pid="item2.id"></cate-card> <cate-card :param="item3" :pid="item2.id"></cate-card>
</block> </block>
</template> </template>
</block> </block>
</view> </view>
<!-- Content End --> <!-- Content End -->
</z-paging> </z-paging>
@ -51,7 +61,7 @@ import { onLoad } from "@dcloudio/uni-app"
const categoryData = ref<Array<any>>([]) const categoryData = ref<Array<any>>([])
const current = ref<number | null>(0) const current = ref<number | null>(0)
const paging = shallowRef() const paging = shallowRef()
const categoryId=ref('') let categoryId=ref('')
const queryList = async (pageNo: number, pageSize: number) => { const queryList = async (pageNo: number, pageSize: number) => {
try { try {

View File

@ -19,13 +19,13 @@
<view class="mt-[16rpx]"> <view class="mt-[16rpx]">
预约时间: {{ orderInfo.appointTime }} {{ orderInfo.weekDay }} 预约时间: {{ orderInfo.appointTime }} {{ orderInfo.weekDay }}
</view> </view>
<view class="mt-[16rpx]" v-if="orderInfo.orderStatus == 0"> <!-- <view class="mt-[16rpx]" v-if="orderInfo.orderStatus == 0">
待付金额: 待付金额:
<text class="text-[#f36161] text-base pl-1.5"> <text class="text-[#f36161] text-base pl-1.5">
¥{{ orderInfo.orderAmount }} ¥{{ orderInfo.orderAmount }}
</text> </text>
</view> </view> -->
<view class="mt-[16rpx]" v-if="orderInfo.orderStatus == 1"> <!-- <view class="mt-[16rpx]" v-if="orderInfo.orderStatus == 1">
实付金额: 实付金额:
<text class="text-[#f36161] text-base pl-1.5"> <text class="text-[#f36161] text-base pl-1.5">
¥{{ orderInfo.orderAmount }} ¥{{ orderInfo.orderAmount }}
@ -48,7 +48,7 @@
<text class="text-[#f36161] text-base pl-1.5"> <text class="text-[#f36161] text-base pl-1.5">
¥{{ orderInfo.orderAmount }} ¥{{ orderInfo.orderAmount }}
</text> </text>
</view> </view> -->
</view> </view>
</view> </view>

View File

@ -97,25 +97,31 @@
</view> </view>
<!-- 服务金额 --> <!-- 服务金额 -->
<view class="card flex justify-between normal text-base"> <!-- <view class="card flex justify-between normal text-base">
<view class="font-medium">服务金额</view> <view class="font-medium">服务金额</view>
<view>{{ `¥${orderData.totalPrice}` }}</view> <view>{{ `¥${orderData.totalPrice}` }}</view>
</view> </view> -->
<!-- Main End --> <!-- Main End -->
<!-- Footer Start --> <!-- Footer Start -->
<view class="footer flex justify-between items-center"> <view class="footer flex flex-col gap-[12rpx]">
<view class="text-primary"> <view class="text-warning flex items-center gap-[8rpx]">
<u-icon name="info-circle" size="34" color="#f9ae3d"></u-icon>
最终价格需与服务人员当面确认平台不代收费用
</view>
<view class="flex justify-between items-center">
<!-- <view class="text-primary">
<text class="text-base">需支付¥</text> <text class="text-base">需支付¥</text>
<text class="font-medium text-4xl">{{ computeOrderTotalPrice }}</text> <text class="font-medium text-4xl">{{ computeOrderTotalPrice }}</text>
</view> </view> -->
<view class="btn"> <view class="btn">
<button <button
class="custom-button-bgColor text-lg text-white leading-[80rpx] h-[80rpx]" class="custom-button-bgColor text-lg text-white leading-[80rpx] h-[80rpx]"
@tap="onSubmitOrder" @tap="onSubmitOrder"
> >
提交订单 提交订单
</button> </button>
</view>
</view> </view>
</view> </view>
@ -376,7 +382,7 @@ onLoad(async (options: any) => {
payState.showCheck = true payState.showCheck = true
} }
// //
getCouponMaxMoney() // getCouponMaxMoney()
uni.$on('resetAddress', event => { uni.$on('resetAddress', event => {
console.log(event) console.log(event)
@ -438,7 +444,8 @@ onLoad(async (options: any) => {
padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx); padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
.btn { .btn {
width: 320rpx; // width: 320rpx;
width: 100%;
height: 100%; height: 100%;
} }
} }

View File

@ -115,7 +115,7 @@
<view>服务金额</view> <view>服务金额</view>
<view>¥{{ orderData.totalAmount }}</view> <view>¥{{ orderData.totalAmount }}</view>
</view> </view>
<view class="mt-[30rpx] flex justify-between" v-if="orderData.orderStatus == 0"> <!-- <view class="mt-[30rpx] flex justify-between" v-if="orderData.orderStatus == 0">
<view>待付金额</view> <view>待付金额</view>
<view class="text-primary">¥{{ orderData.orderAmount }}</view> <view class="text-primary">¥{{ orderData.orderAmount }}</view>
</view> </view>
@ -138,7 +138,7 @@
<view class="mt-[30rpx] flex justify-between" v-if="orderData.orderStatus == 4"> <view class="mt-[30rpx] flex justify-between" v-if="orderData.orderStatus == 4">
<view>应付金额</view> <view>应付金额</view>
<view class="text-primary">¥{{ orderData.orderAmount }}</view> <view class="text-primary">¥{{ orderData.orderAmount }}</view>
</view> </view> -->
</view> </view>
<!-- 备注 --> <!-- 备注 -->
@ -153,10 +153,10 @@
<view>订单编号</view> <view>订单编号</view>
<view>{{ orderData.sn }}</view> <view>{{ orderData.sn }}</view>
</view> </view>
<view class="mt-[30rpx] flex justify-between"> <!-- <view class="mt-[30rpx] flex justify-between">
<view>支付方式</view> <view>支付方式</view>
<view>{{ orderData.payWayName }}</view> <view>{{ orderData.payWayName }}</view>
</view> </view> -->
<view class="mt-[30rpx] flex justify-between"> <view class="mt-[30rpx] flex justify-between">
<view>下单时间</view> <view>下单时间</view>
<view>{{ orderData.createTime }}</view> <view>{{ orderData.createTime }}</view>