陈婷婷
2025-11-24 ff3e3dcb4b1a85bbf530c017fe3add8c0c2d5fa7
src/views/basic/gy/gySupplier.vue
@@ -1,5 +1,5 @@
<template>
  <div style="padding: 10px;">
  <div style="padding: 10px; position: relative;">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="98px" class="searchBox">
      <el-row>
        <el-form-item label="供应商代码" prop="HNumber" style="margin-left: 100px;">
@@ -239,7 +239,7 @@
  },
  data() {
    return {
      treeSql:'',
      treeSql: '',
      HSupClsName: 0,
      //树结构
      treeOptions: undefined,
@@ -409,9 +409,7 @@
        let data1 = response.data
        if (data1.count == 1) {
          this.treeOptions = JSON.parse(data1.data);
          console.log(this.treeOptions)
        }
      }).catch(error => {
        this.$modal.msgError("接口请求失败!");
      });
@@ -445,7 +443,6 @@
        this.pageSize = 50
      }
      // this.sWhere += " and HUSEORGID = '" + this.queryParams.HUSEORGID + "'"
      console.log(this.sWhere)
      //生产资料列表
      axios.get(this.baseURL + '/Gy_Supplier/page', {
        params: {
@@ -488,8 +485,7 @@
          var result = data1.data;
          option.data = result;
          this.DisPlay_HideColumn(this.HModName, sessionStorage["HUserName"], option, this.dataList);
        }else{
          console.log(response)
        } else {
          this.$modal.msgError("接口请求失败!");
        }
      }).catch(error => {
@@ -639,6 +635,9 @@
      this.selectedRow = row; // 记录当前选中的行
      this.lastSelectedRowIndex = this.tableData.indexOf(row);
      this.$refs.tableData.toggleRowSelection(row);
        if (this.openPage) {
        this.$emit('deptEmit', row, 6)
      }
    },
    //选中行高亮样式
    rowStyle({ row, rowIndex }) {
@@ -649,16 +648,32 @@
    //双击行
    handleDblclick(row, column, cell, event) {
      this.OperationType = 3
      this.handleEdit()
      if (this.openPage) {
        this.$emit('deptEmitDb', row, 6)
      }
      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]
        }
      }
    },
    /** 搜索按钮操作 */
@@ -666,9 +681,7 @@
      this.sWhere = ''
      if (this.treeSql) {
        this.sWhere += this.treeSql
        console.log(this.sWhere)
      }
      if (this.queryParams.ColName && this.queryParams.Comparator) {
        var com = "";
        switch (this.queryParams.Comparator) {
@@ -965,7 +978,6 @@
      let sindex = (parseInt(page) - 1) * this.uploadPageSize
      let eindex = parseInt(page) * this.uploadPageSize
      let newList = list.slice(sindex, eindex)
      console.log(newList)
      return newList
    },
    currentPage(val) {