805 lines
29 KiB
Vue
805 lines
29 KiB
Vue
<template>
|
|
<div>
|
|
<page-header-title :is-level-one="false" :level-two-title="title"></page-header-title>
|
|
<a-card :bordered="false">
|
|
<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">
|
|
<add-meeting-company @change="changeCompany" v-decorator="['companyId',validatorRules.companyId]"
|
|
placeholder="请选择参会企业"
|
|
full-company-info
|
|
:disabled="model.checkResult === 1"
|
|
:maxLength='50'>
|
|
</add-meeting-company>
|
|
</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="请选择参会人"
|
|
v-decorator="['companyContactId',validatorRules.companyContactId]"
|
|
:maxLength='50'
|
|
:disabled="model.checkResult === 1"
|
|
:init-contacts="selectPerson"
|
|
@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">
|
|
<a-form-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<!--内部企业的时候不允许进行修改参会身份-->
|
|
<a-radio-group :disabled="identifyType === 3" v-decorator="['identity',validatorRules.identify]" @change="changeIdentify">
|
|
<a-radio :value="1">嘉宾</a-radio>
|
|
<a-radio :value="2">参会人</a-radio>
|
|
<a-radio :value="3" :disabled="!isInternalEnterprise">内部企业</a-radio>
|
|
</a-radio-group>
|
|
</a-form-item>
|
|
</a-col>
|
|
|
|
<!--身份选择嘉宾并且是研讨会议出现且必填-->
|
|
<a-col :xxl="8" :xl="12" :sm="24" v-if="identifyType === 1 && meetingType === '3' ">
|
|
<a-form-item label="嘉宾类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<a-radio-group v-decorator="['guestType',validatorRules.guestType]" @change="changeGuestType">
|
|
<a-radio :value="1">VIP</a-radio>
|
|
<a-radio :value="2">演讲嘉宾</a-radio>
|
|
<a-radio :value="3">特邀嘉宾</a-radio>
|
|
<a-radio :value="4">合作伙伴</a-radio>
|
|
<a-radio :value="5">参展商</a-radio>
|
|
</a-radio-group>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-row>
|
|
<a-row :gutter="24" v-if="currentMeetingInfo.isWasic">
|
|
<!-- 国际研讨会 WASIC 增加会议名称的选择--已经到账的信息不能修改-->
|
|
<a-col :xxl="8" :xl="12" :sm="24" v-if="currentMeetingInfo.isWasic">
|
|
<a-form-item label="会议名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<!--<j-multi-select-tag-->
|
|
<!-- v-decorator="['choiceTopic',validatorRules.choiceTopic]"-->
|
|
<!-- :trigger-change="true"-->
|
|
<!-- style="width: 100%"-->
|
|
<!-- dict-code="linkTopics"-->
|
|
<!-- placeholder="请选择会议名称"-->
|
|
<!-- :options="linkTopicsOptionArr"-->
|
|
<!-- type="checkbox"-->
|
|
<!-- class="meeting-form-multi-select"-->
|
|
<!-- :disabled="model.inAccount === 1"-->
|
|
<!-->-->
|
|
<!--</j-multi-select-tag>-->
|
|
|
|
<a-checkbox-group class="meeting-form-multi-select" @change="choiceTopicChange" v-decorator="['choiceTopic',validatorRules.choiceTopic]" :disabled="model.inAccount === 1">
|
|
<div v-for="(item, index) in showTopicsArr" :key="'showTopicTitle_'+ index">
|
|
<div class="topic-title">{{item.name}}</div>
|
|
<div>
|
|
<a-checkbox v-for="item in item.children" :key="'a_checkbox_'+ item.value" :value="item.value" :disabled="item.disabled">{{ item.text }}</a-checkbox>
|
|
</div>
|
|
<div class="radio-div" v-if="item.radioChildren">
|
|
<a-radio-group v-decorator="[item.radioKey]" :disabled="model.inAccount === 1" @change="changeRadioTopic">
|
|
<a-radio v-for="item in item.radioChildren" :key="'a_radio_'+ item.value" :value="item.value" :disabled="item.disabled">{{ item.text }}</a-radio>
|
|
</a-radio-group>
|
|
</div>
|
|
</div>
|
|
</a-checkbox-group>
|
|
<a-button @click="cancelChoiceTopic">清空会议信息</a-button>
|
|
</a-form-item>
|
|
</a-col>
|
|
</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"></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"
|
|
: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 || guestType === 5)">
|
|
<seminar-partner-form ref="seminarPartnerForm" @formData="getFormData"></seminar-partner-form>
|
|
</template>
|
|
|
|
<div class="item-title">其他信息</div>
|
|
<a-row :gutter="24">
|
|
<a-col :xxl="8" :xl="12" :sm="24">
|
|
<a-form-item label="备注" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
|
<a-textarea
|
|
placeholder="请输入备注"
|
|
:auto-size="{ minRows: 3, maxRows: 6 }"
|
|
v-decorator="['remark']"
|
|
:maxLength='200'
|
|
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-row>
|
|
|
|
<div class="center">
|
|
<a-button class="submit" type="primary" @click="handleOk" v-preventclick>确定</a-button>
|
|
<a-button @click="handleCancel">取消</a-button>
|
|
</div>
|
|
</a-form>
|
|
</a-spin>
|
|
|
|
</a-card>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import SelectContacts from '@comp/company/SelectContacts'
|
|
import OtherMeetingForm from '@views/incomePayments/meetManage/OtherMeetingForm'
|
|
import SeminarVipForm from '@views/incomePayments/meetManage/modules/SeminarVipForm'
|
|
import SeminarPartnerForm from '@views/incomePayments/meetManage/modules/SeminarPartnerForm'
|
|
import AddMeetingCompany from '@comp/company/AddMeetingCompany'
|
|
import {getContactsById} from '@api/api'
|
|
import {getSingUpUserInfo, validateStandard, getMeetInfoById, getLinkTopics} from '@api/incomeMeetingApi'
|
|
import { judgeInternalEnterprise } from '../../../api/incomePaymentsApi'
|
|
import {httpAction} from '@api/manage'
|
|
import pick from 'lodash.pick'
|
|
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
|
import { queryCompanyInfoById } from '../../../api/api'
|
|
import { LinkTopicsEnums } from '../../../enums/commonEnums'
|
|
import WasicTopicData from './modules/wasicStaticData'
|
|
|
|
export default {
|
|
name: 'SignUpInfoEdit',
|
|
components: {
|
|
SelectContacts,
|
|
SeminarPartnerForm,
|
|
// JDictSelectTag,
|
|
OtherMeetingForm,
|
|
SeminarVipForm,
|
|
AddMeetingCompany,
|
|
PageHeaderTitle
|
|
},
|
|
data() {
|
|
return {
|
|
description: '报名信息编辑页',
|
|
form: this.$form.createForm(this),
|
|
confirmLoading: false,
|
|
selectedCompany: null,
|
|
model: {},
|
|
formData:{},
|
|
labelCol: {
|
|
xs: {span: 24},
|
|
sm: {span: 6}
|
|
},
|
|
wrapperCol: {
|
|
xs: {span: 24},
|
|
sm: {span: 18}
|
|
},
|
|
remarksLabelCol: {
|
|
xs: {span: 24},
|
|
sm: {span: 3}
|
|
},
|
|
remarksWrapperCol: {
|
|
xs: {span: 24},
|
|
sm: {span: 21}
|
|
},
|
|
validatorRules: {
|
|
companyId: {
|
|
rules: [{required: true, message: '请选择参会企业'}],
|
|
validateTrigger: 'change'
|
|
},
|
|
companyContactId: {
|
|
rules: [{required: true, message: '请选择参会人'}],
|
|
validateTrigger: 'change'
|
|
},
|
|
phone: {
|
|
rules: [{required: true, message: '请输入手机号'}],
|
|
validateTrigger: 'blur'
|
|
},
|
|
choiceTopic: {
|
|
rules: [
|
|
{required: true, validator: this.checkChoiceTopic},
|
|
],
|
|
validateTrigger: ['change']
|
|
},
|
|
identify: {
|
|
rules: [{required: true, message: '请选择身份'}],
|
|
validateTrigger: 'change'
|
|
},
|
|
guestType:{
|
|
rules: [{required: true, message: '请选择嘉宾类型'}],
|
|
validateTrigger: 'change'
|
|
}
|
|
|
|
},
|
|
// 身份类型
|
|
identifyType: null,
|
|
// 嘉宾类型
|
|
guestType: null,
|
|
// 姓名的回显
|
|
selectPerson:null,
|
|
// 会议类型
|
|
meetingType: '',
|
|
// 当前会议的信息
|
|
currentMeetingInfo:{},
|
|
// 会议费用是否为0
|
|
meetingCostBool:false,
|
|
// 是否是标协成员
|
|
isStandardBool: false,
|
|
// url:{
|
|
// add:'/meeting/payMeetingSituation/add',
|
|
// edit:'/meeting/payMeetingSituation/edit'
|
|
// },
|
|
// 其他会议的url
|
|
otherMeetingUrl: {
|
|
add: '/meeting/ohterMeetingSituation/add',
|
|
edit:'/meeting/ohterMeetingSituation/edit'
|
|
},
|
|
// 分标委会议的url
|
|
committeeMeetingUrl: {
|
|
add: '/meeting/committeeMeetingSituation/add',
|
|
edit:'/meeting/committeeMeetingSituation/edit'
|
|
},
|
|
// 国际研讨会的url
|
|
internalMeetingUrl: {
|
|
add: '/meeting/internalMeetingSituation/add',
|
|
edit:'/meeting/internalMeetingSituation/edit'
|
|
},
|
|
// 标协会议的url
|
|
standardsMeetingUrl: {
|
|
add: '/meeting/standardsMeetingSituation/add',
|
|
edit:'/meeting/standardsMeetingSituation/edit'
|
|
},
|
|
// 工作组会议的url
|
|
workGroupMeetingUrl: {
|
|
add: '/meeting/workGroupMeetingSituation/add',
|
|
edit:'/meeting/workGroupMeetingSituation/edit'
|
|
},
|
|
// 理事会会议
|
|
councilMeetingUrl:{
|
|
add: '/meeting/councilMeetingSituation/add',
|
|
edit:'/meeting/councilMeetingSituation/edit'
|
|
},
|
|
title:'添加参会人',
|
|
// 当前参会企业是否是内部企业
|
|
isInternalEnterprise: false,
|
|
// 可选会议名称的数组
|
|
linkTopicsOptionArr: [],
|
|
// WASIC可选会议的数组-前端写死
|
|
showTopicsArr: [...WasicTopicData]
|
|
}
|
|
},
|
|
created() {
|
|
this.meetingType = this.$route.query.meetingType
|
|
// 参会情况页面判断的是否会议费用为0 true 为0
|
|
if(this.$route.query.costBool === 'true'){
|
|
this.meetingCostBool = true
|
|
}else if(this.$route.query.costBool === 'false'){
|
|
this.meetingCostBool = false
|
|
}
|
|
if(this.$route.query.id){
|
|
// 通过id获取参会人信息
|
|
getSingUpUserInfo({id:this.$route.query.id}).then(res => {
|
|
if(res.success){
|
|
this.edit(res.result)
|
|
}
|
|
})
|
|
}
|
|
//获取 会议信息
|
|
if(this.$route.query.meetingId){
|
|
this.queryMeetingInfo(this.$route.query.meetingId)
|
|
}
|
|
|
|
},
|
|
computed:{
|
|
// eslint-disable-next-line
|
|
url() {
|
|
switch (this.$route.query.meetingType) {
|
|
case '1':
|
|
return this.workGroupMeetingUrl
|
|
case '2':
|
|
return this.standardsMeetingUrl
|
|
case '3':
|
|
return this.internalMeetingUrl
|
|
case '4':
|
|
return this.otherMeetingUrl
|
|
case '5':
|
|
return this.committeeMeetingUrl
|
|
case '6':
|
|
return this.councilMeetingUrl
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
// 验证选择会议名称的情况
|
|
checkChoiceTopic(rules, value, callback) {
|
|
console.log(value)
|
|
let arr = []
|
|
if (value && value.length > 0) {
|
|
arr = [...value]
|
|
}
|
|
let radioKey = this.form.getFieldValue('radioKey')
|
|
let radioKeyTwo = this.form.getFieldValue('radioKeyTwo')
|
|
if(radioKey || radioKeyTwo) {
|
|
callback()
|
|
} else {
|
|
arr = arr.filter(tt => tt !== LinkTopicsEnums.freeTwo.index + '')
|
|
if(arr.length === 0) {
|
|
callback('请至少选择一个非参观类会议')
|
|
} else {
|
|
callback()
|
|
}
|
|
}
|
|
},
|
|
choiceTopicChange(e) {
|
|
console.log(e)
|
|
},
|
|
changeRadioTopic() {
|
|
this.$nextTick(() => {
|
|
this.form.validateFields(['choiceTopic'])
|
|
})
|
|
},
|
|
// 取消会议名称的选中
|
|
cancelChoiceTopic() {
|
|
this.form.setFieldsValue({
|
|
choiceTopic: [],
|
|
radioKey: undefined,
|
|
radioKeyTwo: undefined,
|
|
})
|
|
},
|
|
// 获取国际研讨会-能选择课题的数据字典数据
|
|
getLinkTopicsOptionArr(meetingId) {
|
|
getLinkTopics({id: meetingId}).then(res =>{
|
|
if(res.success) {
|
|
this.linkTopicsOptionArr = res.result || []
|
|
// 页面上展示的文字 按照数据字段返回的展示
|
|
this.showTopicsArr.map(tt => {
|
|
tt.children.map(item => {
|
|
let ele = this.linkTopicsOptionArr.find(a => a.value + '' === item.value)
|
|
if(ele) {
|
|
item.text = ele.text
|
|
item.title = ele.title
|
|
}
|
|
})
|
|
tt.radioChildren && tt.radioChildren.map(item => {
|
|
let ele = this.linkTopicsOptionArr.find(a => a.value + '' === item.value)
|
|
if(ele) {
|
|
item.text = ele.text
|
|
item.title = ele.title
|
|
}
|
|
})
|
|
})
|
|
// 操作默认的课题,默认的课题不能删除
|
|
// this.linkTopicsOptionArr.map(item => {
|
|
// if((item.value + '') === (LinkTopicsEnums.default.index + '')) {
|
|
// item.disabled = true
|
|
// }
|
|
// })
|
|
// 新增页面,给Form赋值
|
|
if(!this.model.id) {
|
|
this.form.setFieldsValue({
|
|
choiceTopic: []
|
|
})
|
|
}
|
|
}
|
|
})
|
|
},
|
|
// 通过企业的id获取企业管理中的基本信息,用于发票回显
|
|
queryCompanyInfoById(id) {
|
|
return new Promise(resolve => {
|
|
let result = {}
|
|
queryCompanyInfoById({id}).then(res => {
|
|
if(res.success) {
|
|
result = res.result || {}
|
|
result = pick(res.result, 'companyName', 'dutyCode', 'companyAddress', 'companyPhone', 'openingBank', 'bankAccount', 'linkBankNumber')
|
|
}
|
|
}).finally(() => {
|
|
resolve(result)
|
|
})
|
|
})
|
|
|
|
},
|
|
addContactsOk() {
|
|
this.$refs.selectContacts.getContactsList()
|
|
},
|
|
/*
|
|
* 编辑
|
|
* */
|
|
async edit(record){
|
|
this.isInternalEnterprise = false
|
|
this.form.resetFields()
|
|
this.model = Object.assign({},record)
|
|
if(this.model.id){
|
|
this.title = '编辑参会人'
|
|
}
|
|
// 设置编辑的显示隐藏状态
|
|
this.identifyType = this.model.identity
|
|
this.guestType = this.model.guestType ? this.model.guestType : null
|
|
// 参会单位回显
|
|
this.model.companyId = {
|
|
id:this.model.companyId,
|
|
companyName:this.model.companyName,
|
|
}
|
|
// 参会人回显
|
|
// this.selectedCompany = this.model.companyId
|
|
// 如果当前的参会人信息中发票信息不全 则从企业管理中获取一下
|
|
// if(!this.model.dutyCode && !this.model.companyAddress)
|
|
// 从企业管理中获取全部的会议信息
|
|
let companyInfo = await this.queryCompanyInfoById(this.model.companyId.id)
|
|
// 判断当前数据中企业信息是否完整 将有数据的赋值到数据中
|
|
// 写入发票的信息,因为需要回显
|
|
// dutyCode:this.model.dutyCode, // 信用代码
|
|
// companyAddress:this.model.companyAddress, // 公司地址
|
|
// companyPhone:this.model.companyPhone, // 公司电话
|
|
// openingBank:this.model.openingBank, // 开户行
|
|
// bankAccount:this.model.bankAccount, // 银行账号
|
|
// linkBankNumber:this.model.linkBankNumber // 联行号
|
|
let invoiceKeys = ['dutyCode', 'companyAddress', 'companyPhone', 'openingBank', 'bankAccount', 'linkBankNumber']
|
|
let invoiceInfo = {}
|
|
invoiceKeys.map(key => {
|
|
if(this.model[key]) {
|
|
invoiceInfo[key] = this.model[key]
|
|
}
|
|
})
|
|
this.selectedCompany = Object.assign({}, companyInfo, this.model.companyId, invoiceInfo)
|
|
this.selectPerson = {
|
|
id:this.model.companyContactTemporaryId,
|
|
name:this.model.companyContactName
|
|
}
|
|
// 如果存在所选择的课题,则对课题数据进行处理
|
|
if (this.model.choiceTopic) {
|
|
let choiceTopicArr = this.model.choiceTopic.split(',')
|
|
this.showTopicsArr = JSON.parse(JSON.stringify(WasicTopicData))
|
|
let checkboxArr = [], radioObj = {}
|
|
choiceTopicArr.map(checkedItem => {
|
|
this.showTopicsArr.map(tt => {
|
|
let index = tt.children.findIndex(inner => inner.value === checkedItem)
|
|
if(index > -1) {
|
|
tt.children[index].checked = true
|
|
checkboxArr.push(checkedItem)
|
|
}
|
|
if(tt.radioChildren) {
|
|
let radioIndex = tt.radioChildren.findIndex(inner => inner.value === checkedItem)
|
|
if(radioIndex > -1) {
|
|
tt.radioChildren[radioIndex].checked = true
|
|
radioObj[tt.radioKey] = checkedItem
|
|
}
|
|
}
|
|
|
|
})
|
|
})
|
|
this.form.setFieldsValue({
|
|
...radioObj,
|
|
'choiceTopic': checkboxArr
|
|
})
|
|
|
|
}
|
|
//国际研讨会的嘉宾编辑回显值
|
|
this.$nextTick(() => {
|
|
// 普通会议的编辑回显值
|
|
if(this.$refs.formother){
|
|
// 打包不显示行程信息
|
|
if(record.payMode === 3){
|
|
this.$refs.formother.payModeBool = false
|
|
}
|
|
// 缴费方式为汇款 需要显示发票字段
|
|
if(record.payMode === 1){
|
|
this.$refs.formother.payModeBool = false
|
|
}
|
|
|
|
// 缴费方式为线上的需要回显订单号后四位
|
|
if(record.payMode === 2){
|
|
this.$refs.formother.onlinePayModeBool = true
|
|
// 控制发票是否显示的字段
|
|
this.$refs.formother.payModeBool = false
|
|
}
|
|
this.$refs.formother.setFormVal(this.model)
|
|
}
|
|
//国际研讨会的嘉宾前三个的编辑回显值
|
|
if(this.$refs.seminarVipForm){
|
|
this.$refs.seminarVipForm.setFormVal(this.model)
|
|
}
|
|
// 国际研讨会合作伙伴的回显
|
|
if(this.$refs.seminarPartnerForm){
|
|
this.$refs.seminarPartnerForm.setFormVal(this.model)
|
|
}
|
|
this.form.setFieldsValue(pick(this.model,
|
|
'companyId',
|
|
'companyContactId',
|
|
'phone',
|
|
'email',
|
|
'post',
|
|
'identity',
|
|
'guestType',
|
|
'remark'
|
|
))
|
|
})
|
|
},
|
|
/*
|
|
* 确定
|
|
* */
|
|
handleOk() {
|
|
const that = this
|
|
// 其他会议的表单验证
|
|
if( this.$refs.formother !== undefined ){
|
|
this.$refs.formother.handleOk()
|
|
}
|
|
// 国际研讨会 VIP 演讲嘉宾 特邀嘉宾 的表单验证
|
|
if( this.$refs.seminarVipForm !== undefined ){
|
|
this.$refs.seminarVipForm.handleOk()
|
|
}
|
|
// 国际研讨会的合作伙伴的表单验证
|
|
if( this.$refs.seminarPartnerForm !== undefined ){
|
|
this.$refs.seminarPartnerForm.handleOk()
|
|
}
|
|
if(this.formData.stop){
|
|
return
|
|
}
|
|
this.form.validateFields((err, values) => {
|
|
if (!err) {
|
|
this.confirmLoading = true
|
|
let submitData = Object.assign({},values,this.formData)
|
|
// 去掉所有的未审核字段,有中文的 有英文的
|
|
if(submitData.companyName) {
|
|
submitData.companyName = (submitData.companyName || '').replaceAll(' (未审核)','').replaceAll(' (未审核)','')
|
|
}
|
|
submitData.companyId = values.companyId.id
|
|
// 会议id
|
|
submitData.meetingId = this.$route.query.meetingId
|
|
// 会议类型
|
|
submitData.meetingType = this.$route.query.meetingType
|
|
// 会议费用为 0 设置参数 需要发票为0
|
|
if(this.meetingCostBool){
|
|
submitData.needInvoice = 0
|
|
}
|
|
// 国际研讨会处理 会议名称的问题
|
|
// 国际研讨会 且为WASIC 会议
|
|
if (this.currentMeetingInfo.meetingType === '3' && this.currentMeetingInfo.isWasic) {
|
|
let choiceTopicArr = submitData.choiceTopic
|
|
//11月27日 单选会议的处理
|
|
if(submitData.radioKey) {
|
|
choiceTopicArr.push(submitData.radioKey)
|
|
}
|
|
//11月28日 单选会议的处理
|
|
if(submitData.radioKeyTwo) {
|
|
choiceTopicArr.push(submitData.radioKeyTwo)
|
|
}
|
|
submitData.choiceTopic = choiceTopicArr.join(',')
|
|
}
|
|
console.log(submitData)
|
|
let url = ''
|
|
if(!this.model.id){
|
|
url = this.url.add
|
|
}else {
|
|
url = this.url.edit
|
|
// 编辑的时候需要传入id
|
|
submitData.id = this.model.id
|
|
}
|
|
// that.confirmLoading = false
|
|
// return
|
|
let method = 'post'
|
|
httpAction(url,submitData,method).then(res => {
|
|
if(res.success){
|
|
that.$emit('ok')
|
|
that.handleCancel()
|
|
that.$message.success(res.message)
|
|
that.confirmLoading = false
|
|
}else {
|
|
that.$message.warn(res.message)
|
|
}
|
|
}).finally( () => {
|
|
that.confirmLoading = false
|
|
})
|
|
}
|
|
})
|
|
},
|
|
/*
|
|
* 获取表单的值
|
|
* */
|
|
getFormData(value){
|
|
this.formData = Object.assign({},value)
|
|
},
|
|
/*
|
|
* 取消
|
|
* */
|
|
handleCancel() {
|
|
this.$router.go(-1)
|
|
},
|
|
/*
|
|
* 改变身份
|
|
* */
|
|
changeIdentify(e) {
|
|
this.identifyType = e.target.value
|
|
// 切换身份清除上次选择的值
|
|
if (e.target.value !== 1) {
|
|
this.guestType = null
|
|
}
|
|
this.$nextTick( ()=> {
|
|
this.$refs.formother.setFormVal(Object.assign({}, this.model, { identify: this.identifyType}))
|
|
})
|
|
},
|
|
/*
|
|
* 选择嘉宾类型
|
|
* */
|
|
changeGuestType(e) {
|
|
this.guestType = e.target.value
|
|
},
|
|
/*
|
|
* 选择参会企业
|
|
* */
|
|
changeCompany(value, otherParams) {
|
|
// this.selectedCompany = value
|
|
this.selectedCompany = otherParams
|
|
// 去掉未审核 去判断的企业是否是标协会企业
|
|
let companyName = this.selectedCompany.companyName.replaceAll('(未审核)','')
|
|
|
|
// 通过企业名称判断当前会议费用 是否为 0
|
|
if (this.currentMeetingInfo.meetingType + '' === '2') {
|
|
validateStandard({companyName: companyName}).then(res => {
|
|
this.isStandardBool = res.result
|
|
this.meetingCostBool = false
|
|
if (this.isStandardBool) {
|
|
// 是标协企业 判断 会员费用是否为0
|
|
if(this.currentMeetingInfo.meetingCostsVip === '0.00'){
|
|
this.meetingCostBool = true
|
|
}
|
|
}else {
|
|
// 不是标协企业 判断正常会议费用 是否为 0
|
|
if( this.currentMeetingInfo.meetingCosts === '0.00'){
|
|
this.meetingCostBool = true
|
|
}
|
|
}
|
|
if( this.$refs.formother !== undefined ){
|
|
console.log( this.$refs.formother.meetingCostBool,' this.$refs.formother.meetingCostBool')
|
|
}
|
|
})
|
|
}
|
|
// 选择企业清空 姓名 手机号
|
|
this.form.resetFields(['companyContactId','phone'])
|
|
if(this.$refs.formother ){
|
|
this.$refs.formother.clearFormItem()
|
|
// 设置发票的相关信息
|
|
this.$refs.formother.setInvoiceFormItem()
|
|
}
|
|
// 判断当前企业是否是内部企业
|
|
console.log('-----this.selectedCompany-----', this.selectedCompany)
|
|
this.judgeInternalEnterprise(this.selectedCompany.id)
|
|
|
|
},
|
|
/*
|
|
* 选择联系人获取信息
|
|
* */
|
|
changeContact(val) {
|
|
const that = this
|
|
getContactsById({id: val}).then(res => {
|
|
const model = Object.assign({}, res.result)
|
|
// 设置手机 邮箱 职务
|
|
if (res.success) {
|
|
that.form.setFieldsValue(pick(model, 'phone', 'email', 'post'))
|
|
}
|
|
// 设置邮寄联系人和地址
|
|
if(this.$refs.formother !== undefined){
|
|
this.$refs.formother.setAddressVal(res.result)
|
|
}
|
|
})
|
|
},
|
|
/*
|
|
* 判断当前的企业是否是内部企业,如果是修改isInternalEnterprise
|
|
* */
|
|
judgeInternalEnterprise(id) {
|
|
let params = {
|
|
id: id
|
|
}
|
|
judgeInternalEnterprise(params).then(res => {
|
|
if(res.success) {
|
|
this.isInternalEnterprise = res.result !== 'false'
|
|
}
|
|
}).finally(() => {
|
|
// 清空form表单身份的数据
|
|
this.form.setFieldsValue({
|
|
identity: null
|
|
})
|
|
// 嘉宾类型置空
|
|
this.guestType = null
|
|
})
|
|
},
|
|
/**
|
|
* @Description 通过会议id获取会议信息
|
|
* @Date 2021-11-29
|
|
* @param meetingId 会议id
|
|
* @author fac
|
|
* */
|
|
queryMeetingInfo(meetingId){
|
|
this.currentMeetingInfo = {}
|
|
getMeetInfoById({id: meetingId}).then(res => {
|
|
if(res.success){
|
|
this.currentMeetingInfo = res.result
|
|
// 国际研讨会 且为WASIC 会议
|
|
if (this.currentMeetingInfo.meetingType === '3' && this.currentMeetingInfo.isWasic){
|
|
this.getLinkTopicsOptionArr(meetingId)
|
|
}
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
@import '~@assets/less/common.less';
|
|
|
|
.center {
|
|
text-align: center;
|
|
|
|
.submit {
|
|
margin-right: 8px;
|
|
}
|
|
}
|
|
|
|
.item-title {
|
|
padding-left: 40px;
|
|
box-sizing: border-box;
|
|
height: 46px;
|
|
line-height: 46px;
|
|
color: #333;
|
|
position: relative;
|
|
font-size: 16px;
|
|
|
|
&::before {
|
|
position: absolute;
|
|
content: "";
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
background: #069f99;
|
|
top: 50%;
|
|
margin-top: -5px;
|
|
left: 15px;
|
|
}
|
|
}
|
|
|
|
// 国际研讨会-关联会议 多选样式的修改
|
|
.meeting-form-multi-select{
|
|
.topic-title{
|
|
padding: 10px 0;
|
|
}
|
|
|
|
/deep/.ant-checkbox-wrapper + .ant-checkbox-wrapper {
|
|
margin-left: 0!important;
|
|
}
|
|
/deep/ .ant-checkbox-wrapper,
|
|
/deep/ .ant-radio-wrapper{
|
|
margin-right: 8px;
|
|
display: block;
|
|
}
|
|
}
|
|
.radio-div{
|
|
border-top: 1px solid rgba(0, 0, 0, 0.2);
|
|
padding-top: 10px;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
</style>
|