first commit
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
/*******************************************************************
|
||||
|
||||
PHP Class : /Controller/Table/Ppob/KategoriController
|
||||
Description : Master Kategori PPOB
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 19th, 2010.
|
||||
Last Modified : September 1st, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PPOBKateJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Kate').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
});
|
||||
$('#butSearch').click((e) => this.data_query('detail'));
|
||||
$('#butAll').click(() => {
|
||||
$('#Cari_Kate').val('');
|
||||
this.data_query('detail');
|
||||
});
|
||||
FoniaJS.setFocus('#Cari_Kate');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP + '/form_kategori',
|
||||
sendParam: ['mode_detail='+mode,'KateID='+ID],
|
||||
onSuccess: (ajson) => {
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Kategori PPOB', ajson.html, 'lg', [{},{i:'butTutup'}]);
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Kate']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,54 @@
|
||||
/*******************************************************************
|
||||
|
||||
PHP Class : /Controller/Table/Ppob/OperatorController
|
||||
Description : Master Operator PPOB
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 19th, 2010.
|
||||
Last Modified : September 1st, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PPOBOpeJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Ope').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
});
|
||||
$('#butSearch').click((e) => this.data_query('detail'));
|
||||
$('#butAll').click(() => {
|
||||
$('#Cari_Ope').val('');
|
||||
this.data_query('detail');
|
||||
});
|
||||
FoniaJS.setFocus('#Cari_Ope');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP + '/form_operator',
|
||||
sendParam: ['mode_detail='+mode,'OpeID='+ID],
|
||||
onSuccess: (ajson) => {
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Operator PPOB', ajson.html, 'lg', [{},{i:'butTutup'}]);
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('update', acell[0]);
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['Cari_Ope']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,115 @@
|
||||
/*******************************************************************
|
||||
|
||||
PHP Class : /Controller/Table/Ppob/ProdukController
|
||||
Description : Master Produk PPOB
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 19th, 2010.
|
||||
Last Modified : September 1st, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PPOBProdukJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
index: function(){
|
||||
this.data_query('tabel-produk');
|
||||
$('#butPrint').click(() => this.print_show());
|
||||
$('#butUpdate').click(() => this.update_show());
|
||||
$('#Cari_Produk').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('tabel-produk');
|
||||
});
|
||||
$('#butSearch').click((e) => this.data_query('tabel-produk'));
|
||||
$('#butAll').click(() => {
|
||||
$('#Cari_Produk').val('');
|
||||
this.data_query('tabel-produk');
|
||||
});
|
||||
FoniaJS.setFocus('#Cari_Produk');
|
||||
},
|
||||
|
||||
print_show: function(){
|
||||
new Request({
|
||||
url: this.PHP + '/detail_print',
|
||||
onSuccess: (ajson) => {
|
||||
this.winDPrint = FoniaJS.showWindow('DPrint', 'Cetak Daftar Produk PPOB', ajson.html, 'lg', [{},{"i":"butWCetak","v":"Cetak","c":"info"},{"i":"butWPreview","v":"Pratinjau","c":"secondary"}], () => {
|
||||
$('#winDPrint')
|
||||
.find('#butWCetak').click(() => this.print_produk(true)).end()
|
||||
.find('#butWPreview').click(() => this.print_produk());
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
print_produk: function(prt){
|
||||
var cetak = new Printer(this.PHP + '/print_produk');
|
||||
cetak.add_param("KateID");
|
||||
cetak.add_param("OpeID");
|
||||
cetak.add_param("Tgl_Cetak");
|
||||
if (prt) cetak.doPrint(); else cetak.doPreview();
|
||||
FoniaJS.closeWindow(this.winDPrint);
|
||||
},
|
||||
|
||||
update_show: function(){
|
||||
new Request({
|
||||
url: this.PHP + '/detail_update',
|
||||
onSuccess: (ajson) => {
|
||||
this.winDUpdate = FoniaJS.showWindow('DUpdate', 'Update Produk PPOB', ajson.html, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Proses',c:'success'}], () => {
|
||||
$('#winDUpdate').find('#butWSimpan').click(() => this.update_proses());
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
update_proses: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/proses_update',
|
||||
sendParam: ['K_Kate','K_Ope'],
|
||||
onSuccess: (ajson) => {
|
||||
FoniaJS.closeWindow(this.winDUpdate);
|
||||
this.data_query('tabel-produk');
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP + '/form_produk',
|
||||
sendParam: ['mode_detail='+mode,'ProdukID='+ID],
|
||||
onSuccess: (ajson) => {
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Produk PPOB', ajson.html, 'xl', [{},{i:'butBatal'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winDetail').find('#butWSimpan').click(() => this.produk_simpan());
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
produk_ubah: function(acell){
|
||||
this.produk_show('update', acell[0]);
|
||||
},
|
||||
|
||||
produk_simpan: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_produk',
|
||||
sendParam: ['mode_detail','ProdukID','OpeID','KateID','Nama_Produk='+encodeURIComponent($('#Nama_Produk').val()),'Kode','Harga_Pokok','Harga_Jual','Status','Cari_Produk'],
|
||||
onSuccess: (adata) => {
|
||||
if (adata.status){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
} else FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-produk"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP + '/table_produk',
|
||||
sendParam: ['Cari_Produk']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user