<?
viewPlugins("layer");
$headerEnd = '';
viewSet("headerEnd",$headerEnd);
viewLoad("public/header");
?>
<style>
#compare td{
	word-break :keep-all;
	word-wrap : normal;
	white-space :nowrap;
	min-width:200px;
}
#compare td td{border-left:none;border-right:none;}
#compare td td:first-child{border-right:1px solid #ccc;}
#compare td table{border:none;}
#CompareDiv {
	padding:20px 0;
}
</style>
<div >
	<table class="table table-bordered bgw" style="overflow:scroll;table-layout:fixed;width:auto;" id="compare">
		<thead>
			<tr>
			<? foreach($numArr as $v){?>
				<th><?=$v['factory']? $v['factory'].': ': ''?><?=$v['number']?></th>
			<?}?>
			</tr>
		</thead>
		<tbody>
		<? if(!empty($numUnikeyArr)){?>
			<? foreach($numUnikeyArr as $ukey=>$uv){?>
			<tr <? if($uv['count'] >= $hasCount){ echo ' class="all-same"';}else if($uv['count'] < $hasCount && $uv['count'] > 1){ echo ' class="any-same"';}?>>
				<? for($key=0; $key < $numCount; $key++){?>
				<td>
					<? if(isset($uv['keys'][$key])){?>
					<?=$numArr[$key]['nums'][$uv['keys'][$key]]['factory']?>: <?=$numArr[$key]['nums'][$uv['keys'][$key]]['number']?>
					<?}else if($ukey === 0 && empty($numArr[$key]['nums'])){?>
					<span class="red"><lg>无相关数据</lg></span>
					<?}?>
				</td>
				<?}?>
			</tr>
			<?}?>
		<?}else{?>
			<tr><td colspan="<?=count($numArr)?>" class="center red"><lg>无相关数据</lg></td></tr>
		<?}?>
		</tbody>
	</table>
</div>
<script type="text/javascript">
$(document).ready(function () {

});
</script>
<? viewLoad("public/footer") ?>