diff --git a/src/views/standardsAssociation/PaymentInfo/modules/CombinationPaymentModal.vue b/src/views/standardsAssociation/PaymentInfo/modules/CombinationPaymentModal.vue index d243f52..b9cacf1 100644 --- a/src/views/standardsAssociation/PaymentInfo/modules/CombinationPaymentModal.vue +++ b/src/views/standardsAssociation/PaymentInfo/modules/CombinationPaymentModal.vue @@ -553,14 +553,12 @@ import { import JUpload from '@/components/standardsAssociation/JUpload' import PreViewImgModal from './PreViewImgModal' import { commonMemberCost, vipMemberCost,upgradeVip,queryContactList,queryPostInfoById,queryContactInfoByMemberId } from '@api/incomePaymentsApi' -import {PaymentMethodEnums} from "../../../../enums/memberEnums"; export default { name: 'PaymentInfoModal', components: { JDate, JImageUpload, - JUpload, JDictSelectTag, PreViewImgModal, CompanySelect @@ -868,10 +866,18 @@ export default { const memberAmount = this.form.getFieldValue('memberPaymentAmount') ? Number(this.form.getFieldValue('memberPaymentAmount')) : 0 const certificateAmount = this.form.getFieldValue('certificatePaymentAmount') ? Number(this.form.getFieldValue('certificatePaymentAmount')) : 0 this.certificatePaymentAmountFormValue = certificateAmount + let otherParams = {} + // 如果存在证书信息面板的话 获取邮寄联系人的信息 + if(this.certificatePaymentAmountFormValue) { + const formObj = this.form.getFieldsValue(['postContactAddress', 'contactPostCode']) + otherParams.address = formObj.postContactAddress + otherParams.postcode = formObj.contactPostCode + } this.form.validateFields(['memberPaymentAmount', 'certificatePaymentAmount'], (err) => { if (!err) { const otherPaymentAmount = this.allAmount - (memberAmount + certificateAmount) - this.form.setFieldsValue({ otherPaymentAmount }) + let obj = { otherPaymentAmount, ...otherParams } + this.$nextTick(() => {this.form.setFieldsValue(obj)}) } }) }) @@ -940,18 +946,23 @@ export default { selectContact(val) { if (!val) { // 清除邮寄联系人信息 - this.form.resetFields(['postContactPhone', 'contactPostCode', 'postContactAddress']) + this.form.resetFields(['postContactPhone', 'contactPostCode', 'postContactAddress', 'address', 'postcode']) } queryPostInfoById({ id: val }).then(res => { if (res.success) { const contactInfo = res.result // 回显邮寄联系人的信息 this.$nextTick(() => { - this.form.setFieldsValue({ + const obj = { 'postContactPhone': contactInfo.phone, 'contactPostCode': contactInfo.postalCode, 'postContactAddress': contactInfo.contactAddress - }) + } + if (this.certificatePaymentAmountFormValue) { + obj.address = contactInfo.contactAddress + obj.postcode = contactInfo.postalCode + } + this.form.setFieldsValue(obj) }) } })