This commit is contained in:
guochunsi
2026-01-14 18:32:09 +08:00
parent 6055033289
commit 8166fa31e0
33 changed files with 3926 additions and 3383 deletions

View File

@@ -2,16 +2,15 @@
<el-dialog
:title="title"
:close-on-click-modal="false"
:visible.sync="visible"
v-model="visible"
append-to-body
width="90%"
>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
label-width="170px" size="mini">
width="90%">
<el-form :model="dataForm" :rules="dataRule" ref="dataFormRef" @keyup.enter="dataFormSubmit"
label-width="170px" size="small">
<el-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="请选择招生计划" size="small" style="width: 100%">
<el-option
v-for="item in planList"
@@ -22,33 +21,32 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="姓名" prop="name" >
<el-input type="text" v-model="dataForm.name" :disabled="type==1 ? false : true"></el-input>
<el-form-item label="姓名" prop="name">
<el-input type="text" v-model="dataForm.name" :disabled="type != 1"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="身份证号" prop="idNumber">
<el-input type="text" v-model="dataForm.idNumber" :disabled="type==2 ? false : true"></el-input>
<el-input type="text" v-model="dataForm.idNumber" :disabled="type != 2"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="成绩折算分" prop="correctedScore">
<el-input-number v-model="dataForm.correctedScore" controls-position="right" :min="0" :max="999" :step-strictly="true"style="width:100%;" ></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-col :span="24">
<el-form-item label="成绩折算分" prop="correctedScore">
<el-input-number v-model="dataForm.correctedScore" controls-position="right" :min="0" :max="999" :step-strictly="true" style="width: 100%;"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="原录取专业" prop="confirmedMajor">
<el-select v-model="dataForm.confirmedMajor" filterable clearable placeholder="" size="small" style="width: 100%" :disabled="type==1 ? false : true" @change="changeM(dataForm.confirmedMajor)">
<el-select v-model="dataForm.confirmedMajor" filterable clearable placeholder="" size="small" style="width: 100%" :disabled="type != 1" @change="changeM(dataForm.confirmedMajor)">
<el-option
v-for="item in planMajorList"
:key="item.zydm"
@@ -62,7 +60,7 @@
<el-row>
<el-col :span="24">
<el-form-item label="新录取专业" prop="newConfirmedMajor">
<el-select v-model="dataForm.newConfirmedMajor" filterable placeholder="" size="small" style="width: 100%" @change="changeCM(dataForm.newConfirmedMajor)">
<el-select v-model="dataForm.newConfirmedMajor" filterable placeholder="" size="small" style="width: 100%" @change="changeCM(dataForm.newConfirmedMajor)">
<el-option
v-for="item in planMajorList"
:key="item.zydm"
@@ -77,17 +75,17 @@
<el-row>
<el-col :span="6">
<el-form-item label="学费" prop="feeTuition">
<el-input-number v-model="dataForm.feeTuition" controls-position="right" :min="0" :max="999999" :step-strictly="true" style="width:100%;" :disabled="type==2?false:true"></el-input-number>
<el-input-number v-model="dataForm.feeTuition" controls-position="right" :min="0" :max="999999" :step-strictly="true" style="width:100%;" :disabled="type == 2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="代办费" prop="feeAgency">
<el-input-number v-model="dataForm.feeAgency" controls-position="right" :min="0" :max="999999" :step-strictly="true" style="width:100%;" :disabled="type==2?false:true"></el-input-number>
<el-input-number v-model="dataForm.feeAgency" controls-position="right" :min="0" :max="999999" :step-strictly="true" style="width:100%;" :disabled="type == 2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="总费用" prop="allMoney">
<span style="color: red">{{dataForm.feeTuition+dataForm.feeAgency}}</span>
<span style="color: red">{{ dataForm.feeTuition + dataForm.feeAgency }}</span>
</el-form-item>
</el-col>
</el-row>
@@ -95,276 +93,295 @@
<el-row>
<el-col :span="24">
<el-form-item label="审核备注" prop="auditRemarks">
<el-input type="textarea" v-model="dataForm.auditRemarks" placeholder="审核备注" :rows="2" ></el-input>
<el-input type="textarea" v-model="dataForm.auditRemarks" placeholder="审核备注" :rows="2"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer" >
<el-button @click="visible = false">取消</el-button>
<el-button type="success" @click="dataFormSubmit()" v-if="canSubmit">确认修改</el-button>
</span>
<template #footer>
<div class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="success" @click="dataFormSubmit" v-if="canSubmit">确认修改</el-button>
</div>
</template>
</el-dialog>
</template>
<script>
import {getObj,changeMajor} from '@/api/recruit/recruitstudentsignup'
import {list} from "@/api/recruit/recruitstudentplangroup";
import {listByEdu} from "@/api/recruit/recruitplanmajor";
import {getDictByType} from "@/api/contract/contract";
import {list as scoreList} from "@/api/recruit/recruitstudentplancorrectscoreconfig";
<script setup lang="ts">
import { ref, reactive, nextTick } from 'vue'
import { ElNotification } from 'element-plus'
import { useMessageBox } from '/@/hooks/message'
import { getObj, changeMajor } from '@/api/recruit/recruitstudentsignup'
import { list } from "@/api/recruit/recruitstudentplangroup"
import { listByEdu } from "@/api/recruit/recruitplanmajor"
import { getDictByType } from "@/api/contract/contract"
import { list as scoreList } from "@/api/recruit/recruitstudentplancorrectscoreconfig"
// 消息提示 hooks
const messageBox = useMessageBox()
export default {
data() {
return {
visible: false,
canSubmit: false,
title: "",
eduList: [],
type:null,
dataForm: {
id: "",
groupId: "",
name: "",
oldName: "",
gender: "",
nationality: "",
degreeOfEducation: "",
isLeagueMember: "",
schoolOfGraduation: "",
isAccommodation: "",
examRegistrationNumbers: "",
isMinimumLivingSecurity: "",
score: "",
postcode: "",
residenceType: "",
correctedScore: "",
placeScore: "",
schoolFrom: "",
idNumber: "",
residenceProvince: "",
residenceCity: "",
residenceArea: "",
residenceDetail: "",
homeAddressProvince: "",
homeAddressCity: "",
homeAddressArea: "",
homeAddressDetail: "",
parentName: "",
parentTelOne: "",
parentTelTwo: "",
selfTel: "",
wishMajorOne: "",
wishMajorTwo: "",
wishMajorThree: "",
confirmedMajor: "",
sevenMajor:"",
sixMajor:"",
fiveMajor:"",
fourMajor: "",
threeMajor: "",
twoMajor: "",
feeContribute: 0,
scorePhoto: "",
graPic: "",
yyPic: "",
housePic: "",
sbPic: "",
contactName: "",
oldSerialNumber: "",
colorDiscrimination: "",
nutrition: "",
height: "",
weight: "",
pastMedicalHistory: "",
eyesightLeft: "",
eyesightRight: "",
correctEyesightLeft: "",
correctEyesightRight: "",
remarks: "",
auditRemarks: "",
serialNumber: "",
auditStatus:"",
schoolCode:"",
newConfirmedMajor: "",
householdPic:""
},
disabled: false,
schoolFromList:[{label:"本省外市",value:"1"},{label:"外省外市",value:"2"}],
planList: [],
planMajorList:[],
// Emits
const emit = defineEmits<{
(e: 'refreshDataList'): void
}>()
deptList: [],
// 表单引用
const dataFormRef = ref()
dialogImageUrl:"",
dialogUploadVisible:false,
// 响应式数据
const visible = ref(false)
const canSubmit = ref(false)
const title = ref("")
const type = ref<number | null>(null)
const planList = ref<any[]>([])
const planMajorList = ref<any[]>([])
const agencyFeeList = ref<any[]>([])
const tuitionFeeList = ref<any[]>([])
const schoolCodeList = ref<any[]>([])
const dataForm = reactive({
id: "",
groupId: "",
name: "",
oldName: "",
gender: "",
nationality: "",
degreeOfEducation: "",
isLeagueMember: "",
schoolOfGraduation: "",
isAccommodation: "",
examRegistrationNumbers: "",
isMinimumLivingSecurity: "",
score: "",
postcode: "",
residenceType: "",
correctedScore: null as number | null,
placeScore: "",
schoolFrom: "",
idNumber: "",
residenceProvince: "",
residenceCity: "",
residenceArea: "",
residenceDetail: "",
homeAddressProvince: "",
homeAddressCity: "",
homeAddressArea: "",
homeAddressDetail: "",
parentName: "",
parentTelOne: "",
parentTelTwo: "",
selfTel: "",
wishMajorOne: "",
wishMajorTwo: "",
wishMajorThree: "",
confirmedMajor: "",
sevenMajor: "",
sixMajor: "",
fiveMajor: "",
fourMajor: "",
threeMajor: "",
twoMajor: "",
feeContribute: 0,
scorePhoto: "",
graPic: "",
yyPic: "",
housePic: "",
sbPic: "",
contactName: "",
oldSerialNumber: "",
colorDiscrimination: "",
nutrition: "",
height: "",
weight: "",
pastMedicalHistory: "",
eyesightLeft: "",
eyesightRight: "",
correctEyesightLeft: "",
correctEyesightRight: "",
remarks: "",
auditRemarks: "",
serialNumber: "",
auditStatus: "",
schoolCode: "",
newConfirmedMajor: "",
householdPic: "",
feeTuition: 0,
feeAgency: 0
})
dataRule: {
groupId: [
{required: true, message: '招生计划不能为空', trigger: 'change'}
],
name: [
{required: true, message: '姓名不能为空', trigger: 'change'}
],
idNumber: [
{required: true, message: '身份证不能为空', trigger: 'change'}
],
correctedScore: [
{required: true, message: '成绩折算分不能为空', trigger: 'change'}
],
confirmedMajor:[
{required: true, message: '原录取专业不能为空', trigger: 'change'}
],
newConfirmedMajor:[
{required: true, message: '新录取专业不能为空', trigger: 'change'}
]
const dataRule = {
groupId: [
{ required: true, message: '招生计划不能为空', trigger: 'change' }
],
name: [
{ required: true, message: '姓名不能为空', trigger: 'change' }
],
idNumber: [
{ required: true, message: '身份证不能为空', trigger: 'change' }
],
correctedScore: [
{ required: true, message: '成绩折算分不能为空', trigger: 'change' }
],
confirmedMajor: [
{ required: true, message: '原录取专业不能为空', trigger: 'change' }
],
newConfirmedMajor: [
{ required: true, message: '新录取专业不能为空', trigger: 'change' }
]
}
// 初始化数据
const initData = () => {
list().then((data: any) => {
planList.value = data.data
})
}
// 改变新专业
const changeCM = (id: string) => {
if (id) {
let flag = false
planMajorList.value.forEach((e: any) => {
if (dataForm.newConfirmedMajor == e.zydm && e.isZd == "1" && String(dataForm.degreeOfEducation) == "1") {
flag = true
}
}
},
created() {
},
methods: {
init(id) {
let _this = this;
this.dataForm.id = id || null;
this.visible = true;
this.canSubmit = true;
this.initData();
this.isShow = true;
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
//获取数据字典代办费
getDictByType("agency_fee").then(res => {
_this.agencyFeeList = res.data
//获取数据字典学费
getDictByType("tuition_fee").then(res => {
_this.tuitionFeeList = res.data
getObj(this.dataForm.id).then(response => {
this.dataForm = response.data
this.title = this.dataForm.serialNumber
//获取文化程度对应的专业
this.planMajorList=[];
this.agencyFeeList.forEach(e=>{
if(this.dataForm.degreeOfEducation == e.label){
this.dataForm.feeAgency = e.value;
}
});
this.tuitionFeeList.forEach(e=>{
if(this.dataForm.degreeOfEducation == e.label && (this.dataForm.degreeOfEducation !=1) ){
this.dataForm.feeTuition = e.value;
}
});
listByEdu({groupId: this.dataForm.groupId,degreeOfEducation:this.dataForm.degreeOfEducation}).then(e=>{
_this.planMajorList = e.data;
});
//获取招生计划下的学校和分数线
scoreList({groupId:_this.dataForm.groupId}).then(data =>{
_this.schoolCodeList = data.data;
});
if ("1" == this.dataForm.degreeOfEducation) {
this.title = "C" + this.title;
} else if ("2" == this.dataForm.degreeOfEducation) {
this.title = "G" + this.title;
} else if ("3" == this.dataForm.degreeOfEducation) {
this.title = "J" + this.title;
}
if("-20" == this.dataForm.auditStatus){
this.title ="未录取 "+this.title;
}else if("0" == this.dataForm.auditStatus){
this.title ="待审核 "+this.title;
}else if("20" == this.dataForm.auditStatus){
this.title ="已录取 "+this.title;
}
})
})
})
})
if (String(dataForm.degreeOfEducation) == "1") {
dataForm.feeTuition = 0
tuitionFeeList.value.forEach((e: any) => {
if (e.label == "0" && flag) {
dataForm.feeTuition = e.value
}
})
},
initData() {
let _this = this;
list().then(data => {
_this.planList = data.data
});
},
changeCM(id){
if(id){
let _this = this;
let flag = false;
_this.planMajorList.forEach(e=>{
if(_this.dataForm.newConfirmedMajor == e.zydm && e.isZd=="1" &&_this.dataForm.degreeOfEducation==1){
flag = true;
}
});
if(_this.dataForm.degreeOfEducation==1){
_this.dataForm.feeTuition=0;
_this.tuitionFeeList.forEach(e=>{
if(e.label=="0" && flag){
_this.dataForm.feeTuition = e.value;
}
});
}
}
},
changeM(id){
if(id){
let _this = this;
let flag = false;
_this.dataForm.confirmedMajor = id;
//是初中生并且是中德班
_this.planMajorList.forEach(e=>{
if(_this.dataForm.confirmedMajor == e.zydm && e.isZd=="1" &&_this.dataForm.degreeOfEducation==1){
flag = true;
}
});
if(_this.dataForm.degreeOfEducation==1){
_this.dataForm.feeTuition=0;
_this.tuitionFeeList.forEach(e=>{
if(e.label=="0" && flag){
_this.dataForm.feeTuition = e.value;
}
});
}
}
},
// 表单提交
dataFormSubmit() {
let _this = this;
let title = "确认调整录取专业么?";
if(this.dataForm.confirmedMajor == this.dataForm.newConfirmedMajor){
_this.$notify.error('新专业不能和原专业相同');
return
}
this.$confirm(title , '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
_this.$refs['dataForm'].validate((valid) => {
if (valid) {
_this.canSubmit = false;
if (_this.dataForm.id) {
changeMajor(_this.dataForm).then(data => {
_this.$notify.success('操作成功')
_this.visible = false
_this.$emit('refreshDataList')
}).catch(() => {
_this.canSubmit = true;
});
}
}
})
}).then(data => {
}).catch(function(err) { })
}
}
}
// 改变原专业
const changeM = (id: string) => {
if (id) {
dataForm.confirmedMajor = id
// 是初中生并且是中德班
let flag = false
planMajorList.value.forEach((e: any) => {
if (dataForm.confirmedMajor == e.zydm && e.isZd == "1" && String(dataForm.degreeOfEducation) == "1") {
flag = true
}
})
if (String(dataForm.degreeOfEducation) == "1") {
dataForm.feeTuition = 0
tuitionFeeList.value.forEach((e: any) => {
if (e.label == "0" && flag) {
dataForm.feeTuition = e.value
}
})
}
}
}
// 表单提交
const dataFormSubmit = async () => {
const titleText = "确认调整录取专业么?"
if (dataForm.confirmedMajor == dataForm.newConfirmedMajor) {
ElNotification.error({
title: '错误',
message: '新专业不能和原专业相同'
})
return
}
try {
await messageBox.confirm(titleText)
dataFormRef.value?.validate((valid: boolean) => {
if (valid) {
canSubmit.value = false
if (dataForm.id) {
changeMajor(dataForm).then(() => {
ElNotification.success({
title: '成功',
message: '操作成功'
})
visible.value = false
emit('refreshDataList')
}).catch(() => {
canSubmit.value = true
})
}
}
})
} catch {
// 用户取消
}
}
// 初始化方法
const init = (id: string | null) => {
dataForm.id = id || ""
visible.value = true
canSubmit.value = true
initData()
nextTick(() => {
dataFormRef.value?.resetFields()
if (dataForm.id) {
// 获取数据字典代办费
getDictByType("agency_fee").then((res: any) => {
agencyFeeList.value = res.data
// 获取数据字典学费
getDictByType("tuition_fee").then((res: any) => {
tuitionFeeList.value = res.data
getObj(dataForm.id).then((response: any) => {
Object.assign(dataForm, response.data)
title.value = dataForm.serialNumber
// 获取文化程度对应的专业
planMajorList.value = []
agencyFeeList.value.forEach((e: any) => {
if (String(dataForm.degreeOfEducation) == String(e.label)) {
dataForm.feeAgency = e.value
}
})
tuitionFeeList.value.forEach((e: any) => {
if (String(dataForm.degreeOfEducation) == String(e.label) && (String(dataForm.degreeOfEducation) != "1")) {
dataForm.feeTuition = e.value
}
})
listByEdu({ groupId: dataForm.groupId, degreeOfEducation: dataForm.degreeOfEducation }).then((e: any) => {
planMajorList.value = e.data
})
// 获取招生计划下的学校和分数线
scoreList({ groupId: dataForm.groupId }).then((data: any) => {
schoolCodeList.value = data.data
})
if ("1" == dataForm.degreeOfEducation) {
title.value = "C" + title.value
} else if ("2" == dataForm.degreeOfEducation) {
title.value = "G" + title.value
} else if ("3" == dataForm.degreeOfEducation) {
title.value = "J" + title.value
}
if ("-20" == dataForm.auditStatus) {
title.value = "未录取 " + title.value
} else if ("0" == dataForm.auditStatus) {
title.value = "待审核 " + title.value
} else if ("20" == dataForm.auditStatus) {
title.value = "已录取 " + title.value
}
})
})
})
}
})
}
// 暴露方法给父组件
defineExpose({
init
})
</script>
<style scoped>
.dialog-footer {
text-align: right;
}
</style>