layui.define("layer",function(w){var s=layui.$,p=layui.layer,g=function(n){this.c={elem:"",data:"",url:"",placeholder:"请选择:",disabledTips:"",success:function(){}},this.c=s.extend(this.c,n),this.getData=function(e){var a;return s.ajax({url:e,type:"get",dataType:"json",async:!1,success:function(l){a=l.data||p.msg("数据接口错误,请正确配置")},error:function(){p.msg("数据接口错误,请正确配置"),a=""}}),a},this.getChild=function(e,a){for(var l=[],t=0;t",t=0;t'+e[t].name+""}return l+="",l},this.setValue=function(e){for(var a=this,l=a.data,t=[],i=0;id&&t.eq(i).scrollTop(c+t.eq(i).scrollTop()-d+o+3),c<0&&t.eq(i).scrollTop(c+t.eq(i).scrollTop()-5)}}},this.data=this.c.url?this.getData(this.c.url):this.c.data};g.prototype.render=function(){var n=this,e=n.c,a=e.elem,l='
',t=''+e.placeholder+"",i='
';if(s(a).wrap(l),s(a).after(t+i),n.showPopup(n.data,0),s(a).val()!=""){var r=s(a).val().split("/"),c=r.join("/");s(a).parent().find(".show").html(c);for(var d=this.setValue(r),o=0;o/");if(s(a).val(m),s(a).parent().find(".show").html(T),typeof e.success=="function"){var b={data:m,ids:y};e.success(b)}}layui.stope(f)}),s(a).parent().find(".show").on("click",function(f){s(a).parent().find(".pop").show(),n.scroll(),layui.stope(f)}),s(document).on("click",function(){s(a).parent().find(".pop").hide()})},w("selectY",function(n){var e=new g(n);e.render()})}).link(layui.cache.base+"selectY/selectY.css?v="+new Date().getTime());