仅允许导入xls、xlsx格式文件。
- 下载示例模板
+
+ 下载示例模板
+
+
+ 下载高铁比稿价模板
+ 下载候车厅比稿价模板
+ 下载门禁道闸比稿价模板
+
+
+
+
@@ -384,13 +403,13 @@ const requestDocUpload = (options) => {
const { file } = options
var formData = new FormData();
formData.append('file', file);
- importSupplierComparePrice(formData).then(res => {
+ importSupplierComparePrice(formData).then(res => {
if (res.code == 200) {
proxy.$modal.msgSuccess("导入成功")
proxy.$modal.closeLoading()
uploadOpen.value = false
getPitchPricePage()
- } else {
+ } else {
proxy.$modal.closeLoading()
proxy.$modal.msgError(res.msg);
}
@@ -416,10 +435,24 @@ const removeDocUpload = (file, fileList) => {
);
}
// 下载导入示例模板操作
-const importTemplate = () => {
- const link = document.createElement('a')
- link.href = '/比稿价导入示例模板.xlsx'
- link.download = '比稿价导入示例模板.xlsx' // 设置下载文件名
+const importTemplate = (_type) => {
+ const link = document.createElement('a')
+ switch (_type) {
+ case 'gt':
+ link.href = '/高铁比稿价导入示例模板.xlsx'
+ link.download = '高铁比稿价导入示例模板.xlsx' // 设置下载文件名
+ break;
+ case 'hct':
+ link.href = '/候车厅比稿价导入示例模板.xlsx'
+ link.download = '候车厅比稿价导入示例模板.xlsx' // 设置下载文件名
+ break;
+ case 'mjdz':
+ link.href = '/门禁道闸比稿价导入示例模板.xlsx'
+ link.download = '门禁道闸比稿价导入示例模板.xlsx' // 设置下载文件名
+ break;
+ default:
+ break;
+ }
document.body.appendChild(link)
link.click()
document.body.removeChild(link)