【bug】报名页面没有id的情况

This commit is contained in:
fengachen
2021-10-22 18:48:01 +08:00
parent 076c74991f
commit 8c23e765d7
2 changed files with 141 additions and 130 deletions
+6 -3
View File
@@ -70,7 +70,7 @@
<a-row>
<img :src="singUpQRCode" class="qr-code"/>
</a-row>
<a-button type="primary" style="margin-left: 19px;" @click="toSingUpPage" v-if="!invalidationBool">立即报名
<a-button type="primary" style="margin-left: 19px;" @click="toSingUpPage" v-if="!invalidationBool && urlHaveIdBool">立即报名
</a-button>
</section>
</div>
@@ -105,12 +105,15 @@ export default {
// 会议id
meetingId: '',
// 当前时间是否超过报名截止时间
invalidationBool: false
invalidationBool: false,
// url是否有id参数
urlHaveIdBool:false,
}
},
created() {
// 获取会议id
let id = this.GetQueryString('id')
this.urlHaveIdBool = id ? true :false
this.meetingId = id
document.title = '报名入口'
if (id) {
@@ -179,7 +182,7 @@ export default {
this.holdAddress = this.currentMeetingInfo.venue + '/' + this.currentMeetingInfo.address
}
} else {
console.log(res.message)
this.urlHaveIdBool = false
}
})
},
+135 -127
View File
@@ -89,128 +89,133 @@
<section class="main-content-title mt-10">
<img src="../../assets/signUpImg/signUpInfo.png"/> 报名信息
</section>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<!--个人信息begin-->
<div class="item-title">个人信息</div>
<a-row :gutter="24">
<a-col :xxl="8" :xl="12" :sm="24">
<a-form-item label="参会企业" :labelCol="labelCol" :wrapperCol="wrapperCol">
<company-select @change="changeCompany" v-decorator="['companyId',validatorRules.companyId]"
placeholder="请选择参会企业"
:is-limit="true"
:maxLength='50'>
</company-select>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :xxl="8" :xl="12" :sm="24">
<a-form-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol">
<select-contacts :selected-company="selectedCompany"
placeholder="请选择参会人"
:is-limit="true"
v-decorator="['companyContactId',validatorRules.companyContactId]"
:maxLength='50'
@change="changeContact"
ref="selectMailContacts"
@ok="addContactsOk"></select-contacts>
</a-form-item>
</a-col>
<a-col :xxl="8" :xl="12" :sm="24">
<a-form-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入手机号"
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9]/g,'')}"
:maxLength='11'
disabled
v-decorator="['phone',validatorRules.phone]"></a-input>
</a-form-item>
</a-col>
<!--非国际研讨会-->
<a-col :xxl="8" :xl="12" :sm="24" v-if="meetingType !== '3' ">
<a-form-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['identity',validatorRules.identify]" @change="changeIdentify">
<a-radio :value="1">嘉宾</a-radio>
<a-radio :value="2">参会人</a-radio>
<a-radio :value="3">内部企业</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
<a-col :xxl="8" :xl="12" :sm="24" v-if="meetingType === '3' ">
<a-form-item label="是否有邀请码" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['inviteCode',validatorRules.inviteCode]" @change="changeInviteCode">
<a-radio :value="1"></a-radio>
<a-radio :value="0"></a-radio>
</a-radio-group>
</a-form-item>
</a-col>
<template v-if="urlHaveIdBool">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<!--个人信息begin-->
<div class="item-title">个人信息</div>
<a-row :gutter="24">
<a-col :xxl="8" :xl="12" :sm="24">
<a-form-item label="参会企业" :labelCol="labelCol" :wrapperCol="wrapperCol">
<company-select @change="changeCompany" v-decorator="['companyId',validatorRules.companyId]"
placeholder="请选择参会企业"
:is-limit="true"
:maxLength='50'>
</company-select>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :xxl="8" :xl="12" :sm="24">
<a-form-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol">
<select-contacts :selected-company="selectedCompany"
placeholder="请选择参会人"
:is-limit="true"
v-decorator="['companyContactId',validatorRules.companyContactId]"
:maxLength='50'
@change="changeContact"
ref="selectMailContacts"
@ok="addContactsOk"></select-contacts>
</a-form-item>
</a-col>
<a-col :xxl="8" :xl="12" :sm="24">
<a-form-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入手机号"
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9]/g,'')}"
:maxLength='11'
disabled
v-decorator="['phone',validatorRules.phone]"></a-input>
</a-form-item>
</a-col>
<!--非国际研讨会-->
<a-col :xxl="8" :xl="12" :sm="24" v-if="meetingType !== '3' ">
<a-form-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['identity',validatorRules.identify]" @change="changeIdentify">
<a-radio :value="1">嘉宾</a-radio>
<a-radio :value="2">参会人</a-radio>
<a-radio :value="3">内部企业</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
<a-col :xxl="8" :xl="12" :sm="24" v-if="meetingType === '3' ">
<a-form-item label="是否有邀请码" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['inviteCode',validatorRules.inviteCode]" @change="changeInviteCode">
<a-radio :value="1"></a-radio>
<a-radio :value="0"></a-radio>
</a-radio-group>
</a-form-item>
</a-col>
<!--邀请码选择是出现填写邀请码 否选择身份-->
<a-col :xxl="8" :xl="12" :sm="24" v-if="meetingType === '3' && identityBool ">
<a-form-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['identity',validatorRules.identify]" @change="changeIdentify">
<a-radio :value="2">参会人</a-radio>
<a-radio :value="3">内部企业</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
<!--邀请码选择是出现填写邀请码 否选择身份-->
<a-col :xxl="8" :xl="12" :sm="24" v-if="meetingType === '3' && identityBool ">
<a-form-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-decorator="['identity',validatorRules.identify]" @change="changeIdentify">
<a-radio :value="2">参会人</a-radio>
<a-radio :value="3">内部企业</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
<a-col :xxl="8" :xl="12" :sm="24" v-if="inviteCodeBool">
<a-form-item label="邀请码" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入邀请码"
:maxLength='50'
@change="event => event.target.value = event.target.value.trim()"
@blur="validateCode"
v-decorator="[ 'code',
<a-col :xxl="8" :xl="12" :sm="24" v-if="inviteCodeBool">
<a-form-item label="邀请码" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入邀请码"
:maxLength='50'
@change="event => event.target.value = event.target.value.trim()"
@blur="validateCode"
v-decorator="[ 'code',
validatorRules.code]"></a-input>
</a-form-item>
</a-col>
</a-row>
<!--邀请码选择是才出现-->
<a-row :gutter="24" class="center" v-if="inviteCodeBool">
<a-button @click="nextSetp" type="primary">下一步</a-button>
</a-row>
<!--个人信息end-->
<!--除开国际研讨会的其他会议的显示-->
<template v-if="meetingType !== '3' ">
<other-meeting-form ref="formother" :selected-company="selectedCompany"
:meeting-cost-bool="meetingCostBool"
:identify-type="identifyType" @formData="getFormData" @isPack="isPack"></other-meeting-form>
</template>
</a-form-item>
</a-col>
</a-row>
<!--邀请码选择是才出现-->
<a-row :gutter="24" class="center" v-if="inviteCodeBool">
<a-button @click="nextSetp" type="primary">下一步</a-button>
</a-row>
<!--个人信息end-->
<!--除开国际研讨会的其他会议的显示-->
<template v-if="meetingType !== '3' ">
<other-meeting-form ref="formother" :selected-company="selectedCompany"
:meeting-cost-bool="meetingCostBool"
:identify-type="identifyType" @formData="getFormData"
@isPack="isPack"></other-meeting-form>
</template>
<!--国际研讨会参会人与内部企业的显示 默认不展示 -->
<template v-if="meetingType === '3' && identifyType !== 1 && identifyType !== null ">
<other-meeting-form ref="formother" :meeting-type="meetingType" :selected-company="selectedCompany"
:meeting-cost-bool="meetingCostBool"
@isPack="isPack"
:identify-type="identifyType" @formData="getFormData"></other-meeting-form>
</template>
<!-- 国际研讨会身份选择嘉宾 并且是VIP-->
<template v-if="identifyType === 1 && guestType === 1">
<seminar-vip-form ref="seminarVipForm" @formData="getFormData" :identify-type="identifyType"
:guest-type="guestType"></seminar-vip-form>
</template>
<!-- 国际研讨会身份选择嘉宾 并且是演讲嘉宾-->
<template v-if="identifyType === 1 && guestType === 2">
<seminar-vip-form ref="seminarVipForm" @formData="getFormData" :guest-type="guestType"></seminar-vip-form>
</template>
<!-- 国际研讨会身份选择嘉宾 并且是特邀嘉宾-->
<template v-if="identifyType === 1 && guestType === 3">
<seminar-vip-form ref="seminarVipForm" @formData="getFormData" :guest-type="guestType"></seminar-vip-form>
</template>
<!-- 国际研讨会身份选择嘉宾 并且是合作伙伴-->
<template v-if="identifyType === 1 && guestType === 4">
<seminar-partner-form ref="seminarPartnerForm" @formData="getFormData"></seminar-partner-form>
</template>
<section class="meetingCost">
费用合计:{{ meetingCostSum }} 元
</section>
<div class="action">
<a-button class="submit" type="primary" @click="handleOk" v-preventclick>确定</a-button>
<a-button @click="handleCancel">取消</a-button>
</div>
</a-form>
</a-spin>
<!--国际研讨会参会人与内部企业的显示 默认不展示 -->
<template v-if="meetingType === '3' && identifyType !== 1 && identifyType !== null ">
<other-meeting-form ref="formother" :meeting-type="meetingType" :selected-company="selectedCompany"
:meeting-cost-bool="meetingCostBool"
@isPack="isPack"
:identify-type="identifyType" @formData="getFormData"></other-meeting-form>
</template>
<!-- 国际研讨会身份选择嘉宾 并且是VIP-->
<template v-if="identifyType === 1 && guestType === 1">
<seminar-vip-form ref="seminarVipForm" @formData="getFormData" :identify-type="identifyType"
:guest-type="guestType"></seminar-vip-form>
</template>
<!-- 国际研讨会身份选择嘉宾 并且是演讲嘉宾-->
<template v-if="identifyType === 1 && guestType === 2">
<seminar-vip-form ref="seminarVipForm" @formData="getFormData"
:guest-type="guestType"></seminar-vip-form>
</template>
<!-- 国际研讨会身份选择嘉宾 并且是特邀嘉宾-->
<template v-if="identifyType === 1 && guestType === 3">
<seminar-vip-form ref="seminarVipForm" @formData="getFormData"
:guest-type="guestType"></seminar-vip-form>
</template>
<!-- 国际研讨会身份选择嘉宾 并且是合作伙伴-->
<template v-if="identifyType === 1 && guestType === 4">
<seminar-partner-form ref="seminarPartnerForm" @formData="getFormData"></seminar-partner-form>
</template>
<section class="meetingCost">
费用合计:{{ meetingCostSum }} 元
</section>
<div class="action">
<a-button class="submit" type="primary" @click="handleOk" v-preventclick>确定</a-button>
<a-button @click="handleCancel">取消</a-button>
</div>
</a-form>
</a-spin>
</template>
</div>
</section>
<!--内容end-->
@@ -323,9 +328,11 @@ export default {
// 邀请码错误状态
codeErrorBool: true,
// 是否是打包
isPackBool:false,
isPackBool: false,
// 国际研讨会身份的控制
identityBool:false,
identityBool: false,
// url是否有id字段 默认没有
urlHaveIdBool: false,
url: {
add: '/meeting/payMeetingSituation/signUp'
}
@@ -335,6 +342,7 @@ export default {
document.title = '会议报名'
// 获取会议id
let id = this.GetQueryString('id')
this.urlHaveIdBool = id ? true : false
this.meetingId = id
if (id) {
this.getMeetingInfo(id)
@@ -395,7 +403,7 @@ export default {
}
}
} else {
console.log(res.message)
this.urlHaveIdBool = false
}
})
},
@@ -431,11 +439,11 @@ export default {
return null
},
// 是否打包 打包会议费用为0
isPack(val){
isPack(val) {
this.isPackBool = val
if(this.isPackBool){
if (this.isPackBool) {
this.meetingCostSum = '0.00'
}else {
} else {
this.meetingCostSum = this.currentMeetingInfo.meetingCosts
}
},
@@ -462,7 +470,7 @@ export default {
this.form.validateFields((err, values) => {
if (!err) {
// 判断邀请码是否错误 需要判断会议类型 以及 是否有邀请码
if (this.codeErrorBool && this.currentMeetingInfo.meetingType === '3' && this.inviteCodeBool ) {
if (this.codeErrorBool && this.currentMeetingInfo.meetingType === '3' && this.inviteCodeBool) {
this.$message.error('邀请码填写错误')
return
}
@@ -523,7 +531,7 @@ export default {
changeCompany(value) {
this.selectedCompany = value
// 选择企业清空 姓名 手机号
this.form.resetFields(['companyContactId','phone'])
this.form.resetFields(['companyContactId', 'phone'])
},
/*
@@ -558,7 +566,7 @@ export default {
// 选的否 身份置空
this.identifyType = null
this.$nextTick(() => {
if(this.$refs.formother){
if (this.$refs.formother) {
this.$refs.formother.isLimitBool = true
}
})