1
llj
2025-10-13 37bc2f61b80b2f310e5f16cc202a61676e730f53
WebTM/views/»ù´¡×ÊÁÏ/Éú²ú»ù´¡×ÊÁÏ/Gy_Source.html
@@ -472,7 +472,11 @@
                                else if ($.inArray(data[i].name, totalArray) > -1) { //计算列  
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, totalRow: true, width: 120 });
                                } else if (data[i].name == '生产资源代码') {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: false, width: 200, event: '生产资源代码' });
                                    col.push({
                                        field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '生产资源代码', templet: function (d) {
                                            return '<span style="color: blue;">' + d.生产资源代码 + '</span>'
                                        }, style: 'cursor: pointer;'
                                    });
                                } else {
                                    switch (data[i].Type) {
                                        //int
@@ -684,29 +688,33 @@
                    sWhere += " and " + ColName2 + " " + com2;
                }
       
                if (number == 1) {
                    HOrgID = sessionStorage["OrganizationID"];
                }
                else {
                    HOrgID = $("#HOrgID").val();//组织
                }
                //if (number == 1) {
                //    HOrgID = sessionStorage["OrganizationID"];
                //}
                //else {
                //    HOrgID = $("#HOrgID").val();//组织
                //}
                if (HOrgID) {
                    sWhere += " and HUSEORGID = '" + HOrgID + "'";
                }
                //if (HOrgID) {
                //    sWhere += " and HUSEORGID = '" + HOrgID + "'";
                //}
                if (Htype != "") {
                    Htype = decodeURI(Htype);
                    sWhere += " and ç±»åž‹ = '" + Htype + "'";
                    //sWhere += " and ç±»åž‹ = '" + Htype + "'";
                }
                if (HNumber) {
                    sWhere += " and ç”Ÿäº§èµ„源代码 like '%" + HNumber + "%'";
                }
                if (HName) {
                    sWhere += " and ç”Ÿäº§èµ„源名称 like '%" + HName + "%'";
                }
                    sWhere += " and ç”Ÿäº§èµ„源名称 like '%" + HName + "%'";
                }
                sWhere += addSWhereByOpenType();
                sWhere += getOrgIDByUser();//用户关联组织查询过滤
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
@@ -979,11 +987,37 @@
                var params = get_UrlVars();
                var openType = params[params[1]]; //从参数中获取 æ‰“开方式  1直接打开 2其它页面通过选择按钮打开
                if ( openType == "2") {
                if (typeof (openType) != "undefined") {
                    sWhere += " and ç¦ç”¨æ ‡è®° != 'Y' and ISNULL(审核人,'')  != ''"
                    return sWhere;
                }
                return sWhere;
            }
            //#endregion
            //#region æ ¹æ®ç”¨æˆ·èŽ·å–ç”¨æˆ·å…³è”ç»„ç»‡çš„è¿‡æ»¤æ¡ä»¶
            function getOrgIDByUser() {
                var res = "";
                $.ajax({
                    type: "GET",
                    async: false,
                    url: GetWEBURL() + "/Xt_User/getOrgIDListByUser", //方法所在页面和方法名       ä¼ å‚ ç»„织必须是列表头部查询的组织  ä¸èƒ½ä½¿ç”¨ç”¨æˆ·é»˜è®¤
                    data: { "UserID": sessionStorage["Czybm"], "UserName": sessionStorage["HUserName"], HOrgID: $("#HOrgID").val() },
                    success: function (result) {
                        if (result.count == 1) {
                            if (result.data[0].sWhere == "1") {
                                res = " and HUSEORGID = '" + $("#HOrgID").val() + "'";
                            } else {
                                res = result.data[0].sWhere;
                            }
                        }
                    }, error: function (err) {
                        res = " and 1 = 0";
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                return res;
            }
            //#endregion
@@ -1056,6 +1090,7 @@
                            //隐藏显示过滤方案的标签信息
                            document.getElementById("HFilterScheme_Now").style.display = "none";
                            //执行查询方法
                            // get_FastQuery(1);
                            form.render("select");
                        }
                    }, error: function () {