a
This commit is contained in:
@@ -299,7 +299,7 @@ import { getObj, addObjStu, putObj } from '/@/api/recruit/recruitprestudent'
|
||||
import { getList } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { getDicts } from '/@/api/admin/dict'
|
||||
import { queryAllTeacherByRecruit } from '/@/api/professional/professionaluser/teacherbase'
|
||||
import { verifyIdCardAll, verifyPhone, verifyAdmissionNumber } from '/@/utils/toolsValidate'
|
||||
import { verifyPhone, verifyAdmissionNumber } from '/@/utils/toolsValidate'
|
||||
|
||||
// Props
|
||||
const props = defineProps<{
|
||||
@@ -379,17 +379,7 @@ const dataRule = {
|
||||
}
|
||||
],
|
||||
idCard: [
|
||||
{ required: true, message: '身份证不能为空', trigger: 'blur' },
|
||||
{
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
if (value && !verifyIdCardAll(value)) {
|
||||
callback(new Error('请输入正确的身份证号码'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
{ required: true, message: '身份证不能为空', trigger: 'blur' }
|
||||
],
|
||||
admission: [
|
||||
{ required: true, message: '准考证不能为空', trigger: 'blur' },
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable :disabled="!dataForm.id ? false : true"
|
||||
<el-select v-model="dataForm.groupId" filterable :disabled="dataForm.id"
|
||||
placeholder="请选择招生计划" class="w-full">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
@@ -50,7 +50,8 @@
|
||||
v-model="dataForm.idNumber"
|
||||
placeholder="身份证号"
|
||||
maxlength="20"
|
||||
v-input-filter="'idcard'">
|
||||
v-input-filter="'idcard'"
|
||||
:disabled="!isEdit">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -644,8 +645,8 @@
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit('0')" v-auth="'recruit_recruitstudentsignup_add'" v-if="canSubmit&&!dataForm.id">保存并送审</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit('0')" v-auth="'recruit_recruitstudentsignup_edit'" v-if="canSubmit&&dataForm.id">保存</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit('20')" v-auth="'signup_info_exam'" v-if="canSubmit&&dataForm.id">确认录取</el-button>
|
||||
<el-button type="danger" plain @click="dataFormSubmit('-20')" v-auth="'signup_info_exam'" v-if="canSubmit&&dataForm.id">驳回录取</el-button>
|
||||
<el-button type="success" icon="CircleCheck" @click="dataFormSubmit('20')" v-auth="'signup_info_exam'" v-if="canSubmit&&dataForm.id">确认录取</el-button>
|
||||
<el-button type="danger" icon="CircleClose" @click="dataFormSubmit('-20')" v-auth="'signup_info_exam'" v-if="canSubmit&&dataForm.id">驳回录取</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -666,7 +667,7 @@ import { areaList, areaSonList } from "/@/api/recruit/recruitstudentschool"
|
||||
import { list as scoreList } from "/@/api/recruit/recruitstudentplancorrectscoreconfig"
|
||||
import { queryAllTeacher } from "/@/api/professional/professionaluser/teacherbase"
|
||||
import { getNationalList } from "/@/api/basic/basicnation"
|
||||
import { verifyIdCardAll, verifyAdmissionNumber, verifyPhone } from '/@/utils/toolsValidate'
|
||||
import { verifyAdmissionNumber, verifyPhone } from '/@/utils/toolsValidate'
|
||||
import { AUDIT_STATUS_LIST, getStatusConfig } from '/@/config/global'
|
||||
|
||||
const message = useMessage()
|
||||
@@ -838,17 +839,7 @@ const dataRule = reactive({
|
||||
{required: true, message: '证件类型不能为空', trigger: 'change'}
|
||||
],
|
||||
idNumber: [
|
||||
{required: true, message: '身份证不能为空', trigger: 'change'},
|
||||
{
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
if (value && !verifyIdCardAll(value)) {
|
||||
callback(new Error('请输入正确的身份证号码'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
{required: true, message: '身份证不能为空', trigger: 'change'}
|
||||
],
|
||||
examRegistrationNumbers: [
|
||||
{required: true, message: '准考证号不能为空', trigger: 'change'},
|
||||
@@ -863,6 +854,10 @@ const dataRule = reactive({
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
score: [] as any[],
|
||||
fullScore: [] as any[],
|
||||
jsOtherCity: [] as any[],
|
||||
otherProvince: [] as any[],
|
||||
residenceProvince: [
|
||||
{required: true, message: '户口所在地不能为空', trigger: 'change'}
|
||||
],
|
||||
@@ -915,7 +910,7 @@ const dataRule = reactive({
|
||||
})
|
||||
|
||||
// 初始化
|
||||
const init = (id: string | null, typeParam: number) => {
|
||||
const init = (id: string | null, typeParam: number, groupId?: string) => {
|
||||
dataForm.id = id || null
|
||||
type.value = typeParam
|
||||
isEdit.value = typeParam == 1 ? true : false
|
||||
@@ -925,6 +920,10 @@ const init = (id: string | null, typeParam: number) => {
|
||||
isShow.value = true
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields()
|
||||
// 新增时,如果传入了 groupId,设置到表单中
|
||||
if (!id && groupId) {
|
||||
dataForm.groupId = groupId
|
||||
}
|
||||
// 初始化地区数据
|
||||
areaProvinceList.value = []
|
||||
areaCityList.value = []
|
||||
@@ -1340,18 +1339,8 @@ const dataFormSubmit = (state: string) => {
|
||||
submitTitle = "确认保存并提交该学生的报名信息么?"
|
||||
} else {
|
||||
// 编辑模式
|
||||
if(state){
|
||||
if (state == "-20") {
|
||||
submitTitle = "确认驳回该学生的报名申请么?"
|
||||
} else {
|
||||
if (!dataForm.confirmedMajor) {
|
||||
ElNotification.error({
|
||||
title: '错误',
|
||||
message: '请选择录取专业'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1017,7 +1017,7 @@ const handleFilter = () => {
|
||||
|
||||
// 获取数据列表
|
||||
const handleAddData = ()=>{
|
||||
addOrUpdateRef.value?.init(null, 1)
|
||||
addOrUpdateRef.value?.init(null, 1, dataForm.groupId)
|
||||
}
|
||||
|
||||
// 新增 / 修改
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
<template>
|
||||
<el-dialog v-model="visible" width="60%" :title="`面试审核(${row.name})`">
|
||||
<el-row>
|
||||
<el-radio v-model="status" label="1">通过</el-radio>
|
||||
<el-radio v-model="status" label="-1">未通过</el-radio>
|
||||
</el-row>
|
||||
<el-row v-if="status == '-1'">
|
||||
<br />
|
||||
<el-input type="textarea" v-model="reason" placeholder="请输入未通过的原因"></el-input>
|
||||
</el-row>
|
||||
<el-dialog v-model="visible" width="600" :title="`面试审核(${row.name})`">
|
||||
<el-form ref="dataFormRef" :model="dataForm" :rules="dataRule" label-width="120px">
|
||||
<el-form-item label="面试结果" prop="interview">
|
||||
<el-radio-group v-model="dataForm.interview" @change="handleInterviewChange">
|
||||
<el-radio :label="item.value" v-for="item in interviewDicList" :key="item.value">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="未通过原因" prop="interviewReason" v-if="dataForm.interview == '-1'">
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="dataForm.interviewReason"
|
||||
placeholder="请输入未通过的原因"
|
||||
:rows="4">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@@ -19,12 +26,13 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { ref, reactive, nextTick } from 'vue'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
// @ts-ignore
|
||||
import global from "@/components/tools/commondict.vue"
|
||||
import { interview } from "@/api/recruit/recruitstudentsignup"
|
||||
import { interview } from "/@/api/recruit/recruitstudentsignup"
|
||||
import { INTERVIEW_DIC_LIST } from '/@/config/global'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
|
||||
const interviewDicList = INTERVIEW_DIC_LIST.filter((item) => item.value != '0')
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
|
||||
@@ -36,31 +44,60 @@ const emit = defineEmits<{
|
||||
// 响应式数据
|
||||
const visible = ref(false)
|
||||
const row = reactive<any>({})
|
||||
const status = ref('1')
|
||||
const reason = ref('')
|
||||
const dataFormRef = ref<FormInstance>()
|
||||
const dataForm = reactive({
|
||||
interview: '1',
|
||||
interviewReason: ''
|
||||
})
|
||||
|
||||
// 表单验证规则
|
||||
const dataRule = reactive({
|
||||
interview: [
|
||||
{ required: true, message: '请选择面试结果', trigger: 'change' }
|
||||
],
|
||||
interviewReason: [] as any[]
|
||||
})
|
||||
|
||||
// 初始化
|
||||
const init = (rowData: any) => {
|
||||
visible.value = true
|
||||
Object.assign(row, rowData)
|
||||
status.value = rowData.interview || '1'
|
||||
reason.value = rowData.interviewReason || ''
|
||||
dataForm.interview = rowData.interview || '1'
|
||||
dataForm.interviewReason = rowData.interviewReason || ''
|
||||
// 重置表单验证状态
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.clearValidate()
|
||||
})
|
||||
}
|
||||
|
||||
// 面试结果改变
|
||||
const handleInterviewChange = () => {
|
||||
dataForm.interviewReason = ''
|
||||
if(dataForm.interview == '-1'){
|
||||
dataRule.interviewReason = [
|
||||
{ required: true, message: '请输入未通过的原因', trigger: 'blur' }
|
||||
]
|
||||
} else {
|
||||
dataRule.interviewReason = []
|
||||
}
|
||||
}
|
||||
|
||||
// 确认
|
||||
const confirm = () => {
|
||||
if (!status.value || (status.value == '-1' && !reason.value)) {
|
||||
message.warning('请选择通过还是未通过,未通过请输入原因')
|
||||
dataFormRef.value?.validate((valid: boolean) => {
|
||||
if (!valid) {
|
||||
return
|
||||
} else {
|
||||
interview({ "id": row.id, "interview": status.value, "interviewReason": reason.value }).then(() => {
|
||||
}
|
||||
interview({
|
||||
"id": row.id,
|
||||
"interview": dataForm.interview,
|
||||
"interviewReason": dataForm.interviewReason
|
||||
}).then(() => {
|
||||
message.success('操作成功')
|
||||
visible.value = false
|
||||
emit('refresh')
|
||||
}).catch(() => {
|
||||
message.error('操作失败')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 暴露方法给父组件
|
||||
@@ -70,7 +107,5 @@ defineExpose({
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="总费用" prop="allMoney">
|
||||
<span style="color: red">{{ dataForm.feeTuition + dataForm.feeAgency }}</span>
|
||||
<span style="color: red">{{ Number(dataForm.feeTuition) + Number(dataForm.feeAgency) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
Reference in New Issue
Block a user