From f06a784018f560bebb3fb4962f869063d74a3c85 Mon Sep 17 00:00:00 2001
From: guochunsi <1595020186@qq.com>
Date: Wed, 21 Jan 2026 19:32:54 +0800
Subject: [PATCH 1/5] a
---
.../recruitstudentsignup/detaiform.vue | 325 ++++++++++--------
.../recruit/recruitstudentsignup/index.vue | 2 +-
2 files changed, 178 insertions(+), 149 deletions(-)
diff --git a/src/views/recruit/recruitstudentsignup/detaiform.vue b/src/views/recruit/recruitstudentsignup/detaiform.vue
index a782118..063b8e3 100644
--- a/src/views/recruit/recruitstudentsignup/detaiform.vue
+++ b/src/views/recruit/recruitstudentsignup/detaiform.vue
@@ -37,9 +37,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -105,58 +164,46 @@
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -171,48 +218,19 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -340,7 +358,7 @@
@@ -658,7 +669,7 @@ import { ref, reactive, nextTick, watch, computed } from 'vue'
import { ElNotification } from 'element-plus'
import { Picture } from '@element-plus/icons-vue'
import { useMessageBox } from '/@/hooks/message'
-import { getObj, putObj, addObj } from '/@/api/recruit/recruitstudentsignup'
+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"
@@ -667,6 +678,7 @@ import { useDict } from '/@/hooks/dict'
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'
const messageBox = useMessageBox()
@@ -690,12 +702,7 @@ const eduList = ref([])
const imgList = ref([])
const type = ref(null)
const isShow = ref(false)
-
-// 计算属性:判断是否为编辑模式
-const isEdit = computed(() => {
- console.log(type.value)
- return type.value === 1
-})
+const isEdit = ref(false)
// 户口性质
const residenceTypeList = ref([])
const schoolCodeList = ref([])
@@ -719,7 +726,8 @@ const twoMajorList = ref([])
const agencyFeeList = ref([])
const tuitionFeeList = ref([])
const schoolFromList = ref([])
-
+const nationalityList = ref([])
+const idCardTypeList = ref([])
const dataForm = reactive({
id: "",
groupId: "",
@@ -788,6 +796,7 @@ const dataForm = reactive({
jsOtherCity:"",
householdPic:"",
otherProvince:"",
+ idCardType:"",
scorePhotoList: [] as string[],
graPicList: [] as string[],
yyPicList: [] as string[],
@@ -883,18 +892,15 @@ const dataRule = {
parentTel_1: [
{required: true, message: '家长手机不能为空', trigger: 'change'}
],
- wishMajor_1: [
- {required: true, message: '拟报专业不能为空', trigger: 'change'}
+ // wishMajor_1: [
+ // {required: true, message: '拟报专业不能为空', trigger: 'change'}
+ // ],
+ contactName: [
+ {required: true, message: '联系人不能为空', trigger: 'change'}
],
- nutrition: [
+ colorDiscrimination: [
{required: true, message: '辨色力不能为空', trigger: 'change'}
],
- height: [
- {required: true, message: '身高cm不能为空', trigger: 'change'}
- ],
- weight: [
- {required: true, message: '体重kg不能为空', trigger: 'change'}
- ],
correctedScore:[
{required: true, message: '折算分不能为空', trigger: 'change'}
]
@@ -904,6 +910,8 @@ const dataRule = {
const init = (id: string | null, typeParam: number) => {
dataForm.id = id || null
type.value = typeParam
+ isEdit.value = typeParam == 1 ? true : false
+ console.log('typeParam',typeParam,'isEdit',isEdit.value)
visible.value = true
canSubmit.value = true
initData()
@@ -920,7 +928,8 @@ const init = (id: string | null, typeParam: number) => {
areaHomeAreaList.value = []
// 批量获取数据字典(新增和编辑都需要) 文化程度 学费 代办费 户口性质 学校归属地
- getDictsByTypes(['finance_student_source', 'agency_fee', 'tuition_fee','house_hold_properties','recruit_school_form']).then((res: any) => {
+ getDictsByTypes(['id_type','finance_student_source', 'agency_fee', 'tuition_fee','house_hold_properties','recruit_school_form']).then((res: any) => {
+ idCardTypeList.value = res.data.id_type || []
eduList.value = res.data.finance_student_source || []
agencyFeeList.value = res.data.agency_fee || []
tuitionFeeList.value = res.data.tuition_fee || []
@@ -1136,6 +1145,10 @@ const initData = () => {
getList().then((data: any) => {
planList.value = data.data
})
+ // 获取民族列表
+ getNationalList().then((res: any) => {
+ nationalityList.value = res.data
+ })
}
const changeFrom = () => {
@@ -1199,40 +1212,56 @@ const getGzAuditChange = () => {
// 计算成绩折算分
const calculateCorrectedScore = () => {
- if (dataForm.score != undefined && dataForm.fullScore != undefined && dataForm.correctedScore != undefined && !isNaN(Number(dataForm.correctedScore))) {
- dataForm.confirmedMajor = ""
- let fjf = 20
-
- if (dataForm.schoolArea == "3") {
- fjf = 30
+ // 验证必要字段是否存在
+ const hasFullScore = dataForm.fullScore != undefined && dataForm.fullScore != ""
+ const hasSchoolArea = dataForm.schoolArea != undefined && dataForm.schoolArea != ""
+
+ // 验证外省或学校所在省市至少有一个存在
+ const hasLocation = (dataForm.schoolArea === '2' && dataForm.jsOtherCity) ||
+ (dataForm.schoolArea === '3' && dataForm.otherProvince)
+
+ // 只有成绩、当地总分、学校归属地、外省/学校所在省市都存在时才能计算
+ if (!hasFullScore || !hasSchoolArea || !hasLocation) {
+ return
+ }
+
+ dataForm.confirmedMajor = ""
+
+ // 调用后端接口计算折算分
+ makeCorrectScore({
+ groupId: dataForm.groupId,
+ schoolArea: dataForm.schoolArea,
+ jsOtherCity: dataForm.jsOtherCity,
+ otherProvince: dataForm.otherProvince,
+ fullScore: dataForm.fullScore,
+ score: dataForm.score,
+ degreeOfEducation: dataForm.degreeOfEducation
+ }).then(res => {
+ if (res.code !== 0) {
+ return
}
- const score = (parseFloat(String(dataForm.score)) * parseFloat("700"))
- dataForm.correctedScore = String(Math.floor(score / parseFloat(String(dataForm.fullScore)) + fjf))
- // 根据折算分匹配录取专业
- planMajorList.value.forEach((e: any) => {
- if (dataForm.correctedScore >= e.scoreLine && e.majorCode == dataForm.wishMajorOne && (parseFloat(e.xyNum) > 0)) {
- dataForm.confirmedMajor = dataForm.wishMajorOne
- }
- })
- if (dataForm.confirmedMajor == "") {
- planMajorList.value.forEach((e: any) => {
- if (dataForm.correctedScore >= e.scoreLine && e.majorCode == dataForm.wishMajorTwo && (parseFloat(e.xyNum) > 0)) {
- dataForm.confirmedMajor = dataForm.wishMajorTwo
- }
- })
+
+ dataForm.correctedScore = res.data
+
+ // 根据折算分匹配录取专业(按志愿顺序:专业1 -> 专业2 -> 专业3)
+ const matchMajorByScore = (majorCode: string) => {
+ return planMajorList.value.find((major: any) =>
+ dataForm.correctedScore >= major.scoreLine &&
+ major.majorCode == majorCode &&
+ parseFloat(major.xyNum) > 0
+ )
}
-
- if (dataForm.confirmedMajor == "") {
- planMajorList.value.forEach((e: any) => {
- if (dataForm.correctedScore >= e.scoreLine && e.majorCode == dataForm.wishMajorThree && (parseFloat(e.xyNum) > 0)) {
- dataForm.confirmedMajor = dataForm.wishMajorThree
- }
- })
- }
- if (dataForm.confirmedMajor) {
+
+ // 按志愿顺序匹配专业
+ const matchedMajor = matchMajorByScore(dataForm.wishMajorOne) ||
+ matchMajorByScore(dataForm.wishMajorTwo) ||
+ matchMajorByScore(dataForm.wishMajorThree)
+
+ if (matchedMajor) {
+ dataForm.confirmedMajor = matchedMajor.majorCode
changeConfirmedMajor(dataForm.confirmedMajor)
}
- }
+ })
}
const changeR = (changeType: number) => {
diff --git a/src/views/recruit/recruitstudentsignup/index.vue b/src/views/recruit/recruitstudentsignup/index.vue
index 6d90065..6138a56 100644
--- a/src/views/recruit/recruitstudentsignup/index.vue
+++ b/src/views/recruit/recruitstudentsignup/index.vue
@@ -1017,7 +1017,7 @@ const handleFilter = () => {
// 获取数据列表
const handleAddData=()=>{
- addOrUpdateRef.value?.init(null, '1')
+ addOrUpdateRef.value?.init(null, 1)
}
// 新增 / 修改
From 790b22a7fc466d51ace366a87f5cad2ba91bfa42 Mon Sep 17 00:00:00 2001
From: guochunsi <1595020186@qq.com>
Date: Thu, 22 Jan 2026 10:37:27 +0800
Subject: [PATCH 2/5] a
---
src/utils/request.ts | 4 ++
.../recruitstudentsignup/detaiform.vue | 40 +++++--------------
2 files changed, 15 insertions(+), 29 deletions(-)
diff --git a/src/utils/request.ts b/src/utils/request.ts
index e8edf08..3a25d38 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -97,6 +97,10 @@ service.interceptors.request.use(
*/
const handleResponse = (response: AxiosResponse) => {
if (response.data.code === 1) {
+ // 业务错误,统一弹出错误提示
+ if (response.data.msg) {
+ useMessage().error(response.data.msg);
+ }
throw response.data;
}
diff --git a/src/views/recruit/recruitstudentsignup/detaiform.vue b/src/views/recruit/recruitstudentsignup/detaiform.vue
index 063b8e3..475515c 100644
--- a/src/views/recruit/recruitstudentsignup/detaiform.vue
+++ b/src/views/recruit/recruitstudentsignup/detaiform.vue
@@ -39,14 +39,9 @@
-
-
-
-
+
+ {{ item.label }}
+
@@ -668,7 +663,7 @@
import { ref, reactive, nextTick, watch, computed } from 'vue'
import { ElNotification } from 'element-plus'
import { Picture } from '@element-plus/icons-vue'
-import { useMessageBox } from '/@/hooks/message'
+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"
@@ -681,8 +676,8 @@ import { queryAllTeacher } from "/@/api/professional/professionaluser/teacherbas
import { getNationalList } from "/@/api/basic/basicnation"
import { verifyIdCardAll, verifyAdmissionNumber } from '/@/utils/toolsValidate'
+const message = useMessage()
const messageBox = useMessageBox()
-
// Emits
const emit = defineEmits<{
(e: 'refreshDataList'): void
@@ -796,7 +791,7 @@ const dataForm = reactive({
jsOtherCity:"",
householdPic:"",
otherProvince:"",
- idCardType:"",
+ idCardType:"0",
scorePhotoList: [] as string[],
graPicList: [] as string[],
yyPicList: [] as string[],
@@ -833,6 +828,9 @@ const dataRule = {
residenceType: [
{required: true, message: '户口性质不能为空', trigger: 'change'}
],
+ idCardType: [
+ {required: true, message: '证件类型不能为空', trigger: 'change'}
+ ],
idNumber: [
{required: true, message: '身份证不能为空', trigger: 'change'},
{
@@ -1391,34 +1389,18 @@ const dataFormSubmit = (state: string) => {
if (dataForm.id) {
// 编辑模式
putObj(dataForm).then(() => {
- ElNotification.success({
- title: '成功',
- message: '操作成功'
- })
+ message.success('操作成功')
visible.value = false
emit('refreshDataList')
- }).catch((e: any) => {
- ElNotification.error({
- title: '错误',
- message: e || '操作失败'
- })
}).finally(() => {
canSubmit.value = true
})
} else {
// 新增模式
addObj(dataForm).then(() => {
- ElNotification.success({
- title: '成功',
- message: '新增成功'
- })
+ message.success('新增成功')
visible.value = false
emit('refreshDataList')
- }).catch((e: any) => {
- ElNotification.error({
- title: '错误',
- message: e || '新增失败'
- })
}).finally(() => {
canSubmit.value = true
})
From 109ae6ddd2048f6ae72d7acf3c999d5979f491b8 Mon Sep 17 00:00:00 2001
From: guochunsi <1595020186@qq.com>
Date: Thu, 22 Jan 2026 10:43:49 +0800
Subject: [PATCH 3/5] a
---
.../recruitstudentsignup/detaiform.vue | 28 +++++++++++++++++--
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/src/views/recruit/recruitstudentsignup/detaiform.vue b/src/views/recruit/recruitstudentsignup/detaiform.vue
index 475515c..fdfa97b 100644
--- a/src/views/recruit/recruitstudentsignup/detaiform.vue
+++ b/src/views/recruit/recruitstudentsignup/detaiform.vue
@@ -39,7 +39,7 @@
-
+
{{ item.label }}
@@ -55,7 +55,7 @@
-
+
([])
const type = ref(null)
const isShow = ref(false)
const isEdit = ref(false)
+// 性别是否必填(证件类型不是身份证时必填)
+const isGenderRequired = computed(() => dataForm.idCardType !== '0')
// 户口性质
const residenceTypeList = ref([])
const schoolCodeList = ref([])
@@ -808,7 +810,19 @@ const dataRule = {
{required: true, message: '姓名不能为空', trigger: 'change'}
],
gender: [
- {required: true, message: '性别不能为空', trigger: 'change'}
+ {
+ validator: (rule: any, value: any, callback: any) => {
+ // 如果证件类型是身份证,性别可以不填(后台会根据身份证号自动获取)
+ if (dataForm.idCardType === '0') {
+ callback()
+ } else if (!value) {
+ callback(new Error('性别不能为空'))
+ } else {
+ callback()
+ }
+ },
+ trigger: 'change'
+ }
],
nationality: [
{required: true, message: '民族不能为空', trigger: 'change'}
@@ -1068,6 +1082,14 @@ const init = (id: string | null, typeParam: number) => {
})
}
+// 证件类型变化处理
+const handleIdCardTypeChange = () => {
+ // 如果选择身份证,清空性别字段(后台会根据身份证号自动获取)
+ if (dataForm.idCardType === '0') {
+ dataForm.gender = ''
+ }
+}
+
const changeEducation = () => {
// 清空拟报专业 录取专业 学费和代办费
dataForm.wishMajorOne = ""
From a7738581da6ca42dc33bceffe0bab0dc53d4f84b Mon Sep 17 00:00:00 2001
From: guochunsi <1595020186@qq.com>
Date: Thu, 22 Jan 2026 12:15:44 +0800
Subject: [PATCH 4/5] a
---
.../recruitstudentsignup/detaiform.vue | 334 +++++++++---------
1 file changed, 168 insertions(+), 166 deletions(-)
diff --git a/src/views/recruit/recruitstudentsignup/detaiform.vue b/src/views/recruit/recruitstudentsignup/detaiform.vue
index fdfa97b..26c8104 100644
--- a/src/views/recruit/recruitstudentsignup/detaiform.vue
+++ b/src/views/recruit/recruitstudentsignup/detaiform.vue
@@ -78,50 +78,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -146,6 +102,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -608,11 +610,6 @@
-
@@ -675,6 +672,7 @@ import { list as scoreList } from "/@/api/recruit/recruitstudentplancorrectscore
import { queryAllTeacher } from "/@/api/professional/professionaluser/teacherbase"
import { getNationalList } from "/@/api/basic/basicnation"
import { verifyIdCardAll, verifyAdmissionNumber } from '/@/utils/toolsValidate'
+import { AUDIT_STATUS_LIST, getStatusConfig } from '/@/config/global'
const message = useMessage()
const messageBox = useMessageBox()
@@ -700,6 +698,8 @@ const isShow = ref(false)
const isEdit = ref(false)
// 性别是否必填(证件类型不是身份证时必填)
const isGenderRequired = computed(() => dataForm.idCardType !== '0')
+// 录取状态
+const auditStatusList = AUDIT_STATUS_LIST
// 户口性质
const residenceTypeList = ref([])
const schoolCodeList = ref([])
@@ -712,7 +712,6 @@ const areaAreaList = ref([])
const areaHomeProvinceList = ref([])
const areaHomeCityList = ref([])
const areaHomeAreaList = ref([])
-const dialogImageUrl = ref("")
const dialogUploadVisible = ref(false)
const sevenMajorList = ref([])
const sixMajorList = ref([])
@@ -904,8 +903,20 @@ const dataRule = {
parentTel_1: [
{required: true, message: '家长手机不能为空', trigger: 'change'}
],
- // wishMajor_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'
+ // }
// ],
contactName: [
{required: true, message: '联系人不能为空', trigger: 'change'}
@@ -923,7 +934,6 @@ const init = (id: string | null, typeParam: number) => {
dataForm.id = id || null
type.value = typeParam
isEdit.value = typeParam == 1 ? true : false
- console.log('typeParam',typeParam,'isEdit',isEdit.value)
visible.value = true
canSubmit.value = true
initData()
@@ -991,47 +1001,15 @@ const init = (id: string | null, typeParam: number) => {
title.value = dataForm.serialNumber
// 获取文化程度对应的专业
- planMajorList.value = []
- twoMajorList.value = []
- threeMajorList.value = []
- fiveMajorList.value = []
- sixMajorList.value = []
- sevenMajorList.value = []
- fourMajorList.value = []
+ // 根据学历获取代办费(从字典获取)
agencyFeeList.value.forEach((e: any) => {
if (dataForm.degreeOfEducation == e.label) {
dataForm.feeAgency = e.value
}
})
- tuitionFeeList.value.forEach((e: any) => {
- if (dataForm.degreeOfEducation == e.label && (dataForm.degreeOfEducation != 1)) {
- dataForm.feeTuition = e.value
- }
- })
- listByEdu({ groupId: dataForm.groupId, degreeOfEducation: dataForm.degreeOfEducation }).then((e: any) => {
- planMajorList.value = e.data
- if (1 != Number(dataForm.degreeOfEducation)) {
- // 如果学历不是初中生,则根据折算分匹配录取专业
- getGzAuditChange()
- }
- // 根据年制分组
- planMajorList.value.forEach((item: any) => {
- if (item.learnYear == '2') {
- twoMajorList.value.push(item)
- } else if (item.learnYear == '3') {
- threeMajorList.value.push(item)
- } else if (item.learnYear == '4') {
- fourMajorList.value.push(item)
- } else if (item.learnYear == '5') {
- fiveMajorList.value.push(item)
- } else if (item.learnYear == '6') {
- sixMajorList.value.push(item)
- } else if (item.learnYear == '7') {
- sevenMajorList.value.push(item)
- }
- })
- })
- // 获取招生计划下的学校和分数线
+ // 加载专业列表并分组
+ loadMajorListAndGroup()
+ // 获取招生计划下的学校所在城市(本省外市)
scoreList({ groupId: dataForm.groupId }).then((data: any) => {
schoolCodeList.value = data.data
})
@@ -1058,20 +1036,21 @@ const init = (id: string | null, typeParam: number) => {
}
})
}
- if ("1" == String(dataForm.degreeOfEducation)) {
- title.value = "C" + title.value
- } else if ("2" == String(dataForm.degreeOfEducation)) {
- title.value = "G" + title.value
- } else if ("3" == String(dataForm.degreeOfEducation)) {
- title.value = "J" + title.value
+ // 根据文化程度添加前缀:初中(C)、高中(G)、技职校(J)
+ const educationPrefixMap: Record = {
+ '1': 'C', // 初中
+ '2': 'G', // 高中
+ '3': 'J' // 技职校
+ }
+ const prefix = educationPrefixMap[String(dataForm.degreeOfEducation)]
+ if (prefix) {
+ title.value = prefix + title.value
}
- if ("-20" == String(dataForm.auditStatus)) {
- title.value = "未录取 " + title.value
- } else if ("0" == String(dataForm.auditStatus)) {
- title.value = "待审核 " + title.value
- } else if ("20" == String(dataForm.auditStatus)) {
- title.value = "已录取 " + title.value
+ // 从字典数据获取录取状态标签
+ const auditStatusConfig = getStatusConfig(auditStatusList, dataForm.auditStatus)
+ if (auditStatusConfig && auditStatusConfig.label) {
+ title.value = auditStatusConfig.label + " " + title.value
}
})
} else {
@@ -1090,34 +1069,9 @@ const handleIdCardTypeChange = () => {
}
}
-const changeEducation = () => {
- // 清空拟报专业 录取专业 学费和代办费
- dataForm.wishMajorOne = ""
- dataForm.wishMajorTwo = ""
- dataForm.wishMajorThree = ""
- dataForm.confirmedMajor = ""
- dataForm.twoMajor = ""
- dataForm.threeMajor = ""
- dataForm.fourMajor = ""
- dataForm.fiveMajor = ""
- dataForm.sixMajor = ""
- dataForm.sevenMajor = ""
-
- dataForm.feeTuition = 0
- dataForm.feeAgency = 0
-
- // 重新根据学历 获取学费 和 代办费
- agencyFeeList.value.forEach((e: any) => {
- if (dataForm.degreeOfEducation == e.label) {
- dataForm.feeAgency = e.value
- }
- })
- tuitionFeeList.value.forEach((e: any) => {
- if (dataForm.degreeOfEducation == e.label && (dataForm.degreeOfEducation != 1)) {
- dataForm.feeTuition = e.value
- }
- })
- // 根据学历获取快捷专业选择
+// 加载专业列表并分组
+const loadMajorListAndGroup = () => {
+ // 清空专业列表
planMajorList.value = []
twoMajorList.value = []
threeMajorList.value = []
@@ -1125,12 +1079,12 @@ const changeEducation = () => {
sixMajorList.value = []
sevenMajorList.value = []
fourMajorList.value = []
+
// 根据学历获取专业
listByEdu({ groupId: dataForm.groupId, degreeOfEducation: dataForm.degreeOfEducation }).then((e: any) => {
planMajorList.value = e.data
- if (1 != Number(dataForm.degreeOfEducation)) {
- getGzAuditChange()
- }
+ // 如果是初中生,则根据折算分匹配录取专业
+ getGzAuditChange()
// 根据年制分组
planMajorList.value.forEach((item: any) => {
if (item.learnYear == '2') {
@@ -1147,9 +1101,41 @@ const changeEducation = () => {
sevenMajorList.value.push(item)
}
})
+
+ // 如果已有录取专业,根据文化程度和专业更新学费
+ if (dataForm.confirmedMajor) {
+ updateTuitionByMajorAndEducation()
+ }
})
}
+const changeEducation = () => {
+ // 清空拟报专业 录取专业 学费和代办费
+ dataForm.wishMajorOne = ""
+ dataForm.wishMajorTwo = ""
+ dataForm.wishMajorThree = ""
+ dataForm.confirmedMajor = ""
+ dataForm.twoMajor = ""
+ dataForm.threeMajor = ""
+ dataForm.fourMajor = ""
+ dataForm.fiveMajor = ""
+ dataForm.sixMajor = ""
+ dataForm.sevenMajor = ""
+
+ dataForm.feeTuition = 0
+ dataForm.feeAgency = 0
+
+ // 重新根据学历获取代办费(从字典获取)
+ agencyFeeList.value.forEach((e: any) => {
+ if (dataForm.degreeOfEducation == e.label) {
+ dataForm.feeAgency = e.value
+ }
+ })
+
+ // 加载专业列表并分组
+ loadMajorListAndGroup()
+}
+
const handlePicCardPreview = (file: string) => {
const array = file.split(",")
imgList.value = array
@@ -1205,29 +1191,33 @@ const changePlaceScore = () => {
}
const getGzAuditChange = () => {
- if (isEdit.value && (dataForm.confirmedMajor == undefined || dataForm.confirmedMajor == "")) {
- // 根据折算分匹配录取专业
- planMajorList.value.forEach((e: any) => {
- if (e.majorCode == dataForm.wishMajorOne && (parseFloat(e.xyNum) > 0)) {
- dataForm.confirmedMajor = dataForm.wishMajorOne
+ // 如果是初中生 需要根据折算分匹配录取专业
+ if (dataForm.degreeOfEducation == "1") {
+ if (isEdit.value && (dataForm.confirmedMajor == undefined || dataForm.confirmedMajor == "")) {
+ // 根据折算分匹配录取专业
+ planMajorList.value.forEach((e: any) => {
+ if (e.majorCode == dataForm.wishMajorOne && (parseFloat(e.xyNum) > 0)) {
+ dataForm.confirmedMajor = dataForm.wishMajorOne
+ }
+ })
+ if (dataForm.confirmedMajor) {
+ planMajorList.value.forEach((e: any) => {
+ if (e.majorCode == dataForm.wishMajorTwo && (parseFloat(e.xyNum) > 0)) {
+ dataForm.confirmedMajor = dataForm.wishMajorOne
+ }
+ })
}
- })
- if (dataForm.confirmedMajor) {
- planMajorList.value.forEach((e: any) => {
- if (e.majorCode == dataForm.wishMajorTwo && (parseFloat(e.xyNum) > 0)) {
- dataForm.confirmedMajor = dataForm.wishMajorOne
- }
- })
- }
- if (dataForm.confirmedMajor) {
- planMajorList.value.forEach((e: any) => {
- if (e.majorCode == dataForm.wishMajorThree && (parseFloat(e.xyNum) > 0)) {
- dataForm.confirmedMajor = dataForm.wishMajorOne
- }
- })
+ if (dataForm.confirmedMajor) {
+ planMajorList.value.forEach((e: any) => {
+ if (e.majorCode == dataForm.wishMajorThree && (parseFloat(e.xyNum) > 0)) {
+ dataForm.confirmedMajor = dataForm.wishMajorOne
+ }
+ })
+ }
}
}
+
}
// 计算成绩折算分
@@ -1331,22 +1321,34 @@ const changeH = (changeType: number) => {
// 改变录取专业
const changeConfirmedMajor = (id: string) => {
if (id) {
- let flag = false
dataForm.confirmedMajor = id
- // 是初中生并且是中德班
- planMajorList.value.forEach((e: any) => {
- if (dataForm.confirmedMajor == e.majorCode && e.isZd == "1" && dataForm.degreeOfEducation == "1") {
- flag = true
- }
- })
- if (dataForm.degreeOfEducation == "1") {
- dataForm.feeTuition = 0
- tuitionFeeList.value.forEach((e: any) => {
- if (e.label == "0" && flag) {
- dataForm.feeTuition = e.value
- }
- })
- }
+ // 根据文化程度和录取专业更新学费
+ updateTuitionByMajorAndEducation()
+ }
+}
+
+// 根据文化程度和录取专业更新学费
+const updateTuitionByMajorAndEducation = () => {
+ if (!dataForm.confirmedMajor || !dataForm.degreeOfEducation) {
+ return
+ }
+
+ // 查找选中的专业
+ const selectedMajor = planMajorList.value.find((major: any) => major.majorCode === dataForm.confirmedMajor)
+ if (!selectedMajor) {
+ return
+ }
+
+ // 根据文化程度选择对应的学费字段
+ // '1' = 初中 -> czFee
+ // '2' = 高中 -> gzFee
+ // '3' = 技职校 -> jzxFee
+ if (dataForm.degreeOfEducation === '1' && selectedMajor.czFee !== undefined && selectedMajor.czFee !== null) {
+ dataForm.feeTuition = selectedMajor.czFee
+ } else if (dataForm.degreeOfEducation === '2' && selectedMajor.gzFee !== undefined && selectedMajor.gzFee !== null) {
+ dataForm.feeTuition = selectedMajor.gzFee
+ } else if (dataForm.degreeOfEducation === '3' && selectedMajor.jzxFee !== undefined && selectedMajor.jzxFee !== null) {
+ dataForm.feeTuition = selectedMajor.jzxFee
}
}
From d09130f11b005fc0766461e4c0fbe0855cf3753c Mon Sep 17 00:00:00 2001
From: guochunsi <1595020186@qq.com>
Date: Thu, 22 Jan 2026 12:18:50 +0800
Subject: [PATCH 5/5] a
---
src/views/recruit/recruitstudentsignup/detaiform.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/views/recruit/recruitstudentsignup/detaiform.vue b/src/views/recruit/recruitstudentsignup/detaiform.vue
index 26c8104..007379f 100644
--- a/src/views/recruit/recruitstudentsignup/detaiform.vue
+++ b/src/views/recruit/recruitstudentsignup/detaiform.vue
@@ -485,7 +485,7 @@
- {{dataForm.feeTuition+dataForm.feeAgency}}
+ {{Number(dataForm.feeTuition)+Number(dataForm.feeAgency)}}