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


<link rel="stylesheet" type="text/css" href="../scripts/jquery/easyui/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="../scripts/jquery/easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../scripts/jquery/jqgrid/redmond/jquery-ui-1.8.1.custom.css" />
	<link rel="stylesheet" type="text/css" href="../scripts/jquery/jqgrid/css/jqgrid.css" /> 
    <link rel="stylesheet" type="text/css" href="../styles/style.css">
	<link rel="stylesheet" type="text/css" href="../styles/comm.css">
	<link rel="stylesheet" type="text/css" href="../scripts/jquery/easyui/datetimepicker/jquery-calendar.css"/>
	<link rel="stylesheet" type="text/css" href="../scripts/jquery/easyui/datetimepicker/styles.css"/>
	<link rel='stylesheet' type='text/css' href='../scripts/jquery/fullcalendar-1.4.3/fullcalendar.css' />
	<!--jquery ui 样式-->
	<script src="../scripts/jquery/jquery-1.4.2.min.js"></script>
	<script src="../scripts/jquery/jquery-ui-1.8.2.custom/js/jquery-ui-1.8.2.custom.min.js"></script>
	<script src="../scripts/jquery/easyui/jquery.easyui.min.js"></script>
	<script src="../scripts/jquery/jquery.query-2.1.7.js"></script>
	<script src="../scripts/jquery/jquery-json.js"></script>
	<script src="../scripts/jquery/jqgrid/js/jqGrid.js"></script>
	<script src="../scripts/jquery/jstree/js/lib/jquery.cookie.js"></script>
	<script src="../scripts/jquery/jstree/js/lib/jquery.hotkeys.js"></script>
	<script src="../scripts/jquery/jstree/js/jquery.jstree.js"></script>
	

<title>请求回访</title>
<script>

	function kk(){
		
		var tab = document.getElementById("requestVisit_table_web") ;
	    //表格行数
	    var rows = tab.rows.length;
	    
	    var visitRecord='';
	    for(var i=0;i<rows;i++){
	    	var _value = $("input[@type=radio][name=visitItemValue"+i+"][checked]").val();
	    	if(_value==undefined){
	    		_value=$('#visitItemValue'+i).val();
	    	}
	    	visitRecord=visitRecord+$('#visitItemName'+i).val()+":"+_value+"<br><hr>"
	    }
		setTimeout(function(){
			$('#request_visitRecord_web').val(visitRecord);
			var frm = $('#requestVisit_web_win form').serialize();
			alert(frm);
			//$.post('request!saveRequestOptLog.action',frm+'&requestDTO.visitState=1',function(){
				//$('#requestVisit_win').window('close');
				//reOpeRequestInfo();
				//msgShow(i18n['msg_request_reViewSuccessful'],'show');
				
				
			//});
		},0);
	}
</script>
<div id="requestVisit_web_win"  title="请求回访" class="easyui-panel" collapsible="false" minimizable="false" 
maximizable="false" closable="false" style="height:auto;padding:0px;background:#fafafa;">
	<form>
	<input type="hidden" name="requestOptLogDTO.logTitle" value="请求用户提交回访结果" />
	<input type="hidden" name="requestDTO.optType" value="requestVisit" />
	<input type="hidden" name="requestDTO.visitRecord" id="request_visitRecord_web"/>
	<table width="100%" >
	<tr>
		<td colspan="2">请求回访</td>
	</tr>
	<tr>
		<td colspan="2">
			<table  width="100%" id="requestVisit_table_web">
				<s:iterator value="paDto.data" status="visit">                  
					<tr>
						<td>${visit.index+1}</td>
						<td>${visitName}<input type="hidden" id="visitItemName${visit.index}" value="${visitName}" /></td>
						<td>
							<s:if test="visitItemType=='text'">
								<input id="visitItemValue${visit.index}" />
							</s:if>
							<s:if test="visitItemType=='checkbox'">
								<s:iterator value="visitItems" status="visitItem">
									<input type="checkbox"  name="visitItemValue${visit.index}" value="${visitItemName}" />${visitItemName}
								</s:iterator>
							</s:if>
							<s:if test="visitItemType=='radio'">
								<s:iterator value="visitItems" status="visitItem">
									<s:if test="#visitItem.index==0">
										<input name="visitItemValue${visit.index}" checked="checked" type="radio" value="${visitItemName}" />${visitItemName}
									</s:if>
									<s:else>
										<input name="visitItemValue${visit.index}" type="radio" value="${visitItemName}" />${visitItemName}	
									</s:else>
				 				</s:iterator>
							</s:if>
						</td>
					</tr>
				</s:iterator>
			</table>
		</td>
	</tr>
	
	<tr>
		<td colspan="2">
			<a href='javascript:kk()'><fmt:message key="common.save" /></a>
		</td>
	</tr>
	</table>
	</form>
</div>
