更新了多个页面及组件,包括审批流程显示方式、人员选择器等。

This commit is contained in:
zmj 2024-05-29 14:42:32 +08:00
parent def0c35f4e
commit ab8a6b1911
17 changed files with 1008 additions and 371 deletions

View File

@ -57,10 +57,12 @@ const props = defineProps({
required: true
},
type: {
type: Number,
type: Number || Object,
default: null
},
extend: {
type: Object,
default: {}
}
})

View File

@ -205,6 +205,10 @@ const props = defineProps({
type: {
type: String || Number,//1: 2.
default: () => ({})
},
query: {
type: Object,
default: {}
}
})
const emits = defineEmits(['confirm'])
@ -223,7 +227,7 @@ const radionum = ref([])
//
const getlist = () => {
getAdminsByAll().then((res) => {
getAdminsByAll({ ...props.query }).then((res) => {
Object.assign(uesrlist, res)
})
}

View File

@ -1,366 +0,0 @@
<template>
<div class="edit-popup">
<el-dialog v-model="dialogVisible" title="人员选择器" width="600px" :before-close="handleClose">
<div>
<el-radio-group v-model="isCollapse" style="margin-bottom: 20px">
<el-radio-button :label="1">全部人员</el-radio-button>
<el-radio-button :label="2">按部门筛选</el-radio-button>
<el-radio-button :label="3">按岗位筛选</el-radio-button>
<el-button class="ml-[200px]" v-show="isCollapse != 1 && (!isshow || !isshow1)"
@click="(isshow = true), (isshow1 = true)">返回</el-button>
</el-radio-group>
<div v-if="type == 1">
<div v-if="isCollapse == 1" style="margin-bottom: 20px">
<div style="margin-top: 20px">
<el-radio-group v-model="radionum">
<el-radio :label="item" v-for="(item, i) in uesrlist" :key="i" style="margin-bottom: 40px;">
<div class="radio-con">
<div class="radioa">
<img :src="item.avatar" alt="" />
</div>
<div class="radiob">
<div class="radiob_a">{{ item.name }}</div>
<div class="radiob_b">
<text v-if="item.org_name.length > 0">{{ item.org_name }}</text>
<text v-if="item.dept_name.length > 0">/{{ item.dept_name }}</text>
<text v-if="item.job_name.length > 0">/{{ item.job_name }}</text>
</div>
</div>
</div>
</el-radio><br />
</el-radio-group>
</div>
</div>
<div v-if="isCollapse == 2">
<!-- 返回上一级别 -->
<div v-if="isshow">
<div class="lad" v-for="(item, i) in deparmetlist" :key="i">
<div class="lad">{{ i }}</div>
<div class="flex " v-for="(items, k) in item" style="justify-content: space-between;"
@click="deparmetclck(items)">
<div>{{ items.name }}</div>
<div class="Collapsebj">{{ items.admin_num }}</div>
</div>
</div>
</div>
<div v-else>
<el-radio-group v-model="radionum">
<el-radio :label="item" v-for="(item, i) in deparmetlist1" :key="i"
style="margin-bottom: 20px;">
<div class="radio-con">
<div class="radioa">
<img :src="item.avatar" alt="" />
</div>
<div class="radiob">
<div class="radiob_a">{{ item.name }}</div>
<div class="radiob_b">
<text v-if="item.org_name.length > 0">{{ item.org_name }}</text>
<text v-if="item.dept_name.length > 0">/{{ item.dept_name }}</text>
<text v-if="item.job_name.length > 0">/{{ item.job_name }}</text>
</div>
</div>
</div>
</el-radio><br />
</el-radio-group>
</div>
</div>
<div v-if="isCollapse == 3">
<div class="lad " v-if="isshow1">
<div class="flex " v-for="(item, j) in jobslist" :key="j"
style="justify-content: space-between;" @click="gwclck(item)">
<div>{{ item.name }}</div>
<div class="Collapsebj">{{ item.admin_num }}</div>
</div>
</div>
<div v-else>
<el-radio-group v-model="radionum">
<el-radio :label="item" v-for="(item, i) in jobslist1" :key="i"
style="margin-bottom: 20px;">
<div class="radio-con">
<div class="radioa">
<img :src="item.avatar" alt="" />
</div>
<div class="radiob">
<div class="radiob_a">{{ item.name }}</div>
<div class="radiob_b">
<text v-if="item.org_name.length > 0">{{ item.org_name }}</text>
<text v-if="item.dept_name.length > 0">/{{ item.dept_name }}</text>
<text v-if="item.job_name.length > 0">/{{ item.job_name }}</text>
</div>
</div>
</div>
</el-radio><br />
</el-radio-group>
</div>
</div>
</div>
<div v-else>
<div v-if="isCollapse == 1" style="margin-bottom: 20px">
<div style="margin-top: 20px">
<el-checkbox-group v-model="radiolist">
<el-checkbox :label="item" v-for="(item, i) in uesrlist" :key="i"
style="margin-bottom: 20px;">
<div class="radio-con">
<div class="radioa">
<img :src="item.avatar" alt="" />
</div>
<div class="radiob">
<div class="radiob_a">{{ item.name }}</div>
<div class="radiob_b">
<text v-if="item.org_name.length > 0">{{ item.org_name }}</text>
<text v-if="item.dept_name.length > 0">/{{ item.dept_name }}</text>
<text v-if="item.job_name.length > 0">/{{ item.job_name }}</text>
</div>
</div>
</div>
</el-checkbox><br />
</el-checkbox-group>
</div>
</div>
<div v-if="isCollapse == 2">
<div v-if="isshow">
<div class="lad" v-for="(item, i) in deparmetlist" :key="i">
<div class="lad">{{ i }}</div>
<div class="flex " v-for="(items, k) in item" style="justify-content: space-between;"
@click="deparmetclck(items)">
<div>{{ items.name }}</div>
<div class="Collapsebj">{{ items.admin_num }}</div>
</div>
</div>
</div>
<div v-else>
<el-checkbox-group v-model="radiolist">
<el-checkbox :label="item" v-for="(item, i) in deparmetlist1" :key="i"
style="margin-bottom: 20px;">
<div class="radio-con">
<div class="radioa">
<img :src="item.avatar" alt="" />
</div>
<div class="radiob">
<div class="radiob_a">{{ item.name }}</div>
<div class="radiob_b">
<text v-if="item.org_name.length > 0">{{ item.org_name }}</text>
<text v-if="item.dept_name.length > 0">/{{ item.dept_name }}</text>
<text v-if="item.job_name.length > 0">/{{ item.job_name }}</text>
</div>
</div>
</div>
</el-checkbox><br />
</el-checkbox-group>
</div>
</div>
<div v-if="isCollapse == 3">
<div class="lad " v-if="isshow1">
<div class="flex " v-for="(item, j) in jobslist" :key="j"
style="justify-content: space-between;" @click="gwclck(item)">
<div>{{ item.name }}</div>
<div class="Collapsebj">{{ item.admin_num }}</div>
</div>
</div>
<div v-else>
<el-checkbox-group v-model="radiolist">
<el-checkbox :label="item" v-for="(item, i) in jobslist1" :key="i"
style="margin-bottom: 20px;">
<div class="radio-con">
<div class="radioa">
<img :src="item.avatar" alt="" />
</div>
<div class="radiob">
<div class="radiob_a">{{ item.name }}</div>
<div class="radiob_b">
<text v-if="item.org_name.length > 0">{{ item.org_name }}</text>
<text v-if="item.dept_name.length > 0">/{{ item.dept_name }}</text>
<text v-if="item.job_name.length > 0">/{{ item.job_name }}</text>
</div>
</div>
</div>
</el-checkbox><br />
</el-checkbox-group>
</div>
</div>
</div>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="userclick" v-if="type == 1">确认</el-button>
<el-button type="primary" @click="userclick" v-else> {{ radiolist.length > 0 ? '已选' : '未选' }}
<text v-if="radiolist.length > 0">{{ radiolist.length }}</text></el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script lang="ts" setup name="projectPreSalesMembersEdit">
import { reactive } from 'vue'
import { getAdminsByAll, getAllDept, getAllJobs, getAdminsByDept, getAdminsByJob } from '@/api/common'
import { defineEmits } from "vue"
const leixin = ref('0')
const props = defineProps({
type: {
type: String || Number,//1: 2.
default: 1
}
})
const emits = defineEmits(['confirm'])
const dialogVisible = ref(false)
const isCollapse = ref(1);
const uesrlist = reactive([])
const deparmetlist = reactive({})
const deparmetlist1 = reactive([])
const jobslist = reactive({})
const jobslist1 = reactive([])
const isshow = ref(true);
const isshow1 = ref(true);
const radiolist = ref([])
const radionum = ref([])
//
const getlist = () => {
getAdminsByAll().then((res) => {
Object.assign(uesrlist, res)
})
}
//
const deparmet = () => {
getAllDept().then((res) => {
Object.assign(deparmetlist, res)
})
}
//
const deparmetclck = (item: { id: any }) => {
getAdminsByDept({ 'dept_id': item.id }).then((res) => {
if (res.length > 0) {
Object.assign(deparmetlist1, res)
isshow.value = false
}
})
}
//
const Jobs = () => {
getAllJobs().then((res) => {
Object.assign(jobslist, res)
})
}
//
const gwclck = (item: { id: any }) => {
getAdminsByJob({ 'job_id': item.id }).then((res) => {
if (res.length > 0) {
Object.assign(jobslist1, res)
isshow1.value = false
}
})
}
//
const open = (e: any) => {
getlist()
deparmet()
Jobs()
leixin.value = e
dialogVisible.value = true
}
//
const userclick = () => {
dialogVisible.value = false
if (props.type == 1) {
emits("confirm", radionum.value);
} else {
emits("confirm", radiolist.value);
}
}
defineExpose({
open,
userclick
})
</script>
<style lang="scss">
.userlist {
display: flex;
img {
width: 40px;
height: 40px;
border-radius: 50%;
}
text-align: center;
.userlist-con {
margin-right: 10px;
}
}
.user {
img {
width: 40px;
height: 40px;
border-radius: 50%;
}
}
.radio-con {
display: flex;
width: 500px;
align-items: center;
.radioa {
img {
margin-right: 20px;
width: 40px;
height: 40px;
border-radius: 50%;
}
}
.radiob {
.radiob_a {
margin-bottom: 10px;
margin-top: 3px;
}
.radiob_b {}
}
}
.lad {
padding: 10px 0;
border-bottom: 1px solid #f7f7f7;
div {
margin: 10px 0;
}
.Collapsebj {
background-color: #3e8ef7;
height: 20px;
width: 20px;
line-height: 20px;
text-align: center;
border-radius: 6px;
color: #f7f7f7;
}
}
</style>

View File

@ -5,8 +5,9 @@
<template #header>
审批内容
</template>
<generateForm :config="formData.data" :extend="extend" :form-data="formData.extends" :type="type">
</generateForm>
<!-- <generateForm :config="formData.data" :extend="extend" :form-data="formData.extends" :type="type"> -->
<zzjy></zzjy>
<!-- </generateForm> -->
</el-card>
<oaFlow :form-data="formData" :flow_cate="formData.id"></oaFlow>
</popup>
@ -18,6 +19,8 @@ import generateForm from './../../components/generateForm/index.vue'
import Popup from "@/components/popup/index.vue";
import { apiOaoaApproveAdd } from "@/api/oa_Initiate"
import zzjy from './form/xz/zzjy.vue'
defineProps({

View File

@ -0,0 +1,70 @@
<template>
<el-form ref="formRef" :model="formData" label-width="110px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="开始时间" prop="kssj">
<el-date-picker class="flex-1 !flex" v-model="formData.kssj" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="结束时间" prop="jssj">
<el-date-picker class="flex-1 !flex" v-model="formData.jssj" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="出差天数">
<el-input v-model="formData.qjts" clearable placeholder="请输入请假天数" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="出差事由" prop="ccsy">
<el-input v-model="formData.ccsy" clearable placeholder="请输入请假事由" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="附件">
<uploadAnnex :form-data="formData"></uploadAnnex>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script setup>
import uploadAnnex from './../../../components/uploadAnnex/index.vue'
const qjlxList = reactive(['事假', '年假', '调休假', '病假', '婚假', '产假', '陪产假', '其他'])
const formData = ref({})
const formRef = ref(null)
//
const formRules = reactive({
qjlx: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
kssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
ccsy: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
})
</script>

View File

@ -0,0 +1,70 @@
<template>
<el-form ref="formRef" :model="formData" label-width="110px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="开始时间" prop="kssj">
<el-date-picker class="flex-1 !flex" v-model="formData.kssj" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="结束时间" prop="jssj">
<el-date-picker class="flex-1 !flex" v-model="formData.jssj" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="加班天数">
<el-input v-model="formData.qjts" clearable placeholder="请输入请假天数" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="加班事由" prop="jbsy">
<el-input v-model="formData.jbsy" clearable placeholder="请输入请假事由" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="附件">
<uploadAnnex :form-data="formData"></uploadAnnex>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script setup>
import uploadAnnex from './../../../components/uploadAnnex/index.vue'
const qjlxList = reactive(['事假', '年假', '调休假', '病假', '婚假', '产假', '陪产假', '其他'])
const formData = ref({})
const formRef = ref(null)
//
const formRules = reactive({
qjlx: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
kssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jbsy: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
})
</script>

View File

@ -0,0 +1,78 @@
<template>
<el-form ref="formRef" :model="formData" label-width="110px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="请假类型" prop="qjlx">
<el-select v-model="formData.qjlx" placeholder="请选择请假类型" class="flex-1">
<el-option :label="item" :value="index" v-for="(item, index) in qjlxList" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开始时间" prop="kssj">
<el-date-picker class="flex-1 !flex" v-model="formData.kssj" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="结束时间" prop="jssj">
<el-date-picker class="flex-1 !flex" v-model="formData.jssj" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="请假天数">
<el-input v-model="formData.qjts" clearable placeholder="请输入请假天数" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="请假事由" prop="qjsy">
<el-input v-model="formData.qjsy" clearable placeholder="请输入请假事由" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="附件">
<uploadAnnex :form-data="formData"></uploadAnnex>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script setup>
import uploadAnnex from './../../../components/uploadAnnex/index.vue'
const qjlxList = reactive(['事假', '年假', '调休假', '病假', '婚假', '产假', '陪产假', '其他'])
const formData = ref({})
const formRef = ref(null)
//
const formRules = reactive({
qjlx: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
kssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
qjsy: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
})
</script>

View File

@ -0,0 +1,75 @@
<template>
<el-form ref="formRef" :model="formData" label-width="110px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="wcdd">
<el-input v-model="formData.qjts" clearable placeholder="请输入请假天数" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开始时间" prop="kssj">
<el-date-picker class="flex-1 !flex" v-model="formData.kssj" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="结束时间" prop="jssj">
<el-date-picker class="flex-1 !flex" v-model="formData.jssj" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="外出天数">
<el-input v-model="formData.qjts" clearable placeholder="请输入请假天数" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="外出事由" prop="wcsy">
<el-input v-model="formData.wcsy" clearable placeholder="请输入请假事由" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="附件">
<uploadAnnex :form-data="formData"></uploadAnnex>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script setup>
import uploadAnnex from './../../../components/uploadAnnex/index.vue'
const qjlxList = reactive(['事假', '年假', '调休假', '病假', '婚假', '产假', '陪产假', '其他'])
const formData = ref({})
const formRef = ref(null)
//
const formRules = reactive({
qjlx: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
kssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
wcsy: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
})
</script>

View File

@ -0,0 +1,92 @@
<template>
<el-form ref="formRef" :model="formData" label-width="110px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="文件名称">
<el-input v-model="formData.wjmc" clearable placeholder="请输入文件名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="紧急程度" prop="jjcd">
<el-select v-model="formData.jjcd" placeholder="请选择紧急程度" class="flex-1">
<el-option :label="item" :value="index" v-for="(item, index) in qjlxList" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="来文单位">
<el-input v-model="formData.lwdw" clearable placeholder="请输入来文单位" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="来文日期" prop="lwrq">
<el-date-picker class="flex-1 !flex" v-model="formData.lwrq" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择来文日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="文件摘要" prop="wjzy">
<el-input v-model="formData.wjzy" clearable placeholder="请输入文件摘要" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注">
<el-input v-model="formData.bz" clearable placeholder="请输入备注" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script setup>
import uploadAnnex from './../../../components/uploadAnnex/index.vue'
const qjlxList = reactive(['普通', '紧急', '特急'])
const formData = ref({})
const formRef = ref(null)
//
const formRules = reactive({
wjmc: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
lwdw: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
lwrq: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
wjzy: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
kssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jbsy: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
})
</script>

View File

@ -0,0 +1,72 @@
<template>
<el-form ref="formRef" :model="formData" label-width="110px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="会议室选择" prop="hysxz">
<el-select v-model="formData.hysxz" placeholder="请选择会议室选择" class="flex-1">
<el-option :label="item" :value="index" v-for="(item, index) in qjlxList" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开始时间" prop="kssj">
<el-date-picker class="flex-1 !flex" v-model="formData.kssj" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="结束时间" prop="jssj">
<el-date-picker class="flex-1 !flex" v-model="formData.jssj" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注">
<el-input v-model="formData.bz" clearable placeholder="请输入备注" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="附件">
<uploadAnnex :form-data="formData"></uploadAnnex>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script setup>
const qjlxList = reactive(['会议室一', '会议室二', '会议室三'])
const formData = ref({})
const formRef = ref(null)
//
const formRules = reactive({
hysxz: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
kssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jbsy: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
})
</script>

View File

@ -0,0 +1,115 @@
<template>
<el-form ref="formRef" :model="formData" label-width="110px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="故障设备名称" prop="gzsbmc">
<el-input v-model="formData.gzsbmc" clearable placeholder="请输入故障设备名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="紧急程度" prop="jjcd">
<el-select v-model="formData.jjcd" placeholder="请选择紧急程度" class="flex-1">
<el-option :label="item" :value="index" v-for="(item, index) in qjlxList" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="预计维修费用" prop="yjwxfy">
<el-input v-model="formData.yjwxfy" clearable placeholder="请输入预计维修费用" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报修日期" prop="bxrq">
<el-date-picker class="flex-1 !flex" v-model="formData.bxrq" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择报修日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="故障描述" prop="gzms">
<el-input v-model="formData.gzms" clearable placeholder="请输入故障描述" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="附件">
<uploadAnnex :form-data="formData"></uploadAnnex>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script setup>
import uploadAnnex from './../../../components/uploadAnnex/index.vue'
const qjlxList = reactive(['普通', '紧急', '特急'])
const formData = ref({})
const formRef = ref(null)
//
const formRules = reactive({
gzsbmc: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
yjwxfy: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
bxrq: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
gzms: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
lwdw: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
lwrq: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
wjzy: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
kssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jbsy: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
})
</script>

View File

@ -0,0 +1,85 @@
<template>
<el-form ref="formRef" :model="formData" label-width="110px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="开始时间" prop="kssj">
<el-date-picker class="flex-1 !flex" v-model="formData.kssj" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="结束时间" prop="jssj">
<el-date-picker class="flex-1 !flex" v-model="formData.jssj" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="用车天数">
<el-input v-model="formData.qjts" clearable placeholder="请输入请假天数" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="用车目的地">
<el-input v-model="formData.mdd" clearable placeholder="请输入用车目的地" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="用车目的地">
<el-input v-model="formData.mdd" clearable placeholder="请输入用车目的地" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="车辆选择" prop="clxz">
<el-select v-model="formData.clxz" placeholder="请选择车辆选择" class="flex-1">
<el-option :label="item" :value="index" v-for="(item, index) in qjlxList" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="用车事由" prop="ccsy">
<el-input v-model="formData.ccsy" clearable placeholder="请输入请假事由" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script setup>
const qjlxList = reactive(['事假', '年假', '调休假', '病假', '婚假', '产假', '陪产假', '其他'])
const formData = ref({})
const formRef = ref(null)
//
const formRules = reactive({
qjlx: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
kssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
ccsy: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
})
</script>

View File

@ -0,0 +1,70 @@
<template>
<el-form ref="formRef" :model="formData" label-width="110px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="车辆选择" prop="clxz">
<el-select v-model="formData.clxz" placeholder="请选择车辆选择" class="flex-1">
<el-option :label="item" :value="index" v-for="(item, index) in qjlxList" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="归还时间" prop="kssj">
<el-date-picker class="flex-1 !flex" v-model="formData.kssj" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="用车公里数">
<el-input v-model="formData.qjts" clearable placeholder="请输入用车公里数" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="用车后公里数">
<el-input v-model="formData.qjts1" clearable placeholder="请输入用车后公里数" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注">
<el-input v-model="formData.bz" clearable placeholder="请输入备注" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script setup>
const qjlxList = reactive(['事假', '年假', '调休假', '病假', '婚假', '产假', '陪产假', '其他'])
const formData = ref({})
const formRef = ref(null)
//
const formRules = reactive({
qjlx: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
kssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
ccsy: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
})
</script>

View File

@ -0,0 +1,92 @@
<template>
<el-form ref="formRef" :model="formData" label-width="110px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="用印日期" prop="kssj">
<el-date-picker class="flex-1 !flex" v-model="formData.kssj" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择用印日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="印章类型" prop="jssj">
<el-select v-model="formData.jjcd" placeholder="请选择印章类型" class="flex-1">
<el-option :label="item" :value="index" v-for="(item, index) in qjlxList" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="文件名称" prop="ycmdd">
<el-input v-model="formData.ycmdd" clearable placeholder="请输入文件名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="文件类型" prop="wjlx">
<el-select v-model="formData.wjlx" placeholder="请选择印章类型" class="flex-1">
<el-option :label="item" :value="index" v-for="(item, index) in qjlxList1" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="文件份数" prop="wjfs">
<el-input v-model="formData.wjfs" clearable placeholder="请输入文件份数" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="用印事由" prop="jbsy">
<el-input v-model="formData.jbsy" clearable placeholder="请输入用印事由" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="附件">
<uploadAnnex :form-data="formData"></uploadAnnex>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script setup>
const qjlxList = reactive(['公章', '合同章', '法人章', '其他'])
const qjlxList1 = reactive(['公告类', '规则制度类', '合同类', '资质更新类', '员工证明', '其他'])
const formData = ref({})
const formRef = ref(null)
//
const formRules = reactive({
qjlx: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
kssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jssj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jbsy: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
wjlx: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
})
</script>

View File

@ -0,0 +1,162 @@
<template>
<el-form ref="formRef" :model="formData" label-width="110px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="借用人" prop="jyr">
<el-input v-model="formData.jyr" clearable placeholder="请输入借用人" @click="userclick('jyr')" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="借用人手机" prop="jyrsj">
<el-input v-model="formData.jyrsj" clearable placeholder="请输入借用人手机" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="借用部门">
<el-select v-model="formData.jybm" placeholder="请选择" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="借用类型" prop="jjcd">
<el-select v-model="formData.jylx" placeholder="请选择借用类型" class="flex-1">
<el-option :label="item" :value="index" v-for="(item, index) in qjlxList" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="档案类型" prop="dalx">
<el-select v-model="formData.dalx" placeholder="请选择档案类型" class="flex-1">
<el-option :label="item" :value="index" v-for="(item, index) in qjlxList1" :key="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="所借档案用途" prop="sjdayt">
<el-input v-model="formData.sjdayt" clearable placeholder="请输所借档案用途" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="借用日期" prop="jyrq">
<el-date-picker class="flex-1 !flex" v-model="formData.jyrq" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择报修日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="拟归还日期" prop="nghrq">
<el-date-picker class="flex-1 !flex" v-model="formData.nghrq" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择拟归还日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="借用档案明细" prop="jydamx">
<el-input v-model="formData.jydamx" clearable placeholder="请输入借用档案明细" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注">
<el-input v-model="formData.bz" clearable placeholder="请输入备注" type="textarea" />
</el-form-item>
</el-col>
</el-row>
<div v-if="showPerDialog">
<personnelselector ref="personnel" @confirm="submituser" type="1">
</personnelselector>
</div>
</el-form>
</template>
<script setup>
import { deptLists } from "@/api/org/department";
const deptList = ref([])
const getDeptList = async () => {
const res = await deptLists()
deptList.value = res.lists
}
getDeptList()
const qjlxList = reactive(['原件', '扫描件', '复印件'])
const qjlxList1 = reactive(['公司资质', '人员资质', '离职/清退人员资质', '注册人员执业印章', '劳动合同', '社保缴费记录', '收入证明', '其他'])
const formData = reactive({})
const formRef = ref(null)
//
const formRules = reactive({
jyr: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jyrsj: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
sjdayt: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jyrq: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
nghrq: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
jydamx: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
yjwxfy: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
bxrq: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
gzms: [{
required: true,
message: '不可为空',
trigger: ['blur']
}],
})
const showPerDialog = ref(false)
const personnel = ref(null)
let value
const userclick = async (val) => {
showPerDialog.value = true
value = val
await nextTick()
personnel.value.open()
}
const submituser = (e) => {
formData[value] = e.name
formData[value + "_id"] = e.id
showPerDialog.value = false
}
</script>

View File

@ -62,6 +62,7 @@
<el-option label="人员选择器" value="3" />
<el-option label="文本域" value="4" />
<el-option label="文件上传" value="5" />
<el-option label="下拉框" value="6" />
</el-select>
</el-form-item>
</el-col>
@ -75,6 +76,13 @@
删除
</el-button>
</el-col>
<el-row v-if="item.type == 6">
<el-col :span="6">
<el-form-item label="下拉框值" v-for="(el, index) in item.select">
<el-input placeholder="下拉框值" v-model="el.name" class="w-[280px]" />
</el-form-item>
</el-col>
</el-row>
</el-row>
</el-card>
</el-form>
@ -106,6 +114,7 @@ defineProps({
});
const a = ref('')
// console.log(Pinyin.getCamelChars(""))
const emit = defineEmits(["success", "close"]);
const formRef = shallowRef<FormInstance>();
@ -214,6 +223,9 @@ const handAdd = () => {
//
const handleSubmit = async () => {
console.log(formData.data)
return
await formRef.value?.validate();
const data = { ...formData };
data.department_ids = data.department_ids.join(",");

View File

@ -27,7 +27,8 @@
</el-form-item>
</el-form>
</popup>
<personnelSelector v-if="showDiolg" ref="personnel" type="1" @confirm="submituser" />
<personnelSelector v-if="showDiolg" ref="personnel" type="1" @confirm="submituser"
:query="{ org_id: formData.org_id }" />
</div>
</template>