From b499a7e1dbcc4b9dbcdcaa46bbf5c24271bf6698 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期一, 11 八月 2025 16:54:05 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue |   38 +++++++++++++++++---------------------
 1 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
index 0c59c12..1d3dbbb 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -1001,6 +1001,23 @@
     return
   }
 
+  const reportingWorkTime = titleUploadData.value.reportingWorkTime
+    const currentTime = new Date()
+    const targetTime = new Date(reportingWorkTime)
+    //鏈潵鏃堕棿
+    if (targetTime > currentTime) {
+      ElMessage.error(t('reportingWorks.futureTime'))
+      return
+    }
+    // 涓や釜鏃堕棿鐨勬绉掑樊
+    const diffMs = currentTime - targetTime
+    // 杞崲涓哄ぉ鏁�
+    const diffDays = diffMs / (1000 * 60 * 60 * 24)
+    if (diffDays > 15) {
+      ElMessage.error(t('reportingWorks.longTime'))
+      return
+    }
+
   const seenIds = {}
   const uniqueByOrderNum = xGrid.value.getTableData().fullData.filter(item => {
     // 妫�鏌tem鐨刬d鏄惁宸茬粡鍦╯eenIds涓�
@@ -1280,27 +1297,6 @@
       //鍒ゆ柇鏃╂櫄鐝�
       titleUploadData.value.classes=t('reportingWorks.early')
       titleUploadData.value.reportingWorkTime = formatCurrentTime()
-
-      //澶勭悊缂栧彿鍒�
-      //瀹氫箟瀛樻斁缂栧彿鏁扮粍
-      const s01Values = [];
-      for (let i = 0; i < res.data.Detail.length; i++) {
-        const s01Values = [];
-        // 閬嶅巻 detailList 鏁扮粍锛屾彁鍙� S01 鍊煎埌 s01Values 鏁扮粍
-        if (res.data.Detail[i].other_columns!=null|| res.data.Detail[i].other_columns!=undefined){
-          res.data.Detail.forEach(element => {
-            const otherColumnsObject = JSON.parse(element.other_columns);
-            const s01Value = otherColumnsObject.S01;
-            s01Values.push(s01Value || ''); // 濡傛灉 S01 鍊间负绌猴紝娣诲姞绌哄瓧绗︿覆鎴栬�呭叾浠栭粯璁ゅ��
-          });
-
-          // 灏� s01Values 涓殑鍊艰祴缁欐瘡涓鍗曡鎯呭璞$殑 s01Value 灞炴��
-          res.data.Detail.forEach((detail, index) => {
-            detail.s01Value = index < s01Values.length ? s01Values[index] : ''; // 璧嬪�肩粰 s01Value 灞炴��
-          });
-        }
-
-      }
 
 
       //缁戝畾涓嬫柟琛ㄦ牸

--
Gitblit v1.8.0