ch
2021-08-16 7b156987df2fba8f47e38b89de4a23c35c913cf4
WebTM/views/PublicPage/CustomerInformation.html
@@ -87,7 +87,8 @@
                , laydate = layui.laydate
                , util = layui.util
                , tree = layui.tree
            var sWhere = " where HStopFlag=0  and HUSEORGID = " + sessionStorage["OrganizationID"]+" ";
            var sWhere = " where HStopFlag=0 and HEndFlag<>'1' and HUSEORGID = " + sessionStorage["OrganizationID"] + " "; //树型
            var sWhere1 = " where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + sessionStorage["OrganizationID"] + " ";  //列表
            tree.render({
                elem: '#treeCustomer',
@@ -157,7 +158,7 @@
            $.ajax({
                url: GetWEBURL() + '/PublicPageMethod/CustomerList',
                type: "GET",
                data: { "sWhere": SeachFilter(sWhere) },
                data: { "sWhere": SeachFilter(sWhere1) },
                success: function (data1) {
                    if (data1.count == 1) {
                        option.data = data1.data;
@@ -179,7 +180,7 @@
                $.ajax({
                    url: GetWEBURL() + '/PublicPageMethod/CustomerList',
                    type: "GET",
                    data: { "sWhere": SeachFilter(sWhere) },
                    data: { "sWhere": SeachFilter(sWhere1) },
                    success: function (data1) {
                        if (data1.count == 1) {
                            option.data = data1.data;
@@ -192,7 +193,7 @@
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                sWhere = "";//调用接口后清空sWhere缓存
                sWhere1 = "";//调用接口后清空sWhere缓存
            });
            //以上是layui模块
@@ -205,7 +206,7 @@
            $.ajax({
                url: GetWEBURL() + '/Gy_MaintenanceMode/CustomerLoadTree',
                type: "GET",
                data: { "sWhere": SeachFilter(sWhere) },
                data: { "sWhere": sWhere },
                async: false,
                success: function (result) {
                    var data = result.data;
@@ -236,16 +237,16 @@
            return treeData;
        }
        function SeachFilter(sWhere) {
        function SeachFilter(sWhere1) {
            var HNumber = $("#HNumber").val();
            var HName = $("#HName").val();
            if (HNumber) {
                sWhere += " and HNumber like '%" + HNumber + "%'";
                sWhere1 += " and HNumber like '%" + HNumber + "%'";
            }
            if (HName) {
                sWhere += " and HName like '%" + HName + "%'";
                sWhere1 += " and HName like '%" + HName + "%'";
            }
            return sWhere;
            return sWhere1;
        }
    </script>