js 通用订单代码

 对于订单,想必大家并不陌生吧,下为大家介绍下使用js实现的订单,感兴趣的朋友可以参考下 

代码如下:
<%@ page language="java" contentType="text/html; charset=utf-8" 
pageEncoding="utf-8"%> 
<% 
String path = request.getContextPath(); 
String basePath = request.getScheme() + "://" 
+ request.getServerName() + ":" + request.getServerPort() 
+ path + "/"; 
%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
<title>查询系统</title> 
<link rel="stylesheet" type="text/css" 
href="http://www.jeasyui.com/easyui/themes/default/easyui.css"> 
<link rel="stylesheet" type="text/css" 
href="http://www.jeasyui.com/easyui/themes/icon.css"> 
<link rel="stylesheet" type="text/css" 
href="http://www.jeasyui.com/easyui/demo/demo.css"> 
<script type="text/javascript" 
src="http://code.jquery.com/jquery-1.6.min.js"></script> 
<script type="text/javascript" 
src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script> 
<script type="text/javascript" 
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"> 
 
<style type="text/css"> 
form { 
margin: 0; 
padding: 0; 

 
.dv-table td { 
border: 0; 

 
.dv-table input { 
border: 1px solid #ccc; 

</style> 
</head> 
<body> 
<table id="dg" title="预订装修管理" class="easyui-datagrid" 
style="width: 1200px; height: 590px" url="<%=basePath%>findSubsByPage.action" 
toolbar="#toolbar" pagination="true" rownumbers="true" 
fitColumns="true" singleSelect="true"> 
<thead> 
<tr> 
<th field="tel" width="40">联系方式</th> 
<th field="name" width="20">联系人</th> 
<th field="nametype" width="30">装修名称</th> 
<th field="orderTime" width="50">预订时间</th> 
<th field="content" width="50">备注内容</th> 
<th field="sex" width="20">性别</th> 
<th field="nowTime" width="50">提交时间</th> 
<!-- <th field="status" width="10">状态</th> --> 
 
</tr> 
</thead> 
</table> 
<div id="toolbar"> 
<div id="toolbar"> 
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="destroyUser()">删除订单</a> 
<a href="javascript:void(0)" class="easyui-linkbutton" id="unorder">未成交订单</a> <a 
href="javascript:void(0)" class="easyui-linkbutton" id="order">已成交订单</a> <a href="javascript:void(0)" 
class="easyui-linkbutton" id="ok">成交</a> 
</div> 
</div> 
<table> 
<tr> 
<td colspan="1"></td> 
</tr> 
</table> 
<script type="text/javascript"> 
$(function() { 
$("#unorder").click(function() { 
var url = "../findSubsByPage.action"; 
$.post(url, { 
status : 0 
}, function() { 
$('#dg').datagrid('reload'); 
}); 
}); 
$("#order").click(function() { 
var url = "../findSubsByPage.action"; 
$.post(url, { 
status : 1 
}, function() { 
$('#dg').datagrid('reload'); 
}); 
}); 
$("#ok").click(function() { 
var url = "../updateSub.action"; 
var row = $('#dg').datagrid('getSelected'); 
var elem = $(this).closest('.item'); 
if (row != null) { 
$.confirm({ 
'title' : '操作确认提示', 
'message' : '您确认要进行此成交操作?', 
'buttons' : { 
'Yes' : { 
'class' : 'blue', 
'action' : function() { 
elem.slideUp(); 
$.post(url, { 
id : row.id 
}, function() { 
$('#dg').datagrid('reload'); 
}); 

}, 
'No' : { 
'class' : 'gray', 
'action' : function() { 
 



}); 
} else { 
alert("您未选中任何信息!"); 

}); 
setInterval(function() { 
$('#dg').datagrid('reload'); 
}, 60000); 
}); 
function destroyUser() { 
var row = $('#dg').datagrid('getSelected'); 
if (row) { 
$.messager.confirm('操作提示', 
'您确定要删除此条订单?', 
function(r) { 
if (r) { 
$.post('../deleteSub.action', { 
id : row.id 
}, function(result) { 
if (result.success) { 
$('#dg').datagrid('reload'); // reload the user data 
} else { 
$.messager.show({ // show error message 
title : 'Error', 
msg : result.errorMsg 
}); 

}, 'json'); 

}); 


</script> 
<script language="JavaScript"> 
function myrefresh() 

window.location.reload(); 

setTimeout('myrefresh()',3000000); //指定5秒刷新一次 
</script> 
<style type="text/css"> 
#fm { 
margin: 0; 
padding: 10px 30px; 

 
.ftitle { 
font-size: 14px; 
font-weight: bold; 
padding: 5px 0; 
margin-bottom: 10px; 
border-bottom: 1px solid #ccc; 

 
.fitem { 
margin-bottom: 5px; 

 
.fitem label { 
display: inline-block; 
width: 80px; 

</style> 
</body> 
</html> 
 

时间: 2024-08-01 15:58:56

js 通用订单代码的相关文章

js 通用订单代码_javascript技巧

复制代码 代码如下: <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServer

JS通用代码:Tab选项卡通用js代码

自己一直在用的 js通用选项卡类: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-eq

js刷新页面代码大全

js刷新页面代码大全,需要的朋友可以把本文收藏起来,方便自己查询. js的功能太强大了,就是没有一个好点的编码工具,听说.net2008已经有语法提示了,,可是我还没有用,,过几天在说吧!还是解决问题!找了找,找到了零零星星的片段代码,现在我在这里整理一下,以方便以后用! 有三个页面分别命名为frame.html.top.html.bottom.html frame.html 由上(top.html)下(bottom.html)两个页面组成,代码如下: <frameset rows="50

7种增加网站用户体验的JS脚本分页代码

网页设计中,要考虑的方面很多,当然,大体来说就是两类:代码+UI,简洁的代码加上美观的UI,是一个网站理想的选择,一个网站设计成功与否,很 多时候要从细节入手,关注细节,才能关注用户体验,用户体验的友好,才能说明网站的设计是成功的,下面分享7种JS脚本分页代码,让细节到从内容页面的分 页上来,高手可以飘过,这是写给不懂JS的朋友看的. <script language="JavaScript"> <!-- /* 7种分页脚本定义 ===================

vba操作Excel经典的通用的代码之一

  MyColumn=Target.Column 获取活动单元格所在的列号 MyRow=Target.Row 获取活动单元格所在的行号 工作表名.UsedRange.Rows.Count 指定工作表已使用的行的总数 工作表名.UsedRange.Columns.Count 指定工作表已使用的列的总数 工作表名.Cells(行号, 列号).Value 获取指定工作表某个单元格的值 Worksheets(m).Cells(i, j).Value 使用通用的序号方法,调用某个工作表的某个单元格的数据

javascript-淘宝图片上传预览 删除 和恢复删除 js或jq代码 急用请务必帮忙 万分感谢

问题描述 淘宝图片上传预览 删除 和恢复删除 js或jq代码 急用请务必帮忙 万分感谢 本地上传图片的预览 会有删除 恢复删除 来回切换的功能 只要本地上传功能 就可以了 请大神帮帮忙 非常感谢 这是demo http://jsbin.com/yedutofafe/edit?html,output 解决方案 http://blog.sina.com.cn/s/blog_9c6c8ea90101crgo.html

js的加密代码,如何改为php 的代码?

问题描述 js的加密代码,如何改为php 的代码? 最近做一个android的app需要实现一个异步登陆的过程. 需要登陆的网站登陆是需要对用户密码和验证码加密后验证的.我app用webview可以 获取js加密文本之后加密,在进行登陆.但是这样耗时. 为想在服务器把js加密文档写成php的.请问js加密文档写成php可行吗?或者有什么更好的方法亦或者是js在服务器端运行的好方法? 解决方案 如果你有算法,就可以改写.但是要考虑到从客户端手机到服务器的传输过程中的安全性问题.比如说有人在wifi

node js-求助:node.js 如何做代码静态检查?

问题描述 求助:node.js 如何做代码静态检查? 如题,给位大神,给推荐个工具或者方法吧,最好附上检查的详细方法或者工具使用方法,谢谢了! 解决方案 还真不知道nodeJS的 代码检查工具,试试javascript的代码检查工具把 解决方案二: http://www.51testing.com/html/87/300987-818864.html 解决方案三: 谢谢大神,回复的这么及时,赞!

easyui弹出层在最顶层显示跳出iframe框架通用javascript代码

原文:easyui弹出层在最顶层显示跳出iframe框架通用javascript代码 有时候我们用easyui在后台框架中弹框的时候,总是显示在框架页面里面而不是整个系统框架的上面,看着有些不太乐意. dialog = function (opts) { var query = parent.$, fnClose = opts.onClose; opts = query.extend({ title: 'My Dialog', width: 400, height: 220, closed: f