From ac999e889d020c31a4855cf6209d611397fb393e Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 29 四月 2026 09:09:32 +0800
Subject: [PATCH] 重构生产报表表:注释掉未使用的字段,更新详细数据获取逻辑,并增强以选定工单号为依据的导出功能。
---
src/views/productionManagement/productionReporting/index.vue | 72 +++++++++++++++++++++--------------
1 files changed, 43 insertions(+), 29 deletions(-)
diff --git a/src/views/productionManagement/productionReporting/index.vue b/src/views/productionManagement/productionReporting/index.vue
index 31c2005..4c4548f 100644
--- a/src/views/productionManagement/productionReporting/index.vue
+++ b/src/views/productionManagement/productionReporting/index.vue
@@ -181,26 +181,26 @@
prop: "userName",
width: 120,
},
- {
- label: "宸ュ簭",
- prop: "process",
- width: 120,
- },
- {
- label: "宸ュ崟缂栧彿",
- prop: "workOrderNo",
- width: 140,
- },
- {
- label: "閿�鍞悎鍚屽彿",
- prop: "salesContractNo",
- width: 140,
- },
- {
- label: "鐢熶骇璁㈠崟鍙�",
- prop: "productOrderNpsNo",
- width: 140,
- },
+ // {
+ // label: "宸ュ簭",
+ // prop: "process",
+ // width: 120,
+ // },
+ // {
+ // label: "宸ュ崟缂栧彿",
+ // prop: "workOrderNo",
+ // width: 140,
+ // },
+ // {
+ // label: "閿�鍞悎鍚屽彿",
+ // prop: "salesContractNo",
+ // width: 140,
+ // },
+ // {
+ // label: "鐢熶骇璁㈠崟鍙�",
+ // prop: "productOrderNpsNo",
+ // width: 140,
+ // },
{
label: "浜у搧鍚嶇О",
prop: "productName",
@@ -212,6 +212,11 @@
width: 160,
},
{
+ label: "鍗曚綅",
+ prop: "unit",
+ width: 100,
+ },
+ {
label: "鍚堟牸",
prop: "quantity",
width: 100,
@@ -221,11 +226,7 @@
prop: "scrapQty",
width: 100,
},
- {
- label: "鍗曚綅",
- prop: "unit",
- width: 100,
- },
+
{
label: "宸ュ簭鏍囧噯宸ユ椂(灏忔椂)",
prop: "processStandardHours",
@@ -346,10 +347,10 @@
getDetailList();
};
const getDetailList = () => {
- if (!currentDetailRow.value?.id) return;
+ if (!currentDetailRow.value?.workOrderId) return;
detailLoading.value = true;
productionProductMainListPageDetail({
- id: currentDetailRow.value.id,
+ workOrderId: currentDetailRow.value.workOrderId,
current: detailPage.current,
size: detailPage.size,
})
@@ -395,13 +396,26 @@
// 瀵煎嚭
const handleOut = () => {
- ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+ const workOrderIds = [...new Set(
+ (selectedRows.value || [])
+ .map(item => item.workOrderId)
+ .filter(item => item !== undefined && item !== null && item !== "")
+ )];
+ const exportParams = {
+ ...searchForm.value,
+ ...(workOrderIds.length ? { workOrderIds } : {}),
+ };
+ ElMessageBox.confirm("灏嗗鍑哄綋鍓嶆煡璇㈢粨鏋滐紝鍕鹃�夋暟鎹椂浠呭鍑洪�変腑鍐呭锛屾槸鍚︾户缁紵", "瀵煎嚭", {
confirmButtonText: "纭",
cancelButtonText: "鍙栨秷",
type: "warning",
})
.then(() => {
- proxy.download("/productionProductMain/export", {}, "鐢熶骇鎶ュ伐.xlsx");
+ proxy.download(
+ "/productionProductMain/exportDetail",
+ exportParams,
+ "鐢熶骇鎶ュ伐.xlsx"
+ );
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
--
Gitblit v1.9.3