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

BIN
public/templ/散件入库产品导入模板.xlsx


+ 7 - 17
src/views/purchasingManagement/bulkWarehousingOrder/importGuideModal.vue

@@ -18,8 +18,12 @@
             <li>1) 导入的Excel文件中必须包含名为“产品编码”、“数量”、“成本价”的列,且名称必须相同</li>
             <li>2) 除了“产品编码”、“数量”、“成本价”三列,其他列可自定义,不影响数据导入</li>
             <li>3) “成本价”为空或0时,允许导入;成本价为空,自动获取系统成本价;成本价为0,按赠品处理</li>
+            <li>
+              <a :href="filePath" style="margin: 5px 0 0;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">
@@ -65,8 +69,6 @@
 <script>
 import ChooseImportModal from './chooseImportModal.vue'
 import { Upload } from '@/components'
-import { hdExportExcel } from '@/libs/exportExcel'
-import { sparePartsDetailDownload } from '@/api/spareParts'
 export default {
   name: 'ImportGuideModal',
   components: { ChooseImportModal, Upload },
@@ -89,7 +91,8 @@ export default {
       uploadParams: {
         savePathType: 'local'
       },
-      exportLoading: false
+      exportLoading: false,
+      filePath: location.protocol + '//' + location.host + '/templ/散件入库产品导入模板.xlsx'
     }
   },
   methods: {
@@ -121,19 +124,6 @@ export default {
     handleClose () {
       this.openImportModal = false
       this.isShow = false
-    },
-    //  导出
-    handleExport () {
-      const _this = this
-      const params = { grabFlag: this.params.grabFlag }
-      this.spinning = true
-      this.exportLoading = true
-      setTimeout(() => {
-        _this.exportLoading = false
-      }, 1000)
-      hdExportExcel(sparePartsDetailDownload, params, '散件入库导入模板', function () {
-        _this.spinning = false
-      })
     }
   },
   watch: {