描述:服务

This commit is contained in:
SelfRidicule 2024-06-27 12:00:33 +08:00
parent 288cc186b5
commit 1fb5419424
8 changed files with 362 additions and 220 deletions

View File

@ -1,109 +1,111 @@
{ {
"pages": [ "pages": [
"pages/index/index", "pages/index/index",
"pages/login/login", "pages/login/login",
"pages/login/wxlogin/wxlogin", "pages/login/wxlogin/wxlogin",
"pages/my/my", "pages/my/my",
"pages/community/community", "pages/community/community",
"pages/news/news", "pages/news/news",
"pages/index/detail/detail", "pages/index/detail/detail",
"pages/community/eventDetails/eventDetails", "pages/community/eventDetails/eventDetails",
"pages/enterpriseServices/enterpriseServices", "pages/enterpriseServices/enterpriseServices",
"pages/parkRepair/parkRepair", "pages/parkRepair/parkRepair",
"pages/enterpriseServices/serviceList/serviceList", "pages/enterpriseServices/serviceList/serviceList",
"pages/enterpriseServices/serviceDetail/serviceDetail", "pages/enterpriseServices/serviceDetail/serviceDetail",
"pages/community/registration/registration", "pages/community/registration/registration",
"pages/enterpriseServices/serviceApply/serviceApply", "pages/enterpriseServices/serviceApply/serviceApply",
"pages/parkRepair/repairDetail/repairDetail", "pages/parkRepair/repairDetail/repairDetail",
"pages/parkRepair/repairInApply/repairInApply", "pages/parkRepair/repairInApply/repairInApply",
"pages/enterpriseSelect/enterpriseSelect", "pages/enterpriseSelect/enterpriseSelect",
"pages/myActivities/myActivities", "pages/myActivities/myActivities",
"pages/parkRepair/evaluate/evaluate", "pages/parkRepair/evaluate/evaluate",
"pages/notice/notice", "pages/notice/notice",
"pages/notice/detail/detail", "pages/notice/detail/detail",
"pages/complaint/complaint", "pages/complaint/complaint",
"pages/complaint/newComplaint/newComplaint", "pages/complaint/newComplaint/newComplaint",
"pages/my/personalData/personalData", "pages/my/personalData/personalData",
"pages/my/cropper/cropper", "pages/my/cropper/cropper",
"pages/party/party", "pages/party/party",
"pages/party/detail/detail", "pages/party/detail/detail",
"pages/my/accountSetting/accountSetting", "pages/my/accountSetting/accountSetting",
"pages/my/changePassword/changePassword", "pages/my/changePassword/changePassword",
"pages/my/retrievePassword/retrievePassword", "pages/my/retrievePassword/retrievePassword",
"pages/my/companyInformation/companyInformation", "pages/my/companyInformation/companyInformation",
"pages/my/editCompanyProfile/editCompanyProfile", "pages/my/editCompanyProfile/editCompanyProfile",
"pages/my/order/order", "pages/my/order/order",
"pages/my/order/detail/detail", "pages/my/order/detail/detail",
"pages/my/order/applyRefund/applyRefund", "pages/my/order/applyRefund/applyRefund",
"pages/index/office/office", "pages/index/office/office",
"pages/index/office/detail/detail", "pages/index/office/detail/detail",
"pages/index/office/apply/apply", "pages/index/office/apply/apply",
"pages/index/parkList/parkList", "pages/index/parkList/parkList",
"pages/enterpriseServices/myServiceList/myServiceList", "pages/enterpriseServices/myServiceList/myServiceList",
"pages/applyType/settledIn/settledIn", "pages/applyType/settledIn/settledIn",
"pages/applyType/applyType", "pages/applyType/applyType",
"pages/applyType/settledInApproval/settledInApproval", "pages/applyType/settledInApproval/settledInApproval",
"pages/applyType/moveInApply/moveInApply", "pages/applyType/moveInApply/moveInApply",
"pages/my/serviceApply/serviceApply", "pages/my/serviceApply/serviceApply",
"pages/complaint/complaintDetail/complaintDetail", "pages/complaint/complaintDetail/complaintDetail",
"pages/outer/outer", "pages/outer/outer",
"pages/meeting/accessControl/accessControl", "pages/meeting/accessControl/accessControl",
"pages/meeting/accessControl/accessControlRecord/accessControlRecord", "pages/meeting/accessControl/accessControlRecord/accessControlRecord",
"pages/meeting/meetingReservation/meetingReservation", "pages/meeting/meetingReservation/meetingReservation",
"pages/meeting/meetingRoom/meetingRoom", "pages/meeting/meetingRoom/meetingRoom",
"pages/meeting/meetingRoom/meetingFacilities/meetingFacilities", "pages/meeting/meetingRoom/meetingFacilities/meetingFacilities",
"pages/meeting/meetingRoom/meetingOrder/meetingOrder", "pages/meeting/meetingRoom/meetingOrder/meetingOrder",
"pages/meeting/meetingRoom/meetingProtocol/meetingProtocol", "pages/meeting/meetingRoom/meetingProtocol/meetingProtocol",
"pages/meeting/meetingRoom/meetingCoupon/meetingCoupon", "pages/meeting/meetingRoom/meetingCoupon/meetingCoupon",
"pages/meeting/meetingRoom/meetingBooked/meetingBooked", "pages/meeting/meetingRoom/meetingBooked/meetingBooked",
"pages/meeting/pay/waitPay/waitPay", "pages/meeting/pay/waitPay/waitPay",
"pages/meeting/pay/waitComplete/waitComplete", "pages/meeting/pay/waitComplete/waitComplete",
"pages/meeting/reservationRecord/reservationRecord", "pages/meeting/reservationRecord/reservationRecord",
"pages/meeting/reservationRecord/meetingRecord/meetingRecord", "pages/meeting/reservationRecord/meetingRecord/meetingRecord",
"pages/meeting/reservationRecord/meetingRecord/meetingDetail/meetingDetail", "pages/meeting/reservationRecord/meetingRecord/meetingDetail/meetingDetail",
"pages/meeting/invite/invite", "pages/meeting/invite/invite",
"pages/meeting/visitorIinvitation/list/list", "pages/meeting/visitorIinvitation/list/list",
"pages/meeting/visitorIinvitation/add/add", "pages/meeting/visitorIinvitation/add/add",
"pages/meeting/visitorIinvitation/detail/detail", "pages/meeting/visitorIinvitation/detail/detail",
"pages/meeting/visitorIinvitation/indexBar/indexBar", "pages/meeting/visitorIinvitation/indexBar/indexBar",
"pages/meeting/exhibition/list/list", "pages/meeting/exhibition/list/list",
"pages/meeting/exhibition/detail/detail", "pages/meeting/exhibition/detail/detail",
"pages/meeting/exhibition/booked/booked", "pages/meeting/exhibition/booked/booked",
"pages/meeting/exhibition/order/order", "pages/meeting/exhibition/order/order",
"pages/meeting/reservationRecord/exhibitionRecord/list/list", "pages/meeting/reservationRecord/exhibitionRecord/list/list",
"pages/meeting/reservationRecord/exhibitionRecord/detail/detail" "pages/meeting/reservationRecord/exhibitionRecord/detail/detail",
], "pages/meeting/meetingRoom/meetingService/meetingService"
"window": { ],
"backgroundTextStyle": "light", "window": {
"navigationBarBackgroundColor": "#fff", "backgroundTextStyle": "light",
"navigationBarTitleText": "Weixin", "navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black" "navigationBarTitleText": "Weixin",
}, "navigationBarTextStyle": "black"
"tabBar": { },
"custom": true, "tabBar": {
"backgroundColor": "#ffffff", "custom": true,
"borderStyle": "black", "backgroundColor": "#ffffff",
"selectedColor": "#5C8EFF", "borderStyle": "black",
"color": "#333333", "selectedColor": "#5C8EFF",
"list": [{ "color": "#333333",
"pagePath": "pages/index/index", "list": [
"iconPath": "/images/tabbar/home.png", {
"selectedIconPath": "/images/tabbar/home-select.png", "pagePath": "pages/index/index",
"text": "首页" "iconPath": "/images/tabbar/home.png",
}, "selectedIconPath": "/images/tabbar/home-select.png",
{ "text": "首页"
"pagePath": "pages/my/my", },
"iconPath": "/images/tabbar/my.png", {
"selectedIconPath": "/images/tabbar/my-select.png", "pagePath": "pages/my/my",
"text": "我的" "iconPath": "/images/tabbar/my.png",
} "selectedIconPath": "/images/tabbar/my-select.png",
] "text": "我的"
}, }
"usingComponents": {}, ]
"sitemapLocation": "sitemap.json", },
"permission": { "usingComponents": {},
"scope.userLocation": { "sitemapLocation": "sitemap.json",
"desc": "为便于为您定位附近园区" "permission": {
} "scope.userLocation": {
"desc": "为便于为您定位附近园区"
} }
}
} }

