function daftar_mhs(){ /** COMMON STORES */ var ds_prodireg = store_prodireg(); var ds_years = store_tahun(); /** STORE for GRID COLUMN EDITOR type COMBO */ /** MAIN GRID STORE: ds_mhsIKULUM */ var fields_mhs = RH.storeFields( 'nim' , 'nmmhs' , 'jnskelamin' , 'ttl' , 'agama' , 'nohpmhs' , 'alamatasal' , 'nmortu' , 'nmortuayah' , 'thnmasuk' , 'nmprodi' , 'shiftmhs' , 'nmklmhs' , 'nmthnakademik' , 'kdstawalmhs' , 'kdstaktivitasmhs' , 'nmcutidet' , 'stbekerja' , 'noktp' , 'nmptasal'); var pageSize = 50; var ds_mhs = RH.JsonStore({ url : BASE_URL + 'mahasiswa_controller/get_mhs', fields : fields_mhs, limit: pageSize, params: [ {key:'kdprodi', id:'cb.prodi-mhs'} ,{key:'thnmasuk', id:'cb.thmasuk-mhs'} ], enableSearch: true, }); //SEARCH COMPONENT /** FUNCTION for GRID COLUMN EDITOR */ /** GRID COLUMN MODEL */ var cm_mhs = new Ext.grid.ColumnModel([ new Ext.grid.RowNumberer({width: 48}), //for rows numbering { header: 'NIM', width: 120, dataIndex: 'nim', sortable: true, },{ header: 'Nama Mahasiswa', width: 250, dataIndex: 'nmmhs', sortable: true, },{ header: 'No KTP', width: 100, dataIndex: 'noktp', sortable: true, align: 'center' },{ header: 'Asal PT/PTS(Pindahan)', width: 250, dataIndex: 'nmptasal', sortable: true, },{ header: 'L/P', width: 60, dataIndex: 'jnskelamin', sortable: true, align: 'center' },{ header: 'Tempat Tgl.Lahir (dd/mm/yyyy)', width: 150, dataIndex: 'ttl', sortable: true, },{ header: 'Agama', width: 60, dataIndex: 'agama', sortable: true, },{ header: 'No.Hp', width: 100, dataIndex: 'nohpmhs', sortable: true, },{ header: 'Alamat', width: 150, dataIndex: 'alamatasal', sortable: true, },{ header: 'Nama Ibu', width: 250, dataIndex: 'nmortu', sortable: true, },{ header: 'Nama Ayah', width: 250, dataIndex: 'nmortuayah', sortable: true, },{ header: 'Status Bekerja', width: 100, dataIndex: 'stbekerja', sortable: true, },{ header: 'Thn.Masuk', width: 70, dataIndex: 'thnmasuk', align: 'center', sortable: true, },{ header: 'Prodi', width: 200, dataIndex: 'nmprodi', sortable: true, },{ header: 'Shift.Mhs', width: 100, dataIndex: 'shiftmhs', sortable: true, },{ header: 'Kelas', width: 100, dataIndex: 'nmklmhs', sortable: true, },{ header: 'Smt.Masuk', width: 100, dataIndex: 'nmthnakademik', sortable: true, },{ header: 'St.Masuk Mhs', width: 100, dataIndex: 'stawalmhs', sortable: true, },{ header: 'St.Mahasiswa', width: 100, dataIndex: 'kdstaktivitasmhs', sortable: true, },{ header: 'Ct.Mahasiswa', width: 100, dataIndex: 'nmcutidet', sortable: true, }] ); var gp_mhs = RH.EditorGridPanel_T1({ ds: ds_mhs, cm: cm_mhs, singleSelect: true, clicksToEdit: 1, //allowAdd: true, pageSize: pageSize, cellclick: '', }); var fp_daftar_mhs = RH.GPContainer1_wHeaders({ title: 'Daftar Mahasiswa', iconCls:'silk-book', gridPanel: gp_mhs, headerLabelWidth: 140, headers: [{ xtype: 'container', layout: 'hbox', items:[{ layout:'form', labelWidth:90, labelAlign:'right', items: [ RH.ActionCombo({ id: 'cb.prodi-mhs', label: 'Program Studi', width: 300, data: ds_prodireg, key: 'kdprodi', display: 'lnmprodi', fnSelect: function(){ reloadGridmhs(); } }) ] },{ layout:'form', labelWidth:160, labelAlign:'right', items: [ RH.ActionCombo({ id: 'cb.thmasuk-mhs', label: 'Thn.Masuk/Angkatan', width: 100, data: ds_years, key: 'kode', display: 'nama', fnSelect: function(){ reloadGridmhs(); } }) ] },{ xtype:'button', iconCls:'silk-printer', text:'Cetak', margins:'0 0 0 10', handler: function(){ fnPrintDaftarmhs(); } },{ xtype: 'button', id: 'btn_excel_dftr_mhs', iconCls: 'silk-save', text: ' Export To Excel', handler: function() { export_daftar_mahasiswa(); } }] },{ xtype: 'textfield', id: 'hidden.kdmk', hidden:true, }], }); SET_PAGE_CONTENT(fp_daftar_mhs); function reloadGridmhs(){ ds_mhs.reload({ params: { kdprodi: RH.getCompValue('cb.prodi-mhs', true), thnmasuk: RH.getCompValue('cb.thmasuk-mhs', true) } }); } } function fnPrintDaftarmhs(){ var kdprodi = RH.getCompValue('cb.prodi-mhs'); var thnmasuk = RH.getCompValue('cb.thmasuk-mhs'); if(kdprodi && thnmasuk){ RH.ShowReport(BASE_URL + 'rpt/rpt_daftar_mhs/get_daftar_mhs/'+kdprodi+'/'+thnmasuk); }else{ Ext.MessageBox.alert("Info", "Program Studi atau Thn.Masuk/Angkatan kosong"); } } //excel function export_daftar_mahasiswa(){ var kdprodi = RH.getCompValue('cb.prodi-mhs'); var thnmasuk = RH.getCompValue('cb.thmasuk-mhs'); if(kdprodi && thnmasuk){ window.location = BASE_URL + 'mahasiswa_controller/export_excel/'+kdprodi+'/'+thnmasuk; }else{ Ext.MessageBox.alert("Info", "Program Studi atau Thn.Masuk/Angkatan kosong"); } }