文章来源:https://www.toymoban.com/news/detail-695619.html
<el-col :span="12">
<el-form-item label="当年累计实收租金:" prop="cumulativeRent">
<el-input
v-model="createForm.cumulativeRent"
@input="rate"
clearable
:disabled="value === 2"
>
<template slot="append">万元</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="当年合同约定的累计租金:" prop="contractRent">
<el-input
v-model="createForm.contractRent"
@input="rate"
clearable
:disabled="value === 2"
>
<template slot="append">万元</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="租金回笼率:">
<el-input
v-model="createForm.returnRate"
placeholder="自动计算,当年累计实收/当年合同约定的累计租金,2位小数"
clearable
disabled
>
<template slot="append">%</template>
</el-input>
</el-form-item>
</el-col>
computed: {
rate() {
if (this.createForm.cumulativeRent && this.createForm.contractRent) {
this.createForm.returnRate =
parseFloat(
this.createForm.cumulativeRent / this.createForm.contractRent
).toFixed(4) * 100;
}
}
},
文章来源地址https://www.toymoban.com/news/detail-695619.html
到了这里,关于自动计算比例 计算属性 computed @input=“rate“的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!