|
|
@@ -4,7 +4,17 @@
|
|
|
placement="right"
|
|
|
width="900"
|
|
|
v-model="businessShow"
|
|
|
- trigger="click">
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ style="width:300px;margin-bottom: 10px"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="keyWord"
|
|
|
+ clearable
|
|
|
+ @clear="businessSearch"
|
|
|
+ size="mini"
|
|
|
+ @keyup.enter.native="businessSearch">
|
|
|
+ <i slot="prefix" class="el-icon-search" @click="businessSearch"></i>
|
|
|
+ </el-input>
|
|
|
<el-table :data="businessData" @row-click="businessSelect" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
|
|
|
<el-table-column width="260" label="客户名称">
|
|
|
<template slot-scope="scope">
|
|
|
@@ -22,7 +32,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-button size="small" type="primary" style="width: 100%" @click="businessSearch" slot="reference">工商查询</el-button>
|
|
|
+ <el-button size="small" type="primary" style="width: 100%" @click="businessSearch" slot="reference" :disabled="keyWord === ''">工商查询</el-button>
|
|
|
</el-popover>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -49,10 +59,12 @@ export default {
|
|
|
/*工商查询*/
|
|
|
async businessSearch(){
|
|
|
console.log(this.keyWord,"关键词")
|
|
|
+ /* this.businessShow = false*/
|
|
|
this.businessParam.content.keyword = this.keyWord
|
|
|
const res = await this.$api.requested(this.businessParam)
|
|
|
console.log(res,"工商查询结果")
|
|
|
this.businessData = res.data
|
|
|
+ this.businessShow = true
|
|
|
},
|
|
|
/*选择工商信息*/
|
|
|
businessSelect(val){
|
|
|
@@ -65,11 +77,13 @@ export default {
|
|
|
}).then(() => {
|
|
|
|
|
|
this.$emit("businessData",val)
|
|
|
+ this.businessData = []
|
|
|
/*this.form.enterprisename = val.companyName
|
|
|
this.form.address = val.address
|
|
|
this.form.taxno = val.taxNum*/
|
|
|
|
|
|
}).catch(() => {
|
|
|
+ this.businessData = []
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
message: '已取消更新客户信息'
|