|
|
@@ -1,43 +1,131 @@
|
|
|
<template>
|
|
|
<view class="">
|
|
|
- <WhInput :name="'产权人'"></WhInput>
|
|
|
- <WhInput :name="'房产证号'"></WhInput>
|
|
|
- <WhInput :name="'房产城市'" disabled is_select></WhInput>
|
|
|
- <WhInput :name="'房产地址'" disabled is_select></WhInput>
|
|
|
- <WhInput :name="'房屋用途'" disabled is_select></WhInput>
|
|
|
- <WhInput :name="'建成年份'" disabled is_select></WhInput>
|
|
|
- <WhInput :name="'材料费'"></WhInput>
|
|
|
- <WhInput :name="'建筑面积'"></WhInput>
|
|
|
- <view class=" p-tb30 bor-bottom-1">
|
|
|
- <view class="wh-text size-28">房产证件<text></text> </view>
|
|
|
- <view class="row-c flex m-t20 m-b10" style="flex-wrap: wrap;">
|
|
|
- <image class="wh-110 m-r16" src="https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/logo.png" mode="aspectFill" v-for="(item,index) in 2"
|
|
|
- :key="index">
|
|
|
- </image>
|
|
|
- <image class="wh-110" src="https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/logo.png" mode="aspectFill"></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <WhInput :name="'备注'" :is_border="false"></WhInput>
|
|
|
+ <view class="data-from">
|
|
|
+ <en-input label="产权人" type="text" placeholder="请输入产权人" v-model="houseItem.property_owner" v-if="verifyKey('property_owner')"></en-input>
|
|
|
+ <en-input label="房产证号" v-model="houseItem.deed_num" v-if="verifyKey('deed_num')" type="text" placeholder="请输入房产证号"></en-input>
|
|
|
+ <en-city label="房产城市" v-model="houseItem.house_city" v-if="verifyKey('house_city')" placeholder="请选择省、市、区"></en-city>
|
|
|
+ <en-input label="房产地址" v-model="houseItem.house_address" v-if="verifyKey('house_address')" type="text" placeholder="请输入房产详细地址"></en-input>
|
|
|
+ <en-select label="房屋用途" v-model="houseItem.house_use" v-if="verifyKey('house_use')" placeholder="请选择房屋用途" :local-data="houseTypeData" ></en-select>
|
|
|
+ <en-date label="建成年份" v-model="houseItem.build_date" v-if="verifyKey('build_date')" placeholder="选择房屋建成年份"></en-date>
|
|
|
+ <en-radio label="材料费" v-model="houseItem.is_pay" v-if="verifyKey('is_pay')" :radio-data="payData"></en-radio>
|
|
|
+ <en-input label="建筑面积" v-model="houseItem.covered_area" v-if="verifyKey('covered_area')" type="digit" placeholder="请输入建筑面积" rightText="㎡"></en-input>
|
|
|
+ <en-upload label="上传房产证件" v-model="houseItem.certificate_img" v-if="verifyKey('certificate_img')" :imageWidth="180"></en-upload>
|
|
|
+ <en-upload label="上传房产关联图片" v-model="houseItem.property" v-if="verifyKey('property')" :imageWidth="180"></en-upload>
|
|
|
+ <en-input label="备注" v-model="houseItem.remark" v-if="verifyKey('remark')" type="text" placeholder="请输入备注信息" :noBox="true"></en-input>
|
|
|
+ </view>
|
|
|
<button class="size-26 r-10 button-color house-button m-t30" hover-class="is-hover"
|
|
|
- @click="onAddHouse">+添加房产</button>
|
|
|
+ @click="addHouse">+添加房产</button>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import WhInput from "@/components/en-from/en-input/en-input.vue"
|
|
|
+ import enInput from "@/components/en-from/en-input/en-input.vue"
|
|
|
+ import EnCity from "@/components/en-from/en-city/en-city.vue";
|
|
|
+ import EnUpload from "@/components/en-from/en-upload/en-upload.vue";
|
|
|
+ import EnSelect from "@/components/en-from/en-select/en-select.vue";
|
|
|
+ import {getTaskOptions} from "@/api/task";
|
|
|
+ import md5 from "js-md5";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
- WhInput
|
|
|
+ EnSelect,
|
|
|
+ EnUpload,
|
|
|
+ EnCity,
|
|
|
+ enInput
|
|
|
},
|
|
|
- props: {
|
|
|
+ props: {
|
|
|
+ 'showKeys': {
|
|
|
+ default: []
|
|
|
+ },
|
|
|
+ 'value': {
|
|
|
+ default: {
|
|
|
|
|
|
- },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ 'itemKey': {
|
|
|
+ default: 0
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
- return {}
|
|
|
+ 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':[],
|
|
|
+ 'remark':'',
|
|
|
+ },
|
|
|
+ houseList:[]
|
|
|
+ }
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ 'houseList': {
|
|
|
+ handler() {
|
|
|
+ this.$emit("input", this.houseList);
|
|
|
+ },
|
|
|
+ deep: true
|
|
|
+ },
|
|
|
+ 'value': {
|
|
|
+ handler() {
|
|
|
+ console.log('houseItem:', this.value)
|
|
|
+ if (this.value) {
|
|
|
+ this.setValue()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep: true
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getTaskOptions()
|
|
|
+ this.setValue()
|
|
|
+ },
|
|
|
methods: {
|
|
|
- onAddHouse() {}
|
|
|
+ addHouse(){
|
|
|
+ this.houseList.push(this.houseItem)
|
|
|
+ },
|
|
|
+ setSendMd5() {
|
|
|
+ let str = JSON.stringify(this.value)
|
|
|
+ this.sendMd5=md5(JSON.stringify(this.houseList))
|
|
|
+ return md5(str)
|
|
|
+ },
|
|
|
+ setValue(){
|
|
|
+ if (this.value) {
|
|
|
+ let sendMd5 = this.setSendMd5()
|
|
|
+ if (sendMd5 !== this.sendMd5) {
|
|
|
+ this.houseList=this.value
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ verifyKey(field) {
|
|
|
+ return this.showKeys.indexOf(field) >= 0
|
|
|
+ },
|
|
|
+ async getTaskOptions() {
|
|
|
+ const res = await getTaskOptions({'type':3})
|
|
|
+ if (res.code === 1) {
|
|
|
+ res.data.houseTypeArr.forEach((val)=>{
|
|
|
+ this.houseTypeData.push({'text':val.name,'value':val.value})
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ delItem(){
|
|
|
+ uni.showModal({
|
|
|
+ title: '警告',
|
|
|
+ content: '是否删除当前资产信息!',
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ this.$emit('delItem',this.itemKey)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|