Files
17168ERP/web/admin/follower/order_record.aspx
2025-08-29 01:27:25 +08:00

113 lines
4.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Templates/TBS5ADM001/MasterPage.master" AutoEventWireup="true" CodeFile="order_record.aspx.cs" Inherits="admin_follower_order_record" %>
<asp:Content ID="Content1" ContentPlaceHolderID="page_header" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="page_nav" Runat="Server">
<div class="scroll-nav nav nav-tabs mb-2 mb-sm-0 d-none d-sm-flex">
<div class="ms-3">
<span>信眾姓名:</span><asp:Literal runat="server" ID="username"></asp:Literal>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="container-fluid">
<v-data-table
:headers="total_record.headers"
:items="total_record.items"
item-key="id"
class="elvation-1">
</v-data-table>
</div>
<v-divider class="my-4"></v-divider>
<div class="container-fluid">
<v-data-table
:headers="activity_record.headers"
:items="activity_record.items"
item-key="id"
class="elvation-1">
<template #item.slot_detail_btn="{item}">
<a :href="'order_record_detail.aspx?orderno='+item.orderno+'&userid='+current_userid" class="btn btn-outline-secondary btn-sm">詳細記錄</a>
</template>
<template #item.startdate="{item}">
{{item.startdate | timeString('YYYY/MM/DD')}}
</template>
<template #item.enddate="{item}">
{{item.enddate | timeString('YYYY/MM/DD')}}
</template>
<template #item.order_item="{item}">
{{item.order_item.join('')}}
</template>
</v-data-table>
</div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="offCanvasRight" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="footer_script" Runat="Server">
<script>
Vue.filter('timeString', function (value, myFormat) {
return value == null || value == "" ? "" : moment(value).format(myFormat || 'YYYY-MM-DD HH:mm:ss');
});
let VueApp = new Vue({
el: '#app',
vuetify: new Vuetify(vuetify_options),
data() {
return {
current_userid: <%= Request["userid"] %>,
total_record: {
options: { multiSort: false },
headers: [
{ text: '參加活動次數', value: 'activity_times' },
{ text: '總功德金', value: 'total_amount' }
],
items: [{ activity_times: 0, total_amount: 0}]
},
activity_record: {
options: { multiSort: false },
headers: [
{ text: '報名單號', value: 'orderno'},
{ text: '活動分類', value: 'category' },
{ text: '活動名稱', value: 'activityname' },
{ text: '開始日期', value: 'startdate' },
{ text: '結束日期', value: 'enddate' },
{ text: '功德金', value: 'amount' },
{ text: '報名項目', value: 'order_item' },
{ text: '牌位數量', value: 'pwcount' },
{ text: '', value: 'slot_detail_btn' }
],
items: [],
}
}
},
methods: {
getDefault() {
axios
.post(HTTP_HOST + 'api/follower/totalorderamount?id=' + this.current_userid)
.then(res => {
this.total_record.items[0].total_amount = res.data.totalamount
this.total_record.items[0].activity_times = res.data.activity_times
})
.catch(error => console.log())
axios
.post(HTTP_HOST + 'api/follower/orderrecord?id=' + this.current_userid)
.then(res => {
this.activity_record.items = res.data.list
})
.catch(error => console.log())
}
},
watch: {
'total_record.options':{
handler() {
this.getDefault()
},
deep: true,
immediate: true
}
}
})
</script>
</asp:Content>