目的: 由後端取得多筆資料,加入現有畫面的 datastore
2>前端如何解碼 JSON 的格式
目的: 由後端取得多筆資料,加入現有畫面的 datastore
目的: 子視窗, 自動填滿畫面的設定
目的: 刷識別證,自動轉成員工帳號 - 識別證卡號自動轉成員工帳號
處理說明 : 1>讀取識別證卡號透過aes apserver , AP Server資訊如下:目的: 設定欄位屬性為 唯讀/必填 (readonly , required ) - 計算欄位(calculate)
處理說明 : 1> { xtype: "textfield", id: "sub_TMNO", name: "sub_TMNO", width: 110,
padding: "0 4 0 0", fieldCls: "required", },
2>{ xtype: "textfield", id: "sub_BRP_", name: "sub_BRP_", width: 100, padding: "0 4 0 0",
readOnly: true, fieldCls: "readonly", },
3>{ id: "STAT_", name: "STAT_", xtype: "textfield", width: 60,
readOnly: true, fieldCls: "calculate", padding: "0 4 0 0" }
目的: 調整 Master-Detail 高度, 並重新顯示畫面
處理說明: 1>設定 Master 高度( var Detail = Ext.getCmp("Detail"); Detail.flex = 2; )
2>重新顯示畫面 - TMMDViewEdit.doLayout();
TMMDViewEdit.on("resize", function (me, width, height, eOpts) {
//顯示高度 - Detail = MasterGrid+Query
var Detail = Ext.getCmp("Detail");
Detail.flex = 2; // tab_D.flex=1; --> Master: tab_D=2:1;
console.log("Detail1", Detail);
tab_D = Ext.getCmp('tab_D');
console.log("2 TMMDViewEdit: ", TMMDViewEdit);
console.log("1 tab_D.getHeight(): ", tab_D.getHeight());
//.doLayout() : Manually force this container's layout to be recalculated.
TMMDViewEdit.doLayout(); //Container.重新計算 layout
});
註意:north和south部分只能設置高度(height),west和east部分只能設置寬度(width)。center區域必須有,且它的大小是在其他4個部分設置好以後自動計算出來的,所以不能為它指定寬度值或高度值。
Ex:var borderPanel = new Ext.Panel({
renderTo: 'borderDiv', layout: 'border', tltle: 'Border Layout', width: 1000, height: 800, defaults: { collapsible: true, // 支持該區域的展開和折疊 split: true, // 支持用戶拖放改變該區域的大小 bodyStyle: 'padding:15px' }, items: [{ title: 'Footer-s', region: 'south', height: 100, minSize: 75, maxSize: 250, html: '這是南邊區域 south' }, { titlr: 'Main Content-c', region: 'center', collapsible: false, html: '這是中間區域 center' },
var fitPanel = new Ext.Panel({ renderTo: 'fitDiv', layout: 'fit', width: 500, height: 300, items: [{ title: 'Fit Panel', html: '111111111111' }] });
var vboxPanel = new Ext.Panel({ renderTo: 'vboxDiv', layout: { type: 'vbox', align: 'stretch' //拉伸使其充滿整個父容器 }, width: 500, height: 300, items: [{ title: 'panel-1', html: 'flex:1', flex: 1 }, { title: 'panel-2', html: 'height:150', height: 150 }, { title: 'panel-3', html: 'flex:2', flex: 2 }] });</span>
目的: 隱藏 Detail.Tab