正在显示
5 个修改的文件
包含
25 行增加
和
6 行删除
| ... | ... | @@ -22,13 +22,20 @@ Page({ |
| 22 | 22 | cardtype: "", |
| 23 | 23 | nation: "", |
| 24 | 24 | birthday_datelong: -1, |
| 25 | + choosed_date: ""//上一个页面选择的年份 | |
| 25 | 26 | }, |
| 26 | 27 | |
| 27 | 28 | /** |
| 28 | 29 | * Lifecycle function--Called when page load |
| 29 | 30 | */ |
| 30 | 31 | onLoad: function(options) { |
| 32 | + var pages = getCurrentPages() | |
| 33 | + var frontPage = pages[pages.length - 2] | |
| 34 | + console.log("front", frontPage.data) | |
| 31 | 35 | console.log("onLoad", options) |
| 36 | + this.setData({ | |
| 37 | + choosed_date: frontPage.data.choosed_date, | |
| 38 | + }) | |
| 32 | 39 | if (options.id) { |
| 33 | 40 | this.setData({ |
| 34 | 41 | legal_entity_id: options.id, |
| ... | ... | @@ -191,6 +198,7 @@ Page({ |
| 191 | 198 | wx.request({ |
| 192 | 199 | url: baseUrl + 'persontax/v1/co-supporters', |
| 193 | 200 | data: { |
| 201 | + 'years': that.data.choosed_date+"", | |
| 194 | 202 | "id": that.data.supporter_id, |
| 195 | 203 | "legal_entity_id": that.data.legal_entity_id, |
| 196 | 204 | "co_supporter": formdata.name, | ... | ... |
| ... | ... | @@ -537,7 +537,8 @@ Page({ |
| 537 | 537 | // }, |
| 538 | 538 | edu_lable: "school", |
| 539 | 539 | oldersupport_lable: "", |
| 540 | - img_path: "/images/upload_img.png" | |
| 540 | + img_path: "/images/upload_img.png", | |
| 541 | + choosed_date: ""//上一个页面选择的年份 | |
| 541 | 542 | }, |
| 542 | 543 | |
| 543 | 544 | /** |
| ... | ... | @@ -636,6 +637,7 @@ Page({ |
| 636 | 637 | } |
| 637 | 638 | |
| 638 | 639 | this.setData({ |
| 640 | + choosed_date: frontPage.data.choosed_date, | |
| 639 | 641 | title: title, |
| 640 | 642 | cur_index: nameKey, |
| 641 | 643 | house_type: house_type, |
| ... | ... | @@ -1975,6 +1977,7 @@ Page({ |
| 1975 | 1977 | } |
| 1976 | 1978 | newdata.legal_entity_id = this.legal_entity_id |
| 1977 | 1979 | newdata.legal_entity = this.legal_entity |
| 1980 | + newdata.years = this.data.choosed_date+"" | |
| 1978 | 1981 | if (this.isEdit) { |
| 1979 | 1982 | newdata.id = this.edit_id |
| 1980 | 1983 | } | ... | ... |
| ... | ... | @@ -41,7 +41,8 @@ Page({ |
| 41 | 41 | sureid: false, |
| 42 | 42 | disable_change: '', |
| 43 | 43 | status: "", |
| 44 | - extra_message: '' | |
| 44 | + extra_message: '', | |
| 45 | + choosed_date: ""//上一个页面选择的年份 | |
| 45 | 46 | }, |
| 46 | 47 | ], |
| 47 | 48 | }, |
| ... | ... | @@ -50,10 +51,14 @@ Page({ |
| 50 | 51 | * Lifecycle function--Called when page load |
| 51 | 52 | */ |
| 52 | 53 | onLoad: function(options) { |
| 54 | + var pages = getCurrentPages() | |
| 55 | + var frontPage = pages[pages.length - 2] | |
| 56 | + console.log("front", frontPage.data) | |
| 53 | 57 | console.log("onLoad", options) |
| 54 | 58 | this.setData({ |
| 55 | 59 | legal_entity_id: options.legal_entity_id, |
| 56 | 60 | legal_entity: options.legal_entity, |
| 61 | + choosed_date: frontPage.data.choosed_date, | |
| 57 | 62 | type: options.type, |
| 58 | 63 | selectdata: options.select_data ? JSON.parse(options.select_data) : {} |
| 59 | 64 | }) |
| ... | ... | @@ -222,6 +227,7 @@ Page({ |
| 222 | 227 | wx.request({ |
| 223 | 228 | url: baseUrl + 'persontax/v1/additional-settings', |
| 224 | 229 | data: { |
| 230 | + "years": that.data.choosed_date+"", | |
| 225 | 231 | "legal_entity_id": this.data.legal_entity_id, |
| 226 | 232 | "legal_entity": this.data.legal_entity, |
| 227 | 233 | "options": array | ... | ... |
| ... | ... | @@ -14,6 +14,7 @@ Page({ |
| 14 | 14 | additionlist: [], |
| 15 | 15 | complete_item:[], |
| 16 | 16 | choosed_date: '', |
| 17 | + addition_data_last_year:false,//上一年是否有数据 | |
| 17 | 18 | has_showModal:false,//当前页面是否展示过modal |
| 18 | 19 | show_modal:false, |
| 19 | 20 | tip_detail:"尊敬的用户您好!2020年度的专项附加扣除申报已经启动,请您及时确认填报信息,确保专项附加扣除能正常享受扣除。", |
| ... | ... | @@ -121,6 +122,7 @@ Page({ |
| 121 | 122 | if (res && res.data) { |
| 122 | 123 | console.log("show_modal", !res.data.new_addition_status) |
| 123 | 124 | that.setData({ |
| 125 | + addition_data_last_year: res.data.last_addition_status, | |
| 124 | 126 | show_modal: !that.data.has_showModal&&!res.data.new_addition_status, |
| 125 | 127 | complete_item: res.data.complete_item, |
| 126 | 128 | additionlist: that.handleData(res.data.items) | ... | ... |
| ... | ... | @@ -133,10 +133,7 @@ |
| 133 | 133 | </view> --> |
| 134 | 134 | |
| 135 | 135 | </view> |
| 136 | - <view wx:if="{{hascompleted&&additionlist.length<1&&choosed_date!=2020}}" style='background:#fff;'> | |
| 137 | - <image style='width:55%;height:254rpx;margin:400rpx 166rpx 0 166rpx;' src='/images/noreduce_img.png'></image> | |
| 138 | - </view> | |
| 139 | - <view wx:if="{{hascompleted&&additionlist.length<1&&choosed_date==2020}}" style='background:#fef6e9;padding:40rpx 30rpx;display:flex;'> | |
| 136 | + <view wx:if="{{hascompleted&&additionlist.length<1&&choosed_date==2020&&addition_data_last_year}}" style='background:#fef6e9;padding:40rpx 30rpx;display:flex;'> | |
| 140 | 137 | <view style="margin-right:20rpx;margin-top:10rpx"> |
| 141 | 138 | <image style='width:40rpx;height:40rpx;' src='/images/warn_yellow.png'></image> |
| 142 | 139 | </view> |
| ... | ... | @@ -147,4 +144,7 @@ |
| 147 | 144 | </view> |
| 148 | 145 | |
| 149 | 146 | </view> |
| 147 | + <view wx:elif="{{hascompleted&&additionlist.length<1}}" style='background:#fff;'> | |
| 148 | + <image style='width:55%;height:254rpx;margin:400rpx 166rpx 0 166rpx;' src='/images/noreduce_img.png'></image> | |
| 149 | + </view> | |
| 150 | 150 | </view> |
| \ No newline at end of file | ... | ... |
请
注册
或
登录
后发表评论