This commit is contained in:
SelfRidicule 2024-06-27 14:55:40 +08:00
parent 1fb5419424
commit 4862a5b620
6 changed files with 64 additions and 16 deletions

View File

@ -170,3 +170,13 @@ export function queryServiceMsgRq(data) {
data
});
}
// 长阳-提交会议预约
export function saveChangyangMeetingRecordRq(data) {
return request({
url: '/api/roomContent/saveChangyangMeetingRecord',
method: "post",
data
});
}

View File

@ -7,7 +7,8 @@ import {
meetingRoomDetailRq,
getCustomerTicketRq,
calculateMeetingRoomAmountRq,
saveMeetingRecordRq
saveMeetingRecordRq,
saveChangyangMeetingRecordRq
} from "../../../../api/meeting/meetingRoom.js"
import {
@ -25,8 +26,6 @@ Page({
*/
data: {
IMG_NAME: app.IMG_NAME,
protocolFlag: true,
protocolTitle: '《会议室服务协议》',
meetingRoomId: null,
startTime: null,
endTime: null,
@ -35,7 +34,9 @@ Page({
bannerList: [],
room: {},
userData: {},
serviceList : [],
serviceList: [],
title: '',
personNum: '',
},
/**
@ -74,10 +75,16 @@ Page({
})
},
// 主题修改监听
titleChange(event) {
// input修改监听
inputChange(e) {
console.log('input change', e);
let _this = this
let name = e.currentTarget.dataset.name
let value = e.detail
let data = _this.data
data[name] = value
this.setData({
title: event.detail
...data
})
},
@ -103,16 +110,25 @@ Page({
});
return;
}
if (_this.data.personNum == '') {
// 错误提示
Notify({
type: 'danger',
message: '请输入参会人数!'
});
return;
}
saveMeetingRecordRq({
saveChangyangMeetingRecordRq({
"roomContentId": _this.data.meetingRoomId,
"userId": _this.data.userData.id,
"ticketId": _this.data.couponId,
"customerId": _this.data.userData.icsCustomerId,
"title": _this.data.title,
"personNum": _this.data.personNum,
"startTime": _this.data.startTime,
"endDate": _this.data.endTime,
"orderMoney": _this.data.totalAmount,
"orderMoney": 0,
"reservationServes" : _this.data.serviceList,
}).then(res => {
console.log('saveMeetingRecordRq', res);
if (res.code == 0) {

View File

@ -44,7 +44,13 @@
<view class="itemView">
<view class="label">会议主题</view>
<view class="content">
<van-field value="{{ title }}" placeholder="请输入会议主题" input-align="right" border="{{ false }}" bind:change="titleChange" />
<van-field value="{{ title }}" placeholder="请输入会议主题" clearable input-align="right" border="{{ false }}" data-name="title" bind:change="inputChange" />
</view>
</view>
<view class="itemView">
<view class="label">参会人数</view>
<view class="content">
<van-field value="{{ personNum }}" placeholder="请输入参会人数" type="number" clearable input-align="right" border="{{ false }}" data-name="personNum" bind:change="inputChange" />
</view>
</view>
<view class="itemView" bind:tap="jumpMeetingFacilities">

View File

@ -1,5 +1,7 @@
const app = getApp()
import Notify from '@vant/weapp/notify/notify';
import {
getMeetingRoomServiceAndEquipmentRq,
queryServiceMsgRq
@ -108,6 +110,18 @@ Page({
// 确定
submit() {
let _this = this;
let serviceList = _this.data.serviceList
for (let i = 0; i < serviceList.length; i++) {
if (serviceList[i].isSelect && serviceList[i].num == '') {
// 错误提示
Notify({
type: 'danger',
message: `"${serviceList[i].serveName}"请输入人数!`
});
return;
}
}
//
let pages = getCurrentPages(); //获取page
let prevPage = pages[pages.length - 2]; //上一个页面(父页面)
prevPage.setData({

View File

@ -3,7 +3,8 @@
"van-icon": "@vant/weapp/icon/index",
"van-checkbox": "@vant/weapp/checkbox/index",
"van-checkbox-group": "@vant/weapp/checkbox-group/index",
"van-field": "@vant/weapp/field/index"
"van-field": "@vant/weapp/field/index",
"van-notify": "@vant/weapp/notify/index"
},
"navigationBarTitleText": "会议服务"
}

View File

@ -19,5 +19,6 @@
<view class="submitBtn" bind:tap="submit">确定</view>
<!-- 提示 -->
<van-notify id="van-notify" />
</view>