From 131848d2065a93fa5483819e4450d8653dd2a9aa Mon Sep 17 00:00:00 2001 From: Amir Date: Thu, 11 Aug 2022 09:51:45 +0800 Subject: [PATCH] emit payment --- src/components/pay/SelectFinalise.vue | 7 ++++--- src/components/pay/SelectId.vue | 26 ++++++++++++++++++-------- src/components/pay/SelectOutlet.vue | 5 ++++- src/components/result/ResultDetail.vue | 7 ++++--- 4 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/components/pay/SelectFinalise.vue b/src/components/pay/SelectFinalise.vue index 06b6aab..def9232 100644 --- a/src/components/pay/SelectFinalise.vue +++ b/src/components/pay/SelectFinalise.vue @@ -11,8 +11,8 @@

Jumlah Dipilih: RM{{ totalHarga }}

- CancelKembali
- +
@@ -43,6 +50,7 @@ import SelectFinalise from "./SelectFinalise.vue"; export default { + emits: ["back-is-click"], components: { "select-finalise": SelectFinalise, }, @@ -52,7 +60,6 @@ export default { data() { return { listSag: [], - totalSelect: [], nextButton: false, }; }, @@ -60,11 +67,14 @@ export default { clickNextButton() { this.nextButton = true; }, + backIsClick(value) { + this.nextButton = value; + }, }, computed: { sum() { - return this.totalSelect.reduce(function (a, b) { - return parseInt(a) + parseInt(b); + return this.listSag.reduce(function (a, item) { + return parseInt(a) + parseInt(item.total_payment); }, 0); }, }, diff --git a/src/components/pay/SelectOutlet.vue b/src/components/pay/SelectOutlet.vue index 83424b7..aa895f7 100644 --- a/src/components/pay/SelectOutlet.vue +++ b/src/components/pay/SelectOutlet.vue @@ -32,7 +32,7 @@
- +
@@ -64,6 +64,9 @@ export default { }, clickNextButton() { this.nextButton = true; + }, + backIsClick(value) { + this.nextButton = value; } }, }; diff --git a/src/components/result/ResultDetail.vue b/src/components/result/ResultDetail.vue index 111fdbc..c47c6c9 100644 --- a/src/components/result/ResultDetail.vue +++ b/src/components/result/ResultDetail.vue @@ -51,7 +51,7 @@ data-bs-parent="#accordionExample" >
- +
@@ -70,8 +70,9 @@ - - + + +
Bil{{ data.norujukan }} RM {{ data.total_payment }} {{ data.marhun }}Belum Bayar (null)Selesai (1)Belum BayarTunggu PengesahanSelesai