mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 05:46:44 +08:00
【fix】 理赔添加回显(前三个)
This commit is contained in:
@@ -46,6 +46,14 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="mt10">
|
||||
<p class="fw600">理赔</p>
|
||||
<ul class="pl20">
|
||||
<li>
|
||||
<router-link to="/claims/insuredInfo">入口</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<van-tabbar v-model="active">
|
||||
<van-tabbar-item icon="home-o">首页</van-tabbar-item>
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
size="small"
|
||||
type="info"
|
||||
class="ph10 van-button--danger wh"
|
||||
@click="toActive(item.value, $event)"
|
||||
:class="{active: applyType[item.value]}"
|
||||
@click="toActive(item.value)"
|
||||
>{{ item.label }}</van-button>
|
||||
</van-col>
|
||||
</van-row>
|
||||
@@ -150,6 +151,11 @@
|
||||
<van-popup v-model="popupShow" position="bottom">
|
||||
<van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="popupShow = false" />
|
||||
</van-popup>
|
||||
<!-- 医院 -->
|
||||
<van-popup v-model="popupShowHos" position="bottom">
|
||||
<van-search v-model="searchHos" placeholder="请输入医院" />
|
||||
<van-picker show-toolbar :columns="columnsHosCols" @confirm="onConfirm" @cancel="popupShowHos = false" />
|
||||
</van-popup>
|
||||
|
||||
<div class="bottom-btn bg-white">
|
||||
<van-button type="danger" size="large" @click="nextStep" v-no-more-click="1000">下一步</van-button>
|
||||
@@ -158,7 +164,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Field, CellGroup, Checkbox, Popup, Picker, Area, RadioGroup, Radio, Row, Col } from 'vant'
|
||||
import { Field, CellGroup, Checkbox, Popup, Picker, Area, RadioGroup, Radio, Row, Col, Search } from 'vant'
|
||||
import SelectRadio from '@/components/ebiz/SelectRadio'
|
||||
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
|
||||
import beforeDate from '@/assets/js/utils/getBeforeDate.js'
|
||||
@@ -166,7 +172,7 @@ import areaList from '@/assets/js/utils/area'
|
||||
import Hospital from '@/assets/js/utils/hospital'
|
||||
import getAreaName from '@/assets/js/utils/get-area-name'
|
||||
import DataDictionary from '@/assets/js/utils/data-dictionary.js'
|
||||
import { apply } from '@/api/ebiz/claims/claims'
|
||||
import { apply, query } from '@/api/ebiz/claims/claims'
|
||||
import { getAgentInfo } from '@/api/ebiz/my/my'
|
||||
|
||||
export default {
|
||||
@@ -183,10 +189,19 @@ export default {
|
||||
[RadioGroup.name]: RadioGroup,
|
||||
[Radio.name]: Radio,
|
||||
[Row.name]: Row,
|
||||
[Col.name]: Col
|
||||
[Col.name]: Col,
|
||||
[Search.name]: Search
|
||||
},
|
||||
computed: {
|
||||
columnsHosCols: function () {
|
||||
return this.columnsHos.filter(item => {
|
||||
return item.text.search(this.searchHos) != -1
|
||||
})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchHos:'',
|
||||
sexRadio: [
|
||||
{
|
||||
label: '意外',
|
||||
@@ -238,10 +253,12 @@ export default {
|
||||
arr: [], //后台获取反显的申请类型编码
|
||||
currentDate: new Date(), //当前时间
|
||||
popupShow: false, //用于字段选择的显示隐藏
|
||||
popupShowHos: false, //用于字段选择的显示隐藏
|
||||
pickerType: '', //用于区分是哪个字段选择
|
||||
valueKey: '',
|
||||
columns: [], //用于字段选择绑定的数据
|
||||
applyType: [], //保存选择的申请类型数组
|
||||
columnsHos: [],
|
||||
applyType: {}, //保存选择的申请类型数组
|
||||
cause: '0', //通过该值判断出险原因
|
||||
from: this.$route.query.from, //页面跳转来源
|
||||
slaveStatus: 'claimApplyRisk', //进行到的状态
|
||||
@@ -280,12 +297,39 @@ export default {
|
||||
//获取业务号码
|
||||
this.userInfo.businessNo = localStorage.businessNo
|
||||
console.log(this.userInfo.businessNo)
|
||||
this.init()
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
if(to.fullPath == '/claims/insuredInfo'){
|
||||
localStorage.claimsClear = true
|
||||
}
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
let data = {
|
||||
slaveStatus: this.slaveStatus,
|
||||
businessNo: this.userInfo.businessNo
|
||||
}
|
||||
query(data).then(res => {
|
||||
if (res.result == 0) {
|
||||
console.log(res)
|
||||
this.userInfo = res.content.claimApplyRiskReqDTO
|
||||
this.userInfo.province = this.userInfo.accProvince
|
||||
this.userInfo.city = this.userInfo.accCity
|
||||
this.userInfo.area = this.userInfo.accCounty
|
||||
this.areaName = getAreaName([{ code: this.userInfo.province }, { code: this.userInfo.city }, { code: this.userInfo.area }])
|
||||
let tmpApplyType = this.userInfo.applyType.split(',')
|
||||
tmpApplyType.forEach(item => {
|
||||
this.applyType[item] = true
|
||||
})
|
||||
// this.applyType = {}//this.userInfo.applyType.split(',')
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取委托人信息
|
||||
getAgentInfo() {
|
||||
let data = {}
|
||||
@@ -309,12 +353,15 @@ export default {
|
||||
},
|
||||
// 弹框选择
|
||||
toSelect(pickerType, valueKey) {
|
||||
;[this.popupShow, this.pickerType] = [true, pickerType]
|
||||
this.pickerType = pickerType
|
||||
// ;[this.popupShow, this.pickerType] = [true, pickerType]
|
||||
if (valueKey) this.valueKey = valueKey
|
||||
if (pickerType == '1') {
|
||||
//绑定治疗医院数据字典
|
||||
this.columns = Hospital.hospitalList
|
||||
this.popupShowHos = true
|
||||
this.columnsHos = Hospital.hospitalList
|
||||
} else if (pickerType == '2') {
|
||||
this.popupShow = true
|
||||
//绑定是否购买过其他公司保险的数据字典
|
||||
this.columns = DataDictionary.cureList
|
||||
}
|
||||
@@ -323,6 +370,7 @@ export default {
|
||||
onConfirm(value) {
|
||||
//隐藏字段选择组件
|
||||
this.popupShow = false
|
||||
this.popupShowHos = false
|
||||
if (this.pickerType == '1') {
|
||||
//保存接口传参治疗医院的码值
|
||||
this.userInfo.hospitalCode = value.id
|
||||
@@ -333,17 +381,17 @@ export default {
|
||||
},
|
||||
|
||||
//点击申请类型(多选)
|
||||
toActive(value, e) {
|
||||
toActive(value) {
|
||||
console.log(value);
|
||||
//判断当前点击的申请类型有无active的class类名
|
||||
if (e.target.classList.contains('active')) {
|
||||
e.target.classList.remove('active')
|
||||
this.applyType.pop(value)
|
||||
} else {
|
||||
e.target.classList.add('active')
|
||||
this.applyType.push(value)
|
||||
if(this.applyType[value]){
|
||||
delete this.applyType[value]
|
||||
}else{
|
||||
this.applyType[value] = true
|
||||
}
|
||||
this.$forceUpdate()
|
||||
//将接口传参的申请类型改为以逗号分隔的字符串
|
||||
this.userInfo.applyType = this.applyType.join(',')
|
||||
this.userInfo.applyType = Object.keys(this.applyType).join(',')
|
||||
},
|
||||
//区域选择
|
||||
sureArea(area, type) {
|
||||
|
||||
@@ -546,6 +546,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getBankList()
|
||||
this.init()
|
||||
//this.ReturnShow()
|
||||
},
|
||||
mounted() {
|
||||
@@ -560,6 +561,24 @@ export default {
|
||||
next()
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
let data = {
|
||||
slaveStatus: this.slaveStatus,
|
||||
businessNo: this.userInfo.businessNo
|
||||
}
|
||||
query(data).then(res => {
|
||||
if (res.result == 0) {
|
||||
console.log(res)
|
||||
this.userInfo = res.content.claimApplyInfoReqDTO
|
||||
// this.userInfo.province = this.userInfo.insuredProvince
|
||||
// this.userInfo.city = this.userInfo.insuredCity
|
||||
// this.userInfo.area = this.userInfo.insuredCounty
|
||||
// this.areaName = getAreaName([{ code: this.userInfo.province }, { code: this.userInfo.city }, { code: this.userInfo.area }])
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
//监听名字变化
|
||||
nameChange(name) {
|
||||
this.userInfo.applyerName = name
|
||||
|
||||
@@ -164,7 +164,7 @@ import Nationality from '@/assets/js/utils/nationality.js'
|
||||
import areaList from '@/assets/js/utils/area'
|
||||
import getAreaName from '@/assets/js/utils/get-area-name'
|
||||
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
||||
import { apply, customerInfo } from '@/api/ebiz/claims/claims'
|
||||
import { apply, customerInfo, query } from '@/api/ebiz/claims/claims'
|
||||
import { idToData } from '@/views/ebiz/customer/js/verification'
|
||||
import utilsAge from '@/assets/js/utils/age'
|
||||
import occupationList from '@/components/ebiz/occipation/data/occupation'
|
||||
@@ -241,9 +241,15 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.judge()
|
||||
if(localStorage.businessNo && localStorage.claimsClear){
|
||||
this.init()
|
||||
localStorage.claimsClear = ''
|
||||
}else{
|
||||
localStorage.setItem('businessNo', '')
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
localStorage.setItem('businessNo', '')
|
||||
// localStorage.setItem('businessNo', '')
|
||||
console.log('mounted ==', localStorage.businessNo)
|
||||
document.body.style.backgroundColor = '#fff'
|
||||
// 筛选按钮的点击事件
|
||||
@@ -257,6 +263,28 @@ export default {
|
||||
next()
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
if (localStorage.businessNo) {
|
||||
this.userInfo.businessNo = localStorage.businessNo
|
||||
}
|
||||
|
||||
let data = {
|
||||
slaveStatus: this.slaveStatus,
|
||||
businessNo: this.userInfo.businessNo
|
||||
}
|
||||
query(data).then(res => {
|
||||
if (res.result == 0) {
|
||||
console.log(res)
|
||||
this.userInfo = res.content.claimApplyInsuredReqDTO
|
||||
this.userInfo.province = this.userInfo.insuredProvince
|
||||
this.userInfo.city = this.userInfo.insuredCity
|
||||
this.userInfo.area = this.userInfo.insuredCounty
|
||||
this.areaName = getAreaName([{ code: this.userInfo.province }, { code: this.userInfo.city }, { code: this.userInfo.area }])
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
//判断是否由客户报案历史进入,客户信息反显
|
||||
judge() {
|
||||
if (this.from == 'ReportInfo') {
|
||||
|
||||
Reference in New Issue
Block a user