From 510e8855e63526348578e66c3131e92755bfffd7 Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Thu, 26 Dec 2024 18:20:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=98=E7=9B=98=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/basicdata/basicdataTray.js | 12 ++++++ .../warehouse/tray/basicdataTrayedt.vue | 42 +++++++++++++++++-- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/src/api/basicdata/basicdataTray.js b/src/api/basicdata/basicdataTray.js index 393e7124..37341dc4 100644 --- a/src/api/basicdata/basicdataTray.js +++ b/src/api/basicdata/basicdataTray.js @@ -179,3 +179,15 @@ export const getWarehouseListqx = () => { method: 'get', }); }; + +/** + * 托盘详情导出 + */ +export const getExportTrayData = params => { + return request({ + url: '/api/logpm-basicdata/tray/exportTrayData', + method: 'get', + params, + responseType: 'blob', + }); +}; diff --git a/src/views/basicdata/warehouse/tray/basicdataTrayedt.vue b/src/views/basicdata/warehouse/tray/basicdataTrayedt.vue index f1c2b6cd..7edbc1b0 100644 --- a/src/views/basicdata/warehouse/tray/basicdataTrayedt.vue +++ b/src/views/basicdata/warehouse/tray/basicdataTrayedt.vue @@ -31,7 +31,11 @@ - 在 托 货 物 +
+ 在 托 货 物 + + 导出 +
@@ -163,13 +167,14 @@ import { getpackList, getinventoryList, getlclList, + getExportTrayData, } from '@/api/basicdata/basicdataTray'; import option from '@/option/basic/basicPdarecords'; import { mapGetters } from 'vuex'; import { getDictionaryBiz } from '@/api/system/dict'; import dayjs from 'dayjs'; -import { handleTranslationDataSeclect } from '@/utils/util'; +import { handleTranslationDataSeclect, downloadXls } from '@/utils/util'; export default { data() { @@ -827,7 +832,7 @@ export default { // head: false, // }, { - prop: 'positionCode', + prop: 'goodsAllocation', label: '所在库位', type: 30, values: '', @@ -1482,6 +1487,37 @@ export default { this.handleInventory(this.inventorypage); this.loading = false; }, + /** 导出 */ + async handleExport() { + console.log('this.traydata :>> ', this.traydata); + + try { + this.loading = true; + const res = await getExportTrayData({ id: this.traydata.id }); + const { status, data } = res; + + if (status !== 200) return; + + downloadXls(data, `${this.traydata.palletName} - 在托详情 - ${new Date().getTime()}.xlsx`); + } catch (error) { + console.log('error :>> ', error); + } finally { + this.loading = false; + } + }, }, }; + +