From 5df5dba2a321098fd0fc7e18b71549f5c2312049 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期二, 27 八月 2024 17:19:13 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue b/north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue
index dc1c07b..5b1fef2 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue
@@ -136,7 +136,10 @@
       {field: 'processingNote',width:120,  title: t('order.processingNote'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
 
     ],
-
+    mouseConfig:{selected: true},//榧犳爣閫変腑
+    keyboardConfig:{
+      isArrow: true
+    },
     //琛ㄥご鎸夐挳
     toolbarConfig: {
       buttons: [
@@ -464,6 +467,26 @@
 
 }
 
+const handleKeyDown = (evnt) =>{
+
+  if(evnt.$event.keyCode === 38 ){
+    let nextRowIndex = xGrid.value.getRowIndex(xGrid.value.getCurrentRecord()) - 1;
+    if (nextRowIndex < xGrid.value.getTableData().fullData.length && nextRowIndex>=0) {
+      xGrid.value.setCurrentRow(xGrid.value.getTableData().fullData[nextRowIndex]);
+      rowClickIndex.value = xGrid.value.getCurrentRecord()
+    }
+
+  }
+  if(evnt.$event.keyCode === 40 ){
+    let nextRowIndex = xGrid.value.getRowIndex(xGrid.value.getCurrentRecord()) + 1;
+    if (nextRowIndex < xGrid.value.getTableData().fullData.length) {
+      xGrid.value.setCurrentRow(xGrid.value.getTableData().fullData[nextRowIndex]);
+      rowClickIndex.value = xGrid.value.getCurrentRecord()
+    }
+
+  }
+}
+
 </script>
 
 <template>
@@ -493,6 +516,7 @@
           ref="xGrid"
           v-bind="gridOptions"
           v-on="gridEvents"
+          @keydown="handleKeyDown"
 
       >
         <!--      涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->

--
Gitblit v1.8.0