【bug】 打包费用为0 缴费二维码的回显

This commit is contained in:
fengachen
2021-10-20 18:32:50 +08:00
parent 3b10703035
commit 643aafb9f6
3 changed files with 48 additions and 8 deletions
@@ -525,7 +525,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
// 加定时器是因为有可能赋值不成功 // 加定时器是因为有可能赋值不成功
setTimeout(() => { setTimeout(() => {
this.form.setFieldsValue(pick(this.model,'notice','meetingName', 'meetingType', 'convokeTime', 'particularYear', 'estimatedNumber', 'meetingFiles', 'registerDeadline', 'meetingContent', 'convokeLocale', 'address', 'meetingCosts', 'directorId', 'remark', 'directorPhone')), 200 this.form.setFieldsValue(pick(this.model,'notice','paymentQrCode','meetingName', 'meetingType', 'convokeTime', 'particularYear', 'estimatedNumber', 'meetingFiles', 'registerDeadline', 'meetingContent', 'convokeLocale', 'address', 'meetingCosts', 'directorId', 'remark', 'directorPhone')), 200
}) })
// 如果是标协会议则回显 标协会议的字段 // 如果是标协会议则回显 标协会议的字段
if (this.meetingType === '2') { if (this.meetingType === '2') {
@@ -561,6 +561,10 @@ export default {
} }
let placeName = values.convokeLocale let placeName = values.convokeLocale
const formData = Object.assign(this.model, values, {venue: this.getPcaText(placeName)}) const formData = Object.assign(this.model, values, {venue: this.getPcaText(placeName)})
// 如果会议的费用未为0 不能上传缴费凭证
if(values.meetingCosts === '0.00' ){
delete formData.paymentQrCode
}
// 添加编辑会议需要增加会议类型 // 添加编辑会议需要增加会议类型
formData.meetingType = this.meetingType formData.meetingType = this.meetingType
// 如果是工作会议维护跳转的需要加上会议类型为工作组会议和工作组id // 如果是工作会议维护跳转的需要加上会议类型为工作组会议和工作组id
@@ -787,6 +791,10 @@ export default {
// 会议费用为 0控制二维码显示隐藏 // 会议费用为 0控制二维码显示隐藏
if (value === '0.00') { if (value === '0.00') {
this.QRcodeBool = false this.QRcodeBool = false
// 如果付款二维码有值 需要清空
if(this.form.getFieldValue('paymentQrCode')){
this.form.resetFields('paymentQrCode')
}
} else { } else {
this.QRcodeBool = true this.QRcodeBool = true
} }
@@ -36,9 +36,11 @@
<select-contacts :selected-company="selectedCompany" <select-contacts :selected-company="selectedCompany"
:init-contacts="selectPostPerson" :init-contacts="selectPostPerson"
:disabled="isEditBool" :disabled="isEditBool"
:is-limit="true"
placeholder="请选择邮寄联系人" placeholder="请选择邮寄联系人"
v-decorator="['postContactId',validatorRules.postContactId]" v-decorator="['postContactId',validatorRules.postContactId]"
:maxLength='50' :maxLength='50'
@change="changePost"
ref="selectMailContacts" ref="selectMailContacts"
@ok="addContactsOk"></select-contacts> @ok="addContactsOk"></select-contacts>
</a-form-item> </a-form-item>
@@ -117,6 +119,7 @@ import SelectContacts from '@comp/company/SelectContacts'
import pick from 'lodash.pick' import pick from 'lodash.pick'
import JDictSelectTag from '@comp/dict/JDictSelectTag' import JDictSelectTag from '@comp/dict/JDictSelectTag'
import moment from 'moment' import moment from 'moment'
import {getContactsById} from '@api/api'
export default { export default {
name: 'OtherMeetingForm', name: 'OtherMeetingForm',
@@ -222,13 +225,24 @@ export default {
} }
}) })
}, },
/* /*
* 选择了联系人后给邮寄联系人和地址赋值 * 选择了联系人后给邮寄联系人和地址赋值
* */ * */
setAddressVal(val) { setAddressVal(val) {
val = Object.assign({}, {postContactId: val.id, postContactAddress: val.contactAddress}) val = Object.assign({}, {postContactId: val.id, postContactAddress: val.contactAddress,postCode:val.postalCode})
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(val, 'postContactId', 'postContactAddress')) this.form.setFieldsValue(pick(val, 'postContactId', 'postContactAddress','postCode'))
})
},
/*
* 选择联系人之后地址邮编复制
* */
changePost(val){
getContactsById({id:val}).then(res => {
if(res.success){
this.setAddressVal(res.result)
}
}) })
}, },
/* /*
@@ -248,8 +262,10 @@ export default {
changePayMode(e) { changePayMode(e) {
if (e.target.value === 3) { if (e.target.value === 3) {
this.payModeBool = true this.payModeBool = true
this.$emit('isPack',true)
} else { } else {
this.payModeBool = false this.payModeBool = false
this.$emit('isPack',false)
} }
// 缴费方式为线上 要输入订单后四位 // 缴费方式为线上 要输入订单后四位
if(e.target.value === 2){ if(e.target.value === 2){
+21 -5
View File
@@ -175,13 +175,14 @@
<template v-if="meetingType !== '3' "> <template v-if="meetingType !== '3' ">
<other-meeting-form ref="formother" :selected-company="selectedCompany" <other-meeting-form ref="formother" :selected-company="selectedCompany"
:meeting-cost-bool="meetingCostBool" :meeting-cost-bool="meetingCostBool"
:identify-type="identifyType" @formData="getFormData"></other-meeting-form> :identify-type="identifyType" @formData="getFormData" @isPack="isPack"></other-meeting-form>
</template> </template>
<!--国际研讨会参会人与内部企业的显示 默认不展示 --> <!--国际研讨会参会人与内部企业的显示 默认不展示 -->
<template v-if="meetingType === '3' && identifyType !== 1 && identifyType !== null "> <template v-if="meetingType === '3' && identifyType !== 1 && identifyType !== null ">
<other-meeting-form ref="formother" :meeting-type="meetingType" :selected-company="selectedCompany" <other-meeting-form ref="formother" :meeting-type="meetingType" :selected-company="selectedCompany"
:meeting-cost-bool="meetingCostBool" :meeting-cost-bool="meetingCostBool"
@isPack="isPack"
:identify-type="identifyType" @formData="getFormData"></other-meeting-form> :identify-type="identifyType" @formData="getFormData"></other-meeting-form>
</template> </template>
<!-- 国际研讨会身份选择嘉宾 并且是VIP--> <!-- 国际研讨会身份选择嘉宾 并且是VIP-->
@@ -321,6 +322,8 @@ export default {
inviteCodeBool: false, inviteCodeBool: false,
// 邀请码错误状态 // 邀请码错误状态
codeErrorBool: true, codeErrorBool: true,
// 是否是打包
isPackBool:false,
url: { url: {
add: '/meeting/payMeetingSituation/signUp' add: '/meeting/payMeetingSituation/signUp'
} }
@@ -344,15 +347,15 @@ export default {
if (res.success) { if (res.success) {
this.currentMeetingInfo = res.result this.currentMeetingInfo = res.result
this.meetingType = this.currentMeetingInfo.meetingType this.meetingType = this.currentMeetingInfo.meetingType
// 初始化会议费用 // 初始化会议费用 这里的判断有问题 应该根据单位是否是标协会员单位 显示不同的会议费用
if (this.currentMeetingInfo.meetingCostsVip) { if (this.currentMeetingInfo.meetingCostsVip) {
this.meetingMoney = `普通会员(${this.currentMeetingInfo.meetingCosts}/人) 标协会员(${this.currentMeetingInfo.meetingCostsVip}/人)` this.meetingMoney = `普通会员(${this.currentMeetingInfo.meetingCosts}/人) 标协会员(${this.currentMeetingInfo.meetingCostsVip}/人)`
// 费用合计 // 费用合计
this.meetingCostSum = Number(this.currentMeetingInfo.meetingCosts) + Number(this.currentMeetingInfo.meetingCostsVip) this.meetingCostSum = this.currentMeetingInfo.meetingCosts
} else { } else {
this.meetingMoney = `普通会员(${this.currentMeetingInfo.meetingCosts}/人)` this.meetingMoney = `普通会员(${this.currentMeetingInfo.meetingCosts}/人)`
// 费用合计 // 费用合计
this.meetingCostSum = Number(this.currentMeetingInfo.meetingCosts) this.meetingCostSum = this.currentMeetingInfo.meetingCosts
} }
// 初始化召开时间 // 初始化召开时间
if (this.currentMeetingInfo.startTime) { if (this.currentMeetingInfo.startTime) {
@@ -425,6 +428,15 @@ export default {
if (r != null) return unescape(r[2]) if (r != null) return unescape(r[2])
return null return null
}, },
// 是否打包 打包会议费用为0
isPack(val){
this.isPackBool = val
if(this.isPackBool){
this.meetingCostSum = '0.00'
}else {
this.meetingCostSum = this.currentMeetingInfo.meetingCosts
}
},
/* /*
* 确定 * 确定
* */ * */
@@ -541,6 +553,11 @@ export default {
this.inviteCodeBool = false this.inviteCodeBool = false
// 选的否 身份置空 // 选的否 身份置空
this.identifyType = null this.identifyType = null
this.$nextTick(() => {
if(this.$refs.formother){
this.$refs.formother.isLimitBool = true
}
})
} }
}, },
/* /*
@@ -555,7 +572,6 @@ export default {
nextSetp() { nextSetp() {
// 获取邀请码 // 获取邀请码
let code = this.form.getFieldValue('code') let code = this.form.getFieldValue('code')
console.log(this.currentMeetingInfo.cooperativeInvitationCode === code)
switch (code) { switch (code) {
// 合作伙伴 // 合作伙伴
case this.currentMeetingInfo.cooperativeInvitationCode: case this.currentMeetingInfo.cooperativeInvitationCode: