From fc2e6b1652d4e9b73d3b9ac32bcaea1fd261cfad Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Tue, 3 Feb 2026 16:15:00 +0800
Subject: [PATCH] =?UTF-8?q?2026-02-03=20=E8=AE=A2=E5=8D=95=E6=8E=92?=
=?UTF-8?q?=E4=BA=A7=EF=BC=88=E6=97=A0=E9=99=90=E4=BA=A7=E8=83=BD=EF=BC=89?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E5=AF=BC=E5=87=BA=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../schedule/order_schedule_expand.vue | 31 +++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/src/views/modules/schedule/order_schedule_expand.vue b/src/views/modules/schedule/order_schedule_expand.vue
index e230199..91b65c0 100644
--- a/src/views/modules/schedule/order_schedule_expand.vue
+++ b/src/views/modules/schedule/order_schedule_expand.vue
@@ -60,6 +60,9 @@
{{ buttons.scheduleBatch ? buttons.scheduleBatch : '批量排产' }}
+
+ {{ buttons.exportButton ? buttons.exportButton : '导出' }}
+
@@ -315,6 +318,7 @@ import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
import comPartStock from "../common/com_part_stock";/*展示物料库存的组件*/
import comScheduleOrderExpand from '@/views/modules/schedule/com_schedule_order_expand';/*排产扩展 排产单个工单*/
import column from '@/views/modules/common/column';/*动态表头*/
+import excel from "@/utils/excel-util.js"; /*导出工具类*/
import {
getShopOrderList,
@@ -1178,6 +1182,7 @@ export default {
settingTable: '设置列表',
defaultTable: '设置默认配置',
scheduleBatch: '批量排产',
+ exportButton: '导出',
},
buttonList: [
{
@@ -1216,6 +1221,12 @@ export default {
objectId: 'defaultTable',
objectType: 'button',
tableId: '*'
+ }, {
+ functionId: functionId,
+ languageValue: '导出',
+ objectId: 'exportButton',
+ objectType: 'button',
+ tableId: '*'
},
],
queryButton: {
@@ -1788,6 +1799,26 @@ export default {
});
},
+ // 导出Excel
+ async exportExcel() {
+ // 准备导出参数,查询所有数据(不分页)
+ const exportParams = {
+ ...this.pageData,
+ page: 1,
+ limit: -1 // -1表示查询所有数据
+ }
+
+ excel.exportTable({
+ url: "/scheduling/getShopOrderList", // 使用正确的后端接口路径
+ columnMapping: this.columnList, // 使用当前表格的列配置
+ mergeSetting: [], // 需要合并的列(如果有的话)
+ params: exportParams,
+ fileName: "订单排产_" + this.dayjs().format('YYYYMMDDHHmmss') + ".xlsx",
+ rowFetcher: res => res.data.page.list, // 根据后端返回结构:R.ok().put("page", page)
+ columnFormatter: [], // 列格式化(如果需要)
+ dropColumns: ['resourceList', 'availResource'] // 剔除不适合导出的列(对象或特殊格式)
+ });
+ },
},
created() {