代码如下:var addForm = new Ext.form.FormPanel({});
addForm = SYSADMIN.ReceivePost.dataForm.cloneConfig({
id:'addForm'
});var postNethotComboboxPanel = new Ext.form.ComboBox({
listConfig:{
emptyText:'未找到匹配值',//当值不在列表时的显示内容
maxHeight:'60' //下拉最大高度
},
fieldLabel : "发货网点",
id:'postDomain',
triggerAction:'all', //单击出发按钮显示全部数据
displayField:'COMPANY_NAME',//显示字段
valueField:'RS_VALUE', //值字段
mode:'local', //本地模式
selectOnFocus:true,
editable:false,
//allowBlank:false,
disabled:true,
store:CmpStore //设置数据源
})var formWin = new Ext.Window({
title: '新建运单',
width: 1050,
height: 500,
modal:true,
iconCls:'input',
autoScroll: true,
closeAction:'hide',
plain:true,
modal: true,
closable:true,
items: [addForm],
buttons: [{
text: '保存并打印',
iconCls:'define-icn-save',
handler: function(btn){
//业务代码
}
},{
text: '保存',
iconCls:'define-icn-save',
handler: function(btn){
//业务代码
}
}]
}); var businessFm = new Ext.form.FormPanel({
id: 'dataform',
frame : true,
labelAlign : "right",
labelWidth: 70,
paramOrder: ['goodsId'],
defaults: {
labelSeparator: ':'
},
items: [
{
columnWidth :.5,
layout : 'column',
items : [
{
columnWidth :.5,
layout : "form",
items : [postNethotComboboxPanel]
}
]
}
],
api: {
load: BusinessManageReceivePostDJNDomain.getCompanyListByCompanyCode,
submit: BusinessManageReceivePostDJNDomain.saveGoods
}
});运行后的效果图,首次打开效果如下:隐藏后再次打开:
ExtJSJavaScript布局
addForm = SYSADMIN.ReceivePost.dataForm.cloneConfig({
id:'addForm'
});var postNethotComboboxPanel = new Ext.form.ComboBox({
listConfig:{
emptyText:'未找到匹配值',//当值不在列表时的显示内容
maxHeight:'60' //下拉最大高度
},
fieldLabel : "发货网点",
id:'postDomain',
triggerAction:'all', //单击出发按钮显示全部数据
displayField:'COMPANY_NAME',//显示字段
valueField:'RS_VALUE', //值字段
mode:'local', //本地模式
selectOnFocus:true,
editable:false,
//allowBlank:false,
disabled:true,
store:CmpStore //设置数据源
})var formWin = new Ext.Window({
title: '新建运单',
width: 1050,
height: 500,
modal:true,
iconCls:'input',
autoScroll: true,
closeAction:'hide',
plain:true,
modal: true,
closable:true,
items: [addForm],
buttons: [{
text: '保存并打印',
iconCls:'define-icn-save',
handler: function(btn){
//业务代码
}
},{
text: '保存',
iconCls:'define-icn-save',
handler: function(btn){
//业务代码
}
}]
}); var businessFm = new Ext.form.FormPanel({
id: 'dataform',
frame : true,
labelAlign : "right",
labelWidth: 70,
paramOrder: ['goodsId'],
defaults: {
labelSeparator: ':'
},
items: [
{
columnWidth :.5,
layout : 'column',
items : [
{
columnWidth :.5,
layout : "form",
items : [postNethotComboboxPanel]
}
]
}
],
api: {
load: BusinessManageReceivePostDJNDomain.getCompanyListByCompanyCode,
submit: BusinessManageReceivePostDJNDomain.saveGoods
}
});运行后的效果图,首次打开效果如下:隐藏后再次打开:
ExtJSJavaScript布局
var postNethotComboboxPanel = new Ext.form.ComboBox({
listConfig : {
emptyText : '未找到匹配值',//当值不在列表时的显示内容
maxHeight : '60' //下拉最大高度
},
fieldLabel : "发货网点",
id : 'postDomain',
triggerAction : 'all', //单击出发按钮显示全部数据
displayField : 'COMPANY_NAME',//显示字段
valueField : 'RS_VALUE', //值字段
mode : 'local', //本地模式
selectOnFocus : true,
editable : false,
//allowBlank:false,
disabled : true,
store : CmpStore
//设置数据源
})
var businessFm = new Ext.form.FormPanel(
{
id : 'dataform',
frame : true,
labelAlign : "right",
labelWidth : 70,
items : [ {
columnWidth : .5,
layout : 'column',
items : [ {
columnWidth : .5,
layout : "form",
items : [ postNethotComboboxPanel ]
} ]
} ]
});
var formWin = new Ext.Window({
title : '新建运单',
width : 1050,
height : 500,
modal : true,
iconCls : 'input',
autoScroll : true,
closeAction : 'hide',
plain : true,
modal : true,
closable : true,
items : [ businessFm ],
buttons : [ {
text : '保存并打印',
iconCls : 'define-icn-save',
handler : function(btn) {
//业务代码
}
}, {
text : '保存',
iconCls : 'define-icn-save',
handler : function(btn) {
//业务代码
}
} ]
});
试了下 没有问题啊