From bdebbc1c44f33dead8e87a671542355c354be686 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期四, 13 十一月 2025 08:24:30 +0800
Subject: [PATCH] 修复 组织取不到的问题

---
 src/views/basic/gyEmployee/gyEmployee.vue |   42 ++++++++----------------------------------
 1 files changed, 8 insertions(+), 34 deletions(-)

diff --git a/src/views/basic/gyEmployee/gyEmployee.vue b/src/views/basic/gyEmployee/gyEmployee.vue
index 6001849..219f4ed 100644
--- a/src/views/basic/gyEmployee/gyEmployee.vue
+++ b/src/views/basic/gyEmployee/gyEmployee.vue
@@ -32,9 +32,9 @@
           >
             <el-option
               v-for="(item, index) in organizationList"
-              :key="index"
+              :key="item.ID"
               :label="item.Name"
-              :value="item.ID"
+              :value="item.ID.toString()"
             >
             </el-option>
           </el-select>
@@ -509,6 +509,7 @@
   },
   data() {
     return {
+      activeSeach: "",
       HModName: "Gy_Source",
       editShow: false,
       openEdit: false,
@@ -562,7 +563,7 @@
       openData: false, //鏁版嵁寮圭獥
       dialogTitle: "",
       zuzhiId: "",
-      organizationList: [], //缁勭粐鍒楄〃
+      organizationList: JSON.parse(sessionStorage.getItem("organizationList")), //缁勭粐鍒楄〃
       subDisabled: false, //缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
       OperationType: null, //淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
       HInterID: null,
@@ -586,7 +587,7 @@
       dateRange: [],
       // 鏌ヨ鍙傛暟
       queryParams: {
-        HOrgID: null,
+        HOrgID: sessionStorage["OrganizationID"],
         HName: null,
         HNumber: null,
         Comparator1: "",
@@ -649,7 +650,7 @@
     };
   },
   created() {
-    this.fetchData();
+    this.handleQuery();
     this.riqiChange();
   },
   methods: {
@@ -768,33 +769,6 @@
     deptClickSub() {
       this.dbEmitData(this.deptform, this.dialogTypeNum);
       this.deptform = {};
-    },
-    fetchData() {
-      //鐧诲綍鐢ㄦ埛淇℃伅
-      axios
-        .get(
-          "http://47.96.97.237/API/Web/GetUser?UserName=001&PassWord=123456&HOrgName=100038"
-        )
-        .then((response) => {
-          let data = response.data.data[0];
-          this.zuzhiId = data.HUSEORGID; //鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇榛樿鐨勭粍缁嘔D
-          this.queryParams.HOrgID = data.HUSEORGID;
-          this.user = data.Czymc;
-          axios
-            .get(this.baseURL + "/Web/GetOrganizations", {})
-            .then((response) => {
-              if (response.data.count == 1) {
-                this.organizationList = response.data.data; //缁勭粐鍒楄〃
-              }
-              this.getList();
-            })
-            .catch((error) => {
-              this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
-            });
-        })
-        .catch((error) => {
-          this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
-        });
     },
     getList() {
       this.tableShow = false;
@@ -1157,10 +1131,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 + "'";

--
Gitblit v1.9.1