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