|
@@ -22,7 +22,7 @@
|
|
<li>4) “是否淘汰”字段,如果确定淘汰,则输入“是”,如果不淘汰,则不需要输入,保持为空即可</li>
|
|
<li>4) “是否淘汰”字段,如果确定淘汰,则输入“是”,如果不淘汰,则不需要输入,保持为空即可</li>
|
|
<li>5) “淘汰描述”字段,只有当是否淘汰为“是”时,才能录入淘汰描述,否则,淘汰描述只能保持为空</li>
|
|
<li>5) “淘汰描述”字段,只有当是否淘汰为“是”时,才能录入淘汰描述,否则,淘汰描述只能保持为空</li>
|
|
</ul>
|
|
</ul>
|
|
- <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
|
|
|
|
|
|
+ <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">
|
|
@@ -72,11 +72,13 @@ import moment from 'moment'
|
|
import VueCookies from 'vue-cookies'
|
|
import VueCookies from 'vue-cookies'
|
|
import { Upload } from '@/components'
|
|
import { Upload } from '@/components'
|
|
import { predictProductInfoExport } from '@/api/predict'
|
|
import { predictProductInfoExport } from '@/api/predict'
|
|
|
|
+import debounce from 'lodash/debounce'
|
|
export default {
|
|
export default {
|
|
name: 'IntelligentReplenishmentSet',
|
|
name: 'IntelligentReplenishmentSet',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
components: { Upload },
|
|
components: { Upload },
|
|
data () {
|
|
data () {
|
|
|
|
+ this.handleExport = debounce(this.handleExport, 2200)
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
filePath: 'javascript:;',
|
|
filePath: 'javascript:;',
|
|
@@ -84,7 +86,8 @@ export default {
|
|
paramsData: null,
|
|
paramsData: null,
|
|
uploadParams: {
|
|
uploadParams: {
|
|
savePathType: 'local'
|
|
savePathType: 'local'
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ exportLoading: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -109,8 +112,10 @@ export default {
|
|
handleExport () {
|
|
handleExport () {
|
|
const _this = this
|
|
const _this = this
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
|
|
+ _this.exportLoading = true
|
|
predictProductInfoExport({}).then(res => {
|
|
predictProductInfoExport({}).then(res => {
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
|
|
+ _this.exportLoading = false
|
|
if (res.type == 'application/json') {
|
|
if (res.type == 'application/json') {
|
|
var reader = new FileReader()
|
|
var reader = new FileReader()
|
|
reader.addEventListener('loadend', function () {
|
|
reader.addEventListener('loadend', function () {
|