【update】国际研讨会增加 是否WASIC的需求变更

This commit is contained in:
fengchenchen
2023-10-24 17:24:18 +08:00
parent 12cc4ce8a9
commit 2b1faf76d7
9 changed files with 262 additions and 54 deletions
+11 -8
View File
@@ -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
@@ -8,6 +8,16 @@
<text>会议类型</text>
<text>{{meetingTypeText}}</text>
</view>
<!-- 国际研讨会的判断-是否WASIC--开始 -->
<view wx:if="{{meetingInfo.meetingType === '3'}}">
<text>是否WASIC</text>
<text>{{meetingInfo.isWasic_dictText || '否'}}</text>
</view>
<view class="wrap-text-view" wx:if="{{meetingInfo.meetingType === '3' && meetingInfo.isWasic}}">
<text class="basic-label">关联课题</text>
<text>{{meetingInfo.linkTopics_dictText}}</text>
</view>
<!-- 国际研讨会的判断-是否WASIC--结束 -->
<view>
<text>负责人</text>
<text>{{meetingInfo.directorName}}</text>
@@ -28,10 +38,20 @@
<text>报名截止时间</text>
<text>{{meetingInfo.registerDeadline}}</text>
</view>
<view>
<view wx:if="{{meetingInfo.meetingType !== '3' || !meetingInfo.isWasic}}">
<text>会议费用</text>
<text>{{meetingInfo.meetingCosts}}元</text>
</view>
<!-- 国际研讨会 且为WASIC -会议字段不同 - 开始 -->
<view wx:if="{{meetingInfo.meetingType === '3' && meetingInfo.isWasic}}">
<text>会议费用(2个课题)</text>
<text>{{meetingInfo.meetingCostsTwoTopic}}元/人</text>
</view>
<view wx:if="{{meetingInfo.meetingType === '3' && meetingInfo.isWasic}}">
<text>会议费用(3个及以上)</text>
<text>{{meetingInfo.meetingCostsThreeTopic}}元/人</text>
</view>
<!-- 国际研讨会 且为WASIC -会议字段不同 - 结束 -->
<view>
<text>年份</text>
<text>{{meetingInfo.particularYear}}</text>
@@ -169,7 +189,11 @@
<text>身份</text>
<text>{{singInPersonInfo.identity_dictText}}</text>
</view>
<!--是否为WASIC字段判断-->
<view class="wrap-text-view" wx:if="{{meetingInfo.meetingType === '3' && meetingInfo.isWasic}}">
<text class="basic-label">课题名称</text>
<text>{{singInPersonInfo.choiceTopic_dictText}}</text>
</view>
<view>
<text>手机号</text>
<text>{{singInPersonInfo.phone}}</text>
@@ -684,4 +708,4 @@
<view class="join-meeting" style="margin-bottom:20px" wx:if="{{showSignInBtn}}">
<!-- 不需要花钱的会议、打包的会议 报名完显示 花钱的会议 现场缴费需要审核凭证通过显示 汇款的报完名显示 并被会议不能是已结束 -->
<text bindtap="toSignUp">去签到</text>
</view>
</view>
@@ -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;
}
/* 问题征集新的样式 --结束 */
/* 问题征集新的样式 --结束 */
+3 -2
View File
@@ -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")
+23 -5
View File
@@ -9,7 +9,16 @@
<text>会议类型</text>
<text>{{meetingType}}</text>
</view>
<!-- 国际研讨会的判断-是否WASIC--开始 -->
<view wx:if="{{meetingDetailIngfo.meetingType === '3'}}">
<text>是否WASIC</text>
<text>{{meetingDetailIngfo.isWasic_dictText || '否'}}</text>
</view>
<view class="wrap-text-view" wx:if="{{meetingDetailIngfo.meetingType === '3' && meetingDetailIngfo.isWasic}}">
<text class="basic-label">关联课题</text>
<text>{{meetingDetailIngfo.linkTopics_dictText}}</text>
</view>
<!-- 国际研讨会的判断-是否WASIC--结束 -->
<view wx:if="{{meetingDetailIngfo.meetingType === '2'}}">
<text>标协会议类型</text>
<text>{{tbMeetingType}}</text>
@@ -56,11 +65,20 @@
<text>报名截止时间</text>
<text>{{meetingDetailIngfo.registerDeadline}}</text>
</view>
<view>
<view wx:if="{{meetingDetailIngfo.meetingType !== '3' || !meetingDetailIngfo.isWasic}}">
<text>会议费用</text>
<text>{{meetingDetailIngfo.meetingCosts}}/人</text>
<text>{{meetingDetailIngfo.meetingCosts}}/人</text>
</view>
<!-- 国际研讨会 且为WASIC -会议字段不同 - 开始 -->
<view wx:if="{{meetingDetailIngfo.meetingType === '3' && meetingDetailIngfo.isWasic}}">
<text>会议费用(2个课题)</text>
<text>{{meetingDetailIngfo.meetingCostsTwoTopic}}元/人</text>
</view>
<view wx:if="{{meetingDetailIngfo.meetingType === '3' && meetingDetailIngfo.isWasic}}">
<text>会议费用(3个及以上)</text>
<text>{{meetingDetailIngfo.meetingCostsThreeTopic}}元/人</text>
</view>
<!-- 国际研讨会 且为WASIC -会议字段不同 - 结束 -->
<view wx:if="{{meetingDetailIngfo.meetingType === '2' && (meetingDetailIngfo.tbMeetingType + '') !== '3'}}">
<text>会议费用(标协会员)</text>
<text>{{meetingDetailIngfo.meetingCostsVip}}/人</text>
@@ -145,4 +163,4 @@
<view class="sign-up-empty"></view>
<view class="sign-up" wx:if="{{isMoreBool}}">
<button class="sign-up-btn" bindtap='signUp'>报名</button>
</view>
</view>
+10 -1
View File
@@ -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;
}
}
+157 -33
View File
@@ -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)
}
})
@@ -24,6 +24,20 @@
<text class="item-label flex-1 validate">手机号:</text>
<input placeholder-class="text-right" bindblur="validatePhone" data-type="phone" data-message='请输入手机号' data-errmsg='请输入正确的手机号' disabled type="number" maxlength="11" name="phone" bindinput="bindInputPhone" value="{{phone}}" placeholder="请输入手机号" />
</view>
<!-- 国际研讨会 WASIC 增加课题名称的选择-->
<view class="form-item-radio" wx:if="{{meetingDetailInfo.isWasic}}">
<view class="radio-label">
<text class="item-label flex-1 validate">课题名称:</text>
</view>
<view>
<checkbox-group name='choiceTopic' bindchange="changeChoiceTopic">
<label class="radio checkbox-item" wx:for="{{linkTopicsOptionArr}}" wx:key="item">
<checkbox class="radio-scale" value="{{item.value}}" color="#069F99" checked="{{item.checked}}" />{{item.text}}
</label>
</checkbox-group>
</view>
</view>
<view class="form-item-radio">
<view class="radio-label">
@@ -169,3 +169,8 @@ page{
padding: 31rpx 0;
width: 196.66rpx;
}
/* 多选组件的样式 */
.checkbox-item {
display: block;
}