From 38593ba9e3b3b0753dfa93108133622215f7b99e Mon Sep 17 00:00:00 2001 From: wzt <3847407356@qq.com> Date: Tue, 14 Jul 2026 16:29:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E5=91=98=E5=B7=A5=E5=A7=93?= =?UTF-8?q?=E5=90=8D=E9=87=8D=E5=A4=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/staff.js | 11 ++ src/views/system/staff/index.vue | 196 +++++++++++++++++++++---------- 2 files changed, 146 insertions(+), 61 deletions(-) diff --git a/src/api/system/staff.js b/src/api/system/staff.js index 1abdb19..1c32ab3 100644 --- a/src/api/system/staff.js +++ b/src/api/system/staff.js @@ -76,3 +76,14 @@ export function reEmployment(id) { }) } + +// 校验员工姓名重复 +export function checkStaffName(data) { + return request({ + url: '/system/staff/checkName', + method: 'post', + data + }) +} +// 失去焦点触发校验 + diff --git a/src/views/system/staff/index.vue b/src/views/system/staff/index.vue index 69fc0c7..3e884b9 100644 --- a/src/views/system/staff/index.vue +++ b/src/views/system/staff/index.vue @@ -1,3 +1,5 @@ +import { checkStaffName } from '@/api/system/staff' +import { listStaff, getStaff, addStaff, updateStaff, delStaff, listStaffAll, listStaffByDept, clearAllStaff, reEmployment, checkStaffName } from '@/api/system/staff'