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

1

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