|
|
@@ -1,33 +1,90 @@
|
|
|
<template>
|
|
|
<view class="">
|
|
|
- <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="insuranceList.length<=0"></en-blank>
|
|
|
- <button class="size-26 r-10 button-color house-button m-t30" hover-class="is-hover"
|
|
|
- @click="addItem">+添加保单</button>
|
|
|
- </view>
|
|
|
+ <view class="data-from" v-for="(item,index) in insuranceList">
|
|
|
+ <view class="p-t30" v-if="editIndex!==index">
|
|
|
+ <view class="sys-from-background-color p-20 r-20">
|
|
|
+ <view class="row-justify-sb center">
|
|
|
+ <text class="size-28 sys-weight-600">房产信息({{index+1}})</text>
|
|
|
+ <view class="row-c sys-background-fff r-100 p-lr40 p-tb10">
|
|
|
+ <image class="wh-30"
|
|
|
+ src="/page_task/static/img/information/edit.png"
|
|
|
+ mode="aspectFill" @click="onEditInfo(index)"></image>
|
|
|
+ <view class="title-line m-lr20"></view>
|
|
|
+ <image class="wh-30"
|
|
|
+ src="/page_task/static/img/information/delete.png"
|
|
|
+ mode="aspectFill" @click="onDeleteInfo(index)">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="row p-t30" v-if="verifyKey('insurance_name')">
|
|
|
+ <view class="text-color-666"><text></text>保险公司:</view>
|
|
|
+ <text class="flex">{{item.data.insurance_name}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="row p-t30" v-if="verifyKey('insurance_type')">
|
|
|
+ <view class="text-color-666"><text></text>保险类型:</view>
|
|
|
+ <text class="flex">{{getTypeText(item.data.insurance_type,1)}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="row p-t30" v-if="verifyKey('year_money')">
|
|
|
+ <view class="text-color-666"><text></text>年交费额:</view>
|
|
|
+ <text class="flex">{{item.data.year_money}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="row p-t30" v-if="verifyKey('is_fees')">
|
|
|
+ <view class="text-color-666"><text></text>满足缴费情况:</view>
|
|
|
+ <text class="flex">{{item.data.is_fees===1?'满足':'未满足'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="row p-t30" v-if="verifyKey('validity_date')">
|
|
|
+ <view class="text-color-666"><text></text>保单有效期:</view>
|
|
|
+ <text class="flex">{{item.data.validity_date}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="row p-t30" v-if="verifyKey('insurance_img')">
|
|
|
+ <view class="text-color-666"><text></text>保单相关图片:</view>
|
|
|
+ <EnImage :img="item.data.insurance_img"></EnImage>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="row p-t30">
|
|
|
+ <view class="text-color-666"><text></text>备注:</view>
|
|
|
+ <text class="flex">{{item.data.remark}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="p-t30" v-else>
|
|
|
+ <view class="row-justify-sb center p-b10">
|
|
|
+ <text class="size-28 sys-weight-600">房产信息({{index+1}})</text>
|
|
|
+ <view class="row-c sys-background-fff r-100">
|
|
|
+ <image class="wh-30"
|
|
|
+ src="/page_task/static/img/information/delete.png"
|
|
|
+ mode="aspectFill" @click="onDeleteInfo(index)">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <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>
|
|
|
+ </view>
|
|
|
+ <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="addItem">+添加保单</button>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- 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 {
|
|
|
+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";
|
|
|
@@ -37,10 +94,12 @@
|
|
|
import {
|
|
|
getSn
|
|
|
} from "@/api/common";
|
|
|
+ import EnImage from "@/components/en-utils/en-image/en-image.vue";
|
|
|
|
|
|
export default {
|
|
|
name: 'property-guarantee',
|
|
|
components: {
|
|
|
+ EnImage,
|
|
|
EnBlank,
|
|
|
EnDate,
|
|
|
EnSelect,
|
|
|
@@ -61,6 +120,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ editIndex: 0,
|
|
|
payData: [{
|
|
|
'id': 1,
|
|
|
'name': '满足'
|
|
|
@@ -102,6 +162,32 @@
|
|
|
this.setValue()
|
|
|
},
|
|
|
methods: {
|
|
|
+ getTypeText(val){
|
|
|
+ val=val*1
|
|
|
+ for (const typeKey in this.insuranceTypeData) {
|
|
|
+ if(val===this.insuranceTypeData[typeKey].value){
|
|
|
+ return this.insuranceTypeData[typeKey].text
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ onDeleteInfo(itemKey) {
|
|
|
+ uni.showModal({
|
|
|
+ title: '是否删除当前资产信息',
|
|
|
+ content: '确定删除?',
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ this.insuranceList.splice(itemKey, 1)
|
|
|
+ this.editIndex = itemKey-1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ onEditInfo(index){
|
|
|
+ this.editIndex = index
|
|
|
+ },
|
|
|
addItem() {
|
|
|
tools.showLoading()
|
|
|
getSn().then((res) => {
|
|
|
@@ -111,6 +197,7 @@
|
|
|
'property_sn': res.data,
|
|
|
'data': JSON.parse(JSON.stringify(this.insuranceItem))
|
|
|
})
|
|
|
+ this.editIndex=this.insuranceList.length-1
|
|
|
this.$emit('onResize')
|
|
|
} else {
|
|
|
tools.error('编号生成失败')
|