提交 d67cbe471c858c22929a486a9029144b6fe73679

作者 pangy
2 个父辈 e320c5f6 1752d672

Merge branch 'dev_py' into dev2.0

... ... @@ -293,7 +293,7 @@ Page({
293 293 onChange: 'onPickerSelect'
294 294 },
295 295 studystartdate: {
296   - label: '受教育日期起',
  296 + label: '受教育时间起',
297 297 isrequre: true,
298 298 bindtype: 'study_start_date',
299 299 selected: '',
... ... @@ -305,16 +305,32 @@ Page({
305 305 fields: "month",
306 306 datelong: 0,
307 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 325 // start: (new Date()).getFullYear() + '-09-01',//'1970-01-01',
309 326 // end: (new Date()).getFullYear() + '-09-01',
310 327 // onTap: 'studyDataTap'
311 328 },
312 329 studyenddate: {
313 330 label: '教育终止时间',
314   - isrequre: true,
  331 + // isrequre: true,
315 332 bindtype: 'study_end_date',
316 333 selected: '',
317   - isblack: 'true',
318 334 values: ["是", "否"],
319 335 placeholder: '请选择时间',
320 336 onChange: 'onPickerSelect',
... ... @@ -549,7 +565,7 @@ Page({
549 565 studystart_date.label = "入学时间起"
550 566 var studyend_date = this.data.studyenddate
551 567 studyend_date.label = "(预计)毕业时间"
552   -
  568 + studyend_date.isrequre = true
553 569 this.setData({
554 570 studystartdate: studystart_date,
555 571 studyenddate: studyend_date
... ... @@ -703,6 +719,10 @@ Page({
703 719 studystartdate.selected = format.formatTime_month(data.education_start)
704 720 studystartdate.datelong = data.education_start
705 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 726 var studyenddate = this.data.studyenddate
707 727 studyenddate.selected = format.formatTime_month(data.education_end)
708 728 studyenddate.datelong = data.education_end
... ... @@ -997,103 +1017,6 @@ Page({
997 1017 if (data.name && data.name.length) {
998 1018 setData.children_name = data.name
999 1019 }
1000   - if (data.percent && data.percent.length) {
1001   - var childrenpercentData = this.data.childrenpercentData
1002   - childrenpercentData.selected = data.percent
1003   - setData.childrenpercentData = childrenpercentData
1004   - }
1005   - if (data.student_no && data.student_no.length) {
1006   - setData.children_student_no = data.student_no
1007   - }
1008   - if (data.education_period && data.education_period.length) {
1009   - var childedudegreeData = this.data.childedudegreeData
1010   - childedudegreeData.selected = data.education_period
1011   - setData.childedudegreeData = childedudegreeData
1012   - }
1013   - if (data.education_start && data.education_start.length) {
1014   - var studystartdate = this.data.studystartdate
1015   - studystartdate.selected = format.formatTime_date(data.education_start)
1016   - studystartdate.datelong = data.education_start
1017   - setData.studystartdate = studystartdate
1018   - }
1019   - if (data.education_end && data.education_end.length) {
1020   - var studyenddate = this.data.studyenddate
1021   - studyenddate.selected = format.formatTime_date(data.education_end)
1022   - studyenddate.datelong = data.education_end
1023   - setData.studyenddate = studyenddate
1024   - console.log("studyenddate", studyenddate)
1025   - }
1026   - if (data.school_country && data.school_country.length) {
1027   - var schoolCountryData = this.data.schoolCountryData
1028   - schoolCountryData.selected = data.school_country
1029   - setData.schoolCountryData = schoolCountryData
1030   - }
1031   - if (data.school_name && data.school_name.length) {
1032   - setData.school_name = data.school_name
1033   - }
1034   - if (data.spouse_name && data.spouse_name.length) {
1035   - setData.spouse_name = data.spouse_name
1036   - }
1037   - if (data.spouse_id_card_no && data.spouse_id_card_no.length) {
1038   - setData.spouse_id_card_no = data.spouse_id_card_no
1039   - this.dealIdInfo(data.id_card_no, 'spouse_id_card_no_input')
1040   - }
1041   - if (this.data.loverbirthDate.selected.length) {
1042   - var loverbirthDate = this.data.loverbirthDate
1043   - loverbirthDate.selected = format.formatTime_date(data.spouse_birthday)
1044   - loverbirthDate.datelong = data.spouse_birthday
1045   - setData.loverbirthDate = loverbirthDate
1046   - }
1047   -
1048   - this.setData(setData)
1049   - break;
1050   - case 'continuing_education':
1051   - var setData = {}
1052   - if (data.education_type && data.education_type.length) {
1053   - if ('title' == data.education_type) {
1054   - var edutypeData = this.data.edutypeData
1055   - edutypeData.selected = "学历(学位)继续教育"
1056   - setData.edutypeData = edutypeData
1057   - } else {
1058   - var edutypeData = this.data.edutypeData
1059   - edutypeData.selected = data.education_type == 'major' ? "专业技术人员职业资格" : "技能人员职业资格"
1060   - setData.edutypeData = edutypeData
1061   - }
1062   - }
1063   - if (data.education_period && data.education_period.length) {
1064   - var edulevelData = this.data.edulevelData
1065   - edulevelData.selected = data.education_period
1066   - setData.edulevelData = edulevelData
1067   - }
1068   - if (data.education_start && data.education_start.length) {
1069   - var studystartdate = this.data.studystartdate
1070   - studystartdate.selected = format.formatTime_date(data.education_start)
1071   - studystartdate.datelong = data.education_start
1072   - setData.studystartdate = studystartdate
1073   - }
1074   - if (data.education_end && data.education_end.length) {
1075   - var studyenddate = this.data.studyenddate
1076   - studyenddate.selected = format.formatTime_date(data.education_end)
1077   - studyenddate.datelong = data.education_end
1078   - setData.studyenddate = studyenddate
1079   - }
1080   - if (data.approval_date && data.approval_date.length) {
1081   - var applydate = this.data.applydate
1082   - applydate.selected = format.formatTime_date(data.approval_date)
1083   - applydate.datelong = data.approval_date
1084   - setData.applydate = applydate
1085   - }
1086   - if (data.certification_name && data.certification_name.length) {
1087   - var certificateDate = this.data.certificateDate
1088   - certificateDate.selected = data.certification_name
1089   - setData.certificateDate = certificateDate
1090   - }
1091   - if (data.certification_no && data.certification_no.length) {
1092   - setData.certification_no = data.certification_no
1093   - }
1094   - if (data.certification_authority && data.certification_authority.length) {
1095   - setData.certification_authority = data.certification_authority
1096   - }
1097 1020 this.setData(setData)
1098 1021 break;
1099 1022 case 'support_duty':
... ... @@ -1131,86 +1054,7 @@ Page({
1131 1054 }
1132 1055 this.setData(setData)
1133 1056 break;
1134   - case "house_fund":
1135   - var setData = {}
1136   - if (data.spouse_name && data.spouse_name.length) {
1137   - setData.spouse_name = data.spouse_name
1138   - }
1139   - if (data.spouse_id_card_no && data.spouse_id_card_no.length) {
1140   - setData.spouse_id_card_no = data.spouse_id_card_no
1141   - this.dealIdInfo(data.id_card_no, 'spouse_id_card_no_input')
1142   - }
1143   - if (this.data.loverbirthDate.selected.length) {
1144   - var loverbirthDate = this.data.loverbirthDate
1145   - loverbirthDate.selected = format.formatTime_date(data.spouse_birthday)
1146   - loverbirthDate.datelong = data.spouse_birthday
1147   - setData.loverbirthDate = loverbirthDate
1148   - }
1149   - if (data.loan_type && data.loan_type.length) {
1150   - var loantypeData = this.data.loantypeData
1151   - loantypeData.selected = data.loan_type
1152   - setData.loantypeData = loantypeData
1153   - }
1154   - if (data.house_detail_address && data.house_detail_address.length) {
1155   - setData.house_detail_address = data.house_detail_address
1156   - }
1157   - if (data.certification_no && data.certification_no.length) {
1158   - setData.certification_no = data.certification_no
1159   - }
1160   - if (data.certification_type && data.certification_type.length) {
1161   - var identifytypeData = this.data.identifytypeData
1162   - identifytypeData.selected = data.certification_type
1163   - setData.identifytypeData = identifytypeData
1164   - }
1165   - if (data.loan_before_marry && data.loan_before_marry.length) {
1166   - var beforemarryData = this.data.beforemarryData
1167   - beforemarryData.selected = data.loan_before_marry
1168   - setData.beforemarryData = beforemarryData
1169   - }
1170   - if (data.loan_by_self && data.loan_by_self.length) {
1171   - var isselfData = this.data.isselfData
1172   - isselfData.selected = data.loan_by_self
1173   - setData.isselfData = isselfData
1174   - }
1175   - if (data.loan_contract_no && data.loan_contract_no.length) {
1176   - setData.loan_contract_no = data.loan_contract_no
1177   - }
1178   - if (data.rent_contract_no && data.rent_contract_no.length) {
1179   - setData.rent_contract_no = data.rent_contract_no
1180   - }
1181   - if (data.rent_start && data.rent_start.length) {
1182   - var leasestartDate = this.data.leasestartDate
1183   - leasestartDate.selected = format.formatTime_date(data.rent_start)
1184   - leasestartDate.datelong = data.rent_start
1185   - setData.leasestartDate = leasestartDate
1186   - }
1187   - if (data.rent_end && data.rent_end.length) {
1188   - var leaseendDate = this.data.leaseendDate
1189   - leaseendDate.selected = format.formatTime_date(data.rent_end)
1190   - leaseendDate.datelong = data.rent_end
1191   - setData.leaseendDate = leaseendDate
1192   - }
1193   - if (data.work_city && data.work_city.province) {
1194   - var workingcityInfo = this.data.workingcityInfo
1195   - workingcityInfo.requestdata = data.work_city
1196   - workingcityInfo.selected = data.work_city.province + data.work_city.city
1197   - setData.workingcityInfo = workingcityInfo
1198   - }
1199   - if (this.data.house_type == 'house_fund_loan' && data.house_address && data.house_address.province) {
1200   - var houseLocateInfo = this.data.houseLocateInfo
1201   - houseLocateInfo.requestdata = data.house_address
1202   - houseLocateInfo.selected = data.work_city.province + data.work_city.city + data.work_city.district
1203   - setData.houseLocateInfo = houseLocateInfo
1204   - }
1205   - if (this.data.house_type == 'house_fund_rent' && data.house_address && data.house_address.province) {
1206   - var rentLocateInfo = this.data.rentLocateInfo
1207   - rentLocateInfo.requestdata = data.house_address
1208   - rentLocateInfo.selected = data.work_city.province + data.work_city.city + data.work_city.district
1209   - setData.rentLocateInfo = rentLocateInfo
1210   - }
1211   -
1212   - this.setData(setData)
1213   - break;
  1057 +
1214 1058 }
1215 1059
1216 1060 },
... ... @@ -1439,15 +1283,19 @@ Page({
1439 1283 this.showToast('请选择受教育起始日期')
1440 1284 return
1441 1285 }
1442   - if (this.data.studyenddate.selected.length < 1) {
1443   - this.showToast('请选择受教育终止日期')
  1286 + if (this.data.studyCompleteDate.selected.length < 1) {
  1287 + this.showToast('请选择受教育时间止')
1444 1288 return
1445 1289 }else{
1446   - var activedDate = (Date.parse(new Date('2019-01-01')) / 1000)
1447   - if (this.data.studyenddate.datelong < activedDate) {
1448   - this.showToast('终止(毕业)日期不符合要求,无法申报')
1449   - return
1450   - }
  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 + // }
1451 1299 }
1452 1300 if (!formdata.school_name || formdata.school_name.length < 1) {
1453 1301 this.showToast('请填写就读学校')
... ... @@ -1480,6 +1328,7 @@ Page({
1480 1328 newdata.percent = parseFloat(this.data.childrenpercentData.selected.replace("%",""))
1481 1329 newdata.children_id_card_type = '1' //this.data.childrencardtypeData.selected
1482 1330 newdata.children_birthday = this.data.commonbirthDate.datelong
  1331 + newdata.education_period_end = this.data.studyCompleteDate.datelong
1483 1332 newdata.education_end = this.data.studyenddate.datelong
1484 1333 newdata.education_start = this.data.studystartdate.datelong
1485 1334 newdata.education_period = this.data.childedudegreeData.selected
... ... @@ -1508,7 +1357,7 @@ Page({
1508 1357 } else {
1509 1358 var activedDate = (Date.parse(new Date('2019-01-01')) / 1000)
1510 1359 if (this.data.studyenddate.datelong < activedDate) {
1511   - this.showToast('终止(毕业)日期不符合要求,无法申报')
  1360 + this.showToast('毕业日期不符合要求,无法申报')
1512 1361 return
1513 1362 }
1514 1363 }
... ... @@ -2105,13 +1954,46 @@ Page({
2105 1954 })
2106 1955 break;
2107 1956 case 'study_start_date':
  1957 + var select_date = e.detail.value
2108 1958 var study_startdate = this.data.studystartdate
2109   - study_startdate.selected = e.detail.value
2110   - 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 = ''
2111 1973 this.setData({
2112   - studystartdate: study_startdate
  1974 + studystartdate: study_startdate,
  1975 + studyCompleteDate: studyCompleteDate,
  1976 + studyenddate: study_enddate
2113 1977 })
2114 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 = ''
  1988 + this.setData({
  1989 + studyCompleteDate: studyCompleteDate,
  1990 + studyenddate: study_enddate
  1991 + })
  1992 + // var activedDate = (Date.parse(new Date('2019-01-01')) / 1000)
  1993 + // if (datelong < activedDate) {
  1994 + // this.showToast('受教育时间止不符合要求,无法申报')
  1995 + // }
  1996 + break;
2115 1997 case 'study_end_date':
2116 1998 var study_enddate = this.data.studyenddate
2117 1999 study_enddate.selected = e.detail.value
... ... @@ -2120,10 +2002,10 @@ Page({
2120 2002 this.setData({
2121 2003 studyenddate: study_enddate
2122 2004 })
2123   - var activedDate = (Date.parse(new Date('2019-01-01')) / 1000)
2124   - if (datelong < activedDate){
2125   - this.showToast('终止(毕业)日期不符合要求,无法申报')
2126   - }
  2005 + // var activedDate = (Date.parse(new Date('2019-01-01')) / 1000)
  2006 + // if (datelong < activedDate){
  2007 + // this.showToast('教育终止时间不符合要求,无法申报')
  2008 + // }
2127 2009 break;
2128 2010 case 'child_edu_degree':
2129 2011 var childedudegreeData = this.data.childedudegreeData
... ...
... ... @@ -60,8 +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="{{...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 67 <view class='divide_line_30'></view>
66 68 <template is="picker_cell_normal" data="{{...schoolCountryData}}" />
67 69 <view class='divide_line_30'></view>
... ...
注册登录 后发表评论