function l_pmb() { var nopmbx, cmbpengujix = ''; var prodiall; var ds_thnakademik2 = store_thnakademik2(); var ds_jadwalpmb_persemester = store_jadwalpmb_persemester(); var ds_prodi = store_prodi(); var ds_tbpro = store_tbpro(); var ds_grid = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'laporan/c_lpmb/grid', method: 'POST' }), params: { start: 0, limit: 5 }, root: 'data', totalProperty: 'results', autoLoad: false, fields: [ { name: "nopmb", mapping: "nopmb" }, { 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" }] }); 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(), { header: 'No. PMB', width: 100, dataIndex: 'nopmb', sortable: true },{ header: 'Peserta', width: 150, dataIndex: 'nama', sortable: true },{ header: '(L/P)', width: 40, dataIndex: 'kdjk', sortable: true }, { header: 'Program Studi', width: 180, dataIndex: 'kdprodi1', sortable: true // , // editor: { // xtype: 'combo', // allowBlank: false, // store: ds_prodi, // name: 'cmbkdprodi', // id: 'cmbkdprodi', // valueField: 'kdprodi', // displayField: 'nmprodi', // forceSelection: true, // submitValue: true, // hiddenName: 'h_cmbkdprodi', // listeners: { // select: function() { // edit() // } // }, // typeAhead: true, // mode: 'local', // emptyText: 'Pilih...', // selectOnFocus: true // } },{ header: 'Kelas', width: 110, dataIndex: 'nmklsmhs', sortable: true }, { header: 'Status Pendaftar', width: 110, dataIndex: 'nmstmskmhs', 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: 'remote', width: 200 })]; var paging = new Ext.PagingToolbar({ pageSize: 50, store: ds_grid, displayInfo: true, displayMsg: 'Data PMB Dari {0} - {1} of {2}', emptyMsg: 'Data PMB Belum Dipilih.' }); var grid_nya = new Ext.grid.EditorGridPanel({ store: ds_grid, frame: true, loadMask: true, //width: 1140, height: 530, //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: 'buttongroup', title: 'Pencarian', columns: 6, width: 800, 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: 'Program Studi :' }, { xtype: 'combo', store: ds_prodi, name: 'kdprodi', id: 'kdprodi', triggerAction: 'all', editable: true, valueField: 'kdprodi', displayField: 'nmprodi', forceSelection: true, submitValue: true, hiddenName: 'h_kdprodi', listeners: {}, typeAhead: true, mode: 'local', emptyText: 'Pilih...', selectOnFocus: true, width: 270 }] }, { 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('kdprodi', Ext.getCmp('kdprodi').getValue()); // ds_grid.setBaseParam('prodiall', prodiall); // alert(Ext.getCmp('kdprodi').getValue()); ds_grid.load(); } },'-', { 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('kdprodi').getValue() + 'istra'; var win = window.open(); win.location.reload(); win.location = BASE_URL + 'print/print_topdf/plpmb/'+parsing; } },'-', { xtype: 'button', text: ' Excel', iconCls: 'silk-save', id: 'btn_excel', width: 3, handler: function() { var parsing = ''; parsing = parsing + Ext.getCmp('thnakademik').getValue() + '/'; parsing = parsing + Ext.getCmp('kdjadwalpmb').getValue() + '/'; parsing = parsing + Ext.getCmp('kdprodi').getValue(); window.location.reload(); window.location = BASE_URL + 'laporan/c_lpmb/export_excel/'+parsing; } }], 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 Penerimaan Mahasiswa Baru', region: 'center', //autoScroll: true, buttonAlign: 'left', bodyStyle: 'padding: 5px', border: false, disabled: true, waitMsg: 'Waiting...', maskDisabled: false, monitorValid: true, items: [{ layout: 'form', border: false, items: [grid_nya] }] }); get_content(form_bp_general); }