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

169 lines
7.5 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<%@ Page Language="C#" MasterPageFile="~/admin/Templates/TBS5ADM001/MasterPage.master" AutoEventWireup="true" CodeFile="index2.aspx.cs" Inherits="admin_index2" Title="網站後端管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="page_header" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="page_nav" runat="Server">
<div class="mb-2 mb-sm-0">
</div>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="footer_script" runat="Server">
<script>
let VueApp=new Vue({
el: '#app',
vuetify: new Vuetify(vuetify_options),
data() {
return {
options: { multiSort: false },
data_table: {
loading: true,
list: [],
header: [
{ text: '活動名稱(狀態)', value: 'subject', sortable: false },
{ text: '活動日期​', value: 'act_date', sortable: false },
{ text: '已報名人數​', value: 'order_qty', align: 'end', sortable: false },
{ text: '(' + this.getYesterday() + ')\n\r昨天報到人數', value: 'check_qty_yest', align: 'end', sortable: false },
{ text: '(' + new Date().format("yyyy-MM-dd") + ')\n\r今天報到人數', value: 'check_qty_today', align: 'end', sortable: false},
],
},
search: {
}
}
},
watch: {
options: {
handler() {
this.getDefault()
},
deep: true,
},
},
methods: {
getYesterday() {
//昨天的时间
var today = new Date();
today.setDate(today.getDate() - 1);
var yesterday = today.format("yyyy-MM-dd");
return yesterday;
//return "<a href='order/index2.aspx?dd=" + yesterday+"' >"+ yesterday +"</a>"
},
getDefault() {
this.data_table.loading = true
axios
.post(HTTP_HOST + 'api/activity/GetActivityBoard', this.search)
.then(response => {
this.data_table.list = response.data.list
this.data_table.loading = false
})
.catch(error => console.log(error))
},
},
computed: {
},
filters: {
timeString: function (value, myFormat) {
return value == null || value == "" ? "" : moment(value).format(myFormat || 'YYYY-MM-DD, HH:mm:ss');
},
}
})
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div class="content_box" id="homeControl">
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
<asp:Panel ID="TestPanel" runat="server" CssClass="col-md-6" Visible="false">
<div class="panel panel-default form-horizontal information notice" role="form">
<div class="panel-heading"><strong>登入後Cookies資訊(開發人員使用)</strong></div>
<div class="panel-body">
<div class="col-md-12">
<ul class="list-unstyled news_list">
<asp:Literal ID="L_test" runat="server"></asp:Literal>
</ul>
</div>
</div>
</div>
</asp:Panel>
<asp:Panel ID="P_product" CssClass="col-md-6" runat="server" Visible="false">
<div class="panel panel-default form-horizontal information notice" role="form">
<div class="panel-heading"><strong>訂單管理公告</strong></div>
<div class="panel-body">
<div class="col-md-12">
<asp:Label ID="L_product" runat="server" />
</div>
</div>
</div>
</asp:Panel>
<asp:Panel ID="P_counter" CssClass="col-md-6" runat="server" Visible="false">
<div class="panel panel-default form-horizontal information notice" role="form">
<div class="panel-heading"><strong>會員統計</strong></div>
<div class="panel-body">
<div class="col-md-12">
<ul class="list-unstyled news_list">
<li>會員總數:<asp:Literal ID="L_counter3" runat="server" /></li>
<li>本日加入會員數:<asp:Literal ID="L_counter4" runat="server" /></li>
</ul>
</div>
</div>
</div>
</asp:Panel>
<asp:Panel ID="P_service" CssClass="col-md-6" runat="server" Visible="false">
<div class="panel panel-default form-horizontal information notice" role="form">
<div class="panel-heading"><strong>客服信箱公告</strong></div>
<div class="panel-body">
<div class="col-md-12">
<asp:Label ID="L_service" runat="server" />
</div>
</div>
</div>
</asp:Panel>
</div>
<div id="content" class="container-fluid">
<v-data-table
:items="data_table.list"
<%-- :search-props="search"--%>
item-key="num"
:options.sync="options"
:headers="data_table.header"
:loading="data_table.loading"
hide-default-footer
class="elevation-1">
<template #item.subject="{ item }" >
<a :href="'activity/reg.aspx?num='+item.num" class="link-secondary text-decoration-none" >{{item.subject }} ({{item.status }})</a>
<a :href="'order/index.aspx?act_id='+item.num" class="btn btn-primary btn-sm">報到</a>
</template>
<template #item.check_qty_yest="{ item }" >
<a :href="'order/index2.aspx?act_id='+item.num+'&act_sub='+item.subject" class="link-secondary text-decoration-none" >{{item.check_qty_yest }}</a>
</template>
<template #item.check_qty_today="{ item }" >
<a :href="'order/index2.aspx?act_id='+item.num+'&act_sub='+item.subject" class="link-secondary text-decoration-none" >{{item.check_qty_today }}</a>
</template>
<template #item.act_date="{ item }" >
<div v-if="item.startDate_solar !=null && item.startDate_solar !=''"><span class="badge bg-secondary">國曆</span> {{ item.startDate_solar|timeString('YYYY/MM/DD') }} ~ {{ item.endDate_solar|timeString('YYYY/MM/DD') }} </div>
<div v-if="item.startDate_lunar !=null && item.startDate_lunar !=''"><span class="badge bg-secondary">農曆</span> {{ item.startDate_lunar|timeString('YYYY/MM/DD') }} ~ {{ item.endDate_lunar|timeString('YYYY/MM/DD') }} </div>
</template>
</v-data-table>
</div>
</asp:Content>