<!DOCTYPE html>
<html>
	<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="themes/jquery/css/themes/default/jquery.mobile-1.4.5.min.css">
	<link rel="stylesheet" href="themes/home/css/fonts/font-awesome.min.css">
    <link rel="stylesheet" href="themes/home/css/ui-box.css">
    <link rel="stylesheet" href="themes/home/css/ui-base.css">
    <link rel="stylesheet" href="themes/home/css/ui-color.css">
    <link rel="stylesheet" href="themes/home/css/icon.css">
    <link rel="stylesheet" href="themes/home/css/control.css">
    <link rel="stylesheet" href="themes/home/css/main.css">
	<script src="themes/jquery/js/jquery.js"></script>
	<script src="themes/jquery/js/jquery.mobile-1.4.5.min.js"></script>
</head>
<body class="um-vp c-wh " ontouchstart>
<style type="text/css"> 
#div1{
display:none;}
</style>
<form name="save" method="post" action="index.php?ac=appsflow&do=personnel&fileurl=plugin&tpltype=<?php echo $tpltype?>&tplid=<?php echo $tplid?>">
	<input type="hidden" name="view" value="edit" />
	<input type="hidden" name="title" value="<?php echo $row['title']?>" />
	<input type="hidden" name="appid" value="<?php echo $row['id']?>" />
	<input type="hidden" name="oldappkey" value="<?php echo $per['appkey']?>" />
	<input type="hidden" name="oldappkey1" value="<?php echo $per['appkey1']?>" />
	<input type="hidden" name="perid" value="<?php echo $per['perid']?>" />
	<input type="hidden" name="oldappflow" value="<?php echo $per['flowid']?>" />
	<input type="hidden" name="content" value="<?php echo $content?>" />
<div data-role="page" data-quicklinks="true" class="ub ub-ver ">
      <div data-role="header" id="header" data-position="fixed" data-fullscreen="true" data-tap-toggle="false" >
		  <div class="uh bc-text-head ub bc-head">
					<div class="nav-btn" id="nav-left" onClick="javascript:window.location='index.php?ac=apps&fileurl=plugin&do=listkey'">
						<div class="fa fa-angle-left fa-2x"></div>
					</div>
					<h1 class="ut ub-f1 ulev-3 ut-s tx-c" tabindex="0">公文签批</h1>
					
					<div class="nav-btn nav-bt" id="nav-right">
					<!--<div class="ub-img icon-edit umw2 umh4"></div> -->
						
					</div>
								
		   </div>
		  <div id="error" style="display:none;">流程信息审批成功！</div>
	</div>
	<!-- /header -->
	<div data-role="content" id="content">
		<div class="ub ub-ver">
			<div id="info">
				<div class="uinn-a6 sc-text  ulev-app1">
					操作类型
					<fieldset data-role="controlgroup" style="text-align:left" data-type="horizontal">
				<input id="radio-choice-h-1a" name="pkey" value="1" CHECKED="checked" type="radio">
				<label for="radio-choice-h-1a">通过</label>
				<input id="radio-choice-h-1b" name="pkey" value="2"  type="radio">
				<label for="radio-choice-h-1b">拒绝</label>
				</fieldset>
				</div>
				
				<?php
				if($wherestr){
					echo '<div class="uinn-a6 sc-text  ulev-app1"> 下一步：</td>';
					echo '<td class="TableData">';
					//设定下一步审批信息
					echo '<input type="hidden" name="flowid" value="'.$flow['fid'].'" />';
					echo '<input type="hidden" name="appkey" value="'.$flow['flowkey2'].'" />';
					echo '<input type="hidden" name="appkey1" value="'.$flow['flowkey3'].'" />';
					echo '<input type="hidden" name="flowdatetype" value="'.$flow['flowdatetype'].'"/>';
					echo '<input type="hidden" name="flowdate" value="'.$flow['flowdate'].'" />';
					if($flow['flowkey2']=='2'){
					  //单人审批
					  $flowuser=explode(',',$flow['flowuser']);
						  if($flow['flowkey1']=='1'){//可选
							  //get_pubuser(1,"staff",$flowuser[0],"+选择审批人员",120,20);
							  echo mob_radio_user('审批人员','staff',$flowuser[0]);
						  }else{//不可选
							  //get_pubuser(1,"staff",$flowuser[0],"+选择审批人员",120,20,$flow['flowuser']);
							  echo mob_radio_user('审批人员','staff',$flowuser[0],$flow['flowuser']);
						  }
					 }else{
					  //多人审批
						if($flow['flowkey1']=='1'){//可选
							  //get_pubuser(2,"staff",$flow['flowuser'],"+选择审批人员",40,4);
							  echo mob_select_user('审批人员','staff',$flow['flowuser']);
							  echo "<input type='hidden' name='stafftype' value='1' />";
						}else{
							  //不可选
							  echo "<textarea name='staff[]' id='staff' cols='40' rows='4'";
							  echo " readonly style='background-color:#F5F5F5;color:#006600;'>";
							  echo $flow['flowuser']."</textarea>";
							  echo "<input type='hidden' name='stafftype' value='1' />";
						 }
					}
					echo '<input type="hidden" name="sms_info_box_shownamemaster" value="1" checked="checked" />';
					echo '</div>';
			}
			?>	
			</div>
		</div>
		<div class="c-wh uinn ub-ver">
				<div class="uinn" onClick="sendForm();">
                    <div class="btn ub ub-ac bc-text-head ub-pc bc-btn uc-a1">
                        确认并转交下一步
                    </div>
                </div>
            </div>
	</div>

</div><!-- /page -->
</form>
 <script type="text/javascript"> 
    window.onload = function(){ 
        var heg=document.getElementById("header").offsetHeight;
		var content=document.getElementById("content"); 
		content.style.cssText="margin-top:"+heg+"px;";
    }
	function CheckForm()
	{
	   <?php if($wherestr){?>
	   var chk=0;
	   var chkObjs = document.getElementsByName("pkey");
	   for(var i=0;i<chkObjs.length;i++){
		   if(chkObjs[i].checked){
			   chk = i;
			   break;
		   }
	   }
	   if(document.save.staff.value=="" && chk!=2)
	   {
		 alert("下一步审批人员不能为空！");
		 //alert(chk);
		 document.save.staff.focus();
		 return (false);
	   }
	   <?php }?>
	   return true;
	}
	function sendForm()
	{
	   if(CheckForm())
		  document.save.submit();
	}
	function checkbox1(value){
		if(value==1){
			div1.style.display="block";
			div2.style.display="none";
		}else{
			div1.style.display="none";
		}
	}
</script>
</body>
</html>
