[update]-序号46 新增证书缴费的时候 ,证书申请信息的通讯地址、邮编 默认代入 邮寄联系人的 通讯地址和邮编

This commit is contained in:
fengchenchen
2023-12-27 18:20:30 +08:00
parent 8c027a980b
commit 08747a6102
@@ -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)
})
}
})