首页 > Windows开发 > 详细

如何使用Ext.create() 调用一个窗体

时间:2017-07-29 12:07:26      阅读:276      评论:0      收藏:0      [点我收藏+]
Ext.define("Scripts.Code.QM.OutgoingQuality.OQC.ReinspRequest.view.DefectContentsDetailInfoWindow", {
    extend: "Ext.window.Window",
    alias: "widget.Ali_DefectContentsDetailInfoWindow",
    initComponent: function () {
        Ext.apply(this, {
            title: "Rework Req  Reg - Defect Content",
            width: 850,
            height: 450,
            modal: true,
            border: 0,
            buttonAlign: "center",
            closeAction: ‘close‘,
            layout: "fit",
            items: [
                Ext.create("Scripts.Code.QM.OutgoingQuality.OQC.ReinspRequest.view.DefectContentsDetailInfo")
            ],
            buttons: [
                {
                    text: "Close",
                    action: "close",
                    scope: this,
                    listeners: {
                        click: function (button) {
                            var win = button.up(‘window‘);
                            win.close();
                        }
                    }
                }
            ]
        });
        this.callParent(arguments);
    }
});

Ext.define("Scripts.Code.QM.OutgoingQuality.OQC.ReinspRequest.view.DefectContentsDetailInfo", {
extend: "Ext.grid.Panel",
alias: ‘widget.Ali_DefectContentsDetailInfo‘,
store: Ext.create("Scripts.Code.QM.OutgoingQuality.OQC.ReinspRequest.store.DefectQtyStore"),//‘DefectQtyStore‘,
border: 0,
viewConfig: {
autoScroll: true,
columnLines: true,
enableTextSelection: true
},
initComponent: function () {
this.columns = [
{ xtype: ‘rownumberer‘, text: ‘NO.‘, width: 30 },
{ header: "Insp. Class", dataIndex: "INSP_CLSF_CODE", width: 166 },
{ header: "Serial No.", dataIndex: "PROD_SN", width: 101 },
{ header: "Insp Art", dataIndex: "INSP_ART_CODE", width: 200 },
{ header: "Insp Dtl Art", dataIndex: "INSP_ART_DTL_CODE", width: 300 },
{ header: "Char. Insp.", dataIndex: "CHAR_INSP_VALUE" },
{ header: "Insp Numal", dataIndex: "NUMAL_INSP_VALUE" },
{ header: "Defect Decision", dataIndex: "DEFT_DECI_CODE" },
{ header: "Defect Type", dataIndex: "DEFT_TYPE_CODE" },
{ header: "Defect Code", dataIndex: "DEFT_CODE", width: 200 },
{ header: "Deft Cause Code", dataIndex: "DEFT_CAUSE_TYPE_CODE" },
{ header: "Deft Cause", dataIndex: "DEFT_CAUSE_CODE" }
];
this.callParent(arguments);
}
}
);

 

不需要引用,用法:

var win = Ext.create("Scripts.Code.QM.OutgoingQuality.OQC.ReinspRequest.view.DefectContentsDetailInfoWindow"); //Ext.widget("Ali_DefectContentsDetailInfoWindow");
win.show();

如何使用Ext.create() 调用一个窗体

原文:http://www.cnblogs.com/hqyj/p/7255327.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!