Commit a58b35d4 by Sweet Zhang

发送邮件调整

parent ec3e26fd
......@@ -207,8 +207,9 @@
v-model:visible="showImportContacts"
title="导入数据"
accept=".csv,.txt,.xlsx"
@file-selected="handleImportContacts"
@error="handleImportError"
@confirm="handleImportContacts"
@close="showImportContacts = false"
/>
<!-- 联系人选择弹窗 -->
<ContactSelector
......@@ -526,6 +527,7 @@ const deleteImportRecord = (importBizId: string) => {
const handleImportContacts = (results) => {
console.log('导入数据:', results)
if (results.data) {
showImportContacts.value = false
emailForm.value.sessionId = results.data.data.sessionId || ''
importContactApi.getEmailContactImportDetail(emailForm.value.sessionId || '').then((res) => {
if (res.code === 200) {
......
......@@ -15,7 +15,7 @@
</button>
<!-- 下载模版 -->
<a
href="http://yd-ali-oss.oss-cn-shanghai-finance-1-pub.aliyuncs.com/xlsx/2025/10/09/2b0ec7e9ab4443fb8530131c001b9a3d.xlsx"
href="https://yd-ali-oss.oss-cn-shanghai-finance-1-pub.aliyuncs.com/xlsx/2025/10/09/2b0ec7e9ab4443fb8530131c001b9a3d.xlsx"
download="contact_template.xlsx"
class="flex items-center text-blue-700"
>
......
......@@ -146,12 +146,8 @@ const open = (msg: string, title: string) => {
}
const saveVariableTemplate = () => {
if (
!templateForm.value.groupName ||
!templateForm.value.variableBizIdList ||
templateForm.value.variableBizIdList.length === 0
) {
open('请输入模版名称和选择变量', '错误')
if (!templateForm.value.groupName) {
open('请输入模版名称', '错误')
return
}
......@@ -220,6 +216,7 @@ const fetchVariables = () => {
queryContent: searchQuery.value || '',
pageNum: 1,
pageSize: 1000,
isGeneral: 0,
})
.then((response) => {
variables.value = response.data.records || []
......
......@@ -13,6 +13,13 @@
/>
<div class="flex justify-end gap-3">
<button
v-if="confirmBtnFlag"
@click="handleConfirm"
class="text-white bg-blue-500 px-4 py-2 border border-gray-300 rounded-md"
>
确认
</button>
<button
@click="handleCancel"
class="px-4 py-2 border border-gray-300 rounded-md hover:bg-gray-50"
>
......@@ -55,6 +62,7 @@ const props = defineProps({
import FileUploadComponent from '@/components/FileUploadComponent.vue'
import { UploadResult, UploadConfig } from '@/utils/fileUpload'
const confirmBtnFlag = ref<boolean>(false)
const uploadConfig: UploadConfig = {
url: props.uploadUrl,
fieldName: 'file',
......@@ -65,18 +73,24 @@ const uploadConfig: UploadConfig = {
}
// 上传成功的文件
const uploadedFiles = ref<any[]>([])
const result = ref<any>({})
// 处理文档上传成功
const handleDocumentUploadSuccess = (results: UploadResult[]) => {
emit('success', results[0], props.triggerKey)
confirmBtnFlag.value = true
result.value = results[0]
emit('success', result.value)
}
// 处理文档上传失败
const handleDocumentUploadError = (error: string) => {
emit('error', error, props.triggerKey)
}
const emit = defineEmits(['success', 'error', 'cancel'])
const emit = defineEmits(['success', 'error', 'close', 'confirm'])
const handleCancel = () => {
emit('cancel', props.triggerKey)
emit('close', props.triggerKey)
}
const handleConfirm = () => {
emit('confirm', result.value, props.triggerKey)
}
// 监听visible变化,重置文件输入
......
......@@ -238,7 +238,7 @@ import Pagination from '@/components/Pagination.vue'
// 初始数据
const total = ref(0)
const currentPage = ref(1)
const pageSize = ref(10)
const pageSize = ref(100)
// 处理分页变化
const handlePageChange = (page: number, size: number) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment