订单导入模板下载
This commit is contained in:
@@ -307,16 +307,13 @@ export function BasicSettings({ formData, onChange, onNext }: BasicSettingsProps
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleDownloadTemplate = () => {
|
const handleDownloadTemplate = () => {
|
||||||
const template = "电话号码,微信号,来源,订单金额,下单日期\n13800138000,wxid_123,抖音,99.00,2024-03-03"
|
// 直接从 public 目录下载文件
|
||||||
const blob = new Blob([template], { type: "text/csv" })
|
const link = document.createElement("a")
|
||||||
const url = window.URL.createObjectURL(blob)
|
link.href = "/订单导入模板.xls"
|
||||||
const a = document.createElement("a")
|
link.download = "订单导入模板.xls"
|
||||||
a.href = url
|
document.body.appendChild(link)
|
||||||
a.download = "订单导入模板.csv"
|
link.click()
|
||||||
document.body.appendChild(a)
|
document.body.removeChild(link)
|
||||||
a.click()
|
|
||||||
document.body.removeChild(a)
|
|
||||||
window.URL.revokeObjectURL(url)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理电话获客设置更新
|
// 处理电话获客设置更新
|
||||||
|
|||||||
BIN
Cunkebao/public/订单导入模板.xls
Normal file
BIN
Cunkebao/public/订单导入模板.xls
Normal file
Binary file not shown.
Reference in New Issue
Block a user