正在显示
2 个修改的文件
包含
56 行增加
和
7 行删除
... | ... | @@ -1089,6 +1089,12 @@ Page({ |
1089 | 1089 | if (this.data.studyenddate.selected.length < 1) { |
1090 | 1090 | this.showToast('请选择受教育终止日期') |
1091 | 1091 | return |
1092 | + }else{ | |
1093 | + var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) | |
1094 | + if (this.data.studyenddate.datelong < activedDate) { | |
1095 | + this.showToast('终止(毕业)日期不符合要求,无法申报') | |
1096 | + return | |
1097 | + } | |
1092 | 1098 | } |
1093 | 1099 | if (!formdata.school_name || formdata.school_name.length < 1) { |
1094 | 1100 | this.showToast('请选择就读学校') |
... | ... | @@ -1146,6 +1152,12 @@ Page({ |
1146 | 1152 | if (this.data.studyenddate.selected.length < 1) { |
1147 | 1153 | this.showToast('请选择受毕业时间') |
1148 | 1154 | return |
1155 | + } else { | |
1156 | + var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) | |
1157 | + if (this.data.studyenddate.datelong < activedDate) { | |
1158 | + this.showToast('终止(毕业)日期不符合要求,无法申报') | |
1159 | + return | |
1160 | + } | |
1149 | 1161 | } |
1150 | 1162 | newdata.education_start = this.data.studystartdate.datelong |
1151 | 1163 | newdata.education_end = this.data.studyenddate.datelong |
... | ... | @@ -1159,6 +1171,14 @@ Page({ |
1159 | 1171 | if (this.data.applydate.selected.length < 1) { |
1160 | 1172 | this.showToast('请选择发证日期') |
1161 | 1173 | return |
1174 | + } else { | |
1175 | + // var d = new Date(); | |
1176 | + // var curYear = d.getFullYear(); | |
1177 | + var selYear = this.data.applydate.selected.substring(0, 4); | |
1178 | + if (selYear < 2019) { | |
1179 | + this.showToast('发证(批准)日期不符合要求,无法申报') | |
1180 | + return | |
1181 | + } | |
1162 | 1182 | } |
1163 | 1183 | if (!formdata.certification_name || formdata.certification_name.length < 1) { |
1164 | 1184 | this.showToast('请填写证书名称') |
... | ... | @@ -1390,10 +1410,18 @@ Page({ |
1390 | 1410 | } else if (this.data.leasestartDate.selected.length < 1) { |
1391 | 1411 | this.showToast('请选择日期') |
1392 | 1412 | return |
1393 | - } else if (this.data.leaseendDate.selected.length < 1) { | |
1413 | + } | |
1414 | + if (this.data.leaseendDate.selected.length < 1) { | |
1394 | 1415 | this.showToast('请选择日期') |
1395 | 1416 | return |
1417 | + } else { | |
1418 | + var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) | |
1419 | + if (this.data.leaseendDate.datelong < activedDate) { | |
1420 | + this.showToast('终止日期不符合要求,无法申报') | |
1421 | + return | |
1422 | + } | |
1396 | 1423 | } |
1424 | + | |
1397 | 1425 | newdata.owner_type = this.data.leasetypeData.selected |
1398 | 1426 | newdata.rent_start = this.data.leasestartDate.datelong |
1399 | 1427 | newdata.rent_end = this.data.leaseendDate.datelong |
... | ... | @@ -1717,10 +1745,15 @@ Page({ |
1717 | 1745 | case 'study_end_date': |
1718 | 1746 | var study_enddate = this.data.studyenddate |
1719 | 1747 | study_enddate.selected = e.detail.value |
1720 | - study_enddate.datelong = (Date.parse(new Date(e.detail.value)) / 1000) | |
1748 | + var datelong = (Date.parse(new Date(e.detail.value)) / 1000) | |
1749 | + study_enddate.datelong = datelong | |
1721 | 1750 | this.setData({ |
1722 | 1751 | studyenddate: study_enddate |
1723 | 1752 | }) |
1753 | + var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) | |
1754 | + if (datelong < activedDate){ | |
1755 | + this.showToast('终止(毕业)日期不符合要求,无法申报') | |
1756 | + } | |
1724 | 1757 | break; |
1725 | 1758 | case 'child_edu_degree': |
1726 | 1759 | var childedudegreeData = this.data.childedudegreeData |
... | ... | @@ -1837,7 +1870,11 @@ Page({ |
1837 | 1870 | this.setData({ |
1838 | 1871 | applydate: apply_date |
1839 | 1872 | }) |
1840 | - break; | |
1873 | + var selYear = apply_date.selected.substring(0, 4); | |
1874 | + if (selYear < 2019) { | |
1875 | + this.showToast('发证(批准)日期不符合要求,无法申报') | |
1876 | + return | |
1877 | + } | |
1841 | 1878 | break; |
1842 | 1879 | case 'cardtype': |
1843 | 1880 | var cardtype_Data = this.data.cardtypeData |
... | ... | @@ -1922,6 +1959,10 @@ Page({ |
1922 | 1959 | this.setData({ |
1923 | 1960 | leaseendDate: leaseend_Date |
1924 | 1961 | }) |
1962 | + var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) | |
1963 | + if (leaseend_Date.datelong < activedDate) { | |
1964 | + this.showToast('终止日期不符合要求,无法申报') | |
1965 | + } | |
1925 | 1966 | break; |
1926 | 1967 | case 'bank': |
1927 | 1968 | var bank_data = this.data.bankInfo | ... | ... |
... | ... | @@ -277,6 +277,16 @@ Page({ |
277 | 277 | this.showtoast('证照号码有误'); |
278 | 278 | return |
279 | 279 | } |
280 | + var rel = this.data.relativeData.selected | |
281 | + var hostInfo = format.analyzeIDCard(app.globalData.hostInfo.id_card_no) | |
282 | + if ((rel == '子' || rel =='女') && formdata.age > hostInfo.age) { | |
283 | + this.showtoast('子女年龄有误'); | |
284 | + return | |
285 | + } | |
286 | + if (rel == '父母' && formdata.age < hostInfo.age) { | |
287 | + this.showtoast('父母年龄有误'); | |
288 | + return | |
289 | + } | |
280 | 290 | var name = formdata.person_name.length ? formdata.person_name : this.data.name |
281 | 291 | if (name.length < 1 ) { |
282 | 292 | this.showtoast('姓名未填写'); |
... | ... | @@ -290,19 +300,17 @@ Page({ |
290 | 300 | return |
291 | 301 | } |
292 | 302 | if (this.data.genderData.selected == '男') { |
293 | - var rel = this.data.relativeData.selected | |
294 | 303 | if (rel == '女'){ |
295 | 304 | this.showtoast('关系和性别冲突'); |
296 | 305 | return |
297 | 306 | } |
298 | 307 | }else{ |
299 | - var rel = this.data.relativeData.selected | |
300 | 308 | if (rel == '子') { |
301 | 309 | this.showtoast('关系和性别冲突'); |
302 | 310 | return |
303 | 311 | } |
304 | - } | |
305 | - if (this.data.genderData.selected == app.globalData.hostInfo.gender) { | |
312 | + } | |
313 | + if (rel == '配偶' && this.data.genderData.selected == app.globalData.hostInfo.gender) { | |
306 | 314 | this.showtoast('关系和性别冲突'); |
307 | 315 | return |
308 | 316 | } | ... | ... |
请
注册
或
登录
后发表评论