|
...
|
...
|
@@ -178,7 +178,7 @@ Page({ |
|
178
|
178
|
this.setData({
|
|
179
|
179
|
issinglechildData: issinglechild_Data,
|
|
180
|
180
|
shareMethodData: shareMethod_Data,
|
|
181
|
|
- reduce_amount: data.month_deduction_amount ? data.month_deduction_amount : that.data.reduce_amount,
|
|
|
181
|
+ reduce_amount: data.month_deduction_amount ? data.month_deduction_amount : 0,
|
|
182
|
182
|
input_disable: true
|
|
183
|
183
|
})
|
|
184
|
184
|
}
|
|
...
|
...
|
@@ -328,6 +328,7 @@ Page({ |
|
328
|
328
|
return
|
|
329
|
329
|
}
|
|
330
|
330
|
if (this.data.issinglechildData.selected == "否") {
|
|
|
331
|
+ console.log("reduce_amount", this.data.reduce_amount)
|
|
331
|
332
|
if (this.data.shareMethodData.selected.length < 1) {
|
|
332
|
333
|
this.showToast("请选择分摊方式")
|
|
333
|
334
|
return
|
|
...
|
...
|
@@ -336,7 +337,7 @@ Page({ |
|
336
|
337
|
this.showToast("请输入扣除金额")
|
|
337
|
338
|
return
|
|
338
|
339
|
}
|
|
339
|
|
- if (format.checkNumber(this.data.reduce_amount)){
|
|
|
340
|
+ if (!format.checkNumber(this.data.reduce_amount+"")){
|
|
340
|
341
|
this.showToast("请输入正确格式")
|
|
341
|
342
|
return
|
|
342
|
343
|
}
|
|
...
|
...
|
@@ -569,20 +570,15 @@ Page({ |
|
569
|
570
|
},
|
|
570
|
571
|
|
|
571
|
572
|
bindinput: function(e) {
|
|
572
|
|
- console.log("bindinput", e)
|
|
573
|
|
- var inputamount
|
|
574
|
|
- if (!e.detail.value || e.detail.value.length < 1 || parseFloat(e.detail.value).toString() == "NaN") {
|
|
|
573
|
+
|
|
|
574
|
+ var inputamount = e.detail.value
|
|
|
575
|
+ if (inputamount.length < 1 || !format.checkNumber(inputamount)) {
|
|
575
|
576
|
this.showToast("请输入正确格式");
|
|
576
|
577
|
return;
|
|
577
|
578
|
}
|
|
578
|
|
-
|
|
579
|
|
- if (e.detail.value.length < 1 || !format.checkNumber(e.detail.value)) {
|
|
580
|
|
- this.showToast("请输入正确格式");
|
|
581
|
|
- return;
|
|
582
|
|
- }
|
|
583
|
|
-
|
|
|
579
|
+ console.log("bindinput", inputamount)
|
|
584
|
580
|
this.setData({
|
|
585
|
|
- reduce_amount: inputamount
|
|
|
581
|
+ reduce_amount: parseFloat(inputamount)
|
|
586
|
582
|
})
|
|
587
|
583
|
},
|
|
588
|
584
|
|
...
|
...
|
|