<style>
	*{
		box-sizing: border-box;
	}
	tr {
		display: table-row;
		vertical-align: inherit;
		border-color: inherit;
	}
	.mytable{
		width: 100%;
		z-index: 9999;
	}
</style>
<form action="" method="post" id="addr_box_layer">
<table class="layui-table">
	<?php $pIndex=0;$pTotal=count($list);?>
	<?php foreach ($list as $k=>$v){?> 
	<?php if ($pIndex == 0||($pIndex%3) == 0){?>
	<tr>
	<?php }?>
		<td>
			<label>
				<input type="checkbox" <?php if ($method=='1'){?> <?php if (in_array($v['pc_id'],$path)||in_array($v['pc_id'],$parentPath)){?> checked="" disabled="" <?php }?> <?php }else{?> <?php if (in_array($v['pc_id'],$otherPath)||in_array($v['pc_id'],$parentPath)){?> disabled=""<?php }?> <?php }?> onchange="changeChild(this);" value="<?php echo $v['pc_id'];?>" name="pid[<?php echo $v['pc_id'];?>]"><?php echo $v['pc_name'];?>
			</label>

			<i class="icon icon_cright" onclick="showChild(this);"></i>
			<div class="mytable" style="display: none">
				<span class="closebtn" onclick="showChild($(this).parent().prev());">×</span>
				<table>
					<?php if ($v['child']) {?>
					<?php $index=0;$total=count($v['child']);?>
					<?php foreach ($v['child'] as $i => $j){?> 
						<?php if ($index == 0||($index%3) == 0){?>
					<tr>
						<?php }?>
						<td>
							<label>
								<input type="checkbox" class="checkChild" onchange="checkParent(this);" <?php if ($method=='1'){?> <?php if (in_array($j['pc_id'],$path)){?> checked="" disabled="" <?php }?> <?php }else{?> <?php if ((in_array($j['pc_id'],$path))||(in_array($j['pc_id'],$otherPath))){?> checked="" <?php if (in_array($j['pc_id'],$otherPath)){?> disabled=""<?php }?> <?php }?> <?php }?> value="<?php echo $j['pc_id'];?>" name="id[<?php echo $v['pc_id'];?>][]"><?php echo $j['pc_name'];?>
							</label>
						</td>
					<?php if ($index == ($total-1) ||($index%3) == 2){?>
					</tr>
					<?php }?>
					<?php $index++;}?>
					<?php }?>
				</table>
			</div>

		</td>
	<?php if ($pIndex == ($pTotal-1) ||$pIndex%3 == 2){?>
	</tr>
	<?php }?>
	<?php $pIndex++;}?>
	<input type="hidden" name="isAjax" value="1">
</table>
</form>