Files
admin-erahn/resources/js/Akaun/TuntutLelong.vue
T
2024-09-02 13:41:02 +08:00

119 lines
7.2 KiB
Vue

<template>
<div class="container">
<div class="flex w-full">
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
<router-link to="/akaunhome">
<i class="fas fa-backspace text-white"></i>
</router-link>
<span class="text-center mx-auto text-white font-bold">Laporan Baki/Rugi Lelong</span>
</div>
<form method="get" id="formlelong" :action="Urlredirect()" target="_blank">
<div class="rounded bg-white shadow p-6">
<div class="flex mb-3">
<div class="flex items-center w-1/3 pl-4 ml-2 border border-gray-200 rounded bg-gray-200">
<input id="belumtuntut" type="radio" value="belumtuntut" name="jenistuntutan" class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600">
<label for="belumtuntut" class="w-full py-4 ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">Belum Tuntut</label>
</div>
<div class="flex items-center w-1/3 pl-4 ml-2 border border-gray-200 rounded bg-gray-200">
<input checked id="sudahtuntut" type="radio" value="sudahtuntut" name="jenistuntutan" class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600">
<label for="sudahtuntut" class="w-full py-4 ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">Sudah Tuntut</label>
</div>
<div class="flex items-center w-1/3 pl-4 ml-2 border border-gray-200 rounded bg-gray-200">
<input checked id="semuatuntut" type="radio" value="semuatuntut" name="jenistuntutan" class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600">
<label for="semuatuntut" class="w-full py-4 ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">Semua</label>
</div>
</div>
<div class="pb-6">
<div class="flex justify-center mb-4">
<input :value="jenisgenerate" type="hidden" name="jenis" />
<input :value="$kodcaw" name="kodcaw" hidden/>
<input :value="$hostname" name="hostname" hidden/>
<span style="background-color: #F9FAFB" class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap">Mula</span>
<input id="tarikhmula" name="datemula" class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2" type="date" />
<span style="background-color: #F9FAFB" class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap">Hingga</span>
<input id="tarikhhingga" name="datehingga" class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2" type="date" />
</div>
</div>
<div class="flex justify-center mb-4">
<div class="mx-2 radio">
<input type="radio" id="tuntut" name="radjenis" value="tuntut" class="hidden focus:bg-gray-500" v-model="selected">
<label for="tuntut" class="cursor-pointer text-gray-500 focus:bg-gray-500 hover:bg-gray-200 focus:bg-purple-500 focus:bg-purple-500 focus:outline-none border px-10 py-4 border-solid border-gray-500 rounded">Baki Lelong</label>
</div>
<div class="mx-2 radio cursor-pointer">
<input type="radio" id="rugi" name="radjenis" value="rugi" class="hidden focus:bg-gray-500" v-model="selected">
<label for="rugi" class="cursor-pointer text-gray-500 focus:bg-gray-500 hover:bg-gray-200 focus:bg-purple-500 focus:outline-none border px-10 py-4 border-solid border-gray-500 rounded">Rugi Lelong</label>
</div>
<div class="mx-2 radio cursor-pointer">
<input type="radio" id="semua" name="radjenis" value="semua" class="hidden focus:bg-gray-500" v-model="selected">
<label for="semua" class="cursor-pointer text-gray-500 focus:bg-gray-500 hover:bg-gray-200 focus:bg-purple-500 focus:outline-none border px-10 py-4 border-solid border-gray-500 rounded">Semua</label>
</div>
</div>
<div class="flex justify-end mt-10">
<button @click.prevent="generatepdf" class=" mr-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-file-pdf mr-2"></i>PDF</button>
<button @click.prevent="generateview" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-eye mr-2"></i>View</button>
</div>
</div>
</form>
</div>
</div>
</div>
</template>
<script>
export default {
data(){
return{
jenisgenerate:'none',
kodcaw:'',
selected:'',
}
},
methods: {
async generatepdf(){
await this.setJenis('pdf');
Vue.swal({
title: 'Memuatkan...',
allowEscapeKey : false,
allowOutsideClick: false,
showCancelButton: false,
showConfirmButton: false,
timer: 8000,
});
document.getElementById("formlelong").submit();
},
async generateview(){
await this.setJenis('view');
Vue.swal({
title: 'Memuatkan...',
allowEscapeKey : false,
allowOutsideClick: false,
showCancelButton: false,
showConfirmButton: false,
timer: 8000,
});
document.getElementById("formlelong").submit();
},
Urlredirect: function() {
return window.route('cetak.tuntutrugilelong')
},
setJenis: function(value){
return this.jenisgenerate = value;
}
}
}
</script>