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,16 +303,18 @@ ...@@ -304,16 +303,18 @@
/>即时确认:本产品付款后可快速确认,放心期待您的旅行 />即时确认:本产品付款后可快速确认,放心期待您的旅行
</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">
<input <input
type="text" type="text"
:key="subIndex" :key="subIndex"
v-model="subItem.SurName" v-model="subItem.SurName"
placeholder="请输入游客姓名" placeholder="请输入游客姓名"
/> />
...@@ -329,29 +330,39 @@ ...@@ -329,29 +330,39 @@
/> />
</view> </view>
</view> </view>
<view class="form-items"> <view class="form-items">
<view class="label">身份证</view> <view class="label">身份证</view>
<view class="val"> <view class="val">
<input <input
type="number" type="number"
v-model="subItem.IdCard" v-model="subItem.IdCard"
placeholder="请输入身份证号" placeholder="请输入身份证号"
/> />
</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> -->
</view>
</view> <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"
/>
</view> </view>
<view>
<textarea class="jz_TextArea" placeholder="请输入备注信息"
v-model="Remarks"/>
</view>
<view class="empty-block"></view> <view class="empty-block"></view>
<!-- <view class="jz_ReseOrder"> <!-- <view class="jz_ReseOrder">
<view class="jz_ReDix"> <view class="jz_ReDix">
...@@ -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(
...@@ -650,143 +672,142 @@ export default { ...@@ -650,143 +672,142 @@ export default {
: 0) * this.orderMsg.ChirdNoBedNum; : 0) * this.orderMsg.ChirdNoBedNum;
} }
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 ContactMobile = this.contactMobile; var ContactName = this.contactName;
var CustomerType = 4; var ContactMobile = this.contactMobile;
var price = this.currentPriceInfo.b2CPrice; var CustomerType = 4;
let msg = { var price = this.currentPriceInfo.b2CPrice;
OrderId: 0, let msg = {
TCID: this.currentPriceInfo.tcid, OrderId: 0,
CustomerType: CustomerType, TCID: this.currentPriceInfo.tcid,
GroupType: 1, CustomerType: CustomerType,
ContactName: ContactName, GroupType: 1,
ContactMobile: ContactMobile, ContactName: ContactName,
CustomerId: CustomerId, ContactMobile: ContactMobile,
DepartureCityId: 262, CustomerId: CustomerId,
IsIntermodal: 2, DepartureCityId: 262,
Unit_Price: price, IsIntermodal: 2,
TC_Price: price, Unit_Price: price,
ManNum: this.orderMsg.ManNum, TC_Price: price,
ChirdNum: this.orderMsg.ChirdNum, ManNum: this.orderMsg.ManNum,
ChirdNeedBedNum: this.orderMsg.ChirdNeedBedNum, ChirdNum: this.orderMsg.ChirdNum,
BabyNum: this.orderMsg.BabyNum, ChirdNeedBedNum: this.orderMsg.ChirdNeedBedNum,
OldPeopleNum: 0, BabyNum: this.orderMsg.BabyNum,
SingleRoomNum: 0, OldPeopleNum: 0,
PreferPrice: this.price, SingleRoomNum: 0,
YSeatNum: this.total, PreferPrice: this.price,
ESeatNum: 0, YSeatNum: this.total,
FSeatNum: 0, ESeatNum: 0,
Commission: 0, //todo 提成 FSeatNum: 0,
ClientSource: 2, Commission: 0, //todo 提成
BrandId: 0, ClientSource: 2,
TradeWay: 0, BrandId: 0,
PlatformOrder: "", TradeWay: 0,
GuestNum: PlatformOrder: "",
this.orderMsg.ManNum + GuestNum:
this.orderMsg.ChirdNum + this.orderMsg.ManNum + this.orderMsg.ChirdNum + this.orderMsg.BabyNum,
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, BigRoomNum: 0,
BigRoomNum: 0, TripleRoomNum: 0,
TripleRoomNum: 0, TradeDate: this.currentPriceInfo.startDate,
TradeDate: this.currentPriceInfo.startDate, CostType: 0,
CostType: 0, MinOrderPrice: 0,
MinOrderPrice: 0, Remarks: "",
Remarks: "", VisaNum: this.orderMsg.ManNum + this.orderMsg.ChirdNum,
VisaNum: this.orderMsg.ManNum + this.orderMsg.ChirdNum, SafeNum: this.orderMsg.ManNum + this.orderMsg.ChirdNum,
SafeNum: this.orderMsg.ManNum + this.orderMsg.ChirdNum, AirticketNum: 0,
AirticketNum: 0, ReturnArriveCityId: 262,
ReturnArriveCityId: 262, IsReturnIntermodal: 2,
IsReturnIntermodal: 2, GoCityTime: "",
GoCityTime: "", BackCityTime: "",
BackCityTime: "", ScenicRefundArr: [],
ScenicRefundArr: [], CommissionSharePeople: 0,
CommissionSharePeople: 0, CommissionShareMoney: 0,
CommissionShareMoney: 0, // #ifdef MP-WEIXIN
// #ifdef MP-WEIXIN OrderSource: 5,
OrderSource: 5, // #endif
// #endif // #ifdef MP-ALIPAY
// #ifdef MP-ALIPAY OrderSource: 6,
OrderSource: 6, // #endif
// #endif MiniAppUserId: this.userInfo.UserId,
MiniAppUserId: this.userInfo.UserId, Remarks: this.Remarks, //备注
Remarks:this.Remarks,//备注 GuestList: newobj,
GuestList:this.GuestList };
}; this.apipost(
this.apipost( "sellorder_post_SetOrderInfoForB2B",
"sellorder_post_SetOrderInfoForB2B", msg,
msg, (res) => {
(res) => { if (res.resultCode == 1) {
if (res.resultCode == 1) { let data = res.data;
let data = res.data; data.CoverImg = this.currentPriceInfo.CoverImg;
data.CoverImg = this.currentPriceInfo.CoverImg; let myData = JSON.stringify(data);
let myData = JSON.stringify(data); this.orderData = encodeURIComponent(myData);
this.orderData = encodeURIComponent(myData); // #ifdef MP-WEIXIN
// #ifdef MP-WEIXIN this.queren(data.OrderId);
this.queren(data.OrderId); // #endif
// #endif // #ifdef MP-ALIPAY
// #ifdef MP-ALIPAY this.querenAli(data);
this.querenAli(data); // #endif
// #endif } else {
} else {
}
this.submit = false;
},
(e) => {
this.submit = false;
} }
); this.submit = false;
},
(e) => {
this.submit = false;
}
);
}, },
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
//微信支付 //微信支付
......
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