Commit a2a16ae1 authored by zhengke's avatar zhengke

修改

parent 0f270847
......@@ -260,6 +260,15 @@
margin: 25rpx;
padding: 20rpx;
}
.addGuest{
width:70rpx;
height:70rpx;
border-radius: 50%;
background-color: #39B54A;
display: flex;
justify-content: center;
align-items: center;
}
</style>
<template>
<view class="jz_Reserve">
......@@ -282,16 +291,11 @@
>
<text v-if="orderMsg.BabyNum > 0">{{ orderMsg.BabyNum }}婴儿</text>
</view>
<view class="update" @click="updateUser">
<text style="margin-right: 8rpx">修改</text>
<u-icon name="arrow" size="20" />
</view>
</view>
<view class="jz_ReserTitle">
{{ currentPriceInfo.title }}
</view>
<view class="jz_ReserIn" style="margin: 33rpx 0 18rpx 0">
<!-- {{currentPriceInfo.startCityName}}出发 {{currentPriceInfo.startDate}} -->
{{ ltName }}
</view>
<view class="big-title">
......@@ -308,7 +312,12 @@
v-for="(subItem, subIndex) in GuestList"
:key="subIndex"
>
<view style="margin: 10rpx 0 15rpx 0"> 游客{{ subIndex + 1 }} </view>
<view style="margin: 10rpx 0 15rpx 0;display: flex;justify-content: space-between;">
<view>游客{{ subIndex + 1 }}</view>
<view v-if="subIndex!=0">
<u-icon size="40" name="delete" color="red" @click="delGuest(index)"></u-icon>
</view>
</view>
<view class="form-items">
<view class="label">游客姓名</view>
<view class="val">
......@@ -343,12 +352,6 @@
<view class="form-items" style="margin-top: -5px">
<view class="label">学生</view>
<view class="val">
<!-- <checkbox-group @change="changecheckbox($event, subIndex, subItem)">
<checkbox
:value="subItem.IsHightSchool"
:checked="subItem.IsHightSchool"
/>
</checkbox-group> -->
<u-switch
v-model="subItem.IsHightSchool"
size="30"
......@@ -358,6 +361,11 @@
</view>
</view>
</view>
<view style="display: flex;justify-content: center;">
<view class="addGuest" @click="addGuest()">
<u-icon size="40" color="#fff" name="plus"></u-icon>
</view>
</view>
<view>
<textarea
class="jz_TextArea"
......@@ -366,24 +374,6 @@
/>
</view>
<view class="empty-block"></view>
<!-- <view class="jz_ReseOrder">
<view class="jz_ReDix">
<view class="jz_RedixTitle">成人:</view>
<u-number-box v-model="orderMsg.ManNum" :input-width="300" :input-height="60" @change="changeMan()"></u-number-box>
</view>
<view class="jz_ReDix">
<view class="jz_RedixTitle">儿童不占床:</view>
<u-number-box v-model="orderMsg.ChirdNoBedNum" :input-width="300" :input-height="60" @change="changeChirdNoBedNum()"></u-number-box>
</view>
<view class="jz_ReDix">
<view class="jz_RedixTitle">儿童占床:</view>
<u-number-box v-model="orderMsg.ChirdNeedBedNum" :input-width="300" :input-height="60" @change="changeChirdNeedBedNum()"></u-number-box>
</view>
<view class="jz_ReDix">
<view class="jz_RedixTitle">婴儿:</view>
<u-number-box v-model="orderMsg.BabyNum" :input-width="300" :input-height="60" @change="changeBabyNum()"></u-number-box>
</view>
</view> -->
<view style="padding: 50rpx 40rpx">
<view class="big-title">
<text>费用明细</text>
......@@ -531,7 +521,7 @@ export default {
submit: false,
pageTitle: "订单填写",
orderMsg: {
ManNum: 0, //成人
ManNum: 1, //成人
ChirdNoBedNum: 0, //儿童不占床
ChirdNeedBedNum: 0, //儿童占床
BabyNum: 0, //婴儿
......@@ -562,18 +552,37 @@ export default {
});
},
onLoad(option) {
// if (option.seat) {
// this.currentPriceInfo = JSON.parse(
// decodeURIComponent(option.currentPriceInfo)
// );
// this.calcMoney();
// }
console.log(option,'option');
if (option.tcid) {
this.getDetails(option.tcid);
}
},
methods: {
//删除游客
delGuest(index){
this.GuestList.splice(index,1);
this.orderMsg.ManNum--;
this.singleCalc();
},
//新增游客
addGuest(){
let obj = {
Id: 0,
SurName: "", //姓
Name: "", //名
IdCard: "", //身份证
MobilePhone: "", //联系电话
IsHightSchool: false, //是否高校学生1 是 2否
};
this.GuestList.push(obj);
this.orderMsg.ManNum++;
this.singleCalc();
},
singleCalc(){
var price = 0;
price = this.currentPriceInfo.b2CPrice;
this.total = parseInt(this.orderMsg.ManNum)
this.price = price * this.orderMsg.ManNum;
},
changecheckbox(e, index, item) {
if (item.IsHightSchool) {
let newObj = JSON.parse(JSON.stringify(item));
......@@ -597,16 +606,12 @@ export default {
this.ltName = res.data.ltName;
this.currentPriceInfo = res.data.currentPriceInfo;
this.startCityName = res.data.startCityName;
this.calcMoney();
}
},
null
);
},
updateUser() {
uni.navigateBack({
delta: 1,
});
},
getWeek(date) {
var weekArray = new Array("日", "一", "二", "三", "四", "五", "六");
var week = weekArray[new Date(date).getDay()]; //注意此处必须是先new一个Date
......@@ -618,34 +623,9 @@ export default {
return arr[1] + "月" + arr[2] + "日";
}
},
//改变成人
changeMan(e) {
this.orderMsg.ManNum = e.value;
this.calcMoney();
},
//改变儿童不占床
changeChirdNoBedNum(e) {
this.orderMsg.ChirdNoBedNum = e.value;
this.calcMoney();
},
//改变儿童占床
changeChirdNeedBedNum(e) {
this.orderMsg.ChirdNeedBedNum = e.value;
this.calcMoney();
},
//改变婴儿
changeBabyNum(e) {
this.orderMsg.BabyNum = e.value;
this.calcMoney();
},
//计算价格
calcMoney() {
var price = 0;
// if (this.$utils.getretailer()) {
// price = this.currentPriceInfo.b2BPrice;
// } else {
// price = this.currentPriceInfo.b2CPrice;
// }
price = this.currentPriceInfo.b2CPrice;
this.orderMsg.ChirdNum =
......@@ -801,6 +781,7 @@ export default {
data.CoverImg = this.currentPriceInfo.CoverImg;
let myData = JSON.stringify(data);
this.orderData = encodeURIComponent(myData);
console.log(this.orderData,'this.orderData');
// #ifdef MP-WEIXIN
this.queren(data.OrderId);
// #endif
......@@ -833,6 +814,7 @@ export default {
},
},
(res) => {
console.log(res,'数据');
this.orderInfo = JSON.parse(res.data);
// this.Pay(OrderId);
this.subscribeMsg(OrderId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment