正在显示
3 个修改的文件
包含
12 行增加
和
9 行删除
... | ... | @@ -58,8 +58,9 @@ Page({ |
58 | 58 | selectdata: options.select_data ? JSON.parse(options.select_data) : {} |
59 | 59 | }) |
60 | 60 | if (options.type == '1' && options.select_data && JSON.parse(options.select_data)) { |
61 | - this.handleData(JSON.parse(options.select_data)) | |
61 | + this.handleData(JSON.parse(options.select_data), JSON.parse(options.complete_data)) | |
62 | 62 | } |
63 | + // | |
63 | 64 | }, |
64 | 65 | |
65 | 66 | /** |
... | ... | @@ -76,7 +77,7 @@ Page({ |
76 | 77 | |
77 | 78 | }, |
78 | 79 | |
79 | - handleData: function(data) { | |
80 | + handleData: function(data,completedata) { | |
80 | 81 | var selectarray = data.addition_items; |
81 | 82 | console.log("handleData", data) |
82 | 83 | var selectIndex = this.data.selectIndex; |
... | ... | @@ -88,19 +89,19 @@ Page({ |
88 | 89 | for (var i = 0; i < selectarray.length; i++) { |
89 | 90 | if (selectarray[i].addition_category == 'children_education') { //子女教育 |
90 | 91 | selectIndex[0].sureid = true |
91 | - selectIndex[0].disable_change = true | |
92 | + selectIndex[0].disable_change = completedata.indexOf('children_education')!=-1?true:false | |
92 | 93 | } |
93 | 94 | if (selectarray[i].addition_category == 'continuing_education') { //继续教育 |
94 | 95 | selectIndex[1].sureid = true |
95 | - selectIndex[1].disable_change = true | |
96 | + selectIndex[1].disable_change = completedata.indexOf('continuing_education') != -1 ? true : false | |
96 | 97 | } |
97 | 98 | if (selectarray[i].addition_category == 'support_duty') { //赡养老人 |
98 | 99 | selectIndex[2].sureid = true |
99 | - selectIndex[2].disable_change = true | |
100 | + selectIndex[2].disable_change = completedata.indexOf('support_duty') != -1 ? true : false | |
100 | 101 | } |
101 | 102 | if (selectarray[i].addition_category == 'house_fund_rent') { //住房(租房) |
102 | 103 | selectIndex[3].sureid = true |
103 | - selectIndex[3].disable_change = true | |
104 | + selectIndex[3].disable_change = completedata.indexOf('house_fund_rent') != -1 ? true : false | |
104 | 105 | this.setData({ |
105 | 106 | flag_housing01: false, |
106 | 107 | flag_housing02: true, |
... | ... | @@ -108,7 +109,7 @@ Page({ |
108 | 109 | } |
109 | 110 | if (selectarray[i].addition_category == 'house_fund_loan') { //住房(租房) |
110 | 111 | selectIndex[3].sureid = true |
111 | - selectIndex[3].disable_change = true | |
112 | + selectIndex[3].disable_change = completedata.indexOf('house_fund_loan') != -1 ? true : false | |
112 | 113 | this.setData({ |
113 | 114 | flag_housing01: true, |
114 | 115 | flag_housing02: false, |
... | ... |
... | ... | @@ -11,6 +11,7 @@ Page({ |
11 | 11 | is_declared: false, |
12 | 12 | hascompleted:false, |
13 | 13 | additionlist: [], |
14 | + complete_item:[], | |
14 | 15 | declareStatus: { |
15 | 16 | "to_declare ": "待申报", |
16 | 17 | "declaring": "申报中", |
... | ... | @@ -53,7 +54,7 @@ Page({ |
53 | 54 | console.log("goupdate", e); |
54 | 55 | var newdata = this.data.additionlist[e.currentTarget.id] |
55 | 56 | wx.navigateTo({ |
56 | - url: 'godeclare/godeclare?legal_entity_id=' + newdata.legal_entity_id + "&legal_entity=" + newdata.legal_entity + "&select_data=" + JSON.stringify(newdata) + "&type=1", | |
57 | + url: 'godeclare/godeclare?legal_entity_id=' + newdata.legal_entity_id + "&legal_entity=" + newdata.legal_entity + "&select_data=" + JSON.stringify(newdata) + "&complete_data=" + JSON.stringify(this.data.complete_item) + "&type=1", | |
57 | 58 | }) |
58 | 59 | }, |
59 | 60 | |
... | ... | @@ -109,6 +110,7 @@ Page({ |
109 | 110 | if (res && res.data) { |
110 | 111 | console.log("res", res) |
111 | 112 | that.setData({ |
113 | + complete_item: res.data.complete_item, | |
112 | 114 | additionlist: that.handleData(res.data.items) |
113 | 115 | }) |
114 | 116 | } |
... | ... |
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | <!-- <view wx:if="{{item.status=='to_declare'}}" class='view_godeclare_wrap' bindtap='godeclare' id='{{idx01}}'> --> |
10 | 10 | 立即申报 |
11 | 11 | </view> |
12 | - <view wx:elif="{{item.addition_items&&item.addition_items.length>0&&item.addition_items.length<4}}" class='view_godeclare_wrap' bindtap='goupdate' id='{{idx01}}'> | |
12 | + <view wx:elif="{{complete_item.length<4}}" class='view_godeclare_wrap' bindtap='goupdate' id='{{idx01}}'> | |
13 | 13 | 查看并调整 |
14 | 14 | </view> |
15 | 15 | </view> |
... | ... |
请
注册
或
登录
后发表评论