<template>
|
<div class="app-container">
|
<el-card class="box-card">
|
<el-form ref="form" :model="form" :rules="rules" label-width="215px" size="small">
|
<!-- 基本信息 -->
|
<div class="form-section">
|
<el-row :gutter="20">
|
<el-col :span="8">
|
<el-form-item label="拆迁项目名称" prop="projectName">
|
<el-input style="width: 200px;" v-model="form.projectName" placeholder="请输入"
|
clearable />
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="所在村(社区)" prop="village">
|
<el-input style="width: 200px;"
|
v-model="form.village" placeholder="请输入" clearable />
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="户主姓名" prop="householderName">
|
<el-input style="width: 200px;" v-model="form.householderName" placeholder="请输入"
|
clearable />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row :gutter="20">
|
<el-col :span="8">
|
<el-form-item label="户主身份号" prop="idCard">
|
<el-input style="width: 200px;" v-model="form.idCard" placeholder="请输入" clearable />
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="应安置人数" prop="familySize">
|
<el-input v-model="form.familySize" :min="1" :controls="false"
|
controls-position="right" style="width: 200px;">
|
<template slot="append">人</template>
|
</el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="所有家庭成员应安置面积" prop="totalArea">
|
<el-input style="width: 200px;" v-model="form.totalArea" :controls="false"
|
:min="0" :precision="2" controls-position="right">
|
<template slot="append">㎡</template>
|
</el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</div>
|
|
<!-- 补偿金额标准 -->
|
<div class="form-section">
|
<div class="section-title">补偿金额标准</div>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="新建商品住房/商业用房/停车位" prop="newBuildingStandard">
|
<el-input v-model="form.newBuildingStandard" :min="0" :controls="false"
|
:precision="2" controls-position="right" style="width: 200px;">
|
<template slot="append">万元</template>
|
</el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="二手住房" prop="secondHandStandard">
|
<el-input v-model="form.secondHandStandard" :min="0" :controls="false"
|
:precision="2" controls-position="right" style="width: 200px;">
|
<template slot="append">万元</template>
|
</el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</div>
|
|
<!-- 补偿金额 -->
|
<div class="form-section">
|
<div class="section-title">补偿金额</div>
|
<el-row :gutter="20">
|
<el-col :span="8">
|
<el-form-item label="补偿总金额" prop="totalAmount">
|
<el-input v-model="form.totalAmount" :min="0" :controls="false" :precision="2"
|
controls-position="right" style="width: 200px;">
|
<template slot="append">万元</template>
|
</el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="25%首付款" prop="downPayment">
|
<el-input v-model="form.downPayment" :min="0" :controls="false" :precision="2"
|
controls-position="right" style="width: 200px;">
|
<template slot="append">万元</template>
|
</el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="每季度需要支付款项" prop="quarterlyPayment">
|
<el-input v-model="form.quarterlyPayment" :min="0" :controls="false"
|
:precision="2" controls-position="right" style="width: 200px;">
|
<template slot="append">万元</template>
|
</el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row :gutter="20">
|
<el-col :span="8">
|
<el-form-item label="过渡补贴" prop="transitionalSubsidy">
|
<el-input v-model="form.transitionalSubsidy" :min="0" :controls="false"
|
:precision="2" controls-position="right" style="width: 200px;">
|
<template slot="append">万元</template>
|
</el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row>
|
<el-col :span="16">
|
<el-form-item label="备注" prop="remarks">
|
<el-input v-model="form.remarks" type="textarea" :rows="3" placeholder="请输入备注信息" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</div>
|
|
<!-- 按钮区域 -->
|
<div class="form-footer">
|
<el-button type="primary" size="small" @click="submitForm">提交</el-button>
|
</div>
|
</el-form>
|
</el-card>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
name: 'AddResettle',
|
data() {
|
return {
|
// 表单数据
|
form: {
|
projectName: '',
|
village: '',
|
householderName: '',
|
idCard: '',
|
familySize: 1,
|
totalArea: 0,
|
newBuildingStandard: 0,
|
secondHandStandard: 0,
|
totalAmount: 0,
|
downPayment: 0,
|
quarterlyPayment: 0,
|
transitionalSubsidy: 0,
|
remarks: ''
|
},
|
// 表单校验规则
|
rules: {
|
projectName: [
|
{ required: true, message: '请输入镇街项目名称', trigger: 'blur' }
|
],
|
village: [
|
{ required: true, message: '请输入所在村(社区)', trigger: 'blur' }
|
],
|
householderName: [
|
{ required: true, message: '请输入户主姓名', trigger: 'blur' }
|
],
|
idCard: [
|
{ required: true, message: '请输入户主身份号', trigger: 'blur' },
|
{ pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, message: '请输入正确的身份证号', trigger: 'blur' }
|
],
|
newBuildingStandard: [
|
{ required: true, message: '请输入新建商品住房/商业用房/停车位', trigger: 'blur' },
|
{ type: 'number', message: '请输入正确的数字', trigger: 'blur' }
|
],
|
secondHandStandard: [
|
{ required: true, message: '请输入二手住房', trigger: 'blur' },
|
{ type: 'number', message: '请输入正确的数字', trigger: 'blur' }
|
],
|
transitionalSubsidy: [
|
{ required: true, message: '请输入过渡补贴', trigger: 'blur' },
|
{ type: 'number', message: '请输入正确的数字', trigger: 'blur' }
|
],
|
downPayment: [
|
{ required: true, message: '请输入25%首付款', trigger: 'blur' },
|
{ type: 'number', message: '请输入正确的数字', trigger: 'blur' }
|
],
|
quarterlyPayment: [
|
{ required: true, message: '请输入每季度需要支付款项', trigger: 'blur' },
|
{ type: 'number', message: '请输入正确的数字', trigger: 'blur' }
|
],
|
transitionalSubsidy: [
|
{ required: true, message: '请输入过渡补贴', trigger: 'blur' },
|
{ type: 'number', message: '请输入正确的数字', trigger: 'blur' }
|
],
|
|
familySize: [
|
{ required: true, message: '请输入应安置人数', trigger: 'blur' },
|
{ type: 'number', message: '请输入正确的数字', trigger: 'blur' }
|
],
|
totalArea: [
|
{ required: true, message: '请输入所有家庭成员应安置面积', trigger: 'blur' },
|
{ type: 'number', message: '请输入正确的数字', trigger: 'blur' }
|
],
|
totalAmount: [
|
{ required: true, message: '请输入补偿总金额', trigger: 'blur' },
|
{ type: 'number', message: '请输入正确的数字', trigger: 'blur' }
|
]
|
}
|
}
|
},
|
methods: {
|
// 提交表单
|
submitForm() {
|
this.$refs.form.validate(valid => {
|
if (valid) {
|
// TODO: 调用接口提交数据
|
this.$message.success('提交成功')
|
} else {
|
return false
|
}
|
})
|
},
|
// 重置表单
|
resetForm() {
|
this.$refs.form.resetFields()
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.app-container {
|
padding: 20px;
|
background-color: #f5f7fa;
|
min-height: calc(100vh - 84px);
|
}
|
|
.box-card {
|
margin-bottom: 20px;
|
|
.form-section {
|
margin-bottom: 30px;
|
|
.section-title {
|
font-size: 16px;
|
font-weight: bold;
|
color: #303133;
|
margin-bottom: 20px;
|
padding-left: 10px;
|
border-left: 4px solid #409EFF;
|
}
|
}
|
|
.form-footer {
|
text-align: center;
|
margin-top: 40px;
|
}
|
}
|
|
:deep(.el-input-number) {
|
width: 100%;
|
}
|
|
:deep(.el-textarea__inner) {
|
font-family: Arial, sans-serif;
|
}
|
</style>
|