'单位信息、从业人员管理、申请人员、申请人员、保安待培训人员管理、保安培训项目管理、保安考试管理页面对接处理'

This commit is contained in:
esacpe
2025-09-23 18:03:42 +08:00
parent 446099015c
commit c23bcb30df
24 changed files with 504 additions and 313 deletions

View File

@ -55,32 +55,66 @@ const dialogVisible = computed({
const formList = reactive([
[
{ label: "姓名", prop: "xm", type: "input" },
{ label: "证件号码", prop: "sfzh", type: "input"},
{ label: "证件号码", prop: "zjhm", type: "input"},
{ label: "联系电话", prop: "lxdh", type: "input" },
],
[
{ label: "居住地址", prop: "jzdz", type: "input" },
{ label: "申请时间", prop: "rzsj", type: "date" },
{ label: "岗位", prop: "ssbmdm", type: "select" },
{ label: "申请时间", prop: "xtCjsj", type: "date" },
{ label: "岗位", prop: "gw", type: "input" },
],
[
{ label: "身份证正面", prop: "ssbmdm", type: "upload", limit: 2 },
{ label: "身份证正面", prop: "ryzpzm", type: "upload", limit: 1 },
{ label: "身份证反面", prop: "ryzpfm", type: "upload", limit: 1 },
],
[
{ label: "体检报告", prop: "ssbmdm", type: "upload", limit: 1 },
{ label: "体检报告", prop: "", type: "upload", limit: 1 },
],
[
{ label: "无犯罪记录证明", prop: "ssbmdm", type: "upload", limit: 1 },
{ label: "无犯罪记录证明", prop: "wfzzmjl", type: "upload", limit: 1 },
]
])
const rules = {
xm: [{ required: true, message: "请输入姓名", trigger: "change" }],
sfzh: [{ required: true, message: "请输入证件号码", trigger: "change" }],
lxdh: [{ required: true, message: "请输入联系电话", trigger: "change" }],
zjhm: [
{ required: true, message: "请输入证件号码", trigger: "change" },
{
validator: (rule, value, callback) => {
if (!value) {
callback()
} else {
const reg = /^(\d{15}|\d{17}[\dXx])$/;
if (!reg.test(value)) {
callback(new Error("请输入正确的身份证号码"))
} else {
callback()
}
}
}
}
],
lxdh: [
{ required: true, message: "请输入联系电话", trigger: "change" },
{
validator: (rule, value, callback) => {
if (!value) {
callback()
} else {
const reg = /^1[34578]\d{9}$/
if (!reg.test(value)) {
callback(new Error("请输入正确的手机号"))
} else {
callback()
}
}
}
}
],
jzdz: [{ required: true, message: "请输入居住地址", trigger: "change" }],
rzsj: [{ required: true, message: "请选择入职时间", trigger: "change" }],
pxgs: [{ required: true, message: "请选择所属保安公司", trigger: "change" }],
gw: [{ required: true, message: "请输入岗位", trigger: "change" }],
}
const formData = ref({})
@ -103,10 +137,11 @@ const open = (row = {}, type = 'add') => {
}
}
// 新增、编辑
const save = () => {
FormRef.value.submit(() => {
loading.value = true;
const url = !formData.value?.id ? `/mosty-base/baxx/cyry/add` : `/mosty-base/baxx/cyry/edit`;
const url = !formData.value?.id ? `/mosty-base/baxx/basq/add` : `/mosty-base/baxx/basq/edit`;
qcckPost(formData.value, url).then(() => {
loading.value = false;
proxy.$message.success("保存成功");