正在显示
2 个修改的文件
包含
90 行增加
和
63 行删除
... | ... | @@ -185,6 +185,7 @@ Page({ |
185 | 185 | }, |
186 | 186 | certificateDate: { |
187 | 187 | label: '证书名称', |
188 | + maxWidth: 460, | |
188 | 189 | isrequre: true, |
189 | 190 | bindtype: 'certificate', |
190 | 191 | values: [], |
... | ... | @@ -310,10 +311,10 @@ Page({ |
310 | 311 | // end: (new Date()).getFullYear() + '-09-01', |
311 | 312 | // onTap: 'studyDataTap' |
312 | 313 | }, |
313 | - studyCompleteDate: { | |
314 | + studyEndDate: { | |
314 | 315 | label: '受教育时间止', |
315 | 316 | isrequre: true, |
316 | - bindtype: 'study_comp_date', | |
317 | + bindtype: 'study_end_date', | |
317 | 318 | selected: '', |
318 | 319 | isblack: 'true', |
319 | 320 | values: ["是", "否"], |
... | ... | @@ -326,10 +327,10 @@ Page({ |
326 | 327 | // end: (new Date()).getFullYear() + '-09-01', |
327 | 328 | // onTap: 'studyDataTap' |
328 | 329 | }, |
329 | - studyenddate: { | |
330 | + studyPeriodDate: { | |
330 | 331 | label: '教育终止时间', |
331 | 332 | // isrequre: true, |
332 | - bindtype: 'study_end_date', | |
333 | + bindtype: 'study_per_date', | |
333 | 334 | selected: '', |
334 | 335 | values: ["是", "否"], |
335 | 336 | placeholder: '请选择时间', |
... | ... | @@ -563,12 +564,12 @@ Page({ |
563 | 564 | this.getCertificates() |
564 | 565 | var studystart_date = this.data.studystartdate |
565 | 566 | studystart_date.label = "入学时间起" |
566 | - var studyend_date = this.data.studyenddate | |
567 | + var studyend_date = this.data.studyEndDate | |
567 | 568 | studyend_date.label = "(预计)毕业时间" |
568 | 569 | studyend_date.isrequre = true |
569 | 570 | this.setData({ |
570 | 571 | studystartdate: studystart_date, |
571 | - studyenddate: studyend_date | |
572 | + studyEndDate: studyend_date | |
572 | 573 | }) |
573 | 574 | } else if ("medical_fund" == options.status) { |
574 | 575 | var cardtype_data = this.data.cardtypeData |
... | ... | @@ -719,14 +720,18 @@ Page({ |
719 | 720 | studystartdate.selected = format.formatTime_month(data.education_start) |
720 | 721 | studystartdate.datelong = data.education_start |
721 | 722 | setData.studystartdate = studystartdate |
722 | - var studyCompleteDate = this.data.studyCompleteDate | |
723 | - studyCompleteDate.selected = format.formatTime_month(data.education_period_end) | |
724 | - studyCompleteDate.datelong = data.education_period_end | |
725 | - setData.studyCompleteDate = studyCompleteDate | |
726 | - var studyenddate = this.data.studyenddate | |
727 | - studyenddate.selected = format.formatTime_month(data.education_end) | |
728 | - studyenddate.datelong = data.education_end | |
729 | - 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 | |
730 | 735 | setData.deduction_amount = data.deduction_amount |
731 | 736 | if (data.children_id_card_no && data.children_id_card_no.length) { |
732 | 737 | setData.children_id_card_no = data.children_id_card_no |
... | ... | @@ -785,20 +790,23 @@ Page({ |
785 | 790 | studystartdate.selected = format.formatTime_month(data.education_start) |
786 | 791 | studystartdate.datelong = data.education_start |
787 | 792 | setData.studystartdate = studystartdate |
788 | - var studyenddate = this.data.studyenddate | |
789 | - studyenddate.selected = format.formatTime_month(data.education_end) | |
790 | - studyenddate.datelong = data.education_end | |
791 | - 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 | |
792 | 797 | |
793 | 798 | } else { |
794 | 799 | setData.edu_lable = 'tech' |
795 | 800 | var edutypeData = this.data.edutypeData |
796 | 801 | edutypeData.selected = "职业资格继续教育" |
797 | 802 | var edustyleData = this.data.edustyleData |
803 | + var certificateDate = this.data.certificateDate | |
798 | 804 | if (data.education_type == 'major'){ |
799 | 805 | edustyleData.selected = "专业技术人员职业资格" |
806 | + // certificateDate.values = this.major_cers // 网络延迟 | |
800 | 807 | } else if (data.education_type == 'profession'){ |
801 | 808 | edustyleData.selected = "技能人员职业资格" |
809 | + // certificateDate.values = this.profs_cers // 网络延迟 | |
802 | 810 | } |
803 | 811 | setData.edutypeData = edutypeData |
804 | 812 | setData.edustyleData = edustyleData |
... | ... | @@ -808,7 +816,6 @@ Page({ |
808 | 816 | setData.applydate = applydate |
809 | 817 | |
810 | 818 | if (data.certification_name && data.certification_name.length) { |
811 | - var certificateDate = this.data.certificateDate | |
812 | 819 | certificateDate.selected = data.certification_name |
813 | 820 | setData.certificateDate = certificateDate |
814 | 821 | } |
... | ... | @@ -1222,6 +1229,17 @@ Page({ |
1222 | 1229 | console.log('certification', res) |
1223 | 1230 | that.profs_cers = res.data.profession_certificates |
1224 | 1231 | that.major_cers = res.data.major_certificates |
1232 | + | |
1233 | + var certificateDate = that.data.certificateDate | |
1234 | + if (that.data.edustyleData.selected == "专业技术人员职业资格"){ | |
1235 | + certificateDate.values = that.major_cers | |
1236 | + } else if (that.data.edustyleData.selected == '技能人员职业资格') { | |
1237 | + certificateDate.values = that.profs_cers | |
1238 | + } | |
1239 | + that.setData({ | |
1240 | + certificateDate: certificateDate | |
1241 | + }) | |
1242 | + | |
1225 | 1243 | }, |
1226 | 1244 | fail(res) { |
1227 | 1245 | console.log(res) |
... | ... | @@ -1283,19 +1301,19 @@ Page({ |
1283 | 1301 | this.showToast('请选择受教育起始日期') |
1284 | 1302 | return |
1285 | 1303 | } |
1286 | - if (this.data.studyCompleteDate.selected.length < 1) { | |
1304 | + if (this.data.studyEndDate.selected.length < 1) { | |
1287 | 1305 | this.showToast('请选择受教育时间止') |
1288 | 1306 | return |
1289 | 1307 | }else{ |
1290 | - // var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) | |
1291 | - // if (this.data.studyCompleteDate.datelong < activedDate) { | |
1292 | - // this.showToast('受教育时间止不符合要求,无法申报') | |
1293 | - // return | |
1294 | - // } | |
1295 | - // if (this.data.studyenddate.selected.length > 0 && this.data.studyenddate.datelong < activedDate) { | |
1296 | - // this.showToast('教育终止时间不符合要求,无法申报') | |
1297 | - // return | |
1298 | - // } | |
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 | + } | |
1299 | 1317 | } |
1300 | 1318 | if (!formdata.school_name || formdata.school_name.length < 1) { |
1301 | 1319 | this.showToast('请填写就读学校') |
... | ... | @@ -1328,8 +1346,8 @@ Page({ |
1328 | 1346 | newdata.percent = parseFloat(this.data.childrenpercentData.selected.replace("%","")) |
1329 | 1347 | newdata.children_id_card_type = '1' //this.data.childrencardtypeData.selected |
1330 | 1348 | newdata.children_birthday = this.data.commonbirthDate.datelong |
1331 | - newdata.education_period_end = this.data.studyCompleteDate.datelong | |
1332 | - newdata.education_end = this.data.studyenddate.datelong | |
1349 | + newdata.education_period_end = this.data.studyPeriodDate.datelong | |
1350 | + newdata.education_end = this.data.studyEndDate.datelong | |
1333 | 1351 | newdata.education_start = this.data.studystartdate.datelong |
1334 | 1352 | newdata.education_period = this.data.childedudegreeData.selected |
1335 | 1353 | newdata.school_country = this.data.schoolCountryData.selected |
... | ... | @@ -1351,18 +1369,18 @@ Page({ |
1351 | 1369 | this.showToast('请选择入学时间') |
1352 | 1370 | return |
1353 | 1371 | } |
1354 | - if (this.data.studyenddate.selected.length < 1) { | |
1372 | + if (this.data.studyEndDate.selected.length < 1) { | |
1355 | 1373 | this.showToast('请选择毕业时间') |
1356 | 1374 | return |
1357 | 1375 | } else { |
1358 | 1376 | var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) |
1359 | - if (this.data.studyenddate.datelong < activedDate) { | |
1377 | + if (this.data.studyEndDate.datelong < activedDate) { | |
1360 | 1378 | this.showToast('毕业日期不符合要求,无法申报') |
1361 | 1379 | return |
1362 | 1380 | } |
1363 | 1381 | } |
1364 | 1382 | newdata.education_start = this.data.studystartdate.datelong |
1365 | - newdata.education_end = this.data.studyenddate.datelong | |
1383 | + newdata.education_end = this.data.studyEndDate.datelong | |
1366 | 1384 | newdata.education_type = 'title' //学历 |
1367 | 1385 | newdata.education_period = this.data.edulevelData.selected |
1368 | 1386 | } else if (this.data.edu_lable == 'tech') { |
... | ... | @@ -1872,11 +1890,11 @@ Page({ |
1872 | 1890 | // }) |
1873 | 1891 | // } else if (e.currentTarget.id == 'study_end_date') { |
1874 | 1892 | // console.log('study_end_date') |
1875 | - // var study_enddate = this.data.studyenddate | |
1893 | + // var study_enddate = this.data.studyEndDate | |
1876 | 1894 | // study_enddate.start = '1970-01-01' |
1877 | 1895 | // study_enddate.end = '' |
1878 | 1896 | // this.setData({ |
1879 | - // studyenddate: study_enddate | |
1897 | + // studyEndDate: study_enddate | |
1880 | 1898 | // }) |
1881 | 1899 | // } |
1882 | 1900 | // }, |
... | ... | @@ -1964,47 +1982,56 @@ Page({ |
1964 | 1982 | if (select_year<2019){ |
1965 | 1983 | start = '2019-01' |
1966 | 1984 | } |
1967 | - var studyCompleteDate = this.data.studyCompleteDate | |
1968 | - studyCompleteDate.start = start | |
1969 | - studyCompleteDate.selected = '' | |
1970 | - 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 | |
1971 | 1990 | study_enddate.start = start |
1972 | 1991 | study_enddate.selected = '' |
1973 | 1992 | this.setData({ |
1974 | 1993 | studystartdate: study_startdate, |
1975 | - studyCompleteDate: studyCompleteDate, | |
1976 | - studyenddate: study_enddate | |
1994 | + studyPeriodDate: studyPeriodDate, | |
1995 | + studyEndDate: study_enddate | |
1977 | 1996 | }) |
1978 | 1997 | break; |
1979 | - case 'study_comp_date': | |
1980 | - var studyCompleteDate = this.data.studyCompleteDate | |
1981 | - studyCompleteDate.selected = e.detail.value | |
1998 | + case 'study_end_date': | |
1999 | + var study_enddate = this.data.studyEndDate | |
2000 | + study_enddate.selected = e.detail.value | |
1982 | 2001 | var datelong = (Date.parse(new Date(e.detail.value)) / 1000) |
1983 | - studyCompleteDate.datelong = datelong | |
1984 | - | |
1985 | - var study_enddate = this.data.studyenddate | |
1986 | - study_enddate.end = e.detail.value | |
1987 | - 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 | |
1988 | 2008 | this.setData({ |
1989 | - studyCompleteDate: studyCompleteDate, | |
1990 | - studyenddate: study_enddate | |
2009 | + studyPeriodDate: studyPeriodDate, | |
2010 | + studyEndDate: study_enddate | |
1991 | 2011 | }) |
1992 | 2012 | // var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) |
1993 | - // if (datelong < activedDate) { | |
1994 | - // this.showToast('受教育时间止不符合要求,无法申报') | |
2013 | + // if (datelong < activedDate){ | |
2014 | + // this.showToast('教育终止时间不符合要求,无法申报') | |
1995 | 2015 | // } |
1996 | 2016 | break; |
1997 | - case 'study_end_date': | |
1998 | - var study_enddate = this.data.studyenddate | |
1999 | - study_enddate.selected = e.detail.value | |
2017 | + case 'study_per_date': | |
2018 | + var studyPeriodDate = this.data.studyPeriodDate | |
2019 | + studyPeriodDate.selected = e.detail.value | |
2000 | 2020 | var datelong = (Date.parse(new Date(e.detail.value)) / 1000) |
2001 | - 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 | + } | |
2002 | 2029 | this.setData({ |
2003 | - studyenddate: study_enddate | |
2030 | + studyPeriodDate: studyPeriodDate, | |
2004 | 2031 | }) |
2005 | 2032 | // var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) |
2006 | - // if (datelong < activedDate){ | |
2007 | - // this.showToast('教育终止时间不符合要求,无法申报') | |
2033 | + // if (datelong < activedDate) { | |
2034 | + // this.showToast('受教育时间止不符合要求,无法申报') | |
2008 | 2035 | // } |
2009 | 2036 | break; |
2010 | 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> | ... | ... |
请
注册
或
登录
后发表评论