function l_hasilusm() { var ds_thnakademik2 = store_thnakademik2(); var ds_jadwalpmb_persemester = store_jadwalpmb_persemester(); var ds_stusm = store_stusm(); var nopmbx, cmbpengujix = ''; var ds_grid = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'laporan/c_lhasilusm/grid', method: 'POST' }), params: { start: 0, limit: 5 }, root: 'data', totalProperty: 'results', autoLoad: false, fields: [ { name: "nopmb", mapping: "nopmb" }, { name: "nousm", mapping: "nousm" }, { name: "tglpmb", mapping: "tglpmb" }, { name: "nama", mapping: "nama" }, { name: "kdjk", mapping: "kdjk" }, { name: "idstmskmhs", mapping: "idstmskmhs" }, { name: "kdprodi1", mapping: "kdprodi1" }, { name: "nmklsmhs", mapping: "nmklsmhs" }, { name: "nmstmskmhs", mapping: "nmstmskmhs" }, { name: "nmstusm", mapping: "nmstusm" }, { name: "stregistrasi", mapping: "stregistrasi" }] }); var cm = new Ext.grid.ColumnModel({ // specify any defaults for each column defaults: { sortable: true // columns are not sortable by default }, columns: [new Ext.grid.RowNumberer({width: 40}), { header: '
No.PMB
', width: 100, dataIndex: 'nopmb', sortable: true },{ header: '
No.USM
', width: 100, dataIndex: 'nousm', sortable: true },{ header: '
Peserta
', width: 230, dataIndex: 'nama', sortable: true },{ header: '
(L/P)
', width: 40, dataIndex: 'kdjk', sortable: true, align: 'center' }, { header: '
Program Studi
', width: 220, dataIndex: 'kdprodi1', sortable: true }, { header: '
Kelas
', width: 150, dataIndex: 'nmklsmhs', sortable: true }, { header: '
Status Pendaftar
', width: 100, dataIndex: 'nmstmskmhs', sortable: true }, { header: '
Status USM
', width: 100, dataIndex: 'nmstusm', sortable: true },{ header: '
Status Registrasi
', width: 100, dataIndex: 'stregistrasi', sortable: true }] }); var vw = new Ext.grid.GridView({ emptyText: '< No Data To Display >' }); var sm_nya = new Ext.grid.CheckboxSelectionModel({ listeners: { // rowselect: select_action, // rowdeselect: deselect_action } }); 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({ pageSize: 1000, store: ds_grid, displayInfo: true, displayMsg: 'Data Hasil USM Dari {0} - {1} of {2}', emptyMsg: 'Data Hasil USM Belum Dipilih.' }); var grid_nya = new Ext.grid.EditorGridPanel({ store: ds_grid, frame: true, loadMask: true, //width: 1140, height: 450, plugins: cari_data, id: 'grid_det', autoWidth:true, // autoSizeColumns:true, // enableColumnResize: true, // enableColumnHide: false, // enableColumnMove: false, // enableHdMenu: false, // columnLines: true, // loadMask: true, buttonAlign: 'left', defaults: { anchor: '-10' }, forceFit: true, tbar: [ { xtype: 'button', text: ' Cetak ', iconCls: 'silk-printer', id: 'btn_cetak', width: 3, handler: function() { var parsing = ''; parsing = parsing + Ext.getCmp('thnakademik').getValue() + 'istra'; parsing = parsing + Ext.getCmp('kdjadwalpmb').getValue() + 'istra'; parsing = parsing + Ext.getCmp('cmbidstusm').getValue() + 'istra'; var win = window.open(); win.location.reload(); win.location = BASE_URL + 'print/print_topdf/plhasilusm/'+parsing; } },'-', { xtype: 'button', id: 'btn_excel_lap_hsl_usm', iconCls: 'silk-save', text: ' Export To Excel', handler: function() { export_lap_hsl_usm(); } },'->'], sm: sm_nya, vw: vw, autoScroll: true, cm: cm, //bbar: paging, //autoExpandColumn: 'common', clicksToEdit: 1, listeners: { rowclick: function rowclick(grid, rowIdx) { var rec = ds_grid.getAt(rowIdx); nopmbx = rec.data["nopmb"]; // alert(nopmbx); } } }); var form_bp_general = new Ext.form.FormPanel({ id: 'form_bp_general_id', title: 'Laporan Hasil USM', region: 'center', //autoScroll: true, buttonAlign: 'left', bodyStyle: 'padding: 5px', border: false, disabled: true, waitMsg: 'Waiting...', maskDisabled: false, monitorValid: true, tbar: [{ xtype: 'buttongroup', title: 'Pencarian', columns: 7, width: 500, defaults: { scale: 'small' }, items: [{ text: 'Tahun Akademik - Semester :' }, { xtype: 'combo', store: ds_thnakademik2, name: 'thnakademik', id: 'thnakademik', triggerAction: 'all', editable: false, valueField: 'kdstsemester', displayField: 'nmthnakademik', forceSelection: true, submitValue: true, hiddenName: 'h_thnkademik', listeners: {}, typeAhead: true, mode: 'local', emptyText: 'Pilih...', selectOnFocus: true, width: 125, listeners:{ select: function(cb, rec) { Ext.getCmp('kdjadwalpmb').disable(); ds_jadwalpmb_persemester.reload({ params: { kdstsemester: cb.getValue(), }, callback: function(results){ Ext.getCmp('kdjadwalpmb').enable(); Ext.getCmp('kdjadwalpmb').setValue('-'); } }); } } },{ text: 'Jadwal PMB :' }, { xtype: 'combo', store: ds_jadwalpmb_persemester, name: 'kdjadwalpmb', id: 'kdjadwalpmb', triggerAction: 'all', editable: false, valueField: 'idjadwalpmb', displayField: 'nmjadwalpmb', forceSelection: true, submitValue: true, hiddenName: 'h_kdjadwalpmb', listeners: {}, typeAhead: true, disabled: true, mode: 'local', emptyText: 'Pilih...', selectOnFocus: true, width: 300 }, { text: 'Status USM' }, { xtype: 'combo', store: ds_stusm, name: 'cmbidstusm', id: 'cmbidstusm', triggerAction: 'all', editable: false, valueField: 'idstusm', displayField: 'nmstusm', forceSelection: true, submitValue: true, hiddenName: 'h_kolom', listeners: {}, typeAhead: true, mode: 'local', emptyText: 'Pilih...', selectOnFocus: true, width: 250 },{ xtype: 'button', text: ' Cari ', iconCls: 'silk-find', id: 'btn_data', width: 3, handler: function() { ds_grid.setBaseParam('kdstsemester', Ext.getCmp('thnakademik').getValue()); ds_grid.setBaseParam('idjadwalpmb', Ext.getCmp('kdjadwalpmb').getValue()); ds_grid.setBaseParam('idstusm', Ext.getCmp('cmbidstusm').getValue()); ds_grid.load(); } }] }], items: [grid_nya] }); //excel function export_lap_hsl_usm(){ var kdstsemester = Ext.getCmp('thnakademik').getValue(); var jadwalpmb = Ext.getCmp('kdjadwalpmb').getValue(); var stusm = Ext.getCmp('cmbidstusm').getValue(); window.location = BASE_URL + 'laporan/c_lhasilusm/export_excel/'+kdstsemester+'/'+jadwalpmb+'/'+stusm; } get_content(form_bp_general); }