116 lines
4.1 KiB
Vue
116 lines
4.1 KiB
Vue
<template>
|
|
<div>
|
|
|
|
<div v-if="arraybakilelong.length > 0" class="relative bg-white overflow-x-auto shadow-md sm:rounded-lg px-8 py-6">
|
|
|
|
<div class="flex justify-between">
|
|
|
|
<div class="p-4">
|
|
<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="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>
|
|
|
|
<table class="w-full text-sm text-left text-gray-500 dark:text-gray-400 rounded-lg border w-full sm:h-96 p-6 overflow-x-auto overflow-y-scroll scrollbar">
|
|
<thead class="text-xs text-gray-700 uppercase bg-yellow-200 dark:bg-gray-700 dark:text-gray-400">
|
|
<tr>
|
|
<th scope="col" class="p-4">
|
|
<div class="flex items-center">
|
|
<span>Bil</span>
|
|
</div>
|
|
</th>
|
|
<th scope="col" class="px-6 py-3">
|
|
Norujukan
|
|
</th>
|
|
<th scope="col" class="px-6 py-3">
|
|
Tarikh Lelong
|
|
</th>
|
|
<th scope="col" class="px-6 py-3">
|
|
Pembiayaan
|
|
</th>
|
|
<th scope="col" class="px-6 py-3">
|
|
Baki
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr v-for="(bl,i) in arraybakilelong" :key="i" class="bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600">
|
|
<td class="w-4 p-4">
|
|
<div class="flex items-center">
|
|
<span>{{ i+1 }}</span>
|
|
|
|
</div>
|
|
</td>
|
|
<th scope="row" class="px-6 py-4 font-medium text-gray-900 dark:text-white whitespace-nowrap">
|
|
{{ bl.norujukan }}
|
|
</th>
|
|
<td class="px-6 py-4">
|
|
{{ bl.t_lelong }}
|
|
</td>
|
|
<td class="px-6 py-4">
|
|
{{ bl.pinjaman }}
|
|
</td>
|
|
<td class="px-6 py-4">
|
|
{{ bl.baki }}
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
mula: null,
|
|
hingga: null,
|
|
totalbaki: 0.00,
|
|
arraybakilelong: [],
|
|
allSelected: false,
|
|
boolblocksag: false,
|
|
cawangan: 'KB2',
|
|
batchno: 0,
|
|
aktif: 0
|
|
}
|
|
},
|
|
mounted() {
|
|
|
|
this.batchno = this.$route.params.batchno;
|
|
this.aktif = this.$route.query.aktif;
|
|
this.totalbaki = this.$route.query.totalbaki;
|
|
|
|
this.axios.get(this.$hostname + '/admin/wtd/rekod/' + this.batchno, {
|
|
params: {
|
|
kodcaw: this.cawangan,
|
|
}
|
|
}).then(response => {
|
|
this.arraybakilelong = response.data;
|
|
})
|
|
},
|
|
methods: {
|
|
proseswtd: function () {
|
|
this.axios.post(this.$hostname + '/admin/wtd/process', {
|
|
kodcaw: this.cawangan,
|
|
batch: this.batchno
|
|
}).then(response => {
|
|
|
|
if (response.data == 'success') {
|
|
this.$swal(
|
|
'Berjaya!',
|
|
'Berjaya Simpan Wang Tak Dituntut!',
|
|
'success'
|
|
)
|
|
|
|
this.aktif = 1;
|
|
}
|
|
});
|
|
},
|
|
}
|
|
}
|
|
</script>
|