Files
mp-10579/src/views/credit/creditMpCustomer/components/search.vue
赵忠林 56063e9bcd feat(credit): 更新客户信息编辑组件功能
- 替换城市输入框为省市区级联选择组件
- 新增步骤下拉选择框用于流程状态管理
- 集成文件选择组件替代原有文件路径输入框
- 实现文件上传和删除功能
- 添加文件列表管理和同步逻辑
- 优化搜索组件中关键词搜索框位置
- 完善查询参数过滤逻辑支持数组和单一值处理
2026-03-19 17:08:20 +08:00

121 lines
2.6 KiB
Vue

<!-- 搜索表单 -->
<template>
<a-space :size="10" style="flex-wrap: wrap">
<!-- <a-button type="primary" class="ele-btn-icon" @click="add">-->
<!-- <template #icon>-->
<!-- <PlusOutlined />-->
<!-- </template>-->
<!-- <span>添加</span>-->
<!-- </a-button>-->
<a-button class="ele-btn-icon" @click="exportData">
<template #icon>
<CloudDownloadOutlined />
</template>
<span>导出</span>
</a-button>
<a-button
danger
class="ele-btn-icon"
:disabled="!selection?.length"
@click="remove"
>
<template #icon>
<DeleteOutlined />
</template>
<span>批量删除</span>
</a-button>
<a-select
v-model:value="step"
allow-clear
placeholder="步骤"
style="width: 140px"
@change="handleSearch"
>
<a-select-option
v-for="item in stepOptions"
:key="item.value"
:value="item.value"
>
{{ item.text }}
</a-select-option>
</a-select>
<a-input-search
allow-clear
v-model:value="keywords"
placeholder="请输入关键词"
style="width: 220px"
@search="handleSearch"
@pressEnter="handleSearch"
/>
</a-space>
</template>
<script lang="ts" setup>
import { computed, ref, watch } from 'vue';
import {
PlusOutlined,
CloudDownloadOutlined,
DeleteOutlined
} from '@ant-design/icons-vue';
import type {
CreditMpCustomer,
CreditMpCustomerParam
} from '@/api/credit/creditMpCustomer/model';
const props = withDefaults(
defineProps<{
// 选中的角色
selection?: CreditMpCustomer[];
}>(),
{
selection: () => []
}
);
const emit = defineEmits<{
(e: 'search', where?: CreditMpCustomerParam): void;
(e: 'add'): void;
(e: 'remove'): void;
(e: 'batchMove'): void;
(e: 'exportData'): void;
}>();
const keywords = ref('');
const step = ref<number | undefined>(undefined);
const selection = computed(() => props.selection || []);
const stepOptions = [
{ value: 0, text: '未受理' },
{ value: 1, text: '已受理' },
{ value: 2, text: '材料提交' },
{ value: 3, text: '合同签订' },
{ value: 4, text: '执行回款' },
{ value: 5, text: '完结' }
];
// 新增
const add = () => {
emit('add');
};
// 搜索
const handleSearch = () => {
emit('search', { keywords: keywords.value || undefined, step: step.value });
};
// 导出
const exportData = () => {
emit('exportData');
};
// 批量删除
const remove = () => {
emit('remove');
};
watch(
() => props.selection,
() => {}
);
</script>