顯示具有 版面 標籤的文章。 顯示所有文章
顯示具有 版面 標籤的文章。 顯示所有文章

2023年6月18日 星期日

V120202E - 版面配置 - border – [north,center] – [east,center] - region

 目的: V120202E 版面配置 - border – [north,center] – [east,center]

處理說明: 1>1 : [north,center] , north: 必需設 height
                  2>2 : [east,center] , east: 必需設 width



1>*.js
var sub_V120202E_Flds = [
        {
            type: 'panel', bodyStyle: "background-color:transparent;", border: 5, padding: "1",            
            layout: 'border',            
            items: [                
                { // panel1: 過濾條件 : north , 必需設 height
                    xtype: 'panel',
                    id: 'sub_panel1',
                    //title: 'sub_panel1',
                    region: 'north',
                    height: 90,
                    layout:  'border',                        
                    items: [
                        { // panel11 : 退庫人員 , center
                            xtype: 'panel',
                            id: 'sub_panel11',
                            region: 'center',
                            layout: {
                                type: 'vbox',
                                //align: 'stretch'
                            },
                            items: [
                                {
                                  xtype: "fieldcontainer", fieldLabel: "退庫人員", labelWidth: 70, flex: 5, border: 2,
                                    layout: {
                                        type: 'hbox',
                                        //align: 'stretch' 
                                    },
                                    items: [
     { id: "sub_COMPER", name: "sub_COMPER", xtype: "textfield", width: 120, padding: "0 4 0 0", },
     { id: "sub_COMPER_", name: "sub_COMPER_", xtype: "textfield", width: 80, padding: "0 4 0 0", readOnly: true, fieldCls: "readonly", },
                                        {:                                        },
                                        {:                                        },
                                    ]
                                },  // end of 退庫人員
                                {:                 },  // end of 點料人員
                                {:                },                                
                            ]
                        },  //end of sub_panel11 , 退庫人員/點料人員
                        {  // panel12 : 退庫說明 , east , 必需設 width
                            xtype: 'panel',
                            id: 'sub_panel12',
                            //title: 'sub_panel12',
                            //flex: 4,
                            region: 'east',
                            width: 350,
                            layout: {
                                type: 'fit',
                                //align: 'stretch'
                            },
                            items: [
                                {
                                  xtype: "fieldcontainer", fieldLabel: "退庫說明", labelWidth: 60, flex: 5, border: 0,
                                    layout: {
                                        type: 'fit',
                                        //align: 'stretch' 
                                    },
                                    items: [
                                        { id: "sub_CAUSE_REMDK", name: "sub_CAUSE_REMDK", xtype: "textareafield", width: 120, padding: "0 4 0 0", },
                                    ]
                                },  //退庫說明
                            ]
                        },  // end of sub_panel12 , 退庫說明
                    ],
                },//end of sub_panel1
                {  // panel2 : grid , center
                    xtype: 'panel',
                    id: 'sub_panel2',                    
                    region: 'center',        
                    layout: 'fit',
                    flex: 5,
                    border: 1,
                    items: [sub_Grid]
                },                
] // end of   layout: "vbox", padding: "5", items: [
}  //end of  sub_ShowPN_Flds , items[{
    ]      //end of  var sub_ShowPN_Flds 

2023年5月11日 星期四

V20302A - 畫面版面設計 , layout , vbox, hbox

 目的: V20302A - 畫面版面設計 , layout , vbox, hbox

處理說明: 1>layout: { type: "vbox", align: 'stretch' }
                       flex: 設定垂直的比例, 若沒設align: stretch,則items必需設width
                  2>layout: { type: "hbox", align: 'stretch' }
                      flex: 設定水平的比例,若沒設align: stretch,則items必需設height




