|
@@ -15,9 +15,7 @@
|
|
|
<span>1</span>下载导入模板
|
|
|
</div>
|
|
|
<p>请按照下载的Excel模板填写数据</p>
|
|
|
- <a :href="filePath" style="padding: 5px 0 0 23px;display: block;" id="importGuide-downloadTpl">
|
|
|
- <a-icon type="download" style="padding-right: 5px;" />下载导入模板
|
|
|
- </a>
|
|
|
+ <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载模板</a-button>
|
|
|
</div>
|
|
|
<div class="explain-item">
|
|
|
<div class="explain-tit">
|
|
@@ -72,6 +70,7 @@
|
|
|
<script>
|
|
|
import { hdPrint } from '@/libs/JGPrint.js'
|
|
|
import ChooseImportModal from './chooseImportModal.vue'
|
|
|
+import { shelfProductDownload } from '@/api/shelf'
|
|
|
import { Upload } from '@/components'
|
|
|
export default {
|
|
|
name: 'ImportGuideModal',
|
|
@@ -91,7 +90,6 @@ export default {
|
|
|
isShow: this.openModal, // 是否打开弹框
|
|
|
openImportModal: false, // 导入
|
|
|
attachAction: process.env.VUE_APP_API_BASE_URL + '/upload',
|
|
|
- filePath: location.protocol + '//' + location.host + '/templ/绑定产品导入模板.xlsx',
|
|
|
paramsData: null, // 参数
|
|
|
uploadParams: {
|
|
|
savePathType: 'local' // 保存到本地
|
|
@@ -127,6 +125,15 @@ export default {
|
|
|
handleClose () {
|
|
|
this.openImportModal = false
|
|
|
this.isShow = false
|
|
|
+ },
|
|
|
+ // 导出
|
|
|
+ handleExport () {
|
|
|
+ const _this = this
|
|
|
+ _this.spinning = true
|
|
|
+ // 导出
|
|
|
+ hdPrint('', 'export', shelfProductDownload, { shelfSn: this.params.shelfSn }, '绑定产品导入模板', function () {
|
|
|
+ _this.spinning = false
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
watch: {
|