Commit 6e29e93c authored by 罗超's avatar 罗超

Merge branch 'B2C' of http://gitlab.oytour.com/zk123/jz_travel into B2C

parents acb83a1c 33ea8d04
...@@ -54,7 +54,12 @@ ...@@ -54,7 +54,12 @@
</view> </view>
<text style="color:#FF3166;font-size: 22rpx;">¥</text> <text style="color:#FF3166;font-size: 22rpx;">¥</text>
<view style="font-weight: bold;font-size: 24rpx;color:#FF3166"> <view style="font-weight: bold;font-size: 24rpx;color:#FF3166">
{{ f.B2BPrice }} <!-- #ifdef MP-DI -->
{{f.B2CPrice}}
<!-- #endif-->
<!-- #ifdef MP-AG -->
{{f.B2BPrice}}
<!-- #endif -->
</view> </view>
<u-icon name='arrow_right' custom-prefix="tffont" color="#00000066" size="28"></u-icon> <u-icon name='arrow_right' custom-prefix="tffont" color="#00000066" size="28"></u-icon>
</view> </view>
......
...@@ -85,7 +85,14 @@ ...@@ -85,7 +85,14 @@
<view class="col"> <view class="col">
<text style="font-size: 22rpx;color: #A4A4A4;font-weight: 400;">仅需:</text> <text style="font-size: 22rpx;color: #A4A4A4;font-weight: 400;">仅需:</text>
<text style="color:#FF3166;font-size: 22rpx;">¥</text> <text style="color:#FF3166;font-size: 22rpx;">¥</text>
<text style="font-size: 32rpx;font-weight: bold;color:#FF3166;">{{x.Flight.B2BPrice}}</text> <text style="font-size: 32rpx;font-weight: bold;color:#FF3166;">
<!-- #ifdef MP-DI-->
{{x.Flight.B2CPrice}}
<!-- #endif-->
<!-- #ifdef MP-AG-->
{{x.Flight.B2BPrice}}
<!-- #endif -->
</text>
</view> </view>
<view class="more-date" @click="openFlightHandle(x,1)">更多日期</view> <view class="more-date" @click="openFlightHandle(x,1)">更多日期</view>
</view> </view>
......
...@@ -109,13 +109,27 @@ ...@@ -109,13 +109,27 @@
<view class="col"> <view class="col">
<text style="margin-right: 30rpx">成人</text> <text style="margin-right: 30rpx">成人</text>
</view> </view>
<view>{{ crCount }}人 × ¥{{flight.B2BPrice}}</view> <view>{{ crCount }}人 × ¥
<!-- #ifdef MP-DI-->
{{flight.B2CPrice}}
<!-- #endif-->
<!-- #ifdef MP-AG-->
{{flight.B2BPrice}}
<!-- #endif -->
</view>
</view> </view>
<view v-if="etCount>0" class="row items-center price-list-details"> <view v-if="etCount>0" class="row items-center price-list-details">
<view class="col"> <view class="col">
<text style="margin-right: 30rpx">儿童</text> <text style="margin-right: 30rpx">儿童</text>
</view> </view>
<view>{{ etCount }}人 × ¥{{flight.B2BPrice}}</view> <view>{{ etCount }}人 × ¥
<!-- #ifdef MP-DI-->
{{flight.B2CPrice}}
<!-- #endif-->
<!-- #ifdef MP-AG-->
{{flight.B2BPrice}}
<!-- #endif -->
</view>
</view> </view>
<view v-if="babyCount>0" class="row items-center price-list-details"> <view v-if="babyCount>0" class="row items-center price-list-details">
<view class="col"> <view class="col">
...@@ -239,7 +253,13 @@ ...@@ -239,7 +253,13 @@
computed: { computed: {
price() { price() {
if (!this.flight) return 0 if (!this.flight) return 0
const p = this.flight.B2BPrice let p = 0
//#ifdef MP-DI
p = this.flight.B2CPrice
//#endif
//#ifdef MP-AG
p = this.flight.B2BPrice
//#endif
if (this.guest.length == 1) return p if (this.guest.length == 1) return p
const f = this.guest.filter(x => x.year > 1).length const f = this.guest.filter(x => x.year > 1).length
const b = this.guest.filter(x => x.year < 2).length const b = this.guest.filter(x => x.year < 2).length
...@@ -248,7 +268,13 @@ ...@@ -248,7 +268,13 @@
}, },
babyPrice() { babyPrice() {
if (!this.flight) return 0 if (!this.flight) return 0
const p = this.flight.B2BPrice let p = 0
//#ifdef MP-DI
p = this.flight.B2CPrice
//#endif
//#ifdef MP-AG
p = this.flight.B2BPrice
//#endif
let bp = this.flight.BabyPrecent let bp = this.flight.BabyPrecent
bp = bp && bp != '' ? (parseFloat(bp) / 100.00) : 0 bp = bp && bp != '' ? (parseFloat(bp) / 100.00) : 0
...@@ -288,7 +314,12 @@ ...@@ -288,7 +314,12 @@
this.mainColor = this.$uiConfig.mainColor this.mainColor = this.$uiConfig.mainColor
this.customer = uni.getStorageSync("b2b_user"); this.customer = uni.getStorageSync("b2b_user");
this.getUserCouponList() this.getUserCouponList()
// #ifdef MP-DI
this.createBy.CreateBy = this.customer.pid
// #endif
// #ifdef MP-AG
this.getSalesHandle() this.getSalesHandle()
// #endif
}, },
methods: { methods: {
getSalesHandle(){ getSalesHandle(){
...@@ -370,6 +401,13 @@ ...@@ -370,6 +401,13 @@
} }
return n return n
}) })
let PriceNum = 0
//#ifdef MP-DI
PriceNum = this.flight.B2CPrice
//#endif
//#ifdef MP-AG
PriceNum = this.flight.B2CPrice
//#endif
const p = { const p = {
OrderId:0, OrderId:0,
TCID:this.id, TCID:this.id,
...@@ -379,8 +417,8 @@ ...@@ -379,8 +417,8 @@
ContactMobile:this.contactPhone, ContactMobile:this.contactPhone,
CustomerId:this.customer.customerId, CustomerId:this.customer.customerId,
OrderSource:5, OrderSource:5,
Unit_Price:this.flight.B2BPrice, Unit_Price:PriceNum,
TC_Price:this.flight.B2BPrice, TC_Price:PriceNum,
CouponAllotIds:this.useCouponId.join(','), CouponAllotIds:this.useCouponId.join(','),
ManNum:this.crCount, ManNum:this.crCount,
ChirdNum:this.etCount, ChirdNum:this.etCount,
......
...@@ -34,7 +34,14 @@ ...@@ -34,7 +34,14 @@
:class="{'active':currentDate==x.FlightDate}" v-for="(x,i) in lowHeadData" :key="i"> :class="{'active':currentDate==x.FlightDate}" v-for="(x,i) in lowHeadData" :key="i">
<view class="">{{x.FlightDate.split('-').splice(1,2).join('-')}}</view> <view class="">{{x.FlightDate.split('-').splice(1,2).join('-')}}</view>
<view style="margin: 10rpx 0;">{{x.WeekDayStr}}</view> <view style="margin: 10rpx 0;">{{x.WeekDayStr}}</view>
<view class="">¥{{x.B2BPrice}}</view> <view class="">¥
<!-- #ifdef MP-DI-->
{{x.B2CPrice}}
<!-- #endif-->
<!-- #ifdef MP-AG-->
{{x.B2BPrice}}
<!-- #endif -->
</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
...@@ -135,7 +142,14 @@ ...@@ -135,7 +142,14 @@
<view> <view>
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<text class="big">{{x.B2BPrice}}</text> <text class="big">
<!-- #ifdef MP-DI-->
{{x.B2CPrice}}
<!-- #endif-->
<!-- #ifdef MP-AG-->
{{x.B2BPrice}}
<!-- #endif -->
</text>
</view> </view>
<view class="num row items-center"> <view class="num row items-center">
<text style="padding: 6rpx;width: 56rpx;" class="text-center"></text> <text style="padding: 6rpx;width: 56rpx;" class="text-center"></text>
...@@ -259,7 +273,12 @@ ...@@ -259,7 +273,12 @@
case 1: case 1:
return flights.sort((a, b) => this.getFlightDuration(a) - this.getFlightDuration(b)); return flights.sort((a, b) => this.getFlightDuration(a) - this.getFlightDuration(b));
case 2: case 2:
// #ifdef MP-DI
return flights.sort((a, b) => a.B2CPrice - b.B2CPrice);
// #endif
// #ifdef MP-AG
return flights.sort((a, b) => a.B2BPrice - b.B2BPrice); return flights.sort((a, b) => a.B2BPrice - b.B2BPrice);
// #endif
case 3: case 3:
return flights.filter(flight => flight.GoFlightList.length === 1 && flight.BackFlightList.length === 1); return flights.filter(flight => flight.GoFlightList.length === 1 && flight.BackFlightList.length === 1);
default: default:
...@@ -399,11 +418,22 @@ ...@@ -399,11 +418,22 @@
const arr = item.FlightDate.split('-') const arr = item.FlightDate.split('-')
const groupValue = `${arr[0]}${Number(arr[1])}${Number(arr[2])}`; const groupValue = `${arr[0]}${Number(arr[1])}${Number(arr[2])}`;
const currentPrice = item.B2BPrice; const currentPrice = item.B2BPrice;
const currentB2CPrice = item.B2CPrice;
if (!acc[groupValue]) { if (!acc[groupValue]) {
// #ifdef MP-DI
acc[groupValue] = '¥'+currentB2CPrice;
// #endif
// #ifdef MP-AG
acc[groupValue] = '¥'+currentPrice; acc[groupValue] = '¥'+currentPrice;
// #endif
} else { } else {
// #ifdef MP-DI
acc[groupValue] = '¥'+Math.min(parseFloat(acc[groupValue].replaceAll('¥','')), currentB2CPrice);
// #endif
// #ifdef MP-AG
acc[groupValue] = '¥'+Math.min(parseFloat(acc[groupValue].replaceAll('¥','')), currentPrice); acc[groupValue] = '¥'+Math.min(parseFloat(acc[groupValue].replaceAll('¥','')), currentPrice);
// #endif
} }
return acc; return acc;
...@@ -425,15 +455,18 @@ ...@@ -425,15 +455,18 @@
const result = d.reduce((acc, item) => { const result = d.reduce((acc, item) => {
const groupValue = item.FlightDate; const groupValue = item.FlightDate;
const currentPrice = item.B2BPrice; const currentPrice = item.B2BPrice;
const currentB2CPrice = item.B2CPrice;
if (!acc[groupValue]) { if (!acc[groupValue]) {
acc[groupValue] = { acc[groupValue] = {
FlightDate: groupValue, FlightDate: groupValue,
B2BPrice: currentPrice, B2BPrice: currentPrice,
B2CPrice: currentB2CPrice,
WeekDayStr: item.WeekDayStr WeekDayStr: item.WeekDayStr
}; };
} else { } else {
acc[groupValue].B2BPrice = Math.min(acc[groupValue].B2BPrice, currentPrice); acc[groupValue].B2BPrice = Math.min(acc[groupValue].B2BPrice, currentPrice);
acc[groupValue].B2CPrice = Math.min(acc[groupValue].B2CPrice, currentB2CPrice);
} }
return acc; return acc;
......
...@@ -54,8 +54,8 @@ ...@@ -54,8 +54,8 @@
<view class="cdTiaojianBRText" v-if="g.remark&&g.remark!=''">备注:{{ g.remark }}</view> <view class="cdTiaojianBRText" v-if="g.remark&&g.remark!=''">备注:{{ g.remark }}</view>
</view> </view>
</view> </view>
<view class="cdTiaojianButtom" v-if="type==1" @click="gouseUrl(g)">立即使用</view> <view class="cdTiaojianButtom" v-if="type==1" @click="gouseUrl()">立即使用</view>
<view class="cdTiaojianButtom" v-else @click="g.couponReceiveCount==0?receive(g.couponReceiveCount):gouseUrl(g)">{{ g.couponReceiveCount==0?'立即领取':'立即使用' }}</view> <view class="cdTiaojianButtom" v-else @click="g.couponReceiveCount==0?receive():gouseUrl()">{{ g.couponReceiveCount==0?'立即领取':'立即使用' }}</view>
</view> </view>
</view> </view>
...@@ -108,9 +108,9 @@ ...@@ -108,9 +108,9 @@
return num return num
}, },
receive(id){ receive(){
this.apipost("b2c_post_CustomerGrantCoupon", { this.apipost("b2c_post_CustomerGrantCoupon", {
Id: id Id: this.g.id
}, (res) => { }, (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
uni.showToast({ uni.showToast({
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
}, },
gouseUrl(g) { gouseUrl() {
uni.redirectTo({ uni.redirectTo({
url: '/pages/index/index' url: '/pages/index/index'
}); });
......
...@@ -305,6 +305,7 @@ ...@@ -305,6 +305,7 @@
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);
...@@ -314,14 +315,28 @@ ...@@ -314,14 +315,28 @@
if (price) { if (price) {
isexsit = true isexsit = true
if (price.remainNum > 0){ if (price.remainNum > 0){
let priceNum = 0 days.push(price.b2CPrice)
// #ifdef MP-DI }
priceNum = price.b2CPrice else if (price.isSubstitution == 1)
/// #endif days.push(-2)
else
days.push(-1)
} else {
days.push(0);
}
}
// #endif
// #ifdef MP-AG // #ifdef MP-AG
priceNum = price.b2BPrice for (var j = 0; j < new Date(year, month + 1, 0).getDate(); j++) {
/// #endif let isexsit = false;
days.push(priceNum) 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)
} }
else if (price.isSubstitution == 1) else if (price.isSubstitution == 1)
days.push(-2) days.push(-2)
...@@ -357,6 +372,8 @@ ...@@ -357,6 +372,8 @@
// } // }
// }); // });
} }
// #endif
data.push(days); data.push(days);
if (month == 11) { if (month == 11) {
year += 1; year += 1;
......
...@@ -1086,7 +1086,7 @@ ...@@ -1086,7 +1086,7 @@
</view> </view>
<view class="line-flex" style="padding: 30rpx; background: #fff" <view class="line-flex" style="padding: 30rpx; background: #fff"
v-if="createBy==0&&SaleList&&SaleList.length>1" @click="showSalePreviwe=true"> v-if="createBy==0&&SaleList&&SaleList.length>1" @click="showSalePreviwe=true">
<text style="font-size: 28rpx; color: #111; font-weight: 500">销售</text> <text style="font-size: 28rpx; color: #111; font-weight: 500">服务人员</text>
<text style=" <text style="
font-size: 22rpx; font-size: 22rpx;
color: #999; color: #999;
...@@ -1206,7 +1206,7 @@ ...@@ -1206,7 +1206,7 @@
<u-popup v-model="showSalePreviwe" mode="bottom" border-radius="50" length="60%" :safe-area-inset-bottom="true"> <u-popup v-model="showSalePreviwe" mode="bottom" border-radius="50" length="60%" :safe-area-inset-bottom="true">
<view> <view>
<view style="font-size: 17px;text-align: center;padding: 20px 0;"> <view style="font-size: 17px;text-align: center;padding: 20px 0;">
选择销售 选择服务人员
</view> </view>
<scroll-view scroll-x="true" style="width: 100%;height: 43vh;"> <scroll-view scroll-x="true" style="width: 100%;height: 43vh;">
<view class="SaleBox"> <view class="SaleBox">
...@@ -1426,7 +1426,12 @@ ...@@ -1426,7 +1426,12 @@
}) })
} }
this.customer = uni.getStorageSync("b2b_user"); this.customer = uni.getStorageSync("b2b_user");
// #ifdef MP-DI
this.delMsg.directCustomerId = this.customer.customerId
// #endif
// #ifdef MP-AG
this.delMsg.customerId = this.customer.customerId this.delMsg.customerId = this.customer.customerId
// #endif
if (!option.scene) { if (!option.scene) {
if (option.lineId) { if (option.lineId) {
this.delMsg.lineId = option.lineId; this.delMsg.lineId = option.lineId;
...@@ -1554,7 +1559,13 @@ ...@@ -1554,7 +1559,13 @@
this.couponList.forEach(x=>{ this.couponList.forEach(x=>{
if(x.couponsType==1 && x.denomination>this.maxCouponDiscount) this.maxCouponDiscount=x.denomination if(x.couponsType==1 && x.denomination>this.maxCouponDiscount) this.maxCouponDiscount=x.denomination
if(x.couponsType==2){ if(x.couponsType==2){
const disMoney = this.currentPrice.b2BPrice*(1-x.denomination) let disMoney = 0
// #ifdef MP-DI
disMoney = this.currentPrice.b2CPrice*(1-x.denomination)
// #endif
// #ifdef MP-AG
disMoney = this.currentPrice.b2BPrice*(1-x.denomination)
// #endif
this.maxCouponDiscount = this.maxCouponDiscount<disMoney?disMoney:this.maxCouponDiscount this.maxCouponDiscount = this.maxCouponDiscount<disMoney?disMoney:this.maxCouponDiscount
} }
}) })
...@@ -2023,14 +2034,16 @@ ...@@ -2023,14 +2034,16 @@
this.is_show_auth = 1; this.is_show_auth = 1;
return; return;
} }
// #ifdef MP-AG
if (this.SaleList&&this.SaleList.length>1&&this.SaleId==0&&this.createBy==0) { if (this.SaleList&&this.SaleList.length>1&&this.SaleId==0&&this.createBy==0) {
uni.showToast({ uni.showToast({
title: "请选择销售", title: "请选择服务人员",
icon: "none", icon: "none",
}); });
this.showSalePreviwe = true; this.showSalePreviwe = true;
return; return;
} }
// #endif
let myObj = {}; let myObj = {};
myObj.startCityName = this.dataList.startCityName; myObj.startCityName = this.dataList.startCityName;
myObj.startDate = this.currentPrice.startDate; myObj.startDate = this.currentPrice.startDate;
...@@ -2057,7 +2070,15 @@ ...@@ -2057,7 +2070,15 @@
yeCount: this.yeCount, //婴儿 yeCount: this.yeCount, //婴儿
etbCount: this.etbCount, //儿童不占床 etbCount: this.etbCount, //儿童不占床
}; };
let createBy = this.createBy>0?this.createBy:this.SaleId
let createBy = 0
// #ifdef MP-DI
createBy = this.createBy>0?this.createBy:this.customer.pid
// #endif
// #ifdef MP-AG
if(this.createBy>0||this.SaleId) createBy = this.createBy>0?this.createBy:this.SaleId
// #endif
let tParams = "&tcid=" + let tParams = "&tcid=" +
this.delMsg.tcid + this.delMsg.tcid +
"&cityId=" + "&cityId=" +
......
...@@ -343,34 +343,40 @@ ...@@ -343,34 +343,40 @@
<view style="flex: 1"> <view style="flex: 1">
<text style="margin-right: 30rpx">成人</text> <text style="margin-right: 30rpx">成人</text>
</view> </view>
<view style="text-align: right">{{ orderMsg.ManNum }}人 × ¥{{ $utils.getretailer()?currentPriceInfo.b2BPrice :currentPriceInfo.b2CPrice <view style="text-align: right">{{ orderMsg.ManNum }}人 × ¥
}}</view> <!-- #ifdef MP-DI -->
{{ currentPriceInfo.b2CPrice }}
<!-- #endif -->
<!-- #ifdef MP-AG -->
{{ currentPriceInfo.b2BPrice }}
<!-- #endif -->
</view>
</view> </view>
<view class="flex f12 grey" style="margin-bottom: 40rpx" :key="index" v-if="orderMsg.ChirdNeedBedNum > 0"> <view class="flex f12 grey" style="margin-bottom: 40rpx" :key="index" v-if="orderMsg.ChirdNeedBedNum > 0">
<view style="flex: 1"> <view style="flex: 1">
<text style="margin-right: 30rpx">儿童(占床)</text> <text style="margin-right: 30rpx">儿童(占床)</text>
</view> </view>
<view style="text-align: right">{{ orderMsg.ChirdNeedBedNum }}人 × ¥{{ <view style="text-align: right">{{ orderMsg.ChirdNeedBedNum }}人 × ¥
($utils.getretailer() <!-- #ifdef MP-DI -->
? currentPriceInfo.b2BPrice {{ currentPriceInfo.b2CPrice+(currentPriceInfo.childNeedPrice? currentPriceInfo.childNeedPrice: 0) }}
: currentPriceInfo.b2CPrice) + <!-- #endif -->
(currentPriceInfo.childNeedPrice <!-- #ifdef MP-AG -->
? currentPriceInfo.childNeedPrice {{ currentPriceInfo.b2BPrice+(currentPriceInfo.childNeedPrice? currentPriceInfo.childNeedPrice: 0) }}
: 0) <!-- #endif -->
}}</view> </view>
</view> </view>
<view class="flex f12 grey" style="margin-bottom: 40rpx" :key="index" v-if="orderMsg.ChirdNoBedNum > 0"> <view class="flex f12 grey" style="margin-bottom: 40rpx" :key="index" v-if="orderMsg.ChirdNoBedNum > 0">
<view style="flex: 1"> <view style="flex: 1">
<text style="margin-right: 30rpx">儿童(不占床)</text> <text style="margin-right: 30rpx">儿童(不占床)</text>
</view> </view>
<view style="text-align: right">{{ orderMsg.ChirdNoBedNum }}人 × ¥{{ <view style="text-align: right">{{ orderMsg.ChirdNoBedNum }}人 × ¥
($utils.getretailer() <!-- #ifdef MP-DI -->
? currentPriceInfo.b2BPrice {{ currentPriceInfo.b2CPrice-(currentPriceInfo.childNoNeedPrice? currentPriceInfo.childNoNeedPrice: 0) }}
: currentPriceInfo.b2CPrice) - <!-- #endif -->
(currentPriceInfo.childNoNeedPrice <!-- #ifdef MP-AG -->
? currentPriceInfo.childNoNeedPrice {{ currentPriceInfo.b2BPrice-(currentPriceInfo.childNoNeedPrice? currentPriceInfo.childNoNeedPrice: 0) }}
: 0) <!-- #endif -->
}}</view> </view>
</view> </view>
<view class="flex f12 grey" style="margin-bottom: 40rpx" :key="index" v-if="orderMsg.BabyNum > 0"> <view class="flex f12 grey" style="margin-bottom: 40rpx" :key="index" v-if="orderMsg.BabyNum > 0">
<view style="flex: 1"> <view style="flex: 1">
...@@ -446,8 +452,14 @@ ...@@ -446,8 +452,14 @@
</view> </view>
<view style="display: flex; margin-top: -2px"> <view style="display: flex; margin-top: -2px">
<button class="jz_OrderReNow" @click="goPay()" :disabled="submit" :loading="submit"> <button class="jz_OrderReNow" @click="goPay()" :disabled="submit" :loading="submit">
<!-- #ifdef MP-DI -->
立即支付
<!-- #endif -->
<!-- #ifdef MP-AG -->
立即预定 立即预定
<!-- #endif -->
</button> </button>
</view> </view>
</view> </view>
</view> </view>
...@@ -532,6 +544,7 @@ ...@@ -532,6 +544,7 @@
CreateBy: 0, CreateBy: 0,
showPz:false, showPz:false,
pzCoupon:null, pzCoupon:null,
userInfo: {},
}; };
}, },
created() { created() {
...@@ -543,6 +556,7 @@ ...@@ -543,6 +556,7 @@
}, },
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)
...@@ -569,6 +583,74 @@ ...@@ -569,6 +583,74 @@
this.getUserCouponList(); this.getUserCouponList();
}, },
methods: { methods: {
getUserInfoHandler() {
this.apipost("GetCustomerInfo_post", { Id: this.customer.customerId }, (res) => {
if (res.resultCode == 1) {
this.userInfo = res.data;
console.log(this.userInfo,'----');
}
});
},
submitB2COrderHandler(orderId) {
let productType = 0
if (this.currentPriceInfo.teamType == "0") {
//跟团游
productType = 2;
} else if (this.currentPriceInfo.teamType == "1") {
//小包团
productType = 10;
} else if (this.currentPriceInfo.teamType == "2") {
//当地游
productType = 8;
}
let guestInfo = `成人x${this.orderMsg.ManNum}; `;
if (this.orderMsg.ChirdNeedBedNum > 0) {
guestInfo += `占床儿童${this.orderMsg.ChirdNeedBedNum}; `;
}
if (this.orderMsg.ChirdNoBedNum > 0) {
guestInfo += `不占床儿童x${this.orderMsg.ChirdNoBedNum}; `;
}
if (this.orderMsg.BabyNum > 0) {
guestInfo += `婴儿x${this.orderMsg.BabyNum}; `;
}
let startCityName = this.realCurrentPriceInfo.priceUnion && this.realCurrentPriceInfo.priceUnion.startCityName?this.realCurrentPriceInfo.priceUnion.startCityName:this.currentPriceInfo.startCityName
let msg = {
SurName: '',
Name: this.customer.name,
ContactNumber: this.customer.contactNumber,
Mailbox: '',
GoodsId: this.currentPriceInfo.tcid,
GoodsName: this.currentPriceInfo.title,
GoodsPic: this.currentPriceInfo.CoverImg? this.currentPriceInfo.CoverImg : '',
GoodsType: productType,
OrderMake: `${this.currentPriceInfo.startDate}${startCityName}出发 ${guestInfo}`,
TotalPrice: this.price,
PreferentialPrice: this.currentCoupon.discountMoney,
ErpOrderId: orderId,
Country: '',
PlatformTax: 0,
Income: 0,
Refund: 0,
};
this.apipost("AddOrderInfo_post", msg, (res) => {
if (res.resultCode == 1) {
uni.showToast({
icon: 'none',
title: '订单创建成功'
})
this.goPayHandler(res.data);
} else {
uni.showToast({
title:res.message,
icon:'none',
duration:3000
})
}
});
},
goPayHandler(pay) {
//pay.OrderNo
},
showCouponHandler() { showCouponHandler() {
this.showCoupon = this.couponList.length > 0; this.showCoupon = this.couponList.length > 0;
}, },
...@@ -761,11 +843,12 @@ ...@@ -761,11 +843,12 @@
//计算价格 //计算价格
calcMoney() { calcMoney() {
var price = 0; var price = 0;
if (this.$utils.getretailer()) { // #ifdef MP-DI
price = this.currentPriceInfo.b2BPrice;
} else {
price = this.currentPriceInfo.b2CPrice; price = this.currentPriceInfo.b2CPrice;
} // #endif
// #ifdef MP-AG
price = this.currentPriceInfo.b2BPrice;
// #endif
this.orderMsg.ChirdNum = parseInt(this.orderMsg.ChirdNoBedNum) + parseInt(this.orderMsg.ChirdNeedBedNum); this.orderMsg.ChirdNum = parseInt(this.orderMsg.ChirdNoBedNum) + parseInt(this.orderMsg.ChirdNeedBedNum);
//计算总人数 //计算总人数
this.total = parseInt(this.orderMsg.ManNum) + parseInt(this.orderMsg.ChirdNum) + parseInt(this.orderMsg.BabyNum); this.total = parseInt(this.orderMsg.ManNum) + parseInt(this.orderMsg.ChirdNum) + parseInt(this.orderMsg.BabyNum);
...@@ -813,37 +896,6 @@ ...@@ -813,37 +896,6 @@
}, },
//去支付 //去支付
goPay() { goPay() {
// for (var i = 0; i < this.GuestList.length; i++) {
// if (this.GuestList[i].SurName == "") {
// uni.showToast({
// title: `请输入游客${i + 1}的姓名`,
// icon: "none",
// });
// return;
// }
// if (this.GuestList[i].IdCard == "") {
// uni.showToast({
// title: `请输入游客${i + 1}的身份证`,
// icon: "none",
// });
// return;
// }
// if (this.GuestList[i].MobilePhone == "") {
// uni.showToast({
// title: `请输入游客${i + 1}的联系电话`,
// icon: "none",
// });
// return;
// }
// }
if(!this.CreateBy){
uni.showToast({
title: `销售为空,请联系销售人员!`,
icon: "none",
});
return
}
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;
...@@ -866,11 +918,16 @@ ...@@ -866,11 +918,16 @@
var CustomerType = this.customer.isMember //4; var CustomerType = this.customer.isMember //4;
var CustomerCreateBy = this.customer.createBy; var CustomerCreateBy = this.customer.createBy;
var price = 0; var price = 0;
if (this.$utils.getretailer()) { var CreateBy = 0
price = this.currentPriceInfo.b2BPrice; var DirectCustomerId = 0
} else { // #ifdef MP-DI
price = this.currentPriceInfo.b2CPrice; price = this.currentPriceInfo.b2CPrice;
} DirectCustomerId = this.CreateBy
// #endif
// #ifdef MP-AG
price = this.currentPriceInfo.b2BPrice;
CreateBy = this.CreateBy
// #endif
let CouponAllotIds = '' let CouponAllotIds = ''
if(this.useCouponIds.length>0){ if(this.useCouponIds.length>0){
CouponAllotIds = this.useCouponIds.join(',') CouponAllotIds = this.useCouponIds.join(',')
...@@ -926,8 +983,8 @@ ...@@ -926,8 +983,8 @@
CommissionSharePeople: 0, CommissionSharePeople: 0,
CommissionShareMoney: 0, CommissionShareMoney: 0,
MiniAppUserId: MiniAppUserId, MiniAppUserId: MiniAppUserId,
CreateBy: this.CreateBy, //同行联系人创建人 CustomerCreateBy CreateBy: CreateBy, //同行联系人创建人 CustomerCreateBy
DirectCustomerId: 0, //直客Id DirectCustomerId: DirectCustomerId, //直客Id
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
OrderSource: 5, OrderSource: 5,
// #endif // #endif
...@@ -953,6 +1010,10 @@ ...@@ -953,6 +1010,10 @@
if(tempData.CounponList && tempData.CounponList.length>0){ if(tempData.CounponList && tempData.CounponList.length>0){
uni.setStorageSync('coupons',tempData.CounponList) uni.setStorageSync('coupons',tempData.CounponList)
} }
// #ifdef MP-DI
this.submitB2COrderHandler(tempData.OrderId)
// #endif
// #ifdef MP-AG
uni.showToast({ uni.showToast({
title: '订单创建成功.', title: '订单创建成功.',
icon: 'none' icon: 'none'
...@@ -960,6 +1021,8 @@ ...@@ -960,6 +1021,8 @@
uni.redirectTo({ uni.redirectTo({
url: "/pages/jiuzhai/jz_MyOrder", url: "/pages/jiuzhai/jz_MyOrder",
}); });
// #endif
// let data = res.data; // let data = res.data;
// data.CoverImg = this.currentPriceInfo.CoverImg; // data.CoverImg = this.currentPriceInfo.CoverImg;
// let myData = JSON.stringify(data); // let myData = JSON.stringify(data);
...@@ -979,7 +1042,9 @@ ...@@ -979,7 +1042,9 @@
duration:3000 duration:3000
}) })
} }
// #ifdef MP-AG
this.submit = false; this.submit = false;
// #endif
}, },
(e) => { (e) => {
this.submit = false; this.submit = false;
......
...@@ -42,24 +42,40 @@ ...@@ -42,24 +42,40 @@
<view style="padding: 33rpx 30rpx 51rpx 38rpx;"> <view style="padding: 33rpx 30rpx 51rpx 38rpx;">
<view class="jz_LineTitle row items-center"> <view class="jz_LineTitle row items-center">
<view class="col"> <view class="col">
<!-- #ifdef MP-AG -->
<text>原价:</text> <text>原价:</text>
<!-- #endif -->
<text class="jz_renmin">¥</text> <text class="jz_renmin">¥</text>
<text class="jz_B2bPrice"> <text class="jz_B2bPrice">
<!--{{ discountPrice }}--> <!--{{ discountPrice }}-->
{{ $utils.getretailer()?dataList.VisaPrice:dataList.VisaB2CPrice }} <!-- #ifdef MP-DI -->
{{dataList.VisaB2CPrice}}
<!-- #endif -->
<!-- #ifdef MP-AG -->
{{dataList.VisaPrice}}
<!-- #endif -->
</text> </text>
<!-- #ifdef MP-AG -->
<text style="color: #999999; font-size: 28rpx; font-weight: 400">/人</text> <text style="color: #999999; font-size: 28rpx; font-weight: 400">/人</text>
<text style="font-size: 13px;color:#111;margin-left: 10px;"> <text style="font-size: 13px;color:#111;margin-left: 10px;">
直客价:<text style="font-size: 20rpx;">¥</text>{{ dataList.VisaB2CPrice}} 直客价:<text style="font-size: 20rpx;">¥</text>{{ dataList.VisaB2CPrice}}
</text> </text>
<!-- #endif -->
</view> </view>
</view> </view>
<view class="jz_LineDetaYJDKQ" style="padding: 0rpx 0 0 0;" v-if="couponList.length>0||TotalDiscount>0"> <view class="jz_LineDetaYJDKQ" style="padding: 0rpx 0 0 0;" v-if="couponList.length>0||TotalDiscount>0">
<view class="jz_LineDetaYJ" v-if="TotalDiscount>0"> <view class="jz_LineDetaYJ" v-if="TotalDiscount>0">
<view class="jz_LineDetaYJL"> <view class="jz_LineDetaYJL">
<!-- <template v-if="false">
原价 ¥{{ $utils.getretailer()?dataList.VisaPrice:dataList.VisaB2CPrice }}/人 原价 ¥
--> <!-- #ifdef MP-DI -->
{{dataList.VisaB2CPrice}}
<!-- #endif -->
<!-- #ifdef MP-AG -->
{{dataList.VisaPrice}}
<!-- #endif -->
/人
</template>
</view> </view>
<view class="jz_LineDetaYJR">最高可减{{TotalDiscount}}</view> <view class="jz_LineDetaYJR">最高可减{{TotalDiscount}}</view>
</view> </view>
...@@ -80,7 +96,7 @@ ...@@ -80,7 +96,7 @@
<view class="line-flex col" style="padding: 30rpx; background: #fff;margin-top: 20rpx" <view class="line-flex col" style="padding: 30rpx; background: #fff;margin-top: 20rpx"
v-if="createBy==0&&SaleList&&SaleList.length>1" v-if="createBy==0&&SaleList&&SaleList.length>1"
@click="showSalePreviwe=true"> @click="showSalePreviwe=true">
<text style="font-size: 28rpx; color: #111; font-weight: 500">销售</text> <text style="font-size: 28rpx; color: #111; font-weight: 500">服务人员</text>
<text style=" <text style="
font-size: 22rpx; font-size: 22rpx;
color: #999; color: #999;
...@@ -164,7 +180,12 @@ ...@@ -164,7 +180,12 @@
<!-- 原b2b --> <!-- 原b2b -->
<text style="font-size: 40rpx;font-family: nav-font;"> <text style="font-size: 40rpx;font-family: nav-font;">
<!-- {{discountPrice}} --> <!-- {{discountPrice}} -->
{{ $utils.getretailer()?dataList.VisaPrice:dataList.VisaB2CPrice }} <!-- #ifdef MP-DI -->
{{ dataList.VisaB2CPrice }}
<!-- #endif -->
<!-- #ifdef MP-AG -->
{{ dataList.VisaPrice }}
<!-- #endif -->
</text> </text>
<text style="font-size: 22rpx">/人</text> <text style="font-size: 22rpx">/人</text>
</view> </view>
...@@ -193,7 +214,7 @@ ...@@ -193,7 +214,7 @@
<u-popup v-model="showSalePreviwe" mode="bottom" border-radius="50" length="60%" :safe-area-inset-bottom="true"> <u-popup v-model="showSalePreviwe" mode="bottom" border-radius="50" length="60%" :safe-area-inset-bottom="true">
<view> <view>
<view style="font-size: 17px;text-align: center;padding: 20px 0;"> <view style="font-size: 17px;text-align: center;padding: 20px 0;">
选择销售 选择服务人员
</view> </view>
<scroll-view scroll-x="true" style="width: 100%;height: 43vh;"> <scroll-view scroll-x="true" style="width: 100%;height: 43vh;">
<view class="SaleBox"> <view class="SaleBox">
...@@ -517,11 +538,23 @@ ...@@ -517,11 +538,23 @@
this.couponList.forEach(x=>{ this.couponList.forEach(x=>{
if(x.couponsType==1 && x.denomination>this.maxCouponDiscount) this.maxCouponDiscount=x.denomination if(x.couponsType==1 && x.denomination>this.maxCouponDiscount) this.maxCouponDiscount=x.denomination
if(x.couponsType==2){ if(x.couponsType==2){
const disMoney = this.currentPrice.b2BPrice*(1-x.denomination) let disMoney = 0
// #ifdef MP-DI
disMoney = this.currentPrice.b2CPrice*(1-x.denomination)
// #endif
// #ifdef MP-AG
disMoney = this.currentPrice.b2BPrice*(1-x.denomination)
// #endif
this.maxCouponDiscount = this.maxCouponDiscount<disMoney?disMoney:this.maxCouponDiscount this.maxCouponDiscount = this.maxCouponDiscount<disMoney?disMoney:this.maxCouponDiscount
} }
}) })
let money = this.$utils.getretailer()?this.dataList.VisaPrice:this.dataList.VisaB2CPrice let money = 0
// #ifdef MP-DI
money = this.dataList.VisaB2CPrice
// #endif
// #ifdef MP-AG
money = this.dataList.VisaPrice
// #endif
let maxCouponDiscount = this.maxCouponDiscount let maxCouponDiscount = this.maxCouponDiscount
this.TotalDiscount = this.maxCouponDiscount this.TotalDiscount = this.maxCouponDiscount
this.discountPrice = money-maxCouponDiscount this.discountPrice = money-maxCouponDiscount
...@@ -675,16 +708,27 @@ ...@@ -675,16 +708,27 @@
this.is_show_auth = 1; this.is_show_auth = 1;
return; return;
} }
// #ifdef MP-AG
if (this.SaleList&&this.SaleList.length>1&&this.SaleId==0&&this.createBy==0) { if (this.SaleList&&this.SaleList.length>1&&this.SaleId==0&&this.createBy==0) {
uni.showToast({ uni.showToast({
title: "请选择销售", title: "请选择服务人员",
icon: "none", icon: "none",
}); });
this.showSalePreviwe = true; this.showSalePreviwe = true;
return; return;
} }
// #endif
let createBy = 0
// #ifdef MP-DI
createBy = this.createBy>0?this.createBy:this.customer.pid
// #endif
// #ifdef MP-AG
if(this.createBy>0||this.SaleId) createBy = this.createBy>0?this.createBy:this.SaleId
// #endif
uni.navigateTo({ uni.navigateTo({
url: "/pages/visa/visa_Reserve?id=" +this.delMsg.Pid+'&CreateBy=' +(this.createBy?this.createBy:this.SaleId), url: "/pages/visa/visa_Reserve?id=" +this.delMsg.Pid+'&CreateBy=' +createBy,
}); });
}, },
}, },
......
...@@ -91,7 +91,14 @@ ...@@ -91,7 +91,14 @@
</view> </view>
<view class="visaListNumR"> <view class="visaListNumR">
<text style="font-size: 20rpx;">CNY</text> <text style="font-size: 20rpx;">CNY</text>
<text class="price-Num">{{ $utils.getretailer()?item.visaPrice:item.visaB2CPrice }}</text> <text class="price-Num">
<!-- #ifdef MP-DI -->
{{parseFloat(item.visaB2CPrice).toFixed(2)}}
<!-- #endif -->
<!-- #ifdef MP-AG -->
{{parseFloat(item.visaPrice).toFixed(2)}}
<!-- #endif -->
</text>
<text class="price-stuff" style="font-size: 20rpx;color: rgba(164, 164, 164, 1)"></text> <text class="price-stuff" style="font-size: 20rpx;color: rgba(164, 164, 164, 1)"></text>
</view> </view>
</view> </view>
......
...@@ -1105,17 +1105,15 @@ ...@@ -1105,17 +1105,15 @@
//计算价格 //计算价格
calcMoney() { calcMoney() {
var price = 0; var price = 0;
if (this.$utils.getretailer()) { // #ifdef MP-DI
price = this.dataList.VisaPrice;
} else {
price = this.dataList.VisaB2CPrice; price = this.dataList.VisaB2CPrice;
} // #endif
// #ifdef MP-AG
price = this.dataList.VisaPrice;
// #endif
let money = price * this.orderMsg.AdultPeopleNum; let money = price * this.orderMsg.AdultPeopleNum;
this.price = money; this.price = money;
}, },
//去支付 //去支付
goPay() { goPay() {
...@@ -1216,6 +1214,15 @@ ...@@ -1216,6 +1214,15 @@
}); });
return; return;
} }
// #ifdef MP-AG
if(!this.CreateBy){
uni.showToast({
title: `服务人员为空,请联系服务人员!`,
icon: "none",
});
return
}
// #endif
this.submit = true; this.submit = true;
let mall_customer = uni.getStorageSync("mall_customer"); let mall_customer = uni.getStorageSync("mall_customer");
......
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