106 lines
5.0 KiB
Vue
106 lines
5.0 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 Stok Audit Backdate</span>
|
|
</div>
|
|
<form method="get" id="formstokauditbackdate" :action="Urlredirect()" target="_blank">
|
|
<div class="rounded bg-white shadow p-6">
|
|
<!-- <div class=" p-2 rounded-lg bg-yellow-200 border border-yellow-300 font-bold">portal bayaran online ditutup bermula jam 12.00 tgh malam - 8.00 pagi pada setiap hari akhir bulan</div> -->
|
|
<div class="w-full -mt-4 mb-4 overflow-x-hidden rounded-lg bg-yellow-200 border border-yellow-300">
|
|
<div class="py-2 animate-marquee whitespace-nowrap">
|
|
<span class="text-xs mx-4 text-red-800 font-bold">portal bayaran online ditutup bermula jam 12.00 tgh malam - 8.00 pagi pada setiap hari akhir bulan</span>
|
|
<span class="text-xs mx-4 text-red-800 font-bold">portal bayaran online ditutup bermula jam 12.00 tgh malam - 8.00 pagi pada setiap hari akhir bulan</span>
|
|
</div>
|
|
</div>
|
|
<div class="pb-6">
|
|
<label for="username" class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
|
<div class="flex">
|
|
<input :value="$kodcaw" name="kodcaw" hidden/>
|
|
<input :value="$hostname" name="hostname" hidden/>
|
|
<input :value="jenisgenerate" type="hidden" name="jenis" />
|
|
<input :value="mula" type="hidden" name="datestokauditbackdate"/>
|
|
<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="datestokauditbackdate" class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2" type="date" /> -->
|
|
<flat-pickr v-model="mula" :config="config" class="border border-2 rounded-r px-4 py-2 w-80r mr-2"></flat-pickr>
|
|
<button @click.prevent="generateexcel" 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-excel mr-2"></i>Excel</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>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import monthSelectPlugin from 'flatpickr/dist/plugins/monthSelect/index.js'
|
|
import 'flatpickr/dist/plugins/monthSelect/style.css'
|
|
|
|
export default {
|
|
|
|
data(){
|
|
return{
|
|
mula: null,
|
|
jenisgenerate:'none',
|
|
kodcaw: '',
|
|
config: {
|
|
wrap: false, // set wrap to true only when using 'input-group'
|
|
maxDate: 'today',
|
|
plugins: [
|
|
new monthSelectPlugin({
|
|
shorthand: true, //defaults to false
|
|
dateFormat: "m-Y", //defaults to "F Y"
|
|
altFormat: "F Y", //defaults to "F Y"
|
|
})
|
|
]
|
|
},
|
|
}
|
|
},
|
|
methods: {
|
|
async generateexcel(){
|
|
await this.setJenis('excel');
|
|
|
|
|
|
Vue.swal({
|
|
title: 'Memuatkan...',
|
|
allowEscapeKey : false,
|
|
allowOutsideClick: false,
|
|
showCancelButton: false,
|
|
showConfirmButton: false,
|
|
timer: 8000,
|
|
});
|
|
|
|
document.getElementById("formstokauditbackdate").submit();
|
|
},
|
|
async generateview(){
|
|
await this.setJenis('view');
|
|
|
|
|
|
Vue.swal({
|
|
title: 'Memuatkan...',
|
|
allowEscapeKey : false,
|
|
allowOutsideClick: false,
|
|
showCancelButton: false,
|
|
showConfirmButton: false,
|
|
timer: 8000,
|
|
});
|
|
|
|
document.getElementById("formstokauditbackdate").submit();
|
|
},
|
|
Urlredirect: function() {
|
|
return window.route('cetak.stokauditbackdate')
|
|
},
|
|
setJenis: function(value){
|
|
return this.jenisgenerate = value;
|
|
}
|
|
}
|
|
|
|
}
|
|
</script> |