|
|
@@ -1,21 +1,24 @@
|
|
|
<template>
|
|
|
<view class="">
|
|
|
- <view class="data-from" v-for="item in houseList">
|
|
|
- <en-input label="产权人" type="text" placeholder="请输入产权人" v-model="item.property_owner" v-if="verifyKey('property_owner')"></en-input>
|
|
|
- <en-input label="房产证号" v-model="item.deed_num" v-if="verifyKey('deed_num')" type="text" placeholder="请输入房产证号"></en-input>
|
|
|
- <en-city label="房产城市" v-model="item.house_city" v-if="verifyKey('house_city')" placeholder="请选择省、市、区"></en-city>
|
|
|
- <en-input label="房产地址" v-model="item.house_address" v-if="verifyKey('house_address')" type="text" placeholder="请输入房产详细地址"></en-input>
|
|
|
- <en-select label="房屋用途" v-model="item.house_use" v-if="verifyKey('house_use')" placeholder="请选择房屋用途" :local-data="houseTypeData" ></en-select>
|
|
|
- <en-date label="建成年份" v-model="item.build_date" v-if="verifyKey('build_date')" placeholder="选择房屋建成年份"></en-date>
|
|
|
- <en-radio label="材料费" v-model="item.is_pay" v-if="verifyKey('is_pay')" :radio-data="payData"></en-radio>
|
|
|
- <en-input label="建筑面积" v-model="item.covered_area" v-if="verifyKey('covered_area')" type="digit" placeholder="请输入建筑面积" rightText="㎡"></en-input>
|
|
|
- <en-upload label="上传房产证件" v-model="item.certificate_img" v-if="verifyKey('certificate_img')" :imageWidth="180"></en-upload>
|
|
|
- <en-upload label="上传房产关联图片" v-model="item.property" v-if="verifyKey('property')" :imageWidth="180"></en-upload>
|
|
|
- <en-input label="备注" v-model="item.remark" v-if="verifyKey('remark')" type="text" placeholder="请输入备注信息" :noBox="true"></en-input>
|
|
|
+ <view class="data-from" v-for="item in insuranceList">
|
|
|
+ <en-input label="保险公司" type="text" placeholder="请输入保险公司名称" v-model="item.insurance_name"
|
|
|
+ v-if="verifyKey('insurance_name')"></en-input>
|
|
|
+ <en-select label="保险类型" placeholder="请选择保险类型" v-model="item.insurance_type"
|
|
|
+ v-if="verifyKey('insurance_type')" :local-data="insuranceTypeData"></en-select>
|
|
|
+ <en-input label="年交费额" type="number" v-model="item.year_money"
|
|
|
+ v-if="verifyKey('year_money')" placeholder="请输入年交费额" rightText="元"></en-input>
|
|
|
+ <en-radio label="满足缴费情况" v-model="item.is_fees"
|
|
|
+ v-if="verifyKey('is_fees')" :radio-data="payData"></en-radio>
|
|
|
+ <en-date label="保单有效期" v-model="item.validity_date"
|
|
|
+ v-if="verifyKey('validity_date')" item="选择保单有效期"></en-date>
|
|
|
+ <en-upload label="上传保单相关图片" v-model="insuranceItem.insurance_img"
|
|
|
+ v-if="verifyKey('insurance_img')" :imageWidth="180"></en-upload>
|
|
|
+ <en-input label="备注" v-model="item.remark"
|
|
|
+ v-if="verifyKey('remark')" type="text" placeholder="请输入备注信息" :noBox="true"></en-input>
|
|
|
</view>
|
|
|
- <en-blank message="暂无房产信息,快来添加吧!" v-if="houseList.length<=0"></en-blank>
|
|
|
+ <en-blank message="暂无保单信息,快来添加吧!" v-if="insuranceList.length<=0"></en-blank>
|
|
|
<button class="size-26 r-10 button-color house-button m-t30" hover-class="is-hover"
|
|
|
- @click="addHouse">+添加房产</button>
|
|
|
+ @click="addItem">+添加保单</button>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -54,28 +57,24 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- payData:[{'id':1,'name':'已支付'},{'id':2,'name':'未支付'}],
|
|
|
- houseTypeData:[],
|
|
|
- houseItem:{
|
|
|
- 'property_owner':'',
|
|
|
- 'deed_num':'',
|
|
|
- 'house_city':'',
|
|
|
- 'house_address':'',
|
|
|
- 'house_use':'',
|
|
|
- 'build_date':'',
|
|
|
- 'is_pay':'',
|
|
|
- 'covered_area':'',
|
|
|
- 'certificate_img':[],
|
|
|
- 'property':[],
|
|
|
+ payData:[{'id':1,'name':'满足'},{'id':0,'name':'未足'}],
|
|
|
+ insuranceTypeData:[],
|
|
|
+ insuranceItem: {
|
|
|
+ 'insurance_name':'',
|
|
|
+ 'insurance_type':'',
|
|
|
+ 'year_money':'',
|
|
|
+ 'is_fees':'1',
|
|
|
+ 'validity_date':'',
|
|
|
+ 'insurance_img':[],
|
|
|
'remark':'',
|
|
|
},
|
|
|
- houseList:[]
|
|
|
+ insuranceList:[]
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
- 'houseList': {
|
|
|
+ 'insuranceList': {
|
|
|
handler() {
|
|
|
- this.$emit("input", this.houseList);
|
|
|
+ this.$emit("input", this.insuranceList);
|
|
|
},
|
|
|
deep: true
|
|
|
},
|
|
|
@@ -93,19 +92,19 @@ export default {
|
|
|
this.setValue()
|
|
|
},
|
|
|
methods: {
|
|
|
- addHouse(){
|
|
|
- this.houseList.push(this.houseItem)
|
|
|
+ addItem(){
|
|
|
+ this.insuranceList.push(this.insuranceItem)
|
|
|
},
|
|
|
setSendMd5() {
|
|
|
let str = JSON.stringify(this.value)
|
|
|
- this.sendMd5=md5(JSON.stringify(this.houseList))
|
|
|
+ this.sendMd5=md5(JSON.stringify(this.insuranceList))
|
|
|
return md5(str)
|
|
|
},
|
|
|
setValue(){
|
|
|
if (this.value) {
|
|
|
let sendMd5 = this.setSendMd5()
|
|
|
if (sendMd5 !== this.sendMd5) {
|
|
|
- this.houseList=this.value
|
|
|
+ this.insuranceList=this.value
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -113,17 +112,17 @@ export default {
|
|
|
return this.showKeys.indexOf(field) >= 0
|
|
|
},
|
|
|
async getTaskOptions() {
|
|
|
- const res = await getTaskOptions({'type':3})
|
|
|
+ const res = await getTaskOptions({'type': 4})
|
|
|
if (res.code === 1) {
|
|
|
- res.data.houseTypeArr.forEach((val)=>{
|
|
|
- this.houseTypeData.push({'text':val.name,'value':val.value})
|
|
|
+ res.data.insuranceType.forEach((val) => {
|
|
|
+ this.insuranceTypeData.push({'text': val.name, 'value': val.value})
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
delItem(){
|
|
|
uni.showModal({
|
|
|
title: '警告',
|
|
|
- content: '是否删除当前资产信息!',
|
|
|
+ content: '是否删除当前保单信息!',
|
|
|
success: (res) => {
|
|
|
if (res.confirm) {
|
|
|
this.$emit('delItem',this.itemKey)
|