chenhaozhe
2025-11-20 f8ddb1cdc0caafa8aa74a214fffa552aac1d04a7
src/views/basic/gyStockPlace/gyStockPlace.vue
@@ -1,5 +1,5 @@
<template>
  <div style="padding: 10px">
  <div style="padding: 10px;position: relative">
    <el-form
      :model="queryParams"
      ref="queryForm"
@@ -973,6 +973,9 @@
      this.selectedRow = row; // 记录当前选中的行
      this.lastSelectedRowIndex = this.tableData.indexOf(row);
      this.$refs.tableData.toggleRowSelection(row);
      if (this.openPage) {
        this.$emit("deptEmit", row, 9);
      }
    },
    //选中行高亮样式
    rowStyle({ row, rowIndex }) {
@@ -983,16 +986,32 @@
    //双击行
    handleDblclick(row, column, cell, event) {
      this.OperationType = 3;
      this.handleEdit();
      if (this.openPage) {
        this.$emit("deptEmitDb", row, 9);
      } else {
        this.handleEdit();
      }
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      // this.rowForm = {}
      this.ids = selection.map((item) => item.HItemID);
      this.single = selection.length != 1;
      this.multiple = !selection.length;
      if (!this.single) {
      if (this.openPage) {
        //列表单选
        if (selection.length > 1) {
          const del_row = selection.shift();
          this.$refs.tableData.toggleRowSelection(del_row, false); //设置这一行取消选中
        }
        this.rowForm = {};
        this.ids = selection.map((item) => item.HItemID);
        this.rowForm = selection[0];
      } else {
        //多选
        this.ids = selection.map((item) => item.HItemID);
        this.single = selection.length != 1;
        this.multiple = !selection.length;
        if (!this.single) {
          this.rowForm = selection[0];
        }
      }
    },
    //打开侧边搜索弹窗