學到這部分的時候。感覺有點頭暈。不停的大括弧小括弧還有方括弧。呵呵。
給大家分享一下吧。
var top = new Ext.FormPanel({
labelAlign: 'left',
frame: true,
id: 'top',
title: '訂單基本資料',
width: 700,
items: [{
layout: 'column',
items: [{
columnWidth: .5,
layout: 'form',
items: [{
xtype: 'textfield',
fieldLabel: '訂單編號',
allowBlank: false, //不可為空的設定
blankText: "不可為空,請填寫",
name: 'DistributionNo',
anchor: '95%'
}, {
xtype: 'datefield',
fieldLabel: '簽訂日期',
name: 'SubscribeDate',
anchor: '95%'
}, {
xtype: 'datefield',
fieldLabel: '交貨日期',
name: 'ContractDeliveryDate',
anchor: '95%'
}, {
xtype: 'textfield',
fieldLabel: '銷售金額(萬元)',
name: 'Cost',
vtype: 'money',
anchor: '95%
}]
}, {
columnWidth: .5,
layout: 'form',
items: [{
xtype: 'textfield',
fieldLabel: '評審表編號',
name: 'SyndicNo',
anchor: '95%'
}, {
xtype: 'textfield',
fieldLabel: '合約編號',
name: 'ContractNo',
anchor: '95%'
}, {
xtype: 'datefield',
fieldLabel: '合約評審時間',
name: 'ContractSyndicDate',
anchor: '95%'
}]
}]
}],
buttons: [{
text: '儲存',
type: 'submit'
},
{
text: '重設'
}]
});