<div id="cycle" class="easyui-layout" data-options="fit:true,border:false">
<div data-options="region:'west',title:'列表',split:true,border:false" style="width:350px;">
<table id="cycle_index_datagrid">
</table>
</div>
<div id="staff_cycle_detail" class="easyui-layout" data-options="region:'center',title:'详情',border:false">
<table id="staff_cycle_index_datagrid" class="easyui-datagrid">
</table>
</div>
</div>
$("#cycle_index_datagrid").datagrid({
url: '{:U("cycle/index")}',
idField: 'staff_id',
fit: true,
fitColumns: true,
singleSelect: true,
rownumbers: true,
pagination: true,
border: false,
pageSize: c_page_size,
pageList: c_page_list,
toolbar: '#cycle_index_toolbar',
columns: [[
{field: 'staff_id', checkbox:true},
{field: 'staff_name', title: '业务员', align: 'center'},
{field: 'mobile', title: '电话',align: 'center'},
{field: 'job_post', title: '职位', align: 'center'},
]],
onLoadSuccess: function () {
},
onSelect: function(index,row) {
// var
// alert(row.staff_id);
//$('#pp').panel('open').panel('refresh','new_content.php');
var cycle_times=0;
$.ajax({
url: '{:U("cycle/getCycleTimes")}',
dataType: 'json',
success:function(rsp){
if(rsp.result){
cycle_times=rsp.message;
url="__URL__/cycle?cycle_times="+cycle_times+"&staff_id="+row.staff_id; $('#staff_cycle_detail').panel('open').panel('refresh',url); //选择某一行刷新右边的面板
}else{
message(rsp.message);
return;
}
}
});
}
})