Commit 01cecd5d authored by youjie's avatar youjie

修复bug

parent 8a468cf3
...@@ -159,6 +159,8 @@ ...@@ -159,6 +159,8 @@
changeHandler(val) { changeHandler(val) {
if (val == "") { if (val == "") {
this.loadSearch = false; this.loadSearch = false;
this.msg.pageIndex = 1;
this.g = []
} }
}, },
tagClickHandler(val) { tagClickHandler(val) {
...@@ -180,17 +182,23 @@ ...@@ -180,17 +182,23 @@
this.searchHistory.unshift(val); this.searchHistory.unshift(val);
uni.setStorageSync("search_his", this.searchHistory); uni.setStorageSync("search_his", this.searchHistory);
this.page = 1; this.page = 1;
this.msg.pageIndex = 1;
this.g = []; this.g = [];
this.msg.searchKey=val; this.msg.searchKey=val;
this.loadSearch = true; this.loadSearch = true;
this.init(); this.init(1);
} else { } else {
this.msg.searchKey = ""; this.msg.searchKey = "";
this.loadSearch = false; this.loadSearch = false;
this.msg.pageIndex = 1;
this.g=[]
} }
}, },
init() { init(type) {
this.g=[]; if (type == 1) {
this.g = [];
this.msg.pageIndex = 1;
}
uni.showLoading({ uni.showLoading({
title:'加载中', title:'加载中',
icon:'none' icon:'none'
...@@ -201,8 +209,10 @@ ...@@ -201,8 +209,10 @@
res => { res => {
uni.hideLoading(); uni.hideLoading();
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.g = res.data.pageData; this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
this.status = "loadmore";
if(this.page_count==1) this.status = "nomore";
} }
}, },
null null
...@@ -268,7 +278,8 @@ ...@@ -268,7 +278,8 @@
if (this.page < this.page_count) { if (this.page < this.page_count) {
if (!this.loading) { if (!this.loading) {
this.status = "loading"; this.status = "loading";
this.page++; this.page = 1;
this.msg.pageIndex++;
this.init(); this.init();
} }
} else { } else {
......
...@@ -68,6 +68,26 @@ ...@@ -68,6 +68,26 @@
</view> </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="visaDetailDesBox">
<view class="visaDetailDes"> <view class="visaDetailDes">
<view class="visaDetailDesTitle">签证说明</view> <view class="visaDetailDesTitle">签证说明</view>
...@@ -89,35 +109,36 @@ ...@@ -89,35 +109,36 @@
<view class="row-sbas-n visaDetailNumBox"> <view class="row-sbas-n visaDetailNumBox">
<view class="visaDetailNum active3 col"> <view class="visaDetailNum active3 col">
<view>停留天数</view> <view>停留天数</view>
<view>{{ dataList.StayDays }}天</view> <view>{{ dataList.StayDays?dataList.StayDays:'-' }}天</view>
</view> </view>
<view class="visaDetailNum active4 col"> <view class="visaDetailNum active4 col">
<view>签证效期</view> <view>签证效期</view>
<view>{{ dataList.VisaValidity }}</view> <view>{{ dataList.VisaValidity?dataList.VisaValidity:'-' }}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="visaDetailDesTitle">费用包含</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> <rich-text :nodes="dataList.VisaProductInfo.FeeInclude"></rich-text>
</view> </view>
<view class="visaDetailLin" style="margin-top: 33rpx;margin-bottom: 18rpx;"></view> <view class="visaDetailLin" style="margin-top: 33rpx;margin-bottom: 18rpx;"></view>
<view class="visaDetailDesTitle">费用不含</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> <rich-text :nodes="dataList.VisaProductInfo.FeeNonInclude"></rich-text>
</view> </view>
<view class="visaDetailLin" style="margin-top: 33rpx;margin-bottom: 18rpx;"></view> <view class="visaDetailLin" style="margin-top: 33rpx;margin-bottom: 18rpx;"></view>
<view class="visaDetailDesTitle" style="padding: 40rpx 0 34rpx 0;">签证材料</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;"> border-radius: 12rpx;padding: 39rpx 30rpx;">
<rich-text :nodes="dataList.VisaProductInfo.VisaMaterials"></rich-text> <rich-text :nodes="dataList.VisaProductInfo.VisaMaterials"></rich-text>
</view> </view>
<view class="visaDetailDesTitle" style="padding: 50rpx 0 34rpx 0;">温馨提示</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;"> border-radius: 12rpx;padding: 39rpx 30rpx;">
<rich-text :nodes="dataList.VisaProductInfo.WarmTip"></rich-text> <rich-text :nodes="dataList.VisaProductInfo.WarmTip"></rich-text>
</view> </view>
</view> </view>
</view> </view>
...@@ -151,6 +172,7 @@ ...@@ -151,6 +172,7 @@
<view style="color: #111111; font-size: 22rpx">客服</view> <view style="color: #111111; font-size: 22rpx">客服</view>
</button> </button>
<!-- #endif --> <!-- #endif -->
<view class="jz_OrderNow" @click="goReserce">立即预定</view> <view class="jz_OrderNow" @click="goReserce">立即预定</view>
</view> </view>
</view> </view>
...@@ -566,9 +588,16 @@ ...@@ -566,9 +588,16 @@
this.is_show_auth = 1; this.is_show_auth = 1;
return; 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({ 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),
}); });
}, },
}, },
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
]"> ]">
<view class="title" v-if="scrollTop > 50">{{ pageTitle }}</view> <view class="title" v-if="scrollTop > 50">{{ pageTitle }}</view>
</view> --> </view> -->
<view class="headStatus column" v-if="scrollTop > 20" style="background: #F3F1EF;"> <view class="headStatus column" v-if="scrollTop > 50" style="background: #F3F1EF;">
<view class="visa_search relative" <view class="visa_search relative"
:style="[ :style="[
headStyle, headStyle,
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
:class="[showType==index?'active':'']"> :class="[showType==index?'active':'']">
<text>{{ item }}</text> <text>{{ item }}</text>
<u-icon style="margin-left: 5rpx;" :name="showType==index?'arrow-up':'arrow-down'" <u-icon style="margin-left: 5rpx;" :name="showType==index?'arrow-up':'arrow-down'"
:color="showType==index?'black':'#c0c4cc'" size="30" /> :color="showType==index?'#B99846':'#444'" size="30" />
</view> </view>
</view> </view>
</view> </view>
...@@ -59,16 +59,18 @@ ...@@ -59,16 +59,18 @@
</view> </view>
</view> </view>
<view class="visa_country hidden row"> <view class="visa_country hidden row">
<view class="visa_countryL column" style="padding: 10rpx 0 0 0;"> <view class="visa_countryL column"
:class="[msg.VisaCountryId==0?'':'active']" style="padding: 20rpx 0 0 0;"
@click="getVisaCountry({Id:msg.VisaCountryId})">
<view>所有</view> <view>所有</view>
<view>目的地</view> <view>目的地</view>
</view> </view>
<view class="col visa_countryR"> <view class="col visa_countryR">
<scroll-view scroll-x :scroll-left="scrollLeft" <scroll-view scroll-x :scroll-left="scrollLeft" show-scrollbar="false"
scroll-with-animation style="white-space: nowrap;width: 570rpx;"> scroll-with-animation style="white-space: nowrap;width: 570rpx;">
<view class="row col"> <view class="row col">
<template v-for="(item,index) in Countrys"> <template v-for="(item,index) in Countrys">
<view class="visa_couRTitle" style="padding: 10rpx 0 10rpx 0;" <view class="visa_couRTitle" style="padding: 30rpx 0 10rpx 0;"
:class="[item.Id==msg.VisaCountryId?'active':'']" :class="[item.Id==msg.VisaCountryId?'active':'']"
:key="index" v-if="item.Id!=0" :key="index" v-if="item.Id!=0"
@click="getVisaCountry(item)"> @click="getVisaCountry(item)">
...@@ -83,7 +85,7 @@ ...@@ -83,7 +85,7 @@
<view class="col column"> <view class="col column">
<view style="padding: 0 30rpx 0 30rpx;"> <view style="padding: 0 30rpx 0 30rpx;">
<view class="uDropdownBox"> <view class="uDropdownBox">
<u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#000" inactive-color="#444"> <u-dropdown ref="uDropdown" @open="open" @close="close" active-color="#B99846" inactive-color="#444">
<u-dropdown-item class="col" v-model="msg.ManagementName" <u-dropdown-item class="col" v-model="msg.ManagementName"
:title="optionsTitle[0]" :options="VisaTypeList" :title="optionsTitle[0]" :options="VisaTypeList"
@change="(index)=>{changeVisaCountry(index,1)}"> @change="(index)=>{changeVisaCountry(index,1)}">
...@@ -106,8 +108,13 @@ ...@@ -106,8 +108,13 @@
@click.stop="goDetail(item)"> @click.stop="goDetail(item)">
<view class="visaListL"> <view class="visaListL">
<image mode="aspectFill" :src="item.newCoverImg"/> <image mode="aspectFill" :src="item.newCoverImg"/>
<text style="position: absolute;left: 0;top: 0;
border-radius: 14rpx 0rpx 14rpx 0rpx;
background: #B99846;padding: 4rpx 9rpx;font-size: 20rpx;color: #fff;">
{{ item.visaType==1?'个签':item.visaType==2?'团签':'' }}
</text>
</view> </view>
<view class="visaListR col"> <view class="visaListR col column">
<view class="visaListTitle">{{ item.name }}</view> <view class="visaListTitle">{{ item.name }}</view>
<view class="visaListText row"> <view class="visaListText row">
<template v-for="x in item.typeTagList"> <template v-for="x in item.typeTagList">
...@@ -122,12 +129,15 @@ ...@@ -122,12 +129,15 @@
办理时长:{{item.manageDuration}}个工作日 办理时长:{{item.manageDuration}}个工作日
</text> </text>
</view> </view>
<view class="visaListNum row items-center"> <view class="col"></view>
<view class="visaListNum row">
<view class="visaListNumL row items-center"> <view class="visaListNumL row items-center">
<image class="inlineblock" mode="widthFix" <template v-if="item.bookAdvance">
style="width: 19rpx;height: 21rpx" <image class="inlineblock" mode="widthFix"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638750535244017143.png" /> style="width: 19rpx;height: 21rpx"
<text>提前{{item.bookAdvance}}个工作日预订</text> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638750535244017143.png" />
<text>提前{{item.bookAdvance}}天预订</text>
</template>
</view> </view>
<view class="visaListNumR"> <view class="visaListNumR">
<text style="font-size: 20rpx;">CNY</text> <text style="font-size: 20rpx;">CNY</text>
...@@ -300,6 +310,7 @@ export default { ...@@ -300,6 +310,7 @@ export default {
{GroupId:this.b2bUser.groupId}, {GroupId:this.b2bUser.groupId},
(res) => { (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
res.data.Country = res.data.Country.sort((a,b)=> {return a.Id-b.Id})
let Countrys = res.data.Country let Countrys = res.data.Country
let Country = { let Country = {
Id: 0, Id: 0,
...@@ -493,7 +504,7 @@ export default { ...@@ -493,7 +504,7 @@ export default {
.search-box { .search-box {
height: 60rpx; height: 60rpx;
background: #FFF; background: #FFF;
border-radius:18rpx; border-radius:12rpx;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 19rpx 30rpx; padding: 19rpx 30rpx;
...@@ -516,7 +527,6 @@ export default { ...@@ -516,7 +527,6 @@ export default {
} }
.visa_country{ .visa_country{
padding-left: 34rpx; padding-left: 34rpx;
margin-top: 35rpx;
} }
.visa_countryL{ .visa_countryL{
font-family: PingFang SC; font-family: PingFang SC;
...@@ -528,10 +538,13 @@ export default { ...@@ -528,10 +538,13 @@ export default {
margin-right: 9rpx; margin-right: 9rpx;
letter-spacing: 2rpx; letter-spacing: 2rpx;
} }
.visa_countryL.active{
color: black;
}
.visa_couRTitle{ .visa_couRTitle{
width: 102rpx; width: 102rpx;
text-align: center; text-align: center;
margin-right: 30rpx; margin-right: 0;
margin-left: 30rpx; margin-left: 30rpx;
} }
.visa_couRTitle view{ .visa_couRTitle view{
...@@ -553,7 +566,8 @@ export default { ...@@ -553,7 +566,8 @@ export default {
} }
.visa_couRTitle text{ .visa_couRTitle text{
display: block; display: block;
padding-top: 23rpx; padding-top: 11rpx;
font-size: 22rpx;
} }
.uDropdownBox{ .uDropdownBox{
...@@ -581,6 +595,8 @@ export default { ...@@ -581,6 +595,8 @@ export default {
height: 190rpx; height: 190rpx;
overflow: hidden; overflow: hidden;
margin-right: 19rpx; margin-right: 19rpx;
position: relative;
border-radius: 14rpx;
} }
.visaListL image{ .visaListL image{
width: 100%; width: 100%;
...@@ -609,7 +625,8 @@ export default { ...@@ -609,7 +625,8 @@ export default {
font-size: 20rpx; font-size: 20rpx;
} }
.visaListNum{ .visaListNum{
padding-top: 43rpx; justify-content: space-between;
align-items: center;
} }
.visaListNumL text{ .visaListNumL text{
font-family: PingFang SC; font-family: PingFang SC;
...@@ -618,10 +635,6 @@ export default { ...@@ -618,10 +635,6 @@ export default {
color: #080A09; color: #080A09;
margin-left: 10rpx; margin-left: 10rpx;
} }
.visaListNum{
justify-content: space-between;
align-items: end;
}
.visaListNumR{ .visaListNumR{
color: rgba(255, 49, 102, 1); color: rgba(255, 49, 102, 1);
} }
...@@ -634,7 +647,7 @@ export default { ...@@ -634,7 +647,7 @@ export default {
color: #444; color: #444;
} }
.uDropdownText.active text{ .uDropdownText.active text{
color: black; color: #B99846;
font-weight: bold; font-weight: bold;
} }
</style> </style>
\ No newline at end of file
...@@ -317,12 +317,14 @@ ...@@ -317,12 +317,14 @@
font-weight: 800; font-weight: 800;
font-size: 28rpx; font-size: 28rpx;
color: #080A09; color: #080A09;
padding-bottom: 22rpx;
} }
.visaProduct_l{ .visaProduct_l{
width: 160rpx; width: 160rpx;
height: 121rpx; min-height: 121rpx;
border-radius: 13rpx; border-radius: 13rpx;
overflow: hidden; overflow: hidden;
margin-right: 18rpx;
} }
.visaProduct_r{ .visaProduct_r{
letter-spacing: 2rpx; letter-spacing: 2rpx;
...@@ -397,6 +399,9 @@ ...@@ -397,6 +399,9 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.addPnum{
padding: 9rpx 10rpx;
}
</style> </style>
<template> <template>
...@@ -430,19 +435,20 @@ ...@@ -430,19 +435,20 @@
<view class="visaCustomerInfor_Title">客户资料</view> <view class="visaCustomerInfor_Title">客户资料</view>
<view class="row visaProduct"> <view class="row visaProduct">
<view class="visaProduct_l"> <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>
<view class="col column visaProduct_r"> <view class="col column visaProduct_r">
<view class="visaProduct_rTitle">{{ dataList.Name }}</view> <view class="visaProduct_rTitle">{{ dataList.Name }}</view>
<view class="row visaProduct_rTBox" style="padding: 17rpx 0 11rpx 0;"> <view class="row visaProduct_rTBox" style="padding: 17rpx 0 11rpx 0;"
<view class=""> v-if="dataList.SendCityName||dataList.ManageDuration">
<view class="" v-if="dataList.SendCityName" style="padding-right: 29rpx;">
送签地:<text class="visaProduct_rColor">{{ dataList.SendCityName }}</text> 送签地:<text class="visaProduct_rColor">{{ dataList.SendCityName }}</text>
</view> </view>
<view class="visaProduct_rColor" style="padding-left: 29rpx;"> <view class="visaProduct_rColor" v-if="dataList.ManageDuration">
收齐资料后需{{ dataList.ManageDuration }}个工作日 收齐资料后需{{ dataList.ManageDuration }}个工作日
</view> </view>
</view> </view>
<view class="visaProduct_rTBox"> <view class="visaProduct_rTBox" v-if="dataList.VisaValidity">
有效期:<text class="visaProduct_rColor">{{ dataList.VisaValidity }}</text> 有效期:<text class="visaProduct_rColor">{{ dataList.VisaValidity }}</text>
</view> </view>
</view> </view>
...@@ -452,18 +458,19 @@ ...@@ -452,18 +458,19 @@
<view class="visaProductNum_Title">人数</view> <view class="visaProductNum_Title">人数</view>
<view class="row-sbas-n items-center"> <view class="row-sbas-n items-center">
<view class="row-sbas-n items-center"> <view class="row-sbas-n items-center">
<view style="width: 27rpx;height: 27rpx;" @click="editNum(1)"> <view class="addPnum" @click="orderMsg.AdultPeopleNum>1?editNum(1):''">
<image style="width: 27rpx;height: 27rpx;display: block;" <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" /> 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>
<view class="col row items-center textCenter"> <view class="col row items-center textCenter">
<!-- {{orderMsg.AdultPeopleNum}} -->
<input type="number" class="visaProductTetx visaProduct_rColor" <input type="number" class="visaProductTetx visaProduct_rColor"
v-model="orderMsg.AdultPeopleNum" v-model="orderMsg.AdultPeopleNum"
disabled disabled
placeholder="输入" /> placeholder="输入" />
</view> </view>
<view style="width: 27rpx;height: 27rpx;" @click="editNum(2)"> <view class="addPnum" @click="editNum(2)">
<image style="width: 27rpx;height: 27rpx;display: block;" <image style="width: 27rpx;height: 27rpx;display: block;"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638751245974558349.png" /> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638751245974558349.png" />
</view> </view>
...@@ -474,7 +481,7 @@ ...@@ -474,7 +481,7 @@
<view class="visaProductNum visaProductNumR column"> <view class="visaProductNum visaProductNumR column">
<view class="visaProductNum_Title">入境日期</view> <view class="visaProductNum_Title">入境日期</view>
<picker class="visaProductTetx" mode="date" <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="row-sbas-n items-center">
<view class="visaProductTetx"> <view class="visaProductTetx">
...@@ -551,7 +558,7 @@ ...@@ -551,7 +558,7 @@
<input class="visaProductTetx" v-model="orderMsg.Receiver" placeholder="输入收件人"/> <input class="visaProductTetx" v-model="orderMsg.Receiver" placeholder="输入收件人"/>
</view> </view>
</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 column" style="width: 180rpx;">
<view class="visaProductNum_Title">国家/地区</view> <view class="visaProductNum_Title">国家/地区</view>
<view class="row-sbas-n items-center" @click="CountryType=2,showCountry=true"> <view class="row-sbas-n items-center" @click="CountryType=2,showCountry=true">
...@@ -728,6 +735,7 @@ ...@@ -728,6 +735,7 @@
</template> </template>
<script> <script>
import json from "../airTicket/components/sign/day.js";
import coupon from '@/components/coupon/index'; import coupon from '@/components/coupon/index';
import { gegerateDates,getBeforeDate,getDateWeek } from "../airTicket/dates.js"; import { gegerateDates,getBeforeDate,getDateWeek } from "../airTicket/dates.js";
export default { export default {
...@@ -796,7 +804,6 @@ ...@@ -796,7 +804,6 @@
cityList: [], cityList: [],
tipsText: '', tipsText: '',
userInfo:{}, userInfo:{},
startDate: '2025-03-25'
}; };
}, },
created() { created() {
...@@ -834,6 +841,34 @@ ...@@ -834,6 +841,34 @@
this.initCountry() this.initCountry()
}, },
methods: { methods: {
//计算日历里的节假日
resDate(dates) {
if (dates.length == 0) return;
for (var i = 0; i < dates.length; i++) {
for (var j = 0; j < this.festival.length; j++) {
if (
this.festival[j].year == dates[i].year &&
this.festival[j].month == dates[i].month
) {
for (var k = 0; k < this.festival[j].festival.length; k++) {
if (
dates[i].day==this.festival[j].festival[k].day
) {
dates[i].name = this.festival[j].festival[k].name;
}
}
}
}
}
console.log(dates.length,'=====');
return dates.le;
},
//获取周几
getWeek(date) {
var weekDay = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
var myDate = new Date(Date.parse(date));
return weekDay[myDate.getDay()];
},
editNum(type) { editNum(type) {
if (type == 1) { if (type == 1) {
if(this.orderMsg.AdultPeopleNum>1)this.orderMsg.AdultPeopleNum--; if(this.orderMsg.AdultPeopleNum>1)this.orderMsg.AdultPeopleNum--;
...@@ -939,10 +974,10 @@ ...@@ -939,10 +974,10 @@
this.customer.PhoneCountryStr = "+" + this.customer.PhoneCountry; this.customer.PhoneCountryStr = "+" + this.customer.PhoneCountry;
}, },
bindDateChange(e) { bindDateChange(e) {
let dates = getBeforeDate(0, new Date()) let dates = getBeforeDate(-this.dataList.BookAdvance, new Date())
if(e.detail.value<=dates){ if(e.detail.value<dates){
uni.showToast({ uni.showToast({
title: `请选择大于今天的日期`, title: `请选择大于等于${dates}的日期`,
icon: "none", icon: "none",
}); });
return; return;
...@@ -1046,6 +1081,10 @@ ...@@ -1046,6 +1081,10 @@
uni.hideLoading(); uni.hideLoading();
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.dataList = res.data this.dataList = res.data
let dates = getBeforeDate(-res.data.BookAdvance, new Date())
this.orderMsg.EnterCountryTime = dates
// this.setDates()
this.calcMoney() this.calcMoney()
// this.getCouponActivityHandler(res.data) // this.getCouponActivityHandler(res.data)
} }
...@@ -1117,6 +1156,10 @@ ...@@ -1117,6 +1156,10 @@
this.tipsText = '请输入电话' this.tipsText = '请输入电话'
return; return;
} }
if (this.customer.contactNumber&&this.customer.contactNumber.length<11) {
this.tipsText = '请输入正确的电话'
return;
}
if (this.customer.Mailbox == "") { if (this.customer.Mailbox == "") {
this.tipsText = '请输入邮箱地址' this.tipsText = '请输入邮箱地址'
uni.showToast({ uni.showToast({
...@@ -1125,6 +1168,15 @@ ...@@ -1125,6 +1168,15 @@
}); });
return; 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 == "") { if (this.orderMsg.Receiver == "") {
uni.showToast({ uni.showToast({
title: `请输入收件人`, title: `请输入收件人`,
...@@ -1146,6 +1198,13 @@ ...@@ -1146,6 +1198,13 @@
}); });
return; return;
} }
if (this.orderMsg.ReceiverPhone&&this.orderMsg.ReceiverPhone.length<11) {
uni.showToast({
title: `请输入正确的收件人电话`,
icon: "none",
});
return;
}
if (this.orderMsg.RelationPhoneType == "") { if (this.orderMsg.RelationPhoneType == "") {
uni.showToast({ uni.showToast({
title: `请选择收件人国家/地区`, title: `请选择收件人国家/地区`,
...@@ -1188,7 +1247,7 @@ ...@@ -1188,7 +1247,7 @@
ChildPeopleNum: '',//小孩 ChildPeopleNum: '',//小孩
TotalPrice: price,//总价 TotalPrice: price,//总价
CustomerId: this.customer.customerId,//客户id CustomerId: this.customer.customerId,//客户id
CreateBy: 0,//销售 CreateBy: this.CreateBy,//销售
OrderSource: 5,//1-ERP,2-B2B订单,3-B2C订单,4wap 5同业 6支付宝 OrderSource: 5,//1-ERP,2-B2B订单,3-B2C订单,4wap 5同业 6支付宝
EnterCountryTime: this.orderMsg.EnterCountryTime,//入境时间 EnterCountryTime: this.orderMsg.EnterCountryTime,//入境时间
GuestList: [],//this.guests 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