EXTJS用法之Ext.Window

EXTJS用法之Ext.Window

弹出一个窗口,窗口中有FORM表单,对FORM表单的提交操作

/**
	 * TODO 修改
	 */
	var modifyAccType =new Ext.form.ComboBox({
		name:'modify.accType',
		hiddenName:'modify.accType',
		fieldLabel:'账户类型',
		store:getDicParamStore("audit_acc_type"),
		emptyText:'-请选择-',
		valueField:'paramDesc',
		displayField:'paramName',
		typeAhead:true,
		editable:false,
		mode:'remote',
		triggerAction:'all',
		width:150,
		selectOnFocus:true
	});
	var modifyBankName = new Ext.form.TextField({
		id:"modify.bankName",
		name:"modify.bankName",
		width:150,
		maxLength:60,
		fieldLabel:"开户行"
	});
	var modifyAccNo = new Ext.form.NumberField({
		id:"modify.accNo",
		name:"modify.accNo",
		width:150,
		maxLength:20,
		fieldLabel:"账号"
	});
	var modifyAccName = new Ext.form.TextField({
		id:"modify.accName",
		name:"modify.accName",
		width:150,
		maxLength:60,
		fieldLabel:"户名"
	});
	var modifyRiskSource = new Ext.form.TextField({
		id:"modify.riskSource",
		name:"modify.riskSource",
		width:150,
		maxLength:2,
		fieldLabel:"风险数据来源"
	});
	var modifyRiskNote = new Ext.form.TextArea({
		id:"modify.riskNote",
		name:"modify.riskNote",
		width:435,
		maxLength:255,
		fieldLabel:"风险原因"
	});
	var modifyOperFlag =new Ext.form.ComboBox({
		name:'modify.operFlag',
		hiddenName:'modify.operFlag',
		fieldLabel:'处理状态',
		store:getDicParamStore("oper_flag"),
		emptyText:'-请选择-',
		valueField:'paramDesc',
		displayField:'paramName',
		typeAhead:true,
		editable:false,
		mode:'remote',
		triggerAction:'all',
		width:150,
		selectOnFocus:true
	});
	var modifyEffectFlag =new Ext.form.ComboBox({
		name:'modify.effectFlag',
		hiddenName:'modify.effectFlag',
		fieldLabel:'处理状态',
		store:getDicParamStore("effect_flag"),
		emptyText:'-请选择-',
		valueField:'paramDesc',
		displayField:'paramName',
		typeAhead:true,
		editable:false,
		mode:'remote',
		triggerAction:'all',
		width:150,
		selectOnFocus:true
	});
	var modifyForm = new Ext.form.FormPanel({
		labelAlign : 'right',
		bodyStyle : 'padding:1px',
		frame : true,
		layout : 'column',
		items : [ 
			{ columnWidth : .5, layout : 'form', items : [modifyAccType] },
			{ columnWidth : .5, layout : 'form', items : [modifyBankName] },
			{ columnWidth : .5, layout : 'form', items : [modifyAccNo] },
			{ columnWidth : .5, layout : 'form', items : [modifyAccName] },
			{ columnWidth : .5, layout : 'form', items : [modifyRiskSource] },
			{ columnWidth : .5, layout : 'form', items : [modifyOperFlag] },
			{ columnWidth : .5, layout : 'form', items : [modifyEffectFlag] },
			{ columnWidth :  1, layout : 'form', items : [modifyRiskNote] }
		]
	});
	var modifySaveBtn = new Ext.Button({
		text:"保存",
		handler:function(){
			Ext.MessageBox.alert("提示","保存");
		}
	});
	var modifyResetBtn = new Ext.Button({
		text:"重置",
		handler:function(){
			modifyForm.form.reset();
		}
	});
	var modifyWindow = new Ext.Window({
		title:"银行账户黑名单管理-修改",
		width : 600,
		height : 250,
		resizable : false,
		closeAction :'hide',
		layout : "fit",
		modal : true,
		items : [modifyForm],
		buttonAlign : 'right',
		listeners : {
			hide : function() {
				modifyForm.getForm().getEl().dom.reset();
			}
		},
		buttons:[modifySaveBtn,modifyResetBtn]
	});

 

你可能感兴趣的:(js,window,ExtJs,submit)