modify
This commit is contained in:
+51
-251
@@ -4,87 +4,82 @@
|
||||
<script src="/js/httpVueLoader.js"></script>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="page_nav" Runat="Server">
|
||||
<div class="mb-2 mb-sm-0">
|
||||
<%-- <a @click.prevent="changeView({action:'add'})" class="btn btn-primary">
|
||||
<i class="mdi mdi-plus"></i>新增
|
||||
</a>--%>
|
||||
<%--<a @click="deleteAll" class="btn btn-outline-danger" title="刪除勾選的資料" ><i class="mdi mdi-trash-can"></i> 刪除勾選</a>--%>
|
||||
</div>
|
||||
<div class="">
|
||||
<%--<a @click="print_dialog.show=true" class="btn btn-outline-primary btn-print" target="_blank">
|
||||
<i class="mdi mdi-printer"></i>列印管理報表
|
||||
</a>
|
||||
<div :style="data_table.list.length === 0 ? 'pointer-events: none; opacity: 0.5;' : ''" style="display:inline-block;">
|
||||
<div class="dropdown d-inline-block">
|
||||
<a class="btn btn-outline-primary btn-print dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false"><i class="mdi mdi-printer"></i>列印查詢資料</a>
|
||||
<ul class="dropdown-menu ps-0 w-100" aria-labelledby="dropdownPrintLink">
|
||||
<li><a @click="search.hasPrice='Y';goPrint()" class="dropdown-item"><i class="mdi mdi-printer me-1"></i>有金額</a></li>
|
||||
<li><a @click="search.hasPrice='N';goPrint()" class="dropdown-item"><i class="mdi mdi-printer me-1"></i>無金額</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div :style="data_table.list.length === 0 ? 'pointer-events: none; opacity: 0.5;' : ''" style="display:inline-block;">
|
||||
<asp:LinkButton ID="excel" runat="server" CssClass="btn btn-outline-success" OnClick="excel_Click"><span class="fa-solid fa-file-excel"></span> 匯出查詢資料(Excel)</asp:LinkButton>
|
||||
</div>--%>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
|
||||
<div id="content" class="container-fluid py-4">
|
||||
<keep-alive>
|
||||
<component :is="currentView"
|
||||
@custom-event="changeView">
|
||||
<component :is="currentView" ref="myChild"
|
||||
@custom-event="changeView" :search="search">
|
||||
</component>
|
||||
</keep-alive>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="offCanvasRight" Runat="Server">
|
||||
<div id="search_panel" alt="查詢">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">信眾</label>
|
||||
<input type="text" v-model="search.f_name" class="form-control" placeholder="可輸入關鍵字查詢">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">活動</label>
|
||||
<input type="text" v-model="search.act_name" class="form-control" placeholder="可輸入關鍵字查詢">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">報名單號</label>
|
||||
<input type="text" v-model="search.order_no" class="form-control" placeholder="可輸入關鍵字查詢">
|
||||
</div>
|
||||
<div class="mb-3 p-2 border-top">
|
||||
<a @click.prevent="btn_search" class="btn btn-outline-primary"><i class="mdi mdi-filter"></i> 搜尋</a>
|
||||
<a class="btn btn-outline-secondary" @click.prevent="btn_all"><i class="mdi mdi-filter-remove"></i> 所有資料</a>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="footer_script" Runat="Server">
|
||||
<script>
|
||||
let VueApp = new Vue({
|
||||
el: '#app',
|
||||
vuetify: new Vuetify(),
|
||||
vuetify: new Vuetify(vuetify_options),
|
||||
data() {
|
||||
return {
|
||||
currentView: 'pre_order-component',
|
||||
options: { multiSort: false },
|
||||
search_options: { multiSort: false },
|
||||
//data_table: {
|
||||
// loading: true,
|
||||
// list: [],
|
||||
// selected: [],
|
||||
// singleSelect: false,
|
||||
// count: 0,
|
||||
// page: 1,
|
||||
// pageSize: 10,
|
||||
// header: [
|
||||
// { text: '信眾', value: 'f_num' },
|
||||
// { text: '報名單號', value: 'order_no' },
|
||||
// { text: '收據號碼', value: 'receipt_num' },
|
||||
// { text: '活動', value: 'act_num', align: 'start' },
|
||||
// { text: '功德項目數量', value: 'item_count' },
|
||||
// { text: '總金額', value: 'total_amt' },
|
||||
// { text: '登錄人員', value: 'admin_num' },
|
||||
// { text: '登錄時間', value: 'reg_time' },
|
||||
// { text: '', value: 'slot_btn', sortable: false, align: 'end' }
|
||||
// ],
|
||||
// footer: {
|
||||
// showFirstLastPage: true,
|
||||
// itemsPerPageOptions: [5, 10, 20, 30],
|
||||
// },
|
||||
//},
|
||||
search: {
|
||||
act_name: '',
|
||||
order_no: '',
|
||||
f_name:'',
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'pre_order-component': httpVueLoader('./pre_order.vue'),
|
||||
'pre_order_reg-component': httpVueLoader('./pre_order_reg.vue'),
|
||||
},
|
||||
//watch: {
|
||||
//},
|
||||
//mounted() {
|
||||
// // this.loadData();
|
||||
//},
|
||||
watch: {
|
||||
search_options: {
|
||||
handler() {
|
||||
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
search_show(curr) {
|
||||
this.search_dialog.current = curr;
|
||||
this.search_clear()
|
||||
this.search_dialog.show = true;
|
||||
},
|
||||
btn_search() {
|
||||
this.$refs.myChild.loadData();
|
||||
},
|
||||
btn_all() {
|
||||
this.search.act_name= ''
|
||||
this.search.order_no= ''
|
||||
this.search.f_name= ''
|
||||
|
||||
this.btn_search();
|
||||
},
|
||||
changeView(item) {
|
||||
if (item.action === "add") {
|
||||
this.currentView = "pre_order_reg-component";
|
||||
@@ -92,204 +87,9 @@
|
||||
this.currentView = "pre_order-component";
|
||||
}
|
||||
},
|
||||
//loadData(clearpage = false) {
|
||||
// const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||
// //page = this.data_table.page;
|
||||
// let search = {}
|
||||
// const params = {
|
||||
// sortBy: sortBy[0], sortDesc: sortDesc[0],
|
||||
// page: clearpage ? '1' : page, pageSize: itemsPerPage
|
||||
// };
|
||||
// this.data_table.loading = true
|
||||
// axios
|
||||
// .post(HTTP_HOST + 'api/preOrder/GetPreOrder', search, { params: params })
|
||||
// .then(response => {
|
||||
// console.log(response)
|
||||
// this.data_table.list = response.data.list
|
||||
// this.data_table.count = response.data.count;
|
||||
// this.data_table.loading = false
|
||||
|
||||
// const dataToStore = JSON.stringify(this.data_table);
|
||||
// //sessionStorage.setItem("order_list_cache", dataToStore);
|
||||
// })
|
||||
// .catch(error => console.log(error))
|
||||
// },
|
||||
},
|
||||
|
||||
//computed: {
|
||||
// pageCount() {
|
||||
// return Math.ceil(this.detail_table.count / this.detail_table.pageSize)
|
||||
// },
|
||||
//}
|
||||
})
|
||||
//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 {
|
||||
// options: { multiSort: false },
|
||||
// search_options: { multiSort: false },
|
||||
// data_table: {
|
||||
// loading: true,
|
||||
// list: [],
|
||||
// selected: [],
|
||||
// singleSelect: false,
|
||||
// count: 0,
|
||||
// page: 1,
|
||||
// pageSize: 10,
|
||||
// header: [
|
||||
// { text: '信眾', value: 'f_num' },
|
||||
// { text: '報名單號', value: 'order_no' },
|
||||
// { text: '收據號碼', value: 'receipt_num' },
|
||||
// { text: '活動', value: 'act_num', align: 'start' },
|
||||
// { text: '功德項目數量', value: 'item_count' },
|
||||
// { text: '總金額', value: 'total_amt' },
|
||||
// { text: '登錄人員', value: 'admin_num' },
|
||||
// { text: '登錄時間', value: 'reg_time' },
|
||||
// { text: '', value: 'slot_btn', sortable: false, align: 'end' }
|
||||
// ],
|
||||
// footer: {
|
||||
// showFirstLastPage: true,
|
||||
// itemsPerPageOptions: [5, 10, 20, 30],
|
||||
// },
|
||||
// },
|
||||
// search_dialog: {
|
||||
// controls: {
|
||||
// search1: {
|
||||
// id: 'search1',
|
||||
// title: '國籍',
|
||||
// text_prop: 'name_zh',
|
||||
// value_prop: 'id',
|
||||
// keys: [
|
||||
// { id: 'keyword', title: '關鍵字' },
|
||||
// ],
|
||||
// api_url: HTTP_HOST + 'api/country/GetList',
|
||||
// columns: [
|
||||
// { id: 'id', title: '代碼' },
|
||||
// { id: 'name_en', title: '英文短名稱' },
|
||||
// { id: 'name_zh', title: '中文名稱' },
|
||||
// ],
|
||||
// selected: {},
|
||||
// select(item, t) {
|
||||
// t.search.country = item.id;
|
||||
// t.search.country2 = '';
|
||||
// }
|
||||
// },
|
||||
// search2: {
|
||||
// id: 'search2',
|
||||
// title: '報名活動',
|
||||
// text_prop: 'subject',
|
||||
// value_prop: 'num',
|
||||
// keys: [
|
||||
// { id: 'subject', title: '活動名稱', value: '' },
|
||||
// { id: 'kindTxt', title: '活動分類' },
|
||||
// ],
|
||||
// api_url: HTTP_HOST + 'api/activity/GetList',
|
||||
// columns: [
|
||||
// { id: 'subject', title: '活動名稱' },
|
||||
// { id: 'kindTxt', title: '活動分類' },
|
||||
// ],
|
||||
// selected: {},
|
||||
// select(item, t) {
|
||||
// t.print_search.select_act = item.num;
|
||||
// }
|
||||
// },
|
||||
// search3: {
|
||||
// id: 'search3',
|
||||
// title: '活動品項',
|
||||
// text_prop: 'subject',
|
||||
// value_prop: 'num',
|
||||
// keys: [
|
||||
// { id: 'subject', title: '項目名稱', value: '' },
|
||||
// { id: 'kindTxt', title: '項目分類' },
|
||||
// { id: 'num', visible: false },
|
||||
// ],
|
||||
// api_url: HTTP_HOST + 'api/activity/GetOrderList',
|
||||
// columns: [
|
||||
// { id: 'subject', title: '項目名稱' },
|
||||
// { id: 'kindTxt', title: '項目分類' },
|
||||
// ],
|
||||
// selected: {},
|
||||
// select(item, t) {
|
||||
// t.print_search.select_actitem = item.num;
|
||||
// }
|
||||
// }
|
||||
|
||||
// }, show: false,
|
||||
// current: {},
|
||||
// list: [],
|
||||
// count: 0,
|
||||
// page: 1,
|
||||
// loading: false,
|
||||
// footer: {
|
||||
// showFirstLastPage: true,
|
||||
// disableItemsPerPage: true,
|
||||
// itemsPerPageAllText: '',
|
||||
// itemsPerPageText: '',
|
||||
// },
|
||||
// },
|
||||
// search: {
|
||||
// keyin1: '',
|
||||
// order_no: '',
|
||||
// subject: '',
|
||||
// u_name: '',
|
||||
// up_time1: '',
|
||||
// up_time2: '',
|
||||
// actItemTxt: '',
|
||||
// introducerTxt: '',
|
||||
// activity_num: '',
|
||||
// country: '',
|
||||
// country2: '',
|
||||
// hasPrice: '',
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// mounted() {
|
||||
// this.loadData()
|
||||
// },
|
||||
// methods: {
|
||||
// loadData(clearpage = false) {
|
||||
// const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||
// //page = this.data_table.page;
|
||||
// let search = {}
|
||||
// const params = {
|
||||
// sortBy: sortBy[0], sortDesc: sortDesc[0],
|
||||
// page: clearpage ? '1' : page, pageSize: itemsPerPage
|
||||
// };
|
||||
// this.data_table.loading = true
|
||||
// axios
|
||||
// .post(HTTP_HOST + 'api/preOrder/GetPreOrder', search, { params: params })
|
||||
// .then(response => {
|
||||
// console.log(response)
|
||||
// this.data_table.list = response.data.list
|
||||
// this.data_table.count = response.data.count;
|
||||
// this.data_table.loading = false
|
||||
|
||||
// const dataToStore = JSON.stringify(this.data_table);
|
||||
// //sessionStorage.setItem("order_list_cache", dataToStore);
|
||||
// })
|
||||
// .catch(error => console.log(error))
|
||||
// },
|
||||
// search_headers() {
|
||||
|
||||
// },
|
||||
// search_select() {
|
||||
|
||||
// }
|
||||
// },
|
||||
// watch: {
|
||||
|
||||
// },
|
||||
// computed: {
|
||||
// pageCount() {
|
||||
// return Math.ceil(this.data_table.count / this.data_table.pageSize)
|
||||
// },
|
||||
// }
|
||||
//});
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -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">×</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
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
|
||||
<v-text-field v-model="picker.search.name" :label="picker.search.text" @keyup.enter.prevent=""></v-text-field>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<v-data-table v-model="picker.data_table.selected"
|
||||
@@ -95,12 +99,12 @@
|
||||
</v-container>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn @click.prevent="picker.show=false">關閉</v-btn>
|
||||
<v-btn @click.prevent="picker_confirm()">確認</v-btn>
|
||||
</v-card-text>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</template>
|
||||
</v-dialog>
|
||||
@@ -162,7 +166,12 @@
|
||||
showFirstLastPage: true,
|
||||
itemsPerPageOptions: [5, 10, 20, 30],
|
||||
},
|
||||
}
|
||||
},
|
||||
search: {
|
||||
name: "",
|
||||
text: "法會名稱"
|
||||
},
|
||||
change: 0
|
||||
},
|
||||
snackbar: {
|
||||
show: false,
|
||||
@@ -171,11 +180,17 @@
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
handler() {
|
||||
"picker.target": {
|
||||
handler(newVal) {
|
||||
if (this.picker.target === "follower") {
|
||||
this.picker.search.name = ""
|
||||
this.picker.search.text = "信眾姓名"
|
||||
this.picker.change++
|
||||
this.getFollowers()
|
||||
} else if (this.picker.target === "act") {
|
||||
this.picker.search.name = ""
|
||||
this.picker.search.text = "法會名稱"
|
||||
this.picker.change++
|
||||
this.getActivity()
|
||||
}
|
||||
},
|
||||
@@ -212,7 +227,7 @@
|
||||
const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||
const params = {
|
||||
sortBy: "num", sortDesc: false,
|
||||
page: page, pageSize: itemsPerPage
|
||||
page: page??1, pageSize: itemsPerPage??10
|
||||
};
|
||||
this.picker.data_table.loading = true;
|
||||
let search = {}
|
||||
@@ -233,7 +248,7 @@
|
||||
const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||
const params = {
|
||||
sortBy: "num", sortDesc: false,
|
||||
page: page, pageSize: itemsPerPage
|
||||
page: page??1, pageSize: itemsPerPage??10
|
||||
};
|
||||
this.picker.data_table.loading = true;
|
||||
let search = {}
|
||||
|
||||
+32
-13
@@ -676,7 +676,16 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
checkPreOrder() {
|
||||
axios
|
||||
.post(HTTP_HOST + 'api/preOrder/CheckPreVsOrder', {order_no:this.order_no})
|
||||
.then(response => {
|
||||
console.log(response)
|
||||
let resp = response.data;
|
||||
this.snackbar.text = resp.message;
|
||||
this.snackbar.show = true;
|
||||
})
|
||||
},
|
||||
getPreOrder() {
|
||||
let search = { order_no: this.order_no }
|
||||
axios
|
||||
@@ -2076,19 +2085,29 @@
|
||||
</div>
|
||||
<div class="tab-pane fade label-sm-right" id="sec2-page2" role="tabpanel" aria-labelledby="sec2-tab2">
|
||||
|
||||
<div class="d-flex w-100">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 ">
|
||||
客堂登記功德項目數:{{ preOrder.item_count }}
|
||||
</div>
|
||||
<div class="col-12 col-md-6 ">
|
||||
客堂登記總金額:{{ preOrder.total_amt }}
|
||||
</div>
|
||||
<div class="col-12 col-md-6 "></div>
|
||||
<div class="col-12 col-md-6 "></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<v-card class="mx-auto" outlined v-if="order_no!=''">
|
||||
<v-card-title>
|
||||
|
||||
<%if (IsPreOrder == "true")
|
||||
{ %>
|
||||
<div class="container-lg" >
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-4 ">
|
||||
客堂登記功德項目數:{{ preOrder.item_count }}
|
||||
</div>
|
||||
<div class="col-12 col-md-4 ">
|
||||
客堂登記總金額:{{ preOrder.total_amt }}
|
||||
</div>
|
||||
<div class="col-12 col-md-4 ">
|
||||
<button class="btn btn-primary" title="檢查客堂登記與文書組登打差異" @click.prevent="checkPreOrder">檢查</button>
|
||||
</div>
|
||||
<%--<div class="col-12 col-md-6 "></div>--%>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
</v-card-title>
|
||||
<v-data-table
|
||||
:headers="headersDetail"
|
||||
:items="desserts"
|
||||
|
||||
@@ -20,11 +20,13 @@ public partial class admin_order_reg : MyWeb.config
|
||||
public string _org_from_id_cuz_data = "";
|
||||
public string _org_activity_cuz_data = "";
|
||||
public Dictionary<int, string> _keyin1Item = null;
|
||||
public string IsPreOrder="false";
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
IsPreOrder = ConfigurationManager.AppSettings["IsPreOrder"];
|
||||
Model.pro_order order = new Model.pro_order();
|
||||
ArrayList options = order.keyin1_list();
|
||||
foreach (Model.pro_order.keyin optionKey in options)
|
||||
|
||||
Reference in New Issue
Block a user