复代码代码如下:
<%@ 페이지 언어="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%
문자열 경로 = request.getContextPath();
문자열 basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ 경로 + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<머리>
<title>查询系统</title>
<link rel="스타일시트" type="텍스트/css"
href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
<link rel="스타일시트" type="텍스트/css"
href="http://www.jeasyui.com/easyui/themes/icon.css">
<link rel="스타일시트" type="텍스트/css"
href="http://www.jeasyui.com/easyui/demo/demo.css">
<스크립트 유형="텍스트/자바스크립트"
src="http://code.jquery.com/jquery-1.6.min.js"></script>
<스크립트 유형="텍스트/자바스크립트"
src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<스크립트 유형="텍스트/자바스크립트"
src="http://www.jeasyui.com/easyui/datagrid-detailview.js"></script>
<script src="<%=basePath %>js/jquery.confirm.js"></script>
<link rel="stylesheet" href="<%=basePath %>css/jquery.confirm.css">
<스타일 유형="텍스트/css">
형태 {
여백: 0;
패딩: 0;
}
.dv-테이블 td {
테두리: 0;
}
.dv-테이블 입력 {
테두리: 1px 실선 #ccc;
}
</style>
</head>
<본문>
<테이블 ID="dg"
스타일="너비: 1200px; 높이: 590px" url="<%=basePath%>findSubsByPage.action"
도구 모음="#toolbar" 페이지 매김="true" rownumbers="true"
fitColumns="true" 단일 선택="true">
<머리>
<tr>
<th field="tel">정보 연결</th>
<th field="name">联系人</th>
<th field="nametype">정보 이름</th>
<th field="orderTime">주문 시간</th>
<th field="content">备注内容</th>
<th field="sex">성별</th>
<th field="nowTime">提交时间</th>
<!-- <th field="status">상태</th> -->
</tr>
</thead>
</table>
<div id="도구 모음">
<div id="도구 모음">
<a href="javascript:void(0)" iconCls="icon-remove" plain="true" onclick="destroyUser()">删除订单</a>
<a href="javascript:void(0)" id="unorder">未成交订单</a> <a
href="javascript:void(0)" id="order">재성공</a> <a href="javascript:void(0)"
class="easyui-linkbutton" id="ok">성공</a>
</div>
</div>
<테이블>
<tr>
<td colspan="1"></td>
</tr>
</table>
<스크립트 유형="텍스트/자바스크립트">
$(함수() {
$("#unorder").click(function() {
var url = "../findSubsByPage.action";
$.post(URL, {
상태 : 0
}, 기능() {
$('#dg').datagrid('다시 로드');
});
});
$("#order").click(함수() {
var url = "../findSubsByPage.action";
$.post(URL, {
상태 : 1
}, 기능() {
$('#dg').datagrid('다시 로드');
});
});
$("#ok").click(function() {
var url = "../updateSub.action";
var row = $('#dg').datagrid('getSelected');
var elem = $(this).closest('.item');
if (행 != null) {
$.확인({
'제목': '操작품确认提示',
'메시지': '您确认要进行此成交操작품?',
'버튼': {
'예' : {
'클래스': '파란색',
'액션': 함수() {
elem.slideUp();
$.post(URL, {
id : 행.id
}, 기능() {
$('#dg').datagrid('다시 로드');
});
}
},
'아니요' : {
'클래스': '회색',
'액션': 함수() {
}
}
}
});
} 또 다른 {
Alert("您未选中任何信息!");
}
});
setInterval(함수() {
$('#dg').datagrid('다시 로드');
}, 60000);
});
함수 destroyUser() {
var row = $('#dg').datagrid('getSelected');
if (행) {
$.messager.confirm('작성',
'您确定要删除此条订单?',
함수(r) {
만약 (r) {
$.post('../deleteSub.action', {
id : 행.id
}, 함수(결과) {
if (결과.성공) {
$('#dg').datagrid('다시 로드'); // 사용자 데이터를 다시 로드합니다.
} 또 다른 {
$.messager.show({ // 오류 메시지 표시
제목 : '오류',
msg : 결과.오류Msg
});
}
}, 'json');
}
});
}
}
</script>
<스크립트 언어="자바스크립트">
함수 myrefresh()
{
window.location.reload();
}
setTimeout('myrefresh()',3000000); //정의5秒刷새로운 일次
</script>
<스타일 유형="텍스트/css">
#fm {
여백: 0;
패딩: 10px 30px;
}
.f제목 {
글꼴 크기: 14px;
글꼴 두께: 굵게;
패딩: 5px 0;
여백 하단: 10px;
테두리 하단: 1px 단색 #ccc;
}
.fitem {
여백 하단: 5px;
}
.fitem 라벨 {
디스플레이: 인라인 블록;
너비: 80px;
}
</style>
</body>
</html>