From 7fb0a8f0ab16c149484bf043754cd10cfa94de2f Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期一, 19 一月 2026 14:48:05 +0800
Subject: [PATCH] 增加了业务员,保管员和验收员的对应的显示

---
 src/views/basic/gyEmployee/gyEmployee.vue |  116 +++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 79 insertions(+), 37 deletions(-)

diff --git a/src/views/basic/gyEmployee/gyEmployee.vue b/src/views/basic/gyEmployee/gyEmployee.vue
index 219f4ed..5329a60 100644
--- a/src/views/basic/gyEmployee/gyEmployee.vue
+++ b/src/views/basic/gyEmployee/gyEmployee.vue
@@ -1,5 +1,5 @@
 <template>
-  <div style="padding: 10px">
+  <div style="padding: 10px; position: relative">
     <el-form
       :model="queryParams"
       ref="queryForm"
@@ -32,7 +32,7 @@
           >
             <el-option
               v-for="(item, index) in organizationList"
-              :key="item.ID"
+              :key="index"
               :label="item.Name"
               :value="item.ID.toString()"
             >
@@ -299,12 +299,12 @@
           >闅愯棌鍒楄缃�</el-button
         >
       </el-col>
-      <el-col :span="1.5">
+      <el-col :span="1.5" class="zy-hidden">
         <el-button type="primary" icon="el-icon-help" size="mini" @click="handleSearch"
           >鎼� 绱�</el-button
         >
       </el-col>
-      <el-col :span="1.5">
+      <el-col :span="1.5" class="zy-hidden">
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
           >閲� 缃�</el-button
         >
@@ -353,9 +353,9 @@
                 }}</span>
                 <el-button
                   type="text"
-                  @click="handleEdit(row, (OperationType = 3))"
-                  v-else-if="column.property == '鍗曟嵁鍙�'"
-                  >{{ row.鍗曟嵁鍙� }}</el-button
+                  @click.stop="handleEdit(row, (OperationType = 3))"
+                  v-else-if="column.property == '鑱屽憳浠g爜'"
+                  >{{ row.鑱屽憳浠g爜 }}</el-button
                 >
                 <span v-else>{{ row[column.label] }}</span>
               </div>
@@ -499,10 +499,9 @@
 import RowSettings from "@/views/component/rowSettings";
 import Edit from "@/views/basic/gyEmployee/gyEmployeeEdit";
 import gySource from "@/views/basic/gySource";
