From 232ac14df1c55278666bb6000f93928da574bbc6 Mon Sep 17 00:00:00 2001 From: Dede Fuji Abdul Date: Tue, 2 Apr 2024 13:39:21 +0700 Subject: [PATCH] Fix showDetail function in RGangguan_ALL, RGangguan_CTTM, and RGangguan_BerdasarMedia --- src/components/DatePicker.vue | 2 +- .../Pages/Ctt/CTT_LaporanCttKwhPeriksa.vue | 601 +++++++++++++++++- .../Pages/Gangguan/Rekap/RGangguan_ALL.vue | 2 +- .../Rekap/RGangguan_BerdasarMedia.vue | 2 +- .../Pages/Gangguan/Rekap/RGangguan_CTTM.vue | 2 +- .../Pages/Gangguan/Rekap/RGangguan_KTI.vue | 38 +- .../Rekap/MonalisaKR_JumlahKaliKeluhan.vue | 3 +- src/utils/api/api.graphql.ts | 8 + 8 files changed, 647 insertions(+), 11 deletions(-) diff --git a/src/components/DatePicker.vue b/src/components/DatePicker.vue index 1821a2f..31bb88e 100755 --- a/src/components/DatePicker.vue +++ b/src/components/DatePicker.vue @@ -4,7 +4,7 @@ import { ref, watch } from 'vue' import VueTailwindDatepicker from 'vue-tailwind-datepicker' const dateValue = ref( - `${new Date().getDay().toString().length == 1 ? `0${new Date().getDay()}` : new Date().getDay()}-${new Date().getMonth().toString().length == 1 ? `0${new Date().getMonth()}` : new Date().getMonth()}-${new Date().getFullYear()} s/d ${new Date().getDay().toString().length == 1 ? `0${new Date().getDay()}` : new Date().getDay()}-${new Date().getMonth().toString().length == 1 ? `0${new Date().getMonth()}` : new Date().getMonth()}-${new Date().getFullYear()}` + `${new Date().getDay().toString().length == 1 ? `0${new Date().getDay()}` : new Date().getDay()}-${(new Date().getMonth() + 1).toString().length == 1 ? `0${new Date().getMonth() + 1}` : new Date().getMonth() + 1}-${new Date().getFullYear()} s/d ${new Date().getDay().toString().length == 1 ? `0${new Date().getDay()}` : new Date().getDay()}-${(new Date().getMonth() + 1).toString().length == 1 ? `0${new Date().getMonth() + 1}` : new Date().getMonth() + 1}-${new Date().getFullYear()}` ) const formatter = ref({ date: 'DD-MM-YYYY', diff --git a/src/components/Pages/Ctt/CTT_LaporanCttKwhPeriksa.vue b/src/components/Pages/Ctt/CTT_LaporanCttKwhPeriksa.vue index 8e93a94..700f12b 100755 --- a/src/components/Pages/Ctt/CTT_LaporanCttKwhPeriksa.vue +++ b/src/components/Pages/Ctt/CTT_LaporanCttKwhPeriksa.vue @@ -19,7 +19,7 @@ column-resizing-mode="widget" :word-wrap-enabled="true" > - + @@ -31,7 +31,32 @@ :allow-export-selected-data="false" /> - + + + @@ -153,8 +178,528 @@ }}

+ + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+

UIW/D:

+ +
+ +
+

UP3:

+ +
+ +
+

Rayon:

+ +
+ +
+

IDPEL:

+ +
+ +
+

NOMETER:

+ +
+ +
+

No. Telpon:

+ +
+ +
+

Nama:

+ +
+ +
+

Alamat:

+ +
+ +
+

Sumber Lapor:

+ +
+ +
+

No Laporan:

+ +
+ +
+

08:

+ +
+ +
+

70:

+ +
+ +
+

71:

+ +
+ +
+

41:

+ +
+ +
+

44:

+ +
+ +
+

45:

+ +
+ +
+

46:

+ +
+ +
+

37:

+ +
+ +
+

47:

+ +
+ +
+

Jenis DLPD:

+ +
+ +
+

Keterangan DLPD:

+ +
+ +
+

Bulan Tahun DLPD:

+ +
+ +
+

No. Agenda P2TL:

+ +
+ +
+

Tgl Mohon P2T:

+ +
+ +
+

Tgl Sah P2TL:

+ +
+ +
+

Tgl/Jam Lapor:

+ +
+ +
+

