This commit is contained in:
2026-08-06 18:00:04 +08:00
parent b30cc47184
commit e60b172b39
10 changed files with 317 additions and 285 deletions
+14 -7
View File
@@ -50,13 +50,13 @@
style="top: 5vh !important; left: 5vw !important; display: flex; margin: auto !important; width: 100% !important; height: 100% !important; ">
<!-- Modal Window Box -->
<div class="modal-window" style="height: 100% !important; width: 100% !important; overflow: auto !important; width: 80vw !important; height: 80vh !important; ">
<div class="modal-window" style="height: 100% !important; width: 100% !important; ">
<header class="modal-header">
<!--<h2>Modal Title</h2>-->
<button @click="closeModal" class="close-btn">&times;</button>
</header>
<main class="modal-body" style="overflow-y:auto;">
<main class="modal-body" style="overflow: auto !important; height: 100% !important; width: 100% !important; width: 80vw !important; height: 80vh !important; ">
<!-- Async component loaded dynamically via v-if -->
<receipt-component :form-data="formData" @close-dialog="closeModal" mode="preOrder" :order_no="receiptComponent.order_no" :total_amt="receiptComponent.total_amt" />
</main>
@@ -68,7 +68,13 @@
<script>
module.exports = {
props: ['formData'],
props: {
formData: {},
search: {
},
},
name:"ParentComponent",
components: {
// Add .then(m => m.default || m) to safely handle module.exports
@@ -83,7 +89,7 @@
order_no: "",
total_amt:0
},
search: {},
data_table: {
loading: true,
list: [],
@@ -95,10 +101,10 @@
header: [
{ text: '信眾', value: 'f_name' },
{ text: '報名單號', value: 'order_no' },
{ text: '收據號碼', value: 'receipt_num' },
{ text: '活動', value: 'act_name'},
{ text: '功德項目數量', value: 'item_count' },
{ text: '總金額', value: 'total_amt' },
{ text: '收據金額', value: 'receipt_amt' },
{ text: '登錄人員', value: 'admin_num' },
{ text: '登錄時間', value: 'reg_time' },
{ text: '', value: 'slot_btn', sortable: false, align: 'end' }
@@ -132,16 +138,17 @@
this.$emit('custom-event', { action: 'add' });
},
loadData(clearpage = false) {
const { sortBy, sortDesc, page, itemsPerPage } = this.options
//page = this.data_table.page;
let search = {}
//let search = {}
const params = {
sortBy: "", sortDesc: false,
page: clearpage ? '1' : page, pageSize: itemsPerPage
};
this.data_table.loading = true
axios
.post(HTTP_HOST + 'api/preOrder/GetPreOrder', search, { params: params })
.post(HTTP_HOST + 'api/preOrder/GetPreOrder', this.search, { params: params })
.then(response => {
console.log(response)
this.data_table.list = response.data.list