<template>
|
<div class="app-container">
|
<el-card class="box-card">
|
<el-form ref="form" :model="form" :rules="rules" label-width="180px" size="small">
|
<!-- 基本信息 -->
|
<el-row :gutter="20">
|
<el-col :span="6">
|
<el-form-item label="镇(街道)" prop="town" required>
|
<el-input v-model="form.town" placeholder="请输入" clearable style="width: 250px;" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="所在村(社区)" prop="village" required>
|
<el-input v-model="form.village" placeholder="请输入" clearable style="width: 250px;" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="拆迁项目名称" prop="projectName" required>
|
<el-input v-model="form.projectName" placeholder="请输入" clearable style="width: 250px;" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="拆迁时间" prop="demolitionTime">
|
<el-date-picker v-model="form.demolitionTime" type="date" placeholder="请选择拆迁时间" style="width: 250px;" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row :gutter="20">
|
<el-col :span="6">
|
<el-form-item label="户主姓名" prop="householderName" required>
|
<el-input v-model="form.householderName" placeholder="请输入" clearable style="width: 250px;" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="户主身份号" prop="idCard" required>
|
<el-input v-model="form.idCard" placeholder="请输入" clearable style="width: 250px;" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="联系电话" prop="phone" required>
|
<el-input v-model="form.phone" placeholder="请输入" clearable style="width: 250px;" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<!-- 本次安置人数 -->
|
<div class="section-title">本次安置人数</div>
|
<el-row :gutter="20">
|
<el-col :span="8">
|
<el-form-item label="集体经济组织成员" prop="collectiveMember" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.collectiveMember" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">人</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="非集体经济组织成员" prop="nonCollectiveMember" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.nonCollectiveMember" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">人</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="合计" prop="totalMember">
|
<div class="input-with-unit">
|
<el-input v-model="form.totalMember" placeholder="自动计算" disabled style="width: 250px;" >
|
<template slot="append">人</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row :gutter="20">
|
<el-col :span="8">
|
<el-form-item label="待安置家庭成员姓名" prop="familyMembers" required>
|
<el-input v-model="form.familyMembers" placeholder="请输入" clearable style="width: 250px;" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="待安置人员应安置面积合计" label-width="215px" prop="totalSettlementArea" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.totalSettlementArea" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">㎡</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<!-- 补偿金额 -->
|
<div class="section-title">补偿金额</div>
|
<el-row :gutter="20">
|
<el-col :span="8">
|
<el-form-item label="新建商品住房/商业用房/停车位" label-width="215px" prop="newBuildingAmount" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.newBuildingAmount" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">万元</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="二手住房" label-width="215px" prop="secondHandAmount" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.secondHandAmount" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">万元</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="合计" label-width="215px" prop="totalAmount">
|
<div class="input-with-unit">
|
<el-input v-model="form.totalAmount" placeholder="自动计算" disabled style="width: 250px;" >
|
<template slot="append">万元</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row :gutter="20">
|
<el-col :span="8">
|
<el-form-item label="25%首付款" label-width="215px" prop="downPayment" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.downPayment" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">万元</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="每季度需支付款项" label-width="215px" prop="quarterlyPayment" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.quarterlyPayment" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">万元</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="过渡补贴" label-width="215px" prop="transitionalSubsidy" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.transitionalSubsidy" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">万元</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row>
|
<el-col :span="24">
|
<el-form-item label="备注" label-width="215px" prop="remarks">
|
<el-input
|
type="textarea"
|
v-model="form.remarks"
|
placeholder="请输入备注信息"
|
:rows="3"
|
style="width: 100%;"
|
/>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<!-- 领证发放时间 -->
|
<el-row>
|
<el-col :span="8">
|
<el-form-item label="领证发放时间" label-width="215px" prop="certificateTime" required>
|
<el-date-picker
|
v-model="form.certificateTime"
|
type="date"
|
placeholder="请选择领证发放时间"
|
style="width: 250px;"
|
/>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<!-- 购房信息 -->
|
<div class="section-title">购房信息</div>
|
<el-row :gutter="20">
|
<el-col :span="8">
|
<el-form-item label="购房时间" prop="purchaseTime" required>
|
<el-date-picker
|
v-model="form.purchaseTime"
|
type="date"
|
placeholder="请选择购房时间"
|
style="width: 250px;"
|
/>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="成交金额" prop="dealAmount" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.dealAmount" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">万元</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row :gutter="20">
|
<el-col :span="8">
|
<el-form-item label="楼盘名称" prop="newBuildingName" required>
|
<el-input v-model="form.newBuildingName" placeholder="请输入" clearable style="width: 250px;" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="面积" prop="newBuildingArea" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.newBuildingArea" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">㎡</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="套数" prop="newBuildingCount" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.newBuildingCount" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">套</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row :gutter="20">
|
<el-col :span="8">
|
<el-form-item label="小区名称" prop="secondHandName" required>
|
<el-input v-model="form.secondHandName" placeholder="请输入" clearable style="width: 250px;" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="面积" prop="secondHandArea" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.secondHandArea" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">㎡</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="套数" prop="secondHandCount" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.secondHandCount" placeholder="请输入" clearable style="width: 160px;" >
|
<template slot="append">套</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row :gutter="20">
|
<el-col :span="8">
|
<el-form-item label="新建商业用房" prop="newCommercialName" required>
|
<el-input v-model="form.newCommercialName" placeholder="请输入" clearable style="width: 250px;" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="金额" prop="newCommercialAmount" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.newCommercialAmount" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">万元</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="面积" prop="newCommercialArea" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.newCommercialArea" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">㎡</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="套数" prop="newCommercialCount" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.newCommercialCount" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">套</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row :gutter="20">
|
<el-col :span="8">
|
<el-form-item label="新建停车位" prop="newParkingName" required>
|
<el-input v-model="form.newParkingName" placeholder="请输入" clearable style="width: 250px;" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="金额" prop="newParkingAmount" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.newParkingAmount" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">万元</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="个数" prop="newParkingCount" required>
|
<div class="input-with-unit">
|
<el-input v-model="form.newParkingCount" placeholder="请输入" clearable style="width: 250px;" >
|
<template slot="append">套</template>
|
</el-input>
|
</div>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<!-- 补偿款支付 -->
|
<div class="section-title">补偿款支付</div>
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<el-form-item label="自主购房协议签订时间" prop="agreementSignTime" required>
|
<el-date-picker
|
v-model="form.agreementSignTime"
|
type="date"
|
placeholder="请选择时间"
|
style="width: 250px;"
|
/>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="25%补偿款及过渡补贴支付时间" label-width="220px" prop="downPaymentTime" required>
|
<el-date-picker
|
v-model="form.downPaymentTime"
|
type="date"
|
placeholder="请选择时间"
|
style="width: 250px;"
|
/>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row :gutter="20">
|
<el-col :span="24">
|
<el-form-item label="剩余款项支付时间:" prop="remainingPaymentTime">
|
<el-row :gutter="20">
|
<el-col :span="4">
|
<div class="payment-label">第一年</div>
|
<el-date-picker
|
v-model="form.firstYearPayment"
|
type="date"
|
placeholder="请选择时间"
|
style="width: 200px;"
|
/>
|
</el-col>
|
<el-col :span="4">
|
<div class="payment-label">第二年</div>
|
<el-date-picker
|
v-model="form.secondYearPayment"
|
type="date"
|
placeholder="请选择时间"
|
style="width: 200px;"
|
/>
|
</el-col>
|
<el-col :span="4">
|
<div class="payment-label">第三年</div>
|
<el-date-picker
|
v-model="form.thirdYearPayment"
|
type="date"
|
placeholder="请选择时间"
|
style="width: 200px;"
|
/>
|
</el-col>
|
<el-col :span="4">
|
<div class="payment-label">第四年</div>
|
<el-date-picker
|
v-model="form.fourthYearPayment"
|
type="date"
|
placeholder="请选择时间"
|
style="width: 200px;"
|
/>
|
</el-col>
|
<el-col :span="4">
|
<div class="payment-label">第五年</div>
|
<el-date-picker
|
v-model="form.fifthYearPayment"
|
type="date"
|
placeholder="请选择时间"
|
style="width: 200px;"
|
/>
|
</el-col>
|
</el-row>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<!-- 按钮区域 -->
|
<div class="form-footer">
|
<el-button type="primary" @click="submitForm">提交</el-button>
|
</div>
|
</el-form>
|
</el-card>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
name: 'ApplayPerson',
|
data() {
|
return {
|
form: {
|
town: '',
|
village: '',
|
projectName: '',
|
demolitionTime: '',
|
householderName: '',
|
idCard: '',
|
phone: '',
|
collectiveMember: '',
|
nonCollectiveMember: '',
|
totalMember: '',
|
familyMembers: '',
|
totalSettlementArea: '',
|
newBuildingAmount: '',
|
secondHandAmount: '',
|
totalAmount: '',
|
downPayment: '',
|
quarterlyPayment: '',
|
transitionalSubsidy: '',
|
remarks: '',
|
certificateTime: '',
|
purchaseTime: '',
|
dealAmount: '',
|
newBuildingName: '',
|
newBuildingArea: '',
|
newBuildingCount: '',
|
secondHandName: '',
|
secondHandArea: '',
|
secondHandCount: '',
|
newCommercialName: '',
|
newCommercialAmount: '',
|
newCommercialArea: '',
|
newCommercialCount: '',
|
newParkingName: '',
|
newParkingAmount: '',
|
newParkingCount: '',
|
agreementSignTime: '',
|
downPaymentTime: '',
|
firstYearPayment: '',
|
secondYearPayment: '',
|
thirdYearPayment: '',
|
fourthYearPayment: '',
|
fifthYearPayment: '',
|
},
|
rules: {
|
town: [{ required: true, message: '请输入镇(街道)', trigger: 'blur' }],
|
village: [{ required: true, message: '请输入所在村(社区)', trigger: 'blur' }],
|
projectName: [{ 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' }
|
],
|
phone: [
|
{ required: true, message: '请输入联系电话', trigger: 'blur' },
|
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }
|
],
|
collectiveMember: [{ required: true, message: '请输入集体经济组织成员人数', trigger: 'blur' }],
|
nonCollectiveMember: [{ required: true, message: '请输入非集体经济组织成员人数', trigger: 'blur' }],
|
familyMembers: [{ required: true, message: '请输入待安置家庭成员姓名', trigger: 'blur' }],
|
totalSettlementArea: [{ required: true, message: '请输入待安置人员应安置面积合计', trigger: 'blur' }],
|
newBuildingAmount: [{ required: true, message: '请输入新建商品住房/商业用房/停车位金额', trigger: 'blur' }],
|
secondHandAmount: [{ required: true, message: '请输入二手住房金额', trigger: 'blur' }],
|
downPayment: [{ required: true, message: '请输入25%首付款', trigger: 'blur' }],
|
quarterlyPayment: [{ required: true, message: '请输入每季度需支付款项', trigger: 'blur' }],
|
transitionalSubsidy: [{ required: true, message: '请输入过渡补贴', trigger: 'blur' }],
|
certificateTime: [{ required: true, message: '请选择领证发放时间', trigger: 'change' }],
|
purchaseTime: [{ required: true, message: '请选择购房时间', trigger: 'change' }],
|
dealAmount: [{ required: true, message: '请输入成交金额', trigger: 'blur' }],
|
newBuildingName: [{ required: true, message: '请输入楼盘名称', trigger: 'blur' }],
|
newBuildingArea: [{ required: true, message: '请输入面积', trigger: 'blur' }],
|
newBuildingCount: [{ required: true, message: '请输入套数', trigger: 'blur' }],
|
secondHandName: [{ required: true, message: '请输入小区名称', trigger: 'blur' }],
|
secondHandArea: [{ required: true, message: '请输入面积', trigger: 'blur' }],
|
secondHandCount: [{ required: true, message: '请输入套数', trigger: 'blur' }],
|
newCommercialName: [{ required: true, message: '请输入新建商业用房名称', trigger: 'blur' }],
|
newCommercialAmount: [{ required: true, message: '请输入金额', trigger: 'blur' }],
|
newCommercialArea: [{ required: true, message: '请输入面积', trigger: 'blur' }],
|
newCommercialCount: [{ required: true, message: '请输入套数', trigger: 'blur' }],
|
newParkingName: [{ required: true, message: '请输入新建停车位名称', trigger: 'blur' }],
|
newParkingAmount: [{ required: true, message: '请输入金额', trigger: 'blur' }],
|
newParkingCount: [{ required: true, message: '请输入个数', trigger: 'blur' }],
|
agreementSignTime: [{ required: true, message: '请选择自主购房协议签订时间', trigger: 'change' }],
|
downPaymentTime: [{ required: true, message: '请选择25%补偿款及过渡补贴支付时间', trigger: 'change' }],
|
}
|
}
|
},
|
watch: {
|
// 监听集体和非集体成员人数,自动计算总人数
|
'form.collectiveMember': {
|
handler(val) {
|
this.calculateTotalMember()
|
}
|
},
|
'form.nonCollectiveMember': {
|
handler(val) {
|
this.calculateTotalMember()
|
}
|
},
|
// 监听新建和二手房金额,自动计算总金额
|
'form.newBuildingAmount': {
|
handler(val) {
|
this.calculateTotalAmount()
|
}
|
},
|
'form.secondHandAmount': {
|
handler(val) {
|
this.calculateTotalAmount()
|
}
|
}
|
},
|
methods: {
|
// 计算总人数
|
calculateTotalMember() {
|
const collective = parseFloat(this.form.collectiveMember) || 0
|
const nonCollective = parseFloat(this.form.nonCollectiveMember) || 0
|
this.form.totalMember = collective + nonCollective
|
},
|
// 计算总金额
|
calculateTotalAmount() {
|
const newBuilding = parseFloat(this.form.newBuildingAmount) || 0
|
const secondHand = parseFloat(this.form.secondHandAmount) || 0
|
this.form.totalAmount = newBuilding + secondHand
|
},
|
// 处理文件上传
|
handleClickUpload() {
|
// 创建文件输入元素
|
const fileInput = document.createElement('input')
|
fileInput.type = 'file'
|
// 设置接受的文件类型
|
fileInput.accept = '.jpg,.jpeg,.png,.pdf,.doc,.docx'
|
|
// 监听文件选择事件
|
fileInput.addEventListener('change', (event) => {
|
const file = event.target.files[0]
|
if (!file) return
|
|
// 创建FileReader实例
|
const reader = new FileReader()
|
|
// 读取完成后的处理
|
reader.onload = (e) => {
|
// 获取二进制数据
|
const binaryData = e.target.result
|
console.log('文件名:', file.name)
|
console.log('文件类型:', file.type)
|
console.log('文件大小:', file.size, 'bytes')
|
// 这里可以将binaryData存储到组件的data中或进行其他处理
|
// this.fileData = binaryData
|
}
|
|
// 读取文件为二进制数据
|
reader.readAsArrayBuffer(file)
|
})
|
|
// 触发文件选择
|
fileInput.click()
|
},
|
// 提交表单
|
submitForm() {
|
this.$refs.form.validate(valid => {
|
if (valid) {
|
// TODO: 调用接口提交数据
|
this.$message.success('提交成功')
|
}
|
})
|
},
|
// 重置表单
|
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;
|
}
|
|
.section-title {
|
font-size: 16px;
|
font-weight: bold;
|
color: #303133;
|
margin: 20px 0;
|
padding-left: 10px;
|
border-left: 4px solid #409EFF;
|
}
|
|
.input-with-unit {
|
display: inline-flex;
|
align-items: center;
|
|
.unit {
|
margin-left: 8px;
|
color: #606266;
|
}
|
}
|
|
.form-footer {
|
text-align: center;
|
margin-top: 40px;
|
}
|
|
:deep(.el-textarea__inner) {
|
font-family: Arial, sans-serif;
|
}
|
|
.payment-label {
|
font-size: 14px;
|
color: #606266;
|
margin-bottom: 8px;
|
}
|
</style>
|