Commit bdeba5e8 authored by 黄奎's avatar 黄奎

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

parents 89fb94f7 4b305ddc
......@@ -138,6 +138,19 @@
<Text>取消政策</Text>
</view>
<view class="showModalCTisp">
<template v-if="CancelPolicy">
<view class="showModalTisp">
旅游者在<text>行程开始前提出解除合同,</text>
将按下列标准扣除必要的费用:
</view>
<view class="showModalCTNK column">
<Text>行程开始前</Text>
<Text style="max-height: 300rpx;overflow-y: scroll;">
{{ CancelPolicy!='暂无'?CancelPolicy:'以实际退款为准' }}
</Text>
</view>
</template>
<template v-else>
<view class="showModalTisp">
旅游者在<text>行程开始前7日以内提出解除合同,</text>
将按下列标准扣除必要的费用:
......@@ -154,6 +167,8 @@
<Text>行程开始当日</Text>
<Text>按旅游费用总额的60%</Text>
</view>
</template>
</view>
<view class="vip-box" v-if="datas.OrderStatus==5">
<view class="vip-title">进度</view>
......@@ -176,7 +191,7 @@
</template>
<script>
export default {
props:['datas','type'],
props:['datas','type','CancelPolicy'],
data(){
return{
vipInfo:{
......
......@@ -142,6 +142,19 @@
<text>按标准扣除必要的费用</text>
</view>
<view class="showModalCTisp">
<template v-if="CancelPolicy">
<view class="showModalTisp">
旅游者在<text>行程开始前提出解除合同,</text>
将按下列标准扣除必要的费用:
</view>
<view class="showModalCTNK column">
<Text>行程开始前</Text>
<Text style="max-height: 300rpx;overflow-y: scroll;">
{{ CancelPolicy!='暂无'?CancelPolicy:'以实际退款为准' }}
</Text>
</view>
</template>
<template v-else>
<view class="showModalTisp">
旅游者在<text>行程开始前7日以内提出解除合同,</text>
将按下列标准扣除必要的费用:
......@@ -158,6 +171,8 @@
<Text>行程开始当日</Text>
<Text>按旅游费用总额的60%</Text>
</view>
</template>
</view>
<view class="showModalTime"
:class="[!submitCancel?'active':'']">请仔细阅读条款<template v-if="submitCancel">{{remainingTime}}s</template>后确认</view>
......@@ -185,7 +200,7 @@
</template>
<script>
export default {
props:['showModal','orderNo','type'],
props:['showModal','orderNo','type','CancelPolicy'],
data(){
return{
Cancelmsg:{
......@@ -197,11 +212,18 @@ export default {
timerId: null, // 定时器ID
isRunning: false, // 状态标识(防止重复启动)
}
},
watch: {
// CancelPolicy: {
// handler(newVal, oldVal) {
// },
// deep: false,
// immediate: true
// }
},
created() {
console.log(uni.getStorageSync("b2b_user"),'=======b2b_user')
this.erpBaseInfo = uni.getStorageSync("b2b_user").erpBaseInfo
console.log(this.datas,'----=====datas')
},
mounted() {
setTimeout(() => {
......
......@@ -78,8 +78,12 @@
</view>
</view>
</view>
<cancelPrompt v-if="showModal" :showModal="showModal" @cancel="cancelModal" @success="cancelSuccess" type="1"
:orderNo="currentData.orderNo"></cancelPrompt>
<cancelPrompt v-if="showModal"
:showModal="showModal"
@cancel="cancelModal"
@success="cancelSuccess" type="1"
:orderNo="currentData.orderNo"
:CancelPolicy="CancelPolicy"></cancelPrompt>
</view>
</template>
<script>
......@@ -98,6 +102,7 @@
showModal: false,
currentData: null,
b2b_user: null,
CancelPolicy: null,
}
},
watch: {
......@@ -414,6 +419,11 @@
//直客订单取消
goCancelZK(item) {
if (item.orderStatus == 2) {
if(item.goodsType==12||item.goodsType==13||item.goodsType==14){
this.initData(item.goodsId)
}else{
this.CancelPolicy = null
}
this.currentData = item
return this.showModal = true
}
......@@ -451,6 +461,17 @@
}
})
},
initData(ProductId) {
this.apipost(
"CarSingle_post_GetTYCarSingleProductInfo",{
ProductId: ProductId,
},
res => {
if (res.resultCode == 1) {
this.CancelPolicy = res.data.CancelPolicy!=''?res.data.CancelPolicy:'暂无'
}
});
},
}
}
</script>
......
......@@ -146,16 +146,18 @@
</view>
<!-- #endif -->
<view class="busTispBox" style="margin-top: 20rpx;">
<template v-if="(dataList.PriceIncludeList&&dataList.PriceIncludeList.length>0)||
(dataList.PriceNotIncludeList&&dataList.PriceNotIncludeList.length>0)">
<view class="busTispTitle">费用说明</view>
<view class="busTispInfor">
<view class="busTispFY">
<view class="busTispFY" v-if="dataList.PriceIncludeList&&dataList.PriceIncludeList.length>0">
费用包含:
<text class="bus-tagText" v-for="(item,index) in dataList.PriceIncludeList"
:key="index">
{{ item }}
</text>
</view>
<view class="busTispFY">
<view class="busTispFY" v-if="dataList.PriceNotIncludeList&&dataList.PriceNotIncludeList.length>0">
费用不包含:
<text class="bus-tagText active" v-for="(item,index) in dataList.PriceNotIncludeList"
:key="index">
......@@ -163,10 +165,13 @@
</text>
</view>
</view>
</template>
<template v-if="dataList.BuyNotes">
<view class="busTispTitle">购买须知</view>
<view class="busTispInfor">
{{ dataList.BuyNotes }}
</view>
</template>
<view class="busTispTitle">
<view>接送点范围</view>
<view v-for="(item,index) in dataList.PlaceList"
......@@ -184,10 +189,13 @@
:scale="scale">
</map>
</view>
<view class="busTispTitle">温馨提示</view>
<template v-if="dataList.CancelPolicy">
<view class="busTispTitle">取消政策</view>
<view class="busTispInfor" style="border: 0;">
{{ dataList.CancelPolicy }}
</view>
</template>
</view>
</view>
......@@ -626,10 +634,20 @@
this.includePoints = []
this.dataList = res.data;
if(!this.orderMsg.CarId) {
if(this.busInfor.CarType!=3&&this.busInfor.peopleNum){
let i = this.dataList.CarTypeList.findIndex(item=>{
return item.PeopleNum>=this.busInfor.peopleNum
})
let item = this.dataList.CarTypeList[i]
this.orderMsg.CarId = item.Id
this.orderMsg.CarName = item.CarName
this.orderMsg.PeopleNum = item.PeopleNum
}else{
this.orderMsg.CarId = this.dataList.CarTypeList[0].Id
this.orderMsg.CarName = this.dataList.CarTypeList[0].CarName
this.orderMsg.PeopleNum = this.dataList.CarTypeList[0].PeopleNum
}
}
this.getPrices()
for (let i = 0; i < res.data.ImageList.length; i++) {
this.imgList.push({
......
......@@ -272,6 +272,18 @@
startYear: 2025,
}
},
onLoad(options) {
},
onShow() {
// uni.getStorage({
// key: "busInfor",
// success: (res) => {
// let obj = JSON.parse(res.data);
// this.busInfor = obj;
// },
// });
},
created() {
this.startYear = this.$utils.GetDateFewFaysLater(0).year
},
......@@ -526,9 +538,7 @@
this.scrollTop = val.target.scrollTop
},
goHomeHandle(){
uni.redirectTo({
url:'/pages/index/index'
})
uni.navigateBack({delta:-1})
}
}
}
......
......@@ -180,7 +180,7 @@
</view>
<view class="LastNameBox column val" style="width: 1px;flex: 1;">
<view class="row items-center">
<input type="number" v-model="orderMsg.ChildNum" placeholder="儿童数" />
<input type="number" v-model="orderMsg.ChildNum" placeholder="儿童数" @change="getPeoples"/>
</view>
</view>
</view>
......@@ -190,7 +190,7 @@
</view>
<view class="LastNameBox column val" style="width: 1px;flex: 1;">
<view class="row items-center">
<input type="number" v-model="orderMsg.BabyNum" placeholder="婴儿数" />
<input type="number" v-model="orderMsg.BabyNum" placeholder="婴儿数" @change="getPeoples"/>
</view>
</view>
</view>
......@@ -290,7 +290,7 @@
</view>
</view>
<view class="buyTispBox">
<view class="buyTispBox" v-if="dataList.BuyNotes">
<view class="big-title">
<text class="">购买说明</text>
</view>
......@@ -329,11 +329,8 @@
<u-toast ref="uToast" />
<u-picker mode="selector" v-model="showCountry" :default-selector="[0]" :range="countrys"
@confirm='(e)=>{changeDown(e,CountryType)}' range-key="label" @input="showCountry=false"></u-picker>
<!-- <coupon v-if="couponList.length > 0 && showCoupon" :price="getPrice(orderMsg.Money)" :list="couponList"
:current="useCouponIds" @close="closeCouponHandler" :order="orderMsg" :numberPeople="searchObj.peoples">
</coupon>-->
<coupon v-if="couponList.length > 0 && showCoupon" :price="orderMsg.Money" :list="couponList"
:current="useCouponIds" @close="closeCouponHandler" :order="orderMsg" :numberPeople="searchObj.peoples">
:current="useCouponIds" @close="closeCouponHandler" :order="orderMsg" :numberPeople="orderMsg.peoples">
</coupon>
</view>
</template>
......@@ -496,6 +493,7 @@
},
getPeoples(){
this.orderMsg.peoples = Number(this.orderMsg.ManNum) + Number(this.orderMsg.ChildNum) +Number(this.orderMsg.BabyNum);
this.calcMaxCouponHandle()
},
getWeek(date) {
var weekArray = new Array("日", "一", "二", "三", "四", "五", "六");
......@@ -705,15 +703,16 @@
let maxCouponId = 0
let discount = 0
const money = this.price
this.couponList.forEach(x => {
if (x.couponsType == 1 && x.denomination > discount && (this.orderMsg.PeopleNum >= x
if (x.couponsType == 1 && x.denomination > discount && (this.orderMsg.peoples >= x
.orderGuestNum || !x.orderGuestNum)&&this.price>=x.useCondition) {
discount = x.denomination
maxCouponId = x.id
}
if (x.couponsType == 2) {
let disMoney = money * (1 - x.denomination)
if (discount < disMoney && (this.orderMsg.PeopleNum >= x.orderGuestNum || !x
if (discount < disMoney && (this.orderMsg.peoples >= x.orderGuestNum || !x
.orderGuestNum)&&this.price>=x.useCondition) {
discount = disMoney
maxCouponId = x.id
......@@ -881,7 +880,6 @@
return
}
// #endif
this.submit = true;
let CouponAllotIds = ''
......
......@@ -89,7 +89,7 @@
<view class="ResInforL">人数</view>
<view class="ResInforR">最多坐{{ orderInfor.PeopleNum}}</view>
</view>
<view class="ResInforText row">
<view class="ResInforText row" v-if="dataList.CancelPolicy">
<view class="ResInforL">取消政策</view>
<view class="ResInforR">
<text>
......
......@@ -179,7 +179,7 @@
</view>
</view>
<view v-if="orderData.OrderStatus==5" style="padding: 0 30rpx;">
<cancelProgress :datas="orderData"></cancelProgress>
<cancelProgress :datas="orderData" :CancelPolicy="CancelPolicy"></cancelProgress>
</view>
<view class="ReservationInforBox">
<view class="big-title">
......@@ -257,7 +257,8 @@
<cancelPrompt v-if="showModal"
:showModal="showModal"
@cancel="cancelModal"
:orderNo="orderData.OrderNo"></cancelPrompt>
:orderNo="OrderNo"
:CancelPolicy="CancelPolicy"></cancelPrompt>
</view>
</template>
......@@ -357,6 +358,8 @@
customer: {},
SalePhone: null,
showModal: false,
OrderNo: '',
CancelPolicy: '',
};
},
created() {
......@@ -621,6 +624,8 @@
if (res.resultCode == 1) {
uni.hideLoading();
this.orderData = res.data
this.initData(res.data.ProductId)
this.OrderNo = res.data.OrderNo
this.peopleNum = Number(this.orderData.ManNum) + Number(this.orderData.ChildNum) +Number(this.orderData.BabyNum);
// #ifdef MP-AG
this.formatStatus(
......@@ -646,17 +651,40 @@
const parameter={ErpOrderId:this.id,OrderTypeStr:'Vehicle'}
this.apipost("GetDetailsByErpOrderId_post",parameter,res=>{
if(res.resultCode==1){
this.orderData = {
...this.orderData,
...res.data,
CreateTime: this.orderData.CreateTime,
}
this.OrderNo = res.data.OrderNo
this.formatStatus(
res.data.OrderStatus,
null,
null
);
}else{
let OrderDate = this.orderData.OrderDate.slice(0, 10);
if(OrderDate<=this.$utils.GetDateFewFaysLater(0).date){
this.showPayBtn = false
}
}
},err=>{
uni.showToast({
title: err.message,
icon: "none",
});
})
},
initData(ProductId) {
this.apipost(
"CarSingle_post_GetTYCarSingleProductInfo",{
ProductId: ProductId,
},
res => {
if (res.resultCode == 1) {
this.CancelPolicy = res.data.CancelPolicy!=''?res.data.CancelPolicy:'暂无'
}
});
},
//日期格式化
getformatDateStr(value) {
var dt = new Date(value);
......
......@@ -825,11 +825,22 @@
);
},
calcMaxCouponHandle(){
const shengyu = this.realCurrentPriceInfo.totalSeat-this.realCurrentPriceInfo.leaderNum
const remainNum = this.realCurrentPriceInfo.remainNum
const orderNum = this.orderMsg.ManNum+this.orderMsg.ChirdNeedBedNum+this.orderMsg.ChirdNoBedNum
let errorMsg = null
if (this.realCurrentPriceInfo && this.realCurrentPriceInfo.teamType==1) {
if(shengyu!=remainNum) errorMsg = '当前定制团存在其他订单,无法使用专享优惠券'
else if(orderNum<shengyu) errorMsg = '报名人数小于团队机位人数,无法使用专享优惠券'
}
if(this.couponList && this.couponList.length>0){
let maxCouponId = 0
let discount = 0
const money = this.price
this.couponList.forEach(x=>{
if(x.couponsUseScope==10&&errorMsg) {
}else{
if(x.couponsType==1 && x.denomination>discount&&(this.total>=x.orderGuestNum||!x.orderGuestNum)&&this.price>=x.useCondition) {
discount=x.denomination
maxCouponId = x.id
......@@ -841,6 +852,7 @@
maxCouponId = x.id
}
}
}
})
if(maxCouponId>0) this.closeCouponHandler([maxCouponId])
}
......
......@@ -63,7 +63,7 @@
:config="config"
:options="options"
:charts-data="chartsData"
height="300px" />
height="600rpx" />
<u-empty v-else text="暂无使用优惠,快去使用吧!" mode="coupon" padding-top="20" color="#000"></u-empty>
</view>
</view>
......
......@@ -95,7 +95,7 @@ export default {
},
height:{
type: String,
default: '600px'
default: '600rpx'
},
inScrollView: {
type: Boolean,
......
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