【update】国际研讨会 修改费用的计算方法
This commit is contained in:
@@ -41,79 +41,7 @@ const LinkTopicsEnums = {
|
||||
index: 99
|
||||
}
|
||||
}
|
||||
const topicData = [
|
||||
{
|
||||
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 WasicTopicData from '../../assets/js/wasicStaticData.js'
|
||||
|
||||
import {
|
||||
InvoiceTypeEnums,
|
||||
@@ -137,7 +65,7 @@ Page({
|
||||
// 可选课题名称的数组
|
||||
linkTopicsOptionArr: [],
|
||||
// WASIC可选会议的数组-前端写死
|
||||
showTopicsArr: [...topicData],
|
||||
showTopicsArr: [...WasicTopicData],
|
||||
// 国际研讨会-WASIC-选择关联客户的数组
|
||||
choiceTopicArr: [],
|
||||
// 是否出现输入邀请码 参会身份选择嘉宾才出现
|
||||
@@ -457,7 +385,7 @@ Page({
|
||||
},
|
||||
// 多选主题的时候 处理当前显示的费用总数
|
||||
handleMeetingCostSum() {
|
||||
let arr = []
|
||||
let arr = [], radioArr = []
|
||||
this.data.showTopicsArr.map(tt => {
|
||||
tt.children && tt.children.map(item => {
|
||||
if(item.checked) {
|
||||
@@ -467,16 +395,26 @@ Page({
|
||||
tt.radioChildren && tt.radioChildren.map(item => {
|
||||
if(item.checked) {
|
||||
arr.push(item.value)
|
||||
radioArr.push(item.value)
|
||||
}
|
||||
})
|
||||
})
|
||||
let meetingCostSum
|
||||
let choiceTopicArr = arr.filter(item => (item + '') !== (LinkTopicsEnums.free.index + '') && (item + '') !== (LinkTopicsEnums.freeTwo.index + ''))
|
||||
if (choiceTopicArr.length > 2) {
|
||||
meetingCostSum = this.data.meetingDetailInfo.meetingCostsThreeTopic
|
||||
if(arr.length === 0) {
|
||||
meetingCostSum = '0.00'
|
||||
} 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
|
||||
},
|
||||
// 获取国际研讨会-能选择课题的数据字典数据
|
||||
@@ -485,7 +423,7 @@ Page({
|
||||
id: meetingId
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
let arr = res.result || []
|
||||
let arr = res.result || []
|
||||
this.data.showTopicsArr.map(tt => {
|
||||
tt.children.map(item => {
|
||||
let ele = arr.find(a => a.value + '' === item.value)
|
||||
@@ -936,14 +874,26 @@ Page({
|
||||
}
|
||||
// 如果会议是WASIC 需要对是否选择会议名称做校验
|
||||
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({
|
||||
title: '请选择会议名称',
|
||||
title: '请至少选择一个非参观类会议',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return
|
||||
}
|
||||
formData.choiceTopic = choiceArr.join(',')
|
||||
}
|
||||
// 参会身份验证
|
||||
if (formData.identity === '') {
|
||||
@@ -1273,20 +1223,6 @@ Page({
|
||||
// 邀请码数据
|
||||
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
|
||||
console.log(formData);
|
||||
|
||||
Reference in New Issue
Block a user