...
|
...
|
@@ -160,18 +160,19 @@ Page({ |
160
|
160
|
handleAddition: function(data) {
|
161
|
161
|
var newdata = data.items
|
162
|
162
|
for (var i = 0; i < newdata.length; i++) {
|
163
|
|
- if (newdata[i].education_start && newdata[i].education_start > 0) {
|
164
|
|
- newdata[i].education_start = format.formatTime_date(newdata[i].education_start)
|
|
163
|
+ if (newdata[i].education_start) {
|
|
164
|
+ newdata[i].education_start = this.formatDate(newdata[i].education_start)
|
165
|
165
|
}
|
166
|
|
- if (newdata[i].education_end && newdata[i].education_end > 0) {
|
167
|
|
- newdata[i].education_end = format.formatTime_date(newdata[i].education_end)
|
|
166
|
+ if (newdata[i].education_end) {
|
|
167
|
+ newdata[i].education_end = this.formatDate(newdata[i].education_end)
|
168
|
168
|
}
|
169
|
|
- if (newdata[i].approval_date && newdata[i].approval_date > 0) {
|
170
|
|
- newdata[i].approval_date = format.formatTime_date(newdata[i].approval_date)
|
|
169
|
+ if (newdata[i].approval_date) {
|
|
170
|
+ newdata[i].approval_date = this.formatDate(newdata[i].approval_date)
|
171
|
171
|
}
|
172
|
|
- if (newdata[i].patient_birthday && newdata[i].patient_birthday > 0) {
|
173
|
|
- newdata[i].patient_birthday = format.formatTime_date(newdata[i].patient_birthday)
|
|
172
|
+ if (newdata[i].patient_birthday) {
|
|
173
|
+ newdata[i].patient_birthday = this.formatDate(newdata[i].patient_birthday)
|
174
|
174
|
}
|
|
175
|
+
|
175
|
176
|
if (newdata[i].house_address) {
|
176
|
177
|
if (newdata[i].house_address.province == newdata[i].house_address.city) {
|
177
|
178
|
newdata[i].house_address_new = newdata[i].house_address.city + newdata[i].house_address.district
|
...
|
...
|
@@ -181,9 +182,10 @@ Page({ |
181
|
182
|
}
|
182
|
183
|
if (newdata[i].co_supporters && newdata[i].co_supporters.length > 0) {
|
183
|
184
|
for (var j = 0; j < newdata[i].co_supporters.length; j++) {
|
184
|
|
- if (newdata[i].co_supporters[j].birthday && newdata[i].birthday > 0) {
|
185
|
|
- newdata[i].co_supporters[j].birthday = format.formatTime_date(newdata[i].co_supporters[j].birthday)
|
|
185
|
+ if (newdata[i].co_supporters[j].birthday) {
|
|
186
|
+ newdata[i].co_supporters[j].birthday = this.formatDate(newdata[i].co_supporters[j].birthday)
|
186
|
187
|
}
|
|
188
|
+ newdata[i].co_supporters[j].id_card_no = this.formatIdNum(newdata[i].co_supporters[j].id_card_no)
|
187
|
189
|
}
|
188
|
190
|
}
|
189
|
191
|
newdata[i].id_card_no = this.formatIdNum(newdata[i].id_card_no)
|
...
|
...
|
@@ -480,7 +482,17 @@ Page({ |
480
|
482
|
}
|
481
|
483
|
},
|
482
|
484
|
|
483
|
|
- formatIdNum: function (idnum) {
|
|
485
|
+ formatDate(date) {
|
|
486
|
+ if (date == 0 || date == -62135596800) {
|
|
487
|
+ date = ""
|
|
488
|
+ }else{
|
|
489
|
+ date = format.formatTime_date(date)
|
|
490
|
+ }
|
|
491
|
+ console.log("formatDate", date)
|
|
492
|
+ return date
|
|
493
|
+ },
|
|
494
|
+
|
|
495
|
+ formatIdNum: function(idnum) {
|
484
|
496
|
if (idnum && idnum.length >= 6 && idnum.length < 10) {
|
485
|
497
|
idnum = idnum.substring(0, 2) + '****' + idnum.substring(idnum.length - 2, idnum.length);
|
486
|
498
|
}
|
...
|
...
|
@@ -494,9 +506,11 @@ Page({ |
494
|
506
|
|
495
|
507
|
bindinput: function(e) {
|
496
|
508
|
console.log("bindinput", e)
|
497
|
|
- this.setData({
|
498
|
|
- reduce_amount: parseFloat(e.detail.value)
|
499
|
|
- })
|
|
509
|
+ if (e.detail.value && e.detail.value.replace(/\s+/g, "").length>0){
|
|
510
|
+ this.setData({
|
|
511
|
+ reduce_amount: parseFloat(e.detail.value)
|
|
512
|
+ })
|
|
513
|
+ }
|
500
|
514
|
},
|
501
|
515
|
|
502
|
516
|
showToast: function(data) {
|
...
|
...
|
|