View File

@ -195,6 +195,9 @@ Page({
wx.setStorageSync('openid', userDetail.openid) wx.setStorageSync('openid', userDetail.openid)
wx.setStorageSync('user', userDetail) wx.setStorageSync('user', userDetail)
wx.setStorageSync('userId', userDetail.id) wx.setStorageSync('userId', userDetail.id)
wx.setStorageSync('tenantId', app.tenantId)
wx.setStorageSync('parkId', app.parkId)
wx.setStorageSync('parkName', app.parkName)
_this.setData({ _this.setData({
userDetail userDetail
}) })

View File

@ -44,7 +44,7 @@ Page({
}).then(res => { }).then(res => {
console.log('queryServiceMsgRq', res); console.log('queryServiceMsgRq', res);
for (let i = 0; i < res.data.length; i++) { for (let i = 0; i < res.data.length; i++) {
if (res.data[i].dictValue == wx.getStorageSync('parkId')) { if (res.data[i].dictValue == app.tenantId) {
_this.setData({ _this.setData({
msg: res.data[i].dictLabel msg: res.data[i].dictLabel
}) })

View File

@ -35,17 +35,7 @@ Page({
bannerList: [], bannerList: [],
room: {}, room: {},
userData: {}, userData: {},
couponId: '', serviceList : [],
couponData: {},
couponList: [],
couponCount: 0,
couponUseList: [],
couponUseCount: 0,
couponNotUseList: [],
couponNotUseCount: 0,
countAmount: '',
totalAmount: '',
priceDialogShow: false,
}, },
/** /**
@ -62,8 +52,6 @@ Page({
}) })
// 详细信息 // 详细信息
this.getDetail(); this.getDetail();
// 获取优惠卷
this.getCustomerTicket();
}, },
// 详细信息 // 详细信息
@ -86,45 +74,6 @@ Page({
}) })
}, },
// 获取优惠卷
getCustomerTicket() {
let _this = this;
getCustomerTicketRq({
"userId": _this.data.userData.id,
"customerId": _this.data.userData.icsCustomerId,
"meetingId": _this.data.meetingRoomId,
"type": '1'
}).then(res => {
let nowTime = new Date().getTime();
let dataList = res.data.map(item => {
item.startTime = selfFormatTimeYMD(item.startTime)
item.endDate = selfFormatTimeYMD(item.endDate)
let kaishiTime = new Date(item.startTime + " 00:00:00")
let jieshuTime = new Date(item.endDate + " 23:59:59")
if (nowTime >= kaishiTime && nowTime <= jieshuTime) {
item.isDisable = false
} else {
item.isDisable = true
}
return item;
})
// 可用
let useList = res.data.filter(item => !item.isDisable)
// 不可用
let notUseList = res.data.filter(item => item.isDisable)
_this.setData({
couponList: dataList,
couponCount: selfArrSum(dataList.map(item => item.num)),
couponUseList: useList,
couponUseCount: selfArrSum(useList.map(item => item.num)),
couponNotUseList: notUseList,
couponNotUseCount: selfArrSum(notUseList.map(item => item.num)),
})
})
},
// 主题修改监听 // 主题修改监听
titleChange(event) { titleChange(event) {
this.setData({ this.setData({
@ -135,42 +84,12 @@ Page({
// 跳转-空间设施 // 跳转-空间设施
jumpMeetingFacilities() { jumpMeetingFacilities() {
let meetingRoomId = this.data.meetingRoomId; let meetingRoomId = this.data.meetingRoomId;
let serviceListJsonStr = JSON.stringify(this.data.serviceList)
wx.navigateTo({ wx.navigateTo({
url: '/pages/meeting/meetingRoom/meetingFacilities/meetingFacilities?meetingRoomId=' + meetingRoomId, url: `/pages/meeting/meetingRoom/meetingService/meetingService?meetingRoomId=${meetingRoomId}&serviceList=${serviceListJsonStr}`
}) })
}, },
// 跳转-优惠卷
jumpMeetingCoupon() {
let _this = this;
wx.navigateTo({
url: `/pages/meeting/meetingRoom/meetingCoupon/meetingCoupon?type=1&couponId=${_this.data.couponId}&meetingRoomId=${_this.data.meetingRoomId}`,
})
},
// 协议点击
protocolChange() {
let _this = this;
_this.setData({
protocolFlag: !_this.data.protocolFlag
});
},
// 跳转协议
jumpProtocol() {
let _this = this;
wx.navigateTo({
url: "/pages/meeting/meetingRoom/meetingProtocol/meetingProtocol?title=" + _this.data.protocolTitle,
})
},
// 价格明细
priceDetail() {
let _this = this
_this.setData({
priceDialogShow: true
})
},
// 提交订单 // 提交订单
submitCase() { submitCase() {
@ -184,15 +103,7 @@ Page({
}); });
return; return;
} }
if (!_this.data.protocolFlag) {
// 错误提示
Notify({
type: 'danger',
message: `请同意${_this.data.protocolTitle}!`
});
return;
}
saveMeetingRecordRq({ saveMeetingRecordRq({
"roomContentId": _this.data.meetingRoomId, "roomContentId": _this.data.meetingRoomId,
"userId": _this.data.userData.id, "userId": _this.data.userData.id,
@ -232,26 +143,7 @@ Page({
onShow() { onShow() {
console.log('onShow'); console.log('onShow');
let _this = this let _this = this
// 更新选择的优惠卷
if (_this.data.couponId) {
let couponData = _this.data.couponList.find(item => item.ticketId == _this.data.couponId)
_this.setData({
couponData
})
}
// 查询金额
calculateMeetingRoomAmountRq({
"startTime": _this.data.startTime,
"endDate": _this.data.endTime,
"roomContentId": _this.data.meetingRoomId,
"ticketId": _this.data.couponId
}).then(res => {
console.log('calculateMeetingRoomAmountRq', res);
_this.setData({
countAmount: res.amount.totalMoney,
totalAmount: res.amount.paidMoney,
})
})
}, },
/** /**

View File

@ -0,0 +1,167 @@
const app = getApp()
import {
getMeetingRoomServiceAndEquipmentRq,
queryServiceMsgRq
} from "../../../../api/meeting/meetingRoom.js"
Page({
/**
* 页面的初始数据
*/
data: {
IMG_NAME: app.IMG_NAME,
meetingRoomId: null,
detail: {},
msg: {},
serviceList: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let _this = this;
let serviceList = JSON.parse(options.serviceList)
_this.setData({
...options,
serviceList
})
// 获取数据
_this.getData();
},
// 获取数据
getData() {
let _this = this;
if (!(_this.data.serviceList && _this.data.serviceList.length > 0)) {
// 查询服务列表
getMeetingRoomServiceAndEquipmentRq(_this.data.meetingRoomId).then(res => {
let serviceList = res.data.roomFServe.map(item => {
return {
serveId: item.id,
serveName: item.serveName,
isSelect: false,
num: '',
}
})
_this.setData({
serviceList
})
})
}
// 查询服务信息
queryServiceMsgRq({
"dictType": "server_info"
}).then(res => {
console.log('queryServiceMsgRq', res);
for (let i = 0; i < res.data.length; i++) {
if (res.data[i].dictValue == app.tenantId) {
_this.setData({
msg: res.data[i].dictLabel
})
break;
}
}
})
},
// 服务选择
checkBoxClick(e) {
let _this = this;
console.log('checkBoxClick', e);
// get param
let id = e.target.dataset.id
let serviceList = _this.data.serviceList.map(item => {
if (item.serveId == id) {
item.isSelect = !item.isSelect
}
return item
})
_this.setData({
serviceList
})
},
// 服务输入数量
inputChange(e) {
let _this = this;
console.log('inputChange', e);
// get param
let id = e.currentTarget.dataset.id
let num = e.detail;
let serviceList = _this.data.serviceList.map(item => {
if (item.serveId == id) {
item.num = num
}
return item
})
_this.setData({
serviceList
})
},
// 确定
submit() {
let _this = this;
let pages = getCurrentPages(); //获取page
let prevPage = pages[pages.length - 2]; //上一个页面(父页面)
prevPage.setData({
serviceList: _this.data.serviceList
})
wx.navigateBack();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,9 @@
{
"usingComponents": {
"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"
},
"navigationBarTitleText": "会议服务"
}

View File

@ -0,0 +1,23 @@
<view class="containerView public">
<!-- 增值服务 -->
<view class="serviceView">
<view class="leftLineTitle">增值服务</view>
<view class="serviceItemView">
<view class="serviceItem" wx:for="{{serviceList}}" wx:key="*this">
<van-checkbox value="{{ item.isSelect }}" data-id="{{item.serveId}}" shape="square" bind:tap="checkBoxClick"></van-checkbox>
<view class="name" data-id="{{item.serveId}}" bind:tap="checkBoxClick">{{item.serveName}}</view>
<van-field style="width: 220rpx;" data-id="{{item.serveId}}" value="{{ item.num }}" type="number" clearable placeholder="请输入人数" border="{{ false }}" bind:change="inputChange" />
</view>
</view>
</view>
<!-- 声明信息 -->
<view class="statementView">
{{msg}}
</view>
<view class="submitBtn" bind:tap="submit">确定</view>
</view>

View File

@ -0,0 +1,46 @@
.serviceView {
margin-top: 40rpx;
}
.serviceView .leftLineTitle {
margin-left: 20rpx;
}
.serviceView .serviceItemView {
margin-top: 30rpx;
}
.serviceView .serviceItemView .serviceItem {
border-bottom: 1px solid rgb(126, 126, 126, 0.2);
display: flex;
justify-content: space-between;
align-items: center;
word-break: break-all;
padding: 20rpx 20rpx;
}
.serviceView .serviceItemView .serviceItem:first-of-type {
border-top: 1px solid rgb(126, 126, 126, 0.2);
}
.serviceView .serviceItem .name {
position: relative;
flex: 1;
margin-right: 20rpx;
padding-left: 10rpx;
font-size: 26rpx;
}
.serviceView .serviceItem .content {
color: red;
font-size: 24rpx;
max-width: 400rpx;
}
.statementView {
padding: 80rpx 40rpx;
font-size: 24rpx;
text-indent: 48rpx;
color: gray;
}