From 33d3c3db53fced38ed7add044d095940c6588520 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 05 九月 2024 14:58:39 +0800
Subject: [PATCH] 销售订单、销售出库单:根据用户权限觉得是否显示指定列

---
 WebTM/views/销售管理/销售订单/Xs_SeOrderBillList.html          |   28 +++++++++
 WebTM/views/领料发货/销售出库/Kf_SellOutBill.html              |   35 +++++++++++
 WebTM/views/销售管理/销售订单/Add_Edit_Xs_SeOrderBillList.html |   35 +++++++++++
 WebTM/views/领料发货/销售出库/Kf_SellOutBillList.html          |   28 +++++++++
 4 files changed, 120 insertions(+), 6 deletions(-)

diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html"
index 693b785..011d802 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html"
@@ -458,6 +458,8 @@
             //瀛愯〃娓叉煋鍙傛暟
             window.option = {};
 
+            var titleData = ["HMaterID", "HUnitID", "鎶樻墸鐜�", "瀹為檯鍚◣鍗曚环", "绋庨", "鏈綅甯佷环绋庡悎璁�", "鍑哄簱鏁伴噺", "寮�绁ㄦ暟閲�", "HOrderLevID", "璁㈠崟绛夌骇浠g爜", "閿�鍞嚭搴撴暟閲�", "閿�鍞嚭搴撳鏍告暟閲�", "閿�鍞嚭搴撳鏍搁噾棰�", "鐢熶骇鏁伴噺", "閿�鍞��搴撴暟閲�", "閿�鍞��搴撳鏍告暟閲�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
             //璁板綍缁勭粐鐨勫��
             var HOrgIDBar = 0;
 
@@ -478,7 +480,8 @@
 
 
             //#region 杩涘叆椤甸潰鍗冲姞杞�
-
+            //妫�娴嬫槸鍚﹀叿澶囨煡鐪嬮噾棰濇潈闄愶紝璁剧疆闅愯棌鍒�
+            checkRight_Money();
             //#region 鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
             get_LoginIs();
 
@@ -3440,7 +3443,7 @@
                     success: function (data1) {
                         if (data1.data.length != 0) {
                             var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
-                            var titleData = ["HMaterID", "HUnitID", "鎶樻墸鐜�", "瀹為檯鍚◣鍗曚环", "绋庨", "鏈綅甯佷环绋庡悎璁�", "鍑哄簱鏁伴噺", "寮�绁ㄦ暟閲�", "HOrderLevID","璁㈠崟绛夌骇浠g爜","閿�鍞嚭搴撴暟閲�","閿�鍞嚭搴撳鏍告暟閲�","閿�鍞嚭搴撳鏍搁噾棰�","鐢熶骇鏁伴噺","閿�鍞��搴撴暟閲�","閿�鍞��搴撳鏍告暟閲�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+                            /*var titleData = ["HMaterID", "HUnitID", "鎶樻墸鐜�", "瀹為檯鍚◣鍗曚环", "绋庨", "鏈綅甯佷环绋庡悎璁�", "鍑哄簱鏁伴噺", "寮�绁ㄦ暟閲�", "HOrderLevID","璁㈠崟绛夌骇浠g爜","閿�鍞嚭搴撴暟閲�","閿�鍞嚭搴撳鏍告暟閲�","閿�鍞嚭搴撳鏍搁噾棰�","鐢熶骇鏁伴噺","閿�鍞��搴撴暟閲�","閿�鍞��搴撳鏍告暟閲�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/
                             //titleData = [];
 
                             dataCol = data1.data[0].HGridString.split(',');
@@ -3471,6 +3474,10 @@
                                 if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
                                     option.cols[0][i + 1]["hide"] = false;
                                 }
+                                if ($.inArray(option.cols[0][i + 1]["title"], titleData) > -1) {
+                                    option.cols[0][i + 1]["hide"] = true;
+                                }
+
                                 //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
                                 switch (dataCols[2]) {
                                     case "L":
@@ -3781,6 +3788,30 @@
                 form.render('select');
             }
             //#endregion
+
+            //#region 鏌ョ湅鏄惁鍏峰鏌ョ湅閲戦鏉冮檺锛岃缃噾棰濈瓑瀛楁鏄惁闇�瑕侀殣钘�
+            function checkRight_Money() {
+                $.ajax({
+                    type: "GET",
+                    async: false,
+                    url: GetWEBURL() + "/Xs_SeOrderBill/CheckRight_Money", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "user": sessionStorage["HUserName"] },
+                    success: function (result) {
+                        if (result.count == 1) {
+
+                        } else {
+                            var HideColumnList = ["鍓╀綑璁㈤噾", "鍗曚环", "绋庣巼%", "鍚◣鍗曚环", "閲戦", "浠风◣鍚堣"];
+                            for (var i = 0; i < HideColumnList.length; i++) {
+                                titleData.push(HideColumnList[i]);
+                            }
+                        }
+                    }, error: function (err) {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
             //#endregion
 
 
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Xs_SeOrderBillList.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Xs_SeOrderBillList.html"
index a82961c..35cba94 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Xs_SeOrderBillList.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Xs_SeOrderBillList.html"
@@ -290,6 +290,9 @@
             //#endregion
 
             //#region 鍔犺浇椤甸潰
+            //妫�娴嬫槸鍚﹀叿澶囨煡鐪嬮噾棰濇潈闄愶紝璁剧疆闅愯棌鍒�
+            checkRight_Money();
+
             //#region 鍒濆鍖栫晫闈�
             set_ClearBill();
             //#endregion
@@ -2076,7 +2079,7 @@
                         if (data1.data.length != 0) {
 
                             var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
-                            var titleData = ["hmainid", "HBillType", "HCusID", "HSSID", "HCurID", "HDeptID", "HManagerID", "HEmpID", "hsubid", "HMaterID","HUnitID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+                            //var titleData = ["hmainid", "HBillType", "HCusID", "HSSID", "HCurID", "HDeptID", "HManagerID", "HEmpID", "hsubid", "HMaterID","HUnitID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
 
                             dataCol = data1.data[0].HGridString.split(',');
 
@@ -2529,6 +2532,29 @@
             }
             //#endregion
 
+            //#region 鏌ョ湅鏄惁鍏峰鏌ョ湅閲戦鏉冮檺锛岃缃噾棰濈瓑瀛楁鏄惁闇�瑕侀殣钘�
+            function checkRight_Money() {
+                $.ajax({
+                    type: "GET",
+                    async: false,
+                    url: GetWEBURL() + "/Xs_SeOrderBill/CheckRight_Money", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "user": sessionStorage["HUserName"] },
+                    success: function (result) {
+                        if (result.count == 1) {
+
+                        } else {
+                            var HideColumnList = ["鍓╀綑璁㈤噾", "鍗曚环", "绋庣巼", "鍚◣鍗曚环", "閲戦", "浠风◣鍚堣"];
+                            for (var i = 0; i < HideColumnList.length; i++) {
+                                titleData.push(HideColumnList[i]);
+                            }
+                        }
+                    }, error: function (err) {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
             //#region 鑾峰彇鍙傛暟
             function getUrlVars() {
                 var vars = [], hash;
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html"
index 0b9ef94..62ef0cd 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html"
@@ -488,12 +488,16 @@
 
             //瀛愯〃娓叉煋鍙傛暟
             window.option = {};
+            var titleData = ["HMaterID", "HUnitID", "HWHID", "婊¤溅閲嶉噺", "绌鸿溅閲嶉噺", "鍥炶溅閲嶉噺", "鎴愭湰鍗曚环", "鎴愭湰閲戦", "閿�鍞崟浠�", "閿�鍞鍗曞唴鐮�", "閿�鍞鍗曞瓙鍐呯爜", "閿�鍞鍗曞彿", "婧愬崟鍐呯爜", "婧愬崟瀛愬唴鐮�", "婧愬崟鍙�", "婧愬崟绫诲瀷", "鍏宠仈鏁伴噺", "鍏宠仈閲戦", "HSPID", "浠撲綅", "HSPGroupID", "浠撲綅缁�", "HSCWHID", "璋冨嚭浠撳簱", "HSCSPID", "璋冨嚭浠撲綅", "鎵规", "閲囪喘璁㈠崟鍐呯爜", "閲囪喘璁㈠崟瀛愬唴鐮�", "閲囪喘璁㈠崟鍙�", "HPropertyID", "杈呭姪灞炴��", "HSecUnitID", "杈呭姪璁¢噺鍗曚綅", "鎹㈢畻鐜�", "鍙戝姩鏈哄彿", "鍦扮洏鍙�", "鍑哄巶璇�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
             //#endregion
 
 
             //#region 杩涘叆椤甸潰鍗冲姞杞�
 
             //#region 鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
+            //妫�娴嬫槸鍚﹀叿澶囨煡鐪嬮噾棰濇潈闄愶紝璁剧疆闅愯棌鍒�
+            checkRight_Money();
+
             get_LoginIs();
             //#endregion
 
@@ -2787,8 +2791,8 @@
                     success: function (data1) {
                         if (data1.data.length != 0) {
                             var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
-                            var titleData = ["HMaterID", "HUnitID", "HWHID", "婊¤溅閲嶉噺", "绌鸿溅閲嶉噺", "鍥炶溅閲嶉噺", "鎴愭湰鍗曚环", "鎴愭湰閲戦", "閿�鍞崟浠�", "閿�鍞鍗曞唴鐮�", "閿�鍞鍗曞瓙鍐呯爜", "閿�鍞鍗曞彿","婧愬崟鍐呯爜","婧愬崟瀛愬唴鐮�","婧愬崟鍙�","婧愬崟绫诲瀷","鍏宠仈鏁伴噺","鍏宠仈閲戦","HSPID","浠撲綅","HSPGroupID","浠撲綅缁�","HSCWHID","璋冨嚭浠撳簱","HSCSPID","璋冨嚭浠撲綅","鎵规","閲囪喘璁㈠崟鍐呯爜","閲囪喘璁㈠崟瀛愬唴鐮�","閲囪喘璁㈠崟鍙�","HPropertyID","杈呭姪灞炴��","HSecUnitID","杈呭姪璁¢噺鍗曚綅","鎹㈢畻鐜�","鍙戝姩鏈哄彿","鍦扮洏鍙�","鍑哄巶璇�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
-                            //titleData = [];
+                            //var titleData = ["HMaterID", "HUnitID", "HWHID", "婊¤溅閲嶉噺", "绌鸿溅閲嶉噺", "鍥炶溅閲嶉噺", "鎴愭湰鍗曚环", "鎴愭湰閲戦", "閿�鍞崟浠�", "閿�鍞鍗曞唴鐮�", "閿�鍞鍗曞瓙鍐呯爜", "閿�鍞鍗曞彿","婧愬崟鍐呯爜","婧愬崟瀛愬唴鐮�","婧愬崟鍙�","婧愬崟绫诲瀷","鍏宠仈鏁伴噺","鍏宠仈閲戦","HSPID","浠撲綅","HSPGroupID","浠撲綅缁�","HSCWHID","璋冨嚭浠撳簱","HSCSPID","璋冨嚭浠撲綅","鎵规","閲囪喘璁㈠崟鍐呯爜","閲囪喘璁㈠崟瀛愬唴鐮�","閲囪喘璁㈠崟鍙�","HPropertyID","杈呭姪灞炴��","HSecUnitID","杈呭姪璁¢噺鍗曚綅","鎹㈢畻鐜�","鍙戝姩鏈哄彿","鍦扮洏鍙�","鍑哄巶璇�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+                            ////titleData = [];
 
                             dataCol = data1.data[0].HGridString.split(',');
 
@@ -2821,6 +2825,10 @@
                                 if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
                                     option.cols[0][i + 1]["hide"] = false;
                                 }
+                                if ($.inArray(option.cols[0][i + 1]["title"], titleData) > -1) {
+                                    option.cols[0][i + 1]["hide"] = true;
+                                }
+
                                 //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
                                 switch (dataCols[2]) {
                                     case "L":
@@ -3317,6 +3325,29 @@
                 });
             }
             //#endregion
+
+            //#region 鏌ョ湅鏄惁鍏峰鏌ョ湅閲戦鏉冮檺锛岃缃噾棰濈瓑瀛楁鏄惁闇�瑕侀殣钘�
+            function checkRight_Money() {
+                $.ajax({
+                    type: "GET",
+                    async: false,
+                    url: GetWEBURL() + "/Kf_SellOutBill/CheckRight_Money", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "user": sessionStorage["HUserName"] },
+                    success: function (result) {
+                        if (result.count == 1) {
+
+                        } else {
+                            var HideColumnList = ["鍓╀綑璁㈤噾", "鍗曚环", "绋庣巼", "鍚◣鍗曚环", "閲戦", "浠风◣鍚堣"];
+                            for (var i = 0; i < HideColumnList.length; i++) {
+                                titleData.push(HideColumnList[i]);
+                            }
+                        }
+                    }, error: function (err) {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
             //#endregion
 
 
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBillList.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBillList.html"
index 5161844..e6b7191 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBillList.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBillList.html"
@@ -264,6 +264,9 @@
             //#endregion
 
             //#region 鍔犺浇椤甸潰
+            //妫�娴嬫槸鍚﹀叿澶囨煡鐪嬮噾棰濇潈闄愶紝璁剧疆闅愯棌鍒�
+            checkRight_Money();
+
             set_ClearBill();
             //#endregion
 
@@ -1547,7 +1550,7 @@
                         if (data1.data.length != 0) {
 
                             var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
-                            var titleData = ["hmainid", "hsupid", "HEmpID", "hmanagerid", "hsecmanagerid", "鍙戣揣浜�", "hkeeperid", "淇濈鍛�", "HDeptID", "閿�鍞柟寮�", "hsubid", "hmaterid","hunitid", "HWHID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+                            //var titleData = ["hmainid", "hsupid", "HEmpID", "hmanagerid", "hsecmanagerid", "鍙戣揣浜�", "hkeeperid", "淇濈鍛�", "HDeptID", "閿�鍞柟寮�", "hsubid", "hmaterid","hunitid", "HWHID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
 
                             dataCol = data1.data[0].HGridString.split(',');
 
@@ -1673,6 +1676,29 @@
             }
             //#endregion
 
+            //#region 鏌ョ湅鏄惁鍏峰鏌ョ湅閲戦鏉冮檺锛岃缃噾棰濈瓑瀛楁鏄惁闇�瑕侀殣钘�
+            function checkRight_Money() {
+                $.ajax({
+                    type: "GET",
+                    async: false,
+                    url: GetWEBURL() + "/Kf_SellOutBill/CheckRight_Money", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "user": sessionStorage["HUserName"] },
+                    success: function (result) {
+                        if (result.count == 1) {
+
+                        } else {
+                            var HideColumnList = ["鍓╀綑璁㈤噾", "鍗曚环", "绋庣巼", "鍚◣鍗曚环", "閲戦", "浠风◣鍚堣"];
+                            for (var i = 0; i < HideColumnList.length; i++) {
+                                titleData.push(HideColumnList[i]);
+                            }
+                        }
+                    }, error: function (err) {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
             //#region 鑾峰彇鍙傛暟
             function getUrlVars() {
                 var vars = [], hash;

--
Gitblit v1.9.1