feat: 添加功能添加
This commit is contained in:
1 parent
41e00fcb90
commit
ce5bd6d3ba
3 files changed
+15
-1
No files matched your search
@@ -6,6 +6,7 @@ import { errorCodeType } from './errorCodeType'
|
|||||||
import { generateAcceptLanguageHeader } from '@/utils/language'
|
import { generateAcceptLanguageHeader } from '@/utils/language'
|
||||||
// 路由
|
// 路由
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
|
export const envUrl1 = import.meta.env.VITE_API_BASE_URL
|
||||||
|
|
||||||
const envUrl = import.meta.env.VITE_API_BASE_URL
|
const envUrl = import.meta.env.VITE_API_BASE_URL
|
||||||
console.log('API Base URL:', envUrl)
|
console.log('API Base URL:', envUrl)
|
||||||
|
|||||||
@@ -243,6 +243,10 @@ const handleDelete = (row: any) => {
|
|||||||
const handleUpdate = async (updatedData: any) => {
|
const handleUpdate = async (updatedData: any) => {
|
||||||
try {
|
try {
|
||||||
const { id, ...data } = updatedData
|
const { id, ...data } = updatedData
|
||||||
|
// 格式化日期为 ISO 8601 格式 (2026-02-05T10:00:00Z),去除毫秒
|
||||||
|
if (data.follow_up_date) {
|
||||||
|
data.follow_up_date = new Date(data.follow_up_date).toISOString().replace(/\.\d{3}/, '')
|
||||||
|
}
|
||||||
const res = await updateLead(id, data)
|
const res = await updateLead(id, data)
|
||||||
if (res.code === '000000') {
|
if (res.code === '000000') {
|
||||||
ElMessage.success(t('enterpriseLeads.messages.updateSuccess'))
|
ElMessage.success(t('enterpriseLeads.messages.updateSuccess'))
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
<div class="info-row">
|
<div class="info-row">
|
||||||
<span class="label">{{ t('invoices.detail.fileName') }}:</span>
|
<span class="label">{{ t('invoices.detail.fileName') }}:</span>
|
||||||
<span class="value">
|
<span class="value">
|
||||||
<el-link v-if="detailData.invoice_file_url" type="primary" :underline="false" :href="detailData.invoice_file_url" target="_blank">
|
<el-link @click="downloadFile(detailData.invoice_file_url!)" v-if="detailData.invoice_file_url" type="primary" >
|
||||||
{{ detailData.invoice_file_url.split('/').pop() }}
|
{{ detailData.invoice_file_url.split('/').pop() }}
|
||||||
</el-link>
|
</el-link>
|
||||||
</span>
|
</span>
|
||||||
@@ -138,6 +138,7 @@ import UploadInvoiceDialog from './components/UploadInvoiceDialog.vue'
|
|||||||
import RejectInvoiceDialog from './components/RejectInvoiceDialog.vue'
|
import RejectInvoiceDialog from './components/RejectInvoiceDialog.vue'
|
||||||
import { getInvoiceDetail, uploadInvoice, rejectInvoice, issueInvoice, type Invoice } from '@/api/invoice'
|
import { getInvoiceDetail, uploadInvoice, rejectInvoice, issueInvoice, type Invoice } from '@/api/invoice'
|
||||||
import { formatDateTime } from '@/utils/date'
|
import { formatDateTime } from '@/utils/date'
|
||||||
|
import { envUrl1 } from '@/api/https'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@@ -267,6 +268,14 @@ const handleRejectSubmit = async (data: any) => {
|
|||||||
ElMessage.error(error.backendMessage || t('invoices.messages.fetchDetailError'))
|
ElMessage.error(error.backendMessage || t('invoices.messages.fetchDetailError'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 每一项的点击事件
|
||||||
|
const downloadFile = (e:string)=>{
|
||||||
|
if (!e) return
|
||||||
|
// 如果是相对路径,拼上基础路径
|
||||||
|
const url = e.startsWith('http') ? e : envUrl1 + e
|
||||||
|
window.open(url)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Reference in new issue
Block a user