//SEARCH FIELDS MAHASISWA function wGridMhsPernyataan(opsistmhs, kdprodi, kdstsemester){ //,kdstsemester var ds_prodireg = store_prodireg(); var ds_stsmt = store_stsmt(); var fields_lookup_prodi = RH.storeFields('nim','nmmhs','kdjnskelamin','thnmasuk','stdaftar', 'idjnskls','kdstsemestermasuk', 'kdstsemester','idsemester','semester', 'idklsmhs','nmklsmhs','staktif', 'nmfakultas','kdfakultas','nmortu','alamatortu','nmpekerjaanortu'); //DATA STORE var pageSize = 20; var ds_lookup_prodi = RH.JsonStore({ url : BASE_URL + 'mahasiswa_controller/lookup_add_mhspernyataan', fields : fields_lookup_prodi, autoLoad: true, root: 'data', params: [ {key:'kdprodi', value: kdprodi} ,{key:'opsi', value: opsistmhs} ,{key:'kdstsemester', value: kdstsemester} ], limit: pageSize, }); //SEARCH COMPONENT var sb_lookup = RH.searchComp({ id: 'sb_lookup', fields : ['nim:NPM','nmmhs:Nama Mahasiswa','thnmasuk:Tahun Masuk'], selected : 'nmmhs', store : ds_lookup_prodi, textWidth : 200 }); //COLUMN MODEL var cm_mahasiswa_prodi = new Ext.grid.ColumnModel( [{ header: 'NPM', width: 100, dataIndex: 'nim', sortable: true }, { header: 'Nama Mahasiswa', width: 200, dataIndex: 'nmmhs', sortable: true }, { header: '(L/P)', width: 50, dataIndex: 'kdjnskelamin', sortable: true }, { header: 'Tahun Masuk', width: 100, dataIndex: 'thnmasuk', sortable: true }, { header: 'Semester', width: 100, dataIndex: 'semester', sortable: true }, { header: 'Status Daftar', width: 100, dataIndex: 'stdaftar', sortable: true }, { header: 'Status Aktifitas', width: 100, dataIndex: 'staktif', sortable: true }, { header: 'Jenis Kelas', width: 100, dataIndex: 'nmklsmhs', sortable: true }] ); // Selection Model var sm_mhs_prodi = new Ext.grid.RowSelectionModel({singleSelect: true}); // Grid View var gv_mhs_prodi = new Ext.grid.GridView({emptyText: '< Belum ada Data >'}); //GRID PANEL var gp_mhs_prodi = new Ext.grid.GridPanel({ id: 'gp.search-mhs', ds: ds_lookup_prodi, cm: cm_mahasiswa_prodi, sm: sm_mhs_prodi, view: gv_mhs_prodi, forceFit: true,//height: 400,width: 720, autoSizeColumns: true, enableColumnResize: true, enableColumnHide: false, enableColumnMove: false, enableHdaccess: false, columnLines: true, loadMask: true, //buttonAlign: 'left', layout: 'anchor', tbar:[sb_lookup], bbar: new Ext.PagingToolbar({ store: ds_lookup_prodi, displayInfo: true, displayMsg: 'Data {0} - {1} dari {2}', emptyMsg: "Belum ada data", }), listeners: { rowdblclick: dblclk_mhs_prodi } }); var win_mhs_prodi = new Ext.Window({ id: 'w.search-mhs', title: 'Daftar Mahasiswa (Program Studi)', modal: true, layout: 'fit', width:720, height:400, items: [gp_mhs_prodi] }).show(); function dblclk_mhs_prodi(grid, rowIdx) { var store = Ext.getCmp('gp.search-mhs').store; var rec = store.getAt(rowIdx); var npm = rec.data['nim']; var noktp = rec.data['noktp']; var nama = rec.data['nmmhs']; var nmortu = rec.data['nmortu']; var alamatortu = rec.data['alamatortu']; var idpekerjaanortu = rec.data['idpekerjaanortu']; var kdfakultas = rec.data['kdfakultas']; var fakultas = rec.data['nmfakultas']; var thnmasuk = rec.data['thnmasuk']; var idjnskls = rec.data['idjnskls']; var semester = rec.data['idsemester']; if (opsistmhs == 'srt_pernyataan') { Ext.getCmp('tf.frm.nim').setValue(npm); Ext.getCmp('tf.frm.nmmhs').setValue(nama); Ext.getCmp('tf.frm.nmortu').setValue(nmortu); Ext.getCmp('tf.frm.alamatortu').setValue(alamatortu); Ext.getCmp('tf.frm.idpekerjaanortu').setValue(idpekerjaanortu); Ext.getCmp('tf.frm.fakultas').setValue(fakultas); Ext.getCmp('kode_fakultas').setValue(kdfakultas); Ext.getCmp('idthnmasuk').setValue(thnmasuk); Ext.getCmp('idjnskelas').setValue(idjnskls); Ext.getCmp('cb.frm.idsemester').setValue(semester); Ext.getCmp('w.search-mhs').close(); } } }; function Right(str, n){ if (n <= 0) return ""; else if (n > String(str).length) return str; else { var iLen = String(str).length; return String(str).substring(iLen, iLen - n); } } function setDataMhsPrProdi(data){ //PERSONAL TAB RH.setCompValue('tf.npm-mhs', data.nim); RH.setCompValue('tf.noktp-mhs', data.noktp); RH.setCompValue('tf.nama-mhs', data.nmmhs); RH.setCompValue('cb.gender-mhs', data.kdjnskelamin); RH.setCompValue('tf.tplahir-mhs', data.tptlahir); RH.setCompValue('df.tglahir-mhs', data.tgllahir); RH.setCompValue('cb.agama-mhs', data.kdagama); RH.setCompValue('cb.goldarah-mhs', data.idgoldarah); RH.setCompValue('cb.wn-mhs', data.kdwn); RH.setCompValue('tf.telp-mhs', data.notelpmhs); RH.setCompValue('tf.hp-mhs', data.nohpmhs); RH.setCompValue('tf.alamat_asal-mhs', data.alamatasal); RH.setCompValue('tf.kel_asal-mhs', data.kelurahanasal); RH.setCompValue('tf.kec_asal-mhs', data.kecamatanasal); RH.setCompValue('lu.kdkotkabasal', data.kdkotkabasal); RH.setCompValue('lu.nmkotkabasal', data.nmkotkabasal); RH.setCompValue('tf.kdpos_asal-mhs', data.kdposasal); RH.setCompValue('tf.alamat_surat-mhs', data.alamatsurat); RH.setCompValue('tf.kel_surat-mhs', data.kelurahansurat); RH.setCompValue('tf.kec_surat-mhs', data.kecamatansurat); RH.setCompValue('lu.kdkotkabsurat', data.kdkotkabsurat); RH.setCompValue('lu.nmkotkabsurat', data.nmkotkabsurat); RH.setCompValue('tf.kdpos_surat-mhs', data.kdpossurat); //ORTU TAB's Fields RH.setCompValue('tf.namaortu', data.nmortu); RH.setCompValue('cb.jobortu', data.idpekerjaanortu); RH.setCompValue('cb.eduortu', data.idpendidikanortu); RH.setCompValue('tf.alamatortu', data.alamatortu); RH.setCompValue('tf.kelortu', data.kelurahanortu); RH.setCompValue('tf.kecortu', data.kecamatanortu); RH.setCompValue('lu.kdkotkabortu', data.kdkotkabortu); RH.setCompValue('lu.nmkotkabortu', data.nmkotkabortu); RH.setCompValue('tf.kdposortu', data.kdposortu); RH.setCompValue('tf.tlportu', data.notelportu); //DAFTAR TAB's Fields RH.setCompValue('tf.nopmb', data.nopmb); RH.setCompValue('cb.stsmt', data.kdstsemester); RH.setCompValue('cb.prodireg', data.kdprodi); RH.setCompValue('cb.shift', data.shiftmhs); RH.setCompValue('cb.class', data.idklsmhs); RH.setCompValue('cb.thmasuk', data.thnmasuk); RH.setCompValue('df.tgmasuk', data.tglmasuk); RH.setCompValue('cb.stawal', data.kdstawalmhs); RH.setCompValue('cb.staktiv', data.kdstaktivitasmhs); RH.setCompValue('lu.kdpropinsislta', data.kdpropinsislta); RH.setCompValue('lu.nmproslta', data.nmproslta); RH.setCompValue('cb.batasstudi', data.btsstudi); //SLTA TAB's Fields RH.setCompValue('tf.nmslta', data.nmslta); RH.setCompValue('lu.kdkotkabslta', data.kdkotkabslta); RH.setCompValue('lu.nmkotkabslta', data.nmkotkabslta); RH.setCompValue('cb.jnslta', data.idjnsslta); RH.setCompValue('cb.stakrslta', data.idstakreditasislta); RH.setCompValue('cb.thlulusslta', data.thnlulusslta); RH.setCompValue('tf.nemslta', data.nemslta); RH.setCompValue('tf.rankslta', data.rangkingslta); RH.setCompValue('tf.noijzslta', data.noijazahslta); RH.setCompValue('df.tgijzslta', data.tglijazahslta); // ASAL PT/PINDAHAN RH.setCompValue('lu.kdptasal', data.kdptasal); RH.setCompValue('lu.nmptasal', data.nmptasal); RH.setCompValue('cb.jnpt-asal', data.idjnspt); RH.setCompValue('cb.stakr-asal', data.idstakreditasi); RH.setCompValue('cb.kuakr-asal', data.idkuakreditasi); RH.setCompValue('tf.jjgstudi-asal', data.kdjenjangstudiasal); RH.setCompValue('tf.fakultas-asal', data.fakultasasal); RH.setCompValue('lu.kdprodiasal', data.kdprodiasal); RH.setCompValue('lu.nmprodiasal', data.nmprodiasal); RH.setCompValue('tf.npm-asal', data.nimasal); RH.setCompValue('tf.noijzpt-asal', data.noijazahasal); RH.setCompValue('df.tgijzpt-asal', data.tglijazahasal); RH.setCompValue('nf.smtpindah-asal', data.idsemesterpindah); RH.setCompValue('nf.jumsks-asal', data.jmlsksdiakui); RH.setCompValue('ta.alasanpindah', data.alasanpindah); // PEKERJAAN MAHASISWA RH.setCompValue('cb.idjob-mhs', data.idpekerjaanmhs); RH.setCompValue('tf.tpjob-mhs', data.nmtptbekerjamhs); RH.setCompValue('tf.alamatjob-mhs', data.alamatkerkamhs); RH.setCompValue('tf.jabjob-mhs', data.jabatanmhs); // ALUMNI RH.setCompValue('cb.idjob-alumni', data.idpekerjaanalumni); RH.setCompValue('tf.tpjob-alumni', data.nmtptbekerjaalumni); RH.setCompValue('tf.alamatjob-alumni', data.alamatkerjaalumni); RH.setCompValue('tf.jabjob-alumni', data.jabatanalumni); RH.setCompValue('cb.thout-alumni', data.thnkeluar); RH.setCompValue('df.tglulus-alumni', data.tgllulus); //S3 /* RH.setCompValue('cb.biaya-s3', data.kdbiayastudi); RH.setCompValue('tf.kdpt-s3', data.kdpttptbekerja); RH.setCompValue('tf.nmpt-s3', data.nmpttptbekerja); RH.setCompValue('tf.kdprodi-s3', data.kdproditptbekerja); RH.setCompValue('tf.nmprodi-s3', data.nmproditptbekerja); RH.setCompValue('tf.nippro', data.nidupromotor); RH.setCompValue('tf.nipko1', data.nidukopromotor1); RH.setCompValue('tf.nipko2', data.nidukopromotor2); RH.setCompValue('tf.nipko3', data.nidukopromotor3); RH.setCompValue('tf.nipko4', data.nidukopromotor4); */ //LAINNYA RH.setCompValue('tf.email-mhs', data.email); RH.setCompValue('tf.fb-mhs', data.facebook); RH.setCompValue('tf.twit-mhs', data.twitter); RH.setCompValue('tf.pinbb-mhs', data.pinbb); RH.setCompValue('tf.web-mhs', data.website); /* RH.setCompValue('fform', data.field); RH.setCompValue('fform', data.field); */ }