From 1ba3bc1b7cc5f49a005049865687d401d1bf33f3 Mon Sep 17 00:00:00 2001 From: fengachen <373943794@qq.com> Date: Thu, 28 Oct 2021 23:01:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E8=AE=AE=E6=8A=A5=E5=90=8D=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/http/signUp.js | 2 + pages/signUpEntrance/signUpEntrance.wxml | 4 +- pages/signUpPage/signUpPage.js | 20 +- pages/signUpPage/signUpPage.wxml | 2 +- pages/signUpPageGuoji/signUpPageGuoji.js | 243 +++++++++++++++++++-- pages/signUpPageGuoji/signUpPageGuoji.wxml | 128 +++++------ 6 files changed, 315 insertions(+), 84 deletions(-) diff --git a/assets/js/http/signUp.js b/assets/js/http/signUp.js index c126bb2..cce77c9 100644 --- a/assets/js/http/signUp.js +++ b/assets/js/http/signUp.js @@ -21,6 +21,8 @@ const signUpApi = { signUpMeeting:(params) => http.post(`${URL_CONFIG}meeting/payMeetingSituation/signUp`, params), // 上传汇款凭证 uploadPayRecord:(params) =>http.post(`${URL_CONFIG}meeting/payMeetingSituation/editTerminal`, params), + // 通过单位名称校验是否标协会员 + validateStandard:(params) => http.get('/meeting/internalMeetingSituation/checkMember',params) } export default signUpApi \ No newline at end of file diff --git a/pages/signUpEntrance/signUpEntrance.wxml b/pages/signUpEntrance/signUpEntrance.wxml index 2d82415..e666bfb 100644 --- a/pages/signUpEntrance/signUpEntrance.wxml +++ b/pages/signUpEntrance/signUpEntrance.wxml @@ -85,8 +85,8 @@ 暂无 - - + + 缴费二维码 diff --git a/pages/signUpPage/signUpPage.js b/pages/signUpPage/signUpPage.js index d8e5789..0caacdc 100644 --- a/pages/signUpPage/signUpPage.js +++ b/pages/signUpPage/signUpPage.js @@ -87,7 +87,9 @@ Page({ // 首页消息 indexMsg: '', // 扫码报名的 需要调用无限制接口 - nolimitBool:false + nolimitBool:false, + // 会议费用 + meetingCost:'' }, // 是否需要发票的选择 needInvoiceChange(e) { @@ -109,9 +111,21 @@ Page({ }, // 选择参会身份 changeIdentity(e){ + const that = this this.setData({ selectedIdentity:e.detail.value }) + console.log(e.detail.value); + // 参会身份选择嘉宾和内部企业 会议费用为 0 + if(e.detail.value === '2'){ + this.setData({ + meetingCost:that.data.selectedMeeting.meetingCosts + }) + }else{ + this.setData({ + meetingCost:'0.00' + }) + } }, // 缴费方式的选择 paymentMethodRadioChange(e){ @@ -270,7 +284,8 @@ Page({ console.log(res); if(res.success){ this.setData({ - selectedMeeting:res.result + selectedMeeting:res.result, + meetingCost:res.result.meetingCosts }) } }).catch( () => { @@ -297,7 +312,6 @@ Page({ } if(options.meetingId){ - this.queryMeetingInfo(options.meetingId) } const that = this diff --git a/pages/signUpPage/signUpPage.wxml b/pages/signUpPage/signUpPage.wxml index 06bf56c..3b5d28f 100644 --- a/pages/signUpPage/signUpPage.wxml +++ b/pages/signUpPage/signUpPage.wxml @@ -103,7 +103,7 @@ 费用合计: - {{selectedMeeting.meetingCosts}}元 + {{meetingCost}}元 diff --git a/pages/signUpPageGuoji/signUpPageGuoji.js b/pages/signUpPageGuoji/signUpPageGuoji.js index 1107ef1..eb69ed0 100644 --- a/pages/signUpPageGuoji/signUpPageGuoji.js +++ b/pages/signUpPageGuoji/signUpPageGuoji.js @@ -15,7 +15,7 @@ Page({ * 页面的初始数据 */ data: { - // 会议详情 + // 会议详情 meetingDetailInfo: {}, // 参会身份 identifyList: [{ @@ -53,16 +53,25 @@ Page({ selectedPerson: {}, // 选中的邮寄联系人 selectedPostPerson: {}, + selectedMeeting:{}, // 抵达时间 arrivalTime: '请选择抵达时间', // 入住酒店时间 inHotelTime: '请选择入住酒店时间', - // 离店时间 + // 离店时间 outHotelTime: '请选择离店时间', // 离开时间 departureTime: '请选择离开时间', // 是否选择发票的选中的索引 index: -1, + // 是否需要用餐 + haveMeal:'', + // 是否住酒店 + needHotel:'', + // 是否接站 + needPick:'', + // 是否送站 + needSend:'', // 上传图片的id imageIds: '', // 记录临时的文件名 用于回显 小程序上传后后端的名会乱码 @@ -71,6 +80,10 @@ Page({ speechPpt: '', // 嘉宾身份 guestType: -1, + // 参会身份 + identity:'', + // 缴费方式 + payMethod:'', // 缴费方式 paymentMethodList: [{ value: '1', @@ -109,8 +122,10 @@ Page({ }, ], flag:false, - // 是否调用无限制接口 - nolimitBool:false + // 是否调用无限制接口 + nolimitBool:false, + //会议费用 + meetingCosts:'' }, // 抵达时间选择 bindDateChangeArriveTime(e) { @@ -142,6 +157,42 @@ Page({ index: e.detail.value }) }, + // 是否用餐 + needHaveMeal(e){ + let value = e.detail.value + this.setData({ + haveMeal:value + }) + }, + // 是否住酒店 + needHotel(e){ + let value = e.detail.value + this.setData({ + needHotel:value + }) + }, + // 是否接站 + needPick(e){ + let value = e.detail.value + this.setData({ + needPick:value + }) + }, + // 是否送站 + needSend(e){ + let value = e.detail.value + this.setData({ + needSend:value + }) + }, + // 缴费方式选择 + paymentMethodRadioChange(e){ + let value = e.detail.value + this.setData({ + payMethod:value + }) + + }, // 选择参会单位 selectCompany(e) { wx.navigateTo({ @@ -174,7 +225,21 @@ Page({ }, // 改变参会身份 changeIdentify(e) { + const that = this let value = e.detail.value + this.setData({ + identity:value + }) + // 国际研讨会嘉宾 内部企业 不需要缴费 + if( value === '2' ){ + this.setData({ + meetingCosts:that.data.selectedMeeting.meetingCosts + }) + }else{ + this.setData({ + meetingCosts: '0.00' + }) + } if (value === '1') { this.setData({ inviteCodeShowBool: true, @@ -196,7 +261,7 @@ Page({ guestBool: false, }) }, - // 设置邀请码的值 + // 设置邀请码的值 bindInputInviteCode(e) { // 在这里将所有控制表单都设为false 防止显示出问题 this.setData({ @@ -308,7 +373,7 @@ Page({ var backPdfArr = []; backPdfArr.push(fileBackDa) wx.hideLoading(); //隐藏提示框 - //上传成功, + //上传成功, that.setData({ tempFiles: name, speechPpt: fileBackDa.result.id @@ -319,7 +384,7 @@ Page({ } }) }, - // 手机号验证 + // 手机号验证 validatePhone(e) { console.log(e); let value = e.detail.value @@ -423,7 +488,9 @@ Page({ if (res.success) { this.setData({ meetingDetailInfo: res.result, - inviteCodeArr: that.validateCodeArr(res.result) + inviteCodeArr: that.validateCodeArr(res.result), + selectedMeeting:res.result, + meetingCosts:res.result.meetingCosts }) } }) @@ -441,6 +508,23 @@ Page({ }) return } + if( !this.data.selectedPerson.id){ + wx.showToast({ + title: '请选择参会单位', + icon: 'none', + duration: 2000 + }) + return + } + + if( !this.data.selectedPerson.id){ + wx.showToast({ + title: '请选择参会人', + icon: 'none', + duration: 2000 + }) + return + } // 参会身份验证 if (formData.identity === '') { wx.showToast({ @@ -450,8 +534,8 @@ Page({ }) return } - // 缴费方式 - if (formData.payMode === '') { + // 缴费方式 选择嘉宾不需要校验 + if (formData.payMode === '' && this.data.guestType !== '1' ) { wx.showToast({ title: '请选择缴费方式', icon: 'none', @@ -460,7 +544,7 @@ Page({ return } // 是否需要发票 - if (formData.needInvoice === -1) { + if (formData.needInvoice === -1 && this.data.guestType !== '1' ) { wx.showToast({ title: '请选择发票', icon: 'none', @@ -470,7 +554,7 @@ Page({ } // 邮寄地址 - if (formData.postContactAddress === '') { + if (formData.postContactAddress === '' && this.data.guestType !== '1' ) { wx.showToast({ title: '请输入邮寄地址', icon: 'none', @@ -478,8 +562,8 @@ Page({ }) return } - // 邮编 - if (formData.postCode === '') { + // 邮编 + if (formData.postCode === '' && this.data.guestType !== '1' ) { wx.showToast({ title: '请输入邮编', icon: 'none', @@ -487,8 +571,27 @@ Page({ }) return } - // 是否住酒店 - if (formData.checkInHotel === '') { + // 是否用餐 + if(this.data.guestType === '1' && (formData.haveMeals == '' || formData.haveMeals === undefined) ){ + wx.showToast({ + title: '请选择是否用餐', + icon: 'none', + duration: 2000 + }) + return + } + // 是否回民 + if(this.data.guestType === '1' && thism.data.haveMeal === '1' && (formData.huiPeople == '' || formData.huiPeople === undefined) ){ + wx.showToast({ + title: '请选择是否回民', + icon: 'none', + duration: 2000 + }) + return + } + + // 是否住酒店 只有嘉宾身份是vip的才去校验 + if (formData.checkInHotel === '' && this.data.guestType === '1' ) { wx.showToast({ title: '请选择是否住酒店', icon: 'none', @@ -496,6 +599,113 @@ Page({ }) return } + // 入住酒店时间 + + if (formData.inHotelTime === '' && this.data.needHotel === '1' && this.data. this.data.guestType === '1' ) { + wx.showToast({ + title: '请选择入住酒店时间', + icon: 'none', + duration: 2000 + }) + return + } + + // 离店时间 + + if (formData.outHotelTime === '' && this.data.needHotel === '1' && this.data. this.data.guestType === '1' ) { + wx.showToast({ + title: '请选择离店时间', + icon: 'none', + duration: 2000 + }) + return + } + + // 房型 + if (formData.roomLayout === '' && this.data.needHotel === '1' && this.data. this.data.guestType === '1' ) { + wx.showToast({ + title: '请输入房型', + icon: 'none', + duration: 2000 + }) + return + } + + // 是否需要接站 + if(this.data.identity === '1' && this.data.guestType !== '4' && formData.pickUp === ''){ + wx.showToast({ + title: '请选择是否需要接站', + icon: 'none', + duration: 2000 + }) + return + } + // 抵达时间 + if(this.data.identity === '1' && this.data.needPick === '1' && this.data.guestType !== '4' && formData.arrivalTime === ''){ + wx.showToast({ + title: '请选择抵达时间', + icon: 'none', + duration: 2000 + }) + return + } + + // 到达站 + if(this.data.identity === '1' && this.data.needPick === '1' && this.data.guestType !== '4' && formData.destination === ''){ + wx.showToast({ + title: '请选择到达站', + icon: 'none', + duration: 2000 + }) + return + } + // 到达班次 + if(this.data.identity === '1' && this.data.needPick === '1' && this.data.guestType !== '4' && formData.arrivalShift === ''){ + wx.showToast({ + title: '请输入到达班次', + icon: 'none', + duration: 2000 + }) + return + } + // 是否需要送站 + if(this.data.identity === '1' && this.data.guestType !== '4' && formData.deliveryStation === ''){ + wx.showToast({ + title: '请选择是否需要送站', + icon: 'none', + duration: 2000 + }) + return + } + + // 离开时间 + if(this.data.identity === '1' && this.data.needSend === '1' && this.data.guestType !== '4' && formData.departureTime === ''){ + wx.showToast({ + title: '请选择离开时间', + icon: 'none', + duration: 2000 + }) + return + } + // 离开站 + if(this.data.identity === '1' && this.data.needSend === '1' && this.data.guestType !== '4' && formData.departureStation === ''){ + wx.showToast({ + title: '请输入离开站', + icon: 'none', + duration: 2000 + }) + return + } + // 离开班次 + + if(this.data.identity === '1' && this.data.needSend === '1' && this.data.guestType !== '4' && formData.departureShift === ''){ + wx.showToast({ + title: '请输入离开班次', + icon: 'none', + duration: 2000 + }) + return + } // 会议id formData.meetingId = this.meetingDetailInfo.id // 参会人id @@ -546,6 +756,7 @@ Page({ if(options.meetingId){ this.queryMeetingDetail(options.meetingId) } + this.queryMeetingDetail('1453179685029556226') if(options.nolimit){ this.setData({ nolimitBool:true diff --git a/pages/signUpPageGuoji/signUpPageGuoji.wxml b/pages/signUpPageGuoji/signUpPageGuoji.wxml index 8db1e4e..ae9187a 100644 --- a/pages/signUpPageGuoji/signUpPageGuoji.wxml +++ b/pages/signUpPageGuoji/signUpPageGuoji.wxml @@ -6,18 +6,19 @@ 参会单位: + name="selectedCompany.companyName" value="{{selectedCompany.companyName}}" placeholder="请选择参会单位" /> 参会人: - + 手机号: - @@ -59,9 +60,9 @@ + - - + 是否需要发票: @@ -71,26 +72,29 @@ - + + 邮寄联系人: - + - + 邮寄地址: - + - + 邮编: - + - 是否住酒店: + 是否住酒店: @@ -121,8 +125,7 @@ 费用合计: - - {{meetingDetailInfo.meetingCosts}}元 + {{meetingCosts}}元 @@ -161,7 +164,7 @@ 是否用餐: - + @@ -169,7 +172,8 @@ - + + 是否回民: @@ -188,7 +192,7 @@ 是否住酒店: - + @@ -196,8 +200,8 @@ - - 入住酒店时间: + + 入住酒店时间: {{inHotelTime}} @@ -205,8 +209,8 @@ - - 离店时间: + + 离店时间: {{outHotelTime}} @@ -214,7 +218,7 @@ - + 房型: @@ -224,7 +228,7 @@ 是否需要接站: - + @@ -232,8 +236,8 @@ - - 抵达时间: + + 抵达时间: {{arrivalTime}} @@ -241,12 +245,12 @@ - + 到达站: - + 到达班次: @@ -257,7 +261,7 @@ 是否需要送站: - + @@ -265,8 +269,8 @@ - - 离开时间: + + 离开时间: {{departureTime}} @@ -274,13 +278,13 @@ - + 离开站: - + 离开班次: @@ -334,7 +338,7 @@ 是否用餐: - + @@ -342,7 +346,7 @@ - + 是否回民: @@ -360,7 +364,7 @@ 是否需要接站: - + @@ -368,8 +372,8 @@ - - 抵达时间: + + 抵达时间: {{arrivalTime}} @@ -377,12 +381,12 @@ - + 到达站: - + 到达班次: @@ -393,7 +397,7 @@ 是否需要送站: - + @@ -401,8 +405,8 @@ - - 离开时间: + + 离开时间: {{departureTime}} @@ -410,18 +414,18 @@ - + 离开站: - + 离开班次: - 同行人: + 同行人: @@ -443,7 +447,7 @@ 是否用餐: - + @@ -451,7 +455,7 @@ - + 是否回民: @@ -469,7 +473,7 @@ 是否需要接站: - + @@ -477,8 +481,8 @@ - - 抵达时间: + + 抵达时间: {{arrivalTime}} @@ -486,12 +490,12 @@ - + 到达站: - + 到达班次: @@ -502,7 +506,7 @@ 是否需要送站: - + @@ -510,8 +514,8 @@ - - 离开时间: + + 离开时间: {{departureTime}} @@ -519,20 +523,20 @@ - + 离开站: - + 离开班次: - 同行人: + 同行人: @@ -571,4 +575,4 @@ - + \ No newline at end of file