|
|
|
@ -22,6 +22,7 @@ export default { |
|
|
|
dataList:[], |
|
|
|
queryLoading:false, |
|
|
|
total:0, |
|
|
|
exportLoading:false, |
|
|
|
palletList:[], |
|
|
|
batchVisible:false, |
|
|
|
batchParams:{ |
|
|
|
@ -201,7 +202,12 @@ export default { |
|
|
|
this.$message.warning('Pallet Label data does not exist') |
|
|
|
return |
|
|
|
} |
|
|
|
exportPallet({}).then(response => { |
|
|
|
let params = { |
|
|
|
site:this.$store.state.user.site, |
|
|
|
createBy:this.$store.state.user.name, |
|
|
|
} |
|
|
|
this.exportLoading = true; |
|
|
|
exportPallet(params).then(response => { |
|
|
|
const blob = new Blob([response.data], { type: response.headers['content-type'] }); |
|
|
|
const url = window.URL.createObjectURL(blob); |
|
|
|
const a = document.createElement('a'); |
|
|
|
@ -214,6 +220,9 @@ export default { |
|
|
|
a.click(); |
|
|
|
document.body.removeChild(a); |
|
|
|
URL.revokeObjectURL(url); |
|
|
|
this.exportLoading = false; |
|
|
|
}).catch((error)=>{ |
|
|
|
this.exportLoading = false; |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleQuery(){ |
|
|
|
@ -310,7 +319,14 @@ export default { |
|
|
|
if (newVal === true){ |
|
|
|
setTimeout(()=>{ |
|
|
|
this.saveLoading = false |
|
|
|
},3000) |
|
|
|
},30000) |
|
|
|
} |
|
|
|
}, |
|
|
|
exportLoading(newVal,oldVal){ |
|
|
|
if (newVal === true){ |
|
|
|
setTimeout(()=>{ |
|
|
|
this.exportLoading = false |
|
|
|
},30000) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -331,7 +347,7 @@ export default { |
|
|
|
<el-col :span="span*3"> |
|
|
|
<el-button type="primary" @click="handleBatchProcessing">Batch Processing</el-button> |
|
|
|
<el-button type="primary" @click="handleRemoveAll">Clear All Data</el-button> |
|
|
|
<el-button type="primary" @click="handleExport">Export</el-button> |
|
|
|
<el-button type="primary" :loading="exportLoading" icon="el-icon-printer" @click="handleExport">Export</el-button> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="10" style="margin-top: 5px"> |
|
|
|
|