提交 48cbd555cc0029b99c21a152a70d9cb52506f7a0

作者 pangy
2 个父辈 c16948ce 6e798613

Merge branch 'dev_py' into dev2.0

@@ -1089,6 +1089,12 @@ Page({ @@ -1089,6 +1089,12 @@ Page({
1089 if (this.data.studyenddate.selected.length < 1) { 1089 if (this.data.studyenddate.selected.length < 1) {
1090 this.showToast('请选择受教育终止日期') 1090 this.showToast('请选择受教育终止日期')
1091 return 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 if (!formdata.school_name || formdata.school_name.length < 1) { 1099 if (!formdata.school_name || formdata.school_name.length < 1) {
1094 this.showToast('请选择就读学校') 1100 this.showToast('请选择就读学校')
@@ -1146,6 +1152,12 @@ Page({ @@ -1146,6 +1152,12 @@ Page({
1146 if (this.data.studyenddate.selected.length < 1) { 1152 if (this.data.studyenddate.selected.length < 1) {
1147 this.showToast('请选择受毕业时间') 1153 this.showToast('请选择受毕业时间')
1148 return 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 newdata.education_start = this.data.studystartdate.datelong 1162 newdata.education_start = this.data.studystartdate.datelong
1151 newdata.education_end = this.data.studyenddate.datelong 1163 newdata.education_end = this.data.studyenddate.datelong
@@ -1159,6 +1171,14 @@ Page({ @@ -1159,6 +1171,14 @@ Page({
1159 if (this.data.applydate.selected.length < 1) { 1171 if (this.data.applydate.selected.length < 1) {
1160 this.showToast('请选择发证日期') 1172 this.showToast('请选择发证日期')
1161 return 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 if (!formdata.certification_name || formdata.certification_name.length < 1) { 1183 if (!formdata.certification_name || formdata.certification_name.length < 1) {
1164 this.showToast('请填写证书名称') 1184 this.showToast('请填写证书名称')
@@ -1390,10 +1410,18 @@ Page({ @@ -1390,10 +1410,18 @@ Page({
1390 } else if (this.data.leasestartDate.selected.length < 1) { 1410 } else if (this.data.leasestartDate.selected.length < 1) {
1391 this.showToast('请选择日期') 1411 this.showToast('请选择日期')
1392 return 1412 return
1393 - } else if (this.data.leaseendDate.selected.length < 1) { 1413 + }
  1414 + if (this.data.leaseendDate.selected.length < 1) {
1394 this.showToast('请选择日期') 1415 this.showToast('请选择日期')
1395 return 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 newdata.owner_type = this.data.leasetypeData.selected 1425 newdata.owner_type = this.data.leasetypeData.selected
1398 newdata.rent_start = this.data.leasestartDate.datelong 1426 newdata.rent_start = this.data.leasestartDate.datelong
1399 newdata.rent_end = this.data.leaseendDate.datelong 1427 newdata.rent_end = this.data.leaseendDate.datelong
@@ -1717,10 +1745,15 @@ Page({ @@ -1717,10 +1745,15 @@ Page({
1717 case 'study_end_date': 1745 case 'study_end_date':
1718 var study_enddate = this.data.studyenddate 1746 var study_enddate = this.data.studyenddate
1719 study_enddate.selected = e.detail.value 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 this.setData({ 1750 this.setData({
1722 studyenddate: study_enddate 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 break; 1757 break;
1725 case 'child_edu_degree': 1758 case 'child_edu_degree':
1726 var childedudegreeData = this.data.childedudegreeData 1759 var childedudegreeData = this.data.childedudegreeData
@@ -1837,7 +1870,11 @@ Page({ @@ -1837,7 +1870,11 @@ Page({
1837 this.setData({ 1870 this.setData({
1838 applydate: apply_date 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 break; 1878 break;
1842 case 'cardtype': 1879 case 'cardtype':
1843 var cardtype_Data = this.data.cardtypeData 1880 var cardtype_Data = this.data.cardtypeData
@@ -1922,6 +1959,10 @@ Page({ @@ -1922,6 +1959,10 @@ Page({
1922 this.setData({ 1959 this.setData({
1923 leaseendDate: leaseend_Date 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 break; 1966 break;
1926 case 'bank': 1967 case 'bank':
1927 var bank_data = this.data.bankInfo 1968 var bank_data = this.data.bankInfo
@@ -277,6 +277,16 @@ Page({ @@ -277,6 +277,16 @@ Page({
277 this.showtoast('证照号码有误'); 277 this.showtoast('证照号码有误');
278 return 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 var name = formdata.person_name.length ? formdata.person_name : this.data.name 290 var name = formdata.person_name.length ? formdata.person_name : this.data.name
281 if (name.length < 1 ) { 291 if (name.length < 1 ) {
282 this.showtoast('姓名未填写'); 292 this.showtoast('姓名未填写');
@@ -290,19 +300,17 @@ Page({ @@ -290,19 +300,17 @@ Page({
290 return 300 return
291 } 301 }
292 if (this.data.genderData.selected == '男') { 302 if (this.data.genderData.selected == '男') {
293 - var rel = this.data.relativeData.selected  
294 if (rel == '女'){ 303 if (rel == '女'){
295 this.showtoast('关系和性别冲突'); 304 this.showtoast('关系和性别冲突');
296 return 305 return
297 } 306 }
298 }else{ 307 }else{
299 - var rel = this.data.relativeData.selected  
300 if (rel == '子') { 308 if (rel == '子') {
301 this.showtoast('关系和性别冲突'); 309 this.showtoast('关系和性别冲突');
302 return 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 this.showtoast('关系和性别冲突'); 314 this.showtoast('关系和性别冲突');
307 return 315 return
308 } 316 }
注册登录 后发表评论