From db09e248daf72ad0ffe0f55ebf204e7d8595ce74 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 11 二月 2026 16:54:07 +0800
Subject: [PATCH] 进销存升级 1.选择台账时,若台账未开票和未来票金额为0时,开票登记和来票登记按钮置灰 2.文档管理分页展示有误 3.销售报价分页展示有误

---
 src/views/personnelManagement/attendanceCheckin/index.vue |   42 +++++++++++++++++++++++++++++++++++++-----
 1 files changed, 37 insertions(+), 5 deletions(-)

diff --git a/src/views/personnelManagement/attendanceCheckin/index.vue b/src/views/personnelManagement/attendanceCheckin/index.vue
index 7ce645b..0e5b577 100644
--- a/src/views/personnelManagement/attendanceCheckin/index.vue
+++ b/src/views/personnelManagement/attendanceCheckin/index.vue
@@ -342,13 +342,45 @@
       });
   };
 
+  // 鑾峰彇褰撳墠浣嶇疆
+  const getCurrentLocation = () => {
+    return new Promise((resolve, reject) => {
+      if (navigator.geolocation) {
+        navigator.geolocation.getCurrentPosition(
+          position => {
+            const { longitude, latitude } = position.coords;
+            resolve({ longitude, latitude });
+          },
+          error => {
+            console.log("鑾峰彇浣嶇疆澶辫触:", error);
+            reject(error);
+          }
+        );
+      } else {
+        reject(new Error("娴忚鍣ㄤ笉鏀寔鍦扮悊瀹氫綅"));
+      }
+    });
+  };
+
   // 鎵撳崱
   const handleCheckInOut = () => {
-    createPersonalAttendanceRecord({}).then(res => {
-      fetchData();
-      fetchTodayData();
-      ElMessage.success("鎵撳崱鎴愬姛锛�");
-    });
+    getCurrentLocation()
+      .then(location => {
+        createPersonalAttendanceRecord(location).then(res => {
+          fetchData();
+          fetchTodayData();
+          ElMessage.success("鎵撳崱鎴愬姛锛�");
+        });
+      })
+      .catch(error => {
+        // 鑾峰彇浣嶇疆澶辫触鏃讹紝浠嶅厑璁告墦鍗�
+        ElMessage.warning("鑾峰彇浣嶇疆澶辫触锛屽皢浣跨敤榛樿浣嶇疆鎵撳崱");
+        createPersonalAttendanceRecord({}).then(res => {
+          fetchData();
+          fetchTodayData();
+          ElMessage.success("鎵撳崱鎴愬姛锛�");
+        });
+      });
   };
 
   onMounted(() => {

--
Gitblit v1.9.3