
//设置分页控件 varp = $('#dg').datagrid('getPager');
$(p).pagination({
pageSize: 10, //每页显示的记录条数,默认为10 pageList: [10, 20, 30, 40, 50], //可以设置每页记录条数的列表 beforePageText: '第', //页数文本框前显示的汉字
afterPageText: '页 共 {pages} 页',
displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录'
/*onBeforeRefresh:function(){ $(this).pagination('loading'); alert('before refresh'); $(this).pagination('loaded'); }*/}); $("#CstName").val();
$("#TaskNo").val(),是 否
现在取这些控件的值需要使用下面的方法:
$("#FeedBackDate").datebox("getValue");
$("#IsKfCl").combobox("getValue");
$('#dg').datagrid({
collapsible: false,
fitColumns: true,
singleSelect: true,
remoteSort: false,
sortName: 'RoleName',
sortOrder: 'desc',
nowrap: true,
method: 'get',
loadMsg: '正在加载数据...',
url: '...',
frozenColumns: [[
{ field: 'ck', checkbox: true}
]],
columns: [[
{ field: 'ID', title: 'ID', 80, sortable: true},
{ field: 'Name', title: '名称', 100,sortable:true}
]],
pagination: true,
pageNumber: 1,
rownumbers: true,
toolbar:
[
{
id: 'btnAdd',
text: '添加',
iconCls: 'icon-add',
handler: function() {
$("#name").val("");
add();
}
},
'-',
{
id: 'btnEdit',
text: '编辑',
iconCls: 'icon-edit',
handler: function() {
varselected = $('#dg').datagrid('getSelected');
if(selected) {
varname = selected.Name;
$("#Name").val(name);
edit();
}
}
},
'-',
{
id: 'btnDelete',
text: '删除',
disabled: true,
iconCls: 'icon-remove',
handler: function() {
}
}
]
});
});新增 编辑- 拷贝′ 复制地址· 下载REG 删除y 区域: 客户名称: 查询
pagination: true, pageNumber: 1, rownumbers: true, toolbar: '#tb', ...
//保存functionsaveFeedBackLog(mode,id) {
$.ajax({
type: "POST",
dataType: "json",
//cache:true,
url: "../Ajax/FeedBackLogAjax.ashx?Method=SaveFeedBackLog",
data: { FeedBackDate: $("#FeedBackDate").datebox("getValue"),
CstName: $("#CstName").val(),
TaskNo: $("#TaskNo").val(),
FeedBackContent: $("#FeedBackContent").val(),
CsZrr: $("#CsZrr").combobox("getValue"),
CsYzResult: $("#CsYzResult").val(),
IsKfCl: ,
KfZrr: $("#KfZrr").combobox("getValue"),
EndDate: $("#EndDate").datebox("getValue"),
KfClDate: $("#KfClDate").val(),
Wtyy: $("#Wtyy").val(),
Mode:mode,
ID:id
},
success: function(data) {
//..........functionedit() {
varrowData = $('#dg').datagrid('getSelections');
if(rowData.length == 0) {
$.messager.alert('提示', '请选择要编辑的项!','info');
}
else if(rowData.length > 1) {
$.messager.alert('提示', '只能选择一项进行编辑!','info');
}
else{
_mode = "2";
varrow = $('#dg').datagrid('getSelected');
openDialog();
$('#fm').form('load', row);
_srcCodeManageID = row.SrcCodeManageID;
url = "../Ajax/SrcCodeManageAjax.ashx?Method=SaveSrcCodeManage&ID="+ row.SrcCodeManageID+"&Mode="+_mode;
}
}//保存functionsaveSrc() {
$('#fm').form('submit', {
url: url,
onSubmit: function() {
return$(this).form('validate');
},
success: function(data) {
if(data =="Success") {
$('#dlg').dialog('close'); // close the dialog
$('#dg').datagrid('reload'); // reload the user data
$.messager.alert('提示', '保存成功!', 'info');
}
else if(data=="Error")
{
$.messager.alert('错误', '系统出错!', 'error');
}
}
});
}Copyright © 2009-2022 www.fjjierui.cn 青羊区广皓图文设计工作室(个体工商户)达州站 版权所有 蜀ICP备19037934号