From 0ac87d8fc643cb3ba6548ca203cff7068203f02c Mon Sep 17 00:00:00 2001
From: guochunsi <1595020186@qq.com>
Date: Thu, 22 Jan 2026 13:51:26 +0800
Subject: [PATCH 01/14] a
---
.../recruitstudentsignup/detaiform.vue | 163 ++++++++----------
1 file changed, 72 insertions(+), 91 deletions(-)
diff --git a/src/views/recruit/recruitstudentsignup/detaiform.vue b/src/views/recruit/recruitstudentsignup/detaiform.vue
index 007379f..4192985 100644
--- a/src/views/recruit/recruitstudentsignup/detaiform.vue
+++ b/src/views/recruit/recruitstudentsignup/detaiform.vue
@@ -649,10 +649,6 @@
-
-
-
-
@@ -662,7 +658,6 @@ import { ElNotification } from 'element-plus'
import { Picture } from '@element-plus/icons-vue'
import { useMessage, useMessageBox } from '/@/hooks/message'
import { getObj, putObj, addObj ,makeCorrectScore} from '/@/api/recruit/recruitstudentsignup'
-import { list as listByGroupId } from '/@/api/recruit/recruitstudentschool'
import { getList } from "/@/api/recruit/recruitstudentplangroup"
import { listByEdu } from "/@/api/recruit/recruitstudentplan"
import { getDictsByTypes } from "/@/api/admin/dict"
@@ -671,7 +666,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 } from '/@/utils/toolsValidate'
+import { verifyIdCardAll, verifyAdmissionNumber, verifyPhone } from '/@/utils/toolsValidate'
import { AUDIT_STATUS_LIST, getStatusConfig } from '/@/config/global'
const message = useMessage()
@@ -692,7 +687,6 @@ const title = ref("")
const { yes_no_type, sexy, color_discrimination } = useDict('yes_no_type', 'sexy', 'color_discrimination')
const eduList = ref([])
-const imgList = ref([])
const type = ref(null)
const isShow = ref(false)
const isEdit = ref(false)
@@ -712,7 +706,6 @@ const areaAreaList = ref([])
const areaHomeProvinceList = ref([])
const areaHomeCityList = ref([])
const areaHomeAreaList = ref([])
-const dialogUploadVisible = ref(false)
const sevenMajorList = ref([])
const sixMajorList = ref([])
const fiveMajorList = ref([])
@@ -801,7 +794,7 @@ const dataForm = reactive({
householdPicList: [] as string[]
})
-const dataRule = {
+const dataRule = reactive({
groupId: [
{required: true, message: '招生计划不能为空', trigger: 'change'}
],
@@ -870,9 +863,6 @@ const dataRule = {
trigger: 'blur'
}
],
- otherProvince: [
- {required: true, message: '外省不能为空', trigger: 'change'}
- ],
residenceProvince: [
{required: true, message: '户口所在地不能为空', trigger: 'change'}
],
@@ -900,24 +890,19 @@ const dataRule = {
parentName: [
{required: true, message: '家长姓名不能为空', trigger: 'change'}
],
- parentTel_1: [
- {required: true, message: '家长手机不能为空', trigger: 'change'}
- ],
- // wishMajorOne: [
- // {
- // validator: (rule: any, value: any, callback: any) => {
- // // 新增时不需要验证,修改时需要验证
- // if (!dataForm.id) {
- // callback()
- // } else if (!value) {
- // callback(new Error('拟报专业不能为空'))
- // } else {
- // callback()
- // }
- // },
- // trigger: 'change'
- // }
- // ],
+ parentTelOne: [
+ {required: true, message: '家长手机不能为空', trigger: 'change'},
+ {
+ validator: (rule: any, value: any, callback: any) => {
+ if (value && !verifyPhone(value)) {
+ callback(new Error('请输入正确的手机号码'))
+ } else {
+ callback()
+ }
+ },
+ trigger: 'blur'
+ }
+ ],
contactName: [
{required: true, message: '联系人不能为空', trigger: 'change'}
],
@@ -926,8 +911,8 @@ const dataRule = {
],
correctedScore:[
{required: true, message: '折算分不能为空', trigger: 'change'}
- ]
-}
+ ]
+})
// 初始化
const init = (id: string | null, typeParam: number) => {
@@ -1136,12 +1121,6 @@ const changeEducation = () => {
loadMajorListAndGroup()
}
-const handlePicCardPreview = (file: string) => {
- const array = file.split(",")
- imgList.value = array
- dialogUploadVisible.value = true
-}
-
const initData = () => {
// 联系人(教职工)
queryAllTeacher().then((res: any) => {
@@ -1356,7 +1335,6 @@ const updateTuitionByMajorAndEducation = () => {
const dataFormSubmit = (state: string) => {
dataForm.auditStatus = state
let submitTitle = "确认通过该学生的报名申请么?"
-
// 新增模式
if (!dataForm.id) {
submitTitle = "确认保存并提交该学生的报名信息么?"
@@ -1377,62 +1355,65 @@ const dataFormSubmit = (state: string) => {
}
}
- if (dataForm.degreeOfEducation == '1' && (dataForm.score == undefined || dataForm.score == '')) {
- ElNotification.error({
- title: '错误',
- message: '初中生报名请填写成绩'
- })
- return
- }
- if (dataForm.degreeOfEducation == '1' && dataForm.schoolArea == '3' && (dataForm.fullScore == undefined || dataForm.fullScore == '')) {
- ElNotification.error({
- title: '错误',
- message: '外地初中生报名请填写当地总分'
- })
- return
- }
- if (dataForm.degreeOfEducation == '1' && dataForm.schoolArea == '2' && (dataForm.schoolArea == undefined || dataForm.jsOtherCity == undefined) && state == 20) {
- ElNotification.error({
- title: '错误',
- message: '初中生审核请选择学校归属地和所在省市'
- })
- return
- }
- if (dataForm.degreeOfEducation == '1' && dataForm.schoolArea == '3' && (dataForm.schoolArea == undefined || dataForm.otherProvince == undefined) && state == 20) {
- ElNotification.error({
- title: '错误',
- message: '初中生审核请选择学校归属地和所在省市'
- })
- return
+ // 清空相关验证规则
+ dataRule.score = []
+ dataRule.fullScore = []
+ dataRule.jsOtherCity = []
+ dataRule.otherProvince = []
+ if (dataForm.degreeOfEducation == '1') {
+ dataRule.score = [
+ {required: true, message: '初中生报名请填写成绩', trigger: 'change'}
+ ]
+ if(dataForm.schoolArea){
+ if(dataForm.schoolArea == '3'){
+ // 外省外市
+ dataRule.fullScore = [
+ {required: true, message: '外地初中生报名请填写当地总分', trigger: 'change'}
+ ]
+ dataRule.otherProvince = [
+ {required: true, message: '初中生请选择学校归属地和所在省市', trigger: 'change'}
+ ]
+ }
+ if(dataForm.schoolArea == '2'){
+ // 本省外市
+ dataRule.jsOtherCity = [
+ {required: true, message: '初中生请选择学校归属地和所在省市', trigger: 'change'}
+ ]
+ }
+ }
}
- messageBox.confirm(submitTitle).then(() => {
- dataFormRef.value?.validate((valid: boolean) => {
- if (valid) {
- canSubmit.value = false
- if (dataForm.id) {
- // 编辑模式
- putObj(dataForm).then(() => {
- message.success('操作成功')
- visible.value = false
- emit('refreshDataList')
- }).finally(() => {
- canSubmit.value = true
- })
- } else {
- // 新增模式
- addObj(dataForm).then(() => {
- message.success('新增成功')
- visible.value = false
- emit('refreshDataList')
- }).finally(() => {
- canSubmit.value = true
- })
- }
+ // 先进行表单验证,验证成功后再弹出确认框
+ dataFormRef.value?.validate((valid: boolean) => {
+ if (!valid) {
+ return
+ }
+
+ // 表单验证通过,弹出确认框
+ messageBox.confirm(submitTitle).then(() => {
+ canSubmit.value = false
+ if (dataForm.id) {
+ // 编辑模式
+ putObj(dataForm).then(() => {
+ message.success('操作成功')
+ visible.value = false
+ emit('refreshDataList')
+ }).finally(() => {
+ canSubmit.value = true
+ })
+ } else {
+ // 新增模式
+ addObj(dataForm).then(() => {
+ message.success('新增成功')
+ visible.value = false
+ emit('refreshDataList')
+ }).finally(() => {
+ canSubmit.value = true
+ })
}
+ }).catch(() => {
+ // 用户取消
})
- }).catch(() => {
- // 用户取消
})
}
From 2334afe6e03f0632f4b05a8a5fc2890c32b4e853 Mon Sep 17 00:00:00 2001
From: guochunsi <1595020186@qq.com>
Date: Thu, 22 Jan 2026 14:26:51 +0800
Subject: [PATCH 02/14] a
---
.../enrolplantemplate-form.vue | 14 +--
.../recruitstudentsignup/detaiform.vue | 47 ++++------
.../recruit/recruitstudentsignup/index.vue | 4 +-
.../recruitstudentsignup/interviewForm.vue | 91 +++++++++++++------
.../recruitstudentsignup/majorChange.vue | 2 +-
5 files changed, 86 insertions(+), 72 deletions(-)
diff --git a/src/views/recruit/recruitprestudent/enrolplantemplate-form.vue b/src/views/recruit/recruitprestudent/enrolplantemplate-form.vue
index 7e89500..f1bab5c 100644
--- a/src/views/recruit/recruitprestudent/enrolplantemplate-form.vue
+++ b/src/views/recruit/recruitprestudent/enrolplantemplate-form.vue
@@ -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' },
diff --git a/src/views/recruit/recruitstudentsignup/detaiform.vue b/src/views/recruit/recruitstudentsignup/detaiform.vue
index 4192985..05bb3d2 100644
--- a/src/views/recruit/recruitstudentsignup/detaiform.vue
+++ b/src/views/recruit/recruitstudentsignup/detaiform.vue
@@ -14,7 +14,7 @@
-
+ v-input-filter="'idcard'"
+ :disabled="!isEdit">
@@ -644,8 +645,8 @@
取消
保存并送审
保存
- 确认录取
- 驳回录取
+ 确认录取
+ 驳回录取
@@ -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
- }
- }
+ if (state == "-20") {
+ submitTitle = "确认驳回该学生的报名申请么?"
}
}
diff --git a/src/views/recruit/recruitstudentsignup/index.vue b/src/views/recruit/recruitstudentsignup/index.vue
index 6138a56..615554f 100644
--- a/src/views/recruit/recruitstudentsignup/index.vue
+++ b/src/views/recruit/recruitstudentsignup/index.vue
@@ -1016,8 +1016,8 @@ const handleFilter = () => {
}
// 获取数据列表
-const handleAddData=()=>{
- addOrUpdateRef.value?.init(null, 1)
+const handleAddData = ()=>{
+ addOrUpdateRef.value?.init(null, 1, dataForm.groupId)
}
// 新增 / 修改
diff --git a/src/views/recruit/recruitstudentsignup/interviewForm.vue b/src/views/recruit/recruitstudentsignup/interviewForm.vue
index dd2aa45..08dd76f 100644
--- a/src/views/recruit/recruitstudentsignup/interviewForm.vue
+++ b/src/views/recruit/recruitstudentsignup/interviewForm.vue
@@ -1,13 +1,20 @@
-
-
- 通过
- 未通过
-
-
-
-
-
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+