This commit is contained in:
hafifierahman
2022-08-14 08:50:51 +08:00
parent da3e1123eb
commit 9daa07c962
6 changed files with 166 additions and 18 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
</div>
<div>:</div>
<div class="w-1/3 ml-2">
<span v-bind:class="getClass(sb.aktif)" class="text-xs font-semibold inline-block py-1 px-2 uppercase rounded uppercase last:mr-0 mr-1">{{ sb.aktif ? 'Selesai' : 'Belum' }} </span>
<span :class="getClass(sb.aktif)" class="text-xs font-semibold inline-block py-1 px-2 uppercase rounded uppercase last:mr-0 mr-1">{{ sb.aktif ? 'Selesai' : 'Belum' }} </span>
</div>
</div>
</a>
+95 -4
View File
@@ -1,7 +1,7 @@
<template>
<div>
<router-link to="/wtd">
<router-link to="/wtd/rekod">
<i class="fas fa-backspace fa-3x text-yellow-500"></i>
</router-link>
@@ -13,7 +13,8 @@
<h1 class="text-xl font-bold bg-clip-text text-transparent bg-gradient-to-br from-gray-500 to-gray-700">JUMLAH = RM {{ formattext(this.totalbaki) }}</h1>
</div>
<div class="p-4">
<button @click.prevent="proseswtd" :disabled="aktif == 1" :class="{'hover:bg-yellow-600 bg-yellow-600 border-yellow-600': aktif == 0}" class="border border-yellow-300 text-white bg-yellow-300 font-montserrat py-2 px-8 font-medium rounded-xl transition-all duration-300">Proses WTD</button>
<button @click.prevent="promptdeletewtd" :disabled="aktif == 1" :class="{'hover:bg-red-600 bg-red-600 border-red-600': aktif == 0}" class="border border-red-300 text-white bg-red-300 font-montserrat py-2 px-8 font-medium rounded-xl transition-all duration-300"><i class="fas fa-trash-alt"></i></button>
<button @click.prevent="promptwtd" :disabled="aktif == 1" :class="{'hover:bg-yellow-600 bg-yellow-600 border-yellow-600': aktif == 0}" class="border border-yellow-300 text-white bg-yellow-300 font-montserrat py-2 px-8 font-medium rounded-xl transition-all duration-300">Proses WTD</button>
<span v-if="batchno != 0" class="text-lg font-bold ml-3">Batchno: {{ this.batchno }}</span>
</div>
</div>
@@ -101,10 +102,100 @@ export default {
})
},
methods: {
proseswtd: function () {
async promptdeletewtd() {
await this.$swal({
title: 'Padam daripada block WTD?',
text: "anda tidak boleh ulang kembali setelah di padam!",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Ya',
allowOutsideClick: false,
}).then((result) => {
if (result.isConfirmed) {
this.deletewtd();
}
});
},
async promptwtd() {
let boolkatalaluan = 0;
const {
value: katalaluan
} = await this.$swal({
title: 'Masukkan Katalaluan Semula',
input: 'password',
inputPlaceholder: 'Katalaluan',
confirmButtonText: 'Hantar',
showCancelButton: true,
cancelButtonText: 'Batal',
allowOutsideClick: false
})
await this.axios.get('/mintasemulakelulusan', {
params: {
passsemula: katalaluan
}
}).then(response => {
if (response.data === 0) {
boolkatalaluan = 0;
} else {
boolkatalaluan = 1;
}
});
if (boolkatalaluan == 1) {
await this.$swal({
title: 'Proses WTD?',
text: "anda tidak boleh ulang kembali setelah di proses!",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Ya',
allowOutsideClick: false,
}).then((result) => {
if (result.isConfirmed) {
this.$swal({
title: "Masukkan No Cek:",
// text: "Write something interesting:",
input: 'text',
showCancelButton: true
}).then((result) => {
if (result.value) {
this.proseswtd(result.value);
}
});
}
});
} else {
this.$swal('Kata laluan salah', '', 'error')
}
},
deletewtd: function () {
this.axios.post(this.$hostname + '/admin/wtd/delete', {
kodcaw: this.$kodcaw,
batchno: this.batchno
}).then(response => {
if (response.data == 1) {
this.$swal(
'Berjaya!',
'Berjaya Padam WTD!',
'success'
)
}
});
},
proseswtd: function (nocek) {
this.axios.post(this.$hostname + '/admin/wtd/process', {
kodcaw: this.$kodcaw,
batch: this.batchno
batch: this.batchno,
nocek: nocek
}).then(response => {
if (response.data == 'success') {
+64 -8
View File
@@ -7,7 +7,7 @@
<h1 class="text-xl font-bold bg-clip-text text-transparent bg-gradient-to-br from-gray-500 to-gray-700">JUMLAH = RM {{ this.totalbaki }}</h1>
</div>
<div class="p-4">
<button @click.prevent="proseswtd" :disabled="boolblocksag == false" :class="{'hover:bg-yellow-600 bg-yellow-600 border-yellow-600': boolblocksag == true}" class="border border-yellow-300 text-white bg-yellow-300 font-montserrat py-2 px-8 font-medium rounded-xl transition-all duration-300">Proses WTD</button>
<button @click.prevent="promptwtd" :disabled="boolblocksag == false" :class="{'hover:bg-yellow-600 bg-yellow-600 border-yellow-600': boolblocksag == true}" class="border border-yellow-300 text-white bg-yellow-300 font-montserrat py-2 px-8 font-medium rounded-xl transition-all duration-300">Proses WTD</button>
<span v-if="batchno != 0" class="text-lg font-bold ml-3">Batchno: {{ this.batchno }}</span>
</div>
<div class="p-4">
@@ -98,7 +98,7 @@ export default {
},
props: ['bakilelong', 'bulanmula', 'bulanhingga'],
methods: {
formattext: function (value) {
formattext: function (value) {
return formatter.format(value);
},
async associate() {
@@ -146,9 +146,8 @@ export default {
},
async blockwtd() {
if(this.blockseterusnya === true)
{
this.$swal({
if (this.blockseterusnya === true) {
this.$swal({
icon: 'warning',
title: 'Amaran',
text: 'Surat sudah Di Block!',
@@ -199,7 +198,7 @@ export default {
if (this.selectedNorujukan.length > 0) {
await this.$swal({
icon: 'info',
title: '<strong>Cetak WTD</strong>',
title: '<strong>Block WTD</strong>',
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,
@@ -215,7 +214,7 @@ export default {
if (result.isConfirmed) {
this.blockwtd();
this.blockseterusnya = true;
}
}
})
} else {
@@ -226,6 +225,63 @@ export default {
)
}
},
async promptwtd() {
let boolkatalaluan = 0;
const {
value: katalaluan
} = await this.$swal({
title: 'Masukkan Katalaluan Semula',
input: 'password',
inputPlaceholder: 'Katalaluan',
confirmButtonText: 'Hantar',
showCancelButton: true,
cancelButtonText: 'Batal',
allowOutsideClick: false
})
await this.axios.get('/mintasemulakelulusan', {
params: {
passsemula: katalaluan
}
}).then(response => {
if (response.data === 0) {
boolkatalaluan = 0;
} else {
boolkatalaluan = 1;
}
});
if (boolkatalaluan == 1) {
await this.$swal({
title: 'Proses WTD?',
text: "anda tidak boleh ulang kembali setelah di proses!",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Ya',
allowOutsideClick: false,
}).then((result) => {
if (result.isConfirmed) {
this.$swal({
title: "Masukkan No Cek:",
// text: "Write something interesting:",
input: 'text',
showCancelButton: true
}).then((result) => {
if (result.value) {
this.proseswtd(result.value);
}
});
}
});
} else {
this.$swal('Kata laluan salah', '', 'error')
}
},
proseswtd: function () {
let cawangan = this.$kodcaw;
@@ -277,7 +333,7 @@ export default {
},
extensionbulan: function (bulan) {
var stringexplode = bulan.split("-");
switch (stringexplode[0]) {
case '01':
bulan = "Januari";
+3 -3
View File
@@ -126,18 +126,18 @@ Vue.use(require('vue-pusher'), {
}
});
Vue.prototype.$api1 = 'http://api.arrahn'
Vue.prototype.$api1 = 'http://localhost:8000/'
Vue.prototype.$username = document.querySelector("meta[name='user_name']").getAttribute('content');
Vue.prototype.$userroles = document.querySelector("meta[name='user_roles']").getAttribute('content');
let initial = 'KB2';
let initialhostname = 'http://api.arrahn';
let initialhostname = 'http://localhost:8000/';
const store = new Vuex.Store({
state: {
$kodcaw: 'KB2',
$hostname: 'http://api.arrahn'
$hostname: 'http://localhost:8000/'
},
plugins: [createPersistedState()],
mutations: {
@@ -82,6 +82,7 @@ export default {
this.getDataPembiayaan()
this.getDataPenebusan()
this.getDataKeuntungan()
console.log('tahunan' + this.$hostname);
},
methods: {
getDataPembiayaan() {
+2 -2
View File
@@ -84,7 +84,7 @@
case 'JLI':
case 'ARP':
case '020303':{
this.sethostname('http://api.arrahn')
this.sethostname('http://localhost:8000')
break;
}
case '010621':
@@ -114,7 +114,7 @@
this.sethostname('http://api3.arrahn')
break;
}
default: this.sethostname('http://api.arrahn')
default: this.sethostname('http://localhost:8000')
break;
}
}