1>*.js
 //[顯示Email]  - 子畫面欄位
    var sub_ShowEmail_Flds = [
        {
            xtype:'panel',bodyStyle: "background-color:transparent;", border: false, 
            layout: {  type: "vbox",  align: 'stretch' }, padding: "5",
            id: 'sub_myForm', items: [
                {
                    xtype: "fieldcontainer", fieldLabel: "主旨", labelWidth: 60, layout: "fit", flex: 1, items: [
                        {
                            xtype: "textfield", id: "sub_Subjext", name: "sub_Subject",  padding: "0 4 0 0",
                            //value: "AJT",
                        },
                    ]
                },  //end of 主旨
                {
                    xtype: "fieldcontainer", fieldLabel: "內容", labelWidth: 60, layout: "fit", flex: 4, items: [
                        {
                            id: "sub_content", name: "sub_content", xtype: "textfield",  padding: "0 4 0 0",
                            //value: "AJT",
                        },
                    ]
                }, // end of 內容
                {  //下方 TreeView, 左右移,正本/副本
                    xtype: "panel", flex: 5,
                    layout: {type: 'hbox', align: 'stretch' },
                    items: [
                        { // TreeView
                            xtype: "panel", flex: 4, layout: 'fit',                            
                            autoScroll: true, items: [treepanel]
                        },  //TreeView
                        {  //正本&副本.[左移/右移]按鈕
                            xtype: "panel", flex: 2, layout: { type: 'vbox', align: 'stretch' }, border: false,
                            //bodyStyle: 'background:blue; ',
                            items: [
                                {  //  正本.左右移的 Button
                                    xtype: 'panel', id: 'panel_btns1', layout: { type: 'vbox', align: 'stretch' }, flex: 1, border: false,
                                    //bodyStyle: 'background:yellow; ',                                    
                                    items: [                                        
                                        {//space panel
                                            xtype: 'panel',    flex: 1,                                            
                                        },// end of 
                                        {//正本.往右移
                                            xtype: 'button',
                                            id: 'btn_move11',
                                            text: '1往右',
                                            iconCls: 'icon-right',
                                            flex: 1,
                                            handler: function () {
                                            }
                                        },// end of 往右移                                        
                                        {//正本.往左移
                                            xtype: 'button',
                                            id: 'btn_move12',
                                            text: '1往左',
                                            iconCls: 'icon-left',
                                            flex: 1,
                                            handler: function () {
                                            }
                                        },//往左移
                                        {//space panel
                                            xtype: 'panel',flex: 1,
                                        },// end of 
                                    ]
                                }, //panel_btn1
                                {  //  副本.左右移的 Button
                                    xtype: 'panel', id: 'panel_btns2', layout: { type: 'vbox', align: 'stretch' }, flex: 1, border: false,                                    
                                    //bodyStyle: 'background:red; ',
                                    items: [
                                    {//space panel                                    
                                    xtype: 'panel', flex: 1,                                },// end of 
                                        {//副本.往右移
                                            xtype: 'button',
                                            id: 'btn_move21',
                                            text: '2往右',
                                            iconCls: 'icon-right',
                                            flex: 1,
                                            handler: function () {
                                            }
                                        },// end of 往右移
                                        //{ xtype: 'panel', flex: 1, },// end of  虛 space
                                        {//副本.往左移
                                            xtype: 'button',
                                            id: 'btn_move22',
                                            text: '2往左',
                                            iconCls: 'icon-left',
                                            flex: 1,
                                            handler: function () {
                                            }
                                        },//往左移
                                        {//space panel
                                            xtype: 'panel', flex: 1,
                                        },// end of 
                                    ]
                                }, //panel_btn2                                                        
                            ]
                        },  //按鈕
                        {  //正本,副本人員
                            xtype: "panel", flex: 4,                            
                            layout: { type: 'vbox', align: 'stretch' },                            
                            items: [
                                {
                                    xtype: "panel", flex: 1, title: '正本人員', layout: 'fit',                                  
                                     bodyStyle: 'background:yellow; ', 
                                },
                                {
                                    xtype: "panel", flex: 1, title: '副本人員', layout: 'fit',                                                                       
                                    bodyStyle: 'background:blue; ',
                                },
                            ],                            
                        },  //正本副本
                    ]
                }, // end of TreeView                
            ]  //end of sub_myForm
        }]  //end of sub_ShowPN_Flds
        
    console.log(" ShowEmail  step4");   

    var win = getMyWindow("挑選 Email 人員", sub_ShowEmail_Flds, sub_ShowEmail_Btns);