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'