43 lines
1.3 KiB
JavaScript
43 lines
1.3 KiB
JavaScript
/*******************************************************************
|
|
|
|
Module : /apps/js/repo/supervisi.js
|
|
Desc. : JS - Laporan Supervisi
|
|
Created By : Siau Pheng ([email protected]).
|
|
Created Date : June 1st, 2013.
|
|
Last Modified : March 26th, 2023.
|
|
|
|
(c) 2013 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
|
|
|
*******************************************************************/
|
|
|
|
var RepoSuperJS = {
|
|
PHP: '',
|
|
KODE: '',
|
|
|
|
loading: function(){
|
|
$('#butPrint').click(function(){this.proses_print('print');}.bind(this));
|
|
$('#butPreview').click(function(){this.proses_print('preview');}.bind(this));
|
|
$('#butExcel').click(function(){this.proses_dload();}.bind(this));
|
|
},
|
|
|
|
proses_print: function(prt){
|
|
var cetak = new cPRINTER(this.PHP);
|
|
cetak.set_zoom(90);
|
|
cetak.add_param('data', 'print');
|
|
cetak.add_param('UserID');
|
|
cetak.add_param('Tgl_From');
|
|
cetak.add_param('Tgl_To');
|
|
if (prt=='print') { cetak.doPrint(); } else cetak.doPreview();
|
|
},
|
|
|
|
proses_dload: function(){
|
|
var dload = new cEXPORT(this.PHP);
|
|
dload.add_param('data', 'export');
|
|
dload.add_param('UserID');
|
|
dload.add_param('Tgl_From');
|
|
dload.add_param('Tgl_To');
|
|
dload.download();
|
|
}
|
|
|
|
};
|