From b9d3432b9994a3a050cb913d6137a8a7f0be9f67 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期五, 24 四月 2026 18:50:16 +0800
Subject: [PATCH] feat(production): 重构生产报工为工单列表和上下机流程
---
src/pages/humanResources/contractManagement/index.vue | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/pages/humanResources/contractManagement/index.vue b/src/pages/humanResources/contractManagement/index.vue
index b036ed6..61f25af 100644
--- a/src/pages/humanResources/contractManagement/index.vue
+++ b/src/pages/humanResources/contractManagement/index.vue
@@ -132,7 +132,8 @@
<view class="contract-item-content">
<view class="contract-detail">
<text class="detail-label">鍚堝悓骞撮檺锛�</text>
- <text class="detail-value">{{ contract.contractTerm || '-' }}</text>
+ <!-- contractEndTime.year - contractStartTime.year = 鍚堝悓骞撮檺 -->
+ <text class="detail-value">{{ contractTerm(contract) || '-' }}</text>
</view>
<view class="contract-detail">
<text class="detail-label">鍚堝悓寮�濮嬫棩鏈燂細</text>
@@ -208,6 +209,11 @@
},
]);
+ const contractTerm = ((row) => {
+ if (!row.contractEndTime || !row.contractStartTime) return 0;
+ return new Date(row.contractEndTime).getFullYear() - new Date(row.contractStartTime).getFullYear();
+ })
+
// 鐢ㄦ埛瀛樺偍
const userStore = useUserStore();
--
Gitblit v1.9.3