<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

	<div id="index_timeCost_window" class="easyui-window" closed="true" collapsible="false" minimizable="false" maximizable="false" modal="true" title="<fmt:message key="common.add" />/<fmt:message key="common.edit" />" style="width:500px;height:auto">
	<form>
		<input type="hidden" name="costDTO.progressId" id="index_timeCost_progressId" />
		<input type="hidden" name="costDTO.eno" id="index_timeCost_eno" />
		<input type="hidden" name="costDTO.eventType" id="index_timeCost_eventType"/>
		<div class="lineTableBgDiv">
      		<table style="width:100%" class="lineTable" cellspacing="1">
			<tr>
				<td><fmt:message key="label.request.theTechnician" />&nbsp;<span style="color:red">*</span></td>
				<td>
					<input id="index_timeCost_tcName" onclick="itsm.security.userUtil.selectUser('#index_timeCost_tcName','#index_timeCost_tcId','#index_timeCost_perHourFees','loginName')"  class="easyui-validatebox choose" required="true" readonly="readonly"/>
					<input type="hidden" name="costDTO.userId" id="index_timeCost_tcId"  /></td>
			</tr>

			<tr>
				<td><fmt:message key="title.executeTime" /></td>
				<td><input name="costDTO.opertionTime" id="index_timeCost_opertionTime" class="easyui-datebox choose"/></td>
			</tr>
			<tr>
				<td><fmt:message key="title.spendTime" />(<fmt:message key="label.sla.hour" />)</td>
				<td>
					<input name="costDTO.useTime" id="index_timeCost_useTime" class="easyui-numberbox input" onKeyUp="clacCost()"/>
					<script>
					
					function clacCost(){
						
						var useTime=$('#index_timeCost_useTime').val()
						var perHour=$('#index_timeCost_perHourFees').val();
						var otherFees=$('#index_timeCost_othersFees').val();
						
						if(useTime==""){
							useTime=0;
						}
						
						if(otherFees==""){
							otherFees=0;
						}
						
						
						var skillFees=eval(useTime)*eval(perHour);
						var totalFees=eval(skillFees)+eval(otherFees);
						
						$('#index_timeCost_skillFees').val(skillFees);
						$('#index_timeCost_totalFees').val(totalFees);

					}
					
					</script>
				</td>
			</tr>
			
			<tr>
				<td><fmt:message key="titie.technicianPerHourCost" />(<span id="index_timeCost_perHourFees_currency"></span>)</td>
				<td><input name="costDTO.perHourFees" id="index_timeCost_perHourFees" class="input" onKeyUp="clacCost()" precision="2" readonly /></td>
			</tr>
			
			<tr>
				<td><fmt:message key="titie.technicianCost" />(<span id="index_timeCost_skillFees_currency"></span>)</td>
				<td><input name="costDTO.skillFees" id="index_timeCost_skillFees" class="easyui-numberbox input" onKeyUp="clacCost()" precision="2" readonly/></td>
			</tr>
			<tr>
				<td><fmt:message key="title.otherCost" />(<span id="index_timeCost_othersFees_currency"></span>)</td>
				<td><input name="costDTO.othersFees" id="index_timeCost_othersFees" class="easyui-numberbox input" onKeyUp="clacCost()" precision="2"/>
				
				</td>
			</tr>
			
			<tr>
				<td><fmt:message key="title.totalCost" />(<span id="index_timeCost_totalFees_currency"></span>)</td>
				<td><input name="costDTO.totalFees" id="index_timeCost_totalFees" class="input" precision="2" readonly/>
				</td>
			</tr>
			
			<tr>
				<td><fmt:message key="label.user.description" /></td>
				<td>
					<textarea class="textarea" name="costDTO.description" id="index_timeCost_description" style="height:38px"></textarea>
				</td>
			</tr>
			<tr>
				<td><fmt:message key="title.change.belongsStage" /></td>
				<td>
					<input name="costDTO.stage" id="index_timeCost_belongsStage" class="input"/>
				</td>
			</tr>
			<tr>
				<td><fmt:message key="title.change.result" /></td>
				<td>
					<input type="radio" name="costDTO.status" id="index_timeCost_statusProcessing" value="1" checked="checked"/><fmt:message key="title.processing" />
					<input type="radio" name="costDTO.status" id="index_timeCost_statusComplete" value="2" /><fmt:message key="titie.complete" />
				</td>
			</tr>
			<tr>
				<td><fmt:message key="title.request.task" /></td>
				<td>
					<input type="hidden" name="costDTO.taskId" id="index_timeCost_costTaskId">
					<input name="wdDTO.eventTask" id="index_timeCost_costTaskTitle" class="choose" readonly />
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<br>
					<a class="easyui-linkbutton" icon="icon-ok" id="index_timeCost_save"><fmt:message key="common.save"/></a>
				</td>
			</tr>
		</table>
		</div>
	</form>
	</div>
