Project

General

Profile

Bug #2379 » fnWinLookOrgPos_202310251712.js

Muhammad Bintar, 11/16/2023 11:16 AM

 
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
// dataTreeOrgPos.load({baseParams:{tree_struct_code:"O-O-P"}});
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(); console.log(key_date);
23
var randomnumber = Math.floor(Math.random() * 101);
24
var windowOpened = new Ext.Window({
25
			id : 'myWin' + randomnumber,
26
			height : 400,
27
			width : 500,
28
			layout : 'fit',
29
			modal : true,
30
			plain : true,
31
			closeAction : 'hide',
32
			title : 'Organization Management',
33
			items : [pnlTreeOrgPos, fldLookPosID, fldLookOrgID, fldLookCCID,
34
					fldLookJobID],
35
			tools : [{
36
						id : 'refresh',
37
						qtip : 'Refresh',
38
						// hidden:true,
39
						handler : function(event, toolEl, panel) {
40
							// refresh logic
41
						pnlTreeOrgPos.getLoader().baseParams.key_date = key_date;							
42
						pnlTreeOrgPos.getRootNode().reload();
43
							// alert('Refresh Failed');
44
						}
45
					}]
46
		});
47
_serialRandomize.setValue(windowOpened.id);
48
windowOpened.show();
49
pnlTreeOrgPos.getLoader().baseParams.key_date = key_date;
50
pnlTreeOrgPos.getRootNode().reload();
(5-5/7)