提交 0d81d1d4fba98991c19f53b8807d6f9180d66e3d

作者 wangyu
1 个父辈 5c34e993

优化

... ... @@ -14,6 +14,7 @@ Page({
14 14 additionlist: [],
15 15 complete_item:[],
16 16 choosed_date: '',
  17 + has_showModal:false,//当前页面是否展示过modal
17 18 show_modal:false,
18 19 tip_detail:"尊敬的用户您好!2020年度的专项附加扣除申报已经启动,请您及时确认填报信息,确保专项附加扣除能正常享受扣除。",
19 20 declareStatus: {
... ... @@ -120,7 +121,7 @@ Page({
120 121 if (res && res.data) {
121 122 console.log("show_modal", !res.data.new_addition_status)
122 123 that.setData({
123   - show_modal: !res.data.new_addition_status,
  124 + show_modal: !that.data.has_showModal&&!res.data.new_addition_status,
124 125 complete_item: res.data.complete_item,
125 126 additionlist: that.handleData(res.data.items)
126 127 })
... ... @@ -172,14 +173,16 @@ Page({
172 173 // 暂不确认
173 174 doNotConfirm:function(){
174 175 this.setData({
175   - show_modal: false
  176 + show_modal: false,
  177 + has_showModal: true
176 178 })
177 179 },
178 180
179 181 // 立即确认
180 182 doConfirm: function () {
181 183 this.setData({
182   - show_modal: false
  184 + show_modal: false,
  185 + has_showModal:true
183 186 })
184 187 this.quickAdd()
185 188 },
... ... @@ -192,7 +195,7 @@ Page({
192 195 url: baseUrl + 'persontax/v1/person-additions-update',
193 196 method:"POST",
194 197 data: {
195   - id_card_no: app.globalData.userInfo?app.globalData.userInfo.id:""
  198 + user_id: app.globalData.userInfo?app.globalData.userInfo.id:""
196 199 },
197 200 header: {
198 201 'content-type': 'application/json',
... ...
... ... @@ -100,13 +100,17 @@ Page({
100 100 spousedataData: {}, //配偶数据
101 101 reduce_amount: -1,
102 102 selected_reduceindex: 0,
103   - selected_addindex: 0
  103 + selected_addindex: 0,
  104 + choosed_date:""//上一个页面选择的年份
104 105 },
105 106
106 107 /**
107 108 * Lifecycle function--Called when page load
108 109 */
109 110 onLoad: function(options) {
  111 + var pages = getCurrentPages()
  112 + var frontPage = pages[pages.length - 2]
  113 + console.log("front",frontPage.data)
110 114 var that = this
111 115 var housetype, housestatus
112 116 wx.showLoading({
... ... @@ -124,6 +128,7 @@ Page({
124 128 housestatus = options.status
125 129 }
126 130 this.setData({
  131 + choosed_date: frontPage.data.choosed_date,
127 132 cur_status: housestatus,
128 133 employee_status: options.employee_status ? options.employee_status:"",
129 134 house_type: housetype,
... ... @@ -158,6 +163,7 @@ Page({
158 163 var Authorization = getApp().globalData.Authorization;
159 164 wx.request({
160 165 url: baseUrl + that.data.url_arr[that.data.cur_status] + that.data.legal_entity_id,
  166 + data: { years: that.data.choosed_date},
161 167 header: {
162 168 'content-type': 'application/json',
163 169 "Authorization": Authorization
... ...
注册登录 后发表评论