mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-11 23:46:44 +08:00
'工作单位合并'
This commit is contained in:
committed by
li.jieyu@ebiz-digits.com
parent
088661fd5f
commit
a3fd86cfd8
@@ -3,7 +3,7 @@
|
||||
<van-field :label="label" required>
|
||||
<template #input>
|
||||
<input
|
||||
style="width: 100%; border: none;"
|
||||
style="width: 100%; border: none"
|
||||
type="text"
|
||||
:placeholder="placeholder"
|
||||
:value="searchContent"
|
||||
@@ -16,9 +16,7 @@
|
||||
<div class="border_item" v-for="(item, index) in computedCustomerList" :value="item.label" :key="index" @click="chooseCustomer(item)">
|
||||
{{ item.label }}
|
||||
</div>
|
||||
<div class="border_item" v-show="computedCustomerList == 0">
|
||||
无结果
|
||||
</div>
|
||||
<div class="border_item" v-show="computedCustomerList == 0">无结果</div>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
@@ -41,6 +39,10 @@ export default {
|
||||
},
|
||||
value: {
|
||||
type: String
|
||||
},
|
||||
isAsync: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -55,7 +57,7 @@ export default {
|
||||
computed: {
|
||||
computedCustomerList() {
|
||||
let searchStr = this.value.trim()
|
||||
return this.customerList.filter(item => {
|
||||
return this.customerList.filter((item) => {
|
||||
return item.label.includes(searchStr)
|
||||
})
|
||||
},
|
||||
@@ -68,6 +70,7 @@ export default {
|
||||
const result = await getTreasureMenus(param)
|
||||
if (result.result === '0') {
|
||||
this.customerList = result.content
|
||||
this.$emit('workcompanys', result.content)
|
||||
} else {
|
||||
this.$toast(result.resultMessage)
|
||||
}
|
||||
@@ -81,16 +84,18 @@ export default {
|
||||
this.$emit('input', this.value)
|
||||
},
|
||||
onInputFocus() {
|
||||
this.showCustomer = true
|
||||
setTimeout(() => {
|
||||
this.$refs.picker.scrollIntoView()
|
||||
}, 300)
|
||||
this.$nextTick(() => {
|
||||
this.$refs.picker.scrollTo({
|
||||
top: 0,
|
||||
behavior: 'smooth'
|
||||
if (this.isAsync) {
|
||||
this.showCustomer = true
|
||||
setTimeout(() => {
|
||||
this.$refs.picker.scrollIntoView()
|
||||
}, 300)
|
||||
this.$nextTick(() => {
|
||||
this.$refs.picker.scrollTo({
|
||||
top: 0,
|
||||
behavior: 'smooth'
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
chooseCustomer(item) {
|
||||
this.$emit('input', item.label)
|
||||
|
||||
@@ -308,7 +308,16 @@
|
||||
clearable
|
||||
:readonly="isAppnt"
|
||||
/> -->
|
||||
<SearchField v-model="userInfo.workcompany" label="工作单位" placeholder="无工作单位,请输入无" v-validate="'required'" name="工作单位" />
|
||||
<select-radio v-if="userInfo.relationToAppnt != 1" required :radios="Asyncs" label="是否协同工作单位" name="是否协同工作单位" v-validate="'required'" :value.sync="isAsync"></select-radio>
|
||||
<SearchField
|
||||
v-model="userInfo.workcompany"
|
||||
@workcompanys="workcompanys"
|
||||
:isAsync="isAsync"
|
||||
label="工作单位"
|
||||
placeholder="无工作单位,请输入无"
|
||||
v-validate="'required'"
|
||||
name="工作单位"
|
||||
/>
|
||||
<!-- <van-field
|
||||
v-model="areaName"
|
||||
readonly
|
||||
@@ -484,6 +493,17 @@ export default {
|
||||
},
|
||||
isScan: false, //是否显示证件扫描组件
|
||||
effectiveDateTypeAble: false, //长期按钮是否禁用
|
||||
isAsync: false,
|
||||
Asyncs: [
|
||||
{
|
||||
label: '是',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
label: '否',
|
||||
value: false,
|
||||
},
|
||||
],
|
||||
sexRadio: [
|
||||
{
|
||||
label: '男',
|
||||
@@ -584,7 +604,8 @@ export default {
|
||||
isAppnt: false, // 是否投被同人
|
||||
// appntMarriage: '', //投保人婚姻状况
|
||||
idLimit: false, //证件起止日期是否只读
|
||||
salePageFlag: '2'
|
||||
salePageFlag: '2',
|
||||
userWorkcompanys:[],//单位数据
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -722,6 +743,11 @@ export default {
|
||||
// // document.body.style.backgroundColor = '#F5F5F5'
|
||||
},
|
||||
methods: {
|
||||
workcompanys(list) {
|
||||
// 单位数据
|
||||
console.log(list)
|
||||
this.userWorkcompanys = list
|
||||
},
|
||||
setCustomerMarriage(marriageCode) {
|
||||
for (let status of DataDictionary.marriage) {
|
||||
if (status.id == marriageCode) {
|
||||
@@ -1472,7 +1498,22 @@ export default {
|
||||
return this.$toast('亲,国籍为外籍,证件类型必须为护照或外国人永久居留身份证投保')
|
||||
}
|
||||
}
|
||||
|
||||
if (this.isAsync) {
|
||||
if (
|
||||
!this.userWorkcompanys.some((item) => {
|
||||
return item.label == this.userInfo.workcompany
|
||||
})
|
||||
) {
|
||||
if (
|
||||
this.userWorkcompanys.some((item) => {
|
||||
return item.label.search(this.userInfo.workcompany) != -1
|
||||
})
|
||||
) {
|
||||
return this.$toast('请填写完整的协同单位名称')
|
||||
}
|
||||
return this.$toast('您选择的为非协同单位,请重新选择。')
|
||||
}
|
||||
}
|
||||
this.infoUpdate()
|
||||
} else {
|
||||
return this.$toast(this.$validator.errors.all()[0])
|
||||
|
||||
Reference in New Issue
Block a user