From 08747a6102d8bcd7667356ccd80792b188d7262b Mon Sep 17 00:00:00 2001 From: fengchenchen Date: Wed, 27 Dec 2023 18:20:30 +0800 Subject: [PATCH] =?UTF-8?q?[update]-=E5=BA=8F=E5=8F=B746=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=AF=81=E4=B9=A6=E7=BC=B4=E8=B4=B9=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=20=EF=BC=8C=E8=AF=81=E4=B9=A6=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E9=80=9A=E8=AE=AF=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E3=80=81=E9=82=AE=E7=BC=96=20=E9=BB=98=E8=AE=A4=E4=BB=A3?= =?UTF-8?q?=E5=85=A5=20=E9=82=AE=E5=AF=84=E8=81=94=E7=B3=BB=E4=BA=BA?= =?UTF-8?q?=E7=9A=84=20=E9=80=9A=E8=AE=AF=E5=9C=B0=E5=9D=80=E5=92=8C?= =?UTF-8?q?=E9=82=AE=E7=BC=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/CombinationPaymentModal.vue | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) 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) }) } })