更新
This commit is contained in:
@ -9,15 +9,21 @@
|
||||
</div>
|
||||
<div class="cntinfo">
|
||||
<FormMessage ref="FormRef" :disabled="disabled" v-model="formData" :rules="rules" :formList="formList" :labelWidth='120'>
|
||||
<template #pxgs>
|
||||
<el-input v-model="formData.pxgs" @click="selectPxgs" readonly placeholder="请选择培训公司"></el-input>
|
||||
</template>
|
||||
<template #lzsj>
|
||||
<el-input v-model="formData.lzsj" disabled placeholder="请选择离职时间"></el-input>
|
||||
</template>
|
||||
</FormMessage>
|
||||
</div>
|
||||
<!-- 选择公司 -->
|
||||
<ChooseCompany ref="RefConmay" @change="changePxgs"></ChooseCompany>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import ChooseCompany from './chooseCompany.vue'
|
||||
import { ref, reactive, getCurrentInstance } from 'vue'
|
||||
import { qcckPost } from "@/api/qcckApi.js";
|
||||
import FormMessage from '@/components/aboutTable/FormMessage.vue'
|
||||
@ -28,7 +34,7 @@ const title = ref('新增从业人员')
|
||||
const loading = ref(false)
|
||||
const disabled = ref(false)
|
||||
const FormRef = ref(null)
|
||||
|
||||
const RefConmay = ref()
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
@ -56,6 +62,9 @@ const formList = reactive([
|
||||
{ label: "资格证截至日期", prop: "zgzJssj", type: "date" },
|
||||
{ label: "岗位", prop: "gw", type: "select", options: D_BAXX_GWLX },
|
||||
],
|
||||
[
|
||||
{ label: "培训公司", prop: "pxgs", type: "slot" },
|
||||
],
|
||||
[
|
||||
{ label: "外派单位", prop: "wpdw", type: "input" },
|
||||
],
|
||||
@ -76,10 +85,20 @@ const rules = {
|
||||
zgzKssj: [{ required: true, message: "请选择资格证起始日期", trigger: "change" }],
|
||||
zgzJssj: [{ required: true, message: "请选择资格证截至日期", trigger: "blur" }],
|
||||
whcd: [{ required: true, message: "请选择文化程度", trigger: "change" }],
|
||||
pxgs: [{ required: true, message: "请选择培训公司", trigger: "change" }],
|
||||
}
|
||||
|
||||
const formData = ref({})
|
||||
|
||||
const selectPxgs = () => {
|
||||
RefConmay.value.open()
|
||||
}
|
||||
|
||||
const changePxgs = (data) => {
|
||||
formData.value.pxgs = data.pxgs
|
||||
formData.value.pxgsid = data.pxgsid
|
||||
}
|
||||
|
||||
const close = () => {
|
||||
FormRef.value?.reset();
|
||||
formData.value = {}
|
||||
@ -89,14 +108,10 @@ const close = () => {
|
||||
const open = (row = {}, type = 'add') => {
|
||||
dialogVisible.value = true
|
||||
disabled.value = false
|
||||
|
||||
const fieldsToSplit = ['tp', 'bazzp'];
|
||||
fieldsToSplit.forEach(field => {
|
||||
row[field] = typeof row[field] === 'string'
|
||||
? row[field].split(',')
|
||||
: row[field];
|
||||
fieldsToSplit.forEach(field => {
|
||||
row[field] = typeof row[field] === 'string' ? row[field].split(',') : row[field];
|
||||
});
|
||||
|
||||
formData.value = { ...row }
|
||||
if (type === 'add') {
|
||||
title.value = '新增从业人员'
|
||||
|
||||
Reference in New Issue
Block a user