【update】国际研讨会 修改费用的计算方法
This commit is contained in:
@@ -41,79 +41,7 @@ const LinkTopicsEnums = {
|
|||||||
index: 99
|
index: 99
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const topicData = [
|
import WasicTopicData from '../../assets/js/wasicStaticData.js'
|
||||||
{
|
|
||||||
name: '11月27日',
|
|
||||||
date: '11月27日',
|
|
||||||
radioKey: 'radioKey',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
'value': '6',
|
|
||||||
'text': '国际发展论坛(09:00-15:00)',
|
|
||||||
'title': '国际发展论坛(09:00-15:00)'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
radioChildren: [
|
|
||||||
{
|
|
||||||
'value':'5',
|
|
||||||
'text':'弱势道路交通参与者(VRU)保护专题(14:00-18:00)',
|
|
||||||
'title':'弱势道路交通参与者(VRU)保护专题(14:00-18:00)'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'value':'2',
|
|
||||||
'text':'智能网联汽车标准化领航及标准路线图专题(14:00-18:00)',
|
|
||||||
'title':'智能网联汽车标准化领航及标准路线图专题(14:00-18:00)'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'value':'4',
|
|
||||||
'text':'动力电池安全专题(14:00-18:00)',
|
|
||||||
'title':'动力电池安全专题(14:00-18:00)'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '11月28日',
|
|
||||||
date: '11月28日',
|
|
||||||
radioKey: 'radioKeyTwo',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
'value':'99',
|
|
||||||
'text':'114/22焦点论坛(08:00-12:00,全体大会)',
|
|
||||||
'title':'114/22焦点论坛(08:00-12:00,全体大会)',
|
|
||||||
'disabled': true,
|
|
||||||
checked: true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
radioChildren: [
|
|
||||||
{
|
|
||||||
'value':'1',
|
|
||||||
'text':'汽车网络安全与数据安全标准合规专题(14:00-18:00)',
|
|
||||||
'title':'汽车网络安全与数据安全标准合规专题(14:00-18:00)'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'value':'3',
|
|
||||||
'text':'汽车低碳专题(14:00-18:00)',
|
|
||||||
'title':'汽车低碳专题(14:00-18:00)'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'value':'7',
|
|
||||||
'text':'无人小车专题(14:00-18:00)',
|
|
||||||
'title':'无人小车专题(14:00-18:00)'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '11月29日',
|
|
||||||
date: '11月29日',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
'value':'8',
|
|
||||||
'text':'湾区智联试验场参观(8:30-10:30)',
|
|
||||||
'title':'湾区智联试验场参观(8:30-10:30)'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
InvoiceTypeEnums,
|
InvoiceTypeEnums,
|
||||||
@@ -137,7 +65,7 @@ Page({
|
|||||||
// 可选课题名称的数组
|
// 可选课题名称的数组
|
||||||
linkTopicsOptionArr: [],
|
linkTopicsOptionArr: [],
|
||||||
// WASIC可选会议的数组-前端写死
|
// WASIC可选会议的数组-前端写死
|
||||||
showTopicsArr: [...topicData],
|
showTopicsArr: [...WasicTopicData],
|
||||||
// 国际研讨会-WASIC-选择关联客户的数组
|
// 国际研讨会-WASIC-选择关联客户的数组
|
||||||
choiceTopicArr: [],
|
choiceTopicArr: [],
|
||||||
// 是否出现输入邀请码 参会身份选择嘉宾才出现
|
// 是否出现输入邀请码 参会身份选择嘉宾才出现
|
||||||
@@ -457,7 +385,7 @@ Page({
|
|||||||
},
|
},
|
||||||
// 多选主题的时候 处理当前显示的费用总数
|
// 多选主题的时候 处理当前显示的费用总数
|
||||||
handleMeetingCostSum() {
|
handleMeetingCostSum() {
|
||||||
let arr = []
|
let arr = [], radioArr = []
|
||||||
this.data.showTopicsArr.map(tt => {
|
this.data.showTopicsArr.map(tt => {
|
||||||
tt.children && tt.children.map(item => {
|
tt.children && tt.children.map(item => {
|
||||||
if(item.checked) {
|
if(item.checked) {
|
||||||
@@ -467,16 +395,26 @@ Page({
|
|||||||
tt.radioChildren && tt.radioChildren.map(item => {
|
tt.radioChildren && tt.radioChildren.map(item => {
|
||||||
if(item.checked) {
|
if(item.checked) {
|
||||||
arr.push(item.value)
|
arr.push(item.value)
|
||||||
|
radioArr.push(item.value)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
let meetingCostSum
|
let meetingCostSum
|
||||||
let choiceTopicArr = arr.filter(item => (item + '') !== (LinkTopicsEnums.free.index + '') && (item + '') !== (LinkTopicsEnums.freeTwo.index + ''))
|
if(arr.length === 0) {
|
||||||
if (choiceTopicArr.length > 2) {
|
meetingCostSum = '0.00'
|
||||||
meetingCostSum = this.data.meetingDetailInfo.meetingCostsThreeTopic
|
|
||||||
} else {
|
} else {
|
||||||
meetingCostSum = this.data.meetingDetailInfo.meetingCostsTwoTopic
|
if(radioArr.length === 2) {
|
||||||
|
meetingCostSum = this.data.meetingDetailInfo.meetingCostsThreeTopic
|
||||||
|
} else {
|
||||||
|
meetingCostSum = this.data.meetingDetailInfo.meetingCostsTwoTopic
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// let choiceTopicArr = arr.filter(item => (item + '') !== (LinkTopicsEnums.freeTwo.index + ''))
|
||||||
|
// if (choiceTopicArr.length > 2) {
|
||||||
|
// meetingCostSum = this.data.meetingDetailInfo.meetingCostsThreeTopic
|
||||||
|
// } else {
|
||||||
|
// meetingCostSum = this.data.meetingDetailInfo.meetingCostsTwoTopic
|
||||||
|
// }
|
||||||
return meetingCostSum
|
return meetingCostSum
|
||||||
},
|
},
|
||||||
// 获取国际研讨会-能选择课题的数据字典数据
|
// 获取国际研讨会-能选择课题的数据字典数据
|
||||||
@@ -485,7 +423,7 @@ Page({
|
|||||||
id: meetingId
|
id: meetingId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
let arr = res.result || []
|
let arr = res.result || []
|
||||||
this.data.showTopicsArr.map(tt => {
|
this.data.showTopicsArr.map(tt => {
|
||||||
tt.children.map(item => {
|
tt.children.map(item => {
|
||||||
let ele = arr.find(a => a.value + '' === item.value)
|
let ele = arr.find(a => a.value + '' === item.value)
|
||||||
@@ -936,14 +874,26 @@ Page({
|
|||||||
}
|
}
|
||||||
// 如果会议是WASIC 需要对是否选择会议名称做校验
|
// 如果会议是WASIC 需要对是否选择会议名称做校验
|
||||||
if (this.data.meetingDetailInfo.isWasic) {
|
if (this.data.meetingDetailInfo.isWasic) {
|
||||||
if (!formData.choiceTopic || formData.choiceTopic.length === 0) {
|
let choiceArr = formData.choiceTopic
|
||||||
|
if(formData.radioKey) {
|
||||||
|
choiceArr.push(formData.radioKey)
|
||||||
|
delete formData.radioKey
|
||||||
|
}
|
||||||
|
if(formData.radioKeyTwo) {
|
||||||
|
choiceArr.push(formData.radioKeyTwo)
|
||||||
|
delete formData.radioKeyTwo
|
||||||
|
}
|
||||||
|
// 只选择一个免费参观的不能报名成功
|
||||||
|
let judgeFlag = choiceArr.filter(tt => tt !== LinkTopicsEnums.freeTwo.index + '')
|
||||||
|
if(judgeFlag.length === 0) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请选择会议名称',
|
title: '请至少选择一个非参观类会议',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
formData.choiceTopic = choiceArr.join(',')
|
||||||
}
|
}
|
||||||
// 参会身份验证
|
// 参会身份验证
|
||||||
if (formData.identity === '') {
|
if (formData.identity === '') {
|
||||||
@@ -1273,20 +1223,6 @@ Page({
|
|||||||
// 邀请码数据
|
// 邀请码数据
|
||||||
formData.invitationCode = formData.inviteCode
|
formData.invitationCode = formData.inviteCode
|
||||||
}
|
}
|
||||||
// 国际研讨会-WASIC 所选择的 关联会议
|
|
||||||
if (formData.choiceTopic) {
|
|
||||||
let choiceArr = formData.choiceTopic
|
|
||||||
if(formData.radioKey) {
|
|
||||||
choiceArr.push(formData.radioKey)
|
|
||||||
delete formData.radioKey
|
|
||||||
}
|
|
||||||
if(formData.radioKeyTwo) {
|
|
||||||
choiceArr.push(formData.radioKeyTwo)
|
|
||||||
delete formData.radioKeyTwo
|
|
||||||
}
|
|
||||||
|
|
||||||
formData.choiceTopic = choiceArr.join(',')
|
|
||||||
}
|
|
||||||
// 会议类型
|
// 会议类型
|
||||||
// formData.meetingType = this.data.selectedMeeting.meetingType
|
// formData.meetingType = this.data.selectedMeeting.meetingType
|
||||||
console.log(formData);
|
console.log(formData);
|
||||||
|
|||||||
Reference in New Issue
Block a user