lilei 2 лет назад
Родитель
Сommit
ff5492c4d7

BIN
public/templ/费用明细模板.xlsx


+ 5 - 16
src/views/expenseManagement/expenseReimbursement/importGuideModal.vue

@@ -17,8 +17,10 @@
           <ul>
             <li>1) 导入的Excel文件中必须包含名为“记账类型”、“记账名称”、“费用承担方类型”、“费用承担方”、“费用承担金额”的列,且名称必须相同</li>
             <li>2) 其他列可根据实际情况填写,如果符合规则,系统会一起导入</li>
+            <li><a :href="filePath" style="margin: 5px 0 0 15px;display: block;">
+            <a-icon type="download" style="padding-right: 5px;" />下载导入模板
+          </a></li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -87,7 +89,8 @@ export default {
       uploadParams: {
         savePathType: 'local'
       },
-      exportLoading: false
+      exportLoading: false,
+      filePath: location.protocol + '//' +location.host + '/templ/费用明细模板.xlsx'
     }
   },
   methods: {
@@ -125,20 +128,6 @@ export default {
     handleClose () {
       this.openImportModal = false
       this.isShow = false
-    },
-    // 下载模板
-    handleExport () {
-      this.exportLoading = true
-      setTimeout(() => {
-        this.exportLoading = false
-      }, 1000)
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = 'https://jg-ocs.oss-cn-beijing.aliyuncs.com/templ/promo/expenseAccountDetailImport.xlsx?t=' + new Date().getTime()
-      link.setAttribute('download', '费用明细模板' + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-      document.body.removeChild(link)
     }
   },
   watch: {