username@email.com
2 天以前 1280aa7ceaeffcdcd52e3c0fd45c86f608f9f0cf
20250804 供应商,新增采购,过滤供应商
2个文件已修改
95 ■■■■■ 已修改文件
CY_ECommercePlatform/CY.WebForm/Pages/procurement/ProcurementADD.aspx 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CY_ECommercePlatform/CY.WebForm/Pages/procurement/ProcurementEdit.aspx 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CY_ECommercePlatform/CY.WebForm/Pages/procurement/ProcurementADD.aspx
@@ -14,7 +14,7 @@
                供应商:
            </td>
            <td>
                <select id="selSuppliers" runat="server" class=" w120px" datatextfield="Name" keepdefaultstyle="true" datavaluefield="Keyid" msg="请选择供应商">
                <select id="selSuppliers" runat="server" class=" w120px" datatextfield="Name" keepdefaultstyle="true" datavaluefield="Keyid" msg="请选择供应商"  selinputhtml="True" >
                </select>
            </td>
            <td class="ali03  w100px">
@@ -115,7 +115,10 @@
                $(this).html($(this).html().replace(/[.]/g, "&nbsp;&nbsp;"));
            });
            GetAllPrice();
            SelectAddSearch();
            $("#txtPrice").blur(function () {
                GetAllPrice();
@@ -185,6 +188,49 @@
                }
            }
        });
        //为Select新增过滤功能
        function SelectAddSearch() {
            $("select[SelInputHtml='True']").each(function (i, v) {
                $(this).unbind("blur");
                var old = $(this).html();
                var oldObject = $(this).clone();
                var sign = "selectS" + i;
                $(v).attr("sign", sign);
                var inputClass = "input_" + sign;
                var html = "<span style='margin-left:10px'>过滤:</span><input type='text' class='" + inputClass + "' style='width:80px;height:18px;line-height:18px;'/>";//<span onclick='showCustomer()' style=\"padding-left:10px;\" class=\"a_under\">新增供应商</span>
                $(v).after(html);
                $("." + inputClass).blur(function () {
                    var nowval = $(this).val().trim();
                    var output = "";
                    if (nowval == "" || nowval == null) {
                        output = old;
                    } else {
                        output += "<option value=''>请选择</option>";
                        var valueArr = new Array();
                        oldObject.find("option").each(function (ii, vv) {
                            var value = $.trim($(vv).attr("value"));
                            var text = $.trim($(vv).text());
                            if (text.indexOf(nowval) >= 0)
                                valueArr.push(value + "|||" + text);
                        });
                        for (var ss in valueArr) {
                            var s = valueArr[ss];
                            if (s.split("|||").length == 2) {
                                var value1 = s.split("|||")[0];
                                var text1 = s.split("|||")[1];
                                output += "<option value='" + value1 + "'>" + text1 + "</option>";
                            }
                        }
                    }
                    $(v).html(output);
                });
            });
        }
    </script>
</body>
</html>
CY_ECommercePlatform/CY.WebForm/Pages/procurement/ProcurementEdit.aspx
@@ -21,7 +21,7 @@
                供应商:
            </td>
            <td>
                <select id="selSuppliers" runat="server" class="w160px" datatextfield="Name" keepdefaultstyle="true" datavaluefield="Keyid" msg="请选择供应商">
                <select id="selSuppliers" runat="server" class="w160px" datatextfield="Name" keepdefaultstyle="true" datavaluefield="Keyid" msg="请选择供应商"  selinputhtml="True" >
                </select>
            </td>
            
@@ -118,6 +118,8 @@
            GetAllPrice();
            SelectAddSearch();
            $("#txtPrice").blur(function () {
                GetAllPrice();
            });
@@ -186,6 +188,49 @@
                }
            }
        });
        //为Select新增过滤功能
        function SelectAddSearch() {
            $("select[SelInputHtml='True']").each(function (i, v) {
                $(this).unbind("blur");
                var old = $(this).html();
                var oldObject = $(this).clone();
                var sign = "selectS" + i;
                $(v).attr("sign", sign);
                var inputClass = "input_" + sign;
                var html = "<span style='margin-left:10px'>过滤:</span><input type='text' class='" + inputClass + "' style='width:80px;height:18px;line-height:18px;'/>";//<span onclick='showCustomer()' style=\"padding-left:10px;\" class=\"a_under\">新增供应商</span>
                $(v).after(html);
                $("." + inputClass).blur(function () {
                    var nowval = $(this).val().trim();
                    var output = "";
                    if (nowval == "" || nowval == null) {
                        output = old;
                    } else {
                        output += "<option value=''>请选择</option>";
                        var valueArr = new Array();
                        oldObject.find("option").each(function (ii, vv) {
                            var value = $.trim($(vv).attr("value"));
                            var text = $.trim($(vv).text());
                            if (text.indexOf(nowval) >= 0)
                                valueArr.push(value + "|||" + text);
                        });
                        for (var ss in valueArr) {
                            var s = valueArr[ss];
                            if (s.split("|||").length == 2) {
                                var value1 = s.split("|||")[0];
                                var text1 = s.split("|||")[1];
                                output += "<option value='" + value1 + "'>" + text1 + "</option>";
                            }
                        }
                    }
                    $(v).html(output);
                });
            });
        }
    </script>
</body>
</html>