伟德BETVICTOR描述:一款简单快速的前后端分页双套代码
更新时间:2018/1/10 下午5:49:58更新说明:修改双击效果失败的bug
更新时间:2018/1/3 下午5:20:02更新说明:$(e.$element.selector).find("input[name='checkList']").removeAttr('checked');
var x = $(this).index('.cjjTable-remove');
$(e.$element.selector).find("input[name='checkList']").get(x).checked = true;
$(e.$element.selector).find("input[name='checkBoth']").removeAttr('checked');添加$(e.$element.selector),防止所有的input[name='']变化
更新时间:2018/1/2 下午4:15:55更新说明:新增了前后端分页的删除跟批量删除功能前台分页的样子$('#histroyBox').CJJTable({
title: ["装点", "卸点", "运输货物", "下单日期", "作者"], //thead中的标题 必填
body: ["taskCode", "startAddr", "endAddr", "varietiesTypeName", "createDate", "customerName"], //tbody td 取值的字段 必填
display: [1, 1, 1, 1, 2, 1], //隐藏域,1显示,2隐藏 必填
pageNUmber: 10, //每页显示的条数 选填
pageLength: data.length, //选填
url: data, //数据源 必填
operation: 1, //操作单行 1操作 0不操作
dbTrclick: function(e, ar) { //双击tr事件
},
buttonSave: function(ar) {
alert(JSON.stringify(ar))
},
buttonRemove: function(ar) {
console.log(ar)
$('#histroyBox').CJJReload();
}
});后台分页的样子$('#histroyBox').CJJTable({
title: ["装点", "卸点", "运输货物", "下单日期"], //thead中的标题 必填
body: ["contactName", "contactMobliePhone", "carrierName", "taskNum", "taskCustomerExpectPrice", "taskCustomerBudgetFreight"], //tbody td 取值的字段 必填
display: [1, 1, 1, 1, 2, 2], //隐藏域,1显示,2隐藏 必填
pageJson: {
taskId: 528710,
pageSize: 10, //ajax请求参数中的每页展示数量 选填
token: "yJUmunFeG3REqisYAmCfeA"
},
url: '/api/quoted/quotedList', //数据源 必填
operation: 1, //操作单行 1操作 0不操作
dbTrclick: function(e, ar) { //双击tr事件
alert(JSON.stringify(ar))
},
buttonSave: function(e) {
alert(JSON.stringify(e))
},
buttonRemove: function(ar) {
console.log(ar)
$('#histroyBox').CJJReload();
}
});更新时间:2017/12/27 11:11:00更新说明:新增操作单行的数据的修改保存//前台分页的样子
$('#histroyBox').CJJTable({
title: ["装点", "卸点", "运输货物", "下单日期", "作者"], //thead中的标题 必填
body: ["taskCode", "startAddr", "endAddr", "varietiesTypeName", "createDate", "customerName"], //tbody td 取值的字段 必填
display: [1, 1, 1, 1, 1, 2], //隐藏域,1显示,2隐藏 必填
pageNUmber: 10, //每页显示的条数 选填
pageLength: data.length, //选填
url: data, //数据源 必填
operation: 1, //操作单行 1操作 0不操作
dbTrclick: function(e) { //双击tr事件
alert(e.find('.taskCode').html())
},
buttonSave: function(e) {
console.log(e)
}
});
//后台分页的样子
/*$('#histroyBox').CJJTable({
title:["装点","卸点","运输货物","下单日期"],//thead中的标题 必填
body:["contactName","contactMobliePhone","carrierName","taskNum","taskCustomerExpectPrice","taskCustomerBudgetFreight"],//tbody td 取值的字段 必填
display:[1,1,1,1,2,2],//隐藏域,1显示,2隐藏 必填
pageJson:{
taskId:528710,
pageSize:10,//ajax请求参数中的每页展示数量 选填
token:"yJUmunFeG3REqisYAmCfeA"
},
url:'/api/quoted/quotedList',//数据源 必填
operation:1,//操作单行 1操作 0不操作
dbTrclick:function(e){ //双击tr事件
alert(e.find('.contactName').html())
},
buttonSave:function(e){
console.log(e)
}
});*/