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