This commit is contained in:
SelfRidicule 2024-03-13 10:45:28 +08:00
parent f3507b8a53
commit 7f26e31c50
8 changed files with 345 additions and 4 deletions

View File

@ -64,4 +64,12 @@ export function selectShowroomRecordRq(data) {
method: "post",
data
});
}
// 查询展厅预约详情
export function selectShowroomRecordByIdRq(id) {
return request({
url: '/api/showroom/selectShowroomRecordById/' + id,
method: "get",
});
}

View File

@ -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",

View File

@ -53,7 +53,7 @@
</view>
<view class="itemView grayBg" wx:if="{{personList.length > 0}}">
<view class="personView">
<view class="item" wx:for="{{personList}}">
<view class="item" wx:for="{{personList}}" wx:key="*this">
<view class="data">{{item.name}}</view>
<view class="data">{{item.job}}</view>
<view class="data">{{item.phone ? item.phone : '-'}}</view>

View File

@ -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);
}
})

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "展厅预约详情"
}

View File

@ -0,0 +1,84 @@
<view class="containerView public">
<!-- 展示区域 -->
<view class="itemView">
<view class="contentView">
<image class="img" src="{{IMG_NAME + detail.indoorPicUrl}}" mode="aspectFill"></image>
<view class="msgView">
<view class="title">{{detail.capacityNum}}人间 | {{detail.roomName}} | {{detail.buildingName}}</view>
<view class="name">{{detail.title}}</view>
<view class="time">{{detail.timeSlot}}</view>
</view>
<view class="priceView">
<view class="unit">¥免费</view>
</view>
</view>
</view>
<!-- 基本信息 -->
<view class="basicView">
<view class="labelTitle leftLineTitle">基本信息</view>
<view class="cellView">
<view class="label">展厅时间</view>
<view class="content">{{detail.timeSlot}} 共计{{detail.countTime}}</view>
</view>
<view class="cellView">
<view class="label">展厅主题</view>
<view class="content">{{detail.title}}</view>
</view>
<view class="cellView">
<view class="label">展厅预约人</view>
<view class="content">{{detail.userName}}</view>
</view>
<view class="cellView">
<view class="label">联系方式</view>
<view class="content">{{detail.userPhone}}</view>
</view>
<view class="cellView">
<view class="label">来参观人员</view>
<view class="content"></view>
</view>
<view class="cellView grayBg" wx:if="{{personList.length > 0}}">
<view class="personView">
<view class="item" wx:for="{{personList}}" wx:key="*this">
<view class="data">{{item.name}}</view>
<view class="data">{{item.job}}</view>
<view class="data">{{item.phone ? item.phone : '-'}}</view>
</view>
</view>
</view>
<view class="cellView">
<view class="label">参观目的</view>
<view class="content">{{detail.visitTypeName}}</view>
</view>
<view class="cellView">
<view class="label">讲解需求</view>
<view class="content">{{detail.explainNeedType ? '是' : '否'}}</view>
</view>
<view class="cellView">
<view class="label">是否需要会议室</view>
<view class="content">{{detail.meetingNeedType ? '是' : '否'}}</view>
</view>
<view class="cellView">
<view class="label">摄影需求</view>
<view class="content">{{detail.photographType ? '是' : '否'}}</view>
</view>
<view class="cellView">
<view class="label">备注</view>
<view class="content">{{detail.remake ? detail.remake : ''}}</view>
</view>
<view class="labelTitle leftLineTitle">详细信息</view>
<view class="cellView">
<view class="label">展厅状态</view>
<view class="content status" style="color: {{detail.statusColor}};">{{detail.statusName}}</view>
</view>
<view class="cellView">
<view class="label">展厅编号</view>
<view class="content">{{detail.reservationNumber}}</view>
</view>
<view class="cellView">
<view class="label">创建时间</view>
<view class="content">{{detail.createTime}}</view>
</view>
</view>
</view>

View File

@ -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;
}

View File

@ -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
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/