<!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"/>
<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?v=1"></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">
<?php
$maincolor = getconfig('apptheme','#1389D3');
?>
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={},maincolor='<?=$maincolor?>';
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
	});
}
function initApp(){
	js.setapptitle(moders.name);
}
</script>
<style>
<?php
$maincolora= c('image')->colorTorgb($maincolor);
$maincolors= ''.$maincolora[0].','.$maincolora[1].','.$maincolora[2].'';
echo 'body{--main-color:'.$maincolor.';}';
?>
.datesss{background:url(mode/icons/date.png) no-repeat right;cursor:pointer}
input,textarea,select,*,td, button{font-size:16px}
.lurim{text-align:right;padding-left:5px;width:100%;}
.lulim{text-align:left;padding-left:10px;width:100%;padding-bottom:5px;}
.lulim:first-child{padding-top:10px;}
.tablesub td{height:25px;text-align:left;border:0px #888888 solid;}
.tablesub .inputs{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}
.lumtr{background-color:white}
.tablelum{}
/*.inputs{border-bottom:0.5px #cccccc solid;border-top:0px;border-left:0px;border-right:0px}*/
/*.inputs:focus{border:none;box-shadow:none;border-bottom:0.5px <?=$maincolor?> solid;}*/

.divzb0{display:inline-block;width:100%;margin:5px 0px}
.divzb1{float:left;width:25%;overflow:auto;text-align:right;line-height:20px;margin-top:8px}
.divzb2{float:left;width:73%}
.xuhao{border:none;font-size:12px;text-align:left;color:#888888}
.xuhao:focus{border:none;}
.xuantitle{text-align:left;font-size:12px;padding-left:8px;line-height:30px;margin-top:10px;color:#888888;}
/*页面修改*/
	.form_title{
		font-size: 16px;
		font-weight: bold;
		color: #000;
	}

	.form_content{
		font-size: 15px;
		color: #3A3A3C;
		padding-right: 14px;
	}

	.header{
		color: #fff;
		font-weight: bold;
		font-size: 20px;
		background-color: #1389D3;
	}

	.btn{
		font-size: 18px;
	}

	.submit_tip{
		margin-bottom: 10px;
	}

	.xuantitle{
		font-size: 14px;
		line-height: 14px;
		margin-bottom: 10px;
	}

	.inputs{
		border: 1px solid #dcdcdc;
		border-radius: 5px;
		height: 30px;
		width: 100%;
		font-size: 15px;
		color: #3A3A3C;
		padding-left: 8px;
	}

	.textarea{
		border: 1px solid #dcdcdc;
		border-radius: 5px;
		height: 30px;
		width: 100%;
		font-size: 15px;
		color: #3A3A3C;
		padding-left: 8px;
	}

	.divinput{
		padding: 8px 8px 8px 0px;
	}

	select[class="inputs"]{
		height: 36px;
		padding-left: 6px;
	}
</style>
</head>

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

<div  style="position:relative">
	<div class="status"></div>
	<form name="myform" autocomplete="off">
		<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="padding-top:10px">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tablelum">
		<?php if($da['mid']==0){?>
		<tr class="lumtr">
			<td class="lulim" nowrap><div class="form_title">填写人：</div><div class="divinput form_content" style="border:1px solid #dcdcdc;border-radius:5px;margin-top:8px;padding-left:8px;width:92%;"><?=$da['adminname']?></div></td>
			<td></td>
		</tr>
		<?php
		}
		echo $da['content'];
		if($da['isupfile']==1){
		?>
		<tr class="lumtr">
		<td class="lulim" 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><td colspan="2"><div class="xuantitle">选择审批人</div></td></tr>';
				$stsp.= '<tr class="lumtr">';
				$stsp.= '<td class="lulim" nowrap><div class="form_title">';
				if($firstrs['checktype']=='change'){
					$stsp.='<font color=red>*</font>';
					$placeholder = '必须指定人员';
					$firstrs['isbt'] = 1;
				}
				$stsp.= ''.$firstrs['name'].':</div>';
				$stsp.= '<div class="divinput form_content"><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></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 colspan="2"><div class="xuantitle">抄送</div></td></tr>';
			echo '<tr class="lumtr"><td class="lulim" 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 '<div class="submit_tip"><input onclick="c.changeturn(this)" value="1" checked type="checkbox" id="sysisturn">直接提交</div>';
		?>
		<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?<?=time()?>"></script>
<?php
if($otherfile)include_once($otherfile);
if($da['showtype']=='view')echo '<script src="webmain/main/flowview/flowview_input.js?'.time().'"></script>';
?>
</body>
</html>
