From 801bb13cadd66f9eb60fc917066751bd6672741b Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期一, 01 十二月 2025 16:20:58 +0800
Subject: [PATCH] 提交合计相关字体大小

---
 north-glass-erp/northglass-erp/src/hook/mouseMove.ts |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/hook/mouseMove.ts b/north-glass-erp/northglass-erp/src/hook/mouseMove.ts
index bd5b8be..e3a88e8 100644
--- a/north-glass-erp/northglass-erp/src/hook/mouseMove.ts
+++ b/north-glass-erp/northglass-erp/src/hook/mouseMove.ts
@@ -1,6 +1,7 @@
 //榧犳爣婊戝姩閫変腑
 import {nextTick, ref,reactive} from "vue";
 import {ElMessage} from "element-plus";
+import {add} from "../utils/decimal"
 
 let isSelecting = ref(false) // 鏄惁姝e湪杩涜閫夋嫨鎿嶄綔,榛樿涓篺alse
 let selectionStart = reactive({ rowIndex: -1, cellIndex: -1 }) // 閫夋嫨鎿嶄綔璧峰鍗曞厓鏍间綅缃�
@@ -14,7 +15,7 @@
 let cellarea = ref(`
     <div class="vxe-table--cell-area" style="font-size: 10px;text-align: left" >
       <span class="vxe-table--cell-main-area" >
-        <p style="bottom: 0;color: blue;background-color: #5cadfe"></p>
+        <p style="bottom: 0;color: blue;background-color: #5cadfe; margin-top: auto;font-size: 14px"></p>
         </span>
       <span class="vxe-table--cell-active-area"  ></span>
     </div>
@@ -38,7 +39,7 @@
     //cellarea.value = newElement
     //娣诲姞澶氶�夊垪
     nextTick(() => {
-        window.addEventListener("keypress", ()=>{
+        window.addEventListener("keydown", ()=>{
             destroyAreaBox()
         })
         window.addEventListener("mousedown", tableOutDestroyAreaBox)//缁檞indow娣诲姞榧犳爣鎸変笅浜嬩欢,鍒ゆ柇鏄惁鍦ㄨ〃鏍煎,鏄攢姣�
@@ -164,15 +165,16 @@
 
     result.forEach((item,index) => {
         if(index>0){
-            sum+=item.reduce((a, b) => a*1 + b*1, 0);
+            const val = isNaN(item[0])?0:item[0]
+            sum = Number(add(sum, (val || 0)))
         }
     })
 
     sum=isNaN(sum)?0:sum
     setTimeout(()=>{
-        activeElement.innerHTML ="SUM:"+parseFloat(sum.toFixed(2))
+        activeElement.innerHTML ="SUM:"+sum
         if(element){
-            element.innerHTML ="SUM:"+parseFloat(sum.toFixed(2))
+            element.innerHTML ="SUM:"+sum
         }
 
     },200)
@@ -272,6 +274,11 @@
             element.style.height = `${height}px`
             element.style.top = `${top}px`
             element.style.display = "block"
+            if(index%2==1){
+                element.style.display = "flex"
+                element.style.flexDirection = 'column'
+            }
+
             if (index <= elements.length - 1 - 2) {//濡傛灉涓嶆槸rightFixedActiveElement鎴杛ightFixedMainElement
                 element.style.left = `${left}px`
             } else {
@@ -563,5 +570,6 @@
 export {
     addListener,
     toolbarButtonClickEvent,
-    exportData
+    exportData,
+    destroyAreaBox
 }
\ No newline at end of file

--
Gitblit v1.8.0