Prechádzať zdrojové kódy

fix: 模板导入名称

maliang 1 mesiac pred
rodič
commit
0b5ddd27d2

+ 4 - 2
jshERP-web/src/components/tools/ImportFileModal.vue

@@ -71,6 +71,7 @@ export default {
       disableMixinCreated: true,
       templateUrl: '',
       templateName: '',
+      templateDownloadName: '',
       url: {
         importExcelUrl: '',
       },
@@ -83,15 +84,16 @@ export default {
     },
   },
   methods: {
-    initModal(apiUrl, templateUrl, templateName) {
+    initModal(apiUrl, templateUrl, templateName, templateDownloadName = '供应商模板') {
       this.url.importExcelUrl = apiUrl
       this.templateUrl = templateUrl
       this.templateName = templateName
+      this.templateDownloadName = templateDownloadName
       this.visible = true
     },
     importTemplate() {
       let link = this.$refs.myLink
-      link.setAttribute('download', '供应商模板' + '.xls')
+      link.setAttribute('download', this.templateDownloadName + '.xls')
     },
     close() {
       this.$emit('close')

+ 2 - 2
jshERP-web/src/views/material/MaterialList.vue

@@ -549,8 +549,8 @@ export default {
     handleImportXls() {
       let importExcelUrl = this.url.importExcelUrl
       let templateUrl = '/doc/goods_template.xls'
-      let templateName = '商品Excel模板[下载]'
-      this.$refs.modalImportForm.initModal(importExcelUrl, templateUrl, templateName)
+      let templateName = '商品信息导入模版[下载]'
+      this.$refs.modalImportForm.initModal(importExcelUrl, templateUrl, templateName, '商品信息导入模版')
       this.$refs.modalImportForm.title = '商品导入'
     },
     searchReset() {