fix wtd
This commit is contained in:
@@ -24,7 +24,7 @@ const formatter = new Intl.NumberFormat('en-US', {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
cawangan: 'KB2',
|
||||
cawangan: '',
|
||||
serahbakiarray: {},
|
||||
}
|
||||
},
|
||||
@@ -34,13 +34,11 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.axios.get(this.$hostname + '/admin/wtd/rekod/', {
|
||||
params: {
|
||||
kodcaw: this.cawangan,
|
||||
kodcaw: this.$kodcaw,
|
||||
}
|
||||
}).then(response => {
|
||||
// console.log(response.data);
|
||||
this.serahbakiarray = response.data;
|
||||
})
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ export default {
|
||||
arraybakilelong: [],
|
||||
allSelected: false,
|
||||
boolblocksag: false,
|
||||
cawangan: 'KB2',
|
||||
cawangan: '',
|
||||
batchno: 0,
|
||||
aktif: 0
|
||||
}
|
||||
@@ -86,7 +86,7 @@ export default {
|
||||
|
||||
this.axios.get(this.$hostname + '/admin/wtd/rekod/' + this.batchno, {
|
||||
params: {
|
||||
kodcaw: this.cawangan,
|
||||
kodcaw: this.$kodcaw,
|
||||
}
|
||||
}).then(response => {
|
||||
this.arraybakilelong = response.data;
|
||||
@@ -95,7 +95,7 @@ export default {
|
||||
methods: {
|
||||
proseswtd: function () {
|
||||
this.axios.post(this.$hostname + '/admin/wtd/process', {
|
||||
kodcaw: this.cawangan,
|
||||
kodcaw: this.$kodcaw,
|
||||
batch: this.batchno
|
||||
}).then(response => {
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ export default {
|
||||
selectedNorujukan: [],
|
||||
allSelected: false,
|
||||
boolblocksag: false,
|
||||
cawangan: 'KB2',
|
||||
cawangan: '',
|
||||
batchno: 0,
|
||||
blockseterusnya: false,
|
||||
}
|
||||
@@ -142,7 +142,17 @@ export default {
|
||||
this.allSelected = false;
|
||||
},
|
||||
async blockwtd() {
|
||||
let cawangan = 'KB2';
|
||||
|
||||
if(this.blockseterusnya === true)
|
||||
{
|
||||
this.$swal({
|
||||
icon: 'warning',
|
||||
title: 'Amaran',
|
||||
text: 'Surat sudah Di Block!',
|
||||
allowOutsideClick: false
|
||||
})
|
||||
}
|
||||
let cawangan = this.$kodcaw;
|
||||
let ref = this;
|
||||
await this.$swal({
|
||||
title: 'Block Surat Akuan Gadaian (SAG)?',
|
||||
@@ -171,6 +181,7 @@ export default {
|
||||
)
|
||||
|
||||
this.boolblocksag = true;
|
||||
this.blockseterusnya = true;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -179,18 +190,18 @@ export default {
|
||||
|
||||
},
|
||||
async printwtd() {
|
||||
let cawangan = 'KB2';
|
||||
let cawangan = this.$kodcaw;
|
||||
let ref = this;
|
||||
|
||||
if (this.selectedNorujukan.length > 0) {
|
||||
await this.$swal({
|
||||
icon: 'info',
|
||||
title: '<strong>Cetak WTD</strong>',
|
||||
html: "Sila tekan <b>Cetak</b> untuk mencetak senarai SAG yang ingin dituntut,Sila tekan <b>Ya</b> untuk block SAG!",
|
||||
html: "Sila tekan <b>Ya</b> untuk block SAG, Sila tekan Tidak untuk membatal urusan!",
|
||||
// html:"<button onclick='console.log(`haha`);cetaksenarai();' class='px-4 py-2 bg-yellow-500 text-white rounded-xl'>PDF</button><button class='ml-2 px-4 py-2 bg-yellow-500 text-white rounded-xl'>Excel</button>",
|
||||
showCloseButton: true,
|
||||
showCancelButton: true,
|
||||
showDenyButton: true,
|
||||
// showDenyButton: true,
|
||||
// focusConfirm: false,
|
||||
confirmButtonText: 'Ya',
|
||||
cancelButtonText: 'Tidak',
|
||||
@@ -199,37 +210,9 @@ export default {
|
||||
allowOutsideClick: false,
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
|
||||
this.blockwtd();
|
||||
} else if (result.isDenied) {
|
||||
|
||||
this.$swal({
|
||||
icon: 'info',
|
||||
title: '<strong>Pilihan Cetakan</strong>',
|
||||
html: "Sila tekan <b>PDF</b> untuk pilihan dalam bentuk PDF,Sila tekan <b>Excel</b> untuk pilihan dalam bentuk Excel!",
|
||||
showCloseButton: true,
|
||||
showCancelButton: false,
|
||||
showDenyButton: true,
|
||||
confirmButtonText: 'Excel',
|
||||
denyButtonText: 'PDF',
|
||||
confirmButtonColor: '#f39c12',
|
||||
denyButtonColor: '#f39c12',
|
||||
allowOutsideClick: false,
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
|
||||
this.cetaksenarai();
|
||||
event.preventDefault();
|
||||
return false;
|
||||
|
||||
} else if (result.isDenied) {
|
||||
this.cetakpdf();
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
blockseterusnya = true;
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
@@ -242,8 +225,9 @@ export default {
|
||||
|
||||
},
|
||||
proseswtd: function () {
|
||||
let cawangan = this.$kodcaw;
|
||||
this.axios.post(this.$hostname + '/admin/wtd/process', {
|
||||
kodcaw: this.cawangan,
|
||||
kodcaw: cawangan,
|
||||
batch: this.batchno
|
||||
}).then(response => {
|
||||
|
||||
@@ -263,7 +247,7 @@ export default {
|
||||
if (this.selectedNorujukan.length > 0) {
|
||||
let urldirect = window.route('wtd.cetak');
|
||||
let noruj = JSON.stringify(this.selectedNorujukan);
|
||||
window.open(urldirect + '?cawangan=' + this.cawangan + '&&norujukan=' + noruj + '&&jenis=excel' + '&&mula=' + this.extensionbulan(this.$props.bulanmula) + '&&hingga=' + this.extensionbulan(this.$props.bulanhingga), '_blank');
|
||||
window.open(urldirect + '?cawangan=' + cawangan + '&&norujukan=' + noruj + '&&jenis=excel' + '&&mula=' + this.extensionbulan(this.$props.bulanmula) + '&&hingga=' + this.extensionbulan(this.$props.bulanhingga), '_blank');
|
||||
} else {
|
||||
this.$swal(
|
||||
'Amaran!',
|
||||
@@ -277,7 +261,7 @@ export default {
|
||||
if (this.selectedNorujukan.length > 0) {
|
||||
let urldirect = window.route('wtd.cetak');
|
||||
let noruj = JSON.stringify(this.selectedNorujukan);
|
||||
window.open(urldirect + '?cawangan=' + this.cawangan + '&&norujukan=' + noruj + '&&jenis=pdf' + '&&mula=' + this.extensionbulan(this.$props.bulanmula) + '&&hingga=' + this.extensionbulan(this.$props.bulanhingga), '_blank');
|
||||
window.open(urldirect + '?cawangan=' + cawangan + '&&norujukan=' + noruj + '&&jenis=pdf' + '&&mula=' + this.extensionbulan(this.$props.bulanmula) + '&&hingga=' + this.extensionbulan(this.$props.bulanhingga), '_blank');
|
||||
} else {
|
||||
this.$swal(
|
||||
'Amaran!',
|
||||
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async generatebakilelong () {
|
||||
let cawangan = 'KB2';
|
||||
let cawangan = this.$kodcaw;
|
||||
|
||||
this.loadbakilelong = 'process';
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
</li>
|
||||
</a>
|
||||
|
||||
{{-- <a href="{{ route('wtd.index') }}" class="rounded mb-2 mr-2 {{ Route::is('wtd') || Route::is('wtd.*') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
|
||||
<a href="{{ route('wtd.index') }}" class="rounded mb-2 mr-2 {{ Route::is('wtd') || Route::is('wtd.*') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
|
||||
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
|
||||
<div class="flex items-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
@@ -168,7 +168,7 @@
|
||||
<span class="text-sm ml-2 text-lg">WTD</span>
|
||||
</div>
|
||||
</li>
|
||||
</a> --}}
|
||||
</a>
|
||||
|
||||
<a href="{{ route('kelulusan') }}" class="rounded mb-2 mr-2 {{ Route::is('kelulusan') || Route::is('kelulusan.*') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
|
||||
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
|
||||
|
||||
Reference in New Issue
Block a user