正在显示
12 个修改的文件
包含
200 行增加
和
16 行删除
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | </view> |
| 21 | 21 | </template> |
| 22 | 22 | |
| 23 | -<template name="picker_cell_mutiple"> | |
| 23 | +<template name="picker_cell_muti"> | |
| 24 | 24 | <view class='item_body'> |
| 25 | 25 | <text hidden='{{!isrequre}}' style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text> |
| 26 | 26 | <view wx:if='{{isrequre}}'> |
| ... | ... | @@ -32,12 +32,11 @@ |
| 32 | 32 | <image class='arrow_wrap' src='/images/arrow_right.png'></image> |
| 33 | 33 | |
| 34 | 34 | <view class="weui-cell__bd"> |
| 35 | - <picker mode='picker_cell_mutiple' range-key="{{range_key}}"value="{{multiIndex}}" range="{{values}}" bindchange="{{onChange}}" bindcolumnchange="{{onColumnChange}}" disabled="{{disabled}}"> | |
| 36 | - <view wx:if="{{selected}}" class="text_333_28 float_right">{{selected}}</view> | |
| 35 | + <picker mode="{{mode?mode:'multiSelector'}}" range-key="{{range_key}}" range="{{values}}" bindchange="{{onChange}}" bindcolumnchange="{{onColumnChange}}" disabled="{{disabled}}" id='{{bindtype}}'> | |
| 36 | + <view wx:if="{{true}}" class="text_333_28 float_right">{{selected}}</view> | |
| 37 | 37 | <view wx:elif="{{placeholder}}" class="text_333_28 float_right">{{placeholder}}</view> |
| 38 | 38 | </picker> |
| 39 | 39 | </view> |
| 40 | 40 | |
| 41 | - <!-- <text class='text_333_28 float_right'>请选择关系</text> --> | |
| 42 | 41 | </view> |
| 43 | 42 | </template> |
| \ No newline at end of file | ... | ... |
| ... | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | color: #fff; |
| 24 | 24 | text-align: center; |
| 25 | 25 | background-color: #659CF7; |
| 26 | - background-image: linear-gradient(-90deg, #659CF7 0%, #357AEB 100%); | |
| 26 | + background-image: linear-gradient(-90deg, #357AEB 0%, #659CF7 100%); | |
| 27 | 27 | /* background:gradient(linear, 0 0, 0 bottom, from(#659CF7), to(#357AEB) */ |
| 28 | 28 | } |
| 29 | 29 | ... | ... |
pages/main/addinfo/addinfo.js
0 → 100644
| 1 | +// pages/main/addinfo/addinfo.js | |
| 2 | +Page({ | |
| 3 | + | |
| 4 | + /** | |
| 5 | + * 页面的初始数据 | |
| 6 | + */ | |
| 7 | + data: { | |
| 8 | + | |
| 9 | + }, | |
| 10 | + | |
| 11 | + /** | |
| 12 | + * 生命周期函数--监听页面加载 | |
| 13 | + */ | |
| 14 | + onLoad: function (options) { | |
| 15 | + | |
| 16 | + }, | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * 生命周期函数--监听页面初次渲染完成 | |
| 20 | + */ | |
| 21 | + onReady: function () { | |
| 22 | + | |
| 23 | + }, | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 生命周期函数--监听页面显示 | |
| 27 | + */ | |
| 28 | + onShow: function () { | |
| 29 | + | |
| 30 | + }, | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 生命周期函数--监听页面隐藏 | |
| 34 | + */ | |
| 35 | + onHide: function () { | |
| 36 | + | |
| 37 | + }, | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 生命周期函数--监听页面卸载 | |
| 41 | + */ | |
| 42 | + onUnload: function () { | |
| 43 | + | |
| 44 | + }, | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 页面相关事件处理函数--监听用户下拉动作 | |
| 48 | + */ | |
| 49 | + onPullDownRefresh: function () { | |
| 50 | + | |
| 51 | + }, | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 页面上拉触底事件的处理函数 | |
| 55 | + */ | |
| 56 | + onReachBottom: function () { | |
| 57 | + | |
| 58 | + }, | |
| 59 | + | |
| 60 | + /** | |
| 61 | + * 用户点击右上角分享 | |
| 62 | + */ | |
| 63 | + onShareAppMessage: function () { | |
| 64 | + | |
| 65 | + } | |
| 66 | +}) | |
| \ No newline at end of file | ... | ... |
pages/main/addinfo/addinfo.json
0 → 100644
| 1 | +{} | |
| \ No newline at end of file | ... | ... |
pages/main/addinfo/addinfo.wxml
0 → 100644
pages/main/addinfo/addinfo.wxss
0 → 100644
| 1 | +/* pages/main/addinfo/addinfo.wxss */ | |
| \ No newline at end of file | ... | ... |
| ... | ... | @@ -15,6 +15,7 @@ Page({ |
| 15 | 15 | banklist: {}, |
| 16 | 16 | cur_id: '', |
| 17 | 17 | isself: true, |
| 18 | + isIdCard:true, | |
| 18 | 19 | name: '', |
| 19 | 20 | id_card_number: '', |
| 20 | 21 | |
| ... | ... | @@ -38,7 +39,7 @@ Page({ |
| 38 | 39 | isrequre: true, |
| 39 | 40 | label: '证照类型', |
| 40 | 41 | bindtype: 'cardtype', |
| 41 | - selected: '居民身份证', | |
| 42 | + placeholder: '居民身份证', | |
| 42 | 43 | values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往大陆通行证', '外交官证', '中国护照', |
| 43 | 44 | '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '外国人永久居留证' |
| 44 | 45 | ], |
| ... | ... | @@ -175,6 +176,7 @@ Page({ |
| 175 | 176 | placeholder: '请选择户籍所在地', |
| 176 | 177 | onChange: 'onPickerSelect' |
| 177 | 178 | }, |
| 179 | + title:'', | |
| 178 | 180 | condition: false |
| 179 | 181 | }, |
| 180 | 182 | |
| ... | ... | @@ -234,7 +236,7 @@ Page({ |
| 234 | 236 | }, |
| 235 | 237 | success: function(res) { |
| 236 | 238 | console.log('proffessiondata', res.data) |
| 237 | - proffession_info.values = res.data.items | |
| 239 | + proffession_info.values = that.handleProfession(res.data.items) | |
| 238 | 240 | that.setData({ |
| 239 | 241 | proffessionlist: res.data.items, |
| 240 | 242 | professionData: proffession_info |
| ... | ... | @@ -247,6 +249,58 @@ Page({ |
| 247 | 249 | console.log('proffessionData--', that.data.professionData) |
| 248 | 250 | }, |
| 249 | 251 | |
| 252 | + handleProfession: function(data) { | |
| 253 | + var newdata = [] | |
| 254 | + var one = [] | |
| 255 | + var two = [] | |
| 256 | + var three = [] | |
| 257 | + var oneObj={}, twoObj={}, threeObj = {} | |
| 258 | + if (data && data.length > 0) { | |
| 259 | + console.log('one',one) | |
| 260 | + data.map((d, i) => { | |
| 261 | + one.push(d.one_level_code) //三级联动中 第一级所有的code | |
| 262 | + two.push(d.two_level_code) //三级联动中 第二级所有的code | |
| 263 | + three.push(d.three_level_code) //三级联动中 第三级所有的code | |
| 264 | + oneObj[d.one_level_code] = { | |
| 265 | + "value": d.one_level_code, | |
| 266 | + "label": d.one_level_name, | |
| 267 | + "children": [] | |
| 268 | + } //三级联动中 第一级所有的code + name | |
| 269 | + twoObj[d.two_level_code] = { | |
| 270 | + "value": d.two_level_code, | |
| 271 | + "label": d.two_level_name, | |
| 272 | + "children": [] | |
| 273 | + } //三级联动中 第一级所有的code + name | |
| 274 | + threeObj[d.three_level_code] = { | |
| 275 | + "value": d.three_level_code, | |
| 276 | + "label": d.three_level_name | |
| 277 | + } //三级联动中 第一级所有的code + name | |
| 278 | + for (let b in twoObj) { //把第三级的数据的Code和第二级数据的code做判断 相等的 放到第二级的children数组中 | |
| 279 | + for (let c in threeObj) { | |
| 280 | + if (b == c.slice(0, c.length - 1)) { | |
| 281 | + twoObj[b].children.push(threeObj[c]) | |
| 282 | + } | |
| 283 | + } | |
| 284 | + } | |
| 285 | + for (let a in oneObj) { //把第二级的数据的Code和第二级数据的code做判断 相等的 放到第一级的children数组中 | |
| 286 | + for (let b in twoObj) { | |
| 287 | + if (a == b.slice(0, b.length - 1)) { | |
| 288 | + oneObj[a].children.push(twoObj[b]) | |
| 289 | + } | |
| 290 | + } | |
| 291 | + } | |
| 292 | + one = [...new Set(one)] //一级code去重 | |
| 293 | + one.map((da, ind) => { //遍历 得到最终的三级联动数据 | |
| 294 | + // console.log('oneObj', newdata) | |
| 295 | + newdata.push(oneObj[da]) | |
| 296 | + }) | |
| 297 | + }) | |
| 298 | + } | |
| 299 | + console.log('newdata', newdata) | |
| 300 | + | |
| 301 | + return newdata | |
| 302 | + }, | |
| 303 | + | |
| 250 | 304 | getbanklist: function() { |
| 251 | 305 | var that = this |
| 252 | 306 | var Authorization = app.globalData.Authorization; |
| ... | ... | @@ -342,9 +396,16 @@ Page({ |
| 342 | 396 | }) |
| 343 | 397 | break; |
| 344 | 398 | case 'cardtype': |
| 399 | + var is_idcard = this.data.isIdCard | |
| 345 | 400 | var cardtype_data = this.data.cardtypeData |
| 346 | 401 | cardtype_data.selected = cardtype_data.values[e.detail.value] |
| 402 | + if (0 == e.detail.value){ | |
| 403 | + is_idcard = true | |
| 404 | + }else{ | |
| 405 | + is_idcard = false | |
| 406 | + } | |
| 347 | 407 | this.setData({ |
| 408 | + isIdCard:is_idcard, | |
| 348 | 409 | cardtypeData: cardtype_data |
| 349 | 410 | }) |
| 350 | 411 | break; |
| ... | ... | @@ -438,8 +499,43 @@ Page({ |
| 438 | 499 | |
| 439 | 500 | formBindSubmit: function(e) { |
| 440 | 501 | var formdata = e.detail.value; |
| 502 | + var toast_title= '' | |
| 441 | 503 | console.log("formdata", formdata); |
| 442 | - | |
| 504 | + if (formdata.name.length<1){ | |
| 505 | + this.showtoast('请输入姓名'); | |
| 506 | + return | |
| 507 | + } else if (formdata.id_card_no.length < 1) { | |
| 508 | + this.showtoast('请输入证件号码'); | |
| 509 | + return | |
| 510 | + } else if (formdata.taxpayer_no.length < 1) { | |
| 511 | + this.showtoast('请输入纳税人识别号'); | |
| 512 | + return | |
| 513 | + } else if (formdata.disability_no.length < 1) { | |
| 514 | + this.showtoast('请输入残疾证号'); | |
| 515 | + return | |
| 516 | + } else if (formdata.martyr_family_no.length < 1) { | |
| 517 | + this.showtoast('请输入烈属证号'); | |
| 518 | + return | |
| 519 | + } else if (formdata.mobile.length < 1) { | |
| 520 | + this.showtoast('请输入联系电话'); | |
| 521 | + return | |
| 522 | + } else if (formdata.contact_address_detail | |
| 523 | +.length < 1) { | |
| 524 | + this.showtoast('请输入联系详细地址'); | |
| 525 | + return | |
| 526 | + } else if (formdata.bank_account.length < 1) { | |
| 527 | + this.showtoast('请输入银行卡号'); | |
| 528 | + return | |
| 529 | + } else if (formdata.email.length < 1) { | |
| 530 | + this.showtoast('请输入邮箱'); | |
| 531 | + return | |
| 532 | + } else if (formdata.current_address_detail.length < 1) { | |
| 533 | + this.showtoast('请输入居住详细地址'); | |
| 534 | + return | |
| 535 | + } else if (formdata.huji_address_detail.length < 1) { | |
| 536 | + this.showtoast('请输入户籍详细地址'); | |
| 537 | + return | |
| 538 | + } | |
| 443 | 539 | // this.goCommit(); |
| 444 | 540 | }, |
| 445 | 541 | |
| ... | ... | @@ -447,7 +543,7 @@ Page({ |
| 447 | 543 | var that = this |
| 448 | 544 | var Authorization = app.globalData.Authorization; |
| 449 | 545 | wx.request({ |
| 450 | - url: baseUrl + 'persontax/v1/personal-taxes/'+that.data.cur_id, | |
| 546 | + url: baseUrl + 'persontax/v1/personal-taxes/' + that.data.cur_id, | |
| 451 | 547 | method: "GET", |
| 452 | 548 | data: { |
| 453 | 549 | "name": "张美嘉", |
| ... | ... | @@ -529,6 +625,12 @@ Page({ |
| 529 | 625 | }) |
| 530 | 626 | }, |
| 531 | 627 | |
| 628 | + showtoast:function(title){ | |
| 629 | + wx.showToast({ | |
| 630 | + title: title, | |
| 631 | + }) | |
| 632 | + }, | |
| 633 | + | |
| 532 | 634 | /** |
| 533 | 635 | * 生命周期函数--监听页面隐藏 |
| 534 | 636 | */ | ... | ... |
| ... | ... | @@ -77,9 +77,13 @@ |
| 77 | 77 | <view class='item_body' bindtap='getIdInfo'> |
| 78 | 78 | <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text> |
| 79 | 79 | <text class='text_black_28 float_left'>证照号码</text> |
| 80 | - <image class='image_camera float_right' src='/images/camera.png'></image> | |
| 81 | - <!-- <input class='input_wrap float_right'placeholder='请输入证件号码' value='{{id_card_number}}' name=''></input> --> | |
| 82 | - <text class='text_333_28 float_right'>{{id_card_number}}</text> | |
| 80 | + <view wx:if="{{isIdCard}}"> | |
| 81 | + <image class='image_camera float_right' src='/images/camera.png'></image> | |
| 82 | + <text class='text_333_28 float_right'>{{id_card_number}}</text> | |
| 83 | + </view> | |
| 84 | + <view wx:else> | |
| 85 | + <input class='input_wrap float_right' placeholder='请输入证件号码' value='{{id_card_number}}' name='id_card_no'></input> | |
| 86 | + </view> | |
| 83 | 87 | </view> |
| 84 | 88 | <view class="divide_line"></view> |
| 85 | 89 | |
| ... | ... | @@ -113,7 +117,7 @@ |
| 113 | 117 | <image class='arrow_wrap' src='/images/arrow_right.png'></image> |
| 114 | 118 | <text class='text_333_28 float_right'></text> |
| 115 | 119 | </view> --> |
| 116 | - <template is="picker_cell_mutiple" data="{{...professionData}}" /> | |
| 120 | + <template is="picker_cell_muti" data="{{...professionData}}" /> | |
| 117 | 121 | <view class="divide_line"></view> |
| 118 | 122 | <!-- <view class='item_body'> |
| 119 | 123 | <text class='text_666_28 float_left'>学历</text> | ... | ... |
| ... | ... | @@ -56,6 +56,13 @@ Page({ |
| 56 | 56 | goadd:function(e){ |
| 57 | 57 | console.log(e) |
| 58 | 58 | wx.navigateTo({ |
| 59 | + url: '../addinfo/addinfo', | |
| 60 | + }) | |
| 61 | + }, | |
| 62 | + | |
| 63 | + goedit: function (e) { | |
| 64 | + console.log(e) | |
| 65 | + wx.navigateTo({ | |
| 59 | 66 | url: '../editinfo/editinfo?id=' + e.currentTarget.id, |
| 60 | 67 | }) |
| 61 | 68 | }, | ... | ... |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | <view class='rectangle_solid_blue_bg'> |
| 22 | 22 | <view style='padding:11px 15px'> |
| 23 | 23 | <text class='text_white_32'>{{item.name}}</text> |
| 24 | - <text class='text_gray_bg text_blue_20'>{{item.family_ties}}</text> | |
| 24 | + <text class='text_gray_bg text_blue_20' hidden="{{item.family_ties?false:true}}">{{item.family_ties}}</text> | |
| 25 | 25 | </view> |
| 26 | 26 | <view style='padding:0 15px'> |
| 27 | 27 | <image class='phone_image_wrap' src='/images/phone.png'></image> |
| ... | ... | @@ -31,7 +31,7 @@ |
| 31 | 31 | <text class='text_white_22'>{{item.id_card_no}}</text> |
| 32 | 32 | </view> |
| 33 | 33 | </view> |
| 34 | - <view class='rectangle_solid_bg' bindtap='goadd' id='{{item.id}}'> | |
| 34 | + <view class='rectangle_solid_bg' bindtap='goedit' id='{{item.id}}'> | |
| 35 | 35 | <view style='padding: 0 15px '> |
| 36 | 36 | <image class='arrow_wrap' src='/images/arrow_right.png'> </image> |
| 37 | 37 | <text class='text_999_28'>去完善</text> |
| ... | ... | @@ -42,7 +42,7 @@ |
| 42 | 42 | </block> |
| 43 | 43 | </view> |
| 44 | 44 | |
| 45 | - <view class='rectangle_dashed_bg' bindtap="goadd" id=''> | |
| 45 | + <view class='rectangle_dashed_bg' bindtap="goadd" > | |
| 46 | 46 | <view class='text_blue_28' style='text-align:center'> |
| 47 | 47 | 十 添加家庭成员 |
| 48 | 48 | </view> | ... | ... |
请
注册
或
登录
后发表评论