extjs window嵌套FormPanel ,显示不了FormPanel,求问原因,谢谢大神的指导

琉璃小小楠 2017-11-22 10:46:13

//员工工作经历添加
this.form_ygjob = new Ext.form.FormPanel({
id: 'form_ygjob'
, width: 550
, frame: true
, labelSeparator: ':'
, labelWidth: 90
, labelAlign: 'right'
, layout: 'form'
, style: 'text-align:left;'
, items: [
{
xtype: 'fieldset'
, title: '工作经历'
, layout: 'column'
, items: [
{
columnWidth: .25
, border: false
, scope: this
, layout: 'form'
, items: [
{
xtype: 'textfield'
, id: 'textfirm'
, name: 'txtfirm'
, fieldLabel: '公司名称'
, anchor: '93%'
}
, {
xtype: 'datefield'
, id: 'textworktime'
, name: 'txtworktime'
, fieldLabel: '工作开始时间'
, format: 'Y-m-d'
, anchor: '93%'
}
, {
xtype: 'textfield'
, id: 'textvoucher'
, name: 'txtvoucher'
, fieldLabel: '证明人'
, anchor: '93%'
}
, {
xtype: 'textfield'
, id: 'textleavecause'
, name: 'txtleavecause'
, fieldLabel: '离职原因'
, anchor: '93%'
}
]
}
, {
columnWidth: .25
, border: false
, scope: this
, layout: 'form'
, items: [
{
xtype: 'textfield'
, id: 'textduty'
, name: 'txtduty'
, fieldLabel: '职务'
, anchor: '93%'
}
, {
xtype: 'datefield'
, id: 'textoverworktime'
, name: 'txtoverworktime'
, fieldLabel: '工作结束时间'
, format: 'Y-m-d'
, anchor: '93%'
}
, {
xtype: 'textfield'
, id: 'textvoucherphone'
, name: 'txtvoucherphone'
, fieldLabel: '证明人电话'
, anchor: '93%'
}
, {
xtype: 'textfield'
, id: 'textworkremark'
, name: 'txtworkremark'
, fieldLabel: '工作备注'
, anchor: '93%'
}
]
}
]
}
]
});
this.win_ygjob = new Ext.Window({
id: 'win_ygjob'
, layout: 'fit'
, width: 500
, autoHeight: true
, bodyStyle: 'padding:5'
, animCollapse: true
, closeAction: 'close'
, shadow: false
, modal: true
, items: [this.form_ygjob]
, buttonAlign: 'center'
, buttons: [
new Ext.Button({
text: ' 保 存 '
, id: 'btnsave_ygjob'
, width: 50
, scope: this
, handler: this.save_ygjob
})
, new Ext.Button({
text: ' 取 消 '
, id: 'btnexit_ygjob'
, width: 50
, scope: this
, handler: function () {
this.win_ygjob.hide();
}
})
]
});
//员工工作经历
this.cm_ygjob = new Ext.grid.ColumnModel([
{ header: "编号", dataIndex: "id", align: 'center', width: 50, hidden: true }
, { header: "公司名称", dataIndex: "jobUnit", align: 'center' }
, { header: "职务", dataIndex: "duties", align: 'center' }
, { header: "证明人", dataIndex: "prover", align: 'center' }
, { header: "证明人电话", dataIndex: "proverMobile", align: 'center' }
, { header: "离职原因", dataIndex: "leaveReson", align: 'center' }
, { header: "工作开始时间", dataIndex: "jobStartDate", align: 'center' }
, { header: "工作结束时间", dataIndex: "jobEndDate", align: 'center' }
, { header: "工作备注", dataIndex: "description", align: 'center' }
]);
this.store_ygjob = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({ url: '/Employee/ReadGetOutMaterDet' }),
reader: new Ext.data.JsonReader({
root: 'empList'
}, [
{ name: 'id' }
, { name: 'jobUnit' }
, { name: 'duties' }
, { name: 'prover' }
, { name: 'proverMobile' }
, { name: 'leaveReson' }
, { name: 'jobStartDate' }
, { name: 'jobEndDate' }
, { name: 'description' }
])
});
this.grid_ygjob = new Ext.grid.GridPanel({
id: 'grid_ygjob'
, cm: this.cm_ygjob
, store: this.store_ygjob
, autoDestroy: true
, frame: true
, tbar: [
{
pressed: true
, text: "添加工作经历"
, scope: this
, width: 80
, handler: function () {
this.win_ygjob.show();
this.win_ygjob.setTitle("添加工作经历");
this.form_ygjob.getForm().reset();
Ext.getCmp('btnsave_ygjob').show();
Ext.getCmp('btnexit_ygjob').show();
}
}
]
});
...全文
241 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

8,834

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 组件/控件开发
社区管理员
  • 组件/控件开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