CRM-客户:完善客户导入

(cherry picked from commit 26daa3a1ff)
This commit is contained in:
puhui999
2024-01-27 15:02:25 +08:00
committed by shizhong
parent 1cc6adc49b
commit 9f599fb790
3 changed files with 149 additions and 1 deletions

View File

@ -84,6 +84,10 @@
<Icon class="mr-5px" icon="ep:plus" />
新增
</el-button>
<el-button v-hasPermi="['crm:customer:import']" plain type="warning" @click="handleImport">
<Icon icon="ep:upload" />
导入
</el-button>
<el-button
v-hasPermi="['crm:customer:export']"
:loading="exportLoading"
@ -204,6 +208,7 @@
<!-- 表单弹窗添加/修改 -->
<CustomerForm ref="formRef" @success="getList" />
<CustomerImportForm ref="customerImportFormRef" @success="getList" />
</template>
<script lang="ts" setup>
@ -212,6 +217,7 @@ import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import * as CustomerApi from '@/api/crm/customer'
import CustomerForm from './CustomerForm.vue'
import CustomerImportForm from './CustomerImportForm.vue'
import { TabsPaneContext } from 'element-plus'
defineOptions({ name: 'CrmCustomer' })
@ -333,7 +339,10 @@ const handleDelete = async (id: number) => {
await getList()
} catch {}
}
const customerImportFormRef = ref<InstanceType<typeof CustomerImportForm>>()
const handleImport = () => {
customerImportFormRef.value?.open()
}
/** 导出按钮操作 */
const handleExport = async () => {
try {