Commit 8d8ca1f8 authored by 罗超's avatar 罗超

1

parent 4d892ef8
...@@ -114,7 +114,6 @@ ...@@ -114,7 +114,6 @@
.jz_form { .jz_form {
margin-top: 60rpx; margin-top: 60rpx;
padding: 0 45rpx; padding: 0 45rpx;
} }
.jz_form .form-items { .jz_form .form-items {
margin-bottom: 20rpx; margin-bottom: 20rpx;
...@@ -133,7 +132,7 @@ ...@@ -133,7 +132,7 @@
font-weight: 600; font-weight: 600;
margin-right: 60rpx; margin-right: 60rpx;
flex-shrink: 0; flex-shrink: 0;
width:56px; width: 56px;
} }
.jz_form .form-items .val { .jz_form .form-items .val {
flex: 1; flex: 1;
...@@ -242,24 +241,24 @@ ...@@ -242,24 +241,24 @@
line-height: 40rpx; line-height: 40rpx;
margin-right: 24rpx; margin-right: 24rpx;
} }
.jz_GuestList{ .jz_GuestList {
box-shadow: 0px 2px 15px 0px rgba(76, 76, 76, 0.13); box-shadow: 0px 2px 15px 0px rgba(76, 76, 76, 0.13);
padding:20rpx; padding: 20rpx;
margin:25rpx; margin: 25rpx;
border-radius: 25rpx; border-radius: 25rpx;
} }
.jz_GuestList .form-items:last-child{ .jz_GuestList .form-items:last-child {
margin-bottom:0; margin-bottom: 0;
padding-bottom:6rpx; padding-bottom: 6rpx;
} }
.jz_TextArea{ .jz_TextArea {
height: 50px; height: 50px;
margin-bottom:10px; margin-bottom: 10px;
width:auto; width: auto;
border: 1px solid #DFDDD8; border: 1px solid #dfddd8;
border-radius: 4px; border-radius: 4px;
margin:25rpx; margin: 25rpx;
padding:20rpx; padding: 20rpx;
} }
</style> </style>
<template> <template>
...@@ -304,10 +303,12 @@ ...@@ -304,10 +303,12 @@
/>即时确认:本产品付款后可快速确认,放心期待您的旅行 />即时确认:本产品付款后可快速确认,放心期待您的旅行
</view> </view>
</view> </view>
<view class="jz_form jz_GuestList" v-for="(subItem,subIndex) in GuestList" :key="subIndex"> <view
<view style="margin:10rpx 0 15rpx 0;"> class="jz_form jz_GuestList"
游客:{{subIndex+1}} v-for="(subItem, subIndex) in GuestList"
</view> :key="subIndex"
>
<view style="margin: 10rpx 0 15rpx 0"> 游客:{{ subIndex + 1 }} </view>
<view class="form-items"> <view class="form-items">
<view class="label">游客姓名</view> <view class="label">游客姓名</view>
<view class="val"> <view class="val">
...@@ -340,17 +341,27 @@ ...@@ -340,17 +341,27 @@
</view> </view>
</view> </view>
<view class="form-items"> <view class="form-items">
<view class="label">学生</view> <view class="label">学生{{ subItem.IsHightSchool }}</view>
<view class="val" style="margin-top: -20rpx;"> <view class="val" style="margin-top: -20rpx">
<u-checkbox-group> <!-- <u-checkbox-group>
<u-checkbox v-model="subItem.IsHightSchool"></u-checkbox> <u-checkbox v-model="subItem.IsHightSchool"></u-checkbox>
</u-checkbox-group> </u-checkbox-group> -->
<checkbox-group @change="changecheckbox($event, subIndex, subItem)">
<checkbox
:value="subItem.IsHightSchool"
:checked="subItem.IsHightSchool"
/>
</checkbox-group>
</view> </view>
</view> </view>
</view> </view>
<view> <view>
<textarea class="jz_TextArea" placeholder="请输入备注信息" <textarea
v-model="Remarks"/> class="jz_TextArea"
placeholder="请输入备注信息"
v-model="Remarks"
/>
</view> </view>
<view class="empty-block"></view> <view class="empty-block"></view>
<!-- <view class="jz_ReseOrder"> <!-- <view class="jz_ReseOrder">
...@@ -535,8 +546,8 @@ export default { ...@@ -535,8 +546,8 @@ export default {
contactName: "", contactName: "",
orderInfo: {}, orderInfo: {},
orderData: "", orderData: "",
Remarks:"",//备注 Remarks: "", //备注
GuestList:[] GuestList: [],
}; };
}, },
created() { created() {
...@@ -561,6 +572,17 @@ export default { ...@@ -561,6 +572,17 @@ export default {
} }
}, },
methods: { methods: {
changecheckbox(e, index, item) {
if (item.IsHightSchool) {
let newObj = JSON.parse(JSON.stringify(item));
newObj.IsHightSchool = false;
this.$set(this.GuestList, index, newObj);
} else {
let newObj = JSON.parse(JSON.stringify(item));
newObj.IsHightSchool = true;
this.$set(this.GuestList, index, newObj);
}
},
//获取详情 //获取详情
getDetails(id) { getDetails(id) {
this.apipost( this.apipost(
...@@ -652,54 +674,55 @@ export default { ...@@ -652,54 +674,55 @@ export default {
this.price = money; this.price = money;
//根据总人数 生成旅客信息 //根据总人数 生成旅客信息
for(var i=0;i<this.total;i++){ for (var i = 0; i < this.total; i++) {
let obj = { let obj = {
Id:0, Id: 0,
SurName:"",//姓 SurName: "", //姓
Name:"",//名 Name: "", //名
IdCard:"",//身份证 IdCard: "", //身份证
MobilePhone:"",//联系电话 MobilePhone: "", //联系电话
IsHightSchool:false,//是否高校学生1 是 2否 IsHightSchool: false, //是否高校学生1 是 2否
} };
this.GuestList.push(obj); this.GuestList.push(obj);
} }
}, },
//去支付 //去支付
goPay() { goPay() {
for(var i=0;i<this.GuestList.length;i++){ for (var i = 0; i < this.GuestList.length; i++) {
if(this.GuestList[i].SurName==''){ if (this.GuestList[i].SurName == "") {
uni.showToast({ uni.showToast({
title: `请输入游客${i+1}的姓名`, title: `请输入游客${i + 1}的姓名`,
icon: "none", icon: "none",
}); });
return return;
} }
if(this.GuestList[i].IdCard==''){ if (this.GuestList[i].IdCard == "") {
uni.showToast({ uni.showToast({
title: `请输入游客${i+1}的身份证`, title: `请输入游客${i + 1}的身份证`,
icon: "none", icon: "none",
}); });
return return;
} }
if(this.GuestList[i].MobilePhone==''){ if (this.GuestList[i].MobilePhone == "") {
uni.showToast({ uni.showToast({
title: `请输入游客${i+1}的联系电话`, title: `请输入游客${i + 1}的联系电话`,
icon: "none", icon: "none",
}); });
return return;
} }
} }
this.submit = true; this.submit = true;
this.userInfo = uni.getStorageSync("mall_UserInfo"); this.userInfo = uni.getStorageSync("mall_UserInfo");
this.basedataObj = uni.getStorageSync("basedata").mall; this.basedataObj = uni.getStorageSync("basedata").mall;
var CustomerId = this.basedataObj.virtualB2BCustomerId; var CustomerId = this.basedataObj.virtualB2BCustomerId;
this.GuestList.forEach(x=>{ let newobj = JSON.parse(JSON.stringify(this.GuestList));
if(x.IsHightSchool){ newobj.forEach((x) => {
x.IsHightSchool=1 if (x.IsHightSchool) {
}else{ x.IsHightSchool = 1;
x.IsHightSchool=2 } else {
x.IsHightSchool = 2;
} }
}) });
var ContactName = this.contactName; var ContactName = this.contactName;
var ContactMobile = this.contactMobile; var ContactMobile = this.contactMobile;
var CustomerType = 4; var CustomerType = 4;
...@@ -732,9 +755,7 @@ export default { ...@@ -732,9 +755,7 @@ export default {
TradeWay: 0, TradeWay: 0,
PlatformOrder: "", PlatformOrder: "",
GuestNum: GuestNum:
this.orderMsg.ManNum + this.orderMsg.ManNum + this.orderMsg.ChirdNum + this.orderMsg.BabyNum,
this.orderMsg.ChirdNum +
this.orderMsg.BabyNum,
IsChildrenTour: this.currentPriceInfo.isSupportChildren, IsChildrenTour: this.currentPriceInfo.isSupportChildren,
IsBirdDiscount: this.zaoniao > 0 ? 1 : 2, IsBirdDiscount: this.zaoniao > 0 ? 1 : 2,
PredictRoomNum: 1, PredictRoomNum: 1,
...@@ -761,8 +782,8 @@ export default { ...@@ -761,8 +782,8 @@ export default {
OrderSource: 6, OrderSource: 6,
// #endif // #endif
MiniAppUserId: this.userInfo.UserId, MiniAppUserId: this.userInfo.UserId,
Remarks:this.Remarks,//备注 Remarks: this.Remarks, //备注
GuestList:this.GuestList GuestList: newobj,
}; };
this.apipost( this.apipost(
"sellorder_post_SetOrderInfoForB2B", "sellorder_post_SetOrderInfoForB2B",
......
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