From b8d22247b3e60b070fedac59839919b48b60cd13 Mon Sep 17 00:00:00 2001 From: zhaoxiao Date: Tue, 2 Nov 2021 10:26:18 +0800 Subject: [PATCH] =?UTF-8?q?[=E9=9C=80=E6=B1=82=E5=8F=98=E6=9B=B4]=20?= =?UTF-8?q?=E4=BC=81=E4=B8=9A=E8=81=94=E7=B3=BB=E4=BA=BA=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=A4=87=E6=B3=A8=E5=A4=87=E6=B3=A8=EF=BC=8C=E5=8F=AA=E5=9C=A8?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=AB=AF=E7=9A=84=E9=A1=B9=E7=9B=AE=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=8F=AF=E6=9F=A5=E7=9C=8B=E8=81=94=E7=B3=BB=E4=BA=BA?= =?UTF-8?q?=E7=9A=84=E5=A4=87=E6=B3=A8=EF=BC=8C=E4=BC=81=E4=B8=9A=E7=AB=AF?= =?UTF-8?q?=E5=92=8C=E5=B0=8F=E7=A8=8B=E5=BA=8F=E4=B8=8D=E5=8F=AF=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ProjectDetailModal.vue | 109 +++++++++++++++++- .../modules/WorkingGroupMemberUnitModule.vue | 108 +++++++++++++++-- 2 files changed, 205 insertions(+), 12 deletions(-) diff --git a/src/components/ProjectDetailModal.vue b/src/components/ProjectDetailModal.vue index 6fc16fc..6621a3a 100644 --- a/src/components/ProjectDetailModal.vue +++ b/src/components/ProjectDetailModal.vue @@ -16,7 +16,8 @@ - + @@ -64,7 +65,7 @@ - {{ basicInfo.name }} + @@ -74,7 +75,7 @@ - {{ basicInfo.post }} + @@ -94,9 +95,108 @@ - + + + + @@ -305,7 +405,6 @@ export default { console.log('未查到相应的信息') } }) - }, handleCancel() { this.visible = false diff --git a/src/views/projectManagement/modules/WorkingGroupMemberUnitModule.vue b/src/views/projectManagement/modules/WorkingGroupMemberUnitModule.vue index 9b473dc..0e87b7b 100644 --- a/src/views/projectManagement/modules/WorkingGroupMemberUnitModule.vue +++ b/src/views/projectManagement/modules/WorkingGroupMemberUnitModule.vue @@ -56,10 +56,33 @@ v-decorator="['contactsIdTwo',validatorRules.contactsRepeat]" :maxLength='50' ref="selectContacts2" + @change="contactsTwoChange" @ok="addContactsTwoOk"> + + + + + + + + + + + + + + @@ -69,6 +92,7 @@ v-decorator="['contactsIdThree',validatorRules.contactsRepeat]" :maxLength='50' ref="selectContacts3" + @change="contactsThreeChange" @ok="addContactsThreeOk"> @@ -84,6 +108,18 @@ + + + + + + + + @@ -140,11 +176,11 @@ - - - - - + + + + + { this.disabledCompany = this.disabledChargeCompany || res || (!!record.inAccount && record.inAccount !== 0) || (!!record.makeInvoice && record.makeInvoice !== 0) || (!!record.mail && record.mail !== 0) this.isAssociatedContract = res - console.log(this.isContractNumDisabled,this.isAssociatedContract, this.isContractNumDisabled || this.isAssociatedContract, '----------------') }) } else { this.disabledCompany = this.disabledChargeCompany @@ -453,12 +491,22 @@ export default { id: this.model.mailContactsTemporaryId, name: this.model.mailContactsTemporaryName } + // 是否需要显示联系人备注信息 + if (this.model.contactsTemporaryIdOne) { + this.hasContactOne = true + } + if (this.model.contactsTemporaryIdTwo) { + this.hasContactTwo = true + } + if (this.model.contactsTemporaryIdThree) { + this.hasContactThree = true + } } this.chargeWayType = record.chargeWay this.pickChargeNoticeType(record.charge, true) this.visible = true this.$nextTick(() => { - this.form.setFieldsValue(pick(this.model, 'chargeCompany', 'contactsIdOne', 'contactsIdTwo', 'contactsIdThree', 'mailContactsId', 'chargeWay', 'charge', 'receivableAmount', 'contractNum', 'receivableAmount', 'chargeNoticeId', 'needInvoice', 'remarks')) + this.form.setFieldsValue(pick(this.model, 'chargeCompany', 'contactsIdOne', 'contactsIdTwo', 'contactsIdThree', 'mailContactsId', 'chargeWay', 'charge', 'receivableAmount', 'contractNum', 'receivableAmount', 'chargeNoticeId', 'needInvoice', 'remarks', 'remarksOne', 'remarksTwo', 'remarksThree')) }) }, close() { @@ -473,6 +521,10 @@ export default { // 清除企业、来款方式、合同号的限制 this.isAssociatedContract = false this.disabledCompany = false + // 清除联系人备注信息 + this.hasContactOne = false + this.hasContactTwo = false + this.hasContactThree = false this.visible = false }, handleOk() { @@ -677,6 +729,16 @@ export default { * @param value */ contactsChange(value) { + if (!value) { + this.hasContactOne = false + this.form.setFieldsValue({remarksOne: null}) + return + } + this.hasContactOne = true + // 判断联系人是否和原来的一致,不一致则清空备注内容 + if (value !== this.model.contactsTemporaryIdOne) { + this.form.setFieldsValue({remarksOne: null}) + } let mailContact = Object.values(this.form.getFieldValue(['mailContactsId']))[0] // 邮寄联系人非undefined时赋值 if (!mailContact) { @@ -685,6 +747,38 @@ export default { this.form.setFieldsValue(pick(this.model, 'mailContactsId')) }) } + }, + /** + * 企业联系人2变化 + * @param value + */ + contactsTwoChange (value) { + if (!value) { + this.hasContactTwo = false + this.form.setFieldsValue({remarksTwo: null}) + return + } + this.hasContactTwo = true + // 判断联系人是否和原来的一致,不一致则清空备注内容 + if (value !== this.model.contactsTemporaryIdTwo) { + this.form.setFieldsValue({remarksTwo: null}) + } + }, + /** + * 企业联系人3变化 + * @param value + */ + contactsThreeChange (value) { + if (!value) { + this.hasContactThree = false + this.form.setFieldsValue({remarksThree: null}) + return + } + this.hasContactThree = true + // 判断联系人是否和原来的一致,不一致则清空备注内容 + if (value !== this.model.contactsTemporaryIdThree) { + this.form.setFieldsValue({remarksThree: null}) + } } } }