| | |
| | | } |
| | | if ($(this).val() == "15") { |
| | | |
| | | $("#trShoukuandanwei").css("display", "table-row"); |
| | | $(".trShoukuandanwei").css("display", "table-row"); |
| | | } else { |
| | | |
| | | $("#trShoukuandanwei").css("display", "none"); |
| | | $(".trShoukuandanwei").css("display", "none"); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | if ($("#selPlanDataType").val() == "15") { |
| | | |
| | | $("#trShoukuandanwei").css("display", "table-row"); |
| | | $(".trShoukuandanwei").css("display", "table-row"); |
| | | } else { |
| | | |
| | | $("#trShoukuandanwei").css("display", "none"); |
| | | $(".trShoukuandanwei").css("display", "none"); |
| | | } |
| | | |
| | | SelectAddSearch(); |
| | | }); |
| | | |
| | | |
| | | function custormerChange(sel) { |
| | | // var selectedValue = $('#selectId').val(); |
| | | var selectedText = $('#selSuppliers option:selected').text(); |
| | | $("#txtShoukuandanwei").val(selectedText); |
| | | } |
| | | |
| | | //为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> |
| | | </head> |
| | | <body> |
| | |
| | | <select id="selPlanTitle" runat="server" keepdefaultstyle="true" style=" width:100px;"></select> |
| | | </td> |
| | | </tr> |
| | | <tr id="trShoukuandanwei" style=" display:none;"> |
| | | <tr class="trShoukuandanwei" style=" display:none;"> |
| | | <td class="ali03"> |
| | | 收款单位: |
| | | </td> |
| | |
| | | <input id="txtShoukuandanwei" type="text" style=" width:400px;" class="" runat="server" msg="请输入收款单位" maxlength="50" /> |
| | | </td> |
| | | </tr> |
| | | <tr class="trShoukuandanwei" style=" display:none;"> |
| | | <td class="ali03">选择供应商:</td> |
| | | <td colspan="3"> <select keepdefaultstyle='true' id='selSuppliers' runat="server" datatextfield='Name' datavaluefield='Keyid' onchange='custormerChange(this)' class='Sreq' sign="" selinputhtml="True" style=" width:183px;" > |
| | | </select></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="ali03"> |
| | | 请示内容: |