优化审批流程及附件上传功能,提升用户体验与操作效率。
This commit is contained in:
parent
ad193495f6
commit
200ce13ac4
@ -4,7 +4,7 @@
|
||||
<el-form ref="formRef" :model="formData" label-width="100px" :rules="formRules">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审批流程">
|
||||
<el-form-item label="审批流程" prop="flow_id">
|
||||
<el-select v-model="formData.flow_id" placeholder="选择审批流程" class="flex-1" @change="flowChnage">
|
||||
<el-option :label="item.name" :value="item.id" v-for="item in flowList">
|
||||
</el-option>
|
||||
@ -14,7 +14,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12" v-if="checkType == 2">
|
||||
<el-form-item label="审核人" prop="name">
|
||||
<el-form-item label="审核人" prop="check_admin_names">
|
||||
<el-input v-model="formData.check_admin_names" clearable placeholder="点击选择审核人" readonly
|
||||
@click="userclick(1)" />
|
||||
</el-form-item>
|
||||
@ -61,6 +61,21 @@ const props = defineProps({
|
||||
|
||||
});
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive({
|
||||
flow_id: [{
|
||||
required: true,
|
||||
message: '不可为空',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
check_admin_names: [{
|
||||
required: true,
|
||||
message: '不可为空',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
})
|
||||
|
||||
|
||||
const showPerDialog = ref(false);
|
||||
const personnel = ref(null);
|
||||
const perType = ref(2); //人员选择器1为单选2为多选
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="付款金额" prop="jkje">
|
||||
<el-input v-model="formData.wjmc" clearable placeholder="请输入借款金额" />
|
||||
<el-input v-model="formData.wjmc" clearable placeholder="请输入付款金额" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -41,7 +41,7 @@
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="付款事由" prop="bz">
|
||||
<el-input v-model="formData.bz" clearable placeholder="请输入借款事由" type="textarea" />
|
||||
<el-input v-model="formData.bz" clearable placeholder="请输入付款事由" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
@ -58,7 +58,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
let list = ['jkje', 'jjlx', 'jyr', 'yhzh', 'khh', "bz"]
|
||||
let list = ['wjmc', 'jkje', 'jjlx', 'jyr', 'yhzh', 'khh', "bz"]
|
||||
|
||||
const qjlxList = reactive(['差旅费', '办公费', '招待费', '交通费', '通讯费', '采购付款', '其他'])
|
||||
let props = defineProps({
|
||||
|
@ -17,12 +17,12 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出差天数">
|
||||
<el-input v-model="formData.qjts" clearable placeholder="请输入请假天数" />
|
||||
<el-input v-model="formData.qjts" clearable readonly 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-input v-model="formData.ccsy" clearable placeholder="请输入出差事由" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
|
@ -17,12 +17,12 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="加班天数">
|
||||
<el-input v-model="formData.qjts" clearable placeholder="请输入请假天数" />
|
||||
<el-input v-model="formData.qjts" clearable placeholder="系统自动计算" readonly />
|
||||
</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-input v-model="formData.jbsy" clearable placeholder="请输入加班事由" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
|
@ -22,12 +22,12 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="外出天数">
|
||||
<el-input v-model="formData.qjts" clearable placeholder="请输入请假天数" />
|
||||
<el-input v-model="formData.qjts" clearable readonly 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-input v-model="formData.wcsy" clearable placeholder="请输入外出事由" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="员工姓名" prop="jyr">
|
||||
<el-input v-model="formData.jyr" clearable placeholder="请输入借用人" @click="userclick('jyr')" />
|
||||
<el-input v-model="formData.jyr" clearable placeholder="请输入员工姓名" @click="userclick('jyr')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="员工姓名" prop="jyr">
|
||||
<el-input v-model="formData.jyr" clearable placeholder="请输入借用人" @click="userclick('jyr')" />
|
||||
<el-input v-model="formData.jyr" clearable placeholder="请输入员工姓名" @click="userclick('jyr')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -15,7 +15,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="手机号码" prop="wjmc">
|
||||
<el-input v-model="formData.wjmc" clearable placeholder="请输入借款金额" />
|
||||
<el-input v-model="formData.wjmc" clearable placeholder="请输入手机号码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<el-form ref="formRef" :model="formData" label-width="110px" :rules="formRules">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px" :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-input v-model="formData.jyr" clearable placeholder="请输入员工姓名" @click="userclick('jyr')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -31,7 +31,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="转岗后所在部门" prop="rzbm">
|
||||
<el-select v-model="formData.rzbm1" placeholder="请选择入职部门" class="flex-1">
|
||||
<el-select v-model="formData.rzbm1" placeholder="请选择转岗后所在部门" class="flex-1">
|
||||
<el-option :label="item.name" :value="item.name" v-for="item in deptList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -39,7 +39,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="转刚后职务" prop="drzw">
|
||||
<el-select v-model="formData.drzw1" placeholder="请选择担任职务" class="flex-1">
|
||||
<el-select v-model="formData.drzw1" placeholder="请选择转刚后职务" class="flex-1">
|
||||
<el-option :label="item.name" :value="item.name" v-for="item in zwlist">
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -50,20 +50,20 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="申请转岗日期" prop="lwrq1">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.lwrq1" clearable type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择申请离职日期">
|
||||
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="lwrq2">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.lwrq2" clearable type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择预计离职日期">
|
||||
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="bz1">
|
||||
<el-input v-model="formData.bz1" clearable placeholder="请输入离职原因" type="textarea" />
|
||||
<el-input v-model="formData.bz1" clearable placeholder="请输入转岗原因" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="招聘部门" prop="rzbm">
|
||||
<el-select v-model="formData.rzbm" placeholder="请选择入职部门" class="flex-1">
|
||||
<el-select v-model="formData.rzbm" placeholder="请选择招聘部门" class="flex-1">
|
||||
<el-option :label="item.name" :value="item.name" v-for="item in deptList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="员工姓名" prop="jyr">
|
||||
<el-input v-model="formData.jyr" clearable placeholder="请输入借用人" @click="userclick('jyr')" />
|
||||
<el-input v-model="formData.jyr" clearable placeholder="请输入员工姓名" @click="userclick('jyr')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -31,7 +31,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="试用期评价">
|
||||
<el-input v-model="formData.bz1" clearable placeholder="请输入备注" type="textarea" />
|
||||
<el-input v-model="formData.bz1" clearable placeholder="请输入试用期评价" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
|
@ -2,7 +2,7 @@
|
||||
<el-form ref="formRef" :model="formData" label-width="110px" :rules="formRules">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="文件名称">
|
||||
<el-form-item label="文件名称" prop="wjmc">
|
||||
<el-input v-model="formData.wjmc" clearable placeholder="请输入文件名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -70,8 +70,6 @@ const formRules = reactive({
|
||||
message: '不可为空',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
|
||||
|
||||
kssj: [{
|
||||
required: true,
|
||||
message: '不可为空',
|
||||
@ -82,7 +80,7 @@ const formRules = reactive({
|
||||
message: '不可为空',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
jbsy: [{
|
||||
jjcd: [{
|
||||
required: true,
|
||||
message: '不可为空',
|
||||
trigger: ['blur']
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="会议室选择" prop="hysxz">
|
||||
<el-select v-model="formData.hysxz" placeholder="请选择会议室选择" class="flex-1">
|
||||
<el-select v-model="formData.hysxz" placeholder="请选择会议室" class="flex-1">
|
||||
<el-option :label="item" :value="item" v-for="(item, index) in qjlxList" :key="index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
@ -4,29 +4,27 @@
|
||||
<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="请选择开始时间">
|
||||
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" @change="calcDay">
|
||||
</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="请选择结束时间">
|
||||
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" @change="calcDay">
|
||||
</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-input v-model="formData.qjts" clearable placeholder="系统自动计算" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="用车目的地">
|
||||
<el-form-item label="用车目的地" prop="mdd">
|
||||
<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">
|
||||
@ -38,7 +36,7 @@
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="用车事由" prop="ccsy">
|
||||
<el-input v-model="formData.ccsy" clearable placeholder="请输入请假事由" type="textarea" />
|
||||
<el-input v-model="formData.ccsy" clearable placeholder="请输入用车事由" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -60,6 +58,16 @@ apiOaCarCateLists().then(res => {
|
||||
})
|
||||
|
||||
|
||||
const calcDay = () => {
|
||||
const date1 = props.formData.kssj;
|
||||
const date2 = props.formData?.jssj;
|
||||
if (date1 && date2) {
|
||||
const timeDiff = new Date(date2).getTime() - new Date(date1).getTime();
|
||||
const daysDiff = Math.ceil(timeDiff / (1000 * 3600 * 24));
|
||||
props.formData.qjts = daysDiff || 0
|
||||
}
|
||||
}
|
||||
|
||||
const checkDate = (rule: any, value: any, callback: any) => {
|
||||
if (new Date(props.formData.jssj) < new Date(props.formData.kssj)) {
|
||||
callback(new Error('结束时间不能早于开始时间'))
|
||||
@ -95,6 +103,18 @@ const formRules = reactive({
|
||||
message: '不可为空',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
mdd: [{
|
||||
required: true,
|
||||
message: '不可为空',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
clxz: [{
|
||||
required: true,
|
||||
message: '不可为空',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
|
||||
|
||||
})
|
||||
|
||||
const check = async () => {
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="车辆选择" prop="clxz">
|
||||
<el-select v-model="formData.clxz" placeholder="请选择车辆选择" class="flex-1">
|
||||
<el-select v-model="formData.clxz" placeholder="请选择车辆" class="flex-1">
|
||||
<el-option :label="item.name" :value="item.name" v-for="(item, index) in carLists" :key="index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -65,7 +65,7 @@ const formRules = reactive({
|
||||
message: '不可为空',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
ccsy: [{
|
||||
clxz: [{
|
||||
required: true,
|
||||
message: '不可为空',
|
||||
trigger: ['blur']
|
||||
|
@ -37,7 +37,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所借档案用途" prop="sjdayt">
|
||||
<el-input v-model="formData.sjdayt" clearable placeholder="请输所借档案用途" type="textarea" />
|
||||
<el-input v-model="formData.sjdayt" clearable placeholder="请输入所借档案用途" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
Loading…
x
Reference in New Issue
Block a user