|
@@ -98,7 +98,7 @@
|
|
|
<a-card :bordered="false" style="margin:10px 0">
|
|
|
<div class="table-operator">
|
|
|
<a-button type="primary" @click="addAdpacking" icon="plus">新增</a-button>
|
|
|
- <a-button type="primary" icon="download" @click="handleExportXls('预装箱单-成衣','0')">预装箱单成衣导出</a-button>
|
|
|
+ <a-button type="primary" icon="download" @click="handleExportXls1('预装箱单-成衣','0')">预装箱单成衣导出</a-button>
|
|
|
<a-button type="primary" icon="download" @click="handleExportXls('预装箱单-成衣','1')">预装箱单成衣导出-装箱单</a-button>
|
|
|
<a-upload productName="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" :customRequest="uploadFlie">
|
|
|
<a-button type="primary" icon="import">导入-来源出运明细</a-button>
|
|
@@ -639,6 +639,31 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ // 列表导出
|
|
|
+ handleExportXls1(fileName,sta) {
|
|
|
+ const data = this.queryParam
|
|
|
+ downFile('/spapl/syPreAssembledPackingList/exportXls2',data).then(data => {
|
|
|
+ if (!data) {
|
|
|
+ this.$message.warning('文件下载失败')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
|
|
+ window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xlsx')
|
|
|
+ } else {
|
|
|
+ let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
|
|
|
+ let link = document.createElement('a')
|
|
|
+ link.style.display = 'none'
|
|
|
+ link.href = url
|
|
|
+ link.setAttribute('download', fileName + '.xlsx')
|
|
|
+ document.body.appendChild(link)
|
|
|
+ link.click()
|
|
|
+ document.body.removeChild(link) // 下载完成移除元素
|
|
|
+ window.URL.revokeObjectURL(url) // 释放掉blob对象
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
// 导入信息
|
|
|
uploadFlie(file) {
|
|
|
const formData = new FormData()
|