BUG优化

dev
xiepeng 2024-07-08 08:27:52 +08:00
parent 261bcdf3d5
commit 45c87b896e
4 changed files with 14 additions and 30 deletions

View File

@ -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" },

View File

@ -34,6 +34,7 @@
</el-col>
</el-row>
</el-form>
<layout-table
ref="tableRef"
v-model:pagination="pagination"
@ -41,7 +42,6 @@
row-key="USER_ID"
@get-data="fnGetData"
>
<el-table-column reserve-selection type="selection" width="55" />
<el-table-column label="序号" width="70">
<template #default="{ $index }">
{{ serialNumber(pagination, $index) }}
@ -50,7 +50,15 @@
<el-table-column prop="NAME" label="姓名" />
<el-table-column prop="USERNAME" label="身份证号" />
<el-table-column prop="PHONE" label="手机号" />
<el-table-column label="操作" width="150">
<template #default="{ row }">
<el-button type="primary" text link @click="fnSubmit(row)">
选择
</el-button>
</template>
</el-table-column>
</layout-table>
<template #footer>
<el-button @click="fnClose"></el-button>
<el-button type="primary" @click="fnSubmit"> </el-button>

View File

@ -13,7 +13,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="离岗时间" prop="dates">
<el-form-item label="登录时间" prop="dates">
<el-date-picker
v-model="searchForm.dates"
type="daterange"
@ -24,7 +24,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="部门">
<el-form-item label="部门" prop="DEPTIDS">
<layout-department
v-model="searchForm.DEPTIDS"
multiple

View File

@ -41,7 +41,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="申请人部门">
<el-form-item label="申请人部门" prop="DEPTIDS">
<layout-department
v-model="searchForm.DEPTIDS"
multiple