-import { env } from "echarts";
 
 export default {
-  name: "GySource",
+  name: "GyEmployee",
   components: { RowSettings, Edit, gySource },
   props: {
     openPage: { type: String },
@@ -510,7 +509,7 @@
   data() {
     return {
       activeSeach: "",
-      HModName: "Gy_Source",
+      HModName: "Gy_EmployeeList",
       editShow: false,
       openEdit: false,
       totalNameList: [],
@@ -518,7 +517,7 @@
       openPrintList: false,
       printListShow: false,
       HClassTag: "ForFilteringSchemes", //杩囨护鏉′欢鐨刢lass绫�
-      HBillType: "1205",
+      HBillType: "Gy_EmployeeList",
       openBtnHide: false,
       btnHideShow: false,
       rowHideShow: false,
@@ -563,11 +562,11 @@
       openData: false, //鏁版嵁寮圭獥
       dialogTitle: "",
       zuzhiId: "",
-      organizationList: JSON.parse(sessionStorage.getItem("organizationList")), //缁勭粐鍒楄〃
+      organizationList: JSON.parse(sessionStorage["organizationList"]), //缁勭粐鍒楄〃
       subDisabled: false, //缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
       OperationType: null, //淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
       HInterID: null,
-      baseURL: process.env.VUE_APP_BASE_API || "http://47.96.97.237/API/",
+      baseURL: process.env.VUE_APP_BASE_API,
       user: "admin",
       currentRow: [],
       lastSelectedRowIndex: null, // 鐢ㄤ簬璁板綍涓婃鐐瑰嚮鐨勮绱㈠紩
@@ -650,6 +649,7 @@
     };
   },
   created() {
+    // this.fetchData();
     this.handleQuery();
     this.riqiChange();
   },
@@ -685,7 +685,7 @@
     defaintOperationByCompanyName() {
       var result = false;
       axios
-        .get(this.baseURL + "/Xt_getInfo/getCompanyName")
+        .get(this.$baseUrl + "/Xt_getInfo/getCompanyName")
         .then((response) => {
           var data1 = response.data;
           if (data1.count == 1) {
@@ -778,18 +778,21 @@
       }
       // this.queryParams.HOrgID = 100038
       this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'";
+      let OrgName =
+        this.organizationList.find((e) => e.ID == this.queryParams.HOrgID)?.Name || "";
       //鐢熶骇璧勬枡鍒楄〃
       axios
-        .get(this.baseURL + "/Gy_Employee/listPage", {
+        .get(this.$baseUrl + "/Gy_Employee/listPage", {
           params: {
             sWhere: this.sWhere,
-            user: this.user,
-            Organization: "娴欐睙鏅轰簯杩堟��",
+            user: sessionStorage["HUserName"],
+            Organization: OrgName,
             page: this.page,
             size: this.pageSize,
           },
         })
         .then((response) => {
+          console.log(response.data.data);
           this.tyResList = response.data.data; //鎬绘暟鎹�
           let data1 = response.data;
           let option = [];
@@ -873,7 +876,12 @@
               }
             }
             option.data = result;
-            this.DisPlay_HideColumn(this.HModName, this.user, option, this.dataList);
+            this.DisPlay_HideColumn(
+              this.HModName,
+              sessionStorage["HUserName"],
+              option,
+              this.dataList
+            );
           }
         })
         .catch((error) => {
@@ -883,7 +891,7 @@
     DisPlay_HideColumn(HModName, user, option, dataOption) {
       this.totalNameList = [];
       axios
-        .get(this.baseURL + "/Xt_grdAlignment_WMES/grdAlignmentWMESList", {
+        .get(this.$baseUrl + "/Xt_grdAlignment_WMES/grdAlignmentWMESList", {
           params: {
             HModName: HModName,
             user: user,
@@ -1031,6 +1039,9 @@
       this.selectedRow = row; // 璁板綍褰撳墠閫変腑鐨勮
       this.lastSelectedRowIndex = this.tableData.indexOf(row);
       this.$refs.tableData.toggleRowSelection(row);
+      if (this.openPage) {
+        this.$emit("deptEmit", row, 4);
+      }
     },
     //閫変腑琛岄珮浜牱寮�
     rowStyle({ row, rowIndex }) {
@@ -1041,16 +1052,32 @@
     //鍙屽嚮琛�
     handleDblclick(row, column, cell, event) {
       this.OperationType = 3;
-      this.handleEdit();
+      if (this.openPage) {
+        this.$emit("deptEmitDb", row, 4);
+      } else {
+        this.handleEdit(row);
+      }
     },
     // 澶氶�夋閫変腑鏁版嵁
     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];
+        }
       }
     },
     //鎵撳紑渚ц竟鎼滅储寮圭獥
@@ -1131,10 +1158,10 @@
         this.sWhere += " and " + this.queryParams.ColName2 + " " + com2;
       }
       if (this.queryParams.HNumber) {
-        this.sWhere += " and 鑱屽憳浠g爜 like '%" + this.queryParams.HNumber + "%'";
+        this.sWhere += " and 鐢熶骇璧勬簮浠g爜 like '%" + this.queryParams.HNumber + "%'";
       }
       if (this.queryParams.HName) {
-        this.sWhere += " and 鑱屽憳鍚嶇О like '%" + this.queryParams.HName + "%'";
+        this.sWhere += " and 鐢熶骇璧勬簮鍚嶇О like '%" + this.queryParams.HName + "%'";
       }
       if (this.queryParams.HOrgID) {
         this.sWhere += " and HUSEORGID = '" + this.queryParams.HOrgID + "'";
@@ -1159,10 +1186,10 @@
     getOrgIDByUser() {
       var res = "";
       axios
-        .get(this.baseURL + "/Xt_User/getOrgIDListByUser", {
+        .get(this.$baseUrl + "/Xt_User/getOrgIDListByUser", {
           params: {
             HModName: this.HModName,
-            user: this.user,
+            user: sessionStorage["HUserName"],
             HOrgID: this.zuzhiId,
           },
         })
@@ -1223,7 +1250,8 @@
       });
     },
     //鎵撳紑淇敼缁勪欢寮圭獥
-    handleEdit() {
+    handleEdit(row) {
+      this.rowForm = row
       this.$nextTick(() => {
         this.openEdit = true;
         this.editShow = true;
@@ -1242,8 +1270,11 @@
         .then(() => {
           if (!this.rowForm.瀹℃牳浜�) {
             axios
-              .get(this.baseURL + "DeltetGy_Employee", {
-                params: { HItemID: this.rowForm.HItemID.toString(), user: this.user },
+              .get(this.$baseUrl + "DeltetGy_Employee", {
+                params: {
+                  HItemID: this.rowForm.HItemID.toString(),
+                  user: sessionStorage["HUserName"],
+                },
               })
               .then((response) => {
                 if (response.data.count == 1) {
@@ -1267,8 +1298,12 @@
       var InterID = form.HItemID || form.HInterID;
       //閫昏緫瀹℃牳鏂规硶
       axios
-        .get(this.baseURL + "/Gy_Employee/AuditGy_Employee", {
-          params: { HInterID: InterID, IsAudit: num, CurUserName: this.user },
+        .get(this.$baseUrl + "/Gy_Employee/AuditGy_Employee", {
+          params: {
+            HInterID: InterID,
+            IsAudit: num,
+            CurUserName: sessionStorage["HUserName"],
+          },
         })
         .then((response) => {
           let result = response.data;
@@ -1288,8 +1323,12 @@
       var InterID = form.HItemID || form.HInterID;
       //閫昏緫瀹℃牳鏂规硶
       axios
-        .get(this.baseURL + "/Gy_Employee/StopGy_Employee", {
-          params: { HInterID: InterID, IsStop: num, CurUserName: this.user },
+        .get(this.$baseUrl + "/Gy_Employee/StopGy_Employee", {
+          params: {
+            HInterID: InterID,
+            IsStop: num,
+            CurUserName: sessionStorage["HUserName"],
+          },
         })
         .then((response) => {
           let result = response.data;
@@ -1355,10 +1394,10 @@
         }
       }
       var sSubStr = JSON.stringify(num);
-      var sMainSub = sSubStr + "&鍜�" + this.user;
+      var sMainSub = sSubStr + "&鍜�" + sessionStorage["HUserName"];
       axios({
         method: "post",
-        url: this.baseURL + "/Gy_Source/Gy_Source_btnSave",
+        url: this.$baseUrl + "/Gy_Source/Gy_Source_btnSave",
         data: {
           sMainSub: sMainSub,
         },
@@ -1413,4 +1452,7 @@
 .xsckdBox .el-date-editor.el-input {
   width: 100%;
 }
+.zy-hidden {
+  display: none;
+}
 </style>

--
Gitblit v1.9.1