test.jsp 2.15 KB
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>测试管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
	 function ajaxdata(){
		  
		   var obj = new Object();
		   obj.name = $("#name").val();
		   obj.cardcode = $("#cardcode").val();
		   obj.slglh = $("#ywh").val();
		   console.log(JSON.stringify(obj));
		   if (confirm("是否调用部门集成接口获取并回写数据信息?")) {
					$.ajax({
						type : "POST",
						url : "${ctx}/wx/query/progress",
						cache : false,
						data : {"data":JSON.stringify(obj)},
						async : false,
						success : function(modelmap) {
							console.log(modelmap);
							if (modelmap.success) {
								console.log(modelmap.res_data);
								$("#res").val(modelmap.res_data);
							}
						}
					})
		   }
	 }
	
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/test/test/">硕正列表</a></li>
		<shiro:hasPermission name="test:test:edit"><li><a href="${ctx}/test/test/form">组件表单</a></li></shiro:hasPermission>
	</ul>
	
	<form:form id="inputForm" modelAttribute="#" action="${ctx}/test/test/save" method="post" class="form-horizontal">
		
		<div class="control-group">
			<label class="control-label">ywh:</label>
			<div class="controls">
				<input id="ywh" htmlEscape="false" maxlength="200" class="required"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">name:</label>
			<div class="controls">
				<input id="name" htmlEscape="false" maxlength="200" class="required"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">单选框:</label>
			<div class="controls">
				<input id="cardcode" htmlEscape="false" maxlength="200" class="required"/>
			</div>
		</div>
		<input id="button_readInfo" class="btn btn-primary" type="button" value="验证数据信息" onclick="ajaxdata()"/>
		<div class="control-group">
			<label class="control-label">单选框:</label>
		<div class="controls">
				<input id="res" htmlEscape="false" maxlength="200" class="required"/>
			</div>
		</form:form>
	
</body>
</html>