[update] 企业联系人验重

This commit is contained in:
zhaoxiao
2021-09-08 13:34:59 +08:00
parent 70fc45cee2
commit 3aff83fdfd
@@ -529,14 +529,18 @@ export default {
* @param callback
*/
validateContact(rule, value, callback) {
const contactObj = this.form.getFieldsValue(['contactsIdOne', 'contactsIdTwo', 'contactsIdThree'])
const contactArr = Object.values(contactObj)
contactArr.filter(tt => tt !== undefined)
console.log(contactArr)
if (isRepeat(contactArr)) {
callback('请选择不同的企业联系人')
} else {
if (value) {
const contactObj = this.form.getFieldsValue(['contactsIdOne', 'contactsIdTwo', 'contactsIdThree'])
const contactArr = Object.values(contactObj)
contactArr.filter(tt => tt !== undefined)
console.log(contactArr)
if (isRepeat(contactArr)) {
callback('请选择不同的企业联系人')
} else {
callback()
}
callback()
return
}
callback()
}