/** layui-v2.4.3 MIT License By https://www.layui.com */ ; layui.define("layer", function (e) { "use strict"; var i = layui.$, t = layui.layer, a = layui.hint(), n = layui.device(), l = "form", r = ".layui-form", s = "layui-this", o = "layui-hide", c = "layui-disabled", u = function () { this.config = { verify: { required: [/[\S]+/, "必填项不能为空"], phone: [/^1\d{10}$/, "请输入正确的手机号"], email: [/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/, "邮箱格式不正确"], url: [/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/, "链接格式不正确"], number: function (e) { if (!e || isNaN(e)) return "只能填写数字" }, date: [/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/, "日期格式不正确"], identity: [/(^\d{15}$)|(^\d{17}(x|X|\d)$)/, "请输入正确的身份证号"] } } }; u.prototype.set = function (e) { var t = this; return i.extend(!0, t.config, e), t }, u.prototype.verify = function (e) { var t = this; return i.extend(!0, t.config.verify, e), t }, u.prototype.on = function (e, i) { return layui.onevent.call(this, l, e, i) }, u.prototype.val = function (e, t) { var a = i(r + '[lay-filter="' + e + '"]'); a.each(function (e, a) { var n = i(this); layui.each(t, function (e, i) { var t, a = n.find('[name="' + e + '"]'); a[0] && (t = a[0].type, "checkbox" === t ? a[0].checked = i : "radio" === t ? a.each(function () { this.value === i && (this.checked = !0) }) : a.val(i)) }) }), f.render(null, e) }, u.prototype.render = function (e, t) { var n = this, u = i(r + function () { return t ? '[lay-filter="' + t + '"]' : "" }()), d = { select: function () { var e, t = "请选择", a = "layui-form-select", n = "layui-select-title", r = "layui-select-none", d = "", f = u.find("select"), v = function (t, l) { i(t.target).parent().hasClass(n) && !l || (i("." + a).removeClass(a + "ed " + a + "up"), e && d && e.val(d)), e = null }, y = function (t, u, f) { var y, p = i(this), m = t.find("." + n), k = m.find("input"), x = t.find("dl"), g = x.children("dd"), b = this.selectedIndex; if (!u) { var C = function () { var e = t.offset().top + t.outerHeight() + 5 - h.scrollTop(), i = x.outerHeight(); b = p[0].selectedIndex, t.addClass(a + "ed"), g.removeClass(o), y = null, g.eq(b).addClass(s).siblings().removeClass(s), e + i > h.height() && e >= i && t.addClass(a + "up"), $() }, w = function (e) { t.removeClass(a + "ed " + a + "up"), k.blur(), y = null, e || T(k.val(), function (e) { e && (d = x.find("." + s).html(), k && k.val(d)) }) }, $ = function () { var e = x.children("dd." + s); if (e[0]) { var i = e.position().top, t = x.height(), a = e.height(); i > t && x.scrollTop(i + x.scrollTop() - t + a - 5), i < 0 && x.scrollTop(i + x.scrollTop() - 5) } }; m.on("click", function (e) { t.hasClass(a + "ed") ? w() : (v(e, !0), C()), x.find("." + r).remove() }), m.find(".layui-edge").on("click", function () { k.focus() }), k.on("keyup", function (e) { var i = e.keyCode; 9 === i && C() }).on("keydown", function (e) { var i = e.keyCode; 9 === i && w(); var t = function (i, a) { var n, l; e.preventDefault(); var r = function () { var e = x.children("dd." + s); if (x.children("dd." + o)[0] && "next" === i) { var t = x.children("dd:not(." + o + ",." + c + ")"), n = t.eq(0).index(); if (n >= 0 && n < e.index() && !t.hasClass(s)) return t.eq(0).prev()[0] ? t.eq(0).prev() : x.children(":last") } return a && a[0] ? a : y && y[0] ? y : e }(); return l = r[i](), n = r[i]("dd:not(." + o + ")"), l[0] ? (y = r[i](), n[0] && !n.hasClass(c) || !y[0] ? (n.addClass(s).siblings().removeClass(s), void $()) : t(i, y)) : y = null }; 38 === i && t("prev"), 40 === i && t("next"), 13 === i && (e.preventDefault(), x.children("dd." + s).trigger("click")) }); var T = function (e, t, a) { var n = 0; layui.each(g, function () { var t = i(this), l = t.text(), r = l.indexOf(e) === -1; ("" === e || "blur" === a ? e !== l : r) && n++, "keyup" === a && t[r ? "addClass" : "removeClass"](o) }); var l = n === g.length; return t(l), l }, j = function (e) { var i = this.value, t = e.keyCode; return 9 !== t && 13 !== t && 37 !== t && 38 !== t && 39 !== t && 40 !== t && (T(i, function (e) { e ? x.find("." + r)[0] || x.append('
无匹配项
') : x.find("." + r).remove() }, "keyup"), "" === i && x.find("." + r).remove(), void $()) }; f && k.on("keyup", j).on("blur", function (t) { var a = p[0].selectedIndex; e = k, d = i(p[0].options[a]).html(), setTimeout(function () { T(k.val(), function (e) { d || k.val("") }, "blur") }, 200) }), g.on("click", function () { var e = i(this), a = e.attr("lay-value"), n = p.attr("lay-filter"); return !e.hasClass(c) && (e.hasClass("layui-select-tips") ? k.val("") : (k.val(e.text()), e.addClass(s)), e.siblings().removeClass(s), p.val(a).removeClass("layui-form-danger"), layui.event.call(this, l, "select(" + n + ")", { elem: p[0], value: a, othis: t }), w(!0), !1) }), t.find("dl>dt").on("click", function (e) { return !1 }), i(document).off("click", v).on("click", v) } }; f.each(function (e, l) { var r = i(this), o = r.next("." + a), u = this.disabled, d = l.value, v = l.options[0]; try{ f = i(l.options[l.selectedIndex]); }catch(err){ } if ("string" == typeof r.attr("lay-ignore")) return r.show(); var h = "string" == typeof r.attr("lay-search"), p = v ? v.value ? t : v.innerHTML || t : t, m = i(['