[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 * @param callback
*/ */
validateContact(rule, value, callback) { validateContact(rule, value, callback) {
const contactObj = this.form.getFieldsValue(['contactsIdOne', 'contactsIdTwo', 'contactsIdThree']) if (value) {
const contactArr = Object.values(contactObj) const contactObj = this.form.getFieldsValue(['contactsIdOne', 'contactsIdTwo', 'contactsIdThree'])
contactArr.filter(tt => tt !== undefined) const contactArr = Object.values(contactObj)
console.log(contactArr) contactArr.filter(tt => tt !== undefined)
if (isRepeat(contactArr)) { console.log(contactArr)
callback('请选择不同的企业联系人') if (isRepeat(contactArr)) {
} else { callback('请选择不同的企业联系人')
} else {
callback()
}
callback() callback()
return
} }
callback() callback()
} }