var
limitcount = 10;
var
curnum = 1;
function
productsearch(productGroupId,start,limitsize) {
layui.use([
'table'
,
'laypage'
,
'laydate'
],
function
(){
var
table = layui.table,
laydate=layui.laydate,
laypage = layui.laypage;
table.render({
elem:
'#layui_table_id'
, url:
'<%=path%>/xx/pListQuery.html?pId='
+productGroupId+
'¤tPage='
+ start+
'¤tNumber='
+ limitsize
, cols: [[
{field:
'productId'
, title:
'ID'
, width:
'170'
, sort:
true
}
, {field:
'productName'
, title:
'名称'
, width:
'450'
}
, {field:
'productState'
, title:
'状态'
, width:
'100'
}
, {field:
'effectTime'
, title:
'生效时间'
, width:
'120'
, sort:
true
}
, {field:
'invalidTime'
, title:
'失效时间'
, width:
'120'
, sort:
true
}
, {field:
'productCost'
, title:
'成本'
, width:
'100'
, sort:
true
}
, {field:
'poperation'
, title:
'操作'
, width:
'100'
,fixed:
'right'
, toolbar:
'#barDemo'
}
]]
, page:
false
, height: 430
,done:
function
(res, curr, count){
laypage.render({
elem:
'laypage'
,count:count
,curr:curnum
,limit:limitcount
,layout: [
'prev'
,
'page'
,
'next'
,
'skip'
,
'count'
,
'limit'
]
,jump:
function
(obj,first) {
if
(!first){
curnum = obj.curr;
limitcount = obj.limit;
productsearch(productGroupId,curnum,limitcount);
}
}
})
}
})
table.on(
'tool(test)'
,
function
(obj){
var
data = obj.data
,layEvent = obj.event;
if
(layEvent ===
'detail'
){
viewLableInfo(data.attrId);
layer.msg(data.attrId);
}
else
if
(layEvent ===
'del'
){
layer.msg(
'删除'
);
}
else
if
(layEvent ===
'edit'
){
layer.msg(
'编辑操作'
);
}
});
laydate.render({
elem:
'#createDate'
});
laydate.render({
elem:
'#processingTime'
});
});
}
var
pId =
'${pGBean.pgId }'
;
productsearch(pId, curnum, limitcount);