[需求变更] 企业联系人添加备注备注,只在管理端的项目详情可查看联系人的备注,企业端和小程序不可查看
This commit is contained in:
@@ -56,10 +56,33 @@
|
||||
v-decorator="['contactsIdTwo',validatorRules.contactsRepeat]"
|
||||
:maxLength='50'
|
||||
ref="selectContacts2"
|
||||
@change="contactsTwoChange"
|
||||
@ok="addContactsTwoOk"></select-contacts>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="备注1" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="hasContactOne">
|
||||
<a-input
|
||||
placeholder="请输入备注1"
|
||||
v-decorator="['remarksOne']"
|
||||
:maxLength='50'
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="备注2" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="hasContactTwo">
|
||||
<a-input
|
||||
placeholder="请输入备注2"
|
||||
v-decorator="['remarksTwo']"
|
||||
:maxLength='50'
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="企业联系人3" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
@@ -69,6 +92,7 @@
|
||||
v-decorator="['contactsIdThree',validatorRules.contactsRepeat]"
|
||||
:maxLength='50'
|
||||
ref="selectContacts3"
|
||||
@change="contactsThreeChange"
|
||||
@ok="addContactsThreeOk"></select-contacts>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -84,6 +108,18 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="备注3" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="hasContactThree">
|
||||
<a-input
|
||||
placeholder="请输入备注3"
|
||||
v-decorator="['remarksThree']"
|
||||
:maxLength='50'
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="来款方式" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
@@ -140,11 +176,11 @@
|
||||
</a-col>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="合同号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<!-- <a-input placeholder="请输入合同号"-->
|
||||
<!-- v-decorator="['contractNum',validatorRules.contractNum]"-->
|
||||
<!-- :maxLength='50'-->
|
||||
<!-- :disabled="isContractNumDisabled || isAssociatedContract"-->
|
||||
<!-- @change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>-->
|
||||
<!-- <a-input placeholder="请输入合同号"-->
|
||||
<!-- v-decorator="['contractNum',validatorRules.contractNum]"-->
|
||||
<!-- :maxLength='50'-->
|
||||
<!-- :disabled="isContractNumDisabled || isAssociatedContract"-->
|
||||
<!-- @change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>-->
|
||||
<select-revenue-contract
|
||||
placeholder="请选择合同号"
|
||||
:company="selectedCompany"
|
||||
@@ -364,6 +400,9 @@ export default {
|
||||
workingGroupList: [],
|
||||
disabledCompany: false, // 企业是否禁用
|
||||
isAssociatedContract: false, // 是否关联合同
|
||||
hasContactOne: false, // 是否选择联系人1
|
||||
hasContactTwo: false, // 是否选择联系人2
|
||||
hasContactThree: false, // 是否选择联系人3
|
||||
url: {
|
||||
add: '/project/payWorkingGroupSubitem/add',
|
||||
edit: '/project/payWorkingGroupSubitem/edit'
|
||||
@@ -420,7 +459,6 @@ export default {
|
||||
checkAssociatedProject(record.id).then(res => {
|
||||
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})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user