Commit 844f194b authored by 黄奎's avatar 黄奎

1221

parent cca3f200
...@@ -497,10 +497,12 @@ ...@@ -497,10 +497,12 @@
discountMoney: 0 discountMoney: 0
}, },
mainColor: '', mainColor: '',
realCurrentPriceInfo: {} realCurrentPriceInfo: {},
customer: {},
}; };
}, },
created() { created() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "订单支付预览", title: "订单支付预览",
}); });
...@@ -508,6 +510,7 @@ ...@@ -508,6 +510,7 @@
this.activeStyle = `background:${this.mainColor};`; this.activeStyle = `background:${this.mainColor};`;
}, },
onLoad(option) { onLoad(option) {
this.customer = uni.getStorageSync("b2b_user");
if (option.seat) { if (option.seat) {
this.currentPriceInfo = JSON.parse( this.currentPriceInfo = JSON.parse(
decodeURIComponent(option.currentPriceInfo) decodeURIComponent(option.currentPriceInfo)
...@@ -523,6 +526,7 @@ ...@@ -523,6 +526,7 @@
if (option.tcid) { if (option.tcid) {
this.getDetails(option.tcid, option.cityId); this.getDetails(option.tcid, option.cityId);
} }
if (option.lineId) { if (option.lineId) {
this.lineId = option.lineId this.lineId = option.lineId
this.getUserCouponList() this.getUserCouponList()
...@@ -535,7 +539,6 @@ ...@@ -535,7 +539,6 @@
closeCouponHandler(e) { closeCouponHandler(e) {
if (e != -1) { if (e != -1) {
this.useCouponId = e; this.useCouponId = e;
//this.getData();
this.currentCoupon = this.couponList.find(x => x.id == this.useCouponId) this.currentCoupon = this.couponList.find(x => x.id == this.useCouponId)
if (this.currentCoupon.couponsType == 1) { if (this.currentCoupon.couponsType == 1) {
this.currentCoupon.discountMoney = this.currentCoupon.denomination this.currentCoupon.discountMoney = this.currentCoupon.denomination
...@@ -547,18 +550,29 @@ ...@@ -547,18 +550,29 @@
this.showCoupon = false; this.showCoupon = false;
}, },
getUserCouponList() { getUserCouponList() {
let params = { let couponParams = {
"lineId": this.lineId, "lineId": this.lineId, //线路ID
"lineteamId": 0, "lineteamId": 0, //系列ID
"CouponsUseScope": 2 "userId": 0, //AccountId
"CouponsUseScope": 2, //特定使用平台
"isExpansion": 0, //是否启动膨胀金1-是
"CustomerType": 0, //客户类型 0-同行,1-直客
} }
this.javaApipost('b2b/user/getUserCanUseCouponList', params, (res) => { couponParams.userId = this.customer.accountId;
if (res.resultCode == 1) { console.log("this.customer", this.customer);
this.couponList = res.data console.log("couponParams", couponParams);
this.apipost(
"coupon_post_GetUserCanUseCouponList", couponParams,
(res) => {
console.log("coupon_post_GetUserCanUseCouponList", res);
if (res.resultCode == 1) {
this.couponList = res.data
}
},
(err) => {
console.log("coupon_post_GetUserCanUseCouponList_err", err);
} }
}, (err) => { );
console.log(err)
})
}, },
changecheckbox(e, index, item) { changecheckbox(e, index, item) {
if (item.IsHightSchool) { if (item.IsHightSchool) {
...@@ -599,10 +613,9 @@ ...@@ -599,10 +613,9 @@
}, },
getCouponActivityHandler(d) { getCouponActivityHandler(d) {
uni.hideLoading(); uni.hideLoading();
var customer = uni.getStorageSync("b2b_user")
let msg = { let msg = {
TCID: d.currentPriceInfo.tcid, TCID: d.currentPriceInfo.tcid,
CustomerId: customer.customerId, CustomerId: this.customer.customerId,
OrderId: 0, OrderId: 0,
StratDate: d.currentPriceInfo.startDate, StratDate: d.currentPriceInfo.startDate,
OrderGuest: this.total, OrderGuest: this.total,
...@@ -709,7 +722,7 @@ ...@@ -709,7 +722,7 @@
}, },
//去支付 //去支付
goPay() { goPay() {
let b2b_user_info = uni.getStorageSync("b2b_user")
// 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({
...@@ -736,7 +749,7 @@ ...@@ -736,7 +749,7 @@
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 = b2b_user_info.customerId //this.basedataObj.virtualB2BCustomerId; var CustomerId = this.customer.customerId
let newobj = JSON.parse(JSON.stringify(this.GuestList)); let newobj = JSON.parse(JSON.stringify(this.GuestList));
newobj.forEach((x) => { newobj.forEach((x) => {
if (x.IsHightSchool) { if (x.IsHightSchool) {
...@@ -749,15 +762,11 @@ ...@@ -749,15 +762,11 @@
if (this.userInfo && this.userInfo.UserId) { if (this.userInfo && this.userInfo.UserId) {
MiniAppUserId = this.userInfo.UserId; MiniAppUserId = this.userInfo.UserId;
} }
console.log("b2b_user_info", b2b_user_info);
var ContactName = b2b_user_info.name; //联系人 var ContactName = this.customer.name; //联系人
var ContactMobile = b2b_user_info.contactNumber; //联系电话 var ContactMobile = this.customer.contactNumber; //联系电话
var CustomerType = b2b_user_info.isMember //4; var CustomerType = this.customer.isMember //4;
var DirectCustomerId = 0; //直客Id
if (b2b_user_info.customerType == 1) {
CustomerType = 3; //直客
DirectCustomerId = b2b_user_info.directCustomerId;
}
var price = 0; var price = 0;
if (this.$utils.getretailer()) { if (this.$utils.getretailer()) {
price = this.currentPriceInfo.b2BPrice; price = this.currentPriceInfo.b2BPrice;
...@@ -784,7 +793,7 @@ ...@@ -784,7 +793,7 @@
BabyNum: this.orderMsg.BabyNum, BabyNum: this.orderMsg.BabyNum,
OldPeopleNum: 0, OldPeopleNum: 0,
SingleRoomNum: 0, SingleRoomNum: 0,
PreferPrice: this.price, PreferPrice: this.price,
YSeatNum: this.orderMsg.ManNum + this.orderMsg.ChirdNum, YSeatNum: this.orderMsg.ManNum + this.orderMsg.ChirdNum,
ESeatNum: 0, ESeatNum: 0,
FSeatNum: 0, FSeatNum: 0,
...@@ -816,7 +825,7 @@ ...@@ -816,7 +825,7 @@
CommissionSharePeople: 0, CommissionSharePeople: 0,
CommissionShareMoney: 0, CommissionShareMoney: 0,
MiniAppUserId: MiniAppUserId, MiniAppUserId: MiniAppUserId,
DirectCustomerId: DirectCustomerId, //直客Id DirectCustomerId: 0, //直客Id
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
OrderSource: 5, OrderSource: 5,
// #endif // #endif
......
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