$('#dg').datagrid({
//url: "",
title: ' 客户列表',
iconCls: 'icon-customer',
fit: false,
fitColumns: true,
//remoteSort: false,
idField: "ID",
method: 'get',
//onClickRow: onClickRow,
onDblClickRow: onClickRow,
//striped: true,
rownumbers: true,
//singleSelect: true,
scrollbarSize: 1,
selectOnCheck: true,
autoRowHeight: false,
toolbar: "#tb",
emptyMsg: '没有更多数据',
columns: [[
{field:'ID',checkbox:true},
{ field: 'CustomerNo', title: '客户编号', width: 200, align: 'center',editor:'text'},
{ field: 'ShortName', title: '客户简称', width: 100, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
{ field: 'FullName', title: '客户全称', width: 200, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
{
field: 'Currency', title: '结算币别', width: 100, align: 'center',
editor:
{
type: 'combobox', options: {
valueField: 'value',
textField: 'text',
required: true,
data: [
{ value: "USD", text: "USD" },
{ value: "JPY", text: "JPY" },
{ value: "RMB", text: "RMB" },
{ value: "HKD", text: "HKD" },
]
}
}
},
{ field: 'Saler', title: '营业担当', width: 100, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
{ field: 'Phone', title: '联系电话', width: 100, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
{ field: 'Mail', title: '联系邮箱', width: 100, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
{ field: 'Address', title: '地址', width: 100, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
{ field: 'Remark', title: '备注信息', width: 100, align: 'center', editor: 'text' },
{
field:"linkid",
title: '操作', width: 100, align: 'center',
formatter: function (value, row, index) {
var currid = row.ID;
return "<a href='add.html?id=" + currid + "'>编辑</a> <a href='javascript:void' class='list_del_a' d='" + currid + "'>删除</a>";
}
}
]]
});
//url: "",
title: ' 客户列表',
iconCls: 'icon-customer',
fit: false,
fitColumns: true,
//remoteSort: false,
idField: "ID",
method: 'get',
//onClickRow: onClickRow,
onDblClickRow: onClickRow,
//striped: true,
rownumbers: true,
//singleSelect: true,
scrollbarSize: 1,
selectOnCheck: true,
autoRowHeight: false,
toolbar: "#tb",
emptyMsg: '没有更多数据',
columns: [[
{field:'ID',checkbox:true},
{ field: 'CustomerNo', title: '客户编号', width: 200, align: 'center',editor:'text'},
{ field: 'ShortName', title: '客户简称', width: 100, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
{ field: 'FullName', title: '客户全称', width: 200, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
{
field: 'Currency', title: '结算币别', width: 100, align: 'center',
editor:
{
type: 'combobox', options: {
valueField: 'value',
textField: 'text',
required: true,
data: [
{ value: "USD", text: "USD" },
{ value: "JPY", text: "JPY" },
{ value: "RMB", text: "RMB" },
{ value: "HKD", text: "HKD" },
]
}
}
},
{ field: 'Saler', title: '营业担当', width: 100, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
{ field: 'Phone', title: '联系电话', width: 100, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
{ field: 'Mail', title: '联系邮箱', width: 100, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
{ field: 'Address', title: '地址', width: 100, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
{ field: 'Remark', title: '备注信息', width: 100, align: 'center', editor: 'text' },
{
field:"linkid",
title: '操作', width: 100, align: 'center',
formatter: function (value, row, index) {
var currid = row.ID;
return "<a href='add.html?id=" + currid + "'>编辑</a> <a href='javascript:void' class='list_del_a' d='" + currid + "'>删除</a>";
}
}
]]
});