This commit is contained in:
lcw
2026-01-14 17:49:38 +08:00
parent 8cce4acf48
commit 32d7076e89
52 changed files with 620 additions and 481 deletions

View File

@ -25,7 +25,7 @@
<script setup>
import ChooseCompany from './chooseCompany.vue'
import { ref, reactive, getCurrentInstance, watch,onMounted } from 'vue'
import { ref, reactive, getCurrentInstance, watch, onMounted } from 'vue'
import { qcckPost } from "@/api/qcckApi.js";
import FormMessage from '@/components/aboutTable/FormMessage.vue'
import { getItem } from '@/utils/storage'
@ -49,16 +49,23 @@ const companyList = ref([])
const myCompany = () => {
const cjrsfzh = getItem("userInfo")
const params = { cjrsfzh: cjrsfzh.sfzh }
qcckPost(params, "/mosty-base/baxx/baba/list").then(res => {
companyList.value = res.map(item => {
qcckPost({
pageCurrent: 1,
pageSize: 1000
}, "/mosty-base/baxx/dwgl/page").then(res => {
companyList.value = res.records.map(item => {
return {
zdmc: item.dwmc,
dm: item.csdm
zdmc: item.dwmc || item.csmc,
dm: item.csdm || item.id
}
}) || [];
console.log(companyList.value);
});
}
onMounted(() => {
getPxgsidList()
myCompany()
})
const dicDefault = {
@ -82,52 +89,46 @@ const dicDefault = {
}
const pxgsidList = ref([])
const dialogVisible = ref(false)
const formList = reactive([
const formList = ref()
watch(() => companyList.value, (newVal, oldVal) => {
if (newVal) {
formList.value = [
[
// { label: "单位名称", prop: "code", type: "select", options: companyList.value },
{ label: "所属公司", prop: "pxgs", type: "slot" },
{ label: "姓名", prop: "xm", type: "input" },
{ label: "证件号码", prop: "sfzh", type: "input" },
[
{ label: "单位名称", prop: "code", type: "select", options: companyList.value },
{ label: "姓名", prop: "xm", type: "input" },
{ label: "证件号码", prop: "sfzh", type: "input" },
{ label: "联系电话", prop: "lxdh", type: "input" },
],
[
{ label: "居住地址", prop: "jzdz", type: "input" },
{ label: "职业类别", prop: "zydm", type: "select", options: dicDefault.B_BZ_ZYLB },
{ label: "入职时间", prop: "rzsj", type: "date" },
], [
{ label: "所属行业", prop: "sshy", type: "select", options: D_BAXX_SSHY },
{ label: "岗位", prop: "gw", type: "select", options: D_BAXX_GWLX },
{ label: "单位类型", prop: "dwlx", type: "select", options: D_BAXX_DWLX },
], [
{ label: "资格证类型", prop: "zgzlx", type: "select", options: dicDefault.B_BZ_BAZGZ },
{ label: "资格证编号", prop: "zgzbh", type: "input" },
{ label: "资格证起始日期", prop: "zgzKssj", type: "date" },
],
[
{ label: "联系电话", prop: "lxdh", type: "input" },
{ label: "居住地址", prop: "jzdz", type: "input" },
], [{ label: "资格证截止日期", prop: "zgzJssj", type: "date" },
{ label: "外派单位", prop: "wpdw", type: "input" },
{ label: "培训公司", prop: "pxgs", type: "select", options: pxgsidList.value }],
[
{ label: "从业人员照片", prop: "tp", type: "upload" },
]
// [
// { label: "离职时间", prop: "lzsj", type: "slot" },
// { label: "文化程度", prop: "whcd", type: "select", options: D_BZ_WHCD },
// { label: "资格证类型", prop: "zgzlx", type: "input" },
// { label: "资格证起始日期", prop: "zgzKssj", type: "date" },
// { label: "资格证截至日期", prop: "zgzJssj", type: "date" },
// { label: "岗位", prop: "gw", type: "select", options: D_BAXX_GWLX },
// ],
// [
// { label: "培训公司", prop: "pxgs", type: "slot" },
// ],
// [
// { label: "外派单位", prop: "wpdw", type: "input" },
// ],
// { label: "从业人员照片", prop: "tp", type: "upload", limit: 2 },
// { label: "保安证件", prop: "bazzp", type: "upload", limit: 1 },
])
{ label: "职业类别", prop: "zydm", type: "select", options: dicDefault.B_BZ_ZYLB },
], [
{ label: "入职时间", prop: "rzsj", type: "date" },
{ label: "所属行业", prop: "sshy", type: "select", options: D_BAXX_SSHY },
{ label: "服务行业名称", prop: "hymc", type: "input" },
], [
{ label: "岗位", prop: "gw", type: "select", options: D_BAXX_GWLX },
{ label: "单位类型", prop: "dwlx", type: "select", options: D_BAXX_DWLX },
{ label: "资格证类型", prop: "zgzlx", type: "select", options: dicDefault.B_BZ_BAZGZ },
{ label: "资格证编号", prop: "zgzbh", type: "input" },
], [
{ label: "资格证起始日期", prop: "zgzKssj", type: "date" },
{ label: "资格证截止日期", prop: "zgzJssj", type: "date" },
{ label: "外派单位", prop: "wpdw", type: "input" },
],
[
{ label: "从业人员照片", prop: "tp", type: "upload" },
]
]
}
})
const rules = {
xm: [{ required: true, message: "请输入姓名", trigger: "change" }],
...rule.phoneRule({ validator: true, message: "请输入联系电话", require: true }, "lxdh"), // 是否必填 是否进行校验`
@ -136,7 +137,6 @@ const rules = {
rzsj: [{ required: true, message: "请选择入职时间", trigger: "change" }],
zgzbh: [{ required: true, message: "请输入资格证编号", trigger: "change" }],
gw: [{ required: true, message: "请输入岗位", trigger: "change" }],
wpdw: [{ required: true, message: "请输入外派单位", trigger: "change" }],
zgzlx: [{ required: true, message: "请输入资格证类型", trigger: "change" }],
zgzKssj: [{ required: true, message: "请选择资格证起始日期", trigger: "change" }],
zgzJssj: [{ required: true, message: "请选择资格证截至日期", trigger: "blur" }],
@ -145,12 +145,13 @@ const rules = {
}
const getPxgsidList = () => {
const params = { dwlx: formData.value.dwlx, state: '1' }
qcckPost(params, "/mosty-base/baxx/baba/list").then(res => {
pxgsidList.value = res.map(item => {
const userInfo = getItem("userInfo")
const params = { keyword: userInfo.sfzh, pageCurrent: 1, pageSize: 1000 }
qcckPost(params, "/mosty-base/baxx/dwgl/page").then(res => {
pxgsidList.value = res.records.map(item => {
return {
dm: item.id,
zdmc: item.yyzddjmc
zdmc: item.csmc
}
}) || [];
});
@ -159,11 +160,11 @@ const getPxgsidList = () => {
const formData = ref({})
watch(() => formData.value.dwlx, (newVal, oldVal) => {
if (newVal !== oldVal) {
getPxgsidList()
}
}, { deep: true })
// watch(() => formData.value.dwlx, (newVal, oldVal) => {
// if (newVal !== oldVal) {
// getPxgsidList()
// }
// }, { deep: true })
const selectPxgs = () => {
RefConmay.value.open()
}