<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ include file="../language.jsp" %>

<link href="../scripts/jquery/uploadify/uploadify.css"  rel="stylesheet" type="text/css"/>   

<script src="../scripts/itsm/cm/configureItemAdd.js?random=<%=new java.util.Date().getTime()%>"></script>

<div class="loading" id="configureItemAdd_loading"><img src="../images/icons/loading.gif" /></div>
	
<div id="configureItemAdd_panel" class="easyui-panel content" fit="true" border="none">
	
	<!-- 新的面板 start-->
	<div class="easyui-layout"  fit="true">
		<!-- 新的面板 start-->
		<div region="north" border="false" class="northBar">
			<div align="left">
				<a id="itemAddSave" class="easyui-linkbutton" icon="icon-save" plain="true"><fmt:message key="common.save"/></a>
			</div>
		</div>
		
		<div region="west" split="true" title="<fmt:message key="common.basicInfo" />" style="width:450px">
		
			<form>
	     	 <div class="lineTableBgDiv">
				<table style="width:100%" class="lineTable" cellspacing="1">
	            <tr>
	                <td style="width:40%"><fmt:message key="ci.ci"/><fmt:message key="common.category"/></td>
					<td style="width:60%">
						<input type="hidden" name="ciDto.categoryNo" id="ci_add_categoryNo" value="${categoryNo}" />
					  	<input name="ciDto.categoryName" id="ci_add_categoryName"  value="${categoryName}"  class="easyui-validatebox input" required="true" readonly style="cursor:pointer" onclick="itsm.cm.ciCategoryTree.autoUpdateEavAttrCiCategoryTree('configureItemAddCategory','configureItemAddCategoryTree','ci_add_categoryNo','ci_add_categoryName','ci_add_eavAttributet')"/>
	                </td>
	            </tr>
	            <tr>    
	                <td><fmt:message key="lable.ci.assetNo"/></td>
	                <td><input name="ciDto.cino" id="ci_add_cino" class="easyui-validatebox input" required="true" validType="length[1,20]"/></td>
	            </tr>
	            <tr>
	                <td><fmt:message key="label.name"/></td>
	                <td><input name="ciDto.ciname" id="ciname" class="easyui-validatebox input" required="true" validType="length[1,50]"/></td>
	            </tr>
	            <tr>      
	                <td><fmt:message key="ci.productType"/></td>
	                <td><input name="ciDto.model" id="model" class="input" /></td>        
	            </tr>
	            <tr>
	                <td><fmt:message key="ci.serialNumber"/></td>
	                <td><input name="ciDto.serialNumber" id="serialNumber" class="input" /></td>
	            </tr>
	            <tr> 
	                <td><fmt:message key="ci.barcode"/></td>
	                <td><input name="ciDto.barcode" id="barcode" class="input" /></td>
	            </tr>
	            <tr>
	                <td><fmt:message key="ci.purchaseNo"/></td>
	                <td><input name="ciDto.poNo" id="poNo" class="input" /></td>
	            </tr>
	            <tr>
	                <td ><fmt:message key="common.status"/></td>
	                <td>
		                <select name="ciDto.statusId" id="ci_statusAdd" class="input">
			                <c:forEach items="${dictionaryItemsStatusList}" var="ds">
			                	<option value="${ds.dcode}">${ds.dname}</option>
			                </c:forEach>
		                </select>
	                </td>
	           </tr>
	           <tr>       
	                <td><fmt:message key="ci.brands"/></td>
	                <td>
	                	 <select name="ciDto.brandId" id="ci_brandNameAdd" class="input">
			                <c:forEach items="${dictionaryItemsBrandList}" var="ds">
			                	<option value="${ds.dcode}">${ds.dname}</option>
			                </c:forEach>
		                </select>                                   
	                </td>
	            </tr>
	            <tr>
	                <td><fmt:message key="label.supplier"/></td>
	                <td>
	                	<select name="ciDto.providerId" id="ci_providerAdd" class="input">
			                <c:forEach items="${dictionaryItemsProviderList}" var="ds">
			                	<option value="${ds.dcode}">${ds.dname}</option>
			                </c:forEach>
		                </select>
	                </td>
	           </tr>
	           <tr>       
	                <td><fmt:message key="ci.location"/></td>
	                <td>
	                	<select name="ciDto.locId" id="ci_locAdd" class="input">
			                <c:forEach items="${dictionaryItemsLocList}" var="ds">
			                	<option value="${ds.dcode}">${ds.dname}</option>
			                </c:forEach>
		                </select>          
	                </td>
	            </tr>
	            <tr>
	                <td><fmt:message key="ci.purchaseDate"/></td>
	                <td><input name="ciDto.buyDate" id="configureItem_add_buyDate" class="easyui-datebox easyui-validatebox choose"  readonly/></td>
	            </tr>
	            <tr>    
	                <td><fmt:message key="ci.arrivalDate"/></td>
	                <td><input name="ciDto.arrivalDate" id="configureItem_add_arrivalDate" class="easyui-datebox easyui-validatebox choose" validType="DateComparison['configureItem_add_buyDate']"  readonly /></td>
	            </tr>
	            <tr>    
	                <td><fmt:message key="ci.warningDate"/></td>
	                <td><input name="ciDto.warningDate" id="warningDate" class="easyui-datebox choose"  readonly/></td>
	            </tr>
	            <tr>
	                <td><fmt:message key="ci.lifeCycle"/></td>
	                <td><input name="ciDto.lifeCycle" id="lifeCycle"  class="easyui-validatebox easyui-numberbox input" min="0" /></td>
	            </tr>
	            <tr>   
	                <td><fmt:message key="ci.warrantyDate"/></td>
	                <td><input name="ciDto.warranty" id="warranty"  class="easyui-validatebox easyui-numberbox input" min="0"/></td>
	            </tr>
	            <tr>
	                <td><fmt:message key="ci.use"/></td>
	                <td><input name="ciDto.userName" id="ci_add_useName" class="choose" readonly/></td>
	            </tr>
	            <tr>    
	                <td><fmt:message key="ci.owner"/></td>
	                <td><input name="ciDto.owner" id="ci_add_owner" class="choose" readonly/></td>  
	            </tr>
	            <tr><td colspan="2">&nbsp;<br><br><br><br></td></tr>
	          </table>
	          </div>
	          </form>
		
		</div>
		<div region="center" id="configureItemAdd_tabs" title="<fmt:message key="common.detailInfo" />">
			<!-- 扩展信息 start -->
			<div class="easyui-tabs" fit="true" border="false">
				<div title="<fmt:message key="config.extendedInfo"/>" style="overflow:hidden;">
					<form>
					<div class="lineTableBgDiv" id="ci_add_eavAttributet">
						<table style="width:100%" class="lineTable" cellspacing="1">
							<tr><td><fmt:message key="label.notExtendedInfo" /></td></tr>
              			</table>
                	</div>
				</form>	
				</div>
				<div title="<fmt:message key="common.attachment"/>">
					<form>
                	<div class="lineTableBgDiv">
					<table style="width:100%" class="lineTable" cellspacing="1">
                		<tr>
			              <td>
			              
			               <input type="file"  name="filedata" id="addConfigureItem_uploadAttachments">
				 		   <div style="padding-top:3px">
				 		    <a class="easyui-linkbutton" icon="icon-ok" href="javascript:$('#addConfigureItem_uploadAttachments').uploadifyUpload()" ><fmt:message key="label.attachment.upload" /></a>
	             		   </div>
	              		   <div id="addConfigureItem_uploadedAttachments" style="line-height:25px;color:#555"></div>
			               <div id="addConfigureItem_fileQueue"></div>  
			               <input style=" width: 100%" type="hidden" name="ciDto.attachmentStr" id="addConfigureItem_attachments"/>
              
			              </td>
			        	</tr>
			        	
                	</table>
                	</div>
                	</form>
				</div>
	
	    	</div>
			<!-- 扩展信息 end -->
		</div>
	
	</div>
<!-- 新的面板 end-->
</div>

<!-- 选择配置项分类 -->
<div id="configureItemAddCategory" class="easyui-window"  closed="true" collapsible="false" minimizable="false" maximizable="false" modal="true" title="<fmt:message key="common.select"/><fmt:message key="ci.ci"/><fmt:message key="common.category"/>" style="width:400px;height:400px;padding:5px;">
	<div id="configureItemAddCategoryTree"></div>
</div> 

