<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>提资管理</title>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
	<meta name="decorator" content="ani"/>
	<%@ include file="/webpage/include/bootstraptable.jsp"%>
	<%@include file="raiseCapital.js" %>
	<style type="text/css">
		#div1{
			margin-top: 10px;
		}
		.well-class-body{
			width: 150px;
			word-wrap: break-word;
			word-break: break-all;
			/*text-align: right;*/
			margin: 2px;
		}
		.list-lig-one{
			color: #0C0C0C;
			/*text-align: center;*/
			font-size: 17px;
			background-color: whitesmoke;
		}
		.list-lig-two{
			/*background-color: #6495ED;*/
			color: #333333;
			font-size: 14px;
		}
	</style>
</head>
<body>
	<div class="wrapper wrapper-content">
	<div class="panel panel-primary">
	<div class="panel-heading">
		<h3 class="panel-title">提资管理</h3>
	</div>
		<div class="panel-body">
			<div>
				<ul class="nav nav-tabs">
					<li role="presentation" id="click1" style="border-bottom: 0px;border-left: 1px solid rgb(221,221,221);border-right: 1px solid rgb(221,221,221);border-top: 1px solid rgb(221,221,221)"><a id="dq" href="javascript:void(0)">填写需要材料</a></li>
					<%--<li role="presentation" id="click3" ><a id="mkqd" href="javascript:void(0)">查看模块清单</a></li>--%>
					<li role="presentation" id="click2" ><a id="qd" href="javascript:void(0)">查看领料清单</a></li>
				</ul>
			</div>
			<!-- 表格 -->
			<div id="div1">
				<table class="table table-bordered">
					<tbody>
					<tr>
						<td class="width-15 active"><label class="pull-right">项目编号：</label></td>
						<td class="width-35">
							<input id="projectNo" cssClass="form-control" placeholder="项目编号"/>
						</td>
						<td class="width-15 active"><label class="pull-right">批准人：</label></td>
						<td class="width-35">
							<input id="approver" cssClass="form-control" placeholder="批准人"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">erp编码：</label></td>
						<td class="width-35">
							<input id="erpCode" cssClass="form-control" placeholder="erp编码"/>
						</td>
						<td class="width-15 active"><label class="pull-right">审核人：</label></td>
						<td class="width-35">
							<input id="reviewer" cssClass="form-control" placeholder="审核人"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">项目名称：<font color='red'>*</font></label></td>
						<td class="width-35">
							<input id="projectName" cssClass="form-control required" placeholder="必填"/>
						</td>
						<td class="width-15 active"><label class="pull-right">制单人：</label></td>
						<td class="width-35">
							<input id="preparedBy" cssClass="form-control required" placeholder="制单人"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">甲方项目经理确认：</label></td>
						<td class="width-35">
							<input id="manager" cssClass="form-control required" placeholder="甲方项目经理确认"/>
						</td>
						<td class="width-15 active"><label class="pull-right">领用单位：</label></td>
						<td class="width-35">
							<input id="reqUnit" cssClass="form-control required" placeholder="领用单位"/>
						</td>
					</tr>
					<tr>
						<td class="width-15 active"><label class="pull-right">制单时间：</label></td>
						<td class="width-35">
							<input id="preTime" cssClass="form-control" placeholder="制单时间"/>
						</td>
					</tr>
					</tbody>
				</table>
				<table class="table table-view">
					<tbody>
					<c:forEach items="${pickListList}" var="items" varStatus="status">
						<c:if test="${status.count eq 1 || (status.count-1) % 1 eq 0}">
						<tr>
						</c:if>
							<td colspan="4" class="list-lig-one">${items.name}</td>
						<c:if test="${status.count % 1 eq 0 || status.count eq 1}">
						</tr>
						</c:if>

						<c:forEach items="${items.mdTheClassList}" var="items" varStatus="status">
							<c:if test="${status.count eq 1 || (status.count-1) % 1 eq 0}">
								<tr>
							</c:if>
							<td colspan="4" class="list-lig-two">${items.name}</td>
							<c:if test="${status.count % 1 eq 0 || status.count eq 1}">
								</tr>
							</c:if>

							<c:forEach items="${items.mdSmallClassList}" var="itemss" varStatus="status">
								<c:if test="${status.count eq 1 || (status.count-1) % 4 eq 0}">
									<tr>
								</c:if>
								<td style="text-align: center;vertical-align: middle">
										<div class="well-class-body" style="float: left;">
											<a href="javascript:jp.openViewDialog('模块清单','${ctx}/managementcenter/moduleacquisition/moduleListing/list?blockId=${itemss.id}', '800px', '500px');">
												${itemss.name}
											</a>
										</div>
										<div style="float: left;margin-left: 5px;margin: auto">
											<input style="width:40px;" placeholder="0" type="number" min="0" name="need" id="${itemss.id}"/><span>&nbsp;${itemss.mdUnit}</span>
<%--											<span><img onclick="jp.showPic('${itemss.mdImg}')" src="${itemss.mdImg}" height="50px"></span>--%>
											<c:if test="${not empty itemss.mdImg}">
												<a id="imgButton" class="btn btn-success btn-xs waves-effect m-r-5" href="javascript:jp.openViewDialog('查看附件','${ctx}/picking/activiti/pickPic?id=${itemss.id}', '800px', '500px')">显示附件</a>
											</c:if>
										</div>
								</td>
								<c:if test="${status.count % 4 eq 0 || status.count eq 4}">
									</tr>
								</c:if>
							</c:forEach>

						</c:forEach>
					</c:forEach>
					</tbody>
				</table>
			</div>
<%--			//领料--%>
			<div id="div2" style="display: none">
				<!-- 工具栏 -->
				<div style="margin-top: 10px;">
					<button id="add" class="btn btn-primary" onclick="add()">
						<i class="glyphicon glyphicon-plus"></i> 新建
					</button>
					<button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
						<i class="glyphicon glyphicon-remove"></i> 删除
					</button>
				</div>
				<table id="informationTable"   data-toolbar="#toolbar" class="table"></table>
				<div class="row">
					<div class="col-sm-3"></div>
					<div class="col-sm-6">
						<div class="form-group text-center">
							<input id="agree" class="btn  btn-primary btn-lg btn-parsley" type="submit" value="导出文档" />&nbsp;
						</div>
					</div>
				</div>
			</div>
<%--			//模块清单
			<div id="div3" style="display: none">
				<table id="informationTable2"   data-toolbar="#toolbar" class="table"></table>
			</div>--%>

		</div>

	</div>
	</div>
</body>
</html>

