|
|
@ -308,7 +308,13 @@ export default { |
|
|
|
this.formobj.collectionDate = year + '-' + month + '-' + day |
|
|
|
}, |
|
|
|
UpNumber(e) { |
|
|
|
e.target.value = e.target.value.replace(/[^0-9.]/g, '') |
|
|
|
e.target.value = e.target.value.replace(/[^\d]/g, '') // 清除“数字”和“.”"-"以外的字符 |
|
|
|
e.target.value = e.target.value.replace(/^00/, '0') // 开头不能有两个0 |
|
|
|
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') { |
|
|
|
// 以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额 |
|
|
|
console.log(e.target.value) |
|
|
|
e.target.value = parseFloat(e.target.value) |
|
|
|
} |
|
|
|
}, |
|
|
|
DataDictionary() { |
|
|
|
dataDictionary({ type: 'receiptBank' }).then((res) => { |
|
|
@ -374,7 +380,16 @@ export default { |
|
|
|
this.balance = this.formobj.collectionMoney |
|
|
|
}, |
|
|
|
changeSubscriptionMoney() { |
|
|
|
this.calculateBalance() |
|
|
|
let subscriptionMoney = '0' |
|
|
|
for (var i = 0; i < this.formobj.finSelectedReceivablesDetaileds.length; i++) { |
|
|
|
if (this.formobj.finSelectedReceivablesDetaileds[i].subscriptionMoney === '') { |
|
|
|
subscriptionMoney = '1' |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if (subscriptionMoney === '0') { |
|
|
|
this.calculateBalance() |
|
|
|
} |
|
|
|
}, |
|
|
|
// 计算余额 |
|
|
|
calculateBalance() { |
|
|
|