@@ -1164,23 +1203,34 @@ export default {
cultureList: [],
healthyList: [],
signInfo: {
+ applyInstitutionId: '',
+ applyWorkTypeId: '',
applyName: '',
- applyDataBirth: '',
- applyCardType: 0,
+ applyCardType: 'b7d74045-d984-4822-b0f3-711b15b933ca',
applyCardNumber: '',
applyPhone: '',
applySex: 0,
- workInOrgAddr: '',
- applyUnitAddress: '',
- applyPostcode: '',
- applyMajorYear: '',
- applyPosition: '',
- applyTechnicalTitles: '',
applyUserCardPhoto: '',
applyCultureLevel: 0,
- applyUnitPhone: '',
- applyPhysicalState: 0,
- applyAddress: ''
+ applyFenLei: '1',
+ applyRePeiXunPhoto: '',
+ applyTakeCardPhoto:'',
+ idCardFrontPhoto: '',
+ idCardBackPhoto: '',
+ educationPhoto: '',
+ takeCardTime: '',
+ takeCardNumber: '',
+ cardTimeLimit: '',
+ rePeiXunDate: '',
+ applyHealth: '',
+ applyUnitName: '',
+ applyLeiBie: '企业主要负责人',
+ applyUnitType: '',
+ applyUnitWork: '',
+ applyUnitBelong: '',
+ applySchool: '',
+ applySubject: '',
+ applyZhiCheng: ''
},
previewPhoto: '',
page: {
@@ -1222,7 +1272,9 @@ export default {
classPlanId: ''
},
myTrainList: [],
- teacherList: []
+ teacherList: [],
+ htmlTypeId: '',
+ resignHtmlType: ''
}
},
methods: {
@@ -1270,6 +1322,149 @@ export default {
this.$layer.msg('请先完善个人信息')
}
},
+ // 是否为初训
+ changeIsFirst: function () {
+ var self = this
+ if (this.signInfo.applyFenLei != '1') {
+ this.$nextTick(function () {
+ laydate.render({
+ elem: "#getPaperTime",
+ type: 'date',
+ done: function (value) {
+ self.signInfo.takeCardTime = value
+ }
+ });
+ laydate.render({
+ elem: "#term",
+ type: 'date',
+ done: function (value) {
+ self.signInfo.cardTimeLimit = value
+ }
+ });
+ laydate.render({
+ elem: "#review",
+ type: 'date',
+ done: function (value) {
+ self.signInfo.rePeiXunDate = value
+ }
+ });
+ laydate.render({
+ elem: "#retrain",
+ type: 'date',
+ done: function (value) {
+ self.signInfo.rePeiXunDate = value
+ }
+ });
+ })
+ }
+ },
+ // 是否为初训
+ changeResignIsFirst: function () {
+ var self = this
+ if (this.signedInfo.applyFenLei != '1') {
+ this.$nextTick(function () {
+ laydate.render({
+ elem: "#getPaperTime",
+ type: 'date',
+ done: function (value) {
+ self.signedInfo.takeCardTime = value
+ }
+ });
+ laydate.render({
+ elem: "#term",
+ type: 'date',
+ done: function (value) {
+ self.signedInfo.cardTimeLimit = value
+ }
+ });
+ laydate.render({
+ elem: "#review",
+ type: 'date',
+ done: function (value) {
+ self.signedInfo.rePeiXunDate = value
+ }
+ });
+ laydate.render({
+ elem: "#retrain",
+ type: 'date',
+ done: function (value) {
+ self.signedInfo.rePeiXunDate = value
+ }
+ });
+ })
+ }
+ },
+ // 获取报名页面类型
+ getHtmlType: function () {
+ var self = this
+ axios.get(self.personUrl + 'app/basic-user-info/get-worker-used-html', {
+ params: {
+ workerCatalog: self.workSelectedTypeLv1
+ },
+ headers: {
+ token: self.token
+ }
+ }).then(function (res) {
+ self.htmlTypeId = res.data.parentWorkerCatalog
+ })
+ },
+ // 上传身份证两面
+ uploadIdCard: function (e, type) {
+ var self = this
+ var file = e.target.files[0]
+ var formdata = new FormData()
+ var reader = new FileReader()
+ reader.readAsDataURL(file)
+ formdata.append('image', file)
+ self.isLoading = true
+ axios.post(self.signUrl + 'app/file/uploadimage', formdata, {
+ headers: {
+ token: self.token
+ }
+ }).then(function (res) {
+ self.$layer.msg('上传成功')
+ self.isLoading = false
+ if (type == 'z') {
+ self.personInfo.idCardFront = res.data.data
+ } else if (type == 'f') {
+ self.personInfo.idCardBack = res.data.data
+ } else {
+ self.personInfo.educationPhoto = res.data.data
+ }
+ })
+ },
+ // 上传复训照片
+ uploadTrainPhoto: function (e,type,isRetrain) {
+ var self = this
+ var file = e.target.files[0]
+ var formdata = new FormData()
+ var reader = new FileReader()
+ reader.readAsDataURL(file)
+ formdata.append('image', file)
+ self.isLoading = true
+ axios.post(self.signUrl + 'app/file/uploadimage', formdata, {
+ headers: {
+ token: self.token
+ }
+ }).then(function (res) {
+ self.$layer.msg('上传成功')
+ self.isLoading = false
+ if (isRetrain) {
+ if (type == 'train') {
+ self.signedInfo.applyRePeiXunPhoto = res.data.data
+ } else {
+ self.signedInfo.applyTakeCardPhoto = res.data.data
+ }
+ return
+ }
+ if (type == 'train') {
+ self.signInfo.applyRePeiXunPhoto = res.data.data
+ } else {
+ self.signInfo.applyTakeCardPhoto = res.data.data
+ }
+
+ })
+ },
// 获取我的培训
getMyTrain: function () {
var self = this
@@ -1303,7 +1498,10 @@ export default {
workTitle: self.signInfo.applyPosition,
phone: self.signInfo.applyPhone,
classPlanId: self.curExamPlanId,
- education: self.signInfo.applyCultureLevel
+ education: self.signInfo.applyCultureLevel,
+ isFirst: self.signInfo.isFirst,
+ trainPhoto: self.signInfo.applyRePeiXunPhoto,
+ applyTakeCardPhoto: self.signInfo.applyTakeCardPhoto
}
if (!info.cardType) {
self.$layer.msg('请选择证件类型')
@@ -1361,7 +1559,6 @@ export default {
token: self.token
}
}).then(function (res) {
- console.log(res)
self.examPlanList = res.data.rows
})
},
@@ -1384,7 +1581,6 @@ export default {
},
// 打开培训评价
showScoreBox: function (orgId, planId) {
- console.log(orgId)
var self = this
self.showScore = true
self.scoreInfo.orgId = orgId
@@ -1475,10 +1671,7 @@ export default {
this.$layer.msg('请选择报名工种')
return
}
- if (this.workSelectedTypeLv2 == 0 && this.workTypeLv2.length > 0) {
- this.$layer.msg('请选择报名工种')
- return
- }
+ this.signInfo.applyWorkTypeId = this.workSelectedTypeLv1
this.signStep++
if (this.isExamApply) {
this.getExamPlan()
@@ -1503,6 +1696,7 @@ export default {
var self = this
self.curOrg = orgId
self.signStep++
+ self.signInfo.applyInstitutionId = orgId
this.getPersonInfo(true)
this.getPapersType()
this.getSex()
@@ -1532,12 +1726,64 @@ export default {
}
var info = self.signInfo
- // info['applyClassId'] = planId
- // info['applyClassName'] = name
info['applyInstitutionId'] = self.curOrg
info['applyWorkTypeId'] = type
info['bindUserAccount'] = self.bindUserAccount
info.applyUserCardPhoto = self.personInfo.userPhotoId
+ if (info.applyFenLei != '1' && !info.takeCardTime) {
+ self.$layer.msg('请选择取得证件时间')
+ return
+ }
+ if (info.applyFenLei != '1' && !info.takeCardNumber) {
+ self.$layer.msg('证件号码不能为空!')
+ return
+ }
+ if (info.applyFenLei != '1' && !info.cardTimeLimit && self.htmlTypeId == '530279c5-32a9-44db-bbf0-a04ef1cdae66' ) {
+ self.$layer.msg('请选择证件有效期!')
+ return
+ }
+ // if (info.applyFenLei != '1' && !info.rePeiXunDate && self.htmlTypeId == '530279c5-32a9-44db-bbf0-a04ef1cdae66') {
+ // self.$layer.msg('请选择再培训时间!')
+ // return
+ // }
+ if (!self.signInfo.applyCardNumber) {
+ self.$layer.msg('身份证号不能为空!')
+ return
+ }
+ if (!self.signInfo.applyUnitName) {
+ self.$layer.msg('工作单位不能为空!')
+ return
+ }
+ if (self.htmlTypeId == '530279c5-32a9-44db-bbf0-a04ef1cdae66') {
+ if (!self.signInfo.applyLeiBie) {
+ self.$layer.msg('培训类别不能为空!')
+ return
+ }
+ if (!self.signInfo.applyUnitType) {
+ self.$layer.msg('单位类型不能为空!')
+ return
+ }
+ if (!self.signInfo.applyUnitWork) {
+ self.$layer.msg('职务不能为空!')
+ return
+ }
+ if (!self.signInfo.applyUnitBelong) {
+ self.$layer.msg('单位所在区域不能为空!')
+ return
+ }
+ if (!self.signInfo.applySchool) {
+ self.$layer.msg('毕业院校不能为空!')
+ return
+ }
+ if (!self.signInfo.applySubject) {
+ self.$layer.msg('所学专业不能为空!')
+ return
+ }
+ if (!self.signInfo.applyZhiCheng) {
+ self.$layer.msg('职称不能为空!')
+ return
+ }
+ }
axios.post(self.signUrl + 'app/apply/save', info,{
// axios.post('http://192.168.0.109:8070/signup/app/apply/save', info,{
headers: {
@@ -1583,45 +1829,50 @@ export default {
})
},
// 获取工种
- getWorkType: function (lv, e, value) {
+ getWorkType: function (lv, e, value, isFirst) {
var self = this
var workTypeParentId = 0
var cur
self.isLoading = true
- if (lv == 0) {
- workTypeParentId = self.workSelectedType
- self.workSelectedTypeLv1 = 0
- self.workSelectedTypeLv2 = 0
+ if (self.workSelectedType == 0 && !isFirst) {
self.workTypeLv1 = []
- self.workTypeLv2 = []
- } else if (lv == 1) {
- workTypeParentId = self.workSelectedTypeLv1
- cur = e.target.selectedIndex - 1
- if (cur >= 0) {
- self.promiseText = self.workTypeLv1[cur].workTypeWrittenDocument
- }
- self.workSelectedTypeLv2 = 0
- self.workTypeLv2 = []
- }
- axios.get(self.signUrl + 'app/worktype/listByParentId', {
- params: {
- workTypeParentId: workTypeParentId
- },
- headers: {
- token: self.token
- }
- }).then(function (res) {
- if (lv == null) {
- self.workType = res.data
- } else if (lv == 0) {
- self.workTypeLv1 = res.data
- } else if (lv == 1) {
- if (cur >= 0) {
- self.workTypeLv2 = res.data
- }
- }
self.isLoading = false
- })
+ } else {
+ if (lv == 0) {
+ workTypeParentId = self.workSelectedType
+ self.workSelectedTypeLv1 = 0
+ self.workSelectedTypeLv2 = 0
+ self.workTypeLv1 = []
+ self.workTypeLv2 = []
+ } else if (lv == 1) {
+ workTypeParentId = self.workSelectedTypeLv1
+ cur = e.target.selectedIndex - 1
+ if (cur >= 0) {
+ self.promiseText = self.workTypeLv1[cur].workTypeWrittenDocument
+ }
+ self.workSelectedTypeLv2 = 0
+ self.workTypeLv2 = []
+ }
+ axios.get(self.signUrl + 'app/worktype/listByParentId', {
+ params: {
+ workTypeParentId: workTypeParentId
+ },
+ headers: {
+ token: self.token
+ }
+ }).then(function (res) {
+ if (lv == null) {
+ self.workType = res.data
+ } else if (lv == 0) {
+ self.workTypeLv1 = res.data
+ } else if (lv == 1) {
+ if (cur >= 0) {
+ self.workTypeLv2 = res.data
+ }
+ }
+ self.isLoading = false
+ })
+ }
},
// 获取证件类型
getPapersType: function () {
@@ -1876,8 +2127,9 @@ export default {
})
},
// 查看报名记录
- checkSigned: function (id, isResign) {
+ checkSigned: function (id, isResign, type) {
var self = this
+ self.resignHtmlType = type
axios.get(self.signUrl + 'app/apply/get/'+ id, {
headers: {
token: self.token
@@ -1891,15 +2143,21 @@ export default {
if (!isResign) {
self.signedInfo['isDisabled'] = 1
} else {
- // self.signedInfo['isDisabled'] = 0
self.showResignBtn = true
}
self.checkingSigned = true
+ self.changeResignIsFirst()
})
},
// 提交重新报名
submitResign: function (id) {
var self = this
+ // if (self.signedInfo.applyFenLei != '1') {
+ // if (!self.signedInfo.applyTakeCardPhoto || !self.signedInfo.applyRePeiXunPhoto) {
+ // self.$layer.msg('请上传再培训证明和证书个人信息页照片')
+ // return
+ // }
+ // }
axios.put(self.signUrl + 'app/apply/updateapply/' + id, self.signedInfo, {
headers: {
token: self.token
@@ -1907,8 +2165,9 @@ export default {
}).then(function (res) {
if (res.status == 200) {
self.$layer.msg('修改成功!')
- self.checkingSigned = false
- self.showResignBtn = false
+ self.checkSigned(self.signedInfo.applyId, true, self.signedInfo.applyParentWorkTypeId)
+ // self.checkingSigned = false
+ // self.showResignBtn = false
self.getMyApply()
}
}).catch(function (error) {
@@ -1972,6 +2231,12 @@ export default {
self.bindUserAccount = res.data.bindUserAccount
}
self.personInfo = res.data
+ self.signInfo.idCardFrontPhoto = res.data.idCardFront
+ self.signInfo.idCardBackPhoto = res.data.idCardBack
+ self.signInfo.educationPhoto = res.data.educationPhoto
+ self.signInfo.applyUserCardPhoto = res.data.userPhotoId
+ self.signInfo.applyCardNumber = res.data.idCardNumber
+
if (!res.data.bindUserAccount) {
self.$layer.msg('请先完善个人信息!')
self.tab = 7
@@ -1986,7 +2251,7 @@ export default {
})
} else {
self.bindUserAccount = res.data.bindUserAccount
- self.personInfo['isEdit'] = 0
+ // self.personInfo['isEdit'] = 0
}
self.isLaoding = false
})
@@ -1999,35 +2264,55 @@ export default {
self.$layer.msg('姓名不能为空!')
return
}
- if (!this.personInfo.birthDate) {
- self.$layer.msg('生日不能为空!')
- return
- }
if (this.personInfo.gender == '0') {
self.$layer.msg('请选择性别')
return
}
- if (this.personInfo.nation == '0') {
- self.$layer.msg('请选择民族')
- return
- }
- if (this.personInfo.cardType == '0') {
- self.$layer.msg('请选择证件类型')
- return
- }
if (!this.personInfo.idCardNumber) {
self.$layer.msg('证件号码不能为空')
return
}
- if (!this.personInfo.telephone) {
- self.$layer.msg('联系方式不能为空')
- return
- }
if (!this.personInfo.userPhotoId) {
self.$layer.msg('请上传头像')
return
}
- var phoneReg = /^[1][3,4,5,7,8,9][0-9]{9}$/;
+ // if (!this.personInfo.idCardFront) {
+ // self.$layer.msg('请上传身份证正面照片')
+ // return
+ // }
+ // if (!this.personInfo.idCardBack) {
+ // self.$layer.msg('请上传身份证反面照片')
+ // return
+ // }
+ // if (!this.personInfo.educationPhoto) {
+ // self.$layer.msg('请上传学历证书照片')
+ // return
+ // }
+ if (!this.personInfo.telephone) {
+ self.$layer.msg('联系方式不能为空')
+ return
+ }
+ if (this.personInfo.education == '0') {
+ self.$layer.msg('请选择文化程度')
+ return
+ }
+ // if (!this.personInfo.birthDate) {
+ // self.$layer.msg('生日不能为空!')
+ // return
+ // }
+
+ // if (this.personInfo.nation == '0') {
+ // self.$layer.msg('请选择民族')
+ // return
+ // }
+ // if (this.personInfo.cardType == '0') {
+ // self.$layer.msg('请选择证件类型')
+ // return
+ // }
+
+
+
+ var phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
if (!phoneReg.test(this.personInfo.telephone)) {
self.$layer.msg('手机号格式不正确')
return false;
@@ -2156,13 +2441,31 @@ export default {
this.getNation()
this.getPolitical()
this.getUserInfo()
- this.getWorkType()
+ this.getWorkType(null,null,null,true)
this.getHealthy()
}
}