chenlu
2024-08-27 5df5dba2a321098fd0fc7e18b71549f5c2312049
north-glass-erp/northglass-erp/src/components/sd/order/OrderDetail.vue
@@ -31,6 +31,15 @@
  customConfig: {
    storage: true
  },
  mouseConfig:{selected: true},//鼠标选中
  keyboardConfig:{
    isArrow: true,
    isDel: true,
    isEnter: true,
    isTab: true,
    isEdit: true,
    isChecked: true
  },
  columns:[
    {type: 'seq', title: t('basicData.Number'), width: 80 },
@@ -118,6 +127,24 @@
  })
}
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]);
    }
  }
  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]);
    }
  }
}
</script>
@@ -130,6 +157,7 @@
        class="mytable-scrollbar"
        ref="xGrid"
        v-bind="gridOptions"
        @keydown="handleKeyDown"
    >
      <template #num1_filter="{ column, $panel }">
        <div>