Petugas Regu:

+ +
+ +
+

User VCC:

+ +
+
+
+
+ @@ -165,12 +710,15 @@ import { DxColumn, DxColumnFixing, DxExport, + DxGroupItem, DxGrouping, DxLoadPanel, + DxPager, DxPaging, DxScrolling, DxSearchPanel, - DxSelection + DxSelection, + DxSummary } from 'devextreme-vue/data-grid' import { jsPDF } from 'jspdf' import { exportDataGrid as exportToPdf } from 'devextreme/pdf_exporter' @@ -185,6 +733,9 @@ import { apolloClient, queries, requestGraphQl } from '@/utils/api/api.graphql' import { provideApolloClient } from '@vue/apollo-composable' import { formatNumber, formatPercentage, isNumber } from '@/utils/numbers' import BufferDialog from '@/components/Dialogs/BufferDialog.vue' +import DetailDialog from '@/components/Dialogs/DetailDialog.vue' +import { formatWaktu } from '@/components/Form/FiltersType/reference' +import InputText from '@/components/InputText.vue' const client = apolloClient() provideApolloClient(client) @@ -201,6 +752,46 @@ const closedialogDetail = () => (dialogDetail.value = false) const loadingData = ref(false) const loadingSubData = ref(false) +let cc123 = 0 +let plnMobile = 0 +let comcen = 0 +const calculateCustomSummary = (options: any) => { + if (options.name === 'wo_cc123') { + if (options.summaryProcess === 'calculate') { + cc123 += options.value + } else if (options.summaryProcess === 'finalize') { + options.totalValue = cc123 + } + } + + if (options.name === 'wo_pln_mobile') { + if (options.summaryProcess === 'calculate') { + plnMobile += options.value + } else if (options.summaryProcess === 'finalize') { + options.totalValue = plnMobile + } + } + + if (options.name === 'wo_comcen') { + if (options.summaryProcess === 'calculate') { + comcen += options.value + } else if (options.summaryProcess === 'finalize') { + options.totalValue = comcen + } + } + + if (options.name === 'wo_total') { + if (options.summaryProcess === 'start') { + plnMobile = 0 + cc123 = 0 + comcen = 0 + } else if (options.summaryProcess === 'calculate') { + } else if (options.summaryProcess === 'finalize') { + options.totalValue = plnMobile + cc123 + comcen + } + } +} + const onExporting = (e: any) => { if (e.format === 'pdf') { const doc = new jsPDF() @@ -230,6 +821,8 @@ const onExporting = (e: any) => { } } +const onExportingDetail = (e: any) => {} + const resetData = () => { data.value = [] dataSub.value = [] diff --git a/src/components/Pages/Gangguan/Rekap/RGangguan_ALL.vue b/src/components/Pages/Gangguan/Rekap/RGangguan_ALL.vue index 1df7965..b0066ab 100755 --- a/src/components/Pages/Gangguan/Rekap/RGangguan_ALL.vue +++ b/src/components/Pages/Gangguan/Rekap/RGangguan_ALL.vue @@ -1325,7 +1325,7 @@ const showDetail = () => { if (agreeToShowDialog.value) { dataSub.value = [] dataSubSelected.value = null - // getDetail() + getDetail() } } diff --git a/src/components/Pages/Gangguan/Rekap/RGangguan_BerdasarMedia.vue b/src/components/Pages/Gangguan/Rekap/RGangguan_BerdasarMedia.vue index 5f911f9..8b75939 100755 --- a/src/components/Pages/Gangguan/Rekap/RGangguan_BerdasarMedia.vue +++ b/src/components/Pages/Gangguan/Rekap/RGangguan_BerdasarMedia.vue @@ -562,7 +562,7 @@ const showDetail = () => { dataSub.value = [] dataSubSelected.value = null if (date.value != '') { - // getDetail() + getDetail() } } diff --git a/src/components/Pages/Gangguan/Rekap/RGangguan_CTTM.vue b/src/components/Pages/Gangguan/Rekap/RGangguan_CTTM.vue index a42800c..a533ade 100755 --- a/src/components/Pages/Gangguan/Rekap/RGangguan_CTTM.vue +++ b/src/components/Pages/Gangguan/Rekap/RGangguan_CTTM.vue @@ -544,7 +544,7 @@ const showDetail = () => { clearSelection() dataSubSelected.value = null if (monthSelected.value != null) { - // getDetail() + getDetail() } } diff --git a/src/components/Pages/Gangguan/Rekap/RGangguan_KTI.vue b/src/components/Pages/Gangguan/Rekap/RGangguan_KTI.vue index 010b76a..f5b1872 100755 --- a/src/components/Pages/Gangguan/Rekap/RGangguan_KTI.vue +++ b/src/components/Pages/Gangguan/Rekap/RGangguan_KTI.vue @@ -75,6 +75,15 @@ name="UIDGroup" :group-index="2" /> + { const getDetail = async () => { loadingSubData.value = true + const { jenisTransaksi } = filters.value const dateValue = filters.value.periode.split(' s/d ') const ref = dataSelected.value const compDate = dateValue[0].split('-').reverse().join('-').split('-') @@ -1185,11 +1195,35 @@ const getDetail = async () => { dateTo: dateValue[1] ? dateValue[1].split('-').reverse().join('-') : new Date().toISOString().slice(0, 10), - posko: ref?.id_posko ? ref?.id_posko : 0, + posko: ref?.id_ulp ? ref?.id_ulp : 0, idUid: ref?.id_uid ? ref?.id_uid : 0, idUp3: ref?.id_up3 ? ref?.id_up3 : 0, bulan: monthSelected.value, - tahun: parseInt(compDate[0]) + tahun: parseInt(compDate[0]), + is_transaksi_individual: + jenisTransaksi.length == 4 || jenisTransaksi.length == 0 + ? 0 + : jenisTransaksi.includes('Koreksi Transaksi Individual') + ? 1 + : 2, + is_cleansing_transaksi_tm: + jenisTransaksi.length == 4 || jenisTransaksi.length == 0 + ? 0 + : jenisTransaksi.includes('Cleansing Traksaksi TM') + ? 1 + : 2, + is_koreksi_transaksi_tm: + jenisTransaksi.length == 4 || jenisTransaksi.length == 0 + ? 0 + : jenisTransaksi.includes('Koreksi Transaksi TM') + ? 1 + : 2, + is_koreksi_gangguan_dan_anev: + jenisTransaksi.length == 4 || jenisTransaksi.length == 0 + ? 0 + : jenisTransaksi.includes('Koreksi Kode Gangguan dan Anev') + ? 1 + : 2 } loadingSubData.value = true diff --git a/src/components/Pages/Monalisa/Keluhan/Rekap/MonalisaKR_JumlahKaliKeluhan.vue b/src/components/Pages/Monalisa/Keluhan/Rekap/MonalisaKR_JumlahKaliKeluhan.vue index d6b1cd2..5f1284d 100755 --- a/src/components/Pages/Monalisa/Keluhan/Rekap/MonalisaKR_JumlahKaliKeluhan.vue +++ b/src/components/Pages/Monalisa/Keluhan/Rekap/MonalisaKR_JumlahKaliKeluhan.vue @@ -399,7 +399,8 @@ const getDetail = async () => { : new Date().toISOString().slice(0, 10), idUlp: selected?.id_ulp ? selected?.id_ulp : 0, idUid: selected?.id_uid ? selected?.id_uid : 0, - idUp3: selected?.id_up3 ? selected?.id_up3 : 0 + idUp3: selected?.id_up3 ? selected?.id_up3 : 0, + isSelesai: 0 } loadingSubData.value = true diff --git a/src/utils/api/api.graphql.ts b/src/utils/api/api.graphql.ts index 666698b..b3ba376 100755 --- a/src/utils/api/api.graphql.ts +++ b/src/utils/api/api.graphql.ts @@ -1090,6 +1090,10 @@ export const queries = { $posko: Int! $idUid: Int! $idUp3: Int! + $is_transaksi_individual: Int! + $is_cleansing_transaksi_tm: Int! + $is_koreksi_transaksi_tm: Int! + $is_koreksi_gangguan_dan_anev: Int! ) { detailGangguanKoreksiTransaksiIndividu( dateFrom: $dateFrom @@ -1097,6 +1101,10 @@ export const queries = { posko: $posko idUid: $idUid idUp3: $idUp3 + is_transaksi_individual: $is_transaksi_individual + is_cleansing_transaksi_tm: $is_cleansing_transaksi_tm + is_koreksi_transaksi_tm: $is_koreksi_transaksi_tm + is_koreksi_gangguan_dan_anev: $is_koreksi_gangguan_dan_anev ) { id no_laporan