mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 11:59:37 +08:00
描述:选择信息
This commit is contained in:
parent
3d21c09f5c
commit
db1607bda2
@ -56,3 +56,12 @@ export function getCustomerTicketRq(data) {
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 计算会议室金额
|
||||
export function calculateMeetingRoomAmountRq(data) {
|
||||
return request({
|
||||
url: '/api/roomContent/calculateMeetingRoomAmount',
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
@ -32,7 +32,8 @@
|
||||
<view class="propOpen"></view>
|
||||
<view class="priceView">
|
||||
<view class="price">¥ {{room.money}}/</view>
|
||||
<view class="unit">小时 起</view>
|
||||
<text decode> </text>
|
||||
<view class="unit"> {{room.duration}}小时 起</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="imgView">
|
||||
|
@ -1,8 +1,11 @@
|
||||
const app = getApp()
|
||||
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
|
||||
import {
|
||||
meetingRoomDetailRq,
|
||||
getCustomerTicketRq
|
||||
getCustomerTicketRq,
|
||||
calculateMeetingRoomAmountRq
|
||||
} from "../../../../api/meeting/meetingRoom.js"
|
||||
|
||||
import {
|
||||
@ -34,6 +37,8 @@ Page({
|
||||
couponList: [],
|
||||
couponUseList: [],
|
||||
couponNotUseList: [],
|
||||
countAmount: '',
|
||||
totalAmount: '',
|
||||
},
|
||||
|
||||
/**
|
||||
@ -130,6 +135,16 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
// 价格明细
|
||||
priceDetail() {
|
||||
Dialog.alert({
|
||||
title: '价格明细',
|
||||
message: '弹窗内容',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
},
|
||||
|
||||
// 提交订单
|
||||
submitCase() {
|
||||
wx.redirectTo({
|
||||
@ -150,13 +165,26 @@ Page({
|
||||
onShow() {
|
||||
console.log('onShow');
|
||||
let _this = this
|
||||
_this.data.couponData
|
||||
// 更新选择的优惠卷
|
||||
if (_this.data.couponId) {
|
||||
let couponData = _this.data.couponList.find(item => item.id == _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,
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -2,8 +2,7 @@
|
||||
"usingComponents": {
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-field": "@vant/weapp/field/index",
|
||||
"van-checkbox": "@vant/weapp/checkbox/index",
|
||||
"van-checkbox-group": "@vant/weapp/checkbox-group/index"
|
||||
"van-dialog": "@vant/weapp/dialog/index"
|
||||
},
|
||||
"navigationBarTitleText": "预约信息"
|
||||
}
|
@ -19,7 +19,7 @@
|
||||
</view>
|
||||
<view class="priceView">
|
||||
<view class="price">¥{{room.money}}/</view>
|
||||
<view class="unit">小时 起</view>
|
||||
<view class="unit"><text decode> </text>{{room.duration}}小时 起</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -56,14 +56,14 @@
|
||||
<view class="itemView" bind:tap="jumpMeetingCoupon">
|
||||
<view class="label">优惠券</view>
|
||||
<view class="content">
|
||||
<view class="coupon">{{couponId? couponData.ticketName : couponUseList.length + '张可用' + '(共计'+ couponList.length +'张)'}}</view>
|
||||
<view class="coupon {{couponId ? 'select' : ''}}">{{couponId? couponData.ticketName : couponUseList.length + '张可用' + '(共计'+ couponList.length +'张)'}}</view>
|
||||
<van-icon name="arrow" size="44rpx" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="itemView">
|
||||
<view class="label">总金额</view>
|
||||
<view class="content">
|
||||
<view class="price">¥200.00</view>
|
||||
<view class="price">¥{{countAmount}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -77,10 +77,15 @@
|
||||
|
||||
<!-- 合计 -->
|
||||
<view class="amountView">
|
||||
<view class="priceView">
|
||||
<view class="priceView" bind:tap="priceDetail">
|
||||
<view class="title">合计:</view>
|
||||
<view class="price">¥ 200.00</view>
|
||||
<view class="price">¥{{totalAmount}}</view>
|
||||
<view class="describe">价格明细</view>
|
||||
</view>
|
||||
<view class="caseBtn" bind:tap="submitCase">提交订单</view>
|
||||
</view>
|
||||
|
||||
<!-- 提示 -->
|
||||
<van-dialog id="van-dialog" />
|
||||
|
||||
</view>
|
@ -164,6 +164,10 @@
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.fillMsgView .itemView .content .coupon.select {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.fillMsgView .itemView .content .price {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
@ -190,7 +194,7 @@
|
||||
.amountView .priceView {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.amountView .priceView .title {
|
||||
@ -202,6 +206,12 @@
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.amountView .priceView .describe {
|
||||
color: red;
|
||||
font-size: 28rpx;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
|
||||
.amountView .caseBtn {
|
||||
border-radius: 10rpx;
|
||||
padding: 16rpx 60rpx;
|
||||
@ -209,3 +219,5 @@
|
||||
font-size: 30rpx;
|
||||
background: #4e96f8;
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
||||
<!-- 价格 -->
|
||||
<view class="priceView">
|
||||
<view class="leftLineTitle">价格</view>
|
||||
<view class="content">¥ {{detail.money}}/小时 起</view>
|
||||
<view class="content">¥ {{detail.money}}/<text decode> </text>{{detail.duration}}小时 起</view>
|
||||
</view>
|
||||
|
||||
<!-- 地图 -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user