From ff3e3dcb4b1a85bbf530c017fe3add8c0c2d5fa7 Mon Sep 17 00:00:00 2001
From: 陈婷婷 <506607603@qq.com>
Date: 星期一, 24 十一月 2025 08:41:44 +0800
Subject: [PATCH] 容器主档编辑

---
 src/views/basic/gy/gySupplier.vue |   42 +++++++++++++++++++++++++++---------------
 1 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/src/views/basic/gy/gySupplier.vue b/src/views/basic/gy/gySupplier.vue
index 448b439..42a4349 100644
--- a/src/views/basic/gy/gySupplier.vue
+++ b/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) {

--
Gitblit v1.9.1