<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.opensymphony.xwork2.ActionContext" %>
<%@ include file="../language.jsp" %>

<script>
var eno='${param.eno}';
$('#addRequestActivity_requestNo').val(eno);
</script>

<script src="../scripts/itsm/request/requestEdit.js?random=<%=new java.util.Date().getTime()%>"></script>
<script type="text/javascript">
$(document).ready(function(){
 $("#requestEdit_loading").hide();
 $("#requestEdit_contentPanel").show();
}); 
</script>
<div class="loading" id="requestEdit_loading"><img src="../images/icons/loading.gif" /></div>
	
<div id="requestEdit_contentPanel" class="content">
<!-- 新的面板 start-->
<div id="requestEditDiv" class="easyui-panel" fit="true" border="none" >
<form id="requestEditForm" >
<input type="hidden" id="requestEdit_status" name="requestDTO.statusNo" /> 
<input type="hidden" name="requestDTO.creator" value="${loginUserName}"  />
<div class="easyui-layout" fit="true">
	<!-- 新的面板 start-->

	<div region="north" border="false" class="panelTop">
	
			<a  onclick="itsm.request.requestEdit.saveRequestEdit()"  class="easyui-linkbutton" plain="true" icon="icon-save" style="margin-right:10px"><fmt:message key="common.save" /></a>
			<a id="traceRequestEditBtn" icon="icon-search" class="easyui-linkbutton" plain="true"  style="margin-right:10px;display:none;"><fmt:message key="label.request.processTracking" /></a>
			<a class="easyui-linkbutton" plain="true" icon="icon-undo" style="margin-right:10px" onclick="showRequestIndex()"><fmt:message key="common.returnToList" /></a>
	</div>
		
	<div region="west" split="true" title="<fmt:message key="common.basicInfo" />" style="width:400px">
	
	<div class="lineTableBgDiv">
		<table style="width:100%" class="lineTable" cellspacing="1">
			<tr>
				<td style="width:40%"><fmt:message key="common.id" /></td>
				<td style="width:60%"><input name="requestDTO.requestCode" id="requestEdit_requestCode" class="input" readonly="readonly" /></td>
			</tr>
			<tr>
				<td><fmt:message key="common.title"/>&nbsp;<span style="color:red">*</span></td>
				<td>
				
				<input id="requestEdit_etitle" name="requestDTO.etitle" class="easyui-validatebox input" validType="length[1,200]" required="true"/>
				<input id="requestEdit_eno" type="hidden" name="requestDTO.eno" />
				<input id="requestEdit_pid" type="hidden" name="requestDTO.pid" />
				</td>
			</tr>
			<tr>
				<td><fmt:message key="common.content" />&nbsp;<span style="color:red">*</span></td>
				<td>
				<textarea id="requestEdit_edesc" name="requestDTO.edesc" class="easyui-validatebox textarea" validType="length[5,200]" required="true"></textarea>
				</td>
			</tr>
			<tr>	
				<td><fmt:message key="common.category" /></td>
				<td>
					<input type="hidden" name="requestDTO.requestCategoryNo" id="editRequestCategoryNo" />
					<input name="requestDTO.requestCategoryName"  id="editRequestCategoryName" class="choose" onclick="itsm.request.requestEdit.selectEditRequestCategory()" readonly />
					
					
					<div id="edit_request_select_category_panel" class="easyui-panel" closed="true"  style="position:absolute;float:left;width:auto;height:320px;overflow:auto">
					</div>
					
					
				</td>
			</tr>
			<tr>	
				<td><fmt:message key="label.request.form" /></td>
				<td>
				<select id="requestEdit_imode" name="requestDTO.imodeNo" class="input">
				</select>
				</td>
			</tr>
			<tr>
				<td><fmt:message key="label.request.priority" /></td>
				<td>
					<select id="requestEdit_priority" name="requestDTO.priorityNo" class="input"></select>
				</td>
			</tr>
			<tr>
				<td><fmt:message key="label.request.complexity" /></td>
				<td>
				<select id="requestEdit_level" name="requestDTO.levelNo" class="input">
				</select>
				</td>
			</tr>	
			<tr>
				<td><fmt:message key="label.request.effect" /></td>
				<td>
					<select id="requestEdit_effectRange" name="requestDTO.effectRangeNo" class="input"></select>
				</td>
			</tr>
			<tr>	
				<td><fmt:message key="label.request.seriousness" /></td>
				<td>
					<select id="requestEdit_seriousness" name="requestDTO.seriousnessNo" class="input">
					</select>
				</td>
			</tr>

		</table>
		</div>
	</div>
	
	<div region="center" id="requestEdit_tabs" title="<fmt:message key="common.detailInfo" />" id="reg_center">
		
		<!-- 扩展信息 start -->
		<div class="easyui-tabs" id="requestEditsTab" fit="true" border="false">
		
			<div title="<fmt:message key="config.extendedInfo"/>" style="overflow:hidden;">
					<div class="lineTableBgDiv" id="request_edit_eavAttributet">
						<table style="width:100%" class="lineTable" cellspacing="1">
							
              			</table>
                	</div>
			</div>
			
			<div title="<fmt:message key="title.request.requesterInfo" />" style="overflow:hidden;">
					<div class="lineTableBgDiv">
						<table style="width:100%" class="lineTable" cellspacing="1">
							<tr>
								<td style="width:15%"><fmt:message key="label.request.requestUser" />&nbsp;<span style="color:red">*</span></td>
								<td style="width:85%">
								<input id="RequestEdit_UserName" name="requestDTO.createdByName" class="choose" />
								<input id="RequestEdit_UserId" type="hidden" name="requestDTO.createdByNo"/>
								</td>
							</tr>

						 </table>
					 </div> 
				</div>
				<div title="<fmt:message key="title.request.withCI" />">
					<div class="lineTableBgDiv">
						<table style="width:100%" class="lineTable" cellspacing="1">
							<tr>
								<td style="width:15%" ><fmt:message key="label.request.withAssets" /></td>
								<td>
									<input class="choose" id="edit_request_ref_ciname" />
									<input id="edit_request_ref_ciid" type="hidden" name="requestDTO.ciId" />	
								</td>
							</tr>
						</table>
					</div>
				</div>
				

				<div title="<fmt:message key="common.attachment" />" style="padding:3px;">
					<div class="lineTableBgDiv" id="edit_request_attachment_div" >
							<input type="hidden" name="requestDTO.attachmentStr" id="edit_request_attachmentStr"/>
							<table width="100%" cellspacing="1" class="lineTable">
								<tr>
									<td> 
										<input type="file"  name="filedata" id="edit_request_file">
										<div style="height:5px"></div>
										
										<a class="easyui-linkbutton" icon="icon-ok" href="javascript:$('#edit_request_file').uploadifyUpload()" ><fmt:message key="label.attachment.upload" /></a>
										
										
									</td>
								</tr>
								<tr>
									<td>
										<div style="padding-top:3px">
										  <div id="show_edit_request_attachment"></div>
							              <div id="show_edit_request_attachment_success" style="line-height:25px;color:#555;display: none"></div>
							            </div>
									</td>
								</tr>
							</table>
					</div>
				</div>
				
				
				
				
				
				
				<div title="<fmt:message key="title.request.assign" />" style="overflow:hidden;">
					<div class="lineTableBgDiv">
						<table style="width:100%" class="lineTable" cellspacing="1">
							<tr>
								<td style="width:15%" ><fmt:message key="label.request.assignToGroup" /></td>
								<td style="width:85%" >
								<input id="requestEdit_assigneeGroupName" style="width:98%;color:#555;" disabled/>
								<input id="requestEdit_assigneeGroupNo" type="hidden" name="requestDTO.assigneeGroupNo" style="width:98%;color:#555;"/>
								</td>
							</tr>
							<tr>
								<td><fmt:message key="label.request.assignToTechnician" /></td>
								<td>
								<input id="requestEdit_assigneeName" type="text" style="width:98%" disabled />
								<input id="requestEdit_assigneeNo" name="requestDTO.assigneeNo" type="hidden" style="width:98%"/>
								</td>
							</tr>
					    </table>
					</div> 
				</div>
			
				
				
				<div title="<fmt:message key="title.request.solutions" />">
				<!-- 解决方案 start -->

					<div class="lineTableBgDiv">
						<table style="width:100%" class="lineTable" cellspacing="1">
			
							<tr>
								<td>
									<textarea style="width:98%; height:150px;" id="requestEditSolutions" name="requestDTO.solutions"></textarea>
								</td>
							</tr>
			
						</table>
					</div>
				<!-- 解决方案 end  -->
				</div>
    </div>
	<!-- 扩展信息 end -->
	</div>
	</div>
