...
|
...
|
@@ -12,9 +12,9 @@ Page({ |
12
|
12
|
legal_entity_id: "",
|
13
|
13
|
legal_entity: "",
|
14
|
14
|
house_type: "",
|
15
|
|
- person_total_amount:0,
|
|
15
|
+ person_total_amount: 0,
|
16
|
16
|
remaining_amount: 0,
|
17
|
|
- input_disable:false,
|
|
17
|
+ input_disable: false,
|
18
|
18
|
declareStatus: {
|
19
|
19
|
"to_declare": "待申报",
|
20
|
20
|
"declaring": "申报中",
|
...
|
...
|
@@ -166,20 +166,20 @@ Page({ |
166
|
166
|
handleAddition: function(data) {
|
167
|
167
|
var that = this
|
168
|
168
|
var newdata = data.items
|
169
|
|
- if (newdata && newdata.length>0){
|
|
169
|
+ if (newdata && newdata.length > 0) {
|
170
|
170
|
var issinglechild_Data = this.data.issinglechildData;
|
171
|
171
|
issinglechild_Data.disabled = true;
|
172
|
|
- issinglechild_Data.selected = data.is_single=='y'?"是":"否";
|
|
172
|
+ issinglechild_Data.selected = data.is_single == 'y' ? "是" : "否";
|
173
|
173
|
|
174
|
174
|
var shareMethod_Data = this.data.shareMethodData;
|
175
|
175
|
shareMethod_Data.disabled = true;
|
176
|
|
- shareMethod_Data.selected = data.share_method ? data.share_method:"";
|
|
176
|
+ shareMethod_Data.selected = data.share_method ? data.share_method : "";
|
177
|
177
|
|
178
|
178
|
this.setData({
|
179
|
179
|
issinglechildData: issinglechild_Data,
|
180
|
180
|
shareMethodData: shareMethod_Data,
|
181
|
181
|
reduce_amount: data.month_deduction_amount ? data.month_deduction_amount : that.data.reduce_amount,
|
182
|
|
- input_disable:true
|
|
182
|
+ input_disable: true
|
183
|
183
|
})
|
184
|
184
|
}
|
185
|
185
|
for (var i = 0; i < newdata.length; i++) {
|
...
|
...
|
@@ -210,18 +210,18 @@ Page({ |
210
|
210
|
}
|
211
|
211
|
if (newdata[i].rent_end) {
|
212
|
212
|
newdata[i].rent_end = this.formatDate(newdata[i].rent_end)
|
213
|
|
- }
|
214
|
|
- if (newdata[i].loan_start) {//公积金
|
|
213
|
+ }
|
|
214
|
+ if (newdata[i].loan_start) { //公积金
|
215
|
215
|
newdata[i].loan_start = this.formatDate(newdata[i].loan_start)
|
216
|
|
- }
|
217
|
|
- if (newdata[i].sec_loan_start) {//商业
|
|
216
|
+ }
|
|
217
|
+ if (newdata[i].sec_loan_start) { //商业
|
218
|
218
|
newdata[i].sec_loan_start = this.formatDate(newdata[i].sec_loan_start)
|
219
|
|
- }
|
|
219
|
+ }
|
220
|
220
|
|
221
|
221
|
newdata[i].children_id_card_no = this.formatIdNum(newdata[i].children_id_card_no)
|
222
|
222
|
newdata[i].spouse_id_card_no = this.formatIdNum(newdata[i].spouse_id_card_no)
|
223
|
223
|
newdata[i].id_card_no = this.formatIdNum(newdata[i].id_card_no)
|
224
|
|
-
|
|
224
|
+
|
225
|
225
|
if (newdata[i].house_address) {
|
226
|
226
|
if (newdata[i].house_address.province == newdata[i].house_address.city) {
|
227
|
227
|
newdata[i].house_address_new = newdata[i].house_address.city + newdata[i].house_address.district
|
...
|
...
|
@@ -251,7 +251,7 @@ Page({ |
251
|
251
|
console.log("housetype_new", housetype_new)
|
252
|
252
|
this.setData({
|
253
|
253
|
house_type: housetype_new,
|
254
|
|
- person_total_amount: data.person_total_amount ? data.person_total_amount:0,
|
|
254
|
+ person_total_amount: data.person_total_amount ? data.person_total_amount : 0,
|
255
|
255
|
remaining_amount: data.remaining_amount ? data.remaining_amount : 0,
|
256
|
256
|
additionInfo: newdata
|
257
|
257
|
})
|
...
|
...
|
@@ -332,10 +332,15 @@ Page({ |
332
|
332
|
this.showToast("请选择分摊方式")
|
333
|
333
|
return
|
334
|
334
|
}
|
335
|
|
- if (this.data.reduce_amount == -1){
|
|
335
|
+ if (this.data.reduce_amount == -1) {
|
336
|
336
|
this.showToast("请输入扣除金额")
|
337
|
337
|
return
|
338
|
|
- }else if (this.data.reduce_amount < 0 || this.data.reduce_amount > 1000) {
|
|
338
|
+ }
|
|
339
|
+ if (format.checkNumber(this.data.reduce_amount)){
|
|
340
|
+ this.showToast("请输入正确格式")
|
|
341
|
+ return
|
|
342
|
+ }
|
|
343
|
+ if (this.data.reduce_amount < 0 || this.data.reduce_amount > 1000) {
|
339
|
344
|
this.showToast("本年度月扣除金额不得大于1000")
|
340
|
345
|
return
|
341
|
346
|
}
|
...
|
...
|
@@ -344,6 +349,7 @@ Page({ |
344
|
349
|
reduce_amount: 2000
|
345
|
350
|
})
|
346
|
351
|
}
|
|
352
|
+ console.log("reduce_amount", this.data.reduce_amount)
|
347
|
353
|
}
|
348
|
354
|
var modalinfo, senddata
|
349
|
355
|
if (this.data.cur_status == 'continuing_education' || this.data.cur_status == 'house_fund') {
|
...
|
...
|
@@ -543,7 +549,7 @@ Page({ |
543
|
549
|
formatDate(date) {
|
544
|
550
|
if (date == 0 || date == -62135596800) {
|
545
|
551
|
date = ""
|
546
|
|
- }else{
|
|
552
|
+ } else {
|
547
|
553
|
date = format.formatTime_date(date)
|
548
|
554
|
}
|
549
|
555
|
console.log("formatDate", date)
|
...
|
...
|
@@ -564,16 +570,20 @@ Page({ |
564
|
570
|
|
565
|
571
|
bindinput: function(e) {
|
566
|
572
|
console.log("bindinput", e)
|
567
|
|
- var inputamount
|
568
|
|
- if (e.detail.value && e.detail.value.replace(/\s|\xA0/g, "").length>0){
|
569
|
|
- inputamount = parseFloat(e.detail.value)+0
|
570
|
|
- }else{
|
571
|
|
- inputamount = -1
|
|
573
|
+ var inputamount
|
|
574
|
+ if (!e.detail.value || e.detail.value.length < 1 || parseFloat(e.detail.value).toString() == "NaN") {
|
|
575
|
+ this.showToast("请输入正确格式");
|
|
576
|
+ return;
|
572
|
577
|
}
|
|
578
|
+
|
|
579
|
+ if (e.detail.value.length < 1 || !format.checkNumber(e.detail.value)) {
|
|
580
|
+ this.showToast("请输入正确格式");
|
|
581
|
+ return;
|
|
582
|
+ }
|
|
583
|
+
|
573
|
584
|
this.setData({
|
574
|
585
|
reduce_amount: inputamount
|
575
|
586
|
})
|
576
|
|
- console.log("reduce_amount", inputamount)
|
577
|
587
|
},
|
578
|
588
|
|
579
|
589
|
showToast: function(data) {
|
...
|
...
|
|