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

Posted 在delphi路上

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何使用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();

以上是关于如何使用Ext.create() 调用一个窗体的主要内容,如果未能解决你的问题,请参考以下文章

Extjs弹出个窗体,关闭,再点击就出现了两个窗体,怎样关闭再打开只有一个窗体onclick=function()

Extjs4 MVC、Ext.define() 和 Ext.create()

请问在Delphi里如何从一个窗体调用另一个窗体?

C#中如何在一个窗体中调用另一个窗体控件中的数据?

在C#中,如何在一个窗体中调用另一个窗体的数据?

delphi 子窗体如何调用父窗体的方法