From f402c987bc16611c2d70561352730db8b01eb76b Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 11 八月 2025 11:52:07 +0800
Subject: [PATCH] 出站汇报单添加部门过滤

---
 WebTM/views/基础资料/公用基础资料/Gy_DepartmentList.html      |    2 +-
 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBillList.html |   30 +++++++++++++++++++++++++++++-
 2 files changed, 30 insertions(+), 2 deletions(-)

diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DepartmentList.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DepartmentList.html"
index fa66c844..1f287b8 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DepartmentList.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DepartmentList.html"
@@ -615,7 +615,7 @@
                 $("#ColName1").val("0");
                 $("#Comparator1").val("0");
                 form.render('select');
-                sWhere = "and HUSEORGID=" + sessionStorage["OrganizationID"];
+                //sWhere = "and HUSEORGID=" + sessionStorage["OrganizationID"];
                 $("#btnSearch").click();
             }
             //#endregion
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html"
index 2ffd82e..b1ad371 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html"
@@ -2225,7 +2225,7 @@
                 sWhere += "  and HBillSubType<>''SUB''";            
 
                 sWhere += getOrgIDByUser();//鐢ㄦ埛鍏宠仈缁勭粐鏌ヨ杩囨护     
-
+                sWhere += getDeptIDByUser();//鐢ㄦ埛鍏宠仈閮ㄩ棬杩囨护
                 get_DisplayPage(sWhere);
 
                 sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
@@ -2774,6 +2774,34 @@
             }
             //#endregion
 
+            //#region 鏍规嵁鐢ㄦ埛鑾峰彇鐢ㄦ埛鍏宠仈閮ㄩ棬鐨勮繃婊ゆ潯浠�
+            function getDeptIDByUser() {
+                var res = "";
+                $.ajax({
+                    type: "GET",
+                    async: false,
+                    url: GetWEBURL() + "/Xt_User/UserDeptlistPlaylist", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "HUserID": sessionStorage["Czybm"]},
+                    success: function (result) {
+                        if (result.count == 1) {
+                            if (result.data.length > 0) {
+                                for (let item of result.data) {
+                                    res += item.HItemID.toString() + ","
+                                }
+                                res = res.slice(0, -1);
+                                res = ` and HDeptID in (${res})`
+                            }
+                            
+                        }
+                    }, error: function (err) {
+                        res = " and 1 = 0";
+                        layer.alert(get_MessageError("[0000-1-002]鎺ュ彛璇锋眰澶辫触!", sessionStorage["HTranSlate"]), { icon: 5 });
+                    }
+                });
+                return res;
+            }
+            //#endregion
+
             //鍒楁槑鏄剧ず涓嬫媺妗�
             function ColFilter() {
                 var Organization = '<option  value="0" selected="selected" ></option>';

--
Gitblit v1.9.1