Commit fb163f74 authored by huangjie's avatar huangjie

*

parent f55ed098
......@@ -206,6 +206,7 @@
class="popups"
:visible.sync="dialogVisible"
width="534px"
:close-on-click-modal="false"
@close="resetForm('ruleForm')"
>
<div class="poptitle">
......@@ -215,8 +216,8 @@
<el-form class="popform j" :model="queryParam" :rules="rules" ref="ruleForm" label-width="130px">
<el-form-item label="企业名称:" class="row" prop="companyName">
<el-input type="text" placeholder="请输入" v-model="queryParam.companyName" @input="getCompany"></el-input>
<div class="resultlist" v-if="showlist" id="box">
<div v-for="(item,index) in companData" @click="selCompany(item)"><span v-html="item.name"></span></div>
<div class="resultlist infinite-list" v-if="showlist" id="box" v-infinite-scroll="load" style="overflow:auto">
<div class="infinite-list-item" v-for="(item,index) in companData" @click="selCompany(item)"><span v-html="item.name" :key="companypage"></span></div>
</div>
</el-form-item>
<el-form-item label="客户等级:" class="row">
......@@ -310,6 +311,8 @@
showlist:false,
keys:1,
isSkeleton:true,
companypage:1,
isscroll:false,
}
},
created() {
......@@ -428,22 +431,47 @@
//获取建设库客户
getCompany(value){
this.queryParam.companyId = null
if (value.length>=2){
if(value){
this.companData = []
}
if (this.queryParam.companyName.length>=2){
let param = {
keyword:value,
keyword:this.queryParam.companyName,
page:{
limit:20,
page:1
page:this.companypage
}
}
getEnterprise(JSON.stringify(param)).then(result=>{
if(result.code != 200)
return
this.showlist = true
if(result.code != 200){
return false
}
if(result.data.list != null && result.data.list.length>0){
this.isscroll = true
if (this.companData.length===0) {
this.companData = result.data.list
} else {
let arr2 = result.data.list
arr2.unshift(2, 0);
Array.prototype.splice.apply(this.companData, arr2);
}
if(this.companData.length===0) {
this.showlist = false
}else{
this.showlist = true
}
this.companypage += 1
}else{
this.isscroll = false
}
})
}
},
load(){
if(this.isscroll){
this.getCompany()
}
},
selCompany(item){
this.queryParam.companyId = item.jskEid
this.queryParam.companyName = item.name.replace(/<[^>]+>/g, '')
......
......@@ -3,6 +3,7 @@
class="popups"
width="534px"
:visible.sync="isshow"
:close-on-click-modal="false"
@close="resetForm('ruleForm')"
>
<div @click = 'handleALL'>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment