提交 b5b583c33dafb4a1b8db43250b4d7b9d32e1178c

作者 pangy
1 个父辈 e6155db5

被赡养人小于60岁不可申报

... ... @@ -239,10 +239,11 @@ Page({
239 239 olderbirthDate: {
240 240 label: '被赡养人出生日期',
241 241 isrequre: true,
  242 + disabled: true,
242 243 bindtype: 'olderbirthday',
243 244 selected: '',
244 245 isblack: 'true',
245   - placeholder: '请选择日期',
  246 + placeholder: '出生日期',
246 247 mode: "date",
247 248 fields: "day",
248 249 start: '1970-01-01',
... ... @@ -772,6 +773,10 @@ Page({
772 773 break;
773 774 case 'support_duty':
774 775 var setData = {}
  776 + var olderbirthDate = this.data.olderbirthDate
  777 + olderbirthDate.selected = format.formatTime_date(data.birth_date)
  778 + olderbirthDate.datelong = data.birth_date
  779 + setData.olderbirthDate = olderbirthDate
775 780 if (data.name && data.name.length) {
776 781 setData.supported_name = data.name
777 782 }
... ... @@ -779,12 +784,6 @@ Page({
779 784 setData.id_card_no = data.id_card_no
780 785 this.dealIdInfo(data.id_card_no, 'older_id_card_no_input')
781 786 }
782   - if (data.birth_date && data.birth_date.length) {
783   - var olderbirthDate = this.data.olderbirthDate
784   - olderbirthDate.selected = format.formatTime_date(data.birth_date)
785   - olderbirthDate.datelong = data.birth_date
786   - setData.olderbirthDate = olderbirthDate
787   - }
788 787 this.setData(setData)
789 788 break;
790 789 case 'medical_fund':
... ... @@ -979,6 +978,9 @@ Page({
979 978 supported_name: id_info.name,
980 979 olderbirthDate: that.data.olderbirthDate
981 980 }
  981 + if (format.getAge(birth_day) < 60) {
  982 + this.showToast('被赡养人年龄不足60岁,不可申报')
  983 + }
982 984 } else if (that.idcard_belong == 'medical_id_card_no') {
983 985 that.data.commonbirthDate.selected = birth_day
984 986 that.data.commonbirthDate.datelong = (Date.parse(new Date(birth_day)) / 1000)
... ... @@ -1202,8 +1204,12 @@ Page({
1202 1204 this.showToast('被赡养人身份证格式有误')
1203 1205 return
1204 1206 }
1205   - if (this.data.olderbirthDate.selected.length < 1) {
1206   - this.showToast('请选择被赡养人出生日期')
  1207 + // if (this.data.olderbirthDate.selected.length < 1) {
  1208 + // this.showToast('请选择被赡养人出生日期')
  1209 + // return
  1210 + // }
  1211 + if (format.getAge(this.data.olderbirthDate.selected) < 60) {
  1212 + this.showToast('被赡养人年龄不足60岁,不可申报')
1207 1213 return
1208 1214 }
1209 1215 if (this.data.older_relativeData.selected.length < 1) {
... ... @@ -1588,6 +1594,9 @@ Page({
1588 1594 data = {
1589 1595 olderbirthDate: this.data.olderbirthDate
1590 1596 }
  1597 + if (info.age < 60) {
  1598 + this.showToast('被赡养人年龄不足60岁,不可申报')
  1599 + }
1591 1600 } else if (idcard_belong == 'owner_id_card_no_input') {
1592 1601 // this.data.olderbirthDate.selected = info.birthDay
1593 1602 // this.data.olderbirthDate.datelong = (Date.parse(new Date(info.birthDay)) / 1000)
... ...
注册登录 后发表评论