feat: 桌面端工作计划/商机/要客列表新增搜索框

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-13 01:06:56 +08:00
parent 04f701b27c
commit f89638b3f0
3 changed files with 25 additions and 3 deletions
+8 -1
View File
@@ -30,6 +30,8 @@ const keyStatuses = ['未开始', '进行中', '已完成']
// ── Filters ──
const filterManager = ref('')
const filterStatus = ref('')
const searchText = ref('')
function onSearch() { loadItems() }
const managerOptions = computed(() => {
const seen = new Set<string>()
@@ -128,7 +130,9 @@ async function handleQuickCreate() {
async function loadItems() {
loading.value = true
try {
const res = await api.get('/key-visits/')
const params: any = {}
if (searchText.value) params.search = searchText.value
const res = await api.get('/key-visits/', { params })
keyVisits.value = res.data
} catch (e: any) { ElMessage.error('加载失败') }
finally { loading.value = false }
@@ -227,6 +231,9 @@ async function quickStatusChange(row: any, newStatus: string) {
<!-- Filter Bar -->
<div class="filter-bar">
<div class="filter-row">
<div class="filter-item">
<el-input v-model="searchText" placeholder="搜索..." clearable size="small" style="width:180px" @keyup.enter="onSearch" @clear="onSearch" />
</div>
<div class="filter-item">
<label class="filter-label">客户经理</label>
<el-select v-model="filterManager" clearable placeholder="全部" size="small" style="width:150px">
+8 -1
View File
@@ -40,6 +40,8 @@ const logSaving = ref(false)
// ── Filters ──
const filterManager = ref('')
const filterStatus = ref('跟进中')
const searchText = ref('')
function onSearch() { loadItems() }
const managerOptions = computed(() => {
const seen = new Set<string>()
@@ -120,7 +122,9 @@ async function handleQuickCreate() {
async function loadItems() {
loading.value = true
try {
const res = await api.get('/mini-business/')
const params: any = {}
if (searchText.value) params.search = searchText.value
const res = await api.get('/mini-business/', { params })
miniBusiness.value = res.data
} catch (e: any) { ElMessage.error('加载失败') }
finally { loading.value = false }
@@ -254,6 +258,9 @@ async function quickStatusChange(row: any, newStatus: string) {
<!-- Filter Bar -->
<div class="filter-bar">
<div class="filter-row">
<div class="filter-item">
<el-input v-model="searchText" placeholder="搜索..." clearable size="small" style="width:180px" @keyup.enter="onSearch" @clear="onSearch" />
</div>
<div class="filter-item">
<label class="filter-label">客户经理</label>
<el-select v-model="filterManager" clearable placeholder="全部" size="small" style="width:150px">
+9 -1
View File
@@ -27,6 +27,9 @@ const planStatuses = ['计划中', '已完成', '已取消']
// ── Filters ──
const filterManager = ref('')
const filterStatus = ref('')
const searchText = ref('')
function onSearch() { loadPlans() }
const isLight = computed(() => themeStore.currentTheme === 'light')
@@ -107,7 +110,9 @@ async function handleQuickCreate() {
async function loadPlans() {
loading.value = true
try {
const res = await api.get('/work-plans/')
const params: any = {}
if (searchText.value) params.search = searchText.value
const res = await api.get('/work-plans/', { params })
workPlans.value = res.data
} catch (e: any) { ElMessage.error('加载失败') }
finally { loading.value = false }
@@ -200,6 +205,9 @@ async function quickStatusChange(row: any, newStatus: string) {
<!-- Filter Bar -->
<div class="filter-bar">
<div class="filter-row">
<div class="filter-item">
<el-input v-model="searchText" placeholder="搜索..." clearable size="small" style="width:180px" @keyup.enter="onSearch" @clear="onSearch" />
</div>
<div class="filter-item">
<label class="filter-label">客户经理</label>
<el-select v-model="filterManager" clearable placeholder="全部" size="small" style="width:150px">