重置方法;负责人、联系人组件select查询

This commit is contained in:
zhaoxiao
2021-08-30 09:54:21 +08:00
parent 41bb5e4aa7
commit 67b6b27261
10 changed files with 45 additions and 10 deletions
+1 -1
View File
@@ -19,7 +19,7 @@
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
<a-button icon="reload">重置</a-button>
<a-button icon="reload" @click="searchReset">重置</a-button>
</span>
</a-col>
</a-row>
+10 -2
View File
@@ -6,7 +6,9 @@
<a-select :value="value"
v-bind="$attrs"
v-on="$listeners"
show-search>
show-search
option-filter-prop="children"
:filter-option="filterOption">
<a-select-option v-for="item in contactsList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
</a-select>
</a-col>
@@ -67,7 +69,7 @@ export default {
getContactsList() {
if (this.selectedCompany) {
const params = {
companyName: this.selectedCompany.companyName
companyId: this.selectedCompany.id
}
getContactsByCompany(params).then(res => {
this.contactsList = res.result
@@ -85,6 +87,12 @@ export default {
return
}
this.$message.warn('请先选择来款企业再为该企业新建联系人')
},
// 下拉框的搜索
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
}
},
model: {
+12 -1
View File
@@ -1,5 +1,10 @@
<template>
<a-select :value="value" v-bind="$attrs" v-on="$listeners">
<a-select :value="value"
v-bind="$attrs"
v-on="$listeners"
show-search
option-filter-prop="children"
:filter-option="filterOption">
<a-select-option v-for="item in userList" :key="item.id" :value="item.id">{{ `${item.username}(${item.orgCodeTxt})` }}</a-select-option>
</a-select>
</template>
@@ -34,6 +39,12 @@ export default {
this.userList = res.result
})
},
// 下拉框的搜索
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
}
},
model: {
prop: 'value',
@@ -12,7 +12,7 @@
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
<a-button icon="reload">重置</a-button>
<a-button icon="reload" @click="searchReset">重置</a-button>
</span>
</a-col>
</a-row>
@@ -22,7 +22,7 @@
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
<a-button icon="reload">重置</a-button>
<a-button icon="reload" @click="searchReset">重置</a-button>
</span>
</a-col>
</a-row>
@@ -0,0 +1,13 @@
<template>
</template>
<script>
export default {
name: 'CommitteeMaintenance'
}
</script>
<style scoped>
</style>
@@ -54,7 +54,7 @@
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
<a-button icon="reload">重置</a-button>
<a-button icon="reload" @click="searchReset">重置</a-button>
</span>
</a-col>
</a-row>
@@ -42,7 +42,7 @@
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
<a-button icon="reload">重置</a-button>
<a-button icon="reload" @click="searchReset">重置</a-button>
</span>
</a-col>
</a-row>
@@ -43,7 +43,7 @@
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
<a-button icon="reload">重置</a-button>
<a-button icon="reload" @click="searchReset">重置</a-button>
</span>
</a-col>
</a-row>
@@ -22,7 +22,7 @@
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
<a-button icon="reload">重置</a-button>
<a-button icon="reload" @click="searchReset">重置</a-button>
</span>
</a-col>
</a-row>
@@ -39,6 +39,9 @@
<!-- table表格区域-->
<div>
<div class="">
</div>
<a-table
ref="table"
size="middle"