$(example&).dataTable().fnDraw(false); &此函数就是处理请求后,还维持在本页
下面是自己的jsp页面代码
&%@ page language=&java& contentType=&text/ charset=UTF-8& pageEncoding=&UTF-8& %&
&%@ taglib prefix=&c& uri=&/jsp/jstl/core& %&
&c:set value=&${pageContext.request.contextPath}& var=&ctx& /&
&style type=&text/css& title=¤tStyle&&
@import &${ctx}/js/DataTables-1.8.0/media/css/demo_page.css&;
@import &${ctx}/js/DataTables-1.8.0/media/css/demo_table.css&;
@import &${ctx}/css/hyipmessage.css&;
@import &${ctx}/js/DataTables-1.8.0/examples/examples_support/themes/smoothness/jquery-ui-1.8.4.custom.css&;
&link rel=&stylesheet& type=&text/css& media=&screen& href=&${ctx}/js/jquery-validation-1.8.1/demo/css/screen.css& /&
&link rel=&stylesheet& type=&text/css& href=&${ctx}/css/qbao.dialog.css& /&
&link rel=&stylesheet& type=&text/css& href=&${ctx}/js/My97DatePicker/skin/WdatePicker.css& /&
&script type=&text/javascript& src=&${ctx}/js/DataTables-1.8.0/media/js/jquery.dataTables.min.js&&&/script&
&script type=&text/javascript& src=&${ctx}/js/jquery-ui-1.8.13/js/jquery.form.min.js&&&/script&
&script type=&text/javascript& src=&${ctx}/js/moment/moment.js&&&/script&
&script type=&text/javascript& src=&${ctx}/js/My97DatePicker/WdatePicker.js&&&/script&
&script type=&text/javascript& src=&${ctx}/js/hyip.js&&&/script&
&script type=&text/javascript&&
$(document).ready(function () {
createTable();
$('#search').click(createTable);
$('#reasonDialog').dialog({
modal: true,
position: 'center',
autoOpen: false,
width: 500,
height: 350,
buttons: {
'确认': function () {
var idReason = $('#idReason').val();
var reason = $('#reason').val();
if (reason.length & 50) {
alert(&原因不能大于50个字符&);
HYIP.ajax('${ctx}/checkManage/check.html', {
id: idReason,
checkStatus: 2,
reason: reason
}, function (data) {
$('#reasonDialog').dialog('close');
HYIP.showDynamicMsg('hyip_float_message', 'hyip-success', data.message);
$(example&).dataTable().fnDraw(false);
}, function (data) {
HYIP.showDynamicErrorMsg(data.message);
}, '取消': function () {
$('#reason').val('');
$('#reasonDialog').dialog('close');
$('#exportDialog').dialog({
modal: true,
position: 'center',
autoOpen: false,
width: 500,
height: 350,
buttons: {
'确认': function () {
//装载ajax参数
var shopId = $.trim($('#shopId').val());
var goodsId = $.trim($('#goodsId').val());
var applyId = $.trim($('#applyId').val());
var goodsName = $.trim($('#goodsName').val());
var checkStatus = $(checkStatus&).val();
var startTimeS = $.trim($('#startTimeS').val());
var startTimeE = $.trim($('#startTimeE').val());
var modelType =
$.trim($('#modelType').val());
var categoryNameA = $.trim($('#categoryNameA').val());
$('#shopIdExcel').val(shopId);
$('#goodsIdExcel').val(goodsId);
$('#applyIdExcel').val(applyId);
$('#goodsNameExcel').val(goodsName);
$('#checkStatusExcel').val(checkStatus);
$('#modelTypeExcel').val(modelType);
$('#categoryNameAExcel').val(categoryNameA);
$('#startTimeSExcel').val(startTimeS);
$('#startTimeEExcel').val(startTimeE);
$(hiddenForm&).submit();
$('#exportDialog').dialog('close');
}, '取消': function () {
$('#exportDialog').dialog('close');
function createTable() {
$('#demo').html('&table cellpadding=&0& cellspacing=&0& border=&0& class=&display& id=&example&&&/table&');
$('#example').dataTable({
'iDisplayLength': 15,
'bSortClasses': false,
'bSort': false,
'sPaginationType': 'full_numbers',
&sDom&: '&&top&i&rtp&&clear&&', //页面上元素位置
'aoColumns': [
{'sTitle': '申请ID', 'sClass': 'center', 'sWidth': '5%'},
{'sTitle': '商家ID', 'sClass': 'center', 'sWidth': '5%'},
{'sTitle': '商家名称', 'sClass': 'center', 'sWidth': '10%'},
{'sTitle': '商品信息', 'sClass': 'center', 'sWidth': '15%'},
{'sTitle': '商户类型', 'sClass': 'center', 'sWidth': '5%'},
{'sTitle': '一级类目', 'sClass': 'center', 'sWidth': '5%'},
{'sTitle': '拍卖类型', 'sClass': 'center', 'sWidth': '5%'},
{ 'sTitle': '申请时间', 'sClass': 'center', 'sWidth': '10%' },
{'sTitle': '原价(钱宝币)', 'sClass': 'center', 'sWidth': '9%'},
{'sTitle': '起拍价(钱宝币)', 'sClass': 'center', 'sWidth': '9%'},
{'sTitle': '最低竞拍价(钱宝币)', 'sClass': 'center', 'sWidth': '9%'},
{'sTitle': '可参与库存', 'sClass': 'center', 'sWidth': '10%'},
// { 'sTitle': '场次', 'sClass': 'center', 'sWidth': '10%' },
{'sTitle': '状态', 'sClass': 'center', 'sWidth': '9%'},
{'sTitle': '操作', 'sClass': 'center', 'sWidth': '10%'}
'oLanguage': {
'sProcessing': '加载数据中...',
'sInfo': '当前显示
_START_ 到
_END_ 条记录,总共
_TOTAL_ 条',
'sInfoEmpty': '',
'sZeroRecords': '暂无消息',
'oPaginate': {'sFirst': '首页', 'sPrevious': '上一页', 'sNext': '下一页', 'sLast': '末页'},
&sEmptyTable&: &没有记录&
'bProcessing': true,
'bServerSide': true,
'sAjaxSource': '${ctx}/checkManage/listApplyRecords.html',
'fnServerData': function (sSource, aoData, fnCallback) {
//装载ajax参数
var shopId = $.trim($('#shopId').val());
if (shopId != null && shopId != '') {
aoData.push({name: 'shopId', value: shopId});
var categoryNameA = $.trim($('#categoryNameA').val());
if (categoryNameA != '') {
aoData.push({name: 'categoryNameA', value: categoryNameA});
var applyId = $.trim($('#applyId').val());
if (applyId != null && applyId != '') {
aoData.push({name: 'applyId', value: applyId});
var goodsId = $.trim($('#goodsId').val());
if (goodsId != null && goodsId != '') {
aoData.push({name: 'goodsId', value: goodsId});
var goodsName = $.trim($('#goodsName').val());
if (goodsName != null && goodsName != '') {
aoData.push({name: 'goodsName', value: goodsName});
var checkStatus = $(checkStatus&).val();
if (checkStatus != null && checkStatus != '') {
aoData.push({name: 'checkStatus', value: checkStatus});
var startTimeS = $.trim($('#startTimeS').val());
var startTimeE = $.trim($('#startTimeE').val());
if (startTimeS != '') aoData.push({name: 'startTimeS', value: startTimeS});
if (startTimeE != '') aoData.push({name: 'startTimeE', value: startTimeE});
var modelType =
$.trim($('#modelType').val());
if (modelType != '') {
aoData.push({name: 'modelType', value: modelType});
HYIP.ajax(sSource, aoData, function (resp) {
var result = resp.
var records = result.aaD
var aaData = [];
var buttons = [];
var modelT
if (records != null) {
for (var i = 0; i & records. i++) {
var record = records[i];
buttons = [];
buttons.push('&input type=&button& class=&btn& style=&cursor:& onclick=&showDetail(' + record.id + ');& value=&查看& /&');
if (record.checkStatus == 0) {
buttons.push('&input type=&button& class=&btn& style=&cursor:& onclick=&pass(' + record.id + ');& value=&通过& /&');
buttons.push('&input type=&button& class=&btn& style=&cursor:& onclick=&refuse(' + record.id + ');& value=&不通过& /&');
var checkStatus = record.checkS
var checkStatusStr = '';
if (checkStatus == 0) {
checkStatusStr = '待审核';
} else if (checkStatus == 1) {
checkStatusStr = '审核通过';
} else if (checkStatus == 2) {
checkStatusStr = '审核未通过';
} else if (checkStatus == 3) {
checkStatusStr = '已发布';
}else if (checkStatus == 4) {
checkStatusStr = '已撤销';
var shopInfo =
var operate =
var goodsInfo = record.goodsI
var goodsInfoList = [];
if (goodsInfo == null || goodsInfo == '') {
goodsInfoList[0] = '';
goodsInfoList[1] = '';
goodsInfoList[2] = '';
goodsInfoList = goodsInfo.split(&,&);
if (record.type == 0) {
modelType = '下跌式';
} else if (record.type == 1) {
modelType = '加价式';
}else if (record.type == 2){
modelType = '幸运夺宝';
}else if (record.type == 3){
modelType = '限时抢';
if(record.applyTime != null && record.applyTime != &&){
applyTime = moment(record.applyTime).format(&YYYY-MM-DD HH:mm:ss&);
aaData.push([
record.id,
record.shopId,
record.shopName,
goodsInfoList[0] + '&/br&商品ID:' + goodsInfoList[1] + '&/br&' + goodsInfoList[2],
record.shopTypeName,
record.categoryNameA,
modelType,
applyTime,
record.normalPrice,
record.startPrice,
record.lowestPrice,
record.goodsNum,
// record.periodTimeStr,
checkStatusStr,
buttons.join(' ')
fnCallback({
'sEcho': result.sEcho,
'iTotalRecords': result.itotalRecords,
'iTotalDisplayRecords': result.itotalDisplayRecords,
'aaData': aaData
function pass(id) {
HYIP.ajax('${ctx}/checkManage/check.html', {id: id, checkStatus: 1}, function (data) {
HYIP.showDynamicMsg('hyip_float_message', 'hyip-success', data.message);
createTable();
$(example&).dataTable().fnDraw(false);
}, function (data) {
HYIP.showDynamicErrorMsg(data.message);
function refuse(id) {
$('#idReason').val(id);
$('#reasonDialog').dialog('open');
function trimText(obj) {
$(obj).val($.trim($(obj).val()));
function showDetail(id) {
window.location.href = '${ctx}/checkManage/toShowDetail.html?id=' +
function exportExcel(){
$('#exportDialog').dialog('open');
&div id=&page_content& class=&content&&
&div class=&span_title&&审核管理&/div&
&div class=&selectBox&&
申请ID:&input type=&text& name=&applyId& id=&applyId& onblur=&trimText(this);& /&
商家ID:&input type=&text& name=&shopId& id=&shopId& onblur=&trimText(this);& /&
商品ID:&input type=&text& name=&goodsId& id=&goodsId& onblur=&trimText(this);& /&
商品名称:&input type=&text& name=&goodsName& id=&goodsName& onblur=&trimText(this);& /&
&div class=&div_blank&& &/div&
&%--商户类型:--%&
&%--&select id=&type&&--%&
&%--&option value=&-1&&全部&/option&--%&
&%--&option value=&0&&认证商家(付费)&/option&--%&
&%--&option value=&1&&认证商家(达标)&/option&--%&
&%--&option value=&2&&企业商家&/option&--%&
&%--&/select&--%&
一级类目:
&select id=&categoryNameA& name=&categoryNameA&&
&option value=&-99&&全部&/option&
&c:if test=&${not empty categoryNameList}&&
&c:forEach items=&${categoryNameList}& var=&categoryNameList& varStatus=&idx&&
&li &c:if test=&${idx.index & 0 }&&style=&display:&&/c:if&&
&option value=${categoryNameList.categoryNameA}&${categoryNameList.categoryNameA}&/option&
&/c:forEach&
&/select&
拍卖类型:&select id=&modelType& name=&modelType&&
&option value=&99&&全部&/option&
&option value=&0&&下跌式&/option&
&option value=&1&&加价式&/option&
&option value=&2&&幸运夺宝&/option&
&option value=&3&&限时抢&/option&
&/select&
申请时间:&input type=&text& name=&startTimeS& id=&startTimeS& onclick=&WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})& /& 至
&input type=&text& name=&startTimeE& id=&startTimeE& onclick=&WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})& /&
审核状态:
&select id=&checkStatus&&
&option value=&-1&&全部&/option&
&option value=&0& selected=&selected&&待审核&/option&
&option value=&1&&审核通过&/option&
&option value=&2&&审核未通过&/option&
&option value=&4&&已撤销&/option&
&input type=&button& value=&查询& id=&search& class=&btn& style=&cursor:& /&
&input type=&button& value=&导出& id=&exportExcel& class=&btn& style=&cursor:&
onclick=&exportExcel()&/&
&div id=&demo&&&/div&
&div id=&reasonDialog& title=&不通过原因& style=&display: none&&
&p&&input id=&idReason& type=&hidden& /&
&textarea id=&reason& rows=&3& cols=&30&&&/textarea&
&div id=&exportDialog& title=&导出确认& style=&display: none&&
&p&&input id=&isExcelExport& type=&hidden& /&
确定要导出该数据吗?
&form id=&hiddenForm& action=&/checkManage/listCheckExport.html& method=&post&&
type=&hidden& id=&shopIdExcel& name=&shopIdExcel& value=&&&
type=&hidden& id=&applyIdExcel& name=&applyIdExcel& value=&&&
type=&hidden& id=&goodsIdExcel& name=&goodsIdExcel& value=&&&
type=&hidden& id=&goodsNameExcel& name=&goodsNameExcel& value=&&&
type=&hidden& id=&checkStatusExcel& name=&checkStatusExcel& value=&&&
type=&hidden& id=&modelTypeExcel& name=&modelTypeExcel& value=&&&
type=&hidden& id=&categoryNameAExcel& name=&categoryNameAExcel& value=&&&
type=&hidden& id=&startTimeSExcel& name=&startTimeSExcel& value=&&&
type=&hidden& id=&startTimeEExcel& name=&startTimeEExcel& value=&&&
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:24264次
排名:千里之外
原创:14篇
转载:23篇
(1)(2)(2)(1)(4)(2)(1)(1)(8)(7)(1)(6)(1)
(window.slotbydup = window.slotbydup || []).push({
id: '4740881',
container: s,
size: '200,200',
display: 'inlay-fix'4191人阅读
linux/unix(21)
首先注意这是一个联合体。真正使用起来,事实上第一个就足够了,也就是void *,后面三个都可以用这个给&包装&起来,因为void * 是c里头的&泛型&。楼主不妨思考为什么会这么设计。以网络编程为例,当设计处理数据包的回调函数的时候,通常你面对的数据类型都是不确定的,依赖于数据包的结构。如果让你来设计epoll_data_t,你会怎么设计???三思~~如果我设计的话,直接一个void *搞定,就如同线程函数一样,线程函数的参数仍然是void *霸气外露。只不过设计epoll_data_t的人可能考虑了一些最最常用的情况,比如,如果你写个网络程序只是随意测试用用,那么传一个int fd就OK了,后面的两位以此类推。所以最后这个结构设计出来就是你现在看到的样子了。总之呢,void *这一项是绝对不可少的,原因省略一万字。。。
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:104156次
积分:2586
积分:2586
排名:第14983名
原创:134篇
转载:107篇
(1)(18)(14)(12)(2)(4)(7)(6)(16)(4)(22)(24)(7)(15)(9)(5)(22)(5)(4)(19)(1)(7)(4)(20)
(window.slotbydup = window.slotbydup || []).push({
id: '4740881',
container: s,
size: '200,200',
display: 'inlay-fix'