chenlu
2025-01-15 27b3352a6a7f514c98cce083eded6c3bb9e3f519
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 ){