Commit 90569659 authored by youjie's avatar youjie

包车订单

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