|
@@ -131,11 +131,14 @@
|
|
|
</van-search>
|
|
|
<view class="search-result">
|
|
|
<view class="result-custome-box" v-if="searchContractList.length===0">
|
|
|
+ <van-empty description="暂无数据" :image="require('@/static/empty.png')" v-if="!searchCustomeStatus"/>
|
|
|
+ <view v-else>
|
|
|
<view class="result-item flex" v-for="item in searchCustomeList" :key="item" @click="getContract(item)">
|
|
|
<image src="../static/search-icon.png" mode="aspectFill" class="search-icon"></image>
|
|
|
<view class="con van-ellipsis">{{item}}</view>
|
|
|
<image src="../static/click-icon.png" mode="aspectFill" class="click-icon"></image>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="result-contract-box" v-else>
|
|
|
<view class="result-contract-item" v-for="item in searchContractList" :key="item.ContractId" @click="handleChooseContract(item)">
|
|
@@ -161,6 +164,14 @@
|
|
|
components:{
|
|
|
steps
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ showCustome(){
|
|
|
+ this.searchCustomeVal=''
|
|
|
+ this.searchCustomeStatus=true
|
|
|
+ this.searchCustomeList=[]
|
|
|
+ this.searchContractList=[]
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
SealId:0,
|
|
@@ -200,6 +211,7 @@
|
|
|
radioVal:'系统合同',
|
|
|
|
|
|
searchCustomeVal:'',//搜索客户输入数据
|
|
|
+ searchCustomeStatus:true,//搜索客户 是否有结果
|
|
|
searchCustomeList:[],//搜索到的客户名称列表
|
|
|
searchContractList:[],//选择搜索中的客户后合同列表数据
|
|
|
}
|
|
@@ -317,6 +329,11 @@
|
|
|
const res=await apiSearchCustome({Keyword:this.searchCustomeVal})
|
|
|
if(res.code===200){
|
|
|
this.searchCustomeList=res.data
|
|
|
+ if(res.data.length===0){
|
|
|
+ this.searchCustomeStatus=false
|
|
|
+ }else{
|
|
|
+ this.searchCustomeStatus=true
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -343,7 +360,8 @@
|
|
|
this.ServiceType=e.ContractType
|
|
|
this.UseCompanyName=e.CompanyName
|
|
|
this.ContractId=e.ContractId
|
|
|
- this.ContractfileUrl=e.FileUrl
|
|
|
+ // this.ContractfileUrl=e.FileUrl
|
|
|
+ this.handleFile(e.FileUrl)
|
|
|
// 关闭搜索弹窗
|
|
|
this.showCustome=false
|
|
|
this.searchCustomeVal=''
|