【bug】邮寄联系人的校验
This commit is contained in:
@@ -5,7 +5,10 @@ import {
|
||||
phoneReg,
|
||||
postcode
|
||||
} from '../../utils/validate'
|
||||
import {baseUrl, URL_CONFIG} from '../../assets/js/project.config.js'
|
||||
import {
|
||||
baseUrl,
|
||||
URL_CONFIG
|
||||
} from '../../assets/js/project.config.js'
|
||||
Page({
|
||||
|
||||
/**
|
||||
@@ -50,7 +53,7 @@ Page({
|
||||
selectedPerson: {},
|
||||
// 选中的邮寄联系人
|
||||
selectedPostPerson: {},
|
||||
selectedMeeting:{},
|
||||
selectedMeeting: {},
|
||||
// 抵达时间
|
||||
arrivalTime: '请选择抵达时间',
|
||||
// 入住酒店时间
|
||||
@@ -62,13 +65,13 @@ Page({
|
||||
// 是否选择发票的选中的索引
|
||||
index: -1,
|
||||
// 是否需要用餐
|
||||
haveMeal:'',
|
||||
haveMeal: '',
|
||||
// 是否住酒店
|
||||
needHotel:'',
|
||||
needHotel: '',
|
||||
// 是否接站
|
||||
needPick:'',
|
||||
needPick: '',
|
||||
// 是否送站
|
||||
needSend:'',
|
||||
needSend: '',
|
||||
// 上传图片的id
|
||||
imageIds: '',
|
||||
// 记录临时的文件名 用于回显 小程序上传后后端的名会乱码
|
||||
@@ -78,9 +81,9 @@ Page({
|
||||
// 嘉宾身份
|
||||
guestType: -1,
|
||||
// 参会身份
|
||||
identity:'',
|
||||
identity: '',
|
||||
// 缴费方式
|
||||
payMethod:'',
|
||||
payMethod: '',
|
||||
// 缴费方式
|
||||
paymentMethodList: [{
|
||||
value: '1',
|
||||
@@ -118,11 +121,11 @@ Page({
|
||||
name: '否'
|
||||
},
|
||||
],
|
||||
flag:false,
|
||||
flag: false,
|
||||
// 是否调用无限制接口
|
||||
nolimitBool:false,
|
||||
nolimitBool: false,
|
||||
//会议费用
|
||||
meetingCosts:''
|
||||
meetingCosts: ''
|
||||
},
|
||||
// 抵达时间选择
|
||||
bindDateChangeArriveTime(e) {
|
||||
@@ -155,49 +158,49 @@ Page({
|
||||
})
|
||||
},
|
||||
// 是否用餐
|
||||
needHaveMeal(e){
|
||||
needHaveMeal(e) {
|
||||
let value = e.detail.value
|
||||
this.setData({
|
||||
haveMeal:value
|
||||
haveMeal: value
|
||||
})
|
||||
},
|
||||
// 是否住酒店
|
||||
needHotel(e){
|
||||
needHotel(e) {
|
||||
let value = e.detail.value
|
||||
this.setData({
|
||||
needHotel:value
|
||||
needHotel: value
|
||||
})
|
||||
},
|
||||
// 是否接站
|
||||
needPick(e){
|
||||
needPick(e) {
|
||||
let value = e.detail.value
|
||||
this.setData({
|
||||
needPick:value
|
||||
needPick: value
|
||||
})
|
||||
},
|
||||
// 是否送站
|
||||
needSend(e){
|
||||
needSend(e) {
|
||||
let value = e.detail.value
|
||||
this.setData({
|
||||
needSend:value
|
||||
needSend: value
|
||||
})
|
||||
},
|
||||
// 缴费方式选择
|
||||
paymentMethodRadioChange(e){
|
||||
paymentMethodRadioChange(e) {
|
||||
let value = e.detail.value
|
||||
console.log(e.detail.value);
|
||||
this.setData({
|
||||
payMethod:value
|
||||
payMethod: value
|
||||
})
|
||||
|
||||
},
|
||||
// 选择参会单位
|
||||
selectCompany(e) {
|
||||
if(this.data.nolimitBool){
|
||||
if (this.data.nolimitBool) {
|
||||
wx.navigateTo({
|
||||
url: `../companyList/companyList?page=${e.currentTarget.dataset.page}&nolimit=nolimit`,
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
wx.navigateTo({
|
||||
url: `../companyList/companyList?page=${e.currentTarget.dataset.page}`,
|
||||
})
|
||||
@@ -223,16 +226,16 @@ Page({
|
||||
const that = this
|
||||
let value = e.detail.value
|
||||
this.setData({
|
||||
identity:value,
|
||||
index:-1,
|
||||
|
||||
identity: value,
|
||||
index: -1,
|
||||
|
||||
})
|
||||
// 国际研讨会嘉宾 内部企业 不需要缴费
|
||||
if( value === '2' ){
|
||||
if (value === '2') {
|
||||
this.setData({
|
||||
meetingCosts:that.data.selectedMeeting.meetingCosts
|
||||
meetingCosts: that.data.selectedMeeting.meetingCosts
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
this.setData({
|
||||
meetingCosts: '0.00'
|
||||
})
|
||||
@@ -268,6 +271,7 @@ Page({
|
||||
cooperatieBool: false,
|
||||
guestBool: false,
|
||||
})
|
||||
this.validateCode()
|
||||
},
|
||||
// 校验邀请码
|
||||
validateCode() {
|
||||
@@ -324,6 +328,10 @@ Page({
|
||||
validateBtnBool: false
|
||||
})
|
||||
break
|
||||
default:
|
||||
this.setData({
|
||||
validateBtnBool: ture
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -486,8 +494,8 @@ Page({
|
||||
this.setData({
|
||||
meetingDetailInfo: res.result,
|
||||
inviteCodeArr: that.validateCodeArr(res.result),
|
||||
selectedMeeting:res.result,
|
||||
meetingCosts:res.result.meetingCosts
|
||||
selectedMeeting: res.result,
|
||||
meetingCosts: res.result.meetingCosts
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -495,7 +503,6 @@ Page({
|
||||
// 确定
|
||||
formSubmit(e) {
|
||||
const formData = Object.assign({}, e.detail.value)
|
||||
console.log(e);
|
||||
|
||||
if (this.data.flag) {
|
||||
wx.showToast({
|
||||
@@ -505,7 +512,7 @@ Page({
|
||||
})
|
||||
return
|
||||
}
|
||||
if( !this.data.selectedCompany.id){
|
||||
if (!this.data.selectedCompany.id) {
|
||||
wx.showToast({
|
||||
title: '请选择参会单位',
|
||||
icon: 'none',
|
||||
@@ -514,7 +521,7 @@ Page({
|
||||
return
|
||||
}
|
||||
|
||||
if( !this.data.selectedPerson.id){
|
||||
if (!this.data.selectedPerson.id) {
|
||||
wx.showToast({
|
||||
title: '请选择参会人',
|
||||
icon: 'none',
|
||||
@@ -532,7 +539,7 @@ Page({
|
||||
return
|
||||
}
|
||||
// 缴费方式 选择嘉宾不需要校验
|
||||
if (formData.payMode === '' && this.data.guestType !== '1' ) {
|
||||
if (formData.payMode === '' && this.data.guestType !== '1') {
|
||||
wx.showToast({
|
||||
title: '请选择缴费方式',
|
||||
icon: 'none',
|
||||
@@ -541,7 +548,7 @@ Page({
|
||||
return
|
||||
}
|
||||
// 是否需要发票
|
||||
if (formData.needInvoice === -1 && this.data.guestType !== '1' ) {
|
||||
if (formData.needInvoice === -1 && this.data.guestType !== '1') {
|
||||
wx.showToast({
|
||||
title: '请选择是否需要发票',
|
||||
icon: 'none',
|
||||
@@ -549,9 +556,16 @@ Page({
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if(formData.identity == '2' && this.data.selectedPostPerson.id ==- '' || this.data.selectedPostPerson.id === undefined ){
|
||||
wx.showToast({
|
||||
title: '请选择邮寄联系人',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return
|
||||
}
|
||||
// 邮寄地址
|
||||
if (formData.postContactAddress === '' && this.data.guestType !== '1' ) {
|
||||
if (formData.postContactAddress === '' && this.data.guestType !== '1') {
|
||||
wx.showToast({
|
||||
title: '请输入邮寄地址',
|
||||
icon: 'none',
|
||||
@@ -560,7 +574,7 @@ Page({
|
||||
return
|
||||
}
|
||||
// 邮编
|
||||
if (formData.postCode === '' && this.data.guestType !== '1' ) {
|
||||
if (formData.postCode === '' && this.data.guestType !== '1') {
|
||||
wx.showToast({
|
||||
title: '请输入邮编',
|
||||
icon: 'none',
|
||||
@@ -569,7 +583,7 @@ Page({
|
||||
return
|
||||
}
|
||||
// 是否用餐
|
||||
if(this.data.guestType !== '4' && (formData.haveMeals == '' || formData.haveMeals === undefined) ){
|
||||
if (this.data.guestType !== '4' && (formData.haveMeals == '' || formData.haveMeals === undefined)) {
|
||||
wx.showToast({
|
||||
title: '请选择是否用餐',
|
||||
icon: 'none',
|
||||
@@ -578,7 +592,7 @@ Page({
|
||||
return
|
||||
}
|
||||
// 是否回民 选择了是否用餐才去校验
|
||||
if(this.data.guestType !== '4' && thism.data.haveMeal === '1' && (formData.huiPeople == '' || formData.huiPeople === undefined) ){
|
||||
if (this.data.guestType !== '4' && thism.data.haveMeal === '1' && (formData.huiPeople == '' || formData.huiPeople === undefined)) {
|
||||
wx.showToast({
|
||||
title: '请选择是否回民',
|
||||
icon: 'none',
|
||||
@@ -588,7 +602,7 @@ Page({
|
||||
}
|
||||
|
||||
// 是否住酒店 只有嘉宾身份是vip的才去校验
|
||||
if (formData.checkInHotel === '' && this.data.guestType === '1' ) {
|
||||
if (formData.checkInHotel === '' && this.data.guestType === '1') {
|
||||
wx.showToast({
|
||||
title: '请选择是否住酒店',
|
||||
icon: 'none',
|
||||
@@ -598,7 +612,7 @@ Page({
|
||||
}
|
||||
// 入住酒店时间
|
||||
|
||||
if (formData.inHotelTime === '' && this.data.needHotel === '1' && this.data. this.data.guestType === '1' ) {
|
||||
if (formData.inHotelTime === '' && this.data.needHotel === '1' && this.data.this.data.guestType === '1') {
|
||||
wx.showToast({
|
||||
title: '请选择入住酒店时间',
|
||||
icon: 'none',
|
||||
@@ -609,7 +623,7 @@ Page({
|
||||
|
||||
// 离店时间
|
||||
|
||||
if (formData.outHotelTime === '' && this.data.needHotel === '1' && this.data. this.data.guestType === '1' ) {
|
||||
if (formData.outHotelTime === '' && this.data.needHotel === '1' && this.data.this.data.guestType === '1') {
|
||||
wx.showToast({
|
||||
title: '请选择离店时间',
|
||||
icon: 'none',
|
||||
@@ -619,7 +633,7 @@ Page({
|
||||
}
|
||||
|
||||
// 房型
|
||||
if (formData.roomLayout === '' && this.data.needHotel === '1' && this.data. this.data.guestType === '1' ) {
|
||||
if (formData.roomLayout === '' && this.data.needHotel === '1' && this.data.this.data.guestType === '1') {
|
||||
wx.showToast({
|
||||
title: '请输入房型',
|
||||
icon: 'none',
|
||||
@@ -629,7 +643,7 @@ Page({
|
||||
}
|
||||
|
||||
// 是否需要接站
|
||||
if(this.data.identity === '1' && this.data.guestType !== '4' && formData.pickUp === ''){
|
||||
if (this.data.identity === '1' && this.data.guestType !== '4' && formData.pickUp === '') {
|
||||
wx.showToast({
|
||||
title: '请选择是否需要接站',
|
||||
icon: 'none',
|
||||
@@ -638,7 +652,7 @@ Page({
|
||||
return
|
||||
}
|
||||
// 抵达时间
|
||||
if(this.data.identity === '1' && this.data.needPick === '1' && this.data.guestType !== '4' && formData.arrivalTime === ''){
|
||||
if (this.data.identity === '1' && this.data.needPick === '1' && this.data.guestType !== '4' && formData.arrivalTime === '') {
|
||||
wx.showToast({
|
||||
title: '请选择抵达时间',
|
||||
icon: 'none',
|
||||
@@ -648,7 +662,7 @@ Page({
|
||||
}
|
||||
|
||||
// 到达站
|
||||
if(this.data.identity === '1' && this.data.needPick === '1' && this.data.guestType !== '4' && formData.destination === ''){
|
||||
if (this.data.identity === '1' && this.data.needPick === '1' && this.data.guestType !== '4' && formData.destination === '') {
|
||||
wx.showToast({
|
||||
title: '请选择到达站',
|
||||
icon: 'none',
|
||||
@@ -657,7 +671,7 @@ Page({
|
||||
return
|
||||
}
|
||||
// 到达班次
|
||||
if(this.data.identity === '1' && this.data.needPick === '1' && this.data.guestType !== '4' && formData.arrivalShift === ''){
|
||||
if (this.data.identity === '1' && this.data.needPick === '1' && this.data.guestType !== '4' && formData.arrivalShift === '') {
|
||||
wx.showToast({
|
||||
title: '请输入到达班次',
|
||||
icon: 'none',
|
||||
@@ -666,7 +680,7 @@ Page({
|
||||
return
|
||||
}
|
||||
// 是否需要送站
|
||||
if(this.data.identity === '1' && this.data.guestType !== '4' && formData.deliveryStation === ''){
|
||||
if (this.data.identity === '1' && this.data.guestType !== '4' && formData.deliveryStation === '') {
|
||||
wx.showToast({
|
||||
title: '请选择是否需要送站',
|
||||
icon: 'none',
|
||||
@@ -676,7 +690,7 @@ Page({
|
||||
}
|
||||
|
||||
// 离开时间
|
||||
if(this.data.identity === '1' && this.data.needSend === '1' && this.data.guestType !== '4' && formData.departureTime === ''){
|
||||
if (this.data.identity === '1' && this.data.needSend === '1' && this.data.guestType !== '4' && formData.departureTime === '') {
|
||||
wx.showToast({
|
||||
title: '请选择离开时间',
|
||||
icon: 'none',
|
||||
@@ -685,7 +699,7 @@ Page({
|
||||
return
|
||||
}
|
||||
// 离开站
|
||||
if(this.data.identity === '1' && this.data.needSend === '1' && this.data.guestType !== '4' && formData.departureStation === ''){
|
||||
if (this.data.identity === '1' && this.data.needSend === '1' && this.data.guestType !== '4' && formData.departureStation === '') {
|
||||
wx.showToast({
|
||||
title: '请输入离开站',
|
||||
icon: 'none',
|
||||
@@ -695,7 +709,7 @@ Page({
|
||||
}
|
||||
// 离开班次
|
||||
|
||||
if(this.data.identity === '1' && this.data.needSend === '1' && this.data.guestType !== '4' && formData.departureShift === ''){
|
||||
if (this.data.identity === '1' && this.data.needSend === '1' && this.data.guestType !== '4' && formData.departureShift === '') {
|
||||
wx.showToast({
|
||||
title: '请输入离开班次',
|
||||
icon: 'none',
|
||||
@@ -749,14 +763,14 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
// 这个id 可能是是会议活动进来的 或者消息 或者扫码的
|
||||
if(options.meetingId){
|
||||
// 这个id 可能是是会议活动进来的 或者消息 或者扫码的
|
||||
if (options.meetingId) {
|
||||
this.queryMeetingDetail(options.meetingId)
|
||||
}
|
||||
// this.queryMeetingDetail('1455716624649428994')
|
||||
if(options.nolimit){
|
||||
this.queryMeetingDetail('1455716624649428994')
|
||||
if (options.nolimit) {
|
||||
this.setData({
|
||||
nolimitBool:true
|
||||
nolimitBool: true
|
||||
})
|
||||
}
|
||||
// 从缓存中拿选中的企业
|
||||
@@ -831,4 +845,4 @@ Page({
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user