正在显示
2 个修改的文件
包含
35 行增加
和
3 行删除
... | ... | @@ -34,6 +34,7 @@ Page({ |
34 | 34 | legal_entity_id: "", |
35 | 35 | legal_entity: "", |
36 | 36 | data: { |
37 | + hasLover:false, | |
37 | 38 | house_type: "", |
38 | 39 | deduction_amount: '', |
39 | 40 | lable: 0, |
... | ... | @@ -44,6 +45,17 @@ Page({ |
44 | 45 | rentAddress_haschanged: false, |
45 | 46 | extrainfo_arr: ["请上传子女出生证明、学籍信息凭证、学费凭证、本人结婚证和分摊协议", "请上传学历学籍凭证", "请上传出生证明或关系证明、独生子女证、分摊协议、其他法定赡养人赡养证明", "请上传诊断书和医疗费用收据", "请上传首套房证明、还款证明、不动产登记证、结婚证和夫妻约定抵扣协议"], |
46 | 47 | cur_index: '', |
48 | + | |
49 | + hasLoverData: { | |
50 | + label: '是否有配偶', | |
51 | + isrequre: true, | |
52 | + bindtype: 'hasLover', | |
53 | + selected: '', | |
54 | + isblack: 'true', | |
55 | + placeholder: '请选择', | |
56 | + values: ['是', '否'], | |
57 | + onChange: 'onPickerSelect' | |
58 | + }, | |
47 | 59 | lovercardtypeData: { |
48 | 60 | label: '配偶证照类型', |
49 | 61 | bindtype: 'lovercardtype', |
... | ... | @@ -982,8 +994,12 @@ Page({ |
982 | 994 | this.showToast('请选择就读学校') |
983 | 995 | return |
984 | 996 | } |
997 | + if (this.data.hasLoverData.selected.length < 1) { | |
998 | + this.showToast('请选择是否有配偶') | |
999 | + return | |
1000 | + } | |
985 | 1001 | |
986 | - if (formdata.spouse_name || formdata.spouse_id_card_no || this.data.loverbirthDate.selected) { | |
1002 | + if (this.data.hasLover) { | |
987 | 1003 | if (!formdata.spouse_name || formdata.spouse_name.length < 1) { |
988 | 1004 | this.showToast('请填写配偶姓名') |
989 | 1005 | return |
... | ... | @@ -1249,7 +1265,11 @@ Page({ |
1249 | 1265 | console.log('request_working_address', request_working_address) |
1250 | 1266 | newdata.nation = "中国" |
1251 | 1267 | } |
1252 | - if (formdata.spouse_name || formdata.spouse_id_card_no || this.data.loverbirthDate.selected) { | |
1268 | + if (this.data.hasLoverData.selected.length < 1) { | |
1269 | + this.showToast('请选择是否有配偶') | |
1270 | + return | |
1271 | + } | |
1272 | + if (this.data.hasLover) { | |
1253 | 1273 | if (!formdata.spouse_name || formdata.spouse_name.length < 1) { |
1254 | 1274 | this.showToast('请填写配偶姓名') |
1255 | 1275 | return |
... | ... | @@ -1396,6 +1416,15 @@ Page({ |
1396 | 1416 | onPickerSelect: function(e) { |
1397 | 1417 | console.log('picker发送选择改变,携带值为', e) |
1398 | 1418 | switch (e.currentTarget.id) { |
1419 | + case 'hasLover': | |
1420 | + var hasLoverData = this.data.hasLoverData | |
1421 | + hasLoverData.selected = hasLoverData.values[e.detail.value] | |
1422 | + var hasLover = e.detail.value == '0' | |
1423 | + this.setData({ | |
1424 | + hasLoverData: hasLoverData, | |
1425 | + hasLover: hasLover | |
1426 | + }) | |
1427 | + break; | |
1399 | 1428 | case 'lovercardtype': |
1400 | 1429 | var lover_cardtypeData = this.data.lovercardtypeData |
1401 | 1430 | lover_cardtypeData.selected = lover_cardtypeData.values[e.detail.value] | ... | ... |
... | ... | @@ -313,12 +313,15 @@ |
313 | 313 | <view style='padding:0 30rpx;'> |
314 | 314 | |
315 | 315 | <view wx:if="{{cur_index=='children_education' || cur_index=='house_fund'}}"> |
316 | + <template is="picker_cell_normal" data="{{...hasLoverData}}" /> | |
317 | + <view class='divide_line_f5f5f5'></view> | |
318 | + </view> | |
319 | + <view wx:if="{{hasLover}}"> | |
316 | 320 | <view style='height:90rpx'> |
317 | 321 | <text class='text_black_30 float_left'>配偶姓名</text> |
318 | 322 | <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入配偶姓名' name='spouse_name' value='{{spouse_name}}'></input> |
319 | 323 | </view> |
320 | 324 | <view class='divide_line_f5f5f5'></view> |
321 | - | |
322 | 325 | <template is="picker_cell_normal" data="{{...lovercardtypeData}}" /> |
323 | 326 | <view class='divide_line_f5f5f5'></view> |
324 | 327 | <view style='height:90rpx'> | ... | ... |
请
注册
或
登录
后发表评论