Commit 01cecd5d authored by youjie's avatar youjie

修复bug

parent 8a468cf3
......@@ -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 {
......
......@@ -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>
......@@ -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>
......@@ -151,6 +172,7 @@
<view style="color: #111111; font-size: 22rpx">客服</view>
</button>
<!-- #endif -->
<view class="jz_OrderNow" @click="goReserce">立即预定</view>
</view>
</view>
......@@ -566,9 +588,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),
});
},
},
......
......@@ -10,7 +10,7 @@
]">
<view class="title" v-if="scrollTop > 50">{{ pageTitle }}</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"
:style="[
headStyle,
......@@ -33,7 +33,7 @@
:class="[showType==index?'active':'']">
<text>{{ item }}</text>
<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>
......@@ -59,16 +59,18 @@
</view>
</view>
<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 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;">
<view class="row col">
<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':'']"
:key="index" v-if="item.Id!=0"
@click="getVisaCountry(item)">
......@@ -83,7 +85,7 @@
<view class="col column">
<view style="padding: 0 30rpx 0 30rpx;">
<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"
:title="optionsTitle[0]" :options="VisaTypeList"
@change="(index)=>{changeVisaCountry(index,1)}">
......@@ -106,8 +108,13 @@
@click.stop="goDetail(item)">
<view class="visaListL">
<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 class="visaListR col">
<view class="visaListR col column">
<view class="visaListTitle">{{ item.name }}</view>
<view class="visaListText row">
<template v-for="x in item.typeTagList">
......@@ -122,12 +129,15 @@
办理时长:{{item.manageDuration}}个工作日
</text>
</view>
<view class="visaListNum row items-center">
<view class="col"></view>
<view class="visaListNum row">
<view class="visaListNumL row items-center">
<template v-if="item.bookAdvance">
<image class="inlineblock" mode="widthFix"
style="width: 19rpx;height: 21rpx"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638750535244017143.png" />
<text>提前{{item.bookAdvance}}个工作日预订</text>
<text>提前{{item.bookAdvance}}天预订</text>
</template>
</view>
<view class="visaListNumR">
<text style="font-size: 20rpx;">CNY</text>
......@@ -300,6 +310,7 @@ export default {
{GroupId:this.b2bUser.groupId},
(res) => {
if (res.resultCode == 1) {
res.data.Country = res.data.Country.sort((a,b)=> {return a.Id-b.Id})
let Countrys = res.data.Country
let Country = {
Id: 0,
......@@ -493,7 +504,7 @@ export default {
.search-box {
height: 60rpx;
background: #FFF;
border-radius:18rpx;
border-radius:12rpx;
display: flex;
align-items: center;
padding: 19rpx 30rpx;
......@@ -516,7 +527,6 @@ export default {
}
.visa_country{
padding-left: 34rpx;
margin-top: 35rpx;
}
.visa_countryL{
font-family: PingFang SC;
......@@ -528,10 +538,13 @@ export default {
margin-right: 9rpx;
letter-spacing: 2rpx;
}
.visa_countryL.active{
color: black;
}
.visa_couRTitle{
width: 102rpx;
text-align: center;
margin-right: 30rpx;
margin-right: 0;
margin-left: 30rpx;
}
.visa_couRTitle view{
......@@ -553,7 +566,8 @@ export default {
}
.visa_couRTitle text{
display: block;
padding-top: 23rpx;
padding-top: 11rpx;
font-size: 22rpx;
}
.uDropdownBox{
......@@ -581,6 +595,8 @@ export default {
height: 190rpx;
overflow: hidden;
margin-right: 19rpx;
position: relative;
border-radius: 14rpx;
}
.visaListL image{
width: 100%;
......@@ -609,7 +625,8 @@ export default {
font-size: 20rpx;
}
.visaListNum{
padding-top: 43rpx;
justify-content: space-between;
align-items: center;
}
.visaListNumL text{
font-family: PingFang SC;
......@@ -618,10 +635,6 @@ export default {
color: #080A09;
margin-left: 10rpx;
}
.visaListNum{
justify-content: space-between;
align-items: end;
}
.visaListNumR{
color: rgba(255, 49, 102, 1);
}
......@@ -634,7 +647,7 @@ export default {
color: #444;
}
.uDropdownText.active text{
color: black;
color: #B99846;
font-weight: bold;
}
</style>
\ No newline at end of file
......@@ -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(2)">
<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() {
......@@ -834,6 +841,34 @@
this.initCountry()
},
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) {
if (type == 1) {
if(this.orderMsg.AdultPeopleNum>1)this.orderMsg.AdultPeopleNum--;
......@@ -939,10 +974,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 +1081,10 @@
uni.hideLoading();
if (res.resultCode == 1) {
this.dataList = res.data
let dates = getBeforeDate(-res.data.BookAdvance, new Date())
this.orderMsg.EnterCountryTime = dates
// this.setDates()
this.calcMoney()
// this.getCouponActivityHandler(res.data)
}
......@@ -1117,6 +1156,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 +1168,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 +1198,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 +1247,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