<?php include_once(mvc::$cfg['PATH_TPL'].'public/headBase.php');?>
<header class="mui-bar mui-bar-nav">
	<a class="mui-pull-left" href="<?php echo mvc::$cfg['SELF_URI'];?>"><span class="mui-icon mui-icon-left-nav"></span>首页</a>
	<h1 class="mui-title">车架号识别结果</h1>
</header>
<div class="mui-content mar10">
  <?php if(!empty($vinCharArr)){?>
	<h4 class="warn center">请核查识别结果与图片数据是否一致</h4>
  <?php }else{?>
	<h4 class="warn center">识别失败，请手工输入或者重新识别</h4>
  <?php }?>
	<?php if(!empty($vinImg)){?><div class="vocr-img"><img src="<?php echo $vinImg;?>" /></div><?php }?>
	<form action="<?php echo mvc::$cfg['SELF_URI'];?>item/searchVin" name="matchForm" id="matchForm" onsubmit="return vinMatchForm()">
		<input type="hidden" name="type" value="vin"/>
		<div id="vinTxtBox">
			<?php if(!empty($vinCharArr)){?>
			<div class="vinTxt">
				<input type="hidden" name="keyword" value="<?php echo $vin;?>"/>
				<div class="input-group">
					<?php for($i=1; $i <= 17; $i++){?>
					<input type="text" class="char" value="<?php if ($vinCharArr[$i-1] != '_') echo $vinCharArr[$i-1];?>" maxlength="1"/>
					<?php }?>
				</div>
				<div class="clear"></div>
			</div>
			<?php }else{?>
			<div class="mui-input-row">
				<label>车架号</label>
				<input type="text" name="keyword" class="mui-input-clear" value="<?php echo $vin;?>" placeholder="请输入17位车架号" maxlength="17">
			</div>
			<?php }?>
		</div>
		<div class="mui-button-row"><button type="submit" class="mui-btn mui-btn-danger btn100">查看解码信息</button></div>
	</form>
</div>
<?php include_once(mvc::$cfg['PATH_TPL'].'public/footBase.php');?>
<script type="text/javascript">
$(document).ready(function(){
	vinCharEvent();
})
</script>