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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user