emit payment
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
</table>
|
||||
<p>Jumlah Dipilih: RM{{ totalHarga }}</p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<router-link class="btn btn-danger" v-bind:to="{ name: 'detail' }"
|
||||
>Cancel</router-link
|
||||
<button class="btn btn-secondary" v-on:click="($emit('back-is-click', false))"
|
||||
>Kembali</button
|
||||
>
|
||||
<button
|
||||
ref="backButton"
|
||||
@@ -71,6 +71,7 @@
|
||||
<script>
|
||||
import axios from "axios";
|
||||
export default {
|
||||
emits: ["back-is-click"],
|
||||
props: {
|
||||
totalHarga: "",
|
||||
finalSurat: "",
|
||||
@@ -99,7 +100,7 @@ export default {
|
||||
// total_payment: 1443,
|
||||
// },
|
||||
// ],
|
||||
sag: [],
|
||||
sag: '',
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
<tr v-for="data in selectedRadio.sag" v-bind:key="data">
|
||||
<td>
|
||||
<input type="checkbox" v-bind:value="data" v-model="listSag" />
|
||||
<input
|
||||
<!-- <input
|
||||
type="checkbox"
|
||||
v-bind:value="data.total_payment"
|
||||
v-model="totalSelect"
|
||||
/>
|
||||
/> -->
|
||||
</td>
|
||||
<td>{{ data.norujukan }}</td>
|
||||
<td>RM{{ data.total_payment }}</td>
|
||||
@@ -21,9 +21,12 @@
|
||||
</table>
|
||||
<p>Jumlah Dipilih: RM{{ sum }}</p>
|
||||
<div class="d-flex justify-content-between">
|
||||
<router-link class="btn btn-danger" v-bind:to="{ name: 'detail' }"
|
||||
>Cancel</router-link
|
||||
<button
|
||||
class="btn btn-secondary"
|
||||
v-on:click="$emit('back-is-click', false)"
|
||||
>
|
||||
Kembali
|
||||
</button>
|
||||
<button
|
||||
ref="nextButton"
|
||||
v-on:click="clickNextButton()"
|
||||
@@ -35,7 +38,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<select-finalise v-bind:finalSurat="listSag" v-bind:totalHarga="sum"></select-finalise>
|
||||
<select-finalise
|
||||
v-bind:finalSurat="listSag"
|
||||
v-bind:totalHarga="sum"
|
||||
v-on:back-is-click="backIsClick"
|
||||
></select-finalise>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
},
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<select-id v-bind:selectedRadio="selectRadio"></select-id>
|
||||
<select-id v-bind:selectedRadio="selectRadio" v-on:back-is-click="backIsClick"></select-id>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -64,6 +64,9 @@ export default {
|
||||
},
|
||||
clickNextButton() {
|
||||
this.nextButton = true;
|
||||
},
|
||||
backIsClick(value) {
|
||||
this.nextButton = value;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
data-bs-parent="#accordionExample"
|
||||
>
|
||||
<div class="accordion-body">
|
||||
<table class="table table-bordered table-hover">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Bil</th>
|
||||
@@ -70,8 +70,9 @@
|
||||
<td>{{ data.norujukan }}</td>
|
||||
<td>RM {{ data.total_payment }}</td>
|
||||
<td>{{ data.marhun }}</td>
|
||||
<td class="text-danger" v-if="data.status_payment === null">Belum Bayar (null)</td>
|
||||
<td class="text-success" v-if="data.status_payment === 1">Selesai (1)</td>
|
||||
<td class="m-1 badge rounded-pill bg-danger" v-if="data.status_payment === null || data.status_payment == 0">Belum Bayar</td>
|
||||
<td class="m-1 badge rounded-pill bg-warning" v-if="data.status_payment === 2">Tunggu Pengesahan</td>
|
||||
<td class="m-1 badge rounded-pill bg-success" v-if="data.status_payment === 1">Selesai</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user