<!-- 新的面板 end-->
</form>
</div>






<div id="requestEdit_addEditTaskWindow" icon="icon-edit" class="easyui-window"  closed="true" collapsible="false" minimizable="false" maximizable="false" modal="true" title="<fmt:message key="title.request.addOrEditTask" />" style="width:480px;height:auto">
	
 <form id="addEditTaskForm">
   <div class="lineTableBgDiv">
		<table style="width:100%" class="lineTable" cellspacing="1">
        <tr>
            <td style="width:15%"><fmt:message key="label.request.taskTitle" /></td>
			<td style="width:85%" colspan="3">
           <input name="requestTaskDTO.title" id="requestEdit_taskTitle" class="easyui-validatebox input" required="true"/>
		   </td>
        </tr>
        <tr>
			 <td><fmt:message key="label.request.taskDescription" /></td>
			 <td colspan="3">
             <textarea name="requestTaskDTO.description" id="requestEdit_taskDescription" class="easyui-validatebox input" required="true"></textarea>
			 </td>
        </tr>
        <tr>
            <td style="width:15%"><fmt:message key="label.request.planStart" /></td>
			<td style="width:35%"> <input name="requestTaskDTO.planStart" id="requestEdit_taskPlanStart" class="easyui-datebox input" required="true" style="cursor:pointer" readonly /></td>
			<td style="width:15%"><fmt:message key="label.request.planComplete" /></td>
  			<td style="width:35%">
            <input name="requestTaskDTO.planEnd" id="requestEdit_taskPlanEnd" class="easyui-datebox input" required="true" style="cursor:pointer" readonly />
           </td>
        </tr>
        <tr>
            <td><fmt:message key="label.request.workGroup" /></td>
			<td>
			   <input id="requestEdit_addTask_assigneeGroupName" style="width:96%" readonly/>
			   <input type="hidden" name="requestTaskDTO.assigneeGroupNo" id="requestEdit_addTask_assigneeGroupNo"/>	
			</td>
			<td><fmt:message key="label.request.theTechnician" /></td>
  			<td>
              <input id="requestEdit_addTask_assigneeName" style="width:96%"  readonly/>
			  <input type="hidden" name="requestTaskDTO.assigneeNo" id="requestEdit_addTask_assigneeNo"/>
           </td>
        </tr>
        <tr>
            <td colspan="4">
              
                <input type="hidden" name="requestTaskDTO.requestNo" value="${param.eno}">
				<input type="hidden" name="requestTaskDTO.createdByNo" value="1">
				<input type="hidden" name="requestTaskDTO.tno" value="0" id="requestEdit_taskNo">
                <a id="requestEdit_saveBtn"  class="easyui-linkbutton" icon="icon-save"><fmt:message key="common.save" /></a>
      		</td>
        </tr>
    </table>
    </div>
   </form>
</div>



</div>
