From 5da536668e047dbaefbb79731ab2cacfdf70dc56 Mon Sep 17 00:00:00 2001
From: zhang_12370 <z2864490065@outlook.com>
Date: 星期二, 22 七月 2025 17:36:38 +0800
Subject: [PATCH] 1、提交配煤计算器 解除煤种限制 2、增加销售出库的导出功能 3、库存管理正式库的导出功能 4、文档管理优化 5、优化设备管理模块

---
 src/views/salesOutbound/index.vue |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/src/views/salesOutbound/index.vue b/src/views/salesOutbound/index.vue
index b9d38ce..8704650 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>
@@ -169,7 +169,30 @@
 };
 // 瀵煎嚭鍑哄簱
 const handleExport = () => {
-
+  const config = { api: "/salesRecord/export", name: "閿�鍞嚭搴�" };
+  proxy.$modal
+    .confirm(
+      "鏄惁瑕佸鍑�" +
+        (selectedRows.value.length > 0
+          ? `閫変腑鐨�${selectedRows.value.length}鏉
+          : "鍏ㄩ儴") +
+        "鏁版嵁锛�"
+    )
+    .then((res) => {
+      if (res) {
+        ElMessage.success("姝e湪瀵煎嚭鏁版嵁锛岃绋嶅��...");
+        exportData(config.api, config.name);
+      }
+    })
+    .catch(() => {});
+};
+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