function f_studentbody() {
//===================================================GRID STUDENT BODY 1
var ds_thnakademik = store_thnakademik2();
var ds_staktiv = store_staktivplusall();
var ds_fak = store_fakultas();
ds_fak.load({
scope : this,
callback: function(records, operation, success) {
Ext.getCmp('cb.fak').setValue(99);
}
});
var isCompare = false;
var kdprodiSelect = '';
var nmprodiSelect = '';
var ds_grid = new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({
url: BASE_URL + 'e_akademic/c_studentbody/grid',
method: 'POST',
success: function(response){
var r = Ext.decode(response.responseText);
if(r.status == false){
Ext.Ajax.request({
url: BASE_URL + 'user/ext_logout',
method: 'POST',
success: function(xhr) {
localStorage.removeItem('access_token');
window.location = BASE_URL + 'user/login';
}
});
}
}
}),
baseParams: {
kdstsemester: KDSTSEMESTER,
kdfakultas: 99
},
root: 'data',
totalProperty: 'results',
autoLoad: true,
fields: [{
name: "kdprodi",
mapping: "kdprodi"
},{
name: "nmprodi",
mapping: "nmprodi"
},{
name: "lnmprodi",
mapping: "lnmprodi"
},{
name: "jumlah",
mapping: "jumlah"
},{
name: "aktif",
mapping: "aktif"
},{
name: "aktif_baru",
mapping: "aktif_baru"
},{
name: "aktif_lama",
mapping: "aktif_lama"
},{
name: "cuti",
mapping: "cuti"
},{
name: "do",
mapping: "do"
},{
name: "keluar",
mapping: "keluar"
},{
name: "lulus",
mapping: "lulus"
},{
name: "nonaktif",
mapping: "nonaktif"
},{
name: "sdd",
mapping: "sdd"
}],
listeners: {
load: function(store, records, options) {
Ext.getCmp('thnakademik').setValue(KDSTSEMESTER);
var cuti = 0, jumlah = 0, aktif = 0, aktifbaru = 0,aktiflama = 0, DO = 0, keluar = 0, lulus = 0, nonaktif = 0, sdd = 0;
ds_grid.each(function (rec) {
jumlah += parseFloat(rec.get('jumlah'));
cuti += parseFloat(rec.get('cuti'));
aktif += parseFloat(rec.get('aktif'));
aktifbaru += parseFloat(rec.get('aktif_baru'));
aktiflama += parseFloat(rec.get('aktif_lama'));
DO += parseFloat(rec.get('do'));
keluar += parseFloat(rec.get('keluar'));
lulus += parseFloat(rec.get('lulus'));
nonaktif += parseFloat(rec.get('nonaktif'));
sdd += parseFloat(rec.get('sdd'));
});
Ext.getCmp('jumlah').setValue(jumlah);
Ext.getCmp('cuti').setValue(cuti);
Ext.getCmp('aktif').setValue(aktif);
Ext.getCmp('aktifbaru').setValue(aktifbaru);
Ext.getCmp('aktiflama').setValue(aktiflama);
Ext.getCmp('do').setValue(DO);
Ext.getCmp('keluar').setValue(keluar);
Ext.getCmp('lulus').setValue(lulus);
Ext.getCmp('sdd').setValue(sdd);
Ext.getCmp('nonaktif').setValue(nonaktif);
Ext.getCmp('thnakademik').enable();
Ext.getCmp('cb.fak').enable();
Ext.getCmp('btnprintstudentbody').enable();
}
}
});
var cm = new Ext.grid.ColumnModel({
defaults: {
sortable: true // columns are not sortable by default
},
columns: [
new Ext.grid.RowNumberer({header: 'No', width: 30, align:'center !important'}), //for rows numbering
{
header: 'Program Studi',
width: 145, align: 'left',
dataIndex: 'lnmprodi', autoSizeColumn: true,
sortable: true, renderer: render_prodi
},
{
header: 'Jumlah',
width: 50, align: 'center',
dataIndex: 'jumlah',
sortable: true, renderer: render_jumlah
},
{
header: 'Aktif',
width: 40, align: 'center',
dataIndex: 'aktif',
sortable: true, renderer: render_aktif
},
{
header: 'Aktif
(Baru)',
width: 50, align: 'center',
dataIndex: 'aktif_baru',
sortable: true, renderer: render_aktif_baru
},
{
header: 'Aktif
(Lama)',
width: 50, align: 'center',
dataIndex: 'aktif_lama',
sortable: true, renderer: render_aktif_lama
},
{
header: 'Cuti',
width: 40, align: 'center',
dataIndex: 'cuti',
sortable: true, renderer: render_cuti
},
{
header: 'DO',
width: 40, align: 'center',
dataIndex: 'do',
sortable: true, renderer: render_do
},
{
header: 'Keluar',
width: 50, align: 'center',
dataIndex: 'keluar',
sortable: true, renderer: render_keluar
},
{
header: 'Lulus',
width: 50, align: 'center',
dataIndex: 'lulus',
sortable: true, renderer: render_lulus
},
{
header: 'Non Aktif',
width: 65, align: 'center',
dataIndex: 'nonaktif',
sortable: true, renderer: render_nonaktif
},
{
header: 'SDD',
width: 80, align: 'center',
dataIndex: 'sdd', hidden: true,
sortable: true, renderer: render_sdd
}]
});
var vw = new Ext.grid.GridView({emptyText:'< Data Masih Kosong >'});
var sm_nya = new Ext.grid.CheckboxSelectionModel({
listeners: {
}
});
var grid_nya = new Ext.grid.EditorGridPanel({
store: ds_grid,
frame: false,
autoHeight: true,
autoWidth: true,
id: 'grid_studentbody',
columnLines: true,
loadMask: true,
buttonAlign: 'left',
forceFit: true,
sm:sm_nya,
vw:vw,
cm:cm,
clicksToEdit: 1,
listeners: {
cellclick: onCellStudentBodyClick
}
});
function render_prodi(value) {
Ext.QuickTips.init();
return '
'
+ value +'
';
}
function reloadStudentBody(combo, record) {
Ext.getCmp('grid_stmhssmt').hide();
Ext.getCmp('grid_stmhssmt1').hide();
Ext.getCmp('cb.staktiv').disable();
Ext.getCmp('btnprintstudentbody').disable();
Ext.getCmp('btnprintmhs').disable();
Ext.getCmp('btncompare').disable();
Ext.getCmp('jumlahmhs').setValue(0);
Ext.getCmp('jumlahmhs1').setValue(0);
Ext.getCmp('cb.staktiv').setValue(null);
Ext.getCmp('idjumlah').setValue(null);
Ext.getCmp('idaktif').setValue(null);
Ext.getCmp('idcuti').setValue(null);
Ext.getCmp('iddo').setValue(null);
Ext.getCmp('idkeluar').setValue(null);
Ext.getCmp('idlulus').setValue(null);
Ext.getCmp('idnonaktif').setValue(null);
Ext.getCmp('idsdd').setValue(null);
isCompare = false;
var panel2 = Ext.getCmp('panel2');
panel2.setTitle('Daftar Mahasiswa');
var labelselisih = Ext.getCmp('selisih');
labelselisih.setText('');
Ext.getCmp('btnprintmhsred').hide();
ds_grid.setBaseParam('kdstsemester',record.data['kdstsemester']);
ds_grid.reload({
scope : this,
callback: function(records, operation, success) {
var cuti = 0, jumlah = 0, aktif = 0, aktifbaru = 0, aktiflama = 0, DO = 0, keluar = 0, lulus = 0, nonaktif = 0, sdd = 0;
ds_grid.each(function (rec) {
jumlah += parseFloat(rec.get('jumlah'));
cuti += parseFloat(rec.get('cuti'));
aktif += parseFloat(rec.get('aktif'));
aktifbaru += parseFloat(rec.get('aktif_baru'));
aktiflama += parseFloat(rec.get('aktif_lama'));
DO += parseFloat(rec.get('do'));
keluar += parseFloat(rec.get('keluar'));
lulus += parseFloat(rec.get('lulus'));
nonaktif += parseFloat(rec.get('nonaktif'));
sdd += parseFloat(rec.get('sdd'));
});
grid_nya1.getSelectionModel().clearSelections();
Ext.getCmp('jumlah').setValue(jumlah);
Ext.getCmp('cuti').setValue(cuti);
Ext.getCmp('aktif').setValue(aktif);
Ext.getCmp('aktifbaru').setValue(aktifbaru);
Ext.getCmp('aktiflama').setValue(aktiflama);
Ext.getCmp('do').setValue(DO);
Ext.getCmp('keluar').setValue(keluar);
Ext.getCmp('lulus').setValue(lulus);
Ext.getCmp('sdd').setValue(sdd);
Ext.getCmp('nonaktif').setValue(nonaktif);
Ext.getCmp('thnakademik').setValue(record.data['kdstsemester']);
Ext.getCmp('btnprintstudentbody').enable();
}
});
}
function onCellStudentBodyClick(grid, rowIndex, columnIndex, e) {
var t = e.getTarget();
grid_nya1.getSelectionModel().selectRow(rowIndex);
if (t.className != 'Detail') { return; }
Ext.getCmp('cb.staktiv').setValue(99);
var record = grid.getStore().getAt(rowIndex); // Get the Record
var kdprodi = record.data['kdprodi'];
var nmprodi = record.data['nmprodi'];
var kdstsemester = Ext.getCmp('thnakademik').getValue();
var kdstsemester1 = Ext.getCmp('thnakademik1').getValue();
var kdstaktivitasmhs = Ext.getCmp('cb.staktiv').getValue();
kdprodiSelect = kdprodi;
nmprodiSelect = nmprodi;
var labelselisih = Ext.getCmp('selisih');
labelselisih.setText('');
Ext.getCmp('btnprintmhsred').hide();
Ext.getCmp('jumlahmhs').setValue(0);
Ext.getCmp('jumlahmhs1').setValue(0);
Ext.getCmp('cb.staktiv').disable();
Ext.getCmp('btnprintmhs').disable();
Ext.getCmp('btncompare').disable();
Ext.getCmp('grid_stmhssmt').show();
Ext.getCmp('grid_stmhssmt1').show();
isCompare = false;
var panel2 = Ext.getCmp('panel2');
panel2.setTitle('Daftar Mahasiswa Program Studi ' + nmprodi);
ds_stmhssmt.setBaseParam('kdprodi',kdprodi);
ds_stmhssmt.setBaseParam('kdstsemester',kdstsemester);
ds_stmhssmt.setBaseParam('kdstaktivitasmhs',kdstaktivitasmhs);
ds_stmhssmt.reload({
scope : this,
callback: function(records, operation, success) {
var count = 0
ds_stmhssmt.each(function (rec) {
count += 1;
});
Ext.getCmp('jumlahmhs').setValue(count);
Ext.getCmp('cb.staktiv').enable();
Ext.getCmp('btnprintmhs').enable();
Ext.getCmp('btncompare').enable();
}
});
ds_stmhssmt1.setBaseParam('kdprodi',kdprodi);
ds_stmhssmt1.setBaseParam('kdstsemester',kdstsemester1);
ds_stmhssmt1.setBaseParam('kdstaktivitasmhs',kdstaktivitasmhs);
ds_stmhssmt1.reload({
scope : this,
callback: function(records, operation, success) {
var count1 = 0
ds_stmhssmt1.each(function (rec) {
count1 += 1;
});
Ext.getCmp('jumlahmhs1').setValue(count1);
Ext.getCmp('cb.staktiv').enable();
Ext.getCmp('btnprintmhs').enable();
Ext.getCmp('btncompare').enable();
}
});
}
//===================================================GRID 1 PER MAHASISWA
var fields_stmhssmt = RH.storeFields('idstmhssemester','nmstaktivitasmhs','nmmhs','kdjnskelamin','nim', 'thnmasuk', 'nmkodtbkod',
'kdprodi', 'kdstsemester', 'kdstaktivitasmhs', 'tgllulus', 'skslulus', 'ipk',
'nosk', 'tglsk', 'noijazah', 'kdjskripsi', 'kdtskripsi', 'awalbimbingan',
'akhirbimbingan', 'nidu1', 'nidu2', 'nidu2', 'nidu3', 'nidu4', 'nidu5','idsemester',
'idkelas', 'nmkelas', 'tingkat', 'tingsem');
var ds_stmhssmt = new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({
url: BASE_URL + 'e_akademic/c_studentbody/get_stmhssemester',
method: 'POST',
success: function(response){
var r = Ext.decode(response.responseText);
if(r.status == false){
Ext.Ajax.request({
url: BASE_URL + 'user/ext_logout',
method: 'POST',
success: function(xhr) {
localStorage.removeItem('access_token');
window.location = BASE_URL + 'user/login';
}
});
}
}
}),
baseParams: {
kdstsemester: null,
kdprodi: null,
kdstaktivitasmhs: null
},
root: 'data',
totalProperty: 'results',
autoLoad: false,
fields : fields_stmhssmt,
listeners: {
load: function(store, records, options) {
}
}
});
var cm_stmhssmt = new Ext.grid.ColumnModel([
new Ext.grid.RowNumberer({header: RH.h3('No'), width: 40, align:'center !important'}), //for rows numbering
{
header: RH.h3('NPM'), width:100,
dataIndex: 'nim', renderer: render_available,
sortable: true,
}, {
header: RH.h3('Nama Mahasiswa'), width: 250,
dataIndex: 'nmmhs',
sortable: true, renderer: render_nmmhs,
}, {
header: RH.h3('(L/P)'), width: 35,
dataIndex: 'kdjnskelamin',
align:'center', sortable: true, renderer: render_lp,
}, {
header: RH.h3('Tahun
Masuk'), width: 50,
dataIndex: 'thnmasuk',
align:'center', sortable: true, renderer: render_thnmsk,
}, {
header: RH.h3('Status
Masuk'), width: 65,
dataIndex: 'nmkodtbkod',
align:'left', sortable: true, renderer: render_stmsk,
}, {
header: RH.h3('Status Aktivitas
Mahasiswa'), width: 100,
dataIndex: 'nmstaktivitasmhs',
sortable: true, renderer: render_staktivmhs,
}
]
);
// Selection Model
var sm_stmhssmt = new Ext.grid.RowSelectionModel({ singleSelect: true });
// Grid View
var gv_stmhssmt = new Ext.grid.GridView({emptyText: '< Belum ada Data >'});
/** GRID PANEL */
var gp_stmhssmt = new Ext.grid.EditorGridPanel({ //PAKE EditorGridPanel
ds: ds_stmhssmt,
cm: cm_stmhssmt,
sm: sm_stmhssmt,
view: gv_stmhssmt,
frame: false,
autoHeight: true,
autoWidth: true,
id: 'grid_stmhssmt',
hidden:true,
columnLines: true,
loadMask: true,
buttonAlign: 'left',
forceFit: true,
});
function render_available(value) {
var val = RH.getRecordFieldValue(ds_stmhssmt1, 'nim', 'nim', value);
Ext.QuickTips.init();
if (isCompare) {
if (val) {
return ''
+ value +'
';
} else {
return ''
+ value +'
';
}
} else {
return ''
+ value +'
';
}
}
//===================================================GRID STUDENT BODY 2
var ds_thnakademik1 = store_thnakademik2();
var ds_grid1 = new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({
url: BASE_URL + 'e_akademic/c_studentbody/grid',
method: 'POST',
success: function(response){
var r = Ext.decode(response.responseText);
if(r.status == false){
Ext.Ajax.request({
url: BASE_URL + 'user/ext_logout',
method: 'POST',
success: function(xhr) {
localStorage.removeItem('access_token');
window.location = BASE_URL + 'user/login';
}
});
}
}
}),
baseParams: {
kdstsemester: KDSTSEMESTER,
kdfakultas: 99
},
root: 'data',
totalProperty: 'results',
autoLoad: true,
fields: [
{
name: "jumlah",
mapping: "jumlah"
},{
name: "aktif",
mapping: "aktif"
},{
name: "aktif_baru",
mapping: "aktif_baru"
},{
name: "aktif_lama",
mapping: "aktif_lama"
},{
name: "cuti",
mapping: "cuti"
},{
name: "do",
mapping: "do"
},{
name: "keluar",
mapping: "keluar"
},{
name: "lulus",
mapping: "lulus"
},{
name: "nonaktif",
mapping: "nonaktif"
},{
name: "sdd",
mapping: "sdd"
}],
listeners: {
load: function(store, records, options) {
Ext.getCmp('thnakademik1').setValue(KDSTSEMESTER);
var cuti1 = 0, jumlah1 = 0, aktif1 = 0, aktifbaru1 = 0, aktiflama1 = 0, DO1 = 0, keluar1 = 0, lulus1 = 0, nonaktif1 = 0, sdd1 = 0;
ds_grid1.each(function (rec) {
jumlah1 += parseFloat(rec.get('jumlah'));
cuti1 += parseFloat(rec.get('cuti'));
aktif1 += parseFloat(rec.get('aktif'));
aktifbaru1 += parseFloat(rec.get('aktif_baru'));
aktiflama1 += parseFloat(rec.get('aktif_lama'));
DO1 += parseFloat(rec.get('do'));
keluar1 += parseFloat(rec.get('keluar'));
lulus1 += parseFloat(rec.get('lulus'));
nonaktif1 += parseFloat(rec.get('nonaktif'));
sdd1 += parseFloat(rec.get('sdd'));
});
Ext.getCmp('jumlah1').setValue(jumlah1);
Ext.getCmp('cuti1').setValue(cuti1);
Ext.getCmp('aktif1').setValue(aktif1);
Ext.getCmp('aktifbaru1').setValue(aktifbaru1);
Ext.getCmp('aktiflama1').setValue(aktiflama1);
Ext.getCmp('do1').setValue(DO1);
Ext.getCmp('keluar1').setValue(keluar1);
Ext.getCmp('lulus1').setValue(lulus1);
Ext.getCmp('sdd1').setValue(sdd1);
Ext.getCmp('nonaktif1').setValue(nonaktif1);
Ext.getCmp('thnakademik1').enable();
Ext.getCmp('cb.fak').enable();
Ext.getCmp('btnprintstudentbody').enable();
}
}
});
var cm1 = new Ext.grid.ColumnModel({
defaults: {
sortable: true // columns are not sortable by default
},
columns: [{
header: '',
width: 50, align: 'center',
dataIndex: '',
sortable: true
},
{
header: 'Jumlah',
width: 50, align: 'center',
dataIndex: 'jumlah',
sortable: true, renderer: render_jumlah
},
{
header: 'Aktif',
width: 40, align: 'center',
dataIndex: 'aktif',
sortable: true, renderer: render_aktif
},
{
header: 'Aktif
(Baru)',
width: 50, align: 'center',
dataIndex: 'aktif_baru',
sortable: true, renderer: render_aktif_baru
},
{
header: 'Aktif
(Lama)',
width: 50, align: 'center',
dataIndex: 'aktif_lama',
sortable: true, renderer: render_aktif_lama
},
{
header: 'Cuti',
width: 40, align: 'center',
dataIndex: 'cuti',
sortable: true, renderer: render_cuti
},
{
header: 'DO',
width: 40, align: 'center',
dataIndex: 'do',
sortable: true, renderer: render_do
},
{
header: 'Keluar',
width: 50, align: 'center',
dataIndex: 'keluar',
sortable: true, renderer: render_keluar
},
{
header: 'Lulus',
width: 50, align: 'center',
dataIndex: 'lulus',
sortable: true, renderer: render_lulus
},
{
header: 'Non Aktif',
width: 65, align: 'center',
dataIndex: 'nonaktif',
sortable: true, renderer: render_nonaktif
},
{
header: 'SDD',
width: 80, align: 'center',
dataIndex: 'sdd', hidden: true,
sortable: true, renderer: render_sdd
}]
});
var vw1 = new Ext.grid.GridView({emptyText:'< Data Masih Kosong >'});
var sm_nya1 = new Ext.grid.CheckboxSelectionModel({
listeners: {
}
});
var grid_nya1 = new Ext.grid.EditorGridPanel({
store: ds_grid1,
frame: false,
autoHeight: true,
autoWidth: true,
id: 'grid_studentbody1',
columnLines: true,
loadMask: true,
buttonAlign: 'left',
forceFit: true,
sm:sm_nya1,
vw:vw1,
cm:cm1,
clicksToEdit: 1,
listeners: {
cellclick: onCellStudentBody1Click
}
});
function reloadStudentBody1(combo, record) {
Ext.getCmp('grid_stmhssmt').hide();
Ext.getCmp('grid_stmhssmt1').hide();
Ext.getCmp('cb.staktiv').disable();
Ext.getCmp('btnprintstudentbody').disable();
Ext.getCmp('btnprintmhs').disable();
Ext.getCmp('btncompare').disable();
Ext.getCmp('jumlahmhs').setValue(0);
Ext.getCmp('jumlahmhs1').setValue(0);
Ext.getCmp('cb.staktiv').setValue(null);
Ext.getCmp('idjumlah').setValue(null);
Ext.getCmp('idaktif').setValue(null);
Ext.getCmp('idcuti').setValue(null);
Ext.getCmp('iddo').setValue(null);
Ext.getCmp('idkeluar').setValue(null);
Ext.getCmp('idlulus').setValue(null);
Ext.getCmp('idnonaktif').setValue(null);
Ext.getCmp('idsdd').setValue(null);
isCompare = false;
var panel2 = Ext.getCmp('panel2');
panel2.setTitle('Daftar Mahasiswa');
var labelselisih = Ext.getCmp('selisih');
labelselisih.setText('');
Ext.getCmp('btnprintmhsred').hide();
ds_grid1.setBaseParam('kdstsemester',record.data['kdstsemester']);
ds_grid1.reload({
scope : this,
callback: function(records, operation, success) {
var cuti1 = 0, jumlah1 = 0, aktif1 = 0, aktifbaru1 = 0, aktiflama1 = 0, DO1 = 0, keluar1 = 0, lulus1 = 0, nonaktif1 = 0, sdd1 = 0;
ds_grid1.each(function (rec) {
jumlah1 += parseFloat(rec.get('jumlah'));
cuti1 += parseFloat(rec.get('cuti'));
aktif1 += parseFloat(rec.get('aktif'));
aktifbaru1 += parseFloat(rec.get('aktif_baru'));
aktiflama1 += parseFloat(rec.get('aktif_lama'));
DO1 += parseFloat(rec.get('do'));
keluar1 += parseFloat(rec.get('keluar'));
lulus1 += parseFloat(rec.get('lulus'));
nonaktif1 += parseFloat(rec.get('nonaktif'));
sdd1 += parseFloat(rec.get('sdd'));
});
grid_nya.getSelectionModel().clearSelections();
Ext.getCmp('jumlah1').setValue(jumlah1);
Ext.getCmp('cuti1').setValue(cuti1);
Ext.getCmp('aktif1').setValue(aktif1);
Ext.getCmp('aktifbaru1').setValue(aktifbaru1);
Ext.getCmp('aktiflama1').setValue(aktiflama1);
Ext.getCmp('do1').setValue(DO1);
Ext.getCmp('keluar1').setValue(keluar1);
Ext.getCmp('lulus1').setValue(lulus1);
Ext.getCmp('sdd1').setValue(sdd1);
Ext.getCmp('nonaktif1').setValue(nonaktif1);
Ext.getCmp('thnakademik1').setValue(record.data['kdstsemester']);
Ext.getCmp('btnprintstudentbody').enable();
}
});
}
function onCellStudentBody1Click(grid, rowIndex, columnIndex, e) {
grid_nya.getSelectionModel().selectRow(rowIndex);
}
//===================================================GRID 2 PER MAHASISWA
var fields_stmhssmt1 = RH.storeFields('idstmhssemester','nmstaktivitasmhs','nmmhs','kdjnskelamin','nim', 'thnmasuk', 'nmkodtbkod',
'kdprodi', 'kdstsemester', 'kdstaktivitasmhs', 'tgllulus', 'skslulus', 'ipk',
'nosk', 'tglsk', 'noijazah', 'kdjskripsi', 'kdtskripsi', 'awalbimbingan',
'akhirbimbingan', 'nidu1', 'nidu2', 'nidu2', 'nidu3', 'nidu4', 'nidu5','idsemester',
'idkelas', 'nmkelas', 'tingkat', 'tingsem');
var ds_stmhssmt1 = new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({
url: BASE_URL + 'e_akademic/c_studentbody/get_stmhssemester',
method: 'POST',
success: function(response){
var r = Ext.decode(response.responseText);
if(r.status == false){
Ext.Ajax.request({
url: BASE_URL + 'user/ext_logout',
method: 'POST',
success: function(xhr) {
localStorage.removeItem('access_token');
window.location = BASE_URL + 'user/login';
}
});
}
}
}),
baseParams: {
kdstsemester: null,
kdprodi: null,
kdstaktivitasmhs: null
},
root: 'data',
totalProperty: 'results',
autoLoad: false,
fields : fields_stmhssmt1,
listeners: {
load: function(store, records, options) {
}
}
});
var cm_stmhssmt1 = new Ext.grid.ColumnModel([
new Ext.grid.RowNumberer({header: RH.h3('No'), width: 40, align:'center !important'}), //for rows numbering
{
header: RH.h3('NPM'), width:100,
dataIndex: 'nim', renderer: render_npm,
sortable: true,
}, {
header: RH.h3('Nama Mahasiswa'), width: 250,
dataIndex: 'nmmhs',
sortable: true, renderer: render_nmmhs,
}, {
header: RH.h3('(L/P)'), width: 35,
dataIndex: 'kdjnskelamin',
align:'center', sortable: true, renderer: render_lp,
}, {
header: RH.h3('Tahun
Masuk'), width: 50,
dataIndex: 'thnmasuk',
align:'center', sortable: true, renderer: render_thnmsk,
}, {
header: RH.h3('Status
Masuk'), width: 65,
dataIndex: 'nmkodtbkod',
align:'left', sortable: true, renderer: render_stmsk,
}, {
header: RH.h3('Status Aktivitas
Mahasiswa'), width: 100,
dataIndex: 'nmstaktivitasmhs',
sortable: true, renderer: render_staktivmhs,
}
]
);
// Selection Model
var sm_stmhssmt1 = new Ext.grid.RowSelectionModel({ singleSelect: true });
// Grid View
var gv_stmhssmt1 = new Ext.grid.GridView({emptyText: '< Belum ada Data >'});
/** GRID PANEL */
var gp_stmhssmt1 = new Ext.grid.EditorGridPanel({ //PAKE EditorGridPanel
ds: ds_stmhssmt1,
cm: cm_stmhssmt1,
sm: sm_stmhssmt1,
view: gv_stmhssmt1,
frame: false,
autoHeight: true,
autoWidth: true,
id: 'grid_stmhssmt1',
hidden:true,
columnLines: true,
loadMask: true,
buttonAlign: 'left',
forceFit: true,
});
function render_npm(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
//===================================================FUNCTIONS
function render_jumlah(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
function render_aktif(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
function render_aktif_baru(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
function render_aktif_lama(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
function render_cuti(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
function render_do(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
function render_keluar(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
function render_lulus(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
function render_nonaktif(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
function render_sdd(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
function printStudentBody() {
var parsing = '';
parsing = parsing + Ext.getCmp('thnakademik').getValue();
parsing = parsing + '&' + Ext.getCmp('thnakademik').getRawValue().replace('/','_');
parsing = parsing + '&' + Ext.getCmp('thnakademik1').getValue();
parsing = parsing + '&' + Ext.getCmp('thnakademik1').getRawValue().replace('/','_');
parsing = parsing + '&' + Ext.getCmp('cb.fak').getValue();
parsing = parsing + '&' + Ext.getCmp('cb.fak').getRawValue();
var win = window.open();
win.location.reload();
win.location = BASE_URL + 'print/print_topdf/pstudentbody/'+parsing;
}
function render_nmmhs(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
function render_lp(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
function render_thnmsk(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
function render_stmsk(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
function render_staktivmhs(value) {
Ext.QuickTips.init();
return ''
+ value +'
';
}
function printStmhssemester() {
var kdstaktivmhs = (Ext.getCmp('cb.staktiv').getValue()==99) ? '-':Ext.getCmp('cb.staktiv').getValue().replace('/','_');
var kdstaktivmhs1 = (Ext.getCmp('cb.staktiv').getValue()==99) ? '-':Ext.getCmp('cb.staktiv').getRawValue().replace('/','_');
var parsing = '';
parsing = parsing + kdprodiSelect;
parsing = parsing + '&' + nmprodiSelect;
parsing = parsing + '&' + Ext.getCmp('thnakademik').getValue();
parsing = parsing + '&' + Ext.getCmp('thnakademik1').getValue();
parsing = parsing + '&' + kdstaktivmhs;
parsing = parsing + '&' + kdstaktivmhs1;
parsing = parsing + '&' + Ext.getCmp('thnakademik').getRawValue().replace('/','_');
parsing = parsing + '&' + Ext.getCmp('thnakademik1').getRawValue().replace('/','_');
var win = window.open();
win.location.reload();
win.location = BASE_URL + 'print/print_topdf/pstmhssemester/'+parsing;
}
function compare() {
var jumlah1= Ext.getCmp('jumlah1').getValue();
var jumlah= Ext.getCmp('jumlah').getValue();
Ext.getCmp('idjumlah').setValue(jumlah-jumlah1);
var aktif1= Ext.getCmp('aktif1').getValue();
var aktif= Ext.getCmp('aktif').getValue();
Ext.getCmp('idaktif').setValue(aktif-aktif1);
var cuti1= Ext.getCmp('cuti1').getValue();
var cuti= Ext.getCmp('cuti').getValue();
Ext.getCmp('idcuti').setValue(cuti-cuti1);
var DO1= Ext.getCmp('do1').getValue();
var DO= Ext.getCmp('do').getValue();
Ext.getCmp('iddo').setValue(DO-DO1);
var keluar1= Ext.getCmp('keluar1').getValue();
var keluar= Ext.getCmp('keluar').getValue();
Ext.getCmp('idkeluar').setValue(keluar-keluar1);
var lulus1= Ext.getCmp('lulus1').getValue();
var lulus= Ext.getCmp('lulus').getValue();
Ext.getCmp('idlulus').setValue(lulus-lulus1);
var nonaktif1= Ext.getCmp('nonaktif1').getValue();
var nonaktif= Ext.getCmp('nonaktif').getValue();
Ext.getCmp('idnonaktif').setValue(nonaktif-nonaktif1);
var sdd1= Ext.getCmp('sdd1').getValue();
var sdd= Ext.getCmp('sdd').getValue();
Ext.getCmp('idsdd').setValue(sdd-sdd1);
var stmhs = Ext.getCmp('cb.staktiv').getValue();
var jumlahmhs = Ext.getCmp('jumlahmhs').getValue();
var jumlahmhs1 = Ext.getCmp('jumlahmhs1').getValue();
var labelselisih = Ext.getCmp('selisih');
if (Ext.getCmp('cb.staktiv').getValue()!=99) {
labelselisih.setText('Pilih Semua Status Aktivitas');
return;
}
if (Ext.getCmp('thnakademik').getValue() >= Ext.getCmp('thnakademik1').getValue()) {
labelselisih.setText('T.A - Semester Sebelumnya Harus Kurang Dari T.A - Semester Sekarang');
return;
}
isCompare = true;
if (jumlahmhs == jumlahmhs1) {
labelselisih.setText('Jumlah Mahasiswa Tidak Terdaftar Di T.A - Semester ' + Ext.getCmp('thnakademik1').getRawValue() + ': 0');
} else {
var waitmsg = Ext.MessageBox.wait('Proses Mendapatkan Data...', 'Info');
ds_stmhssmt.setBaseParam('kdstaktivitasmhs',stmhs);
ds_stmhssmt.reload({
scope : this,
callback: function(records, operation, success) {
var count = 0, selisih=0, temppar='', par='', c = ';';
ds_stmhssmt.each(function (rec) {
var val = RH.getRecordFieldValue(ds_stmhssmt1, 'nim', 'nim', rec.data['nim']);
if (!val) {
selisih += 1;
temppar += rec.data['nim'] +'x'+
rec.data['kdjnskelamin'] +'x'+
rec.data['thnmasuk'] +'x'+
rec.data['nmkodtbkod'] +'x'+
c;
}
count += 1;
});
par = temppar.substr(0,temppar.length-1);
Ext.Ajax.request({
url: BASE_URL + 'e_akademic/c_studentbody/delete_temporary',
params: {
par: par
},
success: function(response) {
waitmsg.hide();
var r = Ext.decode(response.responseText);
if(r.status == false){
Ext.Ajax.request({
url: BASE_URL + 'user/ext_logout',
method: 'POST',
success: function(xhr) {
localStorage.removeItem('access_token');
window.location = BASE_URL + 'user/login';
}
});
}
},
failure: function() {
waitmsg.hide();
Ext.MessageBox.alert("Informasi", "Gagal Mendapatkan Data");
}
});
labelselisih.setText('Jumlah Mahasiswa Tidak Terdaftar Di T.A - Semester ' + Ext.getCmp('thnakademik1').getRawValue() + ': ' + selisih);
Ext.getCmp('btnprintmhsred').show();
isCompare = false;
}
});
}
/* if (jumlahmhs > jumlahmhs1) {
ds_stmhssmt.setBaseParam('kdstaktivitasmhs',stmhs);
ds_stmhssmt.reload({
scope : this,
callback: function(records, operation, success) {
var count = 0, selisih=0;
ds_stmhssmt.each(function (rec) {
var val = RH.getRecordFieldValue(ds_stmhssmt1, 'nim', 'nim', rec.data['nim']);
if (!val) {
selisih += 1;
}
count += 1;
});
labelselisih.setText('Jumlah Mahasiswa Tanpa Status: ' + selisih);
isCompare = false;
}
});
} else if (jumlahmhs < jumlahmhs1) {
ds_stmhssmt1.setBaseParam('kdstaktivitasmhs',stmhs);
ds_stmhssmt1.reload({
scope : this,
callback: function(records, operation, success) {
var count1 = 0, selisih=0;
ds_stmhssmt1.each(function (rec) {
var val = RH.getRecordFieldValue(ds_stmhssmt, 'nim', 'nim', rec.data['nim']);
if (!val) {
selisih += 1;
}
count1 += 1;
});
labelselisih.setText('Jumlah Mahasiswa Tanpa Status: ' + selisih);
isCompare = false;
}
});
} else {
labelselisih.setText('Jumlah Mahasiswa Tanpa Status: 0');
} */
}
function printMhstdkTerdftar() {
var parsing = '';
parsing = parsing + nmprodiSelect;
parsing = parsing + '&' + Ext.getCmp('thnakademik1').getRawValue().replace('/','_');
var win = window.open();
win.location.reload();
win.location = BASE_URL + 'print/print_topdf/mhsnostatustemp/'+parsing;
}
//===================================================PANELS
var panelgridstudentbody = new Ext.Panel({
id: 'panelgridstudentbody',
height: 150,
buttonAlign: 'left',
border: true,
autoScroll: true,
layout: 'column',
items: [{
columnWidth: .55,
border: false,
items: [grid_nya]
},{
columnWidth: .45,
border: false,
items: [grid_nya1]
}]
});
var panel1 = new Ext.Panel({
id: 'panel1',
height: 280,
title: "Student Body",
buttonAlign: 'left',
border: true,
layout: 'form',
items: [{
layout: 'column', border: false, defaults: { labelWidth: 175, labelAlign: 'right' },
items: [{
columnWidth: .30, border: false, layout: 'form', bodyStyle: 'padding:5px 0px 5px 0px', // atas, kanan, bawah, kiri
items: [{
xtype: 'combo',
id: 'thnakademik',
name: 'thnakademik',
fieldLabel: 'T.A - Semester Sebelumnya',
width:150, emptyText:'Pilih...',
store: ds_thnakademik,
triggerAction: 'all',
editable: false,
valueField: 'kdstsemester',
displayField: 'nmthnakademik',
forceSelection: true,
submitValue: true,
hiddenName: 'h_thakademik',
typeAhead: true,
mode: 'local',
disabled: true,
listeners: {
scope: this, select: reloadStudentBody
},
}]
},{
columnWidth: .35, border: false, layout: 'form', bodyStyle: 'padding:5px 0px 5px 0px', // atas, kanan, bawah, kiri
items: [{
xtype: 'combo',
id: 'cb.fak', fieldLabel: 'Fakultas', disabled: true,
store: ds_fak, valueField: 'kdfakultas', displayField: 'nmfakultas',
triggerAction: 'all',editable: false, width: 200,
forceSelection: true, submitValue: true, mode: 'local',
emptyText:'Pilih...',
listeners:{
scope: this, 'select': function(combo, record){
Ext.getCmp('grid_stmhssmt').hide();
Ext.getCmp('grid_stmhssmt1').hide();
Ext.getCmp('cb.staktiv').disable();
Ext.getCmp('btnprintstudentbody').disable();
Ext.getCmp('btnprintmhs').disable();
Ext.getCmp('btncompare').disable();
Ext.getCmp('jumlahmhs').setValue(0);
Ext.getCmp('jumlahmhs1').setValue(0);
Ext.getCmp('cb.staktiv').setValue(null);
Ext.getCmp('idjumlah').setValue(null);
Ext.getCmp('idaktif').setValue(null);
Ext.getCmp('idcuti').setValue(null);
Ext.getCmp('iddo').setValue(null);
Ext.getCmp('idkeluar').setValue(null);
Ext.getCmp('idlulus').setValue(null);
Ext.getCmp('idnonaktif').setValue(null);
Ext.getCmp('idsdd').setValue(null);
isCompare = false;
var panel2 = Ext.getCmp('panel2');
panel2.setTitle('Daftar Mahasiswa');
var labelselisih = Ext.getCmp('selisih');
labelselisih.setText('');
Ext.getCmp('btnprintmhsred').hide();
ds_grid.setBaseParam('kdfakultas',record.data['kdfakultas']);
ds_grid.reload({
scope : this,
callback: function(records, operation, success) {
var cuti = 0, jumlah = 0, aktif = 0, DO = 0, keluar = 0, lulus = 0, nonaktif = 0, sdd = 0;
ds_grid.each(function (rec) {
jumlah += parseFloat(rec.get('jumlah'));
cuti += parseFloat(rec.get('cuti'));
aktif += parseFloat(rec.get('aktif'));
DO += parseFloat(rec.get('do'));
keluar += parseFloat(rec.get('keluar'));
lulus += parseFloat(rec.get('lulus'));
nonaktif += parseFloat(rec.get('nonaktif'));
sdd += parseFloat(rec.get('sdd'));
});
Ext.getCmp('jumlah').setValue(jumlah);
Ext.getCmp('cuti').setValue(cuti);
Ext.getCmp('aktif').setValue(aktif);
Ext.getCmp('do').setValue(DO);
Ext.getCmp('keluar').setValue(keluar);
Ext.getCmp('lulus').setValue(lulus);
Ext.getCmp('sdd').setValue(sdd);
Ext.getCmp('nonaktif').setValue(nonaktif);
Ext.getCmp('cb.fak').setValue(record.data['kdfakultas']);
Ext.getCmp('btnprintstudentbody').enable();
}
});
ds_grid1.setBaseParam('kdfakultas',record.data['kdfakultas']);
ds_grid1.reload({
scope : this,
callback: function(records, operation, success) {
var cuti1 = 0, jumlah1 = 0, aktif1 = 0, DO1 = 0, keluar1 = 0, lulus1 = 0, nonaktif1 = 0, sdd1 = 0;
ds_grid1.each(function (rec) {
jumlah1 += parseFloat(rec.get('jumlah'));
cuti1 += parseFloat(rec.get('cuti'));
aktif1 += parseFloat(rec.get('aktif'));
DO1 += parseFloat(rec.get('do'));
keluar1 += parseFloat(rec.get('keluar'));
lulus1 += parseFloat(rec.get('lulus'));
nonaktif1 += parseFloat(rec.get('nonaktif'));
sdd1 += parseFloat(rec.get('sdd'));
});
Ext.getCmp('jumlah1').setValue(jumlah1);
Ext.getCmp('cuti1').setValue(cuti1);
Ext.getCmp('aktif1').setValue(aktif1);
Ext.getCmp('do1').setValue(DO1);
Ext.getCmp('keluar1').setValue(keluar1);
Ext.getCmp('lulus1').setValue(lulus1);
Ext.getCmp('sdd1').setValue(sdd1);
Ext.getCmp('nonaktif1').setValue(nonaktif1);
Ext.getCmp('cb.fak').setValue(record.data['kdfakultas']);
Ext.getCmp('btnprintstudentbody').enable();
}
});
}
}
}]
},{
columnWidth: .35, border: false, layout: 'form', bodyStyle: 'padding:5px 0px 5px 0px', // atas, kanan, bawah, kiri
items: [{
xtype: 'combo',
id: 'thnakademik1',
name: 'thnakademik1',
fieldLabel: 'T.A - Semester Sekarang',
width:150, emptyText:'Pilih...',
store: ds_thnakademik1,
triggerAction: 'all',
editable: false,
valueField: 'kdstsemester',
displayField: 'nmthnakademik',
forceSelection: true,
submitValue: true,
hiddenName: 'h_thakademik1',
typeAhead: true,
mode: 'local',
disabled: true,
listeners: {
scope: this, select: reloadStudentBody1
},
}]
}]
},panelgridstudentbody,
{
layout: 'column', border: false, defaults: { labelWidth: 175, labelAlign: 'right' },
items: [{
columnWidth: .55, border: true, layout: 'form', bodyStyle: 'padding:5px 0px 5px 0px', // atas, kanan, bawah, kiri
items: [{
xtype: 'container',
//layout: 'column',
items:[{
xtype: 'label',
text : "Total:",
style: 'margin-left:135px;margin-right:10px;'
},{
xtype: 'textfield',
name: 'jumlah',
id: 'jumlah',
width: 50,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'textfield',
name: 'aktif',
id: 'aktif',
width: 40,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'textfield',
name: 'aktifbaru',
id: 'aktifbaru',
width: 50,
readOnly: true,
style: 'text-align: center;font-weight:bold;color:green;'
},{
xtype: 'textfield',
name: 'aktiflama',
id: 'aktiflama',
width: 50,
readOnly: true,
style: 'text-align: center;font-weight:bold;color:orange;'
},{
xtype: 'textfield',
name: 'cuti',
id: 'cuti',
width: 40,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'textfield',
name: 'do',
id: 'do',
width: 40,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'textfield',
name: 'keluar',
id: 'keluar',
width: 50,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'textfield',
name: 'lulus',
id: 'lulus',
width: 50,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'textfield',
name: 'nonaktif',
id: 'nonaktif',
width: 65,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'textfield',
name: 'sdd',
id: 'sdd',
width: 40, hidden: true,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
}]
}]
},{
columnWidth: .45, border: true, layout: 'form', bodyStyle: 'padding:5px 0px 5px 0px', // atas, kanan, bawah, kiri
items: [{
xtype: 'container',
//layout: 'column',
items:[{
xtype: 'label',
text : "Total:",
style: 'margin-left:10px;margin-right:10px;'
},{
xtype: 'textfield',
name: 'jumlah1',
id: 'jumlah1',
width: 50,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'textfield',
name: 'aktif1',
id: 'aktif1',
width: 40,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'textfield',
name: 'aktifbaru1',
id: 'aktifbaru1',
width: 50,
readOnly: true,
style: 'text-align: center;font-weight:bold;color:green;'
},{
xtype: 'textfield',
name: 'aktiflama1',
id: 'aktiflama1',
width: 50,
readOnly: true,
style: 'text-align: center;font-weight:bold;color:orange;'
},{
xtype: 'textfield',
name: 'cuti1',
id: 'cuti1',
width: 40,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'textfield',
name: 'do1',
id: 'do1',
width: 40,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'textfield',
name: 'keluar1',
id: 'keluar1',
width: 50,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'textfield',
name: 'lulus1',
id: 'lulus1',
width: 50,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'textfield',
name: 'nonaktif1',
id: 'nonaktif1',
width: 65,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'textfield',
name: 'sdd1',
id: 'sdd1',
width: 40, hidden: true,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
}]
}]
}]
},
{
layout: 'column', border: false,
items: [{
columnWidth: .57, border: false, layout: 'form', bodyStyle: 'padding:5px 0px 5px 0px', // atas, kanan, bawah, kiri
items: [{
xtype: 'container',
//layout: 'column',
items:[{
xtype: 'label',
text : "Selisih:",
style: 'margin-left:10px;margin-right:10px;font-weight:bold;'
}, {
xtype: 'label',
text : "Jml:",
style: 'margin-left:3px;margin-right:3px;'
},{
xtype: 'textfield',
name: '',
id: 'idjumlah',
width: 50,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'label',
text : "Aktf:",
style: 'margin-left:3px;margin-right:3px;'
},{
xtype: 'textfield',
name: '',
id: 'idaktif',
width: 40,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'label',
text : "Cti:",
style: 'margin-left:3px;margin-right:3px;'
},{
xtype: 'textfield',
name: '',
id: 'idcuti',
width: 40,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'label',
text : "DO:",
style: 'margin-left:3px;margin-right:3px;'
},{
xtype: 'textfield',
name: '',
id: 'iddo',
width: 40,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'label',
text : "Klr:",
style: 'margin-left:3px;margin-right:3px;'
},{
xtype: 'textfield',
name: '',
id: 'idkeluar',
width: 50,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'label',
text : "Lls:",
style: 'margin-left:3px;margin-right:3px;'
},{
xtype: 'textfield',
name: '',
id: 'idlulus',
width: 50,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'label',
text : "Non-Aktf:",
style: 'margin-left:3px;margin-right:3px;'
},{
xtype: 'textfield',
name: '',
id: 'idnonaktif',
width: 65,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
},{
xtype: 'label',
text : "Sdg.DD:", hidden: true,
style: 'margin-left:3px;margin-right:3px;'
},{
xtype: 'textfield',
name: '',
id: 'idsdd',
width: 40, hidden: true,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
}]
}]
},{
columnWidth: .43, border: false, layout: 'form', bodyStyle: 'padding:5px 0px 5px 0px', // atas, kanan, bawah, kiri
items: [{
xtype: 'button',
hidden:false,
text: 'Cetak',
id: 'btnprintstudentbody',
name: 'btnprintstudentbody',
width: 50, disabled: true,
iconCls: 'silk-printer',
handler:function() {
printStudentBody();
}
}]
}]
}]
});
var panelgridstmhssmt = new Ext.Panel({
id: 'panelgridstmhssmt',
height: 165,
buttonAlign: 'left',
border: true,
autoScroll: true,
layout: 'column',
items: [{
columnWidth: .50,
border: false,
items: [gp_stmhssmt]
},{
columnWidth: .50,
border: false,
items: [gp_stmhssmt1]
}]
});
var panel2 = new Ext.Panel({
id: 'panel2',
height: 265,
title: "Daftar Mahasiswa",
buttonAlign: 'left',
border: true,
layout: 'form',
items: [{
layout: 'column', border: false, defaults: { labelWidth: 110, labelAlign: 'right' },
items: [{
columnWidth: .85, border: false, layout: 'form', bodyStyle: 'padding:5px 0px 5px 0px', // atas, kanan, bawah, kiri
items: [{
xtype: 'compositefield',
items:[{
xtype: 'combo', id: 'cb.staktiv',
fieldLabel: 'St. Aktivitas Mhs',
store: ds_staktiv, triggerAction: 'all',
valueField: 'kode', displayField: 'nama',
forceSelection: true, submitValue: true, disabled: true,
mode: 'local', emptyText:'Pilih...', width: 180,
editable: false,
listeners:{
select: function() {
var stmhs = Ext.getCmp('cb.staktiv').getValue();
var labelselisih = Ext.getCmp('selisih');
labelselisih.setText('');
Ext.getCmp('btnprintmhsred').hide();
Ext.getCmp('grid_stmhssmt').show();
Ext.getCmp('grid_stmhssmt1').show();
isCompare = false;
ds_stmhssmt.setBaseParam('kdstaktivitasmhs',stmhs);
ds_stmhssmt.reload({
scope : this,
callback: function(records, operation, success) {
var count = 0
ds_stmhssmt.each(function (rec) {
count += 1;
});
Ext.getCmp('jumlahmhs').setValue(count);
}
});
ds_stmhssmt1.setBaseParam('kdstaktivitasmhs',stmhs);
ds_stmhssmt1.reload({
scope : this,
callback: function(records, operation, success) {
var count1 = 0
ds_stmhssmt1.each(function (rec) {
count1 += 1;
});
Ext.getCmp('jumlahmhs1').setValue(count1);
}
});
}
}
},{
xtype: 'button',
hidden:false,
text: 'Cetak',
id: 'btnprintmhs',
name: 'btnprintmhs',
width: 50, disabled: true,
iconCls: 'silk-printer',
handler:function() {
printStmhssemester();
}
},{
xtype: 'button',
hidden:false,
text: 'Bandingkan',
id: 'btncompare', disabled: true,
name: 'btncompare',
width: 100,// disabled: true,
iconCls: 'silk-arrow-refresh',
handler:function() {
compare();
}
},{
xtype: 'label',
name: 'selisih',
id: 'selisih',
style: 'color: red;font-size:12px;font-weight:bold',
text: '',
}]
}]
},{
columnWidth: .10, border: false, layout: 'form', bodyStyle: 'padding:5px 0px 5px 0px', // atas, kanan, bawah, kiri
items: [{
xtype: 'button',
hidden:false,
text: 'Cetak
',
id: 'btnprintmhsred',
name: 'btnprintmhsred',
width: 50, hidden: true,
iconCls: 'silk-printer',
handler:function() {
printMhstdkTerdftar();
}
}]
}]
},panelgridstmhssmt,
{
layout: 'column', border: false, defaults: { labelWidth: 175, labelAlign: 'right' },
items: [{
columnWidth: .50, border: true, layout: 'form', bodyStyle: 'padding:5px 0px 5px 0px', // atas, kanan, bawah, kiri
items: [{
xtype: 'container',
//layout: 'column',
items:[{
xtype: 'label',
text : "Total:",
style: 'margin-left:10px;margin-right:10px;'
},{
xtype: 'textfield',
name: 'jumlahmhs',
id: 'jumlahmhs',
width: 50,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
}]
}]
},{
columnWidth: .50, border: true, layout: 'form', bodyStyle: 'padding:5px 0px 5px 0px', // atas, kanan, bawah, kiri
items: [{
xtype: 'container',
//layout: 'column',
items:[{
xtype: 'label',
text : "Total:",
style: 'margin-left:10px;margin-right:10px;'
},{
xtype: 'textfield',
name: 'jumlahmhs1',
id: 'jumlahmhs1',
width: 50,
readOnly: true,
style: 'text-align: center;font-weight:bold;'
}]
}]
}]
}]
});
var mainpanel = new Ext.form.FormPanel({
id: 'form_bp_general_id',
region: 'center',
buttonAlign: 'left',
border: true,
autoScroll: true,
layout: 'form',
maskDisabled: false,
monitorValid: true,
items: [panel1,panel2],
listeners:{
afterrender: module_afterrender
}
});
function module_afterrender(){
}
get_content(mainpanel);
//===================================================END OF ALL
}