chenlu
2024-08-27 5df5dba2a321098fd0fc7e18b71549f5c2312049
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"
      >
        <!--      下拉显示所有信息插槽-->