提交 36876cfdadb4efc4c5636e0d36e3b9d25931cc1b

作者 pangy
1 个父辈 d5053091

终止日期 不得晚于2019年

... ... @@ -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
... ...
注册登录 后发表评论