Merge branch 'dev_claim' into dev

This commit is contained in:
wangmingzhe
2019-12-19 11:28:55 +08:00
5 changed files with 33 additions and 12 deletions

View File

@@ -12,6 +12,7 @@
show-action
@search="onSearch"
@cancel="onCancel"
@input="valChange"
>
<div slot="action" v-if="isSearch" @search="onSearch" @click="onSearch">搜索</div>
<div slot="action" v-else @click="onCancel">取消</div>
@@ -88,6 +89,12 @@ export default {
next()
},
methods: {
// 输入内容变化时
valChange(value) {
if(value == ''){
this.isSearch = true
}
},
// 搜索
onSearch() {
let data = {

View File

@@ -59,13 +59,13 @@
v-model="userInfo.accidentAddress"
rows="1"
autosize
required
v-validate="'required'"
center
label="详细地址"
label
name="详细地址"
type="textarea"
clearable
placeholder="请输入详细地"
placeholder="请输入详细地"
maxlength="30"
/>
<van-field
@@ -258,7 +258,7 @@ export default {
otherCompany: '', //新增其他公司保险名称(非必填)
accidentAddress: '', //出险地点
accAddressInfo:'',//出险地点的字符串拼接
accAddressInfo: '', //出险地点的字符串拼接
caseDesc: '', //事故经过
mandatorName: '', //受托人姓名
@@ -379,8 +379,8 @@ export default {
//区域选择
sureArea(area, type) {
this.areaName = getAreaName(area)
//这个后端需要,后面可能删掉
//这个后端需要,后面可能删掉
this.accAddressInfo = area[0].name + area[1].name + area[2].name
;[this.userInfo.accProvince, this.userInfo.accCity, this.userInfo.accCounty] = [area[0].code, area[1].code, area[2].code]
this.areaShow = false
@@ -388,10 +388,14 @@ export default {
nextStep() {
console.log(this.userInfo)
if (localStorage.insuranceId) {
this.userInfo.id = localStorage.getItem('insuranceId')
if (!this.userInfo.applyType) {
this.$toast('申请类型不能为空')
return
}
this.$validator.validate().then(valid => {
if (localStorage.insuranceId) {
this.userInfo.id = localStorage.getItem('insuranceId')
}
if (true === valid) {
switch (this.cause) {
case '0':

View File

@@ -138,9 +138,9 @@
v-model="userInfo.insuredAddr"
rows="1"
autosize
required
v-validate="'required'"
center
label="详细地址"
label=""
name="详细地址"
type="textarea"
clearable

View File

@@ -161,7 +161,7 @@
placeholder="请选择地点"
@click="areaShow = true"
/>
<van-field v-model="accAddress" required center label="详细地" clearable placeholder="请输入详细地" />
<van-field v-model="accAddress" v-validate="'required'" center label="" name="详细地" clearable placeholder="请输入详细地" />
<van-field
v-model="caseDesc"
@@ -515,6 +515,10 @@ export default {
},
//点击提交
nextStep() {
if (!this.userInfo.applyType) {
this.$toast('申请类型不能为空')
return
}
this.$validator.validate().then(valid => {
if (true === valid) {
if (this.certiType == '0') {

View File

@@ -5,7 +5,7 @@
<van-dropdown-item v-model="selected" :options="options" />
</van-dropdown-menu>
<van-search class="search-box flex1" v-model="searchVal" show-action @search="onSearch" @cancel="onCancel">
<van-search class="search-box flex1" v-model="searchVal" show-action @search="onSearch" @cancel="onCancel" @input="valChange">
<div slot="action" v-if="isSearch" @search="onSearch" @click="onSearch" v-no-more-click="1000">搜索</div>
<div slot="action" v-else @click="onCancel">取消</div>
</van-search>
@@ -62,6 +62,12 @@ export default {
next()
},
methods: {
// 输入内容改变时
valChange(value) {
if(value == '') {
this.isSearch = true
}
},
// 搜索
onSearch() {
this.$toast.loading({