From e1b1a29203de502457d8ede2508ba1fa2c55db47 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期一, 27 四月 2026 14:41:53 +0800
Subject: [PATCH] 1
---
src/views/productionManagement/workOrderManagement/index.vue | 49 +++++++++++++++++++++++++++++++++++++------------
1 files changed, 37 insertions(+), 12 deletions(-)
diff --git a/src/views/productionManagement/workOrderManagement/index.vue b/src/views/productionManagement/workOrderManagement/index.vue
index 6ae3e53..a9610e3 100644
--- a/src/views/productionManagement/workOrderManagement/index.vue
+++ b/src/views/productionManagement/workOrderManagement/index.vue
@@ -31,7 +31,13 @@
:status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''" />
</template>
<template #todayReportState="{ row }">
- {{ formatTodayReportState(row?.todayReportState) }}
+ <el-tag :type="todayReportStateTagType(row?.todayReportState)"
+ size="small">
+ {{ formatTodayReportState(row?.todayReportState) }}
+ </el-tag>
+ </template>
+ <template #totalReportDurationMinutes="{ row }">
+ {{ formatDurationHours(row?.totalReportDurationMinutes) }}
</template>
</PIMTable>
</div>
@@ -197,6 +203,13 @@
width: "80",
},
{
+ label: "鎶ュ伐鐘舵��",
+ prop: "todayReportState",
+ dataType: "slot",
+ slot: "todayReportState",
+ width: "110",
+ },
+ {
label: "宸ュ崟缂栧彿",
prop: "workOrderNo",
width: "140",
@@ -241,16 +254,16 @@
width: "140",
},
{
- label: "浠婃棩鎶ュ伐鐘舵��",
- prop: "todayReportState",
- dataType: "slot",
- slot: "todayReportState",
- width: "140",
- },
- {
label: "璁″垝宸ユ椂(灏忔椂)",
prop: "salaryQuota",
width: "140",
+ },
+ {
+ label: "绯荤粺鏍哥畻鏃堕棿(灏忔椂)",
+ prop: "totalReportDurationMinutes",
+ dataType: "slot",
+ slot: "totalReportDurationMinutes",
+ width: "160",
},
{
label: "璁″垝寮�濮嬫椂闂�",
@@ -449,6 +462,18 @@
if (state === 2) return "宸插紑濮�";
if (state === 3) return "宸茬粨鏉�";
return "-";
+ };
+ const formatDurationHours = val => {
+ const minutes = Number(val);
+ if (!Number.isFinite(minutes) || minutes < 0) return "-";
+ return (minutes / 60).toFixed(2);
+ };
+ const todayReportStateTagType = val => {
+ const state = Number(val);
+ if (state === 1) return "info";
+ if (state === 2) return "success";
+ if (state === 3) return "warning";
+ return "info";
};
// 鏌ヨ鍒楄〃
@@ -666,14 +691,13 @@
addProductMain(params)
.then(res => {
- proxy.$modal.msgSuccess("鎶ュ伐鎴愬姛");
+ proxy.$modal.msgSuccess(
+ currentReportState.value === 1 ? "寮�濮嬫姤宸ユ垚鍔�" : "缁撴潫鎶ュ伐鎴愬姛"
+ );
reportDialogVisible.value = false;
getList();
})
.catch(() => {
- ElMessageBox.alert("鎶ュ伐澶辫触", "鎻愮ず", {
- confirmButtonText: "纭畾",
- });
});
});
};
@@ -753,6 +777,7 @@
text-align: center;
margin-top: 20px;
}
+
</style>
<style lang="scss">
--
Gitblit v1.9.3