正在显示
2 个修改的文件
包含
75 行增加
和
62 行删除
... | ... | @@ -311,10 +311,10 @@ Page({ |
311 | 311 | // end: (new Date()).getFullYear() + '-09-01', |
312 | 312 | // onTap: 'studyDataTap' |
313 | 313 | }, |
314 | - studyCompleteDate: { | |
314 | + studyEndDate: { | |
315 | 315 | label: '受教育时间止', |
316 | 316 | isrequre: true, |
317 | - bindtype: 'study_comp_date', | |
317 | + bindtype: 'study_end_date', | |
318 | 318 | selected: '', |
319 | 319 | isblack: 'true', |
320 | 320 | values: ["是", "否"], |
... | ... | @@ -327,10 +327,10 @@ Page({ |
327 | 327 | // end: (new Date()).getFullYear() + '-09-01', |
328 | 328 | // onTap: 'studyDataTap' |
329 | 329 | }, |
330 | - studyenddate: { | |
330 | + studyPeriodDate: { | |
331 | 331 | label: '教育终止时间', |
332 | 332 | // isrequre: true, |
333 | - bindtype: 'study_end_date', | |
333 | + bindtype: 'study_per_date', | |
334 | 334 | selected: '', |
335 | 335 | values: ["是", "否"], |
336 | 336 | placeholder: '请选择时间', |
... | ... | @@ -564,12 +564,12 @@ Page({ |
564 | 564 | this.getCertificates() |
565 | 565 | var studystart_date = this.data.studystartdate |
566 | 566 | studystart_date.label = "入学时间起" |
567 | - var studyend_date = this.data.studyenddate | |
567 | + var studyend_date = this.data.studyEndDate | |
568 | 568 | studyend_date.label = "(预计)毕业时间" |
569 | 569 | studyend_date.isrequre = true |
570 | 570 | this.setData({ |
571 | 571 | studystartdate: studystart_date, |
572 | - studyenddate: studyend_date | |
572 | + studyEndDate: studyend_date | |
573 | 573 | }) |
574 | 574 | } else if ("medical_fund" == options.status) { |
575 | 575 | var cardtype_data = this.data.cardtypeData |
... | ... | @@ -720,14 +720,18 @@ Page({ |
720 | 720 | studystartdate.selected = format.formatTime_month(data.education_start) |
721 | 721 | studystartdate.datelong = data.education_start |
722 | 722 | setData.studystartdate = studystartdate |
723 | - var studyCompleteDate = this.data.studyCompleteDate | |
724 | - studyCompleteDate.selected = format.formatTime_month(data.education_period_end) | |
725 | - studyCompleteDate.datelong = data.education_period_end | |
726 | - setData.studyCompleteDate = studyCompleteDate | |
727 | - var studyenddate = this.data.studyenddate | |
728 | - studyenddate.selected = format.formatTime_month(data.education_end) | |
729 | - studyenddate.datelong = data.education_end | |
730 | - setData.studyenddate = studyenddate | |
723 | + var studyEndDate = this.data.studyEndDate | |
724 | + studyEndDate.selected = format.formatTime_month(data.education_end) | |
725 | + studyEndDate.datelong = data.education_end | |
726 | + setData.studyEndDate = studyEndDate | |
727 | + var studyPeriodDate = this.data.studyPeriodDate | |
728 | + if (data.education_period_end > 0){ | |
729 | + studyPeriodDate.selected = format.formatTime_month(data.education_period_end) | |
730 | + studyPeriodDate.datelong = data.education_period_end | |
731 | + } | |
732 | + studyPeriodDate.start = studystartdate.selected | |
733 | + studyPeriodDate.end = studyEndDate.selected | |
734 | + setData.studyPeriodDate = studyPeriodDate | |
731 | 735 | setData.deduction_amount = data.deduction_amount |
732 | 736 | if (data.children_id_card_no && data.children_id_card_no.length) { |
733 | 737 | setData.children_id_card_no = data.children_id_card_no |
... | ... | @@ -786,10 +790,10 @@ Page({ |
786 | 790 | studystartdate.selected = format.formatTime_month(data.education_start) |
787 | 791 | studystartdate.datelong = data.education_start |
788 | 792 | setData.studystartdate = studystartdate |
789 | - var studyenddate = this.data.studyenddate | |
790 | - studyenddate.selected = format.formatTime_month(data.education_end) | |
791 | - studyenddate.datelong = data.education_end | |
792 | - setData.studyenddate = studyenddate | |
793 | + var studyEndDate = this.data.studyEndDate | |
794 | + studyEndDate.selected = format.formatTime_month(data.education_end) | |
795 | + studyEndDate.datelong = data.education_end | |
796 | + setData.studyEndDate = studyEndDate | |
793 | 797 | |
794 | 798 | } else { |
795 | 799 | setData.edu_lable = 'tech' |
... | ... | @@ -1297,19 +1301,19 @@ Page({ |
1297 | 1301 | this.showToast('请选择受教育起始日期') |
1298 | 1302 | return |
1299 | 1303 | } |
1300 | - if (this.data.studyCompleteDate.selected.length < 1) { | |
1304 | + if (this.data.studyEndDate.selected.length < 1) { | |
1301 | 1305 | this.showToast('请选择受教育时间止') |
1302 | 1306 | return |
1303 | 1307 | }else{ |
1304 | - // var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) | |
1305 | - // if (this.data.studyCompleteDate.datelong < activedDate) { | |
1306 | - // this.showToast('受教育时间止不符合要求,无法申报') | |
1307 | - // return | |
1308 | - // } | |
1309 | - // if (this.data.studyenddate.selected.length > 0 && this.data.studyenddate.datelong < activedDate) { | |
1310 | - // this.showToast('教育终止时间不符合要求,无法申报') | |
1311 | - // return | |
1312 | - // } | |
1308 | + var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) | |
1309 | + if (this.data.studyEndDate.datelong < activedDate) { | |
1310 | + this.showToast('受教育时间止不符合要求,无法申报') | |
1311 | + return | |
1312 | + } | |
1313 | + if (this.data.studyPeriodDate.selected.length > 0 && this.data.studyPeriodDate.datelong < activedDate) { | |
1314 | + this.showToast('教育终止时间不符合要求,无法申报') | |
1315 | + return | |
1316 | + } | |
1313 | 1317 | } |
1314 | 1318 | if (!formdata.school_name || formdata.school_name.length < 1) { |
1315 | 1319 | this.showToast('请填写就读学校') |
... | ... | @@ -1342,8 +1346,8 @@ Page({ |
1342 | 1346 | newdata.percent = parseFloat(this.data.childrenpercentData.selected.replace("%","")) |
1343 | 1347 | newdata.children_id_card_type = '1' //this.data.childrencardtypeData.selected |
1344 | 1348 | newdata.children_birthday = this.data.commonbirthDate.datelong |
1345 | - newdata.education_period_end = this.data.studyCompleteDate.datelong | |
1346 | - newdata.education_end = this.data.studyenddate.datelong | |
1349 | + newdata.education_period_end = this.data.studyPeriodDate.datelong | |
1350 | + newdata.education_end = this.data.studyEndDate.datelong | |
1347 | 1351 | newdata.education_start = this.data.studystartdate.datelong |
1348 | 1352 | newdata.education_period = this.data.childedudegreeData.selected |
1349 | 1353 | newdata.school_country = this.data.schoolCountryData.selected |
... | ... | @@ -1365,18 +1369,18 @@ Page({ |
1365 | 1369 | this.showToast('请选择入学时间') |
1366 | 1370 | return |
1367 | 1371 | } |
1368 | - if (this.data.studyenddate.selected.length < 1) { | |
1372 | + if (this.data.studyEndDate.selected.length < 1) { | |
1369 | 1373 | this.showToast('请选择毕业时间') |
1370 | 1374 | return |
1371 | 1375 | } else { |
1372 | 1376 | var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) |
1373 | - if (this.data.studyenddate.datelong < activedDate) { | |
1377 | + if (this.data.studyEndDate.datelong < activedDate) { | |
1374 | 1378 | this.showToast('毕业日期不符合要求,无法申报') |
1375 | 1379 | return |
1376 | 1380 | } |
1377 | 1381 | } |
1378 | 1382 | newdata.education_start = this.data.studystartdate.datelong |
1379 | - newdata.education_end = this.data.studyenddate.datelong | |
1383 | + newdata.education_end = this.data.studyEndDate.datelong | |
1380 | 1384 | newdata.education_type = 'title' //学历 |
1381 | 1385 | newdata.education_period = this.data.edulevelData.selected |
1382 | 1386 | } else if (this.data.edu_lable == 'tech') { |
... | ... | @@ -1886,11 +1890,11 @@ Page({ |
1886 | 1890 | // }) |
1887 | 1891 | // } else if (e.currentTarget.id == 'study_end_date') { |
1888 | 1892 | // console.log('study_end_date') |
1889 | - // var study_enddate = this.data.studyenddate | |
1893 | + // var study_enddate = this.data.studyEndDate | |
1890 | 1894 | // study_enddate.start = '1970-01-01' |
1891 | 1895 | // study_enddate.end = '' |
1892 | 1896 | // this.setData({ |
1893 | - // studyenddate: study_enddate | |
1897 | + // studyEndDate: study_enddate | |
1894 | 1898 | // }) |
1895 | 1899 | // } |
1896 | 1900 | // }, |
... | ... | @@ -1978,47 +1982,56 @@ Page({ |
1978 | 1982 | if (select_year<2019){ |
1979 | 1983 | start = '2019-01' |
1980 | 1984 | } |
1981 | - var studyCompleteDate = this.data.studyCompleteDate | |
1982 | - studyCompleteDate.start = start | |
1983 | - studyCompleteDate.selected = '' | |
1984 | - var study_enddate = this.data.studyenddate | |
1985 | + var studyPeriodDate = this.data.studyPeriodDate | |
1986 | + studyPeriodDate.start = start | |
1987 | + studyPeriodDate.selected = '' | |
1988 | + studyPeriodDate.datelong = null | |
1989 | + var study_enddate = this.data.studyEndDate | |
1985 | 1990 | study_enddate.start = start |
1986 | 1991 | study_enddate.selected = '' |
1987 | 1992 | this.setData({ |
1988 | 1993 | studystartdate: study_startdate, |
1989 | - studyCompleteDate: studyCompleteDate, | |
1990 | - studyenddate: study_enddate | |
1994 | + studyPeriodDate: studyPeriodDate, | |
1995 | + studyEndDate: study_enddate | |
1991 | 1996 | }) |
1992 | 1997 | break; |
1993 | - case 'study_comp_date': | |
1994 | - var studyCompleteDate = this.data.studyCompleteDate | |
1995 | - studyCompleteDate.selected = e.detail.value | |
1998 | + case 'study_end_date': | |
1999 | + var study_enddate = this.data.studyEndDate | |
2000 | + study_enddate.selected = e.detail.value | |
1996 | 2001 | var datelong = (Date.parse(new Date(e.detail.value)) / 1000) |
1997 | - studyCompleteDate.datelong = datelong | |
1998 | - | |
1999 | - var study_enddate = this.data.studyenddate | |
2000 | - study_enddate.end = e.detail.value | |
2001 | - study_enddate.selected = '' | |
2002 | + study_enddate.datelong = datelong | |
2003 | + | |
2004 | + var studyPeriodDate = this.data.studyPeriodDate | |
2005 | + studyPeriodDate.end = e.detail.value | |
2006 | + studyPeriodDate.selected = '' | |
2007 | + studyPeriodDate.datelong = null | |
2002 | 2008 | this.setData({ |
2003 | - studyCompleteDate: studyCompleteDate, | |
2004 | - studyenddate: study_enddate | |
2009 | + studyPeriodDate: studyPeriodDate, | |
2010 | + studyEndDate: study_enddate | |
2005 | 2011 | }) |
2006 | 2012 | // var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) |
2007 | - // if (datelong < activedDate) { | |
2008 | - // this.showToast('受教育时间止不符合要求,无法申报') | |
2013 | + // if (datelong < activedDate){ | |
2014 | + // this.showToast('教育终止时间不符合要求,无法申报') | |
2009 | 2015 | // } |
2010 | 2016 | break; |
2011 | - case 'study_end_date': | |
2012 | - var study_enddate = this.data.studyenddate | |
2013 | - study_enddate.selected = e.detail.value | |
2017 | + case 'study_per_date': | |
2018 | + var studyPeriodDate = this.data.studyPeriodDate | |
2019 | + studyPeriodDate.selected = e.detail.value | |
2014 | 2020 | var datelong = (Date.parse(new Date(e.detail.value)) / 1000) |
2015 | - study_enddate.datelong = datelong | |
2021 | + studyPeriodDate.datelong = datelong | |
2022 | + if (datelong > this.data.studyEndDate.datelong) { | |
2023 | + wx.showToast({ | |
2024 | + title: '教育终止日应不大于受教育时间止', | |
2025 | + icon:'none' | |
2026 | + }) | |
2027 | + return | |
2028 | + } | |
2016 | 2029 | this.setData({ |
2017 | - studyenddate: study_enddate | |
2030 | + studyPeriodDate: studyPeriodDate, | |
2018 | 2031 | }) |
2019 | 2032 | // var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) |
2020 | - // if (datelong < activedDate){ | |
2021 | - // this.showToast('教育终止时间不符合要求,无法申报') | |
2033 | + // if (datelong < activedDate) { | |
2034 | + // this.showToast('受教育时间止不符合要求,无法申报') | |
2022 | 2035 | // } |
2023 | 2036 | break; |
2024 | 2037 | case 'child_edu_degree': | ... | ... |
... | ... | @@ -60,10 +60,10 @@ |
60 | 60 | <template is="picker_cell_normal" data="{{...studystartdate}}" /> |
61 | 61 | <view class='divide_line_30'></view> |
62 | 62 | |
63 | - <template is="picker_cell_normal" data="{{...studyCompleteDate}}" /> | |
63 | + <template is="picker_cell_normal" data="{{...studyEndDate}}" /> | |
64 | 64 | <view class='divide_line_30'></view> |
65 | 65 | |
66 | - <template is="picker_cell_normal" data="{{...studyenddate}}" /> | |
66 | + <template is="picker_cell_normal" data="{{...studyPeriodDate}}" /> | |
67 | 67 | <view class='divide_line_30'></view> |
68 | 68 | <template is="picker_cell_normal" data="{{...schoolCountryData}}" /> |
69 | 69 | <view class='divide_line_30'></view> | ... | ... |
请
注册
或
登录
后发表评论