提交 f11e195b195a3a3926fed637221772415cdc0b77

作者 wangyu
1 个父辈 ed237325

优化

... ... @@ -175,6 +175,9 @@ Page({
175 175 handleAddition: function(data) {
176 176 var that = this
177 177 var newdata = data.items
  178 + this.setData({
  179 + origindata: data
  180 + })
178 181 if (newdata && newdata.length > 0) {
179 182 if (that.data.cur_status == "continuing_education") {
180 183 var professionlist = newdata[0].profession_items
... ... @@ -219,6 +222,9 @@ Page({
219 222 if (cosupportlist[i].birthday) {
220 223 cosupportlist[i].birthday = this.formatDate(cosupportlist[i].birthday)
221 224 }
  225 + if (cosupportlist[i].id_card_no) {
  226 + cosupportlist[i].id_card_no = this.formatIdNum(cosupportlist[i].id_card_no)
  227 + }
222 228 }
223 229 }
224 230 this.setData({
... ... @@ -305,7 +311,6 @@ Page({
305 311 reduce_amount: data.month_deduction_amount ? data.month_deduction_amount : 0,
306 312 input_disable: true,
307 313
308   - origindata: data,
309 314 handle_finished: true,
310 315 person_total_amount: data.person_total_amount ? data.person_total_amount : 0,
311 316 remaining_amount: data.remaining_amount ? data.remaining_amount : 0,
... ... @@ -315,7 +320,6 @@ Page({
315 320 wx.hideLoading()
316 321 } else {
317 322 this.setData({
318   - origindata: data,
319 323 additionInfo: newdata
320 324 })
321 325 }
... ... @@ -400,7 +404,7 @@ Page({
400 404
401 405 goedit: function(e) { //编辑
402 406 console.log("goedit", e)
403   - var oridata = this.data.origindata.items
  407 + var oridata = this.data.origindata?this.data.origindata.items:[]
404 408 var new_info
405 409 if (this.data.cur_status == "continuing_education") {
406 410 if (e.currentTarget.id.indexOf('title') != -1) {
... ... @@ -423,6 +427,7 @@ Page({
423 427 } else {
424 428 new_info = oridata[e.currentTarget.id]
425 429 }
  430 + console.log("new_info", new_info)
426 431 wx.navigateTo({
427 432 url: '../addextrainfo/addextrainfo?datas=' + JSON.stringify(new_info) + '&status=' + this.data.cur_status + '&reducetype=' + this.data.reducetypeData[this.data.selected_reduceindex] + '&isedit=true',
428 433 })
... ...
注册登录 后发表评论