imbangduga
This commit is contained in:
+372
-145
@@ -1,165 +1,392 @@
|
||||
<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">Imbang Duga</span>
|
||||
</div>
|
||||
<form method="get" id="formgadaian" :action="Urlredirect()" target="_blank">
|
||||
<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>
|
||||
<div class="flex">
|
||||
<input :value="$kodcaw" name="kodcaw" hidden/>
|
||||
<input :value="$hostname" name="hostname" hidden/>
|
||||
<input :value="jenisgenerate" type="hidden" name="jenis" />
|
||||
<span style="background-color: #F9FAFB" class="text-gray-600 border rounded-l px-4 py-2 whitespace-no-wrap">Mula</span>
|
||||
<input id="tarikhmula" name="datetarikh" @change="dateChecking()" class="border border-l-0 rounded-r px-4 py-2 w-1/2 mr-2" type="date" />
|
||||
<span style="background-color: #F9FAFB" class="text-gray-600 border rounded-l px-4 py-2 whitespace-no-wrap">Hingga</span>
|
||||
<input id="tarikhhingga" name="datehingga" @change="dateChecking()" class="border border-l-0 rounded-r px-4 py-2 w-1/2 mr-2" type="date"/>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mt-5">
|
||||
<!-- <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>Cari</button>
|
||||
</div>
|
||||
</div>
|
||||
<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"
|
||||
>Imbang Duga</span
|
||||
>
|
||||
</div>
|
||||
<form
|
||||
method="get"
|
||||
id="formgadaian"
|
||||
:action="Urlredirect()"
|
||||
target="_blank"
|
||||
>
|
||||
<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
|
||||
>
|
||||
<div class="flex">
|
||||
<input :value="kodcaw" name="kodcaw" hidden />
|
||||
<input :value="hostname" name="hostname" hidden />
|
||||
<input :value="jenisgenerate" type="hidden" name="jenis" />
|
||||
<span
|
||||
style="background-color: #f9fafb"
|
||||
class="text-gray-600 border rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
>Mula</span
|
||||
>
|
||||
<input
|
||||
id="tarikhmula"
|
||||
name="datetarikh"
|
||||
@change="dateChecking"
|
||||
class="border border-l-0 rounded-r px-4 py-2 w-1/2 mr-2"
|
||||
type="date"
|
||||
/>
|
||||
<span
|
||||
style="background-color: #f9fafb"
|
||||
class="text-gray-600 border rounded-l px-4 py-2 whitespace-no-wrap"
|
||||
>Hingga</span
|
||||
>
|
||||
<input
|
||||
id="tarikhhingga"
|
||||
name="datehingga"
|
||||
@change="dateChecking"
|
||||
class="border border-l-0 rounded-r px-4 py-2 w-1/2 mr-2"
|
||||
type="date"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex justify-end mt-5">
|
||||
<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>Cari
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container mx-auto px-5 my-10">
|
||||
<modal ref="modal" @clickEvent_="getImbangDuga"></modal>
|
||||
<table class="min-w-full leading-normal">
|
||||
<thead class="text-center">
|
||||
<tr>
|
||||
<th
|
||||
class="px-4 py-8 border-b-2 border-gray-200 bg-gray-100 text-left text-sm font-semibold text-gray-600 uppercase tracking-wider"
|
||||
>
|
||||
Bil
|
||||
</th>
|
||||
<th
|
||||
class="px-4 py-6 border-b-2 border-gray-200 bg-gray-100 text-left text-sm font-semibold text-gray-600 uppercase tracking-wider"
|
||||
>
|
||||
Tarikh
|
||||
</th>
|
||||
<th
|
||||
class="px-4 py-6 border-b-2 border-gray-200 bg-gray-100 text-left text-sm font-semibold text-gray-600 uppercase tracking-wider"
|
||||
>
|
||||
Kod Caw
|
||||
</th>
|
||||
<th
|
||||
class="px-4 py-6 border-b-2 border-gray-200 bg-gray-100 text-left text-sm font-semibold text-gray-600 uppercase tracking-wider"
|
||||
>
|
||||
Tanggungan Semasa
|
||||
</th>
|
||||
<th
|
||||
class="px-4 py-6 border-b-2 border-gray-200 bg-gray-100 text-left text-sm font-semibold text-gray-600 uppercase tracking-wider"
|
||||
>
|
||||
Harta Semasa
|
||||
</th>
|
||||
<th
|
||||
class="px-4 py-6 border-b-2 border-gray-200 bg-gray-100 text-left text-sm font-semibold text-gray-600 uppercase tracking-wider"
|
||||
>
|
||||
Tag Telly
|
||||
</th>
|
||||
<th
|
||||
class="px-10 py-6 border-b-2 border-gray-200 bg-gray-100 text-left text-sm font-semibold text-gray-600 uppercase tracking-wider"
|
||||
>
|
||||
Act
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<!-- <td class="px-5 py-3 border-b border-gray-200 bg-white text-sm">
|
||||
1
|
||||
</td>
|
||||
<td class="px-5 py-3 border-b border-gray-200 bg-white text-sm">
|
||||
2024-06-19
|
||||
</td> -->
|
||||
<!-- <td class="px-5 py-3 border-b border-gray-200 bg-white text-sm">
|
||||
1234
|
||||
</td>
|
||||
<td class="px-5 py-3 border-b border-gray-200 bg-white text-sm">
|
||||
5000
|
||||
</td>
|
||||
<td class="px-5 py-3 border-b border-gray-200 bg-white text-sm">
|
||||
10000
|
||||
</td>
|
||||
<td class="px-5 py-3 border-b border-gray-200 bg-white text-sm">
|
||||
Tag123
|
||||
</td> -->
|
||||
<tr v-for="(imbangduga, i) in showimbangduga.data" :key="i">
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="(showimbangduga.from + i)"></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(imbangduga.tarikh)">
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(imbangduga.kodCaw)">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(imbangduga.tanggunganSemasa)">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(imbangduga.hartaSemasa )">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(imbangduga.tagTelly)">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<button
|
||||
@click="action('2024', 'kb2')"
|
||||
class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
class="bi bi-card-checklist"
|
||||
viewBox="0 0 16 16"
|
||||
>
|
||||
<path
|
||||
d="M14.5 3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-13a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h13zm-13-1A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h13a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 14.5 2h-13z"
|
||||
/>
|
||||
<path
|
||||
d="M7 5.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm-1.496-.854a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708l.146.147 1.146-1.147a.5.5 0 0 1 .708 0zM7 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm-1.496-.854a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708l.146.147 1.146-1.147a.5.5 0 0 1 .708 0z"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<pagination :data="paginate" @clickEvent_="getImbangDuga"></pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import modal from "../components/util/ImbangdugaModal.vue";
|
||||
// import pagination from './pagination.veu'
|
||||
|
||||
const formatter = new Intl.NumberFormat("en-US", {
|
||||
minimumFractionDigits: 2,
|
||||
});
|
||||
|
||||
export default {
|
||||
components: {
|
||||
pagination,
|
||||
modal
|
||||
},
|
||||
|
||||
data(){
|
||||
return{
|
||||
jenisgenerate:'none',
|
||||
kodcaw: ''
|
||||
}
|
||||
data() {
|
||||
return {
|
||||
jenisgenerate: "none",
|
||||
kodcaw: "",
|
||||
hostname: "",
|
||||
|
||||
index: 0,
|
||||
leftToRight: true,
|
||||
imbangduga: [],
|
||||
PaginationLimit: 2,
|
||||
perPage: 5,
|
||||
totalPage: 0,
|
||||
currentPage: 1,
|
||||
lastPage: 5,
|
||||
showimbangduga: [],
|
||||
paginate: {},
|
||||
activePage: 1,
|
||||
showLoader: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async generatepdf() {
|
||||
await this.setJenis("pdf");
|
||||
|
||||
var tarikhMula = document.getElementById("tarikhmula");
|
||||
var tarikhHingga = document.getElementById("tarikhhingga");
|
||||
|
||||
var tarikh1 = new Date(tarikhMula.value);
|
||||
var tarikh2 = new Date(tarikhHingga.value);
|
||||
var Difference_In_Time = tarikh2.getTime() - tarikh1.getTime();
|
||||
var Difference_In_Days = Difference_In_Time / (1000 * 3600 * 24) + 1;
|
||||
|
||||
if (Difference_In_Days > 62) {
|
||||
this.$swal({
|
||||
text: "Sila Pilih Tarikh Kurang Dari 2 Bulan",
|
||||
icon: "error",
|
||||
allowEscapeKey: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: true,
|
||||
});
|
||||
} else {
|
||||
this.$swal({
|
||||
title: "Memuatkan...",
|
||||
allowEscapeKey: false,
|
||||
allowOutsideClick: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
timer: 8000,
|
||||
});
|
||||
|
||||
document.getElementById("formgadaian").submit();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async generatepdf(){
|
||||
await this.setJenis('pdf');
|
||||
async generateview() {
|
||||
await this.setJenis("view");
|
||||
var tarikhMula = document.getElementById("tarikhmula");
|
||||
var tarikhHingga = document.getElementById("tarikhhingga");
|
||||
|
||||
var tarikhMula = document.getElementById("tarikhmula");
|
||||
var tarikhHingga = document.getElementById("tarikhhingga");
|
||||
|
||||
var tarikh1 = new Date(tarikhMula.value);
|
||||
var tarikh2 = new Date(tarikhHingga.value);
|
||||
var Difference_In_Time = tarikh2.getTime() - tarikh1.getTime();
|
||||
var Difference_In_Days = Difference_In_Time / (1000 * 3600 * 24) + 1;
|
||||
var tarikh1 = new Date(tarikhMula.value);
|
||||
var tarikh2 = new Date(tarikhHingga.value);
|
||||
var Difference_In_Time = tarikh2.getTime() - tarikh1.getTime();
|
||||
var Difference_In_Days = Difference_In_Time / (1000 * 3600 * 24) + 1;
|
||||
|
||||
if(Difference_In_Days > 62){
|
||||
|
||||
Vue.swal({
|
||||
text: 'Sila Pilih Tarikh Kurang Dari 2 Bulan',
|
||||
icon: 'error',
|
||||
allowEscapeKey : false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: true,
|
||||
|
||||
|
||||
});
|
||||
|
||||
} else{
|
||||
if (Difference_In_Days > 62) {
|
||||
this.$swal({
|
||||
text: "Sila Pilih Tarikh Kurang Dari 2 Bulan",
|
||||
icon: "error",
|
||||
allowEscapeKey: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: true,
|
||||
});
|
||||
} else {
|
||||
this.$swal({
|
||||
title: "Memuatkan...",
|
||||
allowEscapeKey: false,
|
||||
allowOutsideClick: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
timer: 8000,
|
||||
});
|
||||
document.getElementById("formgadaian").submit();
|
||||
}
|
||||
},
|
||||
|
||||
Urlredirect: function () {
|
||||
return window.route("cetak.gadaian");
|
||||
},
|
||||
setJenis: function (value) {
|
||||
this.jenisgenerate = value;
|
||||
},
|
||||
|
||||
Vue.swal({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
timer: 8000,
|
||||
});
|
||||
|
||||
document.getElementById("formgadaian").submit();
|
||||
}
|
||||
dateChecking() {
|
||||
var tarikhMula = document.getElementById("tarikhmula");
|
||||
var tarikhHingga = document.getElementById("tarikhhingga");
|
||||
|
||||
|
||||
},
|
||||
async generateview(){
|
||||
await this.setJenis('view');
|
||||
var tarikh1 = new Date(tarikhMula.value);
|
||||
var tarikh2 = new Date(tarikhHingga.value);
|
||||
var Difference_In_Time = tarikh2.getTime() - tarikh1.getTime();
|
||||
var Difference_In_Days = Difference_In_Time / (1000 * 3600 * 24) + 1;
|
||||
|
||||
if (Difference_In_Days > 62) {
|
||||
this.$swal({
|
||||
text: "Sila Pilih Tarikh Kurang Dari 2 Bulan",
|
||||
icon: "error",
|
||||
allowEscapeKey: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: true,
|
||||
});
|
||||
}
|
||||
},
|
||||
// .then(function (response) {
|
||||
// console.log(response);
|
||||
// })
|
||||
|
||||
var tarikhMula = document.getElementById("tarikhmula");
|
||||
var tarikhHingga = document.getElementById("tarikhhingga");
|
||||
|
||||
var tarikh1 = new Date(tarikhMula.value);
|
||||
var tarikh2 = new Date(tarikhHingga.value);
|
||||
var Difference_In_Time = tarikh2.getTime() - tarikh1.getTime();
|
||||
var Difference_In_Days = Difference_In_Time / (1000 * 3600 * 24) + 1;
|
||||
|
||||
if(Difference_In_Days > 62){
|
||||
|
||||
Vue.swal({
|
||||
text: 'Sila Pilih Tarikh Kurang Dari 2 Bulan',
|
||||
icon: 'error',
|
||||
allowEscapeKey : false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: true,
|
||||
|
||||
|
||||
});
|
||||
|
||||
} else{
|
||||
|
||||
Vue.swal({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
timer: 8000,
|
||||
});
|
||||
|
||||
document.getElementById("formgadaian").submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
Urlredirect: function() {
|
||||
return window.route('cetak.gadaian')
|
||||
},
|
||||
setJenis: function(value){
|
||||
return this.jenisgenerate = value;
|
||||
},
|
||||
|
||||
dateChecking(){
|
||||
var tarikhMula = document.getElementById("tarikhmula");
|
||||
var tarikhHingga = document.getElementById("tarikhhingga");
|
||||
|
||||
var tarikh1 = new Date(tarikhMula.value);
|
||||
var tarikh2 = new Date(tarikhHingga.value);
|
||||
var Difference_In_Time = tarikh2.getTime() - tarikh1.getTime();
|
||||
var Difference_In_Days = Difference_In_Time / (1000 * 3600 * 24) + 1;
|
||||
|
||||
if(Difference_In_Days > 62){
|
||||
|
||||
Vue.swal({
|
||||
text: 'Sila Pilih Tarikh Kurang Dari 2 Bulan',
|
||||
icon: 'error',
|
||||
allowEscapeKey : false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: true,
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// .catch(function (error) {
|
||||
// console.log(error);
|
||||
// })
|
||||
|
||||
// .finally(function () {});
|
||||
// },
|
||||
},
|
||||
action(tarikhmula,kodcaw, tarikhhingga) {
|
||||
this.$refs.modal.showModal = true;
|
||||
axios.get('', {
|
||||
params: {
|
||||
hostname:this.$hostname,
|
||||
kodcaw: kodcaw,
|
||||
mula: tarikhmula,
|
||||
hingga: tarikhhingga,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
}).then(response => {
|
||||
|
||||
if(response.data === 'sama')
|
||||
{
|
||||
this.showLoader = false;
|
||||
this.$toast("Nilai Tunai sama dengan nilai tunai");
|
||||
|
||||
}else{
|
||||
this.Imban = response.data;
|
||||
this.showLoader = false;
|
||||
this.$refs.modal.showModal = true;
|
||||
this.$refs.modal.tarikh= tarikh;
|
||||
this.$refs.modal.kod = kodcaw;
|
||||
this.$refs.modal.kod = kodcaw;
|
||||
this.$refs.modal.kod = kodcaw;
|
||||
this.$refs.modal.kod = kodcaw;
|
||||
this.$refs.modal.kod = kodcaw;
|
||||
this.$refs.modal.pageNumber = this.currentPage;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getImbangDuga(pageNumber) {
|
||||
this.axios.get(this.$hostname + "/api/reports/getBalanceSheetsList", {
|
||||
params: {
|
||||
kodcaw: kodcawteller,
|
||||
mula: tarikhmula,
|
||||
hingga: tarikhhingga,
|
||||
page: pageNumber,
|
||||
},
|
||||
|
||||
}).then(response => {
|
||||
console.log(response)
|
||||
});
|
||||
|
||||
},
|
||||
formatterfunction(value) {
|
||||
return formatter.format(value);
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<div>
|
||||
<transition name="modal-fade">
|
||||
<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-screen 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-3xl font-semibold">
|
||||
Pemeriksaan Imbang Duga
|
||||
</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-->
|
||||
|
||||
<!--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>
|
||||
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 border border-blue-700 rounded" type="button" v-on:click="kemaskinifunc()">
|
||||
Kemaskini
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "modal",
|
||||
data() {
|
||||
return {
|
||||
showModal: false,
|
||||
tarikh: Date,
|
||||
kodcaw: String,
|
||||
bakiawal: 0,
|
||||
bakiakhir: 0,
|
||||
pendahuluan: 0,
|
||||
serahan: 0,
|
||||
pendteller: 0,
|
||||
serteller: 0,
|
||||
panjar: 0
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleModal: function(){
|
||||
this.showModal = !this.showModal;
|
||||
},
|
||||
kemaskinifunc: function(){
|
||||
|
||||
// axios.put('/api/check/imbangduga',
|
||||
// {
|
||||
// hostname:this.$hostname,
|
||||
// tarikh: this.tarikh,
|
||||
// kodcaw: this.kodcaw,
|
||||
// bakiawal: this.bakiawal.replace(/[^0-9.-]+/g,""),
|
||||
// keluar: this.pendteller.replace(/[^0-9.-]+/g,""),
|
||||
// masuk: this.serteller.replace(/[^0-9.-]+/g,""),
|
||||
// pendahuluan: this.pendahuluan.replace(/[^0-9.-]+/g,""),
|
||||
// serahan: this.serahan.replace(/[^0-9.-]+/g,""),
|
||||
// panjar: this.panjar.replace(/[^0-9.-]+/g,""),
|
||||
// bakiakhir: this.bakiakhir.replace(/[^0-9.-]+/g,"")
|
||||
|
||||
// }).then(response => {
|
||||
|
||||
if(response.data == 'berjaya')
|
||||
{
|
||||
this.showModal = false;
|
||||
this.$toast.success("Kemaskini Sudah Berjaya!")
|
||||
|
||||
setTimeout("window.location.reload()", 3000);
|
||||
}else{
|
||||
|
||||
this.showModal = false;
|
||||
this.$toast.error("Kemaskini tidak berjaya")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<div class="pt-6 px-4">
|
||||
<breadcrumb :items="[{ 'title' : 'Imbang Duga', 'icon' : 'fas fa-toolbox' }]"></breadcrumb>
|
||||
test
|
||||
|
||||
<imbangduga-component kodcaw="{{ Auth::user()->cawangan }}"></imbangduga-component>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -74,12 +74,12 @@
|
||||
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
|
||||
<div class="flex items-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
||||
class="bi bi-safe2" viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M1 2.5A1.5 1.5 0 0 1 2.5 1h12A1.5 1.5 0 0 1 16 2.5v12a1.5 1.5 0 0 1-1.5 1.5h-12A1.5 1.5 0 0 1 1 14.5V14H.5a.5.5 0 0 1 0-1H1V9H.5a.5.5 0 0 1 0-1H1V4H.5a.5.5 0 0 1 0-1H1v-.5zM2.5 2a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5v-12a.5.5 0 0 0-.5-.5h-12z" />
|
||||
<path
|
||||
d="M5.035 8h1.528c.047-.184.12-.357.214-.516l-1.08-1.08A3.482 3.482 0 0 0 5.035 8zm1.369-2.303 1.08 1.08c.16-.094.332-.167.516-.214V5.035a3.482 3.482 0 0 0-1.596.662zM9 5.035v1.528c.184.047.357.12.516.214l1.08-1.08A3.482 3.482 0 0 0 9 5.035zm2.303 1.369-1.08 1.08c.094.16.167.332.214.516h1.528a3.483 3.483 0 0 0-.662-1.596zM11.965 9h-1.528c-.047.184-.12.357-.214.516l1.08 1.08A3.483 3.483 0 0 0 11.965 9zm-1.369 2.303-1.08-1.08c-.16.094-.332.167-.516.214v1.528a3.483 3.483 0 0 0 1.596-.662zM8 11.965v-1.528a1.989 1.989 0 0 1-.516-.214l-1.08 1.08A3.483 3.483 0 0 0 8 11.965zm-2.303-1.369 1.08-1.08A1.988 1.988 0 0 1 6.563 9H5.035c.085.593.319 1.138.662 1.596zM4 8.5a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0zm4.5-1a1 1 0 1 0 0 2 1 1 0 0 0 0-2z" />
|
||||
</svg>
|
||||
class="bi bi-gear" viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M8 4.754a3.246 3.246 0 1 0 0 6.492 3.246 3.246 0 0 0 0-6.492M5.754 8a2.246 2.246 0 1 1 4.492 0 2.246 2.246 0 0 1-4.492 0"/>
|
||||
<path
|
||||
d="M9.796 1.343c-.527-1.79-3.065-1.79-3.592 0l-.094.319a.873.873 0 0 1-1.255.52l-.292-.16c-1.64-.892-3.433.902-2.54 2.541l.159.292a.873.873 0 0 1-.52 1.255l-.319.094c-1.79.527-1.79 3.065 0 3.592l.319.094a.873.873 0 0 1 .52 1.255l-.16.292c-.892 1.64.901 3.434 2.541 2.54l.292-.159a.873.873 0 0 1 1.255.52l.094.319c.527 1.79 3.065 1.79 3.592 0l.094-.319a.873.873 0 0 1 1.255-.52l.292.16c1.64.893 3.434-.902 2.54-2.541l-.159-.292a.873.873 0 0 1 .52-1.255l.319-.094c1.79-.527 1.79-3.065 0-3.592l-.319-.094a.873.873 0 0 1-.52-1.255l.16-.292c.893-1.64-.902-3.433-2.541-2.54l-.292.159a.873.873 0 0 1-1.255-.52zm-2.633.283c.246-.835 1.428-.835 1.674 0l.094.319a1.873 1.873 0 0 0 2.693 1.115l.291-.16c.764-.415 1.6.42 1.184 1.185l-.159.292a1.873 1.873 0 0 0 1.116 2.692l.318.094c.835.246.835 1.428 0 1.674l-.319.094a1.873 1.873 0 0 0-1.115 2.693l.16.291c.415.764-.42 1.6-1.185 1.184l-.291-.159a1.873 1.873 0 0 0-2.693 1.116l-.094.318c-.246.835-1.428.835-1.674 0l-.094-.319a1.873 1.873 0 0 0-2.692-1.115l-.292.16c-.764.415-1.6-.42-1.184-1.185l.159-.291A1.873 1.873 0 0 0 1.945 8.93l-.319-.094c-.835-.246-.835-1.428 0-1.674l.319-.094A1.873 1.873 0 0 0 3.06 4.377l-.16-.292c-.415-.764.42-1.6 1.185-1.184l.292.159a1.873 1.873 0 0 0 2.692-1.115z"/>
|
||||
</svg>
|
||||
<span class="ml-2 text-lg">Tetapan</span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user