From 27b3352a6a7f514c98cce083eded6c3bb9e3f519 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期三, 15 一月 2025 10:50:10 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override

---
 north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue |   40 ++++++++++++++++++++++++++++++++++++----
 1 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
index 1c27aad..5d82427 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -134,7 +134,7 @@
   keyboardConfig:{
     isArrow: true,
     isDel: true,
-    isEnter: true,
+    //isEnter: true,
     isTab: true,
     isEdit: true,
     isChecked: true
@@ -1386,13 +1386,45 @@
   }
   if(evnt.$event.keyCode === 13 ){
     const { rowIndex,row,column } = xGrid.value.getSelectedCell() || xGrid.value.getEditRecord()
-    let nextRowIndex = xGrid.value.getRowIndex(row) + 1;
-    if (nextRowIndex < xGrid.value.getTableData().fullData.length) {
+    let nextRowIndex = xGrid.value.getRowIndex(row) + 1
+
+
+    switch (column.field){
+      case 'width':
+        xGrid.value.setSelectCell(row, 'height')
+        break;
+      case 'height':
+        xGrid.value.setSelectCell(row, 'quantity')
+        break;
+      case 'quantity':
+        if(nextRowIndex === length){
+          xGrid.value.insertAt({}, xGrid.value.getTableData.length || -1)
+        }
+        const nextRow = xGrid.value.getTableData().fullData[nextRowIndex]
+        xGrid.value.setCurrentRow(nextRow)
+        xGrid.value.scrollToRow(nextRow)
+        xGrid.value.setSelectCell(nextRow, 'width')
+        break;
+      default:
+        if(nextRowIndex === length){
+          xGrid.value.insertAt({}, xGrid.value.getTableData.length || -1)
+        }
+        const nextRow1 = xGrid.value.getTableData().fullData[nextRowIndex]
+        xGrid.value.setCurrentRow(nextRow1)
+        xGrid.value.scrollToRow(nextRow1)
+        xGrid.value.setSelectCell(nextRow1, column.field)
+        break;
+
+    }
+
+
+
+    /*if (nextRowIndex < xGrid.value.getTableData().fullData.length) {
       xGrid.value.setCurrentRow(xGrid.value.getTableData().fullData[nextRowIndex]);
     }
     if(rowIndex === length-1){
       xGrid.value.insertAt({}, xGrid.value.getTableData.length || -1)
-    }
+    }*/
 
   }
   if(evnt.$event.keyCode === 38 ){

--
Gitblit v1.8.0