Commit 90569659 authored by youjie's avatar youjie

包车订单

parent af98aba5
...@@ -340,6 +340,7 @@ ...@@ -340,6 +340,7 @@
msg = `orderId=` + item.erpOrderId msg = `orderId=` + item.erpOrderId
url = `hotel/orderdetails?`; url = `hotel/orderdetails?`;
} else if (item.goodsType > 11 && item.goodsType < 15) { //目的地用车 } else if (item.goodsType > 11 && item.goodsType < 15) { //目的地用车
msg = `orderId=` + item.erpOrderId
url = `bus/orderdetails?`; url = `bus/orderdetails?`;
} else if (item.goodsType == 15) url = `visa/visa_SureOrder?` //签证 } else if (item.goodsType == 15) url = `visa/visa_SureOrder?` //签证
else if (item.goodsType == 16) url = `airTicket/airTicketOrderDetail?` //机票 else if (item.goodsType == 16) url = `airTicket/airTicketOrderDetail?` //机票
......
...@@ -775,7 +775,7 @@ ...@@ -775,7 +775,7 @@
SmallShopId = u.UserSmallShopId ? u.UserSmallShopId : 0; SmallShopId = u.UserSmallShopId ? u.UserSmallShopId : 0;
} }
return { return {
title: this.dataList.name ? this.dataList.name : "帖子", title: this.dataList.Name ? this.dataList.Name : "帖子",
path: "/pages/index/index?id=" + path: "/pages/index/index?id=" +
this.id + this.id +
"&user_id=" + "&user_id=" +
......
...@@ -168,7 +168,8 @@ ...@@ -168,7 +168,8 @@
</view> </view>
<view class="LastNameBox column val" style="width: 1px;flex: 1;"> <view class="LastNameBox column val" style="width: 1px;flex: 1;">
<view class="row items-center"> <view class="row items-center">
<input type="number" v-model="orderMsg.ManNum" placeholder="请输入成人数" /> <input type="number" v-model="orderMsg.ManNum"
placeholder="请输入成人数" @change="getPeoples"/>
</view> </view>
</view> </view>
</view> </view>
...@@ -516,14 +517,14 @@ ...@@ -516,14 +517,14 @@
let msg = { let msg = {
SurName: this.orderMsg.SurName, SurName: this.orderMsg.SurName,
Name: this.orderMsg.Name, Name: this.orderMsg.Name,
ContactNumber: this.customer.contactNumber, ContactNumber: this.orderMsg.Mobile,
Mailbox: this.customer.Mailbox, Mailbox: this.orderMsg.ContactWay,
GoodsId: this.orderMsg.ProductId, GoodsId: this.orderMsg.ProductId,
GoodsName: this.dataList.Name, GoodsName: this.dataList.Name,
GoodsPic: this.dataList.ImageList[0]? this.dataList.ImageList[0] : '', GoodsPic: this.dataList.ImageList[0]? this.dataList.ImageList[0] : '',
GoodsType: GoodsType, GoodsType: GoodsType,
OrderMake: `${this.orderMsg.OrderDate}${text};${guestInfo}`, OrderMake: `${this.orderMsg.OrderDate}${text};${guestInfo}`,
TotalPrice: this.price, TotalPrice: this.orderMsg.Money,
PreferentialPrice: this.currentCoupon.discountMoney, PreferentialPrice: this.currentCoupon.discountMoney,
ErpOrderId: OrderId, ErpOrderId: OrderId,
Country: 0, Country: 0,
...@@ -541,14 +542,14 @@ ...@@ -541,14 +542,14 @@
title: '订单创建成功' title: '订单创建成功'
}) })
this.goPayHandler(res.data.OrderNo); this.goPayHandler(res.data.OrderNo);
} else {
uni.showToast({
title:res.message,
icon:'none',
duration:3000
})
this.submit = false;
} }
},err=>{
uni.showToast({
title:err.message,
icon:'none',
duration:3000
})
this.submit = false;
}); });
}, },
goPayHandler(item) { goPayHandler(item) {
...@@ -569,7 +570,7 @@ ...@@ -569,7 +570,7 @@
setTimeout(() => { setTimeout(() => {
//跳转到详情页面 //跳转到详情页面
uni.redirectTo({ uni.redirectTo({
url: "/pages/bus/orderdetails?orderId=" + item.ErpOrderId, url: "/pages/bus/orderdetails?orderId=" + res.ErpOrderId,
}); });
}, 100); }, 100);
}, },
...@@ -581,7 +582,7 @@ ...@@ -581,7 +582,7 @@
}); });
setTimeout(() => { setTimeout(() => {
uni.redirectTo({ uni.redirectTo({
url: "/pages/bus/orderdetails?orderId=" + item.ErpOrderId, url: "/pages/bus/orderdetails?orderId=" + res.ErpOrderId,
}); });
}, 100); }, 100);
}, },
...@@ -623,7 +624,7 @@ ...@@ -623,7 +624,7 @@
}, },
//计算总价 //计算总价
CalTotalPrice() { CalTotalPrice() {
this.orderMsg.Money = this.getPrice((this.orderMsg.Unit_Price * this.orderMsg.Num)-this.currentCoupon.discountMoney) this.orderMsg.Money = this.getPrice(this.orderMsg.Unit_Price * this.orderMsg.Num)
}, },
initData() { initData() {
uni.showLoading({ uni.showLoading({
...@@ -822,6 +823,12 @@ ...@@ -822,6 +823,12 @@
msg = '请输入航班号' msg = '请输入航班号'
}else if(this.orderMsg.FlightTime==''){ }else if(this.orderMsg.FlightTime==''){
msg = `请选择航班${this.orderMsg.OrderType==1?'抵达':'起飞'}时间` msg = `请选择航班${this.orderMsg.OrderType==1?'抵达':'起飞'}时间`
} else if (this.orderMsg.ManNum == ''
|| !this.orderMsg.ManNum
|| this.orderMsg.ManNum <= 0) {
msg = '请输入至少 1 个成人人数'
}else if (this.orderMsg.peoples>this.orderMsg.PeopleNum) {
msg = `总人数不能大于${this.orderMsg.PeopleNum}`
} }
}else if (this.orderMsg.SurName == '') { }else if (this.orderMsg.SurName == '') {
msg = '请输入姓' msg = '请输入姓'
...@@ -833,7 +840,9 @@ ...@@ -833,7 +840,9 @@
msg = '请输入正确的电话号码' msg = '请输入正确的电话号码'
} else if (this.orderMsg.ContactWay == '' || !this.orderMsg.ContactWay) { } else if (this.orderMsg.ContactWay == '' || !this.orderMsg.ContactWay) {
msg = '请输入联系方式' msg = '请输入联系方式'
} else if (this.orderMsg.ManNum == '' || !this.orderMsg.ManNum || this.orderMsg.ManNum <= 0) { } else if (this.orderMsg.ManNum == ''
|| !this.orderMsg.ManNum
|| this.orderMsg.ManNum <= 0) {
msg = '请输入至少 1 个成人人数' msg = '请输入至少 1 个成人人数'
}else if (this.orderMsg.peoples>this.orderMsg.PeopleNum) { }else if (this.orderMsg.peoples>this.orderMsg.PeopleNum) {
msg = `总人数不能大于${this.orderMsg.PeopleNum}` msg = `总人数不能大于${this.orderMsg.PeopleNum}`
...@@ -866,13 +875,14 @@ ...@@ -866,13 +875,14 @@
if(this.useCouponIds.length>0){ if(this.useCouponIds.length>0){
CouponAllotIds = this.useCouponIds.join(',') CouponAllotIds = this.useCouponIds.join(',')
} }
let Money = this.getPrice((this.orderMsg.Unit_Price * this.orderMsg.Num)-this.currentCoupon.discountMoney)
let msg = { let msg = {
OrderId: this.orderMsg.OrderId,// 订单ID 修改时传递 OrderId: this.orderMsg.OrderId,// 订单ID 修改时传递
OrderType: this.orderMsg.OrderType,// 订单类型 1接机 2送机 3包车 OrderType: this.orderMsg.OrderType,// 订单类型 1接机 2送机 3包车
OrderDate: this.orderMsg.OrderDate,// 预定日期 (送机、包车精确到分钟) OrderDate: this.orderMsg.OrderDate,// 预定日期 (送机、包车精确到分钟)
Unit_Price: this.orderMsg.Unit_Price,// 单价 Unit_Price: this.orderMsg.Unit_Price,// 单价
Num: this.orderMsg.Num,// 数量 Num: this.orderMsg.Num,// 数量
Money: this.orderMsg.Money,// 总金额 Money: Money,// 总金额
Sex: this.orderMsg.Sex,// 性别 1男 2女 Sex: this.orderMsg.Sex,// 性别 1男 2女
SurName: this.orderMsg.SurName,// 姓 SurName: this.orderMsg.SurName,// 姓
Name: this.orderMsg.Name,// 名 Name: this.orderMsg.Name,// 名
...@@ -927,7 +937,7 @@ ...@@ -927,7 +937,7 @@
uni.setStorageSync('coupons',tempData.CounponList) uni.setStorageSync('coupons',tempData.CounponList)
} }
// #ifdef MP-DI // #ifdef MP-DI
this.submitB2COrderHandler(tempData.airOrderId) this.submitB2COrderHandler(tempData.Id)
// #endif // #endif
// #ifdef MP-AG // #ifdef MP-AG
uni.showToast({ uni.showToast({
......
...@@ -630,24 +630,28 @@ ...@@ -630,24 +630,28 @@
); );
// #endif // #endif
// #ifdef MP-DI // #ifdef MP-DI
this.getOrderInfoByIdAndType() this.getOrderInfoByIdAndType()
// #endif // #endif
} }
}, err => { }, err => {
uni.showToast({
title: err.message,
icon: "none",
});
uni.hideLoading(); uni.hideLoading();
} }
); );
}, },
getOrderInfoByIdAndType(){ getOrderInfoByIdAndType(){
const parameter={ErpOrderId:this.orderId,OrderTypeStr:'Vehicle'} const parameter={ErpOrderId:this.id,OrderTypeStr:'Vehicle'}
this.apipost("GetDetailsByErpOrderId_post",parameter,res=>{ this.apipost("GetDetailsByErpOrderId_post",parameter,res=>{
if(res.resultCode==1){ if(res.resultCode==1){
this.OrderNo = res.data.OrderNo this.OrderNo = res.data.OrderNo
this.formatStatus( this.formatStatus(
res.data.OrderStatus, res.data.OrderStatus,
null, null,
null null
); );
}else{ }else{
} }
......
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