From c1b5f6edeacfa0326931d06de6773b936dbabe27 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期二, 26 八月 2025 15:18:44 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_JLMY' into dev_JLMY
---
src/views/salesOutbound/index.vue | 31 ++++++++++++++++++++++++++++---
1 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/src/views/salesOutbound/index.vue b/src/views/salesOutbound/index.vue
index b9d38ce..fef7e86 100644
--- a/src/views/salesOutbound/index.vue
+++ b/src/views/salesOutbound/index.vue
@@ -39,7 +39,7 @@
<el-space>
<el-button type="primary" :icon="Plus" @click="openDia(undefined, 'add')">鏂板缓</el-button>
<el-button type="danger" :icon="Delete" @click="handleDelete">鍒犻櫎</el-button>
- <!-- <el-button type="info" plain :icon="Download" @click="handleExport">瀵煎嚭</el-button> -->
+ <el-button type="info" plain :icon="Download" @click="handleExport">瀵煎嚭</el-button>
</el-space>
<!-- 琛ㄦ牸缁勪欢 -->
<div>
@@ -72,6 +72,7 @@
import {ref, reactive, onMounted} from "vue";
const { proxy } = getCurrentInstance()
import {Delete, Download, Plus} from "@element-plus/icons-vue";
+import { ElMessage } from "element-plus";
import ETable from "@/components/Table/ETable.vue";
import Pagination from "@/components/Pagination/index.vue";
import FormDia from "@/views/salesOutbound/components/formDia.vue";
@@ -97,7 +98,8 @@
{ prop: "saleQuantity", label: "閿�鍞暟閲�", minWidth: 120 },
{ prop: "salePrice", label: "閿�鍞崟浠�(鍚◣)", minWidth: 150 },
{ prop: "totalAmount", label: "閿�鍞�讳环(鍚◣)", minWidth: 120 },
- { prop: "freight", label: "杩愯垂", minWidth: 90 },
+ { prop: "salesFreight", label: "閿�鍞繍璐�", minWidth: 90 },
+ { prop: "purchasingFreight", label: "閲囪喘杩愯垂", minWidth: 90 },
{ prop: "taxCoal", label: "璐攢鐓ょ◣鐜�(%)", minWidth: 120 },
{ prop: "taxTrans", label: "杩愯緭绋庣巼(%)", minWidth: 120 },
{ prop: "grossProfit", label: "姣涘埄娑�", minWidth: 90 },
@@ -169,7 +171,30 @@
};
// 瀵煎嚭鍑哄簱
const handleExport = () => {
-
+ const config = { api: "/salesRecord/export", name: "閿�鍞嚭搴�" };
+ proxy.$modal
+ .confirm(
+ "鏄惁瑕佸鍑�" +
+ (selectedRows.value.length > 0
+ ? `閫変腑鐨�${selectedRows.value.length}鏉
+ : "鍏ㄩ儴") +
+ "鏁版嵁锛�"
+ )
+ .then((res) => {
+ if (!res) return;
+ exportData(config.api, config.name);
+ })
+ .catch(() => {
+ ElMessage.error("瀵煎嚭澶辫触锛岃閲嶈瘯");
+ });
+};
+const exportData = (api, name) => {
+ proxy.download(
+ api,
+ { exportIds: selectedRows.value.map((row) => row.id) },
+ `${new Date().getTime()}${name}${new Date().toLocaleDateString("en-CA")}.xlsx`
+ );
+ ElMessage.success("瀵煎嚭鏁版嵁锛�" + name);
};
// 閫夋嫨琛�
const handleSelectionChange = (selection) => {
--
Gitblit v1.9.3