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

1221

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