This commit is contained in:
zmj 2024-05-29 19:10:20 +08:00
parent ebb2746b7a
commit 11c2cfbb3b
26 changed files with 215 additions and 33 deletions

View File

@ -3,12 +3,23 @@
<popup ref="popupRef" :showFootBtn="false" title="审批详情" :async="true" width="60vw"> <popup ref="popupRef" :showFootBtn="false" title="审批详情" :async="true" width="60vw">
<el-card> <el-card>
<template #header>审批内容</template> <template #header>审批内容</template>
<el-descriptions :column="3" border> <el-descriptions :column="3" border>
<el-descriptions-item v-for="item in formData.extends" :label="item.label" label-align="left" <el-descriptions-item v-for="item in formData.extends" :label="item.label" label-align="left"
align="left"> align="left">
{{ item.text || item.value }} {{ item.text || item.value }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<el-card> <el-card>
<template #header>审批流程</template> <template #header>审批流程</template>

View File

@ -5,35 +5,28 @@
<template #header> <template #header>
审批内容 审批内容
</template> </template>
<qj v-if="type == '请假'"></qj> <qj ref="forms" v-if="type == '请假'"></qj>
<cc v-if="type == '出差'"></cc> <cc ref="forms" v-if="type == '出差'"></cc>
<wc v-if="type == '外出'"></wc> <wc ref="forms" v-if="type == '外出'"></wc>
<jb v-if="type == '加班'"></jb> <jb ref="forms" v-if="type == '加班'"></jb>
<hysyd v-if="type == '会议室预定'"></hysyd> <hysyd ref="forms" v-if="type == '会议室预定'"></hysyd>
<gwlz v-if="type == '公文流转'"></gwlz> <gwlz ref="forms" v-if="type == '公文流转'"></gwlz>
<wpwx v-if="type == '物品维修'"></wpwx> <wpwx ref="forms" v-if="type == '物品维修'"></wpwx>
<zzjy v-if="type == '资质借用'"></zzjy> <zzjy ref="forms" v-if="type == '资质借用'"></zzjy>
<yz v-if="type == '用章'"></yz> <yz ref="forms" v-if="type == '用章'"></yz>
<yc v-if="type == '用车'"></yc> <yc ref="forms" v-if="type == '用车'"></yc>
<ycgh v-if="type == '用车归还'"></ycgh> <ycgh ref="forms" v-if="type == '用车归还'"></ycgh>
<jk v-if="type == '借款'"></jk> <jk ref="forms" v-if="type == '借款'"></jk>
<fk v-if="type == '付款'"></fk> <fk ref="forms" v-if="type == '付款'"></fk>
<jl v-if="type == '奖励'"></jl> <jl ref="forms" v-if="type == '奖励'"></jl>
<cg v-if="type == '采购'"></cg> <cg ref="forms" v-if="type == '采购'"></cg>
<hdjf v-if="type == '活动经费'"></hdjf> <hdjf ref="forms" v-if="type == '活动经费'"></hdjf>
<rz v-if="type == '入职'"></rz> <rz ref="forms" v-if="type == '入职'"></rz>
<zz v-if="type == '转正'"></zz> <zz ref="forms" v-if="type == '转正'"></zz>
<lz v-if="type == '离职'"></lz> <lz ref="forms" v-if="type == '离职'"></lz>
<zg v-if="type == '转岗'"></zg> <zg ref="forms" v-if="type == '转岗'"></zg>
<zpxq v-if="type == '招聘需求'"></zpxq> <zpxq ref="forms" v-if="type == '招聘需求'"></zpxq>
<tysp v-if="type == '通用审批'"></tysp> <tysp ref="forms" v-if="type == '通用审批'"></tysp>
</el-card> </el-card>
@ -60,7 +53,6 @@ import ycgh from './form/xz/ycgh.vue'
import jk from './form/cw/jk.vue' import jk from './form/cw/jk.vue'
import fk from './form/cw/fk.vue' import fk from './form/cw/fk.vue'
import jl from './form/cw/jl.vue' import jl from './form/cw/jl.vue'
import cg from './form/cw/cg.vue' import cg from './form/cw/cg.vue'
import hdjf from './form/cw/hdjf.vue' import hdjf from './form/cw/hdjf.vue'
import rz from './form/rs/rz.vue' import rz from './form/rs/rz.vue'
@ -79,9 +71,10 @@ let props = defineProps({
}) })
console.log(qja, 'qja')
const forms = ref('')
const emit = defineEmits(["success", "close"]); const emit = defineEmits(["success", "close"]);
const formRef = shallowRef<FormInstance>(); const formRef = shallowRef<FormInstance>();
const popupRef = shallowRef<InstanceType<typeof Popup>>(); const popupRef = shallowRef<InstanceType<typeof Popup>>();
@ -128,11 +121,13 @@ const setExtend = async (data: Record<any, any>) => {
// //
const handleSubmit = async () => { const handleSubmit = async () => {
await formRef.value?.validate(); await forms.value?.check();
const data = { ...formData }; const data = { ...formData };
await apiOaoaApproveAdd(data) await apiOaoaApproveAdd(data)
popupRef.value?.close(); popupRef.value?.close();
emit("success"); emit("success");
}; };
// //

View File

@ -88,5 +88,12 @@ const formRules = reactive({
}], }],
}) })
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -89,6 +89,13 @@ setRules()
const showPerDialog = ref(false) const showPerDialog = ref(false)
const personnel = ref(null) const personnel = ref(null)
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -100,4 +100,12 @@ const formRules = reactive({
}) })
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -97,4 +97,13 @@ const submituser = (e) => {
formData[value + "_id"] = e.id formData[value + "_id"] = e.id
showPerDialog.value = false showPerDialog.value = false
} }
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -67,6 +67,13 @@ const formRules = reactive({
trigger: ['blur'] trigger: ['blur']
}], }],
}) })
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -89,5 +89,12 @@ const calcDay = () => {
formData.qjts = daysDiff || 0 formData.qjts = daysDiff || 0
} }
} }
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -91,4 +91,12 @@ const calcDay = () => {
} }
} }
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -4,7 +4,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="请假类型" prop="qjlx"> <el-form-item label="请假类型" prop="qjlx">
<el-select v-model="formData.qjlx" placeholder="请选择请假类型" class="flex-1"> <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 :label="item" :value="item" v-for="(item, index) in qjlxList" :key="index">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -97,8 +97,14 @@ const calcDay = () => {
} }
} }
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -0,0 +1,5 @@
const qja = {
name: "sdasd"
}
export default qja

View File

@ -93,5 +93,13 @@ const calcDay = () => {
formData.qjts = daysDiff || 0 formData.qjts = daysDiff || 0
} }
} }
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -62,5 +62,12 @@ setRules()
const showPerDialog = ref(false) const showPerDialog = ref(false)
const personnel = ref(null) const personnel = ref(null)
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -125,4 +125,13 @@ const submituser = (e) => {
formData[value + "_id"] = e.id formData[value + "_id"] = e.id
showPerDialog.value = false showPerDialog.value = false
} }
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -118,4 +118,13 @@ const submituser = (e) => {
formData[value + "_id"] = e.id formData[value + "_id"] = e.id
showPerDialog.value = false showPerDialog.value = false
} }
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -142,4 +142,13 @@ const submituser = (e) => {
formData[value + "_id"] = e.id formData[value + "_id"] = e.id
showPerDialog.value = false showPerDialog.value = false
} }
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -122,4 +122,13 @@ const submituser = (e) => {
formData[value + "_id"] = e.id formData[value + "_id"] = e.id
showPerDialog.value = false showPerDialog.value = false
} }
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -110,4 +110,13 @@ const submituser = (e) => {
formData[value + "_id"] = e.id formData[value + "_id"] = e.id
showPerDialog.value = false showPerDialog.value = false
} }
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -86,6 +86,13 @@ const formRules = reactive({
trigger: ['blur'] trigger: ['blur']
}], }],
}) })
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -85,6 +85,13 @@ const formRules = reactive({
}) })
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -110,5 +110,13 @@ const formRules = reactive({
}], }],
}) })
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -100,6 +100,13 @@ const formRules = reactive({
}], }],
}) })
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -70,5 +70,12 @@ const formRules = reactive({
}], }],
}) })
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -89,6 +89,13 @@ const formRules = reactive({
}) })
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -185,4 +185,12 @@ const submituser = (e) => {
showPerDialog.value = false showPerDialog.value = false
} }
const check = async () => {
await formRef.value?.validate();
}
defineExpose({
check
});
</script> </script>

View File

@ -68,6 +68,7 @@ import { apiOaFlowTypeLists, apiOaoaApproveLists, apiOaoaApproveDetail } from "@
import EditPopup from './edit.vue' import EditPopup from './edit.vue'
import detailPopup from './detail.vue' import detailPopup from './detail.vue'
import { apiOaFlowTypeDetail } from '@/api/oa_flow_type' import { apiOaFlowTypeDetail } from '@/api/oa_flow_type'
import qja from './form/jq/qja.js'
const editRef = shallowRef<InstanceType<typeof EditPopup>>() const editRef = shallowRef<InstanceType<typeof EditPopup>>()