This commit is contained in:
SelfRidicule 2024-03-05 20:07:13 +08:00
parent db1607bda2
commit 4256a6e21d
5 changed files with 57 additions and 7 deletions

View File

@ -64,4 +64,13 @@ export function calculateMeetingRoomAmountRq(data) {
method: "post", method: "post",
data data
}); });
}
// 提交会议预约
export function saveMeetingRecordRq(data) {
return request({
url: '/api/roomContent/saveMeetingRecord',
method: "post",
data
});
} }

View File

@ -1,11 +1,13 @@
const app = getApp() const app = getApp()
import Dialog from '@vant/weapp/dialog/dialog'; import Dialog from '@vant/weapp/dialog/dialog';
import Notify from '@vant/weapp/notify/notify';
import { import {
meetingRoomDetailRq, meetingRoomDetailRq,
getCustomerTicketRq, getCustomerTicketRq,
calculateMeetingRoomAmountRq calculateMeetingRoomAmountRq,
saveMeetingRecordRq
} from "../../../../api/meeting/meetingRoom.js" } from "../../../../api/meeting/meetingRoom.js"
import { import {
@ -103,6 +105,13 @@ Page({
}) })
}, },
// 主题修改监听
titleChange(event) {
this.setData({
title: event.detail
})
},
// 跳转-空间设施 // 跳转-空间设施
jumpMeetingFacilities() { jumpMeetingFacilities() {
let meetingRoomId = this.data.meetingRoomId; let meetingRoomId = this.data.meetingRoomId;
@ -147,8 +156,38 @@ Page({
// 提交订单 // 提交订单
submitCase() { submitCase() {
wx.redirectTo({ let _this = this
url: "/pages/meeting/pay/waitPay/waitPay", // 参数校验
if (!_this.data.title) {
// 错误提示
Notify({
type: 'danger',
message: '请输入会议主题!'
});
return;
}
saveMeetingRecordRq({
"roomContentId": _this.data.meetingRoomId,
"userId": _this.data.userData.id,
"ticketId": _this.data.couponId,
"customerId": _this.data.userData.icsCustomerId,
"title": _this.data.title,
"startTime": _this.data.startTime,
"endDate": _this.data.endTime,
"orderMoney": _this.data.totalAmount,
}).then(res => {
console.log('saveMeetingRecordRq', res);
if (res.code == 0) {
wx.redirectTo({
url: "/pages/meeting/pay/waitPay/waitPay",
})
} else {
// 错误提示
Notify({
type: 'danger',
message: res.msg
});
}
}) })
}, },

View File

@ -2,7 +2,8 @@
"usingComponents": { "usingComponents": {
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"van-field": "@vant/weapp/field/index", "van-field": "@vant/weapp/field/index",
"van-dialog": "@vant/weapp/dialog/index" "van-dialog": "@vant/weapp/dialog/index",
"van-notify": "@vant/weapp/notify/index"
}, },
"navigationBarTitleText": "预约信息" "navigationBarTitleText": "预约信息"
} }

View File

@ -44,7 +44,7 @@
<view class="itemView"> <view class="itemView">
<view class="label">会议主题</view> <view class="label">会议主题</view>
<view class="content"> <view class="content">
<van-field value="{{ username3 }}" placeholder="请输入会议主题" input-align="right" border="{{ false }}" /> <van-field value="{{ title }}" placeholder="请输入会议主题" input-align="right" border="{{ false }}" bind:change="titleChange"/>
</view> </view>
</view> </view>
<view class="itemView" bind:tap="jumpMeetingFacilities"> <view class="itemView" bind:tap="jumpMeetingFacilities">
@ -87,5 +87,6 @@
<!-- 提示 --> <!-- 提示 -->
<van-dialog id="van-dialog" /> <van-dialog id="van-dialog" />
<!-- 提示 -->
<van-notify id="van-notify" />
</view> </view>

View File

@ -21,7 +21,7 @@
padding: 10rpx 40rpx; padding: 10rpx 40rpx;
border-top-right-radius: 6rpx; border-top-right-radius: 6rpx;
border-bottom-right-radius: 6rpx; border-bottom-right-radius: 6rpx;
z-index: 999; z-index: 1;
} }
.swiper-box { .swiper-box {