From aa7dece42dfa34dac555191364ef8a98cad23247 Mon Sep 17 00:00:00 2001 From: Amir Date: Sat, 15 Oct 2022 22:41:01 +0800 Subject: [PATCH] Fix payment --- .env | 2 + .env.example | 2 + src/components/pay/SelectOutlet.vue | 199 +++++++++++++- src/components/pay/ThePay.vue | 89 ++++++- src/components/result/ResultDetail.vue | 343 ++++++++++++++----------- src/components/result/ResultMain.vue | 18 +- src/main.js | 6 + src/router/index.js | 6 +- 8 files changed, 503 insertions(+), 162 deletions(-) diff --git a/.env b/.env index d3f895e..18634dc 100644 --- a/.env +++ b/.env @@ -1 +1,3 @@ +BASE_URL = http://localhost:8080 + VUE_APP_ROOT_URL = http://lelong-admin.test/api \ No newline at end of file diff --git a/.env.example b/.env.example index f873304..87341ef 100644 --- a/.env.example +++ b/.env.example @@ -1 +1,3 @@ +BASE_URL = http://localhost:8080 + VUE_APP_ROOT_URL = http://lelong.test/api \ No newline at end of file diff --git a/src/components/pay/SelectOutlet.vue b/src/components/pay/SelectOutlet.vue index 1308b45..1e8b3d5 100644 --- a/src/components/pay/SelectOutlet.vue +++ b/src/components/pay/SelectOutlet.vue @@ -1,5 +1,114 @@ \ No newline at end of file diff --git a/src/components/pay/ThePay.vue b/src/components/pay/ThePay.vue index 9e9e540..83a4ee7 100644 --- a/src/components/pay/ThePay.vue +++ b/src/components/pay/ThePay.vue @@ -1,17 +1,70 @@ @@ -32,11 +85,15 @@ export default { lists: [], tarikhLelong: "", statusComponent: 1, + invoice_id: "", + invoice_no: "", user: { id: 1, caw: "KOta Bbharu", }, lelongId: "", + isLoading: false, + isSuccess: false, }; }, created() { @@ -44,9 +101,11 @@ export default { }, mounted: function () { this.liveData(); + // this.getInvoice(); }, methods: { liveData() { + this.isLoading = true; axios .get( "/bayarBaki/" + @@ -61,7 +120,9 @@ export default { } ) .then((response) => { + this.isLoading = false; if (response.data.success == true) { + this.isSuccess = true; this.lists = response.data.data; console.log(this.lists); this.tarikhLelong = response.data.tarikh_lelong; @@ -69,9 +130,11 @@ export default { } }) .catch((error) => { + this.isLoading = false; console.log(error); }); }, + clickBackButton() { this.statusComponent -= 1; }, @@ -80,4 +143,10 @@ export default { }, }, }; - \ No newline at end of file + + + \ No newline at end of file diff --git a/src/components/result/ResultDetail.vue b/src/components/result/ResultDetail.vue index 3f3a706..612f0ad 100644 --- a/src/components/result/ResultDetail.vue +++ b/src/components/result/ResultDetail.vue @@ -10,110 +10,120 @@
-
- - +
+
+ + - - - - - - - +
+
+
+
+ +
+
+ Tiada Data. +
+
+ Sila rujuk halaman + Keputusan - Kembali - -
+ untuk maklumat rekod bidaan menang.
@@ -309,6 +348,8 @@ export default { loading: false, lelongId: "", statusPayment: "", + disabled: 0, + isSuccess: false, }; }, created() { @@ -318,8 +359,16 @@ export default { }, mounted: function () { this.liveData(); + this.checkStatusPayment(); }, methods: { + checkStatusPayment() { + if (this.statusPayment == "" || this.statusPayment == null) { + this.disabled = 0; + } else { + this.disabled = 1; + } + }, liveData() { this.loading = true; axios @@ -337,11 +386,13 @@ export default { ) .then((response) => { if (response.data.success == true) { + this.isSuccess = true; this.loading = false; console.log(response); this.lists = response.data.data; this.tarikhLelong = response.data.tarikh_lelong; } else { + this.isSuccess = false; } }) .catch((error) => { @@ -371,4 +422,8 @@ export default { height: 20px; width: 10px !important; } + +.container-height { + min-height: 70vh; +} \ No newline at end of file diff --git a/src/components/result/ResultMain.vue b/src/components/result/ResultMain.vue index 06f5e78..1916c7b 100644 --- a/src/components/result/ResultMain.vue +++ b/src/components/result/ResultMain.vue @@ -42,9 +42,21 @@ .replace(/\B(?=(\d{3})+(?!\d))/g, ",") || "" }} - Selesai - - Belum Selesai + + + + +