批次報名 統計報表修正

This commit is contained in:
2026-06-03 16:36:52 +08:00
parent 8affaaf344
commit 08d8e27bc9
10 changed files with 449 additions and 56 deletions
+122 -1
View File
@@ -2,6 +2,11 @@
<%@ Register Src="~/admin/_uc/alert.ascx" TagPrefix="uc1" TagName="alert" %>
<asp:Content ID="Content1" ContentPlaceHolderID="page_header" runat="Server">
<style>
.v-dialog{
width:80% !important;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="page_nav" runat="Server">
<div class="mb-2 mb-sm-0">
@@ -53,7 +58,19 @@
search: {
kind: 0,
subject: '',
}
},
signData: {
subject: "",
up_time1: "",
up_time2: "",
deadline: "",
num:null
},
startmenu: false,
endmenu: false,
deadmenu: false,
copy_dialog: { show: false, show_confirm: false, message: "" },
message_dialog: { show: false, show_confirm: false, message: "" },
}
},
watch: {
@@ -84,6 +101,30 @@
editItem(item) {
console.log("edit", item);
},
copyItem(item) {
this.signData.num=item.num
this.copy_dialog.show = true
},
gotoCopy() {
if (this.signData.subject == "" || this.signData.up_time1 == "" || this.signData.up_time2 == "" || this.signData.deadline == "") {
this.message_dialog.show = true
this.message_dialog.message = "所有欄位都必須填寫"
return false;
}
axios
.post(HTTP_HOST + "api/activity/CopyActivity", this.signData)
.then(response => {
this.message_dialog.show = true
this.message_dialog.message = response.data.message
if (response.data.result === "Y") {
this.copy_dialog.show = false;
}
})
.catch(error => console.log(error))
},
deleteItem(item) {
if (confirm('是否確定刪除此筆資料?')) {
const index = this.data_table.list.indexOf(item)
@@ -166,6 +207,7 @@
</template>
<template #item.slot_btn="{ item }">
<a :href="'reg.aspx?num='+item.num" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>修改</a>
<a @click="copyItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>複製</a>
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
</template>
</v-data-table>
@@ -194,6 +236,85 @@
</v-row>
</v-container>
</div>
<v-dialog v-model="message_dialog.show" class="dialog_width">
<template>
<v-card>
<v-card-title>
{{ message_dialog.message }}
</v-card-title>
<v-card-text>
<v-btn @click.prevent="message_dialog.show=false" v-if="!message_dialog.show_confirm">關閉</v-btn>
</v-card-text>
</v-card>
</template>
</v-dialog>
<v-dialog v-model="copy_dialog.show" class="dialog_width">
<template>
<v-card>
<v-card-title>
<v-text-field v-model="signData.subject"
label="請輸入法會名稱"></v-text-field>
<v-menu v-model="startmenu"
:close-on-content-click="false"
:nudge-right="40"
transition="scale-transition"
offset-y
min-width="auto">
<template v-slot:activator="{ on, attrs }">
<v-text-field v-model="signData.up_time1"
label="開始日期"
prepend-icon="mdi-calendar"
readonly
v-bind="attrs"
v-on="on"></v-text-field>
</template>
<v-date-picker v-model="signData.up_time1"
@input="startmenu = false"></v-date-picker>
</v-menu>
<v-menu v-model="endmenu"
:close-on-content-click="false"
:nudge-right="40"
transition="scale-transition"
offset-y
min-width="auto">
<template v-slot:activator="{ on, attrs }">
<v-text-field v-model="signData.up_time2"
label="結束日期"
prepend-icon="mdi-calendar"
readonly
v-bind="attrs"
v-on="on"></v-text-field>
</template>
<v-date-picker v-model="signData.up_time2"
@input="endmenu = false"></v-date-picker>
</v-menu>
<v-menu v-model="deadmenu"
:close-on-content-click="false"
:nudge-right="40"
transition="scale-transition"
offset-y
min-width="auto">
<template v-slot:activator="{ on, attrs }">
<v-text-field v-model="signData.deadline"
label="報名截止日"
prepend-icon="mdi-calendar"
readonly
v-bind="attrs"
v-on="on"></v-text-field>
</template>
<v-date-picker v-model="signData.deadline"
@input="deadmenu = false"></v-date-picker>
</v-menu>
</v-card-title>
<v-card-text>
<v-btn @click.prevent="copy_dialog.show=false">關閉</v-btn>
<v-btn @click.prevent="gotoCopy()">確認</v-btn>
</v-card-text>
</v-card>
</template>
</v-dialog>
<div id="print_data">
</div>
</asp:Content>