正在显示
1 个修改的文件
包含
12 行增加
和
2 行删除
@@ -135,8 +135,6 @@ Page({ | @@ -135,8 +135,6 @@ Page({ | ||
135 | placeholder: '出生日期', | 135 | placeholder: '出生日期', |
136 | mode: "date", | 136 | mode: "date", |
137 | fields: "day", | 137 | fields: "day", |
138 | - start: '1970-01-01', | ||
139 | - end: '2018-01-01', | ||
140 | onChange: 'onPickerSelect', | 138 | onChange: 'onPickerSelect', |
141 | }, | 139 | }, |
142 | childedudegreeData: { | 140 | childedudegreeData: { |
@@ -1316,6 +1314,7 @@ Page({ | @@ -1316,6 +1314,7 @@ Page({ | ||
1316 | children_name: id_info.name, | 1314 | children_name: id_info.name, |
1317 | commonbirthDate: that.data.commonbirthDate | 1315 | commonbirthDate: that.data.commonbirthDate |
1318 | } | 1316 | } |
1317 | + that.dealBrithDate(info.birthDay)//根据出生日期 计算 学前受教育时间 | ||
1319 | if (format.getAge(birth_day) < 3) { | 1318 | if (format.getAge(birth_day) < 3) { |
1320 | that.showToast('子女年龄小于3岁,不可申报') | 1319 | that.showToast('子女年龄小于3岁,不可申报') |
1321 | } | 1320 | } |
@@ -2121,6 +2120,15 @@ Page({ | @@ -2121,6 +2120,15 @@ Page({ | ||
2121 | break; | 2120 | break; |
2122 | } | 2121 | } |
2123 | }, | 2122 | }, |
2123 | + //根据出生日期 计算 学前受教育时间 | ||
2124 | + dealBrithDate: function (birthDay){ | ||
2125 | + if (this.data.childedudegreeData.selected == '学前教育阶段') { | ||
2126 | + var year = birthDay.substring(0, 4) | ||
2127 | + year = parseInt(year) + 3 | ||
2128 | + var month = birthDay.substring(4, 7) | ||
2129 | + this.handleStartDate(year + month, true) //处理受教育时间起的逻辑 | ||
2130 | + } | ||
2131 | + }, | ||
2124 | //根据身份证号码,获取相关信息 | 2132 | //根据身份证号码,获取相关信息 |
2125 | dealIdInfo: function (idCardNum, idcard_belong) { | 2133 | dealIdInfo: function (idCardNum, idcard_belong) { |
2126 | var info = format.analyzeIDCard(idCardNum) | 2134 | var info = format.analyzeIDCard(idCardNum) |
@@ -2132,6 +2140,7 @@ Page({ | @@ -2132,6 +2140,7 @@ Page({ | ||
2132 | data = { | 2140 | data = { |
2133 | commonbirthDate: this.data.commonbirthDate | 2141 | commonbirthDate: this.data.commonbirthDate |
2134 | } | 2142 | } |
2143 | + this.dealBrithDate(info.birthDay)//根据出生日期 计算 学前受教育时间 | ||
2135 | if (info.age<3){ | 2144 | if (info.age<3){ |
2136 | this.showToast('子女年龄小于3岁,不可申报') | 2145 | this.showToast('子女年龄小于3岁,不可申报') |
2137 | } | 2146 | } |
@@ -2471,6 +2480,7 @@ Page({ | @@ -2471,6 +2480,7 @@ Page({ | ||
2471 | case 'commonbirthday': | 2480 | case 'commonbirthday': |
2472 | var children_birthDate = this.data.commonbirthDate | 2481 | var children_birthDate = this.data.commonbirthDate |
2473 | children_birthDate.selected = e.detail.value | 2482 | children_birthDate.selected = e.detail.value |
2483 | + this.dealBrithDate(e.detail.value)//根据出生日期 计算 学前受教育时间 | ||
2474 | children_birthDate.datelong = (Date.parse(new Date(e.detail.value)) / 1000) | 2484 | children_birthDate.datelong = (Date.parse(new Date(e.detail.value)) / 1000) |
2475 | this.setData({ | 2485 | this.setData({ |
2476 | commonbirthDate: children_birthDate | 2486 | commonbirthDate: children_birthDate |
请
注册
或
登录
后发表评论