Commit 02ed8eee authored by youjie's avatar youjie

线路

parent 728cbc7d
...@@ -305,7 +305,6 @@ ...@@ -305,7 +305,6 @@
for (let i = 0; i < this.count; i++) { for (let i = 0; i < this.count; i++) {
var days = []; var days = [];
var week = 0; var week = 0;
// #ifdef MP-DI
for (var j = 0; j < new Date(year, month + 1, 0).getDate(); j++) { for (var j = 0; j < new Date(year, month + 1, 0).getDate(); j++) {
let isexsit = false; let isexsit = false;
const m = month + 1 > 9 ? month + 1 : "0" + (month + 1); const m = month + 1 > 9 ? month + 1 : "0" + (month + 1);
...@@ -315,28 +314,12 @@ ...@@ -315,28 +314,12 @@
if (price) { if (price) {
isexsit = true isexsit = true
if (price.remainNum > 0){ if (price.remainNum > 0){
// #ifdef MP-DI
days.push(price.b2CPrice) days.push(price.b2CPrice)
} // #endif
else if (price.isSubstitution == 1) // #ifdef MP-AG
days.push(-2)
else
days.push(-1)
} else {
days.push(0);
}
}
// #endif
// #ifdef MP-AG
for (var j = 0; j < new Date(year, month + 1, 0).getDate(); j++) {
let isexsit = false;
const m = month + 1 > 9 ? month + 1 : "0" + (month + 1);
const d = j + 1 > 9 ? j + 1 : "0" + (j + 1);
const ds = `${year}-${m}-${d}`
const price = this.priceList.find(p => p.startDate == ds)
if (price) {
isexsit = true
if (price.remainNum > 0){
days.push(price.b2BPrice) days.push(price.b2BPrice)
// #endif
} }
else if (price.isSubstitution == 1) else if (price.isSubstitution == 1)
days.push(-2) days.push(-2)
...@@ -345,34 +328,7 @@ ...@@ -345,34 +328,7 @@
} else { } else {
days.push(0); days.push(0);
} }
console.log(this.priceList.length, new Date(year, month + 1, 0).getDate(), price)
// for (var k = 0; k < this.priceList.length; k++) {
// const x = this.priceList[k];
// console.log(x)
// }
// this.priceList.forEach((x) => {
// let m = month + 1 > 9 ? month + 1 : "0" + (month + 1);
// let d = j + 1 > 9 ? j + 1 : "0" + (j + 1);
// //console.log(x.startDate+'-----'+`${year}-${m}-${d}`)
// if (x.startDate == `${year}-${m}-${d}`) {
// isexsit = true;
// if (x.remainNum > 0) {
// let priceNum = 0
// // #ifdef MP-DI
// priceNum = x.b2CPrice
// // #endif
// // #ifdef MP-AG
// priceNum = x.b2BPrice
// // #endif
// days.push(priceNum);
// //days.push(x.b2CPrice);
// } else {
// days.push(-1);
// }
// }
// });
} }
// #endif
data.push(days); data.push(days);
if (month == 11) { if (month == 11) {
......
...@@ -1426,6 +1426,7 @@ ...@@ -1426,6 +1426,7 @@
}) })
} }
this.customer = uni.getStorageSync("b2b_user"); this.customer = uni.getStorageSync("b2b_user");
console.log(this.customer,'----')
// #ifdef MP-DI // #ifdef MP-DI
this.delMsg.directCustomerId = this.customer.customerId this.delMsg.directCustomerId = this.customer.customerId
// #endif // #endif
......
...@@ -301,6 +301,26 @@ ...@@ -301,6 +301,26 @@
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/zuanshi.png" />即时确认:本产品付款后可快速确认,放心期待您的旅行 <img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/zuanshi.png" />即时确认:本产品付款后可快速确认,放心期待您的旅行
</view> </view>
</view> </view>
<view class="column jz_form">
<view class="form-items">
<view class="label"></view>
<view class="val">
<input type="text" v-model="orderMsg.SurName" placeholder="请输入姓" />
</view>
</view>
<view class="form-items">
<view class="label"></view>
<view class="val">
<input type="text" v-model="customer.name" placeholder="请输入名" />
</view>
</view>
<view class="form-items">
<view class="label">联系电话</view>
<view class="val">
<input type="text" v-model="customer.contactNumber" placeholder="输入电话号码" />
</view>
</view>
</view>
<view> <view>
<textarea class="jz_TextArea" placeholder="请输入备注信息" v-model="Remarks"></textarea> <textarea class="jz_TextArea" placeholder="请输入备注信息" v-model="Remarks"></textarea>
</view> </view>
...@@ -556,7 +576,6 @@ ...@@ -556,7 +576,6 @@
}, },
onLoad(option) { onLoad(option) {
this.customer = uni.getStorageSync("b2b_user"); this.customer = uni.getStorageSync("b2b_user");
console.log(this.customer,'--------');
if (option.currentPriceInfo) { if (option.currentPriceInfo) {
this.currentPriceInfo = JSON.parse( this.currentPriceInfo = JSON.parse(
decodeURIComponent(option.currentPriceInfo) decodeURIComponent(option.currentPriceInfo)
...@@ -586,12 +605,11 @@ ...@@ -586,12 +605,11 @@
getUserInfoHandler() { getUserInfoHandler() {
this.apipost("GetCustomerInfo_post", { Id: this.customer.customerId }, (res) => { this.apipost("GetCustomerInfo_post", { Id: this.customer.customerId }, (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.userInfo = res.data; // this.userInfo = res.data;
console.log(this.userInfo,'----');
} }
}); });
}, },
submitB2COrderHandler(orderId) { submitB2COrderHandler(OrderId) {
let productType = 0 let productType = 0
if (this.currentPriceInfo.teamType == "0") { if (this.currentPriceInfo.teamType == "0") {
//跟团游 //跟团游
...@@ -626,30 +644,70 @@ ...@@ -626,30 +644,70 @@
OrderMake: `${this.currentPriceInfo.startDate}${startCityName}出发 ${guestInfo}`, OrderMake: `${this.currentPriceInfo.startDate}${startCityName}出发 ${guestInfo}`,
TotalPrice: this.price, TotalPrice: this.price,
PreferentialPrice: this.currentCoupon.discountMoney, PreferentialPrice: this.currentCoupon.discountMoney,
ErpOrderId: orderId, ErpOrderId: OrderId,
Country: '', Country: 0,
PlatformTax: 0, PlatformTax: 0,
Income: 0, Income: 0,
Refund: 0, Refund: 0,
MallBaseId: this.userInfo.MallBaseId,
}; };
this.apipost("AddOrderInfo_post", msg, (res) => { this.apipost("AddOrderInfo_post", msg, (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.orderInfo = res.data
console.log(this.orderInfo,'----orderInfo');
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '订单创建成功' title: '订单创建成功'
}) })
this.goPayHandler(res.data); this.goPayHandler(OrderId);
} else { } else {
uni.showToast({ uni.showToast({
title:res.message, title:res.message,
icon:'none', icon:'none',
duration:3000 duration:3000
}) })
this.submit = false;
} }
}); });
}, },
goPayHandler(pay) { goPayHandler(OrderId) {
//pay.OrderNo //pay.OrderNo
let that = this;
uni.requestPayment({
provider: "wxpay",
timeStamp: this.orderInfo.timeStamp,
nonceStr: this.orderInfo.nonceStr,
package: this.orderInfo.package,
signType: this.orderInfo.signType,
paySign: this.orderInfo.sign,
success: function(res) {
console.log("success", res);
this.submit = false;
uni.showToast({
title: "支付成功",
});
setTimeout(() => {
uni.redirectTo({
url: "/pages/jiuzhai/paysuccess?PreferPrice=" +
this.price +
"&isFrom=1",
});
}, 100);
},
fail: function(err) {
console.log("fail:", err);
this.submit = false;
uni.showToast({
title: "支付失败",
icon: "none",
});
setTimeout(() => {
uni.redirectTo({
url: "/pages/jiuzhai/jz_SureOrder?orderId=" + OrderId,
});
}, 100);
},
});
}, },
showCouponHandler() { showCouponHandler() {
this.showCoupon = this.couponList.length > 0; this.showCoupon = this.couponList.length > 0;
...@@ -687,7 +745,12 @@ ...@@ -687,7 +745,12 @@
"userId": 0, //AccountId "userId": 0, //AccountId
"CouponsUseScope": 2, //特定使用平台(当地游=8 跟团游=2 小包团=10) "CouponsUseScope": 2, //特定使用平台(当地游=8 跟团游=2 小包团=10)
"isExpansion": 0, //是否启动膨胀金1-是 "isExpansion": 0, //是否启动膨胀金1-是
// #ifdef MP-DI
"CustomerType": 1, //客户类型 0-同行,1-直客
// #endif
// #ifdef MP-AG
"CustomerType": 0, //客户类型 0-同行,1-直客 "CustomerType": 0, //客户类型 0-同行,1-直客
// #endif
"TCID": this.currentPriceInfo.tcid, "TCID": this.currentPriceInfo.tcid,
} }
console.log("this.currentPriceInfo", this.currentPriceInfo); console.log("this.currentPriceInfo", this.currentPriceInfo);
...@@ -915,7 +978,13 @@ ...@@ -915,7 +978,13 @@
var ContactName = this.customer.name; //联系人 var ContactName = this.customer.name; //联系人
var ContactMobile = this.customer.contactNumber; //联系电话 var ContactMobile = this.customer.contactNumber; //联系电话
var CustomerType = this.customer.isMember //4; var CustomerType = 0;
// #ifdef MP-DI
CustomerType = 4;
// #endif
// #ifdef MP-AG
CustomerType = this.customer.isMember
// #endif
var CustomerCreateBy = this.customer.createBy; var CustomerCreateBy = this.customer.createBy;
var price = 0; var price = 0;
var CreateBy = 0 var CreateBy = 0
...@@ -985,15 +1054,27 @@ ...@@ -985,15 +1054,27 @@
MiniAppUserId: MiniAppUserId, MiniAppUserId: MiniAppUserId,
CreateBy: CreateBy, //同行联系人创建人 CustomerCreateBy CreateBy: CreateBy, //同行联系人创建人 CustomerCreateBy
DirectCustomerId: DirectCustomerId, //直客Id DirectCustomerId: DirectCustomerId, //直客Id
// #ifdef MP-WEIXIN // #ifdef MP-DI
OrderSource: 7,
// #endif
// #ifdef MP-AG
OrderSource: 5, OrderSource: 5,
// #endif // #endif
// // #ifdef MP-WEIXIN
// OrderSource: 5,
// // #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: newobj,
// #ifdef MP-DI
ClientType: 2,
// #endif
// #ifdef MP-AG
ClientType: 1,
// #endif
}; };
if (this.realCurrentPriceInfo.priceUnion) { if (this.realCurrentPriceInfo.priceUnion) {
msg.DepartureCityId = this.realCurrentPriceInfo.priceUnion.unionCityId msg.DepartureCityId = this.realCurrentPriceInfo.priceUnion.unionCityId
......
...@@ -523,7 +523,12 @@ ...@@ -523,7 +523,12 @@
"userId": this.customer.accountId, //AccountId "userId": this.customer.accountId, //AccountId
"CouponsUseScope": 3, //特定使用平台(当地游=8 跟团游=2 小包团=10) "CouponsUseScope": 3, //特定使用平台(当地游=8 跟团游=2 小包团=10)
"isExpansion": 0, //是否启动膨胀金1-是 "isExpansion": 0, //是否启动膨胀金1-是
// #ifdef MP-DI
"CustomerType": 1, //客户类型 0-同行,1-直客
// #endif
// #ifdef MP-AG
"CustomerType": 0, //客户类型 0-同行,1-直客 "CustomerType": 0, //客户类型 0-同行,1-直客
// #endif
"TCID": '', "TCID": '',
} }
this.apipost( this.apipost(
......
...@@ -1241,7 +1241,12 @@ ...@@ -1241,7 +1241,12 @@
TotalPrice: this.price,//总价 TotalPrice: this.price,//总价
CustomerId: this.customer.customerId,//客户id CustomerId: this.customer.customerId,//客户id
CreateBy: this.CreateBy,//销售 CreateBy: this.CreateBy,//销售
// #ifdef MP-DI
OrderSource: 7,
// #endif
// #ifdef MP-AG
OrderSource: 5,//1-ERP,2-B2B订单,3-B2C订单,4wap 5同业 6支付宝 OrderSource: 5,//1-ERP,2-B2B订单,3-B2C订单,4wap 5同业 6支付宝
// #endif
EnterCountryTime: this.orderMsg.EnterCountryTime,//入境时间 EnterCountryTime: this.orderMsg.EnterCountryTime,//入境时间
GuestList: [],//this.guests GuestList: [],//this.guests
VisaOrderRelation:{ VisaOrderRelation:{
...@@ -1260,7 +1265,12 @@ ...@@ -1260,7 +1265,12 @@
RelationPhoneType: this.orderMsg.RelationPhoneType,// 手机号码归属国家 RelationPhoneType: this.orderMsg.RelationPhoneType,// 手机号码归属国家
}, },
OrderForm: 0,//1电脑端 OrderForm: 0,//1电脑端
ClientType: 1,//客户类型 1同业 2直客 // #ifdef MP-DI
ClientType: 2,//客户类型 1同业 2直客
// #endif
// #ifdef MP-AG
ClientType: 1,
// #endif
Remark: this.orderMsg.Remark, Remark: this.orderMsg.Remark,
CouponAllotIds: CouponAllotIds, CouponAllotIds: CouponAllotIds,
}; };
......
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