日期:2014-05-16 浏览次数:20467 次
/*!
* Ext JS Library 3.4.0
* Copyright(c) 2006-2011 Sencha Inc.
* licensing@sencha.com
* http://www.sencha.com/license
*/
var form;
var win;
Ext.onReady(function(){
// sample static data for the store
var data = [
[110,'A112',002,'xiaoli','男','9/1 12:00am','1231212121212','汉族','团员','杭电','本科','学士','计算机','007','公证员','1021','135881212','11111@qq.com','环城西路33号','英语','六级','二级','9/1 12:00am','在职','篮球','跑步','在职','W1111','无职','平民','是','有','CY2323','是','ZX2312','9/1 12:00am','教学','无','是','9/1 12:00am','是','9/1 12:00am','理工','本科','9/1 12:00am','哲学','jklx']
];
// create the data store
var store = new Ext.data.ArrayStore({
fields: [
{name: 'sqm'},
{name: 'rybm', type: 'fit'}
],
data: data
});
// get a form
function getUpdateForm(){
form = new Ext.form.FormPanel({
width: 500,
height: 300,
// title: 'User Details',
defaultType: 'textfield',
closeAction:'hide',
autoDestroy :false,
padding: 10,
autoScroll:true,
labelWidth: 90,
tabr:[{
text:'确定'
},{
text:'取消'
}],
items:[{
fieldLabel: '授权码',
name : 'sqm',
id:'sqm'
// allowBlank : false,
// anchor:'100%' // anchor width by percentage
},{
fieldLabel: '机构编码',
name : 'rybm',
allowBlank : false,
id:'rybm'
// anchor:'100%' // anchor width by percentage
}]
});
return form;
}
// create the Grid
// To use locking functionality we must explicitly specify the LockingColumnModel and the LockingGridView
var grid = new Ext.grid.GridPanel({
store: store,
title:'人员信息表',
tbar:[{
text:'新增',
id:'addNewOne',
iconCls: 'add16',
onClick:function(){
//alert('gg');
if(!form){
form=getUpdateForm();
}
if(!win){
var&n