<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ include file="/include/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
<title>编辑</title>
<%@ include file="/include/header.jsp"%>
<link type="text/css" rel="stylesheet" href="${ctx}/css/baseFrame.css" />
<style>
	
</style>
</head>
<body>
	<div class="b_box" style="max-height:550px;overflow:auto;">
		<table class="c_table m_t10">
			<tr>
				<td class="t_tit star">CodeNo</td>
				<td class="inputCon"><input type="text" id="CodeNo" name="CodeNo" data-key="CodeNo" /></td>
			</tr>
			<tr>
				<td class="t_tit star">ItemNo</td>
				<td class="inputCon"><input type="text" id="ItemNo" name="ItemNo" data-key="ItemNo"/></td>
			</tr>
			<tr>
				<td class="t_tit">ItemName</td>
				<td class="inputCon"><input type="text" id="ItemName" name="ItemName"  data-key="ItemName"/></td>
			</tr>
			<tr>
				<td class="t_tit">Itemaval</td>
				<td class="inputCon"><input type="text" id="Itemaval" name="Itemaval" data-key="Itemaval"/></td>
			</tr>
			<tr>
				<td class="t_tit">SortNo</td>
				<td class="inputCon"><input type="text" id="SortNo" name="SortNo" data-key="SortNo"/></td>
			</tr>
			<tr>
				<td class="t_tit">IsInUse</td>
				<td class="inputCon"><input type="text" id="IsInUse" name="IsInUse" data-key="IsInUse"/></td>
			</tr>
			<tr>
				<td class="t_tit">ItemDescribe</td>
				<td class="inputCon"><input type="text" id="ItemDescribe" name="ItemDescribe"   data-key="ItemDescribe"/></td>
			</tr>
			<tr>
				<td class="t_tit">ItemAttribute</td>
				<td class="inputCon"><input type="text" id="ItemAttribute" name="ItemAttribute" data-key="ItemAttribute" /></td>
			</tr>
			<tr>
				<td class="t_tit">Attribute1</td>
				<td class="inputCon"><input type="Attribute1"  name="Attribute1" data-key="Attribute1"/></td>
			</tr>
			<tr>
				<td class="t_tit">Attribute2</td>
				<td class="inputCon"><input type="Attribute2" name="Attribute2" data-key="Attribute2"/></td>
			</tr>
			<tr>
				<td class="t_tit">Attribute3</td>
				<td class="inputCon"><input type="Attribute3"  name="Attribute3" data-key="Attribute3" /></td>
			</tr>
			<tr>
				<td class="t_tit">Attribute4</td>
				<td class="inputCon"><input type="Attribute4"  name="Attribute4" data-key="Attribute4"/></td>
			</tr>
			<tr>
				<td class="t_tit">Attribute5</td>
				<td class="inputCon"><input type="Attribute5"  name="Attribute5" data-key="Attribute5"/></td>
			</tr>
			<tr>
				<td class="t_tit">Attribute6</td>
				<td class="inputCon"><input type="Attribute6"  name="Attribute6" data-key="Attribute6"/></td>
			</tr>
			<tr>
				<td class="t_tit">Attribute7</td>
				<td class="inputCon"><input type="Attribute7"  name="Attribute7" data-key="Attribute7"/></td>
			</tr>
			<tr>
				<td class="t_tit">Attribute8</td>
				<td class="inputCon"><input type="Attribute8"  name="Attribute8" data-key="Attribute8"/></td>
			</tr>
			<tr>
				<td class="t_tit">InputUser</td>
				<td class="inputCon"><input type="InputUser" name="InputUser" data-key="InputUser"/></td>
			</tr>
			<tr>
				<td class="t_tit">InputTime</td>
				<td class="inputCon"><input type="InputTime"  name="InputTime" data-key="InputTime"/></td>
			</tr>
			<tr>
				<td class="t_tit">InputOrg</td>
				<td class="inputCon"><input type="InputOrg" id="InputOrg" name="InputOrg" data-key="InputOrg"/></td>
			</tr>
			<tr>
				<td class="t_tit">UpdateTime</td>
				<td class="inputCon"><input type="UpdateTime" id="UpdateTime" name="UpdateTime" data-key="UpdateTime"/></td>
			</tr>
			<tr>
				<td class="t_tit">UpdateUser</td>
				<td class="inputCon"><input type="UpdateUser" id="UpdateUser" name="UpdateUser" data-key="UpdateUser"/></td>
			</tr>
			<tr>
				<td class="t_tit">Remark</td>
				<td class="inputCon"><input type="Remark" id="Remark" name="Remark" data-key="Remark"/></td>
			</tr>
			<tr>
				<td class="t_tit">HelpText</td>
				<td class="inputCon"><input type="HelpText" id="HelpText" name="HelpText" data-key="HelpText"/></td>
			</tr>
		</table>
	</div>
	<div class="m_t10 t_c">
		<input type="button" class="b_btn" id="addUser" value="确定" />
	</div>
	
	<script type="text/javascript">	
		$(function(){
			$("#addUser").click(function(){
				var CodeNo=$("#CodeNo").val();
				var ItemNo=$("#ItemNo").val();
				/*var ItemName=$("#ItemName").val();
				var Itemaval=$("#Itemaval").val();
				var ItemDescribe=$("#ItemDescribe").val();
				var ItemAttribute=$("#ItemAttribute").val();
				var IsInUse=$("#IsInUse").val();
				var SortNo=$("#SortNo").val();*/
				if(CodeNo.trim() == ""||ItemNo.trim() == ""){
					alert("必输项不能为空！");
					return;
				}
				var re={};
				$(".inputCon input").each(function(){
					var key2=$(this).data("key")+'';
					re[key2] = $(this).val();
				});
				console.log(JSON.stringify(re));
				$.ajax({
					type:"post",
					data:{re:JSON.stringify(re)},
					url:"${ctx}/outService/addCode.do",
					success:function(result){
							if(result=="该参数已存在"){
								alert(result);
								return;
							}else if(result=="添加成功！"){
								alert(result);
								parent.location.replace("${ctx}/sysPara/codeLibrary.do");
							}else{
								alert("添加失败");
								parent.location.replace("${ctx}/sysPara/codeLibrary.do");
							}
					}
				})
			});
			
			/*$.ajax({
			type:"POST",
			data: {markUser:markUser,caseName:caseName,applyReasonList:applyReasonList,markMess:markMess,groupNo:id},
			url:"${ctx}/outService/sendResearch.do",//请求接口
			success:function(result){
				if(result.status=="err"){
					alert(result.mess);
					return;
				}else{
					
				}						
			}*/			
		});	
	</script>
</body>
</html>