Project

General

Profile

Bug #1539 » HR_APP_fnWinLookOrgPos_20220909.js

Tri Rizqiaty, 09/09/2022 02:20 PM

 
1
var f_key_date =  Ext.getCmp("start_date" + suff_id);
2
var key_date = ""; 
3
if (f_key_date != undefined) key_date = f_key_date.getValue();
4
Ext.QuickTips.init();
5
////---- add by Tri nwh 20220901 start
6
/*var md = cmbMasterData.getValue();
7
console.log(md);
8
var empid = hidEmpId.getValue();
9
var empid_ = fldTransempid.getValue();
10
var percode = perCode.getValue();
11
var accesscode = accessCode.getValue();
12
var mdcat = mdCat.getValue();
13
var gen;
14
if (empid == undefined) {
15
	gen = percode + mdcat + accesscode + "0002" + empid_;
16
} else {
17
	gen = percode + mdcat + accesscode + "0002" + empid;
18
}
19
if (md == '0055') {
20
	gen = percode + mdcat + accesscode + "0055" + empid;
21
}
22
key_date = Ext.getCmp('start_date' + gen).getValue();*/
23
console.log(key_date);
24
////---- add by Tri nwh 20220901 end
25
// dataTreeOrgPos.load({baseParams:{tree_struct_code:"O-O-P"}});
26
var randomnumber = Math.floor(Math.random() * 101);
27
var windowOpened = new Ext.Window({
28
			id : 'myWin' + randomnumber,
29
			height : 400,
30
			width : 500,
31
			layout : 'fit',
32
			modal : true,
33
			plain : true,
34
			closeAction : 'hide',
35
			title : 'Organization Management',
36
			items : [pnlTreeOrgPos, fldLookPosID, fldLookOrgID, fldLookCCID,
37
					fldLookJobID],
38
			tools : [{
39
						id : 'refresh',
40
						qtip : 'Refresh',
41
						// hidden:true,
42
						handler : function(event, toolEl, panel) {
43
							// refresh logic
44
						pnlTreeOrgPos.getLoader().baseParams.key_date = key_date;							
45
						pnlTreeOrgPos.getRootNode().reload();
46
							// alert('Refresh Failed');
47
						}
48
					}]
49
		});
50
_serialRandomize.setValue(windowOpened.id);
51
windowOpened.show();
52
pnlTreeOrgPos.getLoader().baseParams.key_date = key_date;
53
pnlTreeOrgPos.getRootNode().reload();
(2-2/5)