guoyuji
2025-01-13 59fad25b73cb3a8666afff34b075018722a69136
提交订单回车事件程序相关代码
3个文件已修改
52 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/ReportingWork.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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,51 @@
  }
  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) {
          const nextRow = xGrid.value.getTableData().fullData[nextRowIndex]
          xGrid.value.setCurrentRow(nextRow)
          xGrid.value.scrollToRow(nextRow)
          xGrid.value.setSelectCell(nextRow, column.field)
        }*/
        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 ){
north-glass-erp/src/main/java/com/example/erp/entity/pp/ReportingWork.java
@@ -3,14 +3,12 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.example.erp.entity.sd.DeliveryDetail;
import com.example.erp.entity.sd.Order;
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.entity.sd.OrderGlassDetail;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Data
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -244,6 +244,10 @@
        } else {
            reportingWork.setReviewedState(0);
        }
        if(reportingWork.getReportingWorkTime()==null){
            LocalDateTime localDateTime = LocalDateTime.now();
            reportingWork.setReportingWorkTime(localDateTime);
        }
        reportingWork.setNextProcess(orderProcessDetailMapper.selectNextProcess(processIdStr[0],processIdStr[1],reportingWork.getThisProcess()));
        //主表插入