随笔 - 59  文章 - 0  评论 - 2  阅读 - 48030

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

复制代码
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();

posted on   在delphi路上  阅读(2148)  评论(0编辑  收藏  举报
< 2025年1月 >
29 30 31 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 1
2 3 4 5 6 7 8

点击右上角即可分享
微信分享提示