From 4230a136a30bac8275c5d2d9a092e1f911d49b41 Mon Sep 17 00:00:00 2001
From: qb <1191961160@qq.com>
Date: Wed, 31 Jul 2024 11:02:58 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8F=90=E8=B4=A7=E5=AF=BC?=
=?UTF-8?q?=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../arteryDistrilbutionBillLadingList.js | 13 ++++++++
.../arteryDistrilbutionBillLadingList.vue | 26 ++++++++++++++--
...teryDistrilbutionBillLadingListDetails.vue | 30 ++++++++++++++++++-
3 files changed, 65 insertions(+), 4 deletions(-)
diff --git a/src/api/distribution/arteryDistrilbutionBillLadingList.js b/src/api/distribution/arteryDistrilbutionBillLadingList.js
index 50d1656a..5789c1fc 100644
--- a/src/api/distribution/arteryDistrilbutionBillLadingList.js
+++ b/src/api/distribution/arteryDistrilbutionBillLadingList.js
@@ -173,5 +173,18 @@ export const postPageListExport = data => {
url: '/api/logpm-trunkline/billlading/pageListExport',
method: 'post',
data,
+ responseType: 'blob',
+ });
+};
+
+/**
+ * 干线提货详情导出
+ */
+export const postBillladingDetailExport = data => {
+ return request({
+ url: '/api/logpm-trunkline/billlading/billladingDetailExport',
+ method: 'post',
+ data,
+ responseType: 'blob',
});
};
diff --git a/src/views/distribution/inventory/arteryDistrilbutionBillLadingList.vue b/src/views/distribution/inventory/arteryDistrilbutionBillLadingList.vue
index 3df03a22..974a3918 100644
--- a/src/views/distribution/inventory/arteryDistrilbutionBillLadingList.vue
+++ b/src/views/distribution/inventory/arteryDistrilbutionBillLadingList.vue
@@ -105,9 +105,9 @@
>
取消提货
-
+
+ 导出
+
@@ -332,6 +332,7 @@ import {
postBillladingPackageDetail,
postFindWaybillBillladingList,
postAddWaybillToBillladingId,
+ postPageListExport,
} from '@/api/distribution/arteryDistrilbutionBillLadingList';
// 引入表格配置文件
import {
@@ -350,6 +351,7 @@ import {
deepClone,
handleTranslationDataSeclect,
} from '@/utils/util';
+import { dateNow } from '@/utils/date';
import { detail } from '@/api/flow/flow';
export default {
@@ -992,6 +994,24 @@ export default {
this.form.consigneeMobile = _item.consigneeMobile || '';
this.form.num = this.form.maxNum;
},
+ /** 导出 */
+ async handleExportInfo() {
+ try {
+ this.loadingObj.pageLoading = true;
+
+ const res = await postPageListExport(this.query);
+
+ const { status, data } = res;
+ if (status !== 200) return;
+ console.log('data :>> ', data);
+
+ downloadXls(data, `干线提货数据-${dateNow()}.xlsx`);
+ } catch (error) {
+ console.log('error :>> ', error);
+ } finally {
+ this.loadingObj.pageLoading = false;
+ }
+ },
},
activated() {
if (this.$store.state.isRefresh.refreshObj.addArteryDistrilbutionBillLadingList) {
diff --git a/src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue b/src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue
index 305a8ee1..68f1ade1 100644
--- a/src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue
+++ b/src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue
@@ -80,6 +80,11 @@
>
确认修改
+
+
+
+ 导出
+
@@ -287,9 +292,11 @@ import {
postFindChargeTypeList,
postUpdateBillladingWaybillNum,
postFindBillladingLogList,
+ postBillladingDetailExport,
} from '@/api/distribution/arteryDistrilbutionBillLadingList';
-import { isNumber } from '@/utils/util';
+import { isNumber, downloadXls } from '@/utils/util';
import { ElMessage } from 'element-plus';
+import { dateNow } from '@/utils/date';
import { getToken } from '@/utils/auth';
export default {
data() {
@@ -871,6 +878,27 @@ export default {
break;
}
},
+ /** 导出 */
+ async handleExportInfo() {
+ try {
+ this.loadingObj.pageLoading = true;
+
+ const res = await postBillladingDetailExport({
+ ...this.query,
+ billladingId: this.$route.query.id,
+ });
+
+ const { status, data } = res;
+ if (status !== 200) return;
+ console.log('data :>> ', data);
+
+ downloadXls(data, `干线提货数据-${this.deliverydata.billladingCode}-${dateNow()}.xlsx`);
+ } catch (error) {
+ console.log('error :>> ', error);
+ } finally {
+ this.loadingObj.pageLoading = false;
+ }
+ },
},
};