diff --git a/miniprogram/api/meeting/exhibition.js b/miniprogram/api/meeting/exhibition.js index b7e60f8..33c20b0 100644 --- a/miniprogram/api/meeting/exhibition.js +++ b/miniprogram/api/meeting/exhibition.js @@ -64,4 +64,12 @@ export function selectShowroomRecordRq(data) { method: "post", data }); +} + +// 查询展厅预约详情 +export function selectShowroomRecordByIdRq(id) { + return request({ + url: '/api/showroom/selectShowroomRecordById/' + id, + method: "get", + }); } \ No newline at end of file diff --git a/miniprogram/app.json b/miniprogram/app.json index 0067a89..bf450c0 100644 --- a/miniprogram/app.json +++ b/miniprogram/app.json @@ -70,7 +70,8 @@ "pages/meeting/exhibition/detail/detail", "pages/meeting/exhibition/booked/booked", "pages/meeting/exhibition/order/order", - "pages/meeting/reservationRecord/exhibitionRecord/list/list" + "pages/meeting/reservationRecord/exhibitionRecord/list/list", + "pages/meeting/reservationRecord/exhibitionRecord/detail/detail" ], "window": { "backgroundTextStyle": "light", diff --git a/miniprogram/pages/meeting/exhibition/order/order.wxml b/miniprogram/pages/meeting/exhibition/order/order.wxml index fc8fd4b..3ba08b5 100644 --- a/miniprogram/pages/meeting/exhibition/order/order.wxml +++ b/miniprogram/pages/meeting/exhibition/order/order.wxml @@ -53,7 +53,7 @@ - + {{item.name}} {{item.job}} {{item.phone ? item.phone : '-'}} diff --git a/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/detail/detail.js b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/detail/detail.js new file mode 100644 index 0000000..1cce389 --- /dev/null +++ b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/detail/detail.js @@ -0,0 +1,122 @@ +const app = getApp() + + +import { + selfFormatTimeYMD, + selfFormatTimeHM, + twoTimeIntervalReturnHours, + twoTimeInterval +} from "../../../../../utils/util.js" + +import { + selectShowroomRecordByIdRq +} from "../../../../../api/meeting/exhibition.js" + +Page({ + + /** + * 页面的初始数据 + */ + data: { + IMG_NAME: app.IMG_NAME, + id: null, + detail: null, + personList: [], + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + let _this = this; + _this.setData({ + ...options + }) + // 获取详情 + _this.getDetail(); + }, + + // 获取详情 + getDetail() { + let _this = this; + let id = _this.data.id; + selectShowroomRecordByIdRq(id).then(res => { + let detail = res.data; + // 时间段 + detail.timeSlot = selfFormatTimeYMD(detail.startTime) + ' ' + selfFormatTimeHM(detail.startTime) + '~' + selfFormatTimeHM(detail.endDate); + // 合计时间 + detail.countTime = twoTimeInterval(detail.startTime, detail.endDate) + // 颜色 + let color = "#3794FF" + if (detail.status == 0) { // 待审核 + color = "#3794FF" + } else if (detail.status == 1) { // 审核通过 + color = "#62c855" + } else if (detail.status == 2) { // 审核驳回 + color = "red" + } + detail.statusColor = color; + // persons + let persons = detail.persons; + let personList = [] + if (persons) { + personList = JSON.parse(persons); + } + // + _this.setData({ + detail, + personList, + }) + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage(e) { + console.log('onShareAppMessage', e); + } + +}) \ No newline at end of file diff --git a/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/detail/detail.json b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/detail/detail.json new file mode 100644 index 0000000..12175c8 --- /dev/null +++ b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/detail/detail.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "展厅预约详情" +} \ No newline at end of file diff --git a/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/detail/detail.wxml b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/detail/detail.wxml new file mode 100644 index 0000000..9d47039 --- /dev/null +++ b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/detail/detail.wxml @@ -0,0 +1,84 @@ + + + + + + + {{detail.capacityNum}}人间 | {{detail.roomName}} | {{detail.buildingName}} + {{detail.title}} + {{detail.timeSlot}} + + + ¥免费 + + + + + + + 基本信息 + + 展厅时间 + {{detail.timeSlot}} 共计{{detail.countTime}} + + + 展厅主题 + {{detail.title}} + + + 展厅预约人 + {{detail.userName}} + + + 联系方式 + {{detail.userPhone}} + + + 来参观人员 + + + + + + {{item.name}} + {{item.job}} + {{item.phone ? item.phone : '-'}} + + + + + 参观目的 + {{detail.visitTypeName}} + + + 讲解需求 + {{detail.explainNeedType ? '是' : '否'}} + + + 是否需要会议室 + {{detail.meetingNeedType ? '是' : '否'}} + + + 摄影需求 + {{detail.photographType ? '是' : '否'}} + + + 备注 + {{detail.remake ? detail.remake : ''}} + + + 详细信息 + + 展厅状态 + {{detail.statusName}} + + + 展厅编号 + {{detail.reservationNumber}} + + + 创建时间 + {{detail.createTime}} + + + \ No newline at end of file diff --git a/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/detail/detail.wxss b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/detail/detail.wxss new file mode 100644 index 0000000..bc0b306 --- /dev/null +++ b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/detail/detail.wxss @@ -0,0 +1,123 @@ +.containerView.public { + padding-bottom: 200rpx; +} + +.itemView { + padding: 0 20rpx; +} + +.itemView .contentView { + box-sizing: border-box; + border-radius: 10rpx; + width: 100%; + margin-top: 20rpx; + padding: 30rpx 20rpx; + display: flex; + justify-content: flex-start; + align-items: center; + background: #f2f2f2; +} + +.itemView .contentView .img { + border-radius: 10rpx; + width: 200rpx; + height: 110rpx; +} + +.itemView .contentView .msgView { + flex: 1; + margin: 0 20rpx; + word-break: break-all; +} + +.itemView .contentView .msgView .title { + font-size: 28rpx; +} + +.itemView .contentView .msgView .name, +.itemView .contentView .msgView .time { + font-size: 24rpx; + color: gray; + margin-top: 6rpx; +} + +.itemView .contentView .priceView { + text-align: right; +} + +.itemView .contentView .priceView .price { + font-size: 28rpx; + font-weight: bold; + color: red; +} + +.itemView .contentView .priceView .unit { + font-size: 28rpx; + color: #c3c3c3; +} + + +.basicView {} + +.basicView .labelTitle { + margin: 40rpx 20rpx; + font-size: 32rpx; +} + +.basicView .cellView { + border-bottom: 1px solid rgb(126, 126, 126, 0.2); + display: flex; + justify-content: space-between; + align-items: flex-start; + padding: 30rpx 20rpx; + word-break: break-all; +} + +.basicView .cellView.grayBg { + background: #F9FAFB; + padding: 10rpx 20rpx; +} + +.basicView .cellView .label { + font-size: 28rpx; + min-width: 180rpx; +} + +.basicView .cellView .content { + font-size: 26rpx; +} + +.basicView .cellView .content.payMoney { + font-size: 28rpx; + font-weight: bold; + color: red; +} + +.basicView .cellView .content.status { + color: #4e96f8; +} + + + +.personView { + width: 100%; + font-size: 26rpx; +} + + +.personView .item { + display: flex; + justify-content: flex-start; + align-items: center; + padding: 20rpx 0; + border-bottom: 1px solid white; +} + +.personView .item:last-of-type { + border-bottom: none; +} + +.personView .item .data { + flex: 1; + text-align: center; +} \ No newline at end of file diff --git a/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.js b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.js index d44d1a7..890b33d 100644 --- a/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.js +++ b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.js @@ -91,11 +91,10 @@ Page({ console.log('goDetail', e); let id = e.currentTarget.dataset.id wx.navigateTo({ - url: '/pages/meeting/visitorIinvitation/detail/detail' + url: '/pages/meeting/reservationRecord/exhibitionRecord/detail/detail?id=' + id }) }, - /** * 生命周期函数--监听页面初次渲染完成 */