fix ksit2

This commit is contained in:
fifi97
2022-01-09 10:09:02 +08:00
parent b2b29707ea
commit 166eaa4efa
11 changed files with 2268 additions and 10760 deletions
+70 -20
View File
@@ -1,5 +1,6 @@
<template>
<div class="container">
<!-- <modal ref="modal"></modal> -->
<div class="flex w-full">
<div class="w-1/2 p-8 mx-auto">
@@ -10,7 +11,7 @@
<span class="text-center mx-auto text-white font-bold">Laporan Imbang Duga</span>
</div>
<form method="get" id="formimbangduga" :action="Urlredirect()">
<form method="get" ref="formimbangduga" :action="Urlredirect()" target="iframe_laporan">
<div class="rounded bg-white shadow p-6">
<div class="pb-6">
<label for="username" class="font-semibold text-gray-700 block pb-1">Tarikh</label>
@@ -19,53 +20,102 @@
<input :value="jenisgenerate" type="hidden" name="jenis" />
<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="datetimepicker1" class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2" type="date" />
<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>
</div>
</form>
</div>
</div>
<!-- <iframe class="overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none justify-center items-center flex bg-white" name="iframe_laporan" width="500" height="500"></iframe> -->
<div v-if="showModal" class="overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none justify-center items-center flex">
<div class="relative w-1/2 my-6 mx-auto max-w-6xl">
<!--content-->
<div class="border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none">
<!--header-->
<div class="relative p-6" style="height: 80vh;">
<vue-iframe
:src="Urlredirect()"
allow="camera *; geolocation *; microphone *; autoplay *"
frame-id="iframe_laporan"
@load="onLoad"
@iframe-load="loaded"
name="iframe_laporan"
width="500px"
height="300px"
scrolling="true"
/>
</div>
<!--footer-->
<div class="flex items-center justify-end p-6 border-t border-solid border-blueGray-200 rounded-b">
<button @click.prevent="generatepdf" class="bg-gray-500 hover:bg-gray-700 text-white font-bold py-1 px-3 border border-gray-700 rounded mr-1" :disabled="pendingStatus == 'none'">{{ (pendingStatus == 'loading') ? '' : '' }}<i class="fas fa-file-pdf mr-2"></i>Cetak</button>
<button class="bg-gray-500 hover:bg-gray-700 text-white font-bold py-1 px-3 border border-gray-700 rounded mr-1" type="button" v-on:click="toggleModal()" :disabled="pendingStatus == 'none'">
<i class="fas fa-window-close mr-2"></i>Tutup
</button>
</div>
</div>
</div>
</div>
<div v-if="showModal" class="opacity-25 fixed inset-0 z-40 bg-black"></div>
</div>
</template>
<script>
export default {
data(){
return{
jenisgenerate:'none',
kodcaw: ''
kodcaw: '',
showModal:false,
myIframe: null,
iframesrc:'',
pendingStatus:'none'
}
},
methods: {
async generatepdf(){
await this.setJenis('pdf');
Vue.swal({
title: 'Memuatkan...',
allowEscapeKey : false,
allowOutsideClick: false,
showCancelButton: false,
showConfirmButton: false
// Vue.swal({
// title: 'Memuatkan...',
// allowEscapeKey : false,
// allowOutsideClick: false,
// showCancelButton: false,
// showConfirmButton: false
// });
this.$refs.formimbangduga.submit()
});
document.getElementById("formimbangduga").submit();
},
async generateview(){
await this.setJenis('view');
Vue.swal({
title: 'Memuatkan...',
allowEscapeKey : false,
allowOutsideClick: false,
showCancelButton: false,
showConfirmButton: false
// Vue.swal({
// title: 'Memuatkan...',
// allowEscapeKey : false,
// allowOutsideClick: false,
// showCancelButton: false,
// showConfirmButton: false
});
// });
this.showModal = true;
},
toggleModal: function(){
this.showModal = !this.showModal;
},
onLoad(frame) {
this.$refs.formimbangduga.submit()
this.myIframe = frame.contentWindow
},
loaded(frame){
document.getElementById("formimbangduga").submit();
},
Urlredirect: function() {
return window.route('cetak.imbangduga')
+62 -12
View File
@@ -9,7 +9,7 @@
</router-link>
<span class="text-center mx-auto text-white font-bold">Laporan Lejer Am</span>
</div>
<form method="get" id="formlejeram" target="_blank" :action="Urlredirect()">
<form method="get" ref="formlejeram" target="iframe_laporan" :action="Urlredirect()">
<div class="rounded bg-white shadow p-6">
<div class="pb-6">
<div class="flex place-content-center mb-2">
@@ -22,7 +22,6 @@
</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>
@@ -30,6 +29,40 @@
</form>
</div>
</div>
<div v-if="showModal" class="overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none justify-center items-center flex">
<div class="relative w-1/2 my-6 mx-auto max-w-6xl">
<!--content-->
<div class="border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none">
<!--header-->
<div class="relative p-6" style="height: 80vh;">
<vue-iframe
:src="Urlredirect()"
allow="camera *; geolocation *; microphone *; autoplay *"
frame-id="iframe_laporan"
@load="onLoad"
@iframe-load="loaded"
name="iframe_laporan"
width="500px"
height="300px"
scrolling="true"
/>
</div>
<!--footer-->
<div class="flex items-center justify-end p-6 border-t border-solid border-blueGray-200 rounded-b">
<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 class="bg-gray-500 hover:bg-gray-700 text-white font-bold py-1 px-3 border border-gray-700 rounded mr-1" type="button" v-on:click="toggleModal()">
Tutup
</button>
</div>
</div>
</div>
</div>
<div v-if="showModal" class="opacity-25 fixed inset-0 z-40 bg-black"></div>
</div>
</template>
@@ -38,7 +71,10 @@ export default {
data(){
return{
jenisgenerate:'none',
kodcaw:''
kodcaw:'',
showModal:false,
myIframe: null,
iframesrc:''
}
},
methods: {
@@ -59,17 +95,31 @@ export default {
async generateview(){
await this.setJenis('view');
Vue.swal({
title: 'Memuatkan...',
allowEscapeKey : false,
allowOutsideClick: false,
showCancelButton: false,
showConfirmButton: false,
timer: 8000,
// Vue.swal({
// title: 'Memuatkan...',
// allowEscapeKey : false,
// allowOutsideClick: false,
// showCancelButton: false,
// showConfirmButton: false,
// timer: 8000,
});
// });
this.showModal = true;
document.getElementById("formlejeram").submit();
this.$refs.formlejeram.submit()
},
toggleModal: function(){
this.showModal = !this.showModal;
},
onLoad(frame) {
this.$refs.formlejeram.submit()
this.myIframe = frame.contentWindow
console.log('loaded')
},
loaded(frame){
console.log('asdas')
},
Urlredirect: function() {
return window.route('cetak.lejeram')
+2 -1
View File
@@ -19,11 +19,12 @@ import router from './routes'
import Vuelidate from 'vuelidate'
import datetime from 'vuejs-datetimepicker';
import VueContentPlaceholders from 'vue-content-placeholders'
import VueIframe from 'vue-iframes'
import VueSweetalert2 from 'vue-sweetalert2';
import 'sweetalert2/dist/sweetalert2.min.css';
Vue.use(VueSweetalert2);
Vue.use(VueIframe)
require('./bootstrap');
@@ -7,21 +7,8 @@
<!--content-->
<div class="border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none">
<!--header-->
<!-- <div class="flex items-start bg-gray-200 justify-between p-5 border-b border-solid border-blueGray-200 rounded-t">
<h3 class="text-3xl font-semibold">
Pemeriksaan Aliran Tunai
</h3>
<button class="p-1 ml-auto border-0 text-black opacity-5 float-right text-3xl leading-none font-semibold outline-none focus:outline-none" v-on:click="toggleModal()">
<span class=" text-black opacity-5 h-6 w-6 text-2xl block outline-none focus:outline-none">
×
</span>
</button>
</div> -->
<!--body-->
<div class="relative p-6 flex-auto">
<!-- <p class="my-4 text-blueGray-500 text-lg leading-relaxed">
</p> -->
<h3 class="text-center text-3xl font-semibold">
Daftar Senarai Hitam
@@ -90,7 +77,6 @@
<transition
enter-active-class="transition-all transform duration-200 ease-out"
>
<div v-if="showModal" class="opacity-25 fixed inset-0 z-40 bg-black"></div>
</transition>
</div>
</template>
@@ -0,0 +1,102 @@
<template>
<div>
<div v-if="showModal" class="overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none justify-center items-center flex">
<div class="relative w-auto my-6 mx-auto max-w-6xl">
<!--content-->
<div class="border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none">
<!--header-->
<div class="flex items-start bg-gray-200 justify-between p-5 border-b border-solid border-blueGray-200 rounded-t">
<h3 class="text-xl font-semibold">
Laporan
</h3>
<button class="p-1 ml-auto border-0 text-black opacity-5 float-right text-3xl leading-none font-semibold outline-none focus:outline-none" v-on:click="toggleModal()">
<span class=" text-black opacity-5 h-6 w-6 text-2xl block outline-none focus:outline-none">
X
</span>
</button>
</div>
<!--body-->
<div class="relative p-6 flex-auto">
<!-- <iframe name="iframe_laporan"></iframe> -->
<vue-iframe
allow="camera *; geolocation *; microphone *; autoplay *"
frame-id="frame_laporan"
@load="onLoad"
name="iframe_laporan"
width="500px"
height="500px"
/>
</div>
<!--footer-->
<div class="flex items-center justify-end p-6 border-t border-solid border-blueGray-200 rounded-b">
<button class="bg-gray-500 hover:bg-gray-700 text-white font-bold py-2 px-4 border border-gray-700 rounded mr-1" type="button" v-on:click="toggleModal()">
Batal
</button>
</div>
</div>
</div>
</div>
<div v-if="showModal" class="opacity-25 fixed inset-0 z-40 bg-black"></div>
</div>
</template>
<script>
import datetime from 'vuejs-datetimepicker';
export default {
name: "modal",
components:{
datetime
},
data() {
return {
showModal: false,
referencestatus: 'PAID',
status: [
'PAID',
'UNSUCCESSFUL',
'NOT PAID'
],
statusid: 0,
datepaidat:'',
myIframe: null
}
},
methods: {
toggleModal: function(){
this.showModal = !this.showModal;
},
onLoad(frame) {
this.$emit('clickLaporan_');
this.myIframe = frame.contentWindow
},
// async simpan(){
// let response = await this.postData()
// if(response.data === 1)
// {
// this.showModal = !this.showModal;
// this.$toast.success('Berjaya menukar status!')
// setTimeout(()=>{
// this.$emit('togtable')
// },1000);
// }
// },
// postData: function(){
// return this.axios.post(this.$hostname + '/admin/simpanStatus',
// {
// id: this.statusid,
// status: this.referencestatus,
// paidat: this.datepaidat
// });
// }
}
}
</script>