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;
+ }
+ },
},
};
+
+