Commit 08659106 authored by 罗超's avatar 罗超

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

# Conflicts:
#	components/coupon/index.vue
#	pages/jiuzhai/jz_Reserve.vue
parents 81450a70 96a4d94f
......@@ -24,14 +24,22 @@
<view class="err" v-if="x.err">
{{x.err}}
</view>
<view style="color: #dfbe6e;font-size: 22rpx;"
:style="{'padding-top':x.err?'':'30rpx'}">
{{x.overlapUse==1?'可叠加使用':'不可叠加使用'}}
</view>
<!-- <view class="rule" v-if="x.lineTeamName!='' || x.lineName!=''">{{x.lineName}} {{x.lineTeamName}} 可用</view> -->
</view>
<view class="chosen" v-if="!x.err">
<u-radio-group v-model="value" @change="radioChange" >
<u-radio-group v-if="!x.overlapUse" v-model="value" @change="radioChange" >
<u-radio shape="circle" :name="x.id" :icon-size="36" :active-color="mc"></u-radio>
</u-radio-group>
<u-radio-group v-else v-model="x.checkId" @change="(e)=>{multipleChoice(e,i)}" >
<u-radio shape="circle" :name="x.id" :icon-size="36" :active-color="mc"></u-radio>
</u-radio-group>
</view>
</view>
</view>
</view>
</scroll-view>
......@@ -52,24 +60,38 @@
<script>
export default {
props: ["list", "current","price","currentPrice","order"],
props: ["list", "current","price","currentPrice","order","multiple"],
data() {
return {
mc: "",
show: true,
currentChosen: "",
value:'',
ts: []
ts: [],
stacking: 0,
multipleChosen: [],
};
},
mounted() {
this.mc = this.$uiConfig.mainColor;
this.currentChosen = this.current;
this.value = this.current;
if(this.current) {
this.currentChosen = this.current;
this.value = this.current;
}
if(this.multiple) this.multipleChosen = this.multiple
this.ts = this.list
this.ts.forEach(x => {
x.start_time = x.effectDate.split(' ')[0].replace(/-/g, '.')
x.end_time = x.expirationDate.split(' ')[0].replace(/-/g, '.')
if(this.multipleChosen&&this.multipleChosen.length>0){
this.multipleChosen.forEach(y => {
if (x.id == y) {
x.checkId = y
x.check = true
}
})
}
})
this.checkOrderCoupon()
},
......@@ -84,9 +106,6 @@
let errorMsg = null
if(shengyu!=remainNum) errorMsg = '当前定制团存在其他订单,无法使用专享优惠券'
else if(orderNum<shengyu) errorMsg = '报名人数小于团队机位人数,无法使用专享优惠券'
console.log(errorMsg,shengyu,remainNum,orderNum)
this.ts.forEach(x => {
if(x.couponsUseScope==10) x.err = errorMsg
})
......@@ -101,22 +120,52 @@
x.err = '订单金额不满足'
}
})
console.log('useCondition')
},
popupClose() {
if (this.currentChosen != this.current) {
this.$emit('close', this.currentChosen)
} else {
this.$emit('close', -1)
if(this.stacking==0){
if (this.currentChosen != this.current) {
this.$emit('close', this.currentChosen)
} else {
this.$emit('close', -1)
}
}else{
if(this.multipleChosen.length>0){
this.$emit('close', this.multipleChosen)
}else{
this.$emit('close', -1)
}
}
},
radioChange(e){
this.stacking = 0
this.multipleChosen = []
this.ts.forEach(x => {
x.checkId = 0
x.check = false
})
if(this.currentChosen != e){
this.currentChosen = e
}else{
this.currentChosen = 0;
this.value = 0
}
},
// 叠加使用优惠券
multipleChoice(e,i){
this.stacking = 1
this.value = 0
if(!this.ts[i].check) this.ts[i].check = true
else this.ts[i].check = false
if(!this.ts[i].check) {
this.ts[i].checkId = 0
this.multipleChosen = this.multipleChosen.filter(x=>{return x!=e})
}else {
this.ts[i].checkId = e
let list = this.multipleChosen.findIndex(x=>x==this.ts[i].id)
if(list==-1) this.multipleChosen.push(e)
}
}
},
};
......
......@@ -510,30 +510,35 @@
index: e.detail.value[index]
})
}
}
}
},
// 用户点击确定按钮
getResult(event = null) {
let result = {};
// 只返回用户在this.params中配置了为true的字段
if (this.mode == 'time') {
if (this.params.year) result.year = this.formatNumber(this.year || 0);;
if (this.params.month) result.month = this.formatNumber(this.month || 0);
if (this.params.day) result.day = this.formatNumber(this.day || 0);
if (this.params.hour) result.hour = this.formatNumber(this.hour || 0);
if (this.params.minute) result.minute = this.formatNumber(this.minute || 0);
if (this.params.second) result.second = this.formatNumber(this.second || 0);
} else if (this.mode == 'region') {
if (this.params.province) result.province = provinces[this.province];
if (this.params.city) result.city = citys[this.province][this.city];
if (this.params.area) result.area = areas[this.province][this.city][this.area];
} else if (this.mode == 'selector') {
result = this.valueArr;
} else if (this.mode == 'multiSelector') {
result = this.valueArr;
}
if (event) this.$emit(event, result);
this.close();
uni.showLoading()
setTimeout(() => {
let result = {};
// 只返回用户在this.params中配置了为true的字段
if (this.mode == 'time') {
if (this.params.year) result.year = this.formatNumber(this.year || 0);;
if (this.params.month) result.month = this.formatNumber(this.month || 0);
if (this.params.day) result.day = this.formatNumber(this.day || 0);
if (this.params.hour) result.hour = this.formatNumber(this.hour || 0);
if (this.params.minute) result.minute = this.formatNumber(this.minute || 0);
if (this.params.second) result.second = this.formatNumber(this.second || 0);
} else if (this.mode == 'region') {
if (this.params.province) result.province = provinces[this.province];
if (this.params.city) result.city = citys[this.province][this.city];
if (this.params.area) result.area = areas[this.province][this.city][this.area];
} else if (this.mode == 'selector') {
result = this.valueArr;
} else if (this.mode == 'multiSelector') {
result = this.valueArr;
}
if (event) this.$emit(event, result);
this.close();
uni.hideLoading()
}, 1000);
}
}
}
......
......@@ -108,7 +108,7 @@
</view>
</view>
<view v-if="stepNumber==0" class="jz_LineDetaSC">
<view v-if="stepNumber==0&&couponList.length>0" class="jz_LineDetaSC">
<view class="jz_LineDetaSCL">
<view class="jz_LineDetaSCLDl">
<view>¥</view>
......@@ -160,7 +160,7 @@
</view>
</view>
<view class="jz_LineDetaQTS" v-if="stepNumber==0">
<view class="jz_LineDetaQTS" v-if="stepNumber==0&&couponList.length>0">
<img class="jz_LineDetaQTSImg" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638732463534129379.png" />
<view class="jz_LineDetaQTSText">
<view>完成首单,即可获得</view>
......
......@@ -422,7 +422,16 @@
</view>
</view>
<view class="empty-block"></view>
<coupon v-if="couponList.length > 0 && showCoupon" :price="price" :list="couponList" :current="useCouponId" @close="closeCouponHandler" :current-price="realCurrentPriceInfo" :order="orderMsg"></coupon>
<!-- <coupon v-if="couponList.length > 0 && showCoupon"
:list="couponList"
:current="useCouponId"
:multiple="multipleChosenIds"
@close="closeCouponHandler"
:current-price="realCurrentPriceInfo" :order="orderMsg"></coupon> -->
<view style="padding: 50rpx 40rpx" v-if="tips != ''">
<view class="big-title">
<text>重要提示</text>
......@@ -529,7 +538,8 @@
customer: {},
CreateBy: 0,
showPz:false,
pzCoupon:null
pzCoupon:null,
multipleChosenIds: [],
};
},
created() {
......@@ -572,18 +582,43 @@
},
closeCouponHandler(e) {
if (e != -1) {
this.useCouponId = e;
if(this.useCouponId){
this.currentCoupon = this.couponList.find(x => x.id == this.useCouponId)
if (this.currentCoupon.couponsType == 1) {
this.currentCoupon.discountMoney = this.currentCoupon.denomination
} else {
this.currentCoupon.discountMoney = (parseFloat(this.price) * (1 - parseFloat(this.currentCoupon.denomination / 10)))
.toFixed(2)
}
if(e instanceof Array){//叠加使用优惠券
this.multipleChosenIds = e
let TotalDiscountAmount = 0
this.useCouponId = 1
this.couponList.forEach(x=>{
let findIndex = this.multipleChosenIds.findIndex(y=>x.id==y)
if(findIndex!=-1){
let discountMoney = 0
if(x.couponsType==1){
discountMoney = x.denomination
}else{
discountMoney = (parseFloat(this.price) * (1 - parseFloat(x.denomination / 10)))
.toFixed(2)
}
TotalDiscountAmount += discountMoney
}
})
if(TotalDiscountAmount)this.currentCoupon.discountMoney = TotalDiscountAmount
else this.currentCoupon.discountMoney = 0
}else{
this.currentCoupon.discountMoney = 0
this.useCouponId = e;
if(this.useCouponId){
this.currentCoupon = this.couponList.find(x => x.id == this.useCouponId)
if (this.currentCoupon.couponsType == 1) {
this.currentCoupon.discountMoney = this.currentCoupon.denomination
} else {
this.currentCoupon.discountMoney = (parseFloat(this.price) * (1 - parseFloat(this.currentCoupon.denomination / 10)))
.toFixed(2)
}
}else{
this.currentCoupon.discountMoney = 0
}
}
}else{
this.multipleChosenIds = []
this.currentCoupon.discountMoney = 0
this.useCouponId = 0
}
this.showCoupon = false;
},
......@@ -619,6 +654,13 @@
(res) => {
console.log("coupon_post_GetUserCanUseCouponList", res);
if (res.resultCode == 1) {
let arrList = function(list){
list.forEach(x=>{
x.checkId=0
x.check=false
})
}
arrList(res.data)
this.couponList = res.data
this.calcPzCouponHandler()
}
......@@ -846,7 +888,12 @@
} else {
price = this.currentPriceInfo.b2CPrice;
}
let CouponAllotIds = ''
if(this.multipleChosenIds.length>0){
CouponAllotIds = this.multipleChosenIds.join(',')
}else{
CouponAllotIds = this.useCouponId > 0 ? this.currentCoupon.id.toString() : ''
}
let msg = {
OrderId: 0,
TCID: this.currentPriceInfo.tcid,
......@@ -859,7 +906,7 @@
IsIntermodal: 2,
Unit_Price: price,
TC_Price: price,
CouponAllotIds: this.useCouponId > 0 ? this.currentCoupon.id.toString() : '',
CouponAllotIds: CouponAllotIds,
ManNum: this.orderMsg.ManNum,
ChirdNum: this.orderMsg.ChirdNum,
ChirdNeedBedNum: this.orderMsg.ChirdNeedBedNum,
......
......@@ -159,6 +159,8 @@
changeHandler(val) {
if (val == "") {
this.loadSearch = false;
this.msg.pageIndex = 1;
this.g = []
}
},
tagClickHandler(val) {
......@@ -180,17 +182,23 @@
this.searchHistory.unshift(val);
uni.setStorageSync("search_his", this.searchHistory);
this.page = 1;
this.msg.pageIndex = 1;
this.g = [];
this.msg.searchKey=val;
this.loadSearch = true;
this.init();
this.init(1);
} else {
this.msg.searchKey = "";
this.loadSearch = false;
this.msg.pageIndex = 1;
this.g=[]
}
},
init() {
this.g=[];
init(type) {
if (type == 1) {
this.g = [];
this.msg.pageIndex = 1;
}
uni.showLoading({
title:'加载中',
icon:'none'
......@@ -201,8 +209,10 @@
res => {
uni.hideLoading();
if (res.resultCode == 1) {
this.g = res.data.pageData;
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
this.status = "loadmore";
if(this.page_count==1) this.status = "nomore";
}
},
null
......@@ -268,7 +278,8 @@
if (this.page < this.page_count) {
if (!this.loading) {
this.status = "loading";
this.page++;
this.page = 1;
this.msg.pageIndex++;
this.init();
}
} else {
......
<template>
<view class="jz_LineDetail" v-if="dataList.Name">
<scroll-view scroll-y="true" style="height: 1px; flex: 1; box-sizing: border-box" @scroll="scroll">
<scroll-view scroll-y="true" style="height: 1px; flex: 1; box-sizing: border-box;" @scroll="scroll">
<view class="jz_TopImg">
<view class="media" :style="{ opacity: 100 - boxOption + '%' }">
<u-swiper :list="[dataList.CoverImageList[0]]" :effect3d="false" :height="535" :interval="5000" :border-radius="0"
......@@ -68,6 +68,26 @@
</view>
<view class="line-flex col" style="padding: 30rpx; background: #fff;margin-top: 20rpx"
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: 22rpx;
color: #999;
margin-left: 30rpx;
flex: 1;
"></text>
<view class="SaleNameTetx">
<view>
<text v-if="SaleName">{{ SaleName }}</text>
<text v-else style="color: #999">
请选择
</text>
</view>
<u-icon name="arrow-down" size="24"></u-icon>
</view>
</view>
<view class="visaDetailDesBox">
<view class="visaDetailDes">
<view class="visaDetailDesTitle">签证说明</view>
......@@ -75,7 +95,7 @@
<view class="row-sbas-n visaDetailNumBox">
<view class="visaDetailNum active1 col">
<view>办理时长</view>
<view>收齐材料后{{dataList.ManageDuration}}个工作日</view>
<view>收齐材料后{{dataList.ManageDuration?dataList.ManageDuration:'-'}}个工作日</view>
</view>
<view class="visaDetailNum active2 col">
<view>入境次数</view>
......@@ -89,35 +109,36 @@
<view class="row-sbas-n visaDetailNumBox">
<view class="visaDetailNum active3 col">
<view>停留天数</view>
<view>{{ dataList.StayDays }}天</view>
<view>{{ dataList.StayDays?dataList.StayDays+'天':'-' }}</view>
</view>
<view class="visaDetailNum active4 col">
<view>签证效期</view>
<view>{{ dataList.VisaValidity }}</view>
<view>{{ dataList.VisaValidity?dataList.VisaValidity:'-' }}</view>
</view>
</view>
</view>
<view class="visaDetailDesTitle">费用包含</view>
<view class="jz_TripMain">
<view v-if="dataList.VisaProductInfo.FeeInclude" class="jz_TripMain">
<rich-text :nodes="dataList.VisaProductInfo.FeeInclude"></rich-text>
</view>
<view class="visaDetailLin" style="margin-top: 33rpx;margin-bottom: 18rpx;"></view>
<view class="visaDetailDesTitle">费用不含</view>
<view class="jz_TripMain">
<view v-if="dataList.VisaProductInfo.FeeNonInclude" class="jz_TripMain">
<rich-text :nodes="dataList.VisaProductInfo.FeeNonInclude"></rich-text>
</view>
<view class="visaDetailLin" style="margin-top: 33rpx;margin-bottom: 18rpx;"></view>
<view class="visaDetailDesTitle" style="padding: 40rpx 0 34rpx 0;">签证材料</view>
<view class="jz_TripMain" style="background: #F9F8F6;
<view v-if="dataList.VisaProductInfo.VisaMaterials" class="jz_TripMain" style="background: #F9F8F6;
border-radius: 12rpx;padding: 39rpx 30rpx;">
<rich-text :nodes="dataList.VisaProductInfo.VisaMaterials"></rich-text>
</view>
<view class="visaDetailDesTitle" style="padding: 50rpx 0 34rpx 0;">温馨提示</view>
<view class="jz_TripMain" style="background: #F9F8F6;
<view v-if="dataList.VisaProductInfo.WarmTip" class="jz_TripMain" style="background: #F9F8F6;
border-radius: 12rpx;padding: 39rpx 30rpx;">
<rich-text :nodes="dataList.VisaProductInfo.WarmTip"></rich-text>
</view>
</view>
</view>
......@@ -137,10 +158,10 @@
</view>
<view style="display: flex; align-items: center">
<!-- #ifdef MP-WEIXIN -->
<button @click="downloadTripPlanHandler" class="jz_ConButton" v-if="d.length>3">
<button @click="dataList.VisaProductInfo.DownloadMaterialsFileList.length>1?showDownload=true:downloadTripPlanHandler(dataList.VisaProductInfo.DownloadMaterialsFileList[0])" class="jz_ConButton" v-if="dataList.VisaProductInfo&&dataList.VisaProductInfo.DownloadMaterialsFileList.length>0">
<img style="width: 36rpx; height: 38rpx" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1695376860000_131.png"
alt="" />
<view style="color: #111111; font-size: 22rpx">下载行程</view>
<view style="color: #111111; font-size: 22rpx">下载文件</view>
</button>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
......@@ -151,6 +172,7 @@
<view style="color: #111111; font-size: 22rpx">客服</view>
</button>
<!-- #endif -->
<view class="jz_OrderNow" @click="goReserce">立即预定</view>
</view>
</view>
......@@ -188,6 +210,37 @@
}" @click="showSalePreviwe=false">确定</u-button>
</view>
</u-popup>
<u-popup v-model="showDownload" mode="bottom" border-radius="50" length="60%" :safe-area-inset-bottom="true">
<view>
<view style="font-size: 17px;text-align: center;padding: 20px 0;">
下载签证文件
</view>
<scroll-view scroll-x="true" style="width: 100%;height: 43vh;">
<view class="SaleBox">
<view v-for="(item,index) in dataList.VisaProductInfo.DownloadMaterialsFileList"
:key="index"
class="SaleText" @click="downloadTripPlanHandler(item)">
<view>{{ item.Name }}</view>
<view>
<button class="jz_ConButton row items-center" style="height: 100%;" v-if="dataList.VisaProductInfo&&dataList.VisaProductInfo.DownloadMaterialsFileList.length>0">
<img style="width: 36rpx; height: 38rpx" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1695376860000_131.png"
alt="" />
</button>
</view>
</view>
</view>
</scroll-view>
<u-button size="80" :ripple="true" shape="circle" :custom-style="{
backgroundColor: '#333',
height: '80rpx',
color: '#fff',
fontSize: '14px',
margin: '0 auto',
width: '90vw',
}" @click="showDownload=false">确定</u-button>
</view>
</u-popup>
</view>
</template>
<script>
......@@ -201,7 +254,8 @@
},
data() {
return {
pageTitle: "线路详情",
showDownload: false,
pageTitle: "签证详情",
showStartCities: false,
crCount: 1,
etCount: 0,
......@@ -374,6 +428,49 @@
this.mainColor = this.$uiConfig.mainColor;
},
methods: {
downloadTripPlanHandler(item) {
if (this.isDownloading) return;
let that = this
uni.showLoading({
title: '这可能需要30秒,请耐心等待'
})
this.isDownloading = true
let url = item.Url
let fileName = `${item.Name.replace(/\s+/g,"").replaceAll("/","")}`
let suffix = item.Url.split('.')
console.log(fileName, "fileName");
const filePath = wx.env.USER_DATA_PATH + `/${fileName}.${suffix[suffix.length-1]}`
uni.downloadFile({
url: url,
filePath,
success: (res) => {
wx.openDocument({
filePath: filePath,
showMenu: true,
success: fres => {
uni.hideLoading()
that.isDownloading = false
},
fail: fres => {
console.log('downloadTripPlanHandler_打开失败', fres)
that.downloadFailed('打开失败,请重试。如果仍然失败,请联系销售索要签证文件')
},
})
},
fail(err) {
console.log("downloadTripPlanHandler_fail", err)
that.downloadFailed('下载失败,请重试。如果仍然失败,请联系销售索要签证文件' + err)
},
});
},
downloadFailed(msg) {
uni.showToast({
icon: 'none',
title: msg
})
this.isDownloading = false;
},
calcPzCouponHandler(){
this.couponList.forEach((x)=>{
if(x.expansionModel.denomination>0){
......@@ -566,9 +663,16 @@
this.is_show_auth = 1;
return;
}
if (this.SaleList&&this.SaleList.length>1&&this.SaleId==0&&this.createBy==0) {
uni.showToast({
title: "请选择销售",
icon: "none",
});
this.showSalePreviwe = true;
return;
}
uni.navigateTo({
url: "/pages/visa/visa_Reserve?id=" +this.delMsg.Pid,
url: "/pages/visa/visa_Reserve?id=" +this.delMsg.Pid+'&CreateBy=' +(this.createBy?this.createBy:this.SaleId),
});
},
},
......@@ -1282,6 +1386,7 @@
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #eee;
overflow: hidden;
}
.jz_LineDetaCZ{
height: 36rpx;
......@@ -1562,6 +1667,7 @@
.visaDetailDesBox{
background: #fff;
margin-top: 20rpx;
padding-bottom: 40rpx;
}
.visaDetailDes{
padding: 0 41rpx;
......
This diff is collapsed.
......@@ -317,12 +317,14 @@
font-weight: 800;
font-size: 28rpx;
color: #080A09;
padding-bottom: 22rpx;
}
.visaProduct_l{
width: 160rpx;
height: 121rpx;
min-height: 121rpx;
border-radius: 13rpx;
overflow: hidden;
margin-right: 18rpx;
}
.visaProduct_r{
letter-spacing: 2rpx;
......@@ -397,6 +399,9 @@
overflow: hidden;
text-overflow: ellipsis;
}
.addPnum{
padding: 9rpx 10rpx;
}
</style>
<template>
......@@ -430,19 +435,20 @@
<view class="visaCustomerInfor_Title">客户资料</view>
<view class="row visaProduct">
<view class="visaProduct_l">
<image style="width: 100%;" mode="aspectFill" :src="dataList.CoverImageList[0]"></image>
<image style="width: 160rpx;height: 100%;" mode="aspectFill" :src="dataList.CoverImageList[0].Url"></image>
</view>
<view class="col column visaProduct_r">
<view class="visaProduct_rTitle">{{ dataList.Name }}</view>
<view class="row visaProduct_rTBox" style="padding: 17rpx 0 11rpx 0;">
<view class="">
<view class="row visaProduct_rTBox" style="padding: 17rpx 0 11rpx 0;"
v-if="dataList.SendCityName||dataList.ManageDuration">
<view class="" v-if="dataList.SendCityName" style="padding-right: 29rpx;">
送签地:<text class="visaProduct_rColor">{{ dataList.SendCityName }}</text>
</view>
<view class="visaProduct_rColor" style="padding-left: 29rpx;">
<view class="visaProduct_rColor" v-if="dataList.ManageDuration">
收齐资料后需{{ dataList.ManageDuration }}个工作日
</view>
</view>
<view class="visaProduct_rTBox">
<view class="visaProduct_rTBox" v-if="dataList.VisaValidity">
有效期:<text class="visaProduct_rColor">{{ dataList.VisaValidity }}</text>
</view>
</view>
......@@ -452,18 +458,19 @@
<view class="visaProductNum_Title">人数</view>
<view class="row-sbas-n items-center">
<view class="row-sbas-n items-center">
<view style="width: 27rpx;height: 27rpx;" @click="editNum(1)">
<image style="width: 27rpx;height: 27rpx;display: block;"
<view class="addPnum" @click="orderMsg.AdultPeopleNum>1?editNum(1):''">
<image v-if="orderMsg.AdultPeopleNum>1" style="width: 27rpx;height: 27rpx;display: block;"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638751245939665786.png" />
<image v-else style="width: 27rpx;height: 27rpx;display: block;"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638755711218891689.png" />
</view>
<view class="col row items-center textCenter">
<!-- {{orderMsg.AdultPeopleNum}} -->
<input type="number" class="visaProductTetx visaProduct_rColor"
v-model="orderMsg.AdultPeopleNum"
disabled
placeholder="输入" />
</view>
<view style="width: 27rpx;height: 27rpx;" @click="editNum(2)">
<view class="addPnum" @click="editNum()">
<image style="width: 27rpx;height: 27rpx;display: block;"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638751245974558349.png" />
</view>
......@@ -474,7 +481,7 @@
<view class="visaProductNum visaProductNumR column">
<view class="visaProductNum_Title">入境日期</view>
<picker class="visaProductTetx" mode="date"
:value="orderMsg.EnterCountryTime" @change="bindDateChange"
v-model="orderMsg.EnterCountryTime" @change="bindDateChange"
>
<view class="row-sbas-n items-center">
<view class="visaProductTetx">
......@@ -551,7 +558,7 @@
<input class="visaProductTetx" v-model="orderMsg.Receiver" placeholder="输入收件人"/>
</view>
</view>
<view class="row visaProductNumR col" style="width: auto;background: #F7F8FA;">
<view class="row visaProductNumR col" style="width: auto;background: #F7F8FA;border-radius: 14rpx">
<view class="visaProductNum column" style="width: 180rpx;">
<view class="visaProductNum_Title">国家/地区</view>
<view class="row-sbas-n items-center" @click="CountryType=2,showCountry=true">
......@@ -728,6 +735,7 @@
</template>
<script>
import json from "../airTicket/components/sign/day.js";
import coupon from '@/components/coupon/index';
import { gegerateDates,getBeforeDate,getDateWeek } from "../airTicket/dates.js";
export default {
......@@ -796,7 +804,6 @@
cityList: [],
tipsText: '',
userInfo:{},
startDate: '2025-03-25'
};
},
created() {
......@@ -837,8 +844,7 @@
editNum(type) {
if (type == 1) {
if(this.orderMsg.AdultPeopleNum>1)this.orderMsg.AdultPeopleNum--;
}
if (type == 2) {
}else {
this.orderMsg.AdultPeopleNum++;
}
this.calcMoney()
......@@ -850,6 +856,7 @@
"level": 2
}, r => {
if (r.resultCode == 1) {
this.cityList = []
for (let i = 0; i < r.data.length; i++) {
let Count = r.data[i]
let obj = {
......@@ -877,6 +884,8 @@
this.orderMsg.ReceiverProvince = this.provinceList[i].Name
this.orderMsg.ReceiverProvinceId = this.provinceList[i].ID
this.optionsTitle[2] = this.provinceList[i].Name
this.orderMsg.ReceiverCity = ''
this.optionsTitle[3] = ''
this.getCity()
}
if(type == 4){
......@@ -939,10 +948,10 @@
this.customer.PhoneCountryStr = "+" + this.customer.PhoneCountry;
},
bindDateChange(e) {
let dates = getBeforeDate(0, new Date())
if(e.detail.value<=dates){
let dates = getBeforeDate(-this.dataList.BookAdvance, new Date())
if(e.detail.value<dates){
uni.showToast({
title: `请选择大于今天的日期`,
title: `请选择大于等于${dates}的日期`,
icon: "none",
});
return;
......@@ -1046,6 +1055,9 @@
uni.hideLoading();
if (res.resultCode == 1) {
this.dataList = res.data
let dates = getBeforeDate(-res.data.BookAdvance, new Date())
this.orderMsg.EnterCountryTime = dates
this.calcMoney()
// this.getCouponActivityHandler(res.data)
}
......@@ -1117,6 +1129,10 @@
this.tipsText = '请输入电话'
return;
}
if (this.customer.contactNumber&&this.customer.contactNumber.length<11) {
this.tipsText = '请输入正确的电话'
return;
}
if (this.customer.Mailbox == "") {
this.tipsText = '请输入邮箱地址'
uni.showToast({
......@@ -1125,6 +1141,15 @@
});
return;
}
let email = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/
if (!email.test(this.customer.Mailbox)) {
this.tipsText = '请输入正确的邮箱地址'
uni.showToast({
title: `请输入正确的邮箱地址`,
icon: "none",
});
return;
}
if (this.orderMsg.Receiver == "") {
uni.showToast({
title: `请输入收件人`,
......@@ -1146,6 +1171,13 @@
});
return;
}
if (this.orderMsg.ReceiverPhone&&this.orderMsg.ReceiverPhone.length<11) {
uni.showToast({
title: `请输入正确的收件人电话`,
icon: "none",
});
return;
}
if (this.orderMsg.RelationPhoneType == "") {
uni.showToast({
title: `请选择收件人国家/地区`,
......@@ -1188,7 +1220,7 @@
ChildPeopleNum: '',//小孩
TotalPrice: price,//总价
CustomerId: this.customer.customerId,//客户id
CreateBy: 0,//销售
CreateBy: this.CreateBy,//销售
OrderSource: 5,//1-ERP,2-B2B订单,3-B2C订单,4wap 5同业 6支付宝
EnterCountryTime: this.orderMsg.EnterCountryTime,//入境时间
GuestList: [],//this.guests
......
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