diff --git a/assets/js/http/meetingApi.js b/assets/js/http/meetingApi.js index 3d35c2f..e6ca683 100644 --- a/assets/js/http/meetingApi.js +++ b/assets/js/http/meetingApi.js @@ -6,17 +6,20 @@ const MeetingApi = { // 会议活动详情 meetingDetail: (params) => http.get(`${URL_CONFIG}meeting/payMeeting/queryById`, params), // 文件id获取文件信息 - queryFileInfoById:(params) => http.get(`${URL_CONFIG}sys/oss/file/queryById`, params), + queryFileInfoById: (params) => http.get(`${URL_CONFIG}sys/oss/file/queryById`, params), // 参会人信息 - queryPersongInfoById:(params) => http.get(`${URL_CONFIG}meeting/payMeetingSituation/queryById`, params), + queryPersongInfoById: (params) => http.get(`${URL_CONFIG}meeting/payMeetingSituation/queryById`, params), // 国际研讨会编辑嘉宾信息 - editSignUpInfo:(params) => http.post(`${URL_CONFIG}meeting/payMeetingSituation/editGuestInfo`, params), + editSignUpInfo: (params) => http.post(`${URL_CONFIG}meeting/payMeetingSituation/editGuestInfo`, params), // 删除会议报名信息 - deleteSignUpInfo:(params) => http.get(`${URL_CONFIG}meeting/payMeetingSituation/contactsDelete`, params), + deleteSignUpInfo: (params) => http.get(`${URL_CONFIG}meeting/payMeetingSituation/contactsDelete`, params), // 编辑会议报名信息 - editContactsInfo:(params) => http.post(`${URL_CONFIG}meeting/payMeetingSituation/contactsEdit`, params), - //通过企业id查询企业的相关发票信息 - queryCompanyInfoById:(params) => http.get(`${URL_CONFIG}company/payCompanyManagement/queryById`, params) + editContactsInfo: (params) => http.post(`${URL_CONFIG}meeting/payMeetingSituation/contactsEdit`, params), + //通过企业id查询企业的相关发票信息 + queryCompanyInfoById: (params) => http.get(`${URL_CONFIG}company/payCompanyManagement/queryById`, params), + // 国际研讨会-WASIC-通过会议ID获取关联主题的信息 + getLinkTopics: (params) => http.get(`${URL_CONFIG}/meeting/internalMeeting/getLinkTopics`, params) + } -export default MeetingApi +export default MeetingApi \ No newline at end of file diff --git a/pages/meetingDetailSigned/meetingDetailSigned.wxml b/pages/meetingDetailSigned/meetingDetailSigned.wxml index 3c8ee79..fd0abb3 100644 --- a/pages/meetingDetailSigned/meetingDetailSigned.wxml +++ b/pages/meetingDetailSigned/meetingDetailSigned.wxml @@ -8,6 +8,16 @@ 会议类型 {{meetingTypeText}} + + + 是否WASIC + {{meetingInfo.isWasic_dictText || '否'}} + + + 关联课题 + {{meetingInfo.linkTopics_dictText}} + + 负责人 {{meetingInfo.directorName}} @@ -28,10 +38,20 @@ 报名截止时间 {{meetingInfo.registerDeadline}} - + 会议费用 {{meetingInfo.meetingCosts}}元 + + + 会议费用(2个课题) + {{meetingInfo.meetingCostsTwoTopic}}元/人 + + + 会议费用(3个及以上) + {{meetingInfo.meetingCostsThreeTopic}}元/人 + + 年份 {{meetingInfo.particularYear}} @@ -169,7 +189,11 @@ 身份 {{singInPersonInfo.identity_dictText}} - + + + 课题名称 + {{singInPersonInfo.choiceTopic_dictText}} + 手机号 {{singInPersonInfo.phone}} @@ -684,4 +708,4 @@ 去签到 - \ No newline at end of file + diff --git a/pages/meetingDetailSigned/meetingDetailSigned.wxss b/pages/meetingDetailSigned/meetingDetailSigned.wxss index d265a06..30c14f3 100644 --- a/pages/meetingDetailSigned/meetingDetailSigned.wxss +++ b/pages/meetingDetailSigned/meetingDetailSigned.wxss @@ -43,6 +43,16 @@ page{ border-bottom: 0.5px solid #f5f5f5; position: relative; } + +.basic-info view.wrap-text-view .basic-label{ + flex-basis: 120rpx; +} +.basic-info view.wrap-text-view text:nth-of-type(2){ + flex: 1; + width: 0; + margin-left: 10rpx; + text-align: right; +} .basic-info view:last-child{ border-bottom: 0; } @@ -357,7 +367,7 @@ margin-top: 15px; display: block; background-color: #069f99; } - + /* 问题征集新的样式 --开始 */ .question-list-view{ margin-top: 10px; @@ -398,4 +408,4 @@ margin-top: 15px; height: auto; padding-bottom: 5px; } -/* 问题征集新的样式 --结束 */ \ No newline at end of file +/* 问题征集新的样式 --结束 */ diff --git a/pages/signUpEntrance/signUpEntrance.js b/pages/signUpEntrance/signUpEntrance.js index 9aa3160..0411b84 100644 --- a/pages/signUpEntrance/signUpEntrance.js +++ b/pages/signUpEntrance/signUpEntrance.js @@ -166,8 +166,9 @@ Page({ let url = decodeURIComponent(options.q) let meetingId = url.split('=')[1] // todo 开发直接测试 - // meetingId = '1684868961715179521' // 其他会议 - // meetingId = '1684878516390023170' // 国际研讨会 + // meetingId = '1716697502924484609' // 其他会议 + // meetingId = '1716359804183416834' // 国际研讨会-wasic + // meetingId = '1682658807030460418' // 国际研讨会2 this.queryMeetingDetail(meetingId) // this.queryMeetingDetail("1479397531946348545") diff --git a/pages/signUpEntrance/signUpEntrance.wxml b/pages/signUpEntrance/signUpEntrance.wxml index 5c15f6c..0e400a1 100644 --- a/pages/signUpEntrance/signUpEntrance.wxml +++ b/pages/signUpEntrance/signUpEntrance.wxml @@ -9,7 +9,16 @@ 会议类型 {{meetingType}} - + + + 是否WASIC + {{meetingDetailIngfo.isWasic_dictText || '否'}} + + + 关联课题 + {{meetingDetailIngfo.linkTopics_dictText}} + + 标协会议类型 {{tbMeetingType}} @@ -56,11 +65,20 @@ 报名截止时间 {{meetingDetailIngfo.registerDeadline}} - + 会议费用 - {{meetingDetailIngfo.meetingCosts}}/人 + {{meetingDetailIngfo.meetingCosts}}元/人 - + + + 会议费用(2个课题) + {{meetingDetailIngfo.meetingCostsTwoTopic}}元/人 + + + 会议费用(3个及以上) + {{meetingDetailIngfo.meetingCostsThreeTopic}}元/人 + + 会议费用(标协会员) {{meetingDetailIngfo.meetingCostsVip}}/人 @@ -145,4 +163,4 @@ \ No newline at end of file + diff --git a/pages/signUpEntrance/signUpEntrance.wxss b/pages/signUpEntrance/signUpEntrance.wxss index 8c3a042..de62ce9 100644 --- a/pages/signUpEntrance/signUpEntrance.wxss +++ b/pages/signUpEntrance/signUpEntrance.wxss @@ -31,6 +31,15 @@ page{ border-bottom: 0.5px solid #f5f5f5; position: relative; } +.basic-info view.wrap-text-view .basic-label{ + flex-basis: 120rpx; +} +.basic-info view.wrap-text-view text:nth-of-type(2){ + flex: 1; + width: 0; + margin-left: 10rpx; + text-align: right; +} .basic-info view:last-child{ border-bottom: 0; } @@ -196,4 +205,4 @@ margin-top: 15px; .hotel-info text:nth-child(1) { padding-right: 8px; flex-shrink: 0; -} \ No newline at end of file +} diff --git a/pages/signUpPageGuoji/signUpPageGuoji.js b/pages/signUpPageGuoji/signUpPageGuoji.js index ffcd858..cf0203d 100644 --- a/pages/signUpPageGuoji/signUpPageGuoji.js +++ b/pages/signUpPageGuoji/signUpPageGuoji.js @@ -15,16 +15,33 @@ import { } from '../../assets/js/project.config.js' // 所有是否选择框的数据,因为要回显所以不能用一个了 const NeedArr = [{ - value: '1', - name: '是' -}, + value: '1', + name: '是' + }, { value: '0', name: '否' }, ] +// 国际研讨会关联课题 +//汽车网络安全与数据安全标准合规专题, +// 智能网汽车标准化领航及标准路线图专题, +// 汽车地毯专题, +// 动力电池安全专题, +// 弱势道路交通参与者(VRU)保护专题, +// 免费专题 +const LinkTopicsEnums = { + free: { + name: '免费专题', + index: 6 + } +} -import { InvoiceTypeEnums, MeetIdentifyTypeEnums, GuestTypeEnums } from '../../assets/js/Enums/common.js' +import { + InvoiceTypeEnums, + MeetIdentifyTypeEnums, + GuestTypeEnums +} from '../../assets/js/Enums/common.js' Page({ behaviors: [confirmInvoiceModalBehavior], @@ -39,6 +56,10 @@ Page({ isNbqyBool: false, // 邀请码数组 inviteCodeArr: [], + // 可选课题名称的数组 + linkTopicsOptionArr: [], + // 国际研讨会-WASIC-选择关联客户的数组 + choiceTopicArr: [], // 是否出现输入邀请码 参会身份选择嘉宾才出现 inviteCodeShowBool: false, // 校验邀请码的按钮控制 @@ -123,9 +144,9 @@ Page({ ], // 发票项目 invoiceProjectList: [{ - value: '1', - name: '会议费' - }, + value: '1', + name: '会议费' + }, { value: '2', name: '培训费' @@ -340,8 +361,13 @@ Page({ }) // 国际研讨会嘉宾 内部企业 不需要缴费 if (value === '2') { + let meetingCostSum = that.data.selectedMeeting.meetingCosts + // 如果当前是WASIC会议 则需要通过课题名称判断会议的费用 + if (this.data.meetingDetailInfo.isWasic) { + meetingCostSum = this.handleMeetingCostSum(this.data.linkTopicsOptionArr) + } this.setData({ - meetingCosts: that.data.selectedMeeting.meetingCosts + meetingCosts: meetingCostSum }) } else { this.setData({ @@ -349,6 +375,59 @@ Page({ }) } }, + // 多选主题的时候 处理当前显示的费用总数 + handleMeetingCostSum(linkTopicsOptionArr) { + let meetingCostSum + let choiceTopicArr = linkTopicsOptionArr.filter(item => item.checked && item.value !== (LinkTopicsEnums.free.index + '')) + if (choiceTopicArr.length > 2) { + meetingCostSum = this.data.meetingDetailInfo.meetingCostsThreeTopic + } else { + meetingCostSum = this.data.meetingDetailInfo.meetingCostsTwoTopic + } + return meetingCostSum + }, + // 获取国际研讨会-能选择课题的数据字典数据 + getLinkTopicsOptionArr(meetingId) { + MeetingApi.getLinkTopics({ + id: meetingId + }).then(res => { + if (res.success) { + let arr = res.result || [] + arr.map(tt => { + tt.name = tt.text + }) + const updateObj = { + linkTopicsOptionArr: arr // 参会人信息 + } + // 编辑时 对数据进行处理 + if (this.data.isEdit) { + // 选中的主题 + const choiceTopic = (this.model.choiceTopic || '').split(',') + this.updateCheckboxArr(arr, choiceTopic) + // 计算费用 + updateObj.meetingCosts = this.handleMeetingCostSum(arr) + updateObj.linkTopicsOptionArr = arr + } + this.setData({ + ...updateObj + }) + + } + }) + }, + // 选择的课题发生改变 + changeChoiceTopic(e) { + const values = e.detail.value // 是一个数组 ['1', '2'] + this.updateCheckboxArr(this.data.linkTopicsOptionArr, values) + let updateObj = {linkTopicsOptionArr: this.data.linkTopicsOptionArr} + // 选择是参会人的时候处理数据 + if (this.data.identity === '2') { + updateObj.meetingCosts = this.handleMeetingCostSum(this.data.linkTopicsOptionArr) + } + this.setData({ + ...updateObj + }) + }, // 设置邀请码的值 bindInputInviteCode(e) { // 在这里将所有控制表单都设为false 防止显示出问题 @@ -494,7 +573,6 @@ Page({ name: 'file', //后台获取的凭据 success(res) { var fileBackDa = JSON.parse(res.data); - console.log(fileBackDa); var backPdfArr = []; backPdfArr.push(fileBackDa) wx.hideLoading(); //隐藏提示框 @@ -694,7 +772,10 @@ Page({ id: id }).then(res => { if (res.success) { - + // 国际研讨会 且为WASIC 会议 + if (Number(res.result.isWasic)) { + this.getLinkTopicsOptionArr(res.result.id) + } this.setData({ meetingDetailInfo: res.result, inviteCodeArr: that.validateCodeArr(res.result), @@ -724,6 +805,17 @@ Page({ }) return } + // 如果会议是WASIC 需要对是否选择课题名称做校验 + if (this.data.meetingDetailInfo.isWasic) { + if (!formData.choiceTopic || formData.choiceTopic.length === 0) { + wx.showToast({ + title: '请选择关联课题', + icon: 'none', + duration: 2000 + }) + return + } + } // 参会身份验证 if (formData.identity === '') { wx.showToast({ @@ -762,7 +854,7 @@ Page({ } // 需要发票的时候 校验发票的信息 // 20230720 新增需要判断当需要发票时,所有的发票信息是否填写 - if(Number(formData.needInvoice)){ + if (Number(formData.needInvoice)) { if (!formData.dutyCode) { wx.showToast({ title: '请输入信用代码', @@ -772,7 +864,7 @@ Page({ return } // 验证企业信用代码是否正确 - if(!dutyCode(formData.dutyCode)) { + if (!dutyCode(formData.dutyCode)) { wx.showToast({ title: '请输入正确的信用代码', icon: 'none', @@ -780,7 +872,7 @@ Page({ }) return } - if(Number(formData.needInvoice) === InvoiceTypeEnums.special.index) { + if (Number(formData.needInvoice) === InvoiceTypeEnums.special.index) { if (!formData.companyAddress) { wx.showToast({ title: '请输入公司地址', @@ -1052,6 +1144,10 @@ Page({ // 邀请码数据 formData.invitationCode = formData.inviteCode } + // 国际研讨会-WASIC 所选择的 关联课题 + if (formData.choiceTopic) { + formData.choiceTopic = formData.choiceTopic.join(',') + } // 会议类型 // formData.meetingType = this.data.selectedMeeting.meetingType console.log(formData); @@ -1063,7 +1159,7 @@ Page({ let func let lastPage // 上一个调换的页面,用于记录编辑成功后返回哪个页面 const isEdit = this.isEdit - if(isEdit) { + if (isEdit) { func = MeetingApi.editContactsInfo formData.id = this.model.id // 编辑参会人的信息 lastPage = this.lastPage @@ -1096,7 +1192,7 @@ Page({ key: 'currentMeetingInfo', success() { // 非编辑页面跳转到下一页 - if(!isEdit) { + if (!isEdit) { // 跳转报名成功页面 res.result为true不需要审核 if (!res.result) { wx.navigateTo({ @@ -1131,7 +1227,7 @@ Page({ }) } // 如果不需要发票 - if(!Number(formData.needInvoice)) { + if (!Number(formData.needInvoice)) { callback && callback() return } @@ -1195,6 +1291,19 @@ Page({ } }) }, + /** + * 更新Checkbox对应的选中状态 + * @param arr-Checkbox对应的数组 + * @param valueArr-选中的值-数组 + */ + updateCheckboxArr(arr, valueArr) { + arr.map(tt => { + tt.checked = false + if (valueArr.indexOf(tt.value) > -1) { + tt.checked = true + } + }) + }, // 通过文件id获取文件的相关信息 getFileInfo(id) { return new Promise(resolve => { @@ -1227,7 +1336,7 @@ Page({ } }, // 编辑--用于信息的回显 - async edit(record){ + async edit(record) { this.model = Object.assign({}, record) // 通过接口获取全部的企业信息 @@ -1236,7 +1345,7 @@ Page({ let invoiceKeys = ['dutyCode', 'companyAddress', 'companyPhone', 'openingBank', 'bankAccount', 'linkBankNumber'] let invoiceInfo = {} invoiceKeys.map(key => { - if(this.model[key]) { + if (this.model[key]) { invoiceInfo[key] = this.model[key] } }) @@ -1259,13 +1368,16 @@ Page({ // } // 参会人 const selectedPerson = { - id:this.model.companyContactTemporaryId, - name:this.model.companyContactName + id: this.model.companyContactTemporaryId, + name: this.model.companyContactName } // 如果身份是嘉宾则有邀请码,不是嘉宾则没有邀请码 this.changeInviteCode({ - detail: {value: this.model.identity === MeetIdentifyTypeEnums.guest.index ? '1' : '0'} + detail: { + value: this.model.identity === MeetIdentifyTypeEnums.guest.index ? '1' : '0' + } }) + // 选中的身份 const selectedIdentity = this.model.identity + '' // 参会身份选中状态的处理 @@ -1275,7 +1387,15 @@ Page({ const updateObj = { identity: this.model.identity + '' // 参会人信息 } - if(this.model.identity === MeetIdentifyTypeEnums.attendee.index) { + // 如果当前会议是WASIC需要处理 选中主题字段 + if (this.data.meetingDetailInfo.isWasic) { + // 选中的主题 + const choiceTopic = (this.model.choiceTopic || '').split(',') + this.updateCheckboxArr(this.data.linkTopicsOptionArr, choiceTopic) + // 计算费用 + updateObj.meetingCosts = this.handleMeetingCostSum(this.data.linkTopicsOptionArr) + } + if (this.model.identity === MeetIdentifyTypeEnums.attendee.index) { this.updateRadioArr(this.data.need, '0') updateObj.need = this.data.need // 缴费方式 @@ -1298,7 +1418,7 @@ Page({ updateObj.selectedPostPerson = selectedPostPerson updateObj.remark = this.model.remark // 备注 - } else if(this.model.identity === MeetIdentifyTypeEnums.guest.index) { + } else if (this.model.identity === MeetIdentifyTypeEnums.guest.index) { // 将验证码相关显示信息回显 const guestType = this.model.guestType + '' // 嘉宾类型 this.updateGuestFlag(guestType) @@ -1307,7 +1427,7 @@ Page({ updateObj.need = this.data.need this.data.guestInfo.speechTopic = this.model.speechTopic // 演讲题目 // 演讲PPT--先获取文件的id 处理全局的信息 speechPpt-文件id tempFiles--文件的名称 - if(this.model.speechPpt) { + if (this.model.speechPpt) { //todo PC端可以上传多个文件,但是小程序只做了一个 先按照小程序的处理 this.initFileList(this.model.speechPpt).then(res => { this.setData({ @@ -1351,7 +1471,7 @@ Page({ updateObj.departureTime = this.model.departureTime // 离开时间 this.data.guestInfo.departureStation = this.model.departureStation // 离开站 this.data.guestInfo.departureShift = this.model.departureShift // 离开班次 - this.data.guestInfo.peer = this.model.peer // 同行人 + this.data.guestInfo.peer = this.model.peer // 同行人 this.data.guestInfo.remark = this.model.remark // 备注 @@ -1372,8 +1492,10 @@ Page({ queryCompanyInfoById(id) { return new Promise(resolve => { let result = {} - MeetingApi.queryCompanyInfoById({id}).then(callRes => { - if(callRes.success) { + MeetingApi.queryCompanyInfoById({ + id + }).then(callRes => { + if (callRes.success) { result = callRes.result || {} } }).finally(() => { @@ -1384,7 +1506,7 @@ Page({ /** * 生命周期函数--监听页面加载 */ - onLoad: function (options) { + onLoad: async function (options) { console.log("------options---------", options) // options = { // id: "1683047817135579138", @@ -1394,7 +1516,7 @@ Page({ // } // 这个id 可能是是会议活动进来的 或者消息 或者扫码的 if (options.meetingId) { - this.queryMeetingDetail(options.meetingId) + await this.queryMeetingDetail(options.meetingId) // this.queryMeetingDetail('1504615517497524226') } @@ -1406,14 +1528,14 @@ Page({ this.setData({ pageTitle: options.id ? '编辑报名信息' : '会议报名' }) - if(options.id) { + if (options.id) { this.isEdit = options.ope === 'edit' this.lastPage = `../${options.page}/${options.page}` // 对上一个页面的参数进行处理 this.lastOptions = options.options && JSON.parse(options.options) || {} let str = '' Object.keys(this.lastOptions).forEach((tt, i) => { - if( i > 0) { + if (i > 0) { str += `&${tt}=${this.lastOptions[tt]}` } else { str += `?${tt}=${this.lastOptions[tt]}` @@ -1421,8 +1543,10 @@ Page({ }) this.lastPage += str // 通过id获取参会人信息 - MeetingApi.queryPersongInfoById({id: options.id}).then(res => { - if(res.success){ + MeetingApi.queryPersongInfoById({ + id: options.id + }).then(res => { + if (res.success) { this.edit(res.result) } }) diff --git a/pages/signUpPageGuoji/signUpPageGuoji.wxml b/pages/signUpPageGuoji/signUpPageGuoji.wxml index 689814f..0e3abde 100644 --- a/pages/signUpPageGuoji/signUpPageGuoji.wxml +++ b/pages/signUpPageGuoji/signUpPageGuoji.wxml @@ -24,6 +24,20 @@ 手机号: + + + + 课题名称: + + + + + + + + diff --git a/pages/signUpPageGuoji/signUpPageGuoji.wxss b/pages/signUpPageGuoji/signUpPageGuoji.wxss index 7b01545..2c261f1 100644 --- a/pages/signUpPageGuoji/signUpPageGuoji.wxss +++ b/pages/signUpPageGuoji/signUpPageGuoji.wxss @@ -169,3 +169,8 @@ page{ padding: 31rpx 0; width: 196.66rpx; } + +/* 多选组件的样式 */ +.checkbox-item { + display: block; +}