From 45c87b896e847f3975a9a531cef3f7fcae4030ca Mon Sep 17 00:00:00 2001 From: xiepeng Date: Mon, 8 Jul 2024 08:27:52 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user_practitioner/choiceadd.vue | 28 ++----------------- .../components/select_person.vue | 10 ++++++- .../login_record/index.vue | 4 +-- .../off_duty_management/record/index.vue | 2 +- 4 files changed, 14 insertions(+), 30 deletions(-) diff --git a/src/views/enterprise_management/user_practitioner/choiceadd.vue b/src/views/enterprise_management/user_practitioner/choiceadd.vue index 55172c5..922e322 100644 --- a/src/views/enterprise_management/user_practitioner/choiceadd.vue +++ b/src/views/enterprise_management/user_practitioner/choiceadd.vue @@ -766,10 +766,7 @@ import { } from "@/assets/js/data_dictionary.js"; import { ElMessageBox, ElMessage } from "element-plus"; import { debounce } from "throttle-debounce"; -import { - getVerifyDeduplicationUserIdCard, - getVerifyDuplicateEmail, -} from "@/request/api.js"; +import { getVerifyDuplicateEmail } from "@/request/api.js"; import useFormValidate from "@/assets/js/useFormValidate.js"; import { getPractitionerForEdit, @@ -798,29 +795,8 @@ const fnHasEmail = async (rule, value, callback) => { callback(); } }; -const fnHasUserIdCard = async (rule, value, callback) => { - if (value) { - const resData = await getVerifyDeduplicationUserIdCard({ - USER_ID_CARD: value, - VERIFYUSER_ID: data.form.USER_ID, - }); - if (resData?.pd?.USER_ID) callback(new Error("身份证号重复")); - else callback(); - } else { - callback(); - } -}; + const rules = { - USER_ID_CARD: [ - { required: true, message: "身份证号不能为空", trigger: "blur" }, - { - pattern: - /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(([0-2][1-9])|10|20|30|31)\d{3}(\d|X|x)$/, - message: "请输入正确的身份证号", - trigger: "blur", - }, - { validator: fnHasUserIdCard, trigger: "blur" }, - ], NAME: [{ required: true, message: "姓名不能为空", trigger: "blur" }], PHONE: [ { required: true, message: "请输入手机号码", trigger: "blur" }, diff --git a/src/views/enterprise_management/user_practitioner/components/select_person.vue b/src/views/enterprise_management/user_practitioner/components/select_person.vue index 5b5107a..7982bb5 100644 --- a/src/views/enterprise_management/user_practitioner/components/select_person.vue +++ b/src/views/enterprise_management/user_practitioner/components/select_person.vue @@ -34,6 +34,7 @@ + -