Element UI 表格组件:展示税优医疗保险信息并计算月度保单
<p><el-table
:data='!!data ? data.acTaxPiIncomeReportingMedicalInsuranceList : []'
:row-class-name='rowAcTaxPiIncomeReportingMedicalInsuranceIndex'
@selection-change='handleAcTaxPiIncomeReportingMedicalInsuranceSelectionChange'
ref='acTaxPiIncomeReportingMedicalInsurance'</p>
<blockquote>
</blockquote>
<el-table-column type='selection' width='50' align='center' />
<el-table-column label='序号' align='center' prop='index' width='50' />
<el-table-column label='税优识别码' prop='identificationCode'>
<template slot-scope='scope'>
<el-input
v-model='scope.row.identificationCode'
placeholder='请输入税优识别码'
/>
</template>
</el-table-column>
<el-table-column label='保单生效日期' prop='policyEffectiveDate'>
<template slot-scope='scope'>
<el-date-picker
v-model='scope.row.policyEffectiveDate'
type='date'
placeholder='选择日期'
></el-date-picker>
</template>
</el-table-column>
<el-table-column label='年度保单' prop='annualPremium'>
<template slot-scope='scope'>
<el-input
v-model='scope.row.annualPremium'
placeholder='请输入年度保单'
/>
</template>
</el-table-column>
<el-table-column label='月度保单' prop='monthlyPremium'>
<template slot-scope='scope'>
<el-input
v-model='scope.row.monthlyPremium'
placeholder='请输入月度保单'
/>
</template>
</el-table-column>
<el-table-column label='计算月度保单' prop='calculatedMonthlyPremium'>
<template slot-scope='scope'>
<el-input
v-model='scope.row.calculatedMonthlyPremium'
placeholder='计算月度保单'
:disabled='true'
/>
</template>
</el-table-column>
</el-table>
<!-- 计算月度保单 -->
<script>
export default {
data() {
return {
data: [],
}
},
mounted() {
// 获取数据并计算月度保单
this.data.acTaxPiIncomeReportingMedicalInsuranceList.forEach(item => {
item.calculatedMonthlyPremium = item.annualPremium / 12;
})
},
}
</script>
原文地址: https://www.cveoy.top/t/topic/pjbP 著作权归作者所有。请勿转载和采集!