function p_ijazah() { var ds_grid = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'c_ijazah/mhs_lulus_ijazah', method: 'POST' }), params: { start: 0, limit: 50 }, root: 'data', totalProperty: 'results', autoLoad: false, fields: [{ name: "nim", mapping: "nim" }, { name: "nmmhs", mapping: "nmmhs" }, { name: "kdjnskelamin", mapping: "kdjnskelamin" }, { name: "tptlahir", mapping: "tptlahir" }, { name: "tgllahir", mapping: "tgllahir" }, { name: "nmprodi", mapping: "nmprodi" }, { name: "stprodi", mapping: "stprodi" }, { name: "noskakreditasi", mapping: "noskakreditasi" }, { name: "tglskakreditasi", mapping: "tglskakreditasi" }, { name: "thnmasuk", mapping: "thnmasuk" }, { name: "tgllulus", mapping: "tgllulus" }, { name: "gelar", mapping: "gelar" }, { name: "noijazah", mapping: "noijazah" }, { name: "tglijazah", mapping: "tglijazah" }, { name: "pimpinan2", mapping: "pimpinan2" }, { name: "pimpinan1", mapping: "pimpinan1" }] }); var sm_nya = new Ext.grid.RowSelectionModel({ singleSelect: true, listeners: {} }); var cari_data = [new Ext.ux.grid.Search({ iconCls: 'btn_search', minChars: 1, autoFocus: true, autoHeight: true, position: 'top', mode: 'local', width: 200 })]; var paging = new Ext.PagingToolbar({ store: ds_grid, displayInfo: true, displayMsg: 'Data Menu Dari {0} - {1} of {2}', emptyMsg: 'No data to display' }); var editor = new Ext.ux.grid.RowEditor({ saveText: 'Update', clicksToEdit: 2 }); editor.on({ scope: this, afteredit: function(roweditor, changes, record, rowIndex) { /* alert(record.get('noskl') + " " + record.get('tglskl') + " " + record.get('tglpengesahanskl') + " " + record.get('nmpimpinan') ); */ Ext.Ajax.request({ url: BASE_URL + 'c_ijazah/update_ijazah', params: { nim: record.get('nim'), noijazah: record.get('noijazah'), tglijazah: record.get('tglijazah'), pimpin2: record.get('pimpinan2'), pimpin1: record.get('pimpinan1') }, success: function() { Ext.MessageBox.alert("Informasi", "Simpan Data Berhasil"); ds_grid.load(); }, failure: function() { Ext.MessageBox.alert("Informasi", "SImpan Data Gagal"); } }); } }); var grid_nya = new Ext.grid.GridPanel({ store: ds_grid, frame: true, height:400, autoWidth: true, bodyStyle: 'padding:3px 3px 3px 3px', plugins: editor, id: 'grid_det_product1', forceFit: true, tbar: [{ text: 'Cari Berdasarkan' }, { xtype: 'combo', store: ['NPM', 'Nama Mahasiswa', '(L/P)', 'Tpt. Lahir', 'Tgl. Lahir', 'Program Studi', 'Status Program Studi', 'No. SK Akreditasi', 'Tgl. SK Akreditasi', 'Tahun Masuk', 'Tgl. Lulus Sidang', 'Gelar', 'No. Ijazah', 'Tgl. Ijazah', 'Pembantu Ketua Bidang Akademik', 'Pimpinan/Ketua'], //ds_fieldpmb, name: 'idfield', id: 'idfield', triggerAction: 'all', editable: false, valueField: 'kolom', displayField: 'kolom', forceSelection: true, submitValue: true, hiddenName: 'h_kolom', listeners: {}, typeAhead: true, mode: 'remote', emptyText: 'Pilih...', selectOnFocus: true, width: 250 }, { xtype: 'textfield', name: 'keywordnya', id: 'keywordnya', width: 250 //, // fieldLabel:'Dodol' }, { xtype: 'button', text: ' Cari ', iconCls: 'silk-find', id: 'btn_data1', width: 3, handler: function() { ds_grid.setBaseParam('idnya', Ext.getCmp('idfield').getValue()); ds_grid.setBaseParam('keyword', Ext.getCmp('keywordnya').getValue()); ds_grid.load(); } },{ xtype: 'button', id: 'btn_excel_dftr_ijazah', iconCls: 'silk-save', text: ' Export To Excel', handler: function() { export_excel_dftr_mhslulus(); } }], sm: sm_nya, autoScroll: true, autoSizeColumns: true, enableColumnResize: true, enableColumnHide: false, enableColumnMove: false, enableHdaccess: false, columnLines: true, loadMask: true, columns: [new Ext.grid.RowNumberer(), { header: 'NPM', width: 100, dataIndex: 'nim', sortable: true },{ header: 'Nama Mahasiswa', width: 100, dataIndex: 'nmmhs', sortable: true },{ header: '(L/P)', width: 50, dataIndex: 'kdjnskelamin', sortable: true },{ header: 'Tpt. Lahir', width: 100, dataIndex: 'tptlahir', sortable: true },{ header: 'Tgl. Lahir', width: 100, dataIndex: 'tgllahir', sortable: true },{ header: 'Program Studi', width: 100, dataIndex: 'nmprodi', sortable: true },{ header: 'Status Program Studi', width: 100, dataIndex: 'stprodi', sortable: true },{ header: 'No. SK Akreditasi', width: 100, dataIndex: 'noskakreditasi', sortable: true },{ header: 'Tgl. SK Akreditasi', width: 100, dataIndex: 'tglskakreditasi', sortable: true },{ header: 'Tahun Masuk', width: 100, dataIndex: 'thnmasuk', sortable: true },{ header: 'Tgl. Lulus Sidang', width: 100, dataIndex: 'tgllulus', sortable: true },{ header: 'Gelar', width: 100, dataIndex: 'gelar', sortable: true },{ header: 'No. Ijazah', width: 100, dataIndex: 'noijazah', sortable: true, editor: { xtype: 'textfield', } },{ xtype: 'datecolumn', header: 'Tgl. Ijazah', width: 100, dataIndex: 'tglijazah', sortable: true, format: 'm/d/Y', editor: { xtype: 'datefield', minValue: '01/01/2006' } },{ header: 'Dekan', width: 100, dataIndex: 'pimpinan2', sortable: true, editor: { xtype: 'combo', store: ds_pimpinan, //ds_fieldpmb, name: 'cbpimpinan2', id: 'cbpimpinan2', triggerAction: 'all', editable: false, valueField: 'nmpimpinan', displayField: 'nmpimpinan', forceSelection: true, submitValue: true, hiddenName: 'h_pimpinan2', listeners: {}, typeAhead: true, mode: 'remote', emptyText: 'Pilih...', selectOnFocus: true, width: 250 } },{ header: 'Rektor', width: 100, dataIndex: 'pimpinan1', sortable: true, editor: { xtype: 'combo', store: ds_pimpinan, //ds_fieldpmb, name: 'cbpimpinan1', id: 'cbpimpinan1', triggerAction: 'all', editable: false, valueField: 'nmpimpinan', displayField: 'nmpimpinan', forceSelection: true, submitValue: true, hiddenName: 'h_pimpinan1', listeners: {}, typeAhead: true, mode: 'remote', emptyText: 'Pilih...', selectOnFocus: true, width: 250 } },{ xtype: 'actioncolumn', width: 100, header: 'Print', align:'center', items: [{ icon : 'resources/img/icons/fam/print.gif', tooltip: 'Cetak', handler: function(grid, rowIndex) { var rec = ds_grid.getAt(rowIndex); var parsing = rec.get('nim') + 'istra'; var win = window.open(); win.location.reload(); //win.location = BASE_URL + 'print/print_topdf/pcetakskwitansi/' + parsing; win.location = BASE_URL + 'rpt/rpt_ijazah/pijazahindo/' + parsing; } }] }], bbar: paging, listeners: { rowclick: function rowClick(grid, rowIdx) { } } }); //=================================================================== var form_bp_general = new Ext.form.FormPanel({ id: 'form_bp_general', bodyStyle: 'padding: 5px', autoScroll: true, title: 'Ijazah Akademik', items: [{ xtype: 'fieldset', title: 'Filter', layout:'column', items: [{ columnWidth: .33, layout: 'form', labelAlign:'right', border: false, items: [{ xtype: 'combo', fieldLabel: 'Program Studi', store: ds_prodi, name: 'kdprodi', id: 'kdprodi', triggerAction: 'all', editable: false, valueField: 'kdprodi', displayField: 'nmprodi', forceSelection: true, submitValue: true, hiddenName: 'h_kdprodi', listeners: { select: function() { searchIjazah(); } }, typeAhead: true, mode: 'local', emptyText: 'Pilih...', selectOnFocus: true, width: 250 }] }, { columnWidth: .50, layout: 'form', labelAlign:'right', border: false, items: [{ xtype: 'combo', labelStyle: 'width:170px;', fieldLabel: 'Tahun Akademik - Semester', store: ds_thnakademik2, name: 'thnakademik', id: 'thnakademik', triggerAction: 'all', editable: false, valueField: 'kdstsemester', displayField: 'nmthnakademik', forceSelection: true, submitValue: true, hiddenName: 'h_thnkademik', listeners: { select: function() { searchIjazah(); } }, typeAhead: true, mode: 'local', emptyText: 'Pilih...', selectOnFocus: true, width: 150 }] }] }, { xtype: 'fieldset', title: 'Daftar Mahasiswa (LULUS)', items: [grid_nya] }] }); function searchIjazah() { var kdprodi = Ext.getCmp('kdprodi').getValue(); var kdstsemester = Ext.getCmp('thnakademik').getValue(); if (kdprodi && kdstsemester) { ds_grid.setBaseParam('kdprodi', Ext.getCmp('kdprodi').getValue()); ds_grid.setBaseParam('thnakademik', Ext.getCmp('thnakademik').getValue()); ds_grid.load(); } } function export_excel_dftr_mhslulus(){ //var tablename = 'excel_daftar_ijazah'; var waitmsgexport = Ext.MessageBox.wait('Exporting Data...', 'Info'); var kdprodi = RH.getCompValue('kdprodi'); var kdstsemester = RH.getCompValue('thnakademik'); if(kdprodi && kdstsemester){ Ext.Ajax.request({ url: BASE_URL + 'c_ijazah/mhs_lulus_ijazah', params: { kdprodi: kdprodi, kdstsemester: kdstsemester }, success: function() { waitmsgexport.hide(); window.location = BASE_URL + 'c_ijazah/export_excel/'+kdprodi+'/'+kdstsemester; }, failure: function() { waitmsgexport.hide(); Ext.MessageBox.alert("Info", "Export Data Gagal"); } }); }else{ Ext.MessageBox.alert("Info", "Data Kosong"); } } function export_excel_dftr_mhslulus2(){ var kdprodi = RH.getCompValue('kdprodi'); var kdstsemester = RH.getCompValue('thnakademik'); if(kdprodi && kdstsemester){ window.location = BASE_URL + 'c_ijazah/export_excel/'+kdprodi+'/'+kdstsemester; }else{ Ext.MessageBox.alert("Info", "Program Studi atau Thn Akademik / Semester kosong"); } } SET_PAGE_CONTENT(form_bp_general); }