Commit fb163f74 authored by huangjie's avatar huangjie

*

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