a
This commit is contained in:
@@ -649,10 +649,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 图片预览-->
|
|
||||||
<el-dialog title="图片预览" v-model="dialogUploadVisible" append-to-body >
|
|
||||||
|
|
||||||
</el-dialog>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -662,7 +658,6 @@ import { ElNotification } from 'element-plus'
|
|||||||
import { Picture } from '@element-plus/icons-vue'
|
import { Picture } from '@element-plus/icons-vue'
|
||||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||||
import { getObj, putObj, addObj ,makeCorrectScore} 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 { getList } from "/@/api/recruit/recruitstudentplangroup"
|
||||||
import { listByEdu } from "/@/api/recruit/recruitstudentplan"
|
import { listByEdu } from "/@/api/recruit/recruitstudentplan"
|
||||||
import { getDictsByTypes } from "/@/api/admin/dict"
|
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 { list as scoreList } from "/@/api/recruit/recruitstudentplancorrectscoreconfig"
|
||||||
import { queryAllTeacher } from "/@/api/professional/professionaluser/teacherbase"
|
import { queryAllTeacher } from "/@/api/professional/professionaluser/teacherbase"
|
||||||
import { getNationalList } from "/@/api/basic/basicnation"
|
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'
|
import { AUDIT_STATUS_LIST, getStatusConfig } from '/@/config/global'
|
||||||
|
|
||||||
const message = useMessage()
|
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 { yes_no_type, sexy, color_discrimination } = useDict('yes_no_type', 'sexy', 'color_discrimination')
|
||||||
|
|
||||||
const eduList = ref<any[]>([])
|
const eduList = ref<any[]>([])
|
||||||
const imgList = ref<string[]>([])
|
|
||||||
const type = ref<number | null>(null)
|
const type = ref<number | null>(null)
|
||||||
const isShow = ref(false)
|
const isShow = ref(false)
|
||||||
const isEdit = ref(false)
|
const isEdit = ref(false)
|
||||||
@@ -712,7 +706,6 @@ const areaAreaList = ref<any[]>([])
|
|||||||
const areaHomeProvinceList = ref<any[]>([])
|
const areaHomeProvinceList = ref<any[]>([])
|
||||||
const areaHomeCityList = ref<any[]>([])
|
const areaHomeCityList = ref<any[]>([])
|
||||||
const areaHomeAreaList = ref<any[]>([])
|
const areaHomeAreaList = ref<any[]>([])
|
||||||
const dialogUploadVisible = ref(false)
|
|
||||||
const sevenMajorList = ref<any[]>([])
|
const sevenMajorList = ref<any[]>([])
|
||||||
const sixMajorList = ref<any[]>([])
|
const sixMajorList = ref<any[]>([])
|
||||||
const fiveMajorList = ref<any[]>([])
|
const fiveMajorList = ref<any[]>([])
|
||||||
@@ -801,7 +794,7 @@ const dataForm = reactive({
|
|||||||
householdPicList: [] as string[]
|
householdPicList: [] as string[]
|
||||||
})
|
})
|
||||||
|
|
||||||
const dataRule = {
|
const dataRule = reactive({
|
||||||
groupId: [
|
groupId: [
|
||||||
{required: true, message: '招生计划不能为空', trigger: 'change'}
|
{required: true, message: '招生计划不能为空', trigger: 'change'}
|
||||||
],
|
],
|
||||||
@@ -870,9 +863,6 @@ const dataRule = {
|
|||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
otherProvince: [
|
|
||||||
{required: true, message: '外省不能为空', trigger: 'change'}
|
|
||||||
],
|
|
||||||
residenceProvince: [
|
residenceProvince: [
|
||||||
{required: true, message: '户口所在地不能为空', trigger: 'change'}
|
{required: true, message: '户口所在地不能为空', trigger: 'change'}
|
||||||
],
|
],
|
||||||
@@ -900,24 +890,19 @@ const dataRule = {
|
|||||||
parentName: [
|
parentName: [
|
||||||
{required: true, message: '家长姓名不能为空', trigger: 'change'}
|
{required: true, message: '家长姓名不能为空', trigger: 'change'}
|
||||||
],
|
],
|
||||||
parentTel_1: [
|
parentTelOne: [
|
||||||
{required: true, message: '家长手机不能为空', trigger: 'change'}
|
{required: true, message: '家长手机不能为空', trigger: 'change'},
|
||||||
|
{
|
||||||
|
validator: (rule: any, value: any, callback: any) => {
|
||||||
|
if (value && !verifyPhone(value)) {
|
||||||
|
callback(new Error('请输入正确的手机号码'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
// wishMajorOne: [
|
|
||||||
// {
|
|
||||||
// validator: (rule: any, value: any, callback: any) => {
|
|
||||||
// // 新增时不需要验证,修改时需要验证
|
|
||||||
// if (!dataForm.id) {
|
|
||||||
// callback()
|
|
||||||
// } else if (!value) {
|
|
||||||
// callback(new Error('拟报专业不能为空'))
|
|
||||||
// } else {
|
|
||||||
// callback()
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// trigger: 'change'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
contactName: [
|
contactName: [
|
||||||
{required: true, message: '联系人不能为空', trigger: 'change'}
|
{required: true, message: '联系人不能为空', trigger: 'change'}
|
||||||
],
|
],
|
||||||
@@ -926,8 +911,8 @@ const dataRule = {
|
|||||||
],
|
],
|
||||||
correctedScore:[
|
correctedScore:[
|
||||||
{required: true, message: '折算分不能为空', trigger: 'change'}
|
{required: true, message: '折算分不能为空', trigger: 'change'}
|
||||||
]
|
]
|
||||||
}
|
})
|
||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
const init = (id: string | null, typeParam: number) => {
|
const init = (id: string | null, typeParam: number) => {
|
||||||
@@ -1136,12 +1121,6 @@ const changeEducation = () => {
|
|||||||
loadMajorListAndGroup()
|
loadMajorListAndGroup()
|
||||||
}
|
}
|
||||||
|
|
||||||
const handlePicCardPreview = (file: string) => {
|
|
||||||
const array = file.split(",")
|
|
||||||
imgList.value = array
|
|
||||||
dialogUploadVisible.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const initData = () => {
|
const initData = () => {
|
||||||
// 联系人(教职工)
|
// 联系人(教职工)
|
||||||
queryAllTeacher().then((res: any) => {
|
queryAllTeacher().then((res: any) => {
|
||||||
@@ -1356,7 +1335,6 @@ const updateTuitionByMajorAndEducation = () => {
|
|||||||
const dataFormSubmit = (state: string) => {
|
const dataFormSubmit = (state: string) => {
|
||||||
dataForm.auditStatus = state
|
dataForm.auditStatus = state
|
||||||
let submitTitle = "确认通过该学生的报名申请么?"
|
let submitTitle = "确认通过该学生的报名申请么?"
|
||||||
|
|
||||||
// 新增模式
|
// 新增模式
|
||||||
if (!dataForm.id) {
|
if (!dataForm.id) {
|
||||||
submitTitle = "确认保存并提交该学生的报名信息么?"
|
submitTitle = "确认保存并提交该学生的报名信息么?"
|
||||||
@@ -1377,62 +1355,65 @@ const dataFormSubmit = (state: string) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dataForm.degreeOfEducation == '1' && (dataForm.score == undefined || dataForm.score == '')) {
|
// 清空相关验证规则
|
||||||
ElNotification.error({
|
dataRule.score = []
|
||||||
title: '错误',
|
dataRule.fullScore = []
|
||||||
message: '初中生报名请填写成绩'
|
dataRule.jsOtherCity = []
|
||||||
})
|
dataRule.otherProvince = []
|
||||||
return
|
if (dataForm.degreeOfEducation == '1') {
|
||||||
}
|
dataRule.score = [
|
||||||
if (dataForm.degreeOfEducation == '1' && dataForm.schoolArea == '3' && (dataForm.fullScore == undefined || dataForm.fullScore == '')) {
|
{required: true, message: '初中生报名请填写成绩', trigger: 'change'}
|
||||||
ElNotification.error({
|
]
|
||||||
title: '错误',
|
if(dataForm.schoolArea){
|
||||||
message: '外地初中生报名请填写当地总分'
|
if(dataForm.schoolArea == '3'){
|
||||||
})
|
// 外省外市
|
||||||
return
|
dataRule.fullScore = [
|
||||||
}
|
{required: true, message: '外地初中生报名请填写当地总分', trigger: 'change'}
|
||||||
if (dataForm.degreeOfEducation == '1' && dataForm.schoolArea == '2' && (dataForm.schoolArea == undefined || dataForm.jsOtherCity == undefined) && state == 20) {
|
]
|
||||||
ElNotification.error({
|
dataRule.otherProvince = [
|
||||||
title: '错误',
|
{required: true, message: '初中生请选择学校归属地和所在省市', trigger: 'change'}
|
||||||
message: '初中生审核请选择学校归属地和所在省市'
|
]
|
||||||
})
|
}
|
||||||
return
|
if(dataForm.schoolArea == '2'){
|
||||||
}
|
// 本省外市
|
||||||
if (dataForm.degreeOfEducation == '1' && dataForm.schoolArea == '3' && (dataForm.schoolArea == undefined || dataForm.otherProvince == undefined) && state == 20) {
|
dataRule.jsOtherCity = [
|
||||||
ElNotification.error({
|
{required: true, message: '初中生请选择学校归属地和所在省市', trigger: 'change'}
|
||||||
title: '错误',
|
]
|
||||||
message: '初中生审核请选择学校归属地和所在省市'
|
}
|
||||||
})
|
}
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
messageBox.confirm(submitTitle).then(() => {
|
// 先进行表单验证,验证成功后再弹出确认框
|
||||||
dataFormRef.value?.validate((valid: boolean) => {
|
dataFormRef.value?.validate((valid: boolean) => {
|
||||||
if (valid) {
|
if (!valid) {
|
||||||
canSubmit.value = false
|
return
|
||||||
if (dataForm.id) {
|
}
|
||||||
// 编辑模式
|
|
||||||
putObj(dataForm).then(() => {
|
// 表单验证通过,弹出确认框
|
||||||
message.success('操作成功')
|
messageBox.confirm(submitTitle).then(() => {
|
||||||
visible.value = false
|
canSubmit.value = false
|
||||||
emit('refreshDataList')
|
if (dataForm.id) {
|
||||||
}).finally(() => {
|
// 编辑模式
|
||||||
canSubmit.value = true
|
putObj(dataForm).then(() => {
|
||||||
})
|
message.success('操作成功')
|
||||||
} else {
|
visible.value = false
|
||||||
// 新增模式
|
emit('refreshDataList')
|
||||||
addObj(dataForm).then(() => {
|
}).finally(() => {
|
||||||
message.success('新增成功')
|
canSubmit.value = true
|
||||||
visible.value = false
|
})
|
||||||
emit('refreshDataList')
|
} else {
|
||||||
}).finally(() => {
|
// 新增模式
|
||||||
canSubmit.value = true
|
addObj(dataForm).then(() => {
|
||||||
})
|
message.success('新增成功')
|
||||||
}
|
visible.value = false
|
||||||
|
emit('refreshDataList')
|
||||||
|
}).finally(() => {
|
||||||
|
canSubmit.value = true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
// 用户取消
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
|
||||||
// 用户取消
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user