正在显示
2 个修改的文件
包含
80 行增加
和
20 行删除
@@ -293,7 +293,7 @@ Page({ | @@ -293,7 +293,7 @@ Page({ | ||
293 | onChange: 'onPickerSelect' | 293 | onChange: 'onPickerSelect' |
294 | }, | 294 | }, |
295 | studystartdate: { | 295 | studystartdate: { |
296 | - label: '受教育日期起', | 296 | + label: '受教育时间起', |
297 | isrequre: true, | 297 | isrequre: true, |
298 | bindtype: 'study_start_date', | 298 | bindtype: 'study_start_date', |
299 | selected: '', | 299 | selected: '', |
@@ -305,16 +305,32 @@ Page({ | @@ -305,16 +305,32 @@ Page({ | ||
305 | fields: "month", | 305 | fields: "month", |
306 | datelong: 0, | 306 | datelong: 0, |
307 | start: '1970-01-01', | 307 | start: '1970-01-01', |
308 | + end: (new Date()).getFullYear() +'-'+ ((new Date()).getMonth()+1), | ||
309 | + // start: (new Date()).getFullYear() + '-09-01',//'1970-01-01', | ||
310 | + // end: (new Date()).getFullYear() + '-09-01', | ||
311 | + // onTap: 'studyDataTap' | ||
312 | + }, | ||
313 | + studyCompleteDate: { | ||
314 | + label: '受教育时间止', | ||
315 | + isrequre: true, | ||
316 | + bindtype: 'study_comp_date', | ||
317 | + selected: '', | ||
318 | + isblack: 'true', | ||
319 | + values: ["是", "否"], | ||
320 | + placeholder: '请选择时间', | ||
321 | + onChange: 'onPickerSelect', | ||
322 | + mode: "date", | ||
323 | + fields: "month", | ||
324 | + start: '1970-01-01', | ||
308 | // start: (new Date()).getFullYear() + '-09-01',//'1970-01-01', | 325 | // start: (new Date()).getFullYear() + '-09-01',//'1970-01-01', |
309 | // end: (new Date()).getFullYear() + '-09-01', | 326 | // end: (new Date()).getFullYear() + '-09-01', |
310 | // onTap: 'studyDataTap' | 327 | // onTap: 'studyDataTap' |
311 | }, | 328 | }, |
312 | studyenddate: { | 329 | studyenddate: { |
313 | label: '教育终止时间', | 330 | label: '教育终止时间', |
314 | - isrequre: true, | 331 | + // isrequre: true, |
315 | bindtype: 'study_end_date', | 332 | bindtype: 'study_end_date', |
316 | selected: '', | 333 | selected: '', |
317 | - isblack: 'true', | ||
318 | values: ["是", "否"], | 334 | values: ["是", "否"], |
319 | placeholder: '请选择时间', | 335 | placeholder: '请选择时间', |
320 | onChange: 'onPickerSelect', | 336 | onChange: 'onPickerSelect', |
@@ -549,7 +565,7 @@ Page({ | @@ -549,7 +565,7 @@ Page({ | ||
549 | studystart_date.label = "入学时间起" | 565 | studystart_date.label = "入学时间起" |
550 | var studyend_date = this.data.studyenddate | 566 | var studyend_date = this.data.studyenddate |
551 | studyend_date.label = "(预计)毕业时间" | 567 | studyend_date.label = "(预计)毕业时间" |
552 | - | 568 | + studyend_date.isrequre = true |
553 | this.setData({ | 569 | this.setData({ |
554 | studystartdate: studystart_date, | 570 | studystartdate: studystart_date, |
555 | studyenddate: studyend_date | 571 | studyenddate: studyend_date |
@@ -703,6 +719,10 @@ Page({ | @@ -703,6 +719,10 @@ Page({ | ||
703 | studystartdate.selected = format.formatTime_month(data.education_start) | 719 | studystartdate.selected = format.formatTime_month(data.education_start) |
704 | studystartdate.datelong = data.education_start | 720 | studystartdate.datelong = data.education_start |
705 | setData.studystartdate = studystartdate | 721 | 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 | ||
706 | var studyenddate = this.data.studyenddate | 726 | var studyenddate = this.data.studyenddate |
707 | studyenddate.selected = format.formatTime_month(data.education_end) | 727 | studyenddate.selected = format.formatTime_month(data.education_end) |
708 | studyenddate.datelong = data.education_end | 728 | studyenddate.datelong = data.education_end |
@@ -1263,15 +1283,19 @@ Page({ | @@ -1263,15 +1283,19 @@ Page({ | ||
1263 | this.showToast('请选择受教育起始日期') | 1283 | this.showToast('请选择受教育起始日期') |
1264 | return | 1284 | return |
1265 | } | 1285 | } |
1266 | - if (this.data.studyenddate.selected.length < 1) { | ||
1267 | - this.showToast('请选择受教育终止日期') | 1286 | + if (this.data.studyCompleteDate.selected.length < 1) { |
1287 | + this.showToast('请选择受教育时间止') | ||
1268 | return | 1288 | return |
1269 | }else{ | 1289 | }else{ |
1270 | - var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) | ||
1271 | - if (this.data.studyenddate.datelong < activedDate) { | ||
1272 | - this.showToast('终止(毕业)日期不符合要求,无法申报') | ||
1273 | - return | ||
1274 | - } | 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 | + // } | ||
1275 | } | 1299 | } |
1276 | if (!formdata.school_name || formdata.school_name.length < 1) { | 1300 | if (!formdata.school_name || formdata.school_name.length < 1) { |
1277 | this.showToast('请填写就读学校') | 1301 | this.showToast('请填写就读学校') |
@@ -1304,6 +1328,7 @@ Page({ | @@ -1304,6 +1328,7 @@ Page({ | ||
1304 | newdata.percent = parseFloat(this.data.childrenpercentData.selected.replace("%","")) | 1328 | newdata.percent = parseFloat(this.data.childrenpercentData.selected.replace("%","")) |
1305 | newdata.children_id_card_type = '1' //this.data.childrencardtypeData.selected | 1329 | newdata.children_id_card_type = '1' //this.data.childrencardtypeData.selected |
1306 | newdata.children_birthday = this.data.commonbirthDate.datelong | 1330 | newdata.children_birthday = this.data.commonbirthDate.datelong |
1331 | + newdata.education_period_end = this.data.studyCompleteDate.datelong | ||
1307 | newdata.education_end = this.data.studyenddate.datelong | 1332 | newdata.education_end = this.data.studyenddate.datelong |
1308 | newdata.education_start = this.data.studystartdate.datelong | 1333 | newdata.education_start = this.data.studystartdate.datelong |
1309 | newdata.education_period = this.data.childedudegreeData.selected | 1334 | newdata.education_period = this.data.childedudegreeData.selected |
@@ -1332,7 +1357,7 @@ Page({ | @@ -1332,7 +1357,7 @@ Page({ | ||
1332 | } else { | 1357 | } else { |
1333 | var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) | 1358 | var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) |
1334 | if (this.data.studyenddate.datelong < activedDate) { | 1359 | if (this.data.studyenddate.datelong < activedDate) { |
1335 | - this.showToast('终止(毕业)日期不符合要求,无法申报') | 1360 | + this.showToast('毕业日期不符合要求,无法申报') |
1336 | return | 1361 | return |
1337 | } | 1362 | } |
1338 | } | 1363 | } |
@@ -1929,12 +1954,45 @@ Page({ | @@ -1929,12 +1954,45 @@ Page({ | ||
1929 | }) | 1954 | }) |
1930 | break; | 1955 | break; |
1931 | case 'study_start_date': | 1956 | case 'study_start_date': |
1957 | + var select_date = e.detail.value | ||
1932 | var study_startdate = this.data.studystartdate | 1958 | var study_startdate = this.data.studystartdate |
1933 | - study_startdate.selected = e.detail.value | ||
1934 | - study_startdate.datelong = (Date.parse(new Date(e.detail.value)) / 1000) | 1959 | + study_startdate.selected = select_date |
1960 | + study_startdate.datelong = (Date.parse(new Date(select_date)) / 1000) | ||
1961 | + //处理两个终止时间的限制 | ||
1962 | + var select_year = select_date.substring(0, 4) | ||
1963 | + var start = select_date | ||
1964 | + if (select_year<2019){ | ||
1965 | + start = '2019-01' | ||
1966 | + } | ||
1967 | + var studyCompleteDate = this.data.studyCompleteDate | ||
1968 | + studyCompleteDate.start = start | ||
1969 | + studyCompleteDate.selected = '' | ||
1970 | + var study_enddate = this.data.studyenddate | ||
1971 | + study_enddate.start = start | ||
1972 | + study_enddate.selected = '' | ||
1973 | + this.setData({ | ||
1974 | + studystartdate: study_startdate, | ||
1975 | + studyCompleteDate: studyCompleteDate, | ||
1976 | + studyenddate: study_enddate | ||
1977 | + }) | ||
1978 | + break; | ||
1979 | + case 'study_comp_date': | ||
1980 | + var studyCompleteDate = this.data.studyCompleteDate | ||
1981 | + studyCompleteDate.selected = e.detail.value | ||
1982 | + 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 = '' | ||
1935 | this.setData({ | 1988 | this.setData({ |
1936 | - studystartdate: study_startdate | 1989 | + studyCompleteDate: studyCompleteDate, |
1990 | + studyenddate: study_enddate | ||
1937 | }) | 1991 | }) |
1992 | + // var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) | ||
1993 | + // if (datelong < activedDate) { | ||
1994 | + // this.showToast('受教育时间止不符合要求,无法申报') | ||
1995 | + // } | ||
1938 | break; | 1996 | break; |
1939 | case 'study_end_date': | 1997 | case 'study_end_date': |
1940 | var study_enddate = this.data.studyenddate | 1998 | var study_enddate = this.data.studyenddate |
@@ -1944,10 +2002,10 @@ Page({ | @@ -1944,10 +2002,10 @@ Page({ | ||
1944 | this.setData({ | 2002 | this.setData({ |
1945 | studyenddate: study_enddate | 2003 | studyenddate: study_enddate |
1946 | }) | 2004 | }) |
1947 | - var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) | ||
1948 | - if (datelong < activedDate){ | ||
1949 | - this.showToast('终止(毕业)日期不符合要求,无法申报') | ||
1950 | - } | 2005 | + // var activedDate = (Date.parse(new Date('2019-01-01')) / 1000) |
2006 | + // if (datelong < activedDate){ | ||
2007 | + // this.showToast('教育终止时间不符合要求,无法申报') | ||
2008 | + // } | ||
1951 | break; | 2009 | break; |
1952 | case 'child_edu_degree': | 2010 | case 'child_edu_degree': |
1953 | var childedudegreeData = this.data.childedudegreeData | 2011 | var childedudegreeData = this.data.childedudegreeData |
@@ -60,8 +60,10 @@ | @@ -60,8 +60,10 @@ | ||
60 | <template is="picker_cell_normal" data="{{...studystartdate}}" /> | 60 | <template is="picker_cell_normal" data="{{...studystartdate}}" /> |
61 | <view class='divide_line_30'></view> | 61 | <view class='divide_line_30'></view> |
62 | 62 | ||
63 | - <template is="picker_cell_normal" data="{{...studyenddate}}" /> | 63 | + <template is="picker_cell_normal" data="{{...studyCompleteDate}}" /> |
64 | + <view class='divide_line_30'></view> | ||
64 | 65 | ||
66 | + <template is="picker_cell_normal" data="{{...studyenddate}}" /> | ||
65 | <view class='divide_line_30'></view> | 67 | <view class='divide_line_30'></view> |
66 | <template is="picker_cell_normal" data="{{...schoolCountryData}}" /> | 68 | <template is="picker_cell_normal" data="{{...schoolCountryData}}" /> |
67 | <view class='divide_line_30'></view> | 69 | <view class='divide_line_30'></view> |
请
注册
或
登录
后发表评论