提交 0d81d1d4fba98991c19f53b8807d6f9180d66e3d

作者 wangyu
1 个父辈 5c34e993

优化

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