<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="yes" />
<title><?=$da['title']?></title>
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="<?=$da['p']?>/css/cssm.css">
<link rel="stylesheet" type="text/css" href="mode/plugin/css/jquery-rockdatepicker.css"/>
<link rel="stylesheet" href="mode/bootstrap3.3/css/bootstrap_cerulean.css">
<link rel="stylesheet" href="mode/my.css">

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/js.js"></script>
<script type="text/javascript" src="js/base64-min.js"></script>
<script type="text/javascript" src="mode/plugin/jquery-rockdatepicker.js"></script>
<script type="text/javascript" src="mode/plugin/jquery-rockdatepicker-mobile.js"></script>
<script type="text/javascript" src="web/res/js/jquery-rockupload.js"></script>
<script type="text/javascript" src="<?=$da['p']?>/flow/input/inputjs/input.js?<?=$da['logintime']?>"></script>
<script type="text/javascript" src="web/res/js/jquery-changeuser.js"></script>
<script type="text/javascript" src="web/res/js/jquery-imgview.js"></script>
<script type="text/javascript" src="mode/plugin/jquery-rockmodels.js"></script>
<script type="text/javascript">
var editor,arr=<?=$da['fieldsjson']?>,moders=<?=json_encode($da['moders'])?>,gongsiarr=<?=json_encode($da['gongsiarr'])?>,subfielsa=<?=json_encode($da['subfielsa'])?>,zbnamearr=<?=json_encode($da['zbnamearr'])?>,isedit=0,mid='<?=$da['mid']?>',isinput=1,data={};
ismobile=1;
js.changeuser=function(na,lx,tit,cans){
	var can = {
		'changetype':lx,
		'titlebool':get('header_title'),
		'idobj':get(na+'_id'),
		'nameobj':get(na),
		'onselect':function(sna,sid){
			js.changeuser_after(this.formname,this,sna,sid);
		}
	};
	var formname = get(na).name;
	var bcar = js.changeuser_before(formname),i;
	for(i in cans)can[i]=cans[i];
	if(typeof(bcar)=='string' && bcar){js.msg('msg', bcar);return;}
	if(typeof(bcar)=='object')for(i in bcar)can[i]=bcar[i];
	can.formname = formname;
	$('body').chnageuser(can);
}
function clearuser(na){
	get(na).value='';
	get(na+'_id').value='';
	get(na).focus();
}
js.datechange=function(o1,lx){
	$.rockdatepicker_mobile({
		'inputobj':o1,
		'view':lx
	});
}
</script>
<style>
.datesss{background:url(mode/icons/date.png) no-repeat right;cursor:pointer}
input,textarea,select,*{font-size:16px}
.lurim{text-align:right;padding-left:5px}
.tablesub td{height:25px;text-align:center;border:1px #888888 solid;}
.tablesub .inputs{border:none;padding:0px;margin:0px;width:100%}

.status{position: absolute;right:15px;top:2px;display:none;width:70px;height:70px;overflow:hidden; border:2px red solid;border-radius:50%;font-size:16px;text-align:center;line-height:70px;color:red;transform:rotate(-45deg);-o-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg)}


.btn-default{background-color:#1389D3;}
.btn-danger{background-color:#d9534f;}
.btn:hover{opacity:1;color:#ffffff}
</style>
</head>

<body class="mbody">
<?php 
if($showheader==1)echo '<div id="header_title" class="header"><span onclick="js.back()" class="header-back"></span>'.$da['title'].'</div><div style="height:46px;overflow:hidden"></div>';
?>

<div  style="position:relative">
	<div class="status"></div>
	<form name="myform">
		<input name="id" type="hidden" value="<?=$da['mid']?>">
		<?php 
		for($i=0;$i<$da['zbshu'];$i++)echo '<input value="0" type="hidden" name="sub_totals'.$i.'">';
		?>
		<div  style="background:white;padding-top:10px;">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<?php if($da['mid']==0){?>
		<tr>
		<td class="lurim" style="color:#888888" nowrap>填写人</td>
		<td><div class="divinput"><?=$da['adminname']?></div></td>
		</tr>
		<?php
		}
		echo $da['content'];
		if($da['isupfile']==1){
		?>
		<tr>
		<td class="lurim" nowrap>相关文件</td>
		<td><div class="divinput">
			<input name="fileid" id="fileidview-inputEl" type="hidden">
			<div id="view_fileidview" style="height:auto;min-height:60px" class="inputs"></div>
			<div><input style="width:150px" onchange="f.change(this)" type="file"></div>
		</div></td>
		</tr>
		<?php
		}
		$firstrs = array();
		if($da['course']){
			$coursestr = '<div align="center" style="padding:20px 0px">';
			$coursestr .='<table><tr>';
			foreach($da['course'] as $k=>$rs){
				$coursestr .='<td><div class="course">'.$rs['name'].'';
				$coursestr .='</div></td>';
				if($rs['id']>-1){
					if($rs['id'] > 0){
						if(!$firstrs)$firstrs = $rs;
						if($rs['isnow'])$firstrs = $rs;
					}
					$coursestr .='<td><div class="coursejt"></div></td>';
					$coursestr .='<td><div class="coursejts"></div></td>';
				}
			}
			$coursestr .= '</tr></table>';
			$coursestr .= '</div>';
			//判断流程步骤是否上步指定
			if($firstrs && $firstrs['checktype']=='change'){
				$placeholder = '可不选';
				$firstrs['isbt'] = 0;
				$stsp = '<tr>';
				$stsp.= '<td class="lurim" nowrap>';
				if($firstrs['checktype']=='change'){
					$stsp.='<font color=red>*</font>';
					$placeholder = '必须指定人员';
					$firstrs['isbt'] = 1;
				}
				$stsp.= ''.$firstrs['name'].':</td>';
				$stsp.= '<td><div class="divinput"><table width="98%" cellpadding="0" border="0"><tr><td width="100%"><input  class="inputs" style="width:99%" id="sysnextchange" value="'.$firstrs['sysnextopt'].'" placeholder="'.$placeholder.'" readonly type="text" name="sysnextopt"><input name="sysnextoptid" value="'.$firstrs['sysnextoptid'].'" id="sysnextchange_id" type="hidden"><input name="sysnextcustidid" value="'.$firstrs['id'].'" type="hidden"></td>';
				$stsp.= '<td nowrap><a href="javascript:;" onclick="js.changeclear(\'sysnextchange\')" class="webbtn">×</a><a href="javascript:;" id="btnchange_recename" onclick="js.changeuser(\'sysnextchange\',\'changeusercheck\',\'\',{changerange:\''.$firstrs['checktypeid'].'\'})" class="webbtn">选择</a></td></tr></table></div></td>';
				$stsp.= '</tr>';
				echo $stsp;
			}
		}
		
		
		//是否抄送
		$iscs = (int)$da['moders']['iscs'];
		if($iscs>0){
			$csstr= $inputobj->inputchangeuser(array(
				'name'		=> 'syschaosong',
				'id'		=> 'syschaosongid',
				'placeholder'=>'选择要抄送的人员',
				'type'		=> 'changeusercheck',
				'title'		=> '选择抄送人员',
				'value' 	=> $da['chao']['csname'],
				'valueid'	=> $da['chao']['csnameid']
			));
			echo '<tr><td class="lurim" nowrap><font color="red">'.(($iscs==1) ? '':'*').'</font>抄送给</td><td><div class="divinput">'.$csstr.'</div></td></tr>';
		}
		?>
		</table>
		</div>
	</form>
	<div class="padding10">
		<span id="AltSspan" style="display:none" >
		<?php
		if($da['isflow']>0)echo '<label><input onclick="c.changeturn(this)" value="1" checked type="checkbox" id="sysisturn">直接提交</label>&nbsp;';
		?>
		<button id="AltS" style="border-radius:5px" type="button" onclick="return c.save()"  class="btn">提交</button></span>
		<div id="msgview"></div>
	</div>
</div>
<script>
firstrs=<?=json_encode($firstrs)?>;
</script>
<script type="text/javascript" src="<?=$da['p']?>/flow/input/inputjs/mode_<?=$da['moders']['num']?>.js"></script>
</body>
</html>