layui.define(["table","element","form","laytpl"],function(exports){var $=layui.jquery,table=layui.table,laytpl=layui.laytpl,tableChildren={},ELEM_HOVER="soul-table-hover",mod={render:function(y){var t,f=this,l=$(y.elem),e=l.next().children(".layui-table-box"),p=y.id,v=e.children(".layui-table-header").children("table"),x=e.children(".layui-table-fixed").children(".layui-table-body").children("table"),g=e.children(".layui-table-body").children("table"),C=$.merge(e.children(".layui-table-body").children("table"),x),i=f.getCompleteCols(y.cols),a=[],n=void 0===y.soulSort||y.soulSort;for(f.fixHoverStyle(y),t=0;tdiv').each(function(e){u.isChild(layui.table.cache[p][e])&&(u.field?$(this).prepend(''):$(this).html(''))}):u.field?C.find("tr").find('td[data-key$="'+u.key+'"]>div').prepend(''):C.find("tr").find('td[data-key$="'+u.key+'"]>div').html(''),C.children("tbody").children("tr").each(function(){$(this).children("td:eq("+e+")").find(".childTable").on("click",function(e){layui.stope(e);var t=$(this).parents("tr:eq(0)").data("index"),l=$(this).parents("td:eq(0)").data("key"),i=g.children("tbody").children("tr[data-index="+t+"]").children('td[data-key="'+l+'"]').find(".childTable:eq(0)"),a=x.find("tr[data-index="+t+"]").children('td[data-key="'+l+'"]').find(".childTable:eq(0)"),n=table.cache[y.id][t],d=u.children;if("function"==typeof u.children&&(d=u.children(n)),2===u.show)layer.open($.extend({type:1,title:"子表",maxmin:!0,content:f.getTables(this,n,u,y,d),area:"1000px",offset:"100px"},u.layerOption||{})),f.renderTable(this,n,u,y,d,b);else{!i.hasClass(b[1])&&u.collapse&&C.children("tbody").children("tr").children("td").find(".childTable").each(function(){$(this).hasClass(b[1])&&f.destroyChildren($(this).parents("tr:eq(0)").data("index"),y,b)}),i.hasClass(b[1])||i.parents("tr:eq(0)").children("td").find(".childTable").each(function(){$(this).hasClass(b[1])&&($(this).removeClass(b[1]).addClass(b[0]),f.destroyChildren($(this).parents("tr:eq(0)").data("index"),y,b))}),i.hasClass(b[1])?(i.removeClass(b[1]).addClass(b[0]),a.removeClass(b[1]).addClass(b[0])):(i.removeClass(b[0]).addClass(b[1]),a.removeClass(b[0]).addClass(b[1]));var r=i.parents("td:eq(0)").attr("rowspan");if(i.hasClass(b[1])){var o=[];if(o.push(''),o.push(f.getTables(this,n,u,y,d)),o.push(""),r){var h=parseInt(i.parents("tr:eq(0)").data("index"))+parseInt(r)-1;i.parents("table:eq(0)").children().children("[data-index='"+h+"']").after(o.join(""))}else i.parents("tr:eq(0)").after(o.join(""));if(f.renderTable(this,n,u,y,d,b),0';c.children("td").children(".layui-tab-card").css({position:"absolute",top:0,width:"100%",background:"white","z-index":200}),c.children("td").append(s),x.find('tr[data-index="'+t+'"]').each(function(){$(this).after(''+s+"")}),table.resize(p)}3===u.show&&(i.parents("tr:eq(0)").next().find(".layui-table-view").css({margin:0,"border-width":0}),i.parents("tr:eq(0)").next().find(".layui-table-header").css("display","none")),i.parents("tr:eq(0)").next().children("td").children(".layui-tab").children(".layui-tab-content").on("click",function(e){e.stopPropagation()}).off("dblclick").on("dblclick",function(e){e.stopPropagation()}).on("mouseenter","td",function(e){e.stopPropagation()})}else f.destroyChildren(t,y,b),table.resize(p)}})}),u.spread&&2!==u.show&&C.children("tbody").children("tr").children("td").find(".childTable").trigger("click")}()},getTables:function(e,t,l,i,a){var n,d=[],r=$(i.elem),o=i.id+$(e).parents("tr:eq(0)").data("index"),h=r.next().children(".layui-table-box").children(".layui-table-body"),c=h.children("table"),s=0;if(d.push('
'):3===l.show?d.push('">'):"full"===l.childWidth?d.push('">'):(h.prop("scrollHeight")+(0h.height()&&(s=this.getScrollWidth()),d.push("max-width: "+(h.width()-1-s)+'px">')),3!==l.show&&(void 0===l.childTitle||l.childTitle)){for(d.push('
    '),n=0;n'+("function"==typeof a[n].title?a[n].title(t):a[n].title)+"");d.push("
")}for(3===l.show?d.push('
'):d.push('
'),n=0;n
')}return d.push("
"),d.join("")},renderTable:function(a,n,d,r,o,e){var t=[],h=this,c=r.id,s=c+$(a).parents("tr:eq(0)").data("index");if(d.lazy)t.push(b(h,a,n,d,r,0,o,e));else for(var u=0;u