This commit is contained in:
2026-03-20 18:14:27 +08:00
parent 1b79aa9d14
commit c235a138ee
2 changed files with 669 additions and 1118 deletions

View File

@@ -3,41 +3,36 @@
<asp:Content ID="Content1" ContentPlaceHolderID="page_header" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="page_header" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="page_nav" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="page_nav" runat="Server">
<div class="mb-2 mb-sm-0">
<a href="reg.aspx" 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 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>
<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>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<uc1:alert runat="server" ID="L_msg" Text="" /> <uc1:alert runat="server" ID="L_msg" Text="" />
<keep-alive> <keep-alive>
<component <component
:is="currentView"> :is="currentView" :form-data="$data">
</component> </component>
</keep-alive> </keep-alive>
<template id="content" class="container-fluid">
<div>
<div id="print_data">
</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');
});
Vue.component('step-one', {
template: `
<div class="container-fluid">
<v-data-table <v-data-table
v-model="data_table.selected" v-model="data_table.selected"
:items="data_table.list" :items="data_table.list"
@@ -63,7 +58,7 @@
</template> </template>
<template #item.slot_btn="{ item }"> <template #item.slot_btn="{ item }">
<a :href="'reg.aspx?order_no='+item.order_no" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>修改</a> <a :href="'reg.aspx?order_no='+item.order_no" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>修改</a>
<asp:Button runat="server" Text="明細" CssClass="mdi mdi-pencil-box-outline" OnClientClick="return getDetail()" OnClick="detailButton_click" ID="detailButton" /> <a @click="$root.currentView='step-two';$root.selected_act=item.num" class="btn btn-outline-secondary btn-sm">明細</a>
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a> <a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
</template> </template>
</v-data-table> </v-data-table>
@@ -91,335 +86,14 @@
</v-col> </v-col>
</v-row> </v-row>
</v-container> </v-container>
</div>`,
<v-dialog v-model="check_dialog.show" max-width="400px">
<v-card>
<v-card-title class="justify-space-between grey lighten-2">
請填寫報到資訊
<v-btn icon @click="check_dialog.show=false;"><v-icon>mdi-close</v-icon></v-btn>
</v-card-title>
<v-card-text >
<v-row densee class="pt-3" >
<v-col :cols="3" class="pt-3" >
<span class="fs-6 text text-dark">姓名</span>
</v-col>
<v-col :cols="9" class="pt-3" >
<span class="fs-6 text text-dark">{{check_data.u_name}}</span>
</v-col>
<v-col :cols="3" class="pt-3" >
<span class="fs-6 text text-dark">活動</span>
</v-col>
<v-col :cols="9" class="pt-3" >
<span class="fs-6 text text-dark">{{check_data.activity_name}}</span>
</v-col>
<v-col :cols="3" class="pt-3" >
<span class="fs-6 text text-dark">報到人數</span>
</v-col>
<v-col :cols="9" >
<v-text-field v-model="check_data.qty" :hide-details="true" dense single-line :maxlength=5 ></v-text-field>
</v-col>
<v-col :cols="3" class="pt-3" >
<span class="fs-6 text text-dark">狀態 *</span>
</v-col>
<v-col :cols="9" >
<v-select @change=""
item-text="text"
item-value="val"
v-model="check_data.status.val"
:items="keyin1_items"
></v-select>
</v-col>
<v-col :cols="12" class="pt-3 text-center" >
<v-btn class="ma-2" color="primary" dark @click="checkIn()" ><v-icon dark left > mdi-check-bold </v-icon> 確定報到 </v-btn>
</v-col>
</v-row>
</v-card-text>
<v-card-actions>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="print_dialog.show" max-width="650px">
<v-card>
<v-card-title class="justify-space-between grey lighten-2">
活動報名日期管理報表​​
<v-btn icon @click="print_close"><v-icon>mdi-close</v-icon></v-btn>
</v-card-title>
<v-card-text >
<v-row densee class="pt-3" >
<v-col :cols="2" >
<span class="fs-6 text text-dark">查詢條件</span>
</v-col>
<v-col :cols="10" >
<select class="form-select" v-model="print_conditions" >
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </select>
</v-col>
<v-col :cols="2" class="pt-5" >
<span class="fs-6 text text-dark">年 *</span>
</v-col>
<v-col :cols="10" >
<v-text-field v-model.number="print_search.year" min="1911" type="number" placeholder="年份必填" />
</v-col>
<v-col :cols="2" class="pt-5" v-if="print_conditions=='mm' " >
<span class="fs-6 text text-dark">月</span>
</v-col>
<v-col :cols="10" v-if="print_conditions=='mm' ">
<v-select
item-text="text"
item-value="val"
v-model="print_search.month"
:items="select_items.month"
></v-select>
</v-col>
<v-col :cols="2" class="pt-5" v-if="print_conditions=='ss' ">
<span class="fs-6 text text-dark">季</span>
</v-col>
<v-col :cols="10" v-if="print_conditions=='ss' ">
<v-select
item-text="text"
item-value="val"
v-model="print_search.season"
:items="select_items.season"
></v-select>
</v-col>
</v-row>
<v-row densee class="pt-3" >
<v-col :cols="2" class="pt-5" >
<span class="fs-6 text text-dark">活動 *</span>
</v-col>
<v-col :cols="10" class="pt-5" >
活動/非活動至少勾選一項
<v-checkbox
v-model="print_search.chk_noact"
:label="`非活動報名`"
></v-checkbox>
<v-checkbox
v-model="print_search.chk_hasact"
:label="`活動報名`"
@change="chk_hasact_change"
></v-checkbox>
<%-- <v-row densee class="pt-3" >
<v-col :cols="10" class="pt-5" > --%>
<div class="input-group mb-3 single-line d-none" data-search-control="search2" @click="print_search.chk_hasact && search_show(search_dialog.controls.search2)" :disabled="!print_search.chk_hasact">
<input class="form-control search-text" type="text" readonly
id="activity_num_txt" placeholder="可選擇單一活動(需先勾選活動報名)" value="" >
<input type="hidden" v-model="print_search.select_act" >
<button class="btn btn-outline-secondary" type="button">
<i class="mdi mdi-view-list-outline"></i>
</button>
</div>
<select class="form-select" v-model="print_search.select_act" :disabled="print_search.chk_hasact==false" >
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </select>
<%-- </v-col>
<v-col :cols="2" class="pt-5" >
<button type="button" class="btn btn-outline-success" @click="clear_select_act">清除</button>
</v-col>
</v-row>--%>
</v-col>
<%--<v-col :cols="2" class="pt-5" >
<span class="fs-6 text text-dark">報名項目</span>
</v-col>
<v-col :cols="10" class="pt-5" >
<v-row densee class="pt-3" >
<v-col :cols="10" class="pt-5" >
<div class="input-group mb-3 " data-search-control="search3" @click=" search_show(search_dialog.controls.search3)" >
<input class="form-control search-text" type="text" readonly
id="actItem_num_txt" value="" placeholder="請選擇報名項目" >
<input type="hidden" v-model="print_search.select_actitem" >
<button class="btn btn-outline-secondary" type="button">
<i class="mdi mdi-view-list-outline"></i>
</button>
</div>
</v-col>
<v-col :cols="2" class="pt-5" >
<button type="button" class="btn btn-outline-success" @click="clear_select_actitem">清除</button>
</v-col>
</v-row>
</v-col>--%>
</v-row>
<v-row densee class="pt-3" >
<v-col :cols="12" class="pt-3 text-center" >
<v-btn class="ma-2" color="primary" dark @click="goPrint2" > 列印 </v-btn>
<v-btn class="ma-2" color="green" dark @click="print_close" > 取消 </v-btn>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-dialog>
<v-dialog v-model="search_dialog.show" max-width="500px">
<v-card>
<v-card-title class="justify-space-between grey lighten-2">
查詢:{{search_dialog.current.title}}
<v-btn icon @click="search_dialog.show=false"><v-icon>mdi-close</v-icon></v-btn>
</v-card-title>
<v-card-text >
<v-row>
<v-col v-for="item in search_dialog.current.keys"
:cols="search_dialog.current.keys.length>1?6:12" >
<v-text-field v-model="item.value" :label="item.title" v-if="item.visible===undefined || item.visible==true "></v-text-field>
</v-col>
<v-col cols="12" class="text-end">
<v-btn color="primary" elevation="0" @click="search_get()">查詢</v-btn>
<v-btn elevation="0" @click="search_clear()">清除條件</v-btn>
</v-col>
</v-row>
<v-data-table
:headers="search_headers()"
:items="search_dialog.list"
:footer-props="search_dialog.footer"
:items-per-page="10"
:server-items-length="search_dialog.count"
:page.sync="search_dialog.page"
:options.sync="search_options"
@click:row="search_select"
></v-data-table>
</v-card-text>
<v-card-actions>
</v-card-actions>
</v-card>
</v-dialog>
</div>
</template>
<template id="detailContent" class="container-fluid">
<div>QOO</div>
</template>
<div id="print_data">
</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.subject" class="form-control" placeholder="可輸入關鍵字查詢" id="s_subject" runat="server">
</div>
<div class="mb-3">
<label class="form-label">姓名/名稱</label>
<input type="text" v-model="search.u_name" class="form-control" placeholder="可輸入關鍵字查詢" id="s_u_name" runat="server">
</div>
<div class="mb-3">
<label class="form-label">國籍</label>
<div class="input-group mb-3 d-none" data-search-control="search1" @click="search_show(search_dialog.controls.search1)">
<input class="form-control search-text" type="text" readonly
placeholder="請選擇國籍" value="" id="country_txt">
<input type="hidden" v-model="search.country" >
<button class="btn btn-outline-secondary" type="button">
<i class="mdi mdi-view-list-outline"></i>
</button>
</div>
<asp:DropDownList ID="s_country" runat="server" CssClass="form-select" v-model="search.country" >
<asp:ListItem Value="" Text="請選擇"></asp:ListItem>
</asp:DropDownList>
<select class="form-select" v-model="search.country2" @change="countryChange">
<option value="">請選擇</option>
<option value="0">全部</option>
<option value="1">台灣</option>
<option value="2">境外(非台灣)</option>
</select>
</div>
<div class="mb-3">
<label class="form-label">介紹人</label>
<input type="text" v-model="search.introducerTxt" class="form-control" placeholder="可輸入關鍵字查詢" id="s_introducerTxt" runat="server">
</div>
<div class="mb-3">
<label class="form-label">單號</label>
<input type="text" v-model="search.order_no" class="form-control" placeholder="可輸入關鍵字查詢" id="s_order_no" runat="server">
</div>
<div class="mb-3">
<label class="form-label">品項</label>
<input type="text" v-model="search.actItemTxt" class="form-control" placeholder="可輸入關鍵字查詢" id="s_actItemTxt" runat="server">
</div>
<div class="mb-3">
<label class="form-label">單據狀態</label>
<asp:DropDownList ID="s_keyin1" runat="server" CssClass="form-select" v-model="search.keyin1" >
</asp:DropDownList>
</div>
<div class="mb-3">
<label class="form-label">報名日期</label>
<div class="input-group">
<input type="date" v-model="search.up_time1" class="form-control" autocomplete="off" id="s_up_time1" runat="server">
<span class="input-group-text">~</span>
<input type="date" v-model="search.up_time2" class="form-control" autocomplete="off" id="s_up_time2" runat="server">
</div>
</div>
<div class="mb-3 p-2 border-top">
<a @click="btn_search" class="btn btn-outline-primary"><i class="mdi mdi-filter"></i> 搜尋</a>
<a class="btn btn-outline-secondary" @click="btn_all"><i class="mdi mdi-filter-remove"></i> 所有資料</a>
</div>
</div>
</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');
});
const StepOne = {
template: '#content',
props: ['formData'], props: ['formData'],
data() { data() {
return { return {
currentView: 'step-one',
this_act: '<%= Request["act_id"]%>', this_act: '<%= Request["act_id"]%>',
options: { multiSort: false }, options: { multiSort: false },
search_options: { multiSort: false }, search_options: { multiSort: false },
detail_table: {
loading: true,
list: [],
selected: [],
singleSelect: false,
count: 0,
page: 1,
pageSize: 10,
header: [
{ text: '單號', value: 'order_no' },
{ text: '姓名', value: 'u_name' },
{ text: '報名日期', value: 'up_time' },
{ text: '報名活動', value: 'subject', align: 'start' },
{ text: '單據狀態', value: 'keyin1_txt' },
{ text: '', value: 'slot_btn', sortable: false, align: 'end' }
],
footer: {
showFirstLastPage: true,
itemsPerPageOptions: [5, 10, 20, 30],
},
},
data_table: { data_table: {
loading: true, loading: true,
list: [], list: [],
@@ -578,214 +252,15 @@
//val: 0 //val: 0
//}, //},
], ],
} };
},
}
const StepTwo = {
template: '#detailContent',
props:['formData']
}
let VueApp = new Vue({
el: '#app',
components: {
'step-one': StepOne,
'step-two': StepTwo,
},
vuetify: new Vuetify(vuetify_options),
data() {
return {
currentView:'step-one',
this_act: '<%= Request["act_id"]%>',
options: { multiSort: false },
search_options: { multiSort: false },
detail_table: {
loading: true,
list: [],
selected: [],
singleSelect: false,
count: 0,
page: 1,
pageSize: 10,
header: [
{ text: '單號', value: 'order_no' },
{ text: '姓名', value: 'u_name' },
{ text: '報名日期', value: 'up_time' },
{ text: '報名活動', value: 'subject', align: 'start' },
{ text: '單據狀態', value: 'keyin1_txt' },
{ text: '', value: 'slot_btn', sortable: false, align: 'end' }
],
footer: {
showFirstLastPage: true,
itemsPerPageOptions: [5, 10, 20, 30],
},
},
data_table: {
loading: true,
list: [],
selected: [],
singleSelect: false,
count: 0,
page: 1,
pageSize: 10,
header: [
{ text: '活動分類', value: 'kindsTxt' },
{ text: '活動名稱', value: 'subject' },
{ text: '開始日期', value: 'startDate_solar' },
{ text: '結束日期', value: 'endDate_solar', align: 'start' },
{ text: '報名人數', value: 'orderCounts' },
{ text: '', value: 'slot_btn', sortable: false, align: 'end' }
],
footer: {
showFirstLastPage: true,
itemsPerPageOptions: [5, 10, 20, 30],
},
},
//列印管理報表
print_conditions: 'yy',
print_search: {
year: '',
month: '',
season: '',
chk_hasact: false,
chk_noact: false,
select_act: '',
select_actitem: '',
},
select_act_list: [],
select_items: {
month: [{
text: "請選擇",
val: 0
},],
season: [{
text: "請選擇",
val: 0
},],
},
print_dialog: {
show: false,
},
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) {
//console.log("select search1", 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: '',
}
//報到
, check_dialog: {
show: false,
},
check_data: {
f_num: 0,
u_name: '',
activity_num: 0,
activity_name: '',
qty: 1,
status: {
text: '',
val: 1
},
},
keyin1_items: [//狀態
//{
//text: "請選擇",
//val: 0
//},
],
}
}, },
mounted() { mounted() {
this.detalKeyinArray(); this.detalKeyinArray();
this.search_dialog.current = this.search_dialog.controls.search1 ///default this.search_dialog.current = this.search_dialog.controls.search1 ///default
if (this.this_act != '') if (this.this_act != '')
this.search.activity_num = this.this_act; this.search.activity_num = this.this_act;
this.initPrintSearch(); //this.initPrintSearch();
this.initActivity(); //this.initActivity();
const navEntries = performance.getEntriesByType("navigation"); const navEntries = performance.getEntriesByType("navigation");
const isReload = navEntries.length > 0 && navEntries[0].type === "reload"; const isReload = navEntries.length > 0 && navEntries[0].type === "reload";
if (isReload) { if (isReload) {
@@ -1145,13 +620,89 @@
return Math.ceil(this.data_table.count / this.data_table.pageSize) return Math.ceil(this.data_table.count / this.data_table.pageSize)
}, },
} }
})
document.getElementById("<%= s_country.ClientID %>").addEventListener("click", function () {
$('#country2').val('');
VueApp.search.country2 = '';
}); });
Vue.component('step-two', {
template: `
<div class="container-fluid">QOO</div>
`,
props: ['oneData'],
activated() {
console.log("yes ,go go");
this.getDetail();
},
data() {
return {
options: { multiSort: false },
search_options: { multiSort: false },
detail_table: {
loading: true,
list: [],
selected: [],
singleSelect: false,
count: 0,
page: 1,
pageSize: 10,
header: [
{ text: '單號', value: 'order_no' },
{ text: '姓名', value: 'u_name' },
{ text: '報名日期', value: 'up_time' },
{ text: '單據狀態', value: 'keyin1_txt', align: 'start' },
{ text: '', value: 'slot_btn', sortable: false, align: 'end' }
],
footer: {
showFirstLastPage: true,
itemsPerPageOptions: [5, 10, 20, 30],
},
}
};
},
watch: {
options: {
handler() {
this.getDetail()
},
deep: true,
},
},
methods: {
getDetail() {
const { sortBy, sortDesc, page, itemsPerPage } = this.options
const params = {
sortBy: sortBy[0], sortDesc: sortDesc[0],
page: clearpage ? '1' : page, pageSize: itemsPerPage,
activity_num: $root.selected_act
};
this.detail_table.loading = true
sessionStorage.setItem('orderpage', clearpage ? '1' : page);
axios
.post(HTTP_HOST + 'api/order/GetList', this.search, { params: params })
.then(response => {
this.detail_table.list = response.data.list
this.detail_table.count = response.data.count;
this.detail_table.loading = false
})
.catch(error => console.log(error))
},
}
});
let VueApp = new Vue({
el: '#app',
vuetify: new Vuetify(),
data() {
return {
currentView: 'step-one',
selected_act:'',
};
}
});
</script> </script>
</asp:Content> </asp:Content>

View File

@@ -26,7 +26,7 @@ public partial class admin_order_index3 : MyWeb.config
{ {
ListItem item = new ListItem(optionKey.Text, optionKey.Value); ListItem item = new ListItem(optionKey.Text, optionKey.Value);
item.Attributes.Add("style", "color:" + optionKey.Color); item.Attributes.Add("style", "color:" + optionKey.Color);
s_keyin1.Items.Add(item); //s_keyin1.Items.Add(item);
} }
_keyin1Item = publicFun.enum_desc<Model.activity_check.keyin1>(); //狀態 _keyin1Item = publicFun.enum_desc<Model.activity_check.keyin1>(); //狀態
@@ -41,227 +41,227 @@ public partial class admin_order_index3 : MyWeb.config
public void BuildKind() public void BuildKind()
{ {
//國籍 //國籍
s_country.Items.Clear(); //s_country.Items.Clear();
s_country.Items.Add(new ListItem("請選擇", "")); //s_country.Items.Add(new ListItem("請選擇", ""));
var qry = _db.countries.OrderBy(x => x.range).ThenBy(x => x.name_en).ToList(); var qry = _db.countries.OrderBy(x => x.range).ThenBy(x => x.name_en).ToList();
if (qry.Count > 0) if (qry.Count > 0)
{ {
foreach (var x in qry) //foreach (var x in qry)
s_country.Items.Add(new ListItem(x.name_zh, x.ID)); //s_country.Items.Add(new ListItem(x.name_zh, x.ID));
} }
} }
protected void excel_Click(object sender, EventArgs e) protected void excel_Click(object sender, EventArgs e)
{ {
var memoryStream = new MemoryStream(); //var memoryStream = new MemoryStream();
using (var doc = SpreadsheetDocument.Create(memoryStream, SpreadsheetDocumentType.Workbook)) //using (var doc = SpreadsheetDocument.Create(memoryStream, SpreadsheetDocumentType.Workbook))
{ //{
var wb = doc.AddWorkbookPart(); // var wb = doc.AddWorkbookPart();
wb.Workbook = new Workbook(); // wb.Workbook = new Workbook();
var sheets = wb.Workbook.AppendChild(new Sheets()); // var sheets = wb.Workbook.AppendChild(new Sheets());
//建立第一個頁籤 // //建立第一個頁籤
var ws = wb.AddNewPart<WorksheetPart>(); // var ws = wb.AddNewPart<WorksheetPart>();
ws.Worksheet = new Worksheet(); // ws.Worksheet = new Worksheet();
sheets.Append(new Sheet() // sheets.Append(new Sheet()
{ // {
Id = wb.GetIdOfPart(ws), // Id = wb.GetIdOfPart(ws),
SheetId = 1, // SheetId = 1,
Name = "報名" // Name = "報名"
}); // });
//設定欄寬 // //設定欄寬
var cu = new Columns(); // var cu = new Columns();
cu.Append( // cu.Append(
new Column { Min = 1, Max = 1, Width = 15, CustomWidth = true }, // new Column { Min = 1, Max = 1, Width = 15, CustomWidth = true },
new Column { Min = 2, Max = 4, Width = 10, CustomWidth = true }, // new Column { Min = 2, Max = 4, Width = 10, CustomWidth = true },
new Column { Min = 5, Max = 5, Width = 15, CustomWidth = true }, // new Column { Min = 5, Max = 5, Width = 15, CustomWidth = true },
new Column { Min = 6, Max = 8, Width = 25, CustomWidth = true }, // new Column { Min = 6, Max = 8, Width = 25, CustomWidth = true },
new Column { Min = 9, Max = 9, Width = 15, CustomWidth = true }, // new Column { Min = 9, Max = 9, Width = 15, CustomWidth = true },
new Column { Min = 10, Max = 10, Width = 10, CustomWidth = true }, // new Column { Min = 10, Max = 10, Width = 10, CustomWidth = true },
new Column { Min = 11, Max = 11, Width = 25, CustomWidth = true }, // new Column { Min = 11, Max = 11, Width = 25, CustomWidth = true },
new Column { Min = 12, Max = 16, Width = 10, CustomWidth = true }, // new Column { Min = 12, Max = 16, Width = 10, CustomWidth = true },
new Column { Min = 17, Max = 20, Width = 10, CustomWidth = true } // new Column { Min = 17, Max = 20, Width = 10, CustomWidth = true }
); // );
ws.Worksheet.Append(cu); // ws.Worksheet.Append(cu);
//建立資料頁 // //建立資料頁
var sd = new SheetData(); // var sd = new SheetData();
ws.Worksheet.AppendChild(sd); // ws.Worksheet.AppendChild(sd);
//第一列資料 // //第一列資料
var tr = new Row(); // var tr = new Row();
tr.Append( // tr.Append(
new Cell() { CellValue = new CellValue("單號"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("單號"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("報名日期"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("報名日期"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("單據狀態"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("單據狀態"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("姓名/名稱"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("姓名/名稱"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("聯絡電話"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("聯絡電話"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("報名活動"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("報名活動"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("收件地址"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("收件地址"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("備註"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("備註"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("項目名稱"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("項目名稱"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("姓名"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("姓名"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("代表地址"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("代表地址"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("陽上/報恩者"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("陽上/報恩者"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("開始日期"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("開始日期"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("期滿日期"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("期滿日期"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("應續約日"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("應續約日"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("劃位狀態"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("劃位狀態"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("預設金額"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("預設金額"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("數量"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("數量"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("小計"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("小計"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("已收金額"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("已收金額"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("未收金額"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("未收金額"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("付款期限"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("付款期限"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("報名狀態"), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("報名狀態"), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("狀態備註"), DataType = CellValues.String } // new Cell() { CellValue = new CellValue("狀態備註"), DataType = CellValues.String }
); // );
sd.AppendChild(tr); // sd.AppendChild(tr);
//查詢要匯出的資料 // //查詢要匯出的資料
// ❌ 錯誤寫法: var aIDt = _db.actItems.Where(f => f.subject.Contains(s_actItemTxt.Value.Trim())).Select(f => f.num.ToString()); // // ❌ 錯誤寫法: var aIDt = _db.actItems.Where(f => f.subject.Contains(s_actItemTxt.Value.Trim())).Select(f => f.num.ToString());
// 改為整數陣列,避免後續查詢中使用 .ToString() // // 改為整數陣列,避免後續查詢中使用 .ToString()
var aIDt = _db.actItems.Where(f => f.subject.Contains(s_actItemTxt.Value.Trim())).Select(f => f.num).ToArray();//品項 // var aIDt = _db.actItems.Where(f => f.subject.Contains(s_actItemTxt.Value.Trim())).Select(f => f.num).ToArray();//品項
var qry = _db.pro_order.AsQueryable(); // var qry = _db.pro_order.AsQueryable();
if (!isStrNull(s_order_no.Value)) // if (!isStrNull(s_order_no.Value))
qry = qry.Where(o => o.order_no.Contains(s_order_no.Value.Trim())); // qry = qry.Where(o => o.order_no.Contains(s_order_no.Value.Trim()));
if (!isStrNull(s_u_name.Value)) // if (!isStrNull(s_u_name.Value))
qry = qry.Where(o => o.f_num.HasValue && o.follower.u_name.Contains(s_u_name.Value.Trim())); // qry = qry.Where(o => o.f_num.HasValue && o.follower.u_name.Contains(s_u_name.Value.Trim()));
if (!isStrNull(s_introducerTxt.Value)) // if (!isStrNull(s_introducerTxt.Value))
qry = qry.Where(o => o.f_num.HasValue && o.follower1.u_name.Contains(s_introducerTxt.Value.Trim())); // qry = qry.Where(o => o.f_num.HasValue && o.follower1.u_name.Contains(s_introducerTxt.Value.Trim()));
if (!isStrNull(s_subject.Value)) // if (!isStrNull(s_subject.Value))
qry = qry.Where(o => o.activity_num.HasValue && o.activity.subject.Contains(s_subject.Value.Trim())); // qry = qry.Where(o => o.activity_num.HasValue && o.activity.subject.Contains(s_subject.Value.Trim()));
if (!isStrNull(s_actItemTxt.Value)) // if (!isStrNull(s_actItemTxt.Value))
{ // {
// ❌ 錯誤寫法: qry = qry.Where(o => o.pro_order_detail.Where(f2 => f2.order_no == o.order_no && aIDt.ToArray().Contains(f2.actItem_num.ToString())).Count() > 0); // // ❌ 錯誤寫法: qry = qry.Where(o => o.pro_order_detail.Where(f2 => f2.order_no == o.order_no && aIDt.ToArray().Contains(f2.actItem_num.ToString())).Count() > 0);
// ✅ 實際比較:僅在 actItem_num 有值時才與整數陣列比對 // // ✅ 實際比較:僅在 actItem_num 有值時才與整數陣列比對
qry = qry.Where(o => o.pro_order_detail.Any(f2 => // qry = qry.Where(o => o.pro_order_detail.Any(f2 =>
f2.order_no == o.order_no && // f2.order_no == o.order_no &&
f2.actItem_num.HasValue && // f2.actItem_num.HasValue &&
aIDt.Contains(f2.actItem_num.Value))); // aIDt.Contains(f2.actItem_num.Value)));
} // }
if (!isStrNull(s_keyin1.SelectedValue)) // if (!isStrNull(s_keyin1.SelectedValue))
qry = qry.Where(o => o.keyin1 == s_keyin1.SelectedValue); // qry = qry.Where(o => o.keyin1 == s_keyin1.SelectedValue);
if (!isStrNull(s_up_time1.Value) && isDate(s_up_time1.Value)) // if (!isStrNull(s_up_time1.Value) && isDate(s_up_time1.Value))
qry = qry.Where(o => o.up_time >= ValDate(s_up_time1.Value)); // qry = qry.Where(o => o.up_time >= ValDate(s_up_time1.Value));
if (!isStrNull(s_up_time2.Value) && isDate(s_up_time2.Value)) // if (!isStrNull(s_up_time2.Value) && isDate(s_up_time2.Value))
qry = qry.Where(o => o.up_time < Convert.ToDateTime(s_up_time2.Value).AddDays(1)); // qry = qry.Where(o => o.up_time < Convert.ToDateTime(s_up_time2.Value).AddDays(1));
qry = qry.OrderByDescending(o => o.reg_time); // qry = qry.OrderByDescending(o => o.reg_time);
MyWeb.encrypt encrypt = new MyWeb.encrypt(); // MyWeb.encrypt encrypt = new MyWeb.encrypt();
var tdesc = publicFun.enum_desc<Model.pro_order.detailKeyin1>(); // var tdesc = publicFun.enum_desc<Model.pro_order.detailKeyin1>();
var bedDt = _db.bed_order_detail.AsQueryable();//掛單明細 // var bedDt = _db.bed_order_detail.AsQueryable();//掛單明細
//left join 使用 GroupJoin // //left join 使用 GroupJoin
//var list = qry.Join // //var list = qry.Join
var list = qry.GroupJoin( // var list = qry.GroupJoin(
_db.pro_order_detail, o => o.order_no, p => p.order_no, (o, c) => // _db.pro_order_detail, o => o.order_no, p => p.order_no, (o, c) =>
new // new
{ // {
//訂單資料 // //訂單資料
order_no = o.order_no, // order_no = o.order_no,
up_time = o.up_time, // up_time = o.up_time,
keyin1 = o.keyin1, // keyin1 = o.keyin1,
f_num = o.follower != null ? o.follower.u_name : "", //姓名/名稱 // f_num = o.follower != null ? o.follower.u_name : "", //姓名/名稱
phone = o.phone, // phone = o.phone,
activity_num = o.activity_num.HasValue ? o.activity.subject : "", // activity_num = o.activity_num.HasValue ? o.activity.subject : "",
address = o.address, // address = o.address,
demo = o.demo, // demo = o.demo,
c // c
}).SelectMany(o => o.c.DefaultIfEmpty(), (o, d) => //SelectMany 展開 // }).SelectMany(o => o.c.DefaultIfEmpty(), (o, d) => //SelectMany 展開
new // new
{ // {
//訂單資料 // //訂單資料
order_no = o.order_no, // order_no = o.order_no,
up_time = o.up_time, // up_time = o.up_time,
keyin1 = o.keyin1, // keyin1 = o.keyin1,
f_num = o.f_num, //姓名/名稱 // f_num = o.f_num, //姓名/名稱
phone = o.phone, // phone = o.phone,
activity_num = o.activity_num, // activity_num = o.activity_num,
address = o.address, // address = o.address,
demo = o.demo, // demo = o.demo,
//訂單明細 // //訂單明細
//使用DefaultIfEmpty 因匿名型別無法輸出NULL(無法轉換成強型別)需特別注意Null的處理 // //使用DefaultIfEmpty 因匿名型別無法輸出NULL(無法轉換成強型別)需特別注意Null的處理
d_actItem_num = d == null ? "" : (d.actItem_num.HasValue ? d.actItem.subject : ""), //項目名稱 // d_actItem_num = d == null ? "" : (d.actItem_num.HasValue ? d.actItem.subject : ""), //項目名稱
d_category = d == null ? "" : (d.actItem_num.HasValue ? d.actItem.category.ToString() : ""), // d_category = d == null ? "" : (d.actItem_num.HasValue ? d.actItem.category.ToString() : ""),
d_f_num = d == null ? "" : (d.f_num.HasValue ? d.follower.u_name : ""), //姓名 // d_f_num = d == null ? "" : (d.f_num.HasValue ? d.follower.u_name : ""), //姓名
d_address = d == null ? "" : d.address, // d_address = d == null ? "" : d.address,
d_from_id = d == null ? "" : (d.from_id.HasValue ? d.follower1.u_name : ""), //陽上/報恩者 // d_from_id = d == null ? "" : (d.from_id.HasValue ? d.follower1.u_name : ""), //陽上/報恩者
d_start_date = d == null ? "" : (d.start_date.HasValue ? d.start_date.Value.ToString("yyyy/MM/dd") : ""), //開始日期 // d_start_date = d == null ? "" : (d.start_date.HasValue ? d.start_date.Value.ToString("yyyy/MM/dd") : ""), //開始日期
d_due_date = d == null ? "" : (d.due_date.HasValue ? d.due_date.Value.ToString("yyyy/MM/dd") : ""), //期滿日期 // d_due_date = d == null ? "" : (d.due_date.HasValue ? d.due_date.Value.ToString("yyyy/MM/dd") : ""), //期滿日期
d_extend_date = d == null ? "" : (d.extend_date.HasValue ? d.extend_date.Value.ToString("yyyy/MM/dd") : ""), //應續約日 // d_extend_date = d == null ? "" : (d.extend_date.HasValue ? d.extend_date.Value.ToString("yyyy/MM/dd") : ""), //應續約日
d_price = d == null ? "" : (d.price.HasValue ? d.price.Value.ToString() : "0"), //預設金額 // d_price = d == null ? "" : (d.price.HasValue ? d.price.Value.ToString() : "0"), //預設金額
d_qty = d == null ? "" : (d.qty.HasValue ? d.qty.Value.ToString() : "0"), //數量 // d_qty = d == null ? "" : (d.qty.HasValue ? d.qty.Value.ToString() : "0"), //數量
d_writeBedQty = d == null ? 0 : bedDt.Where(b => (b.bed_order.o_detail_id.Value == d.num) && b.checkIn_date.HasValue && b.bed_kind_detail_id.HasValue).Count(), //已劃數量 // d_writeBedQty = d == null ? 0 : bedDt.Where(b => (b.bed_order.o_detail_id.Value == d.num) && b.checkIn_date.HasValue && b.bed_kind_detail_id.HasValue).Count(), //已劃數量
d_notBedQty = d == null ? 0 : bedDt.Where(b => b.bed_order.o_detail_id.Value == d.num && (!b.checkIn_date.HasValue || !b.bed_kind_detail_id.HasValue)).Count(), //未劃數量 // d_notBedQty = d == null ? 0 : bedDt.Where(b => b.bed_order.o_detail_id.Value == d.num && (!b.checkIn_date.HasValue || !b.bed_kind_detail_id.HasValue)).Count(), //未劃數量
d_pay = d == null ? "" : (d.pay.HasValue ? d.pay.Value.ToString() : "0"), //已收金額 // d_pay = d == null ? "" : (d.pay.HasValue ? d.pay.Value.ToString() : "0"), //已收金額
d_pay_date = d == null ? "" : (d.pay_date.HasValue ? d.pay_date.Value.ToString("yyyy/MM/dd") : ""), //付款期限 // d_pay_date = d == null ? "" : (d.pay_date.HasValue ? d.pay_date.Value.ToString("yyyy/MM/dd") : ""), //付款期限
d_keyin1 = d == null ? "" : (d.keyin1.HasValue && d.keyin1.Value > 0 ? tdesc[d.keyin1 ?? 1] : ""), //報名狀態 // d_keyin1 = d == null ? "" : (d.keyin1.HasValue && d.keyin1.Value > 0 ? tdesc[d.keyin1 ?? 1] : ""), //報名狀態
d_demo = d == null ? "" : d.demo, //狀態備註 // d_demo = d == null ? "" : d.demo, //狀態備註
}).ToList(); // }).ToList();
if (list.Count > 0) // if (list.Count > 0)
{ // {
foreach (var item in list) // foreach (var item in list)
{ // {
//新增資料列 // //新增資料列
tr = new Row(); // tr = new Row();
tr.Append( // tr.Append(
new Cell() { CellValue = new CellValue(item.order_no), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.order_no), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.up_time.Value.ToString("yyyy/MM/dd")), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.up_time.Value.ToString("yyyy/MM/dd")), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(Model.pro_order.keyin1_value_to_text(item.keyin1)), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(Model.pro_order.keyin1_value_to_text(item.keyin1)), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.f_num), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.f_num), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(encrypt.DecryptAutoKey(item.phone)), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(encrypt.DecryptAutoKey(item.phone)), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.activity_num), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.activity_num), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.address), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.address), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.demo), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.demo), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.d_actItem_num), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.d_actItem_num), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.d_f_num), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.d_f_num), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.d_address), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.d_address), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.d_from_id), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.d_from_id), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.d_start_date), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.d_start_date), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.d_due_date), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.d_due_date), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.d_extend_date), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.d_extend_date), DataType = CellValues.String },
new Cell() { CellValue = new CellValue((Val(item.d_category) == (int)Model.activity.category.Order) ? (item.d_notBedQty + "/" + item.d_writeBedQty) : ""), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue((Val(item.d_category) == (int)Model.activity.category.Order) ? (item.d_notBedQty + "/" + item.d_writeBedQty) : ""), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("$" + ValMoney(item.d_price)), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("$" + ValMoney(item.d_price)), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.d_qty), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.d_qty), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("$" + ValMoney(ValFloat(item.d_price) * Val(item.d_qty))), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("$" + ValMoney(ValFloat(item.d_price) * Val(item.d_qty))), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("$" + ValMoney(item.d_pay)), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("$" + ValMoney(item.d_pay)), DataType = CellValues.String },
new Cell() { CellValue = new CellValue("$" + ValMoney(ValFloat(item.d_price) * Val(item.d_qty) - ValFloat(item.d_pay))), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue("$" + ValMoney(ValFloat(item.d_price) * Val(item.d_qty) - ValFloat(item.d_pay))), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.d_pay_date), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.d_pay_date), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.d_keyin1), DataType = CellValues.String }, // new Cell() { CellValue = new CellValue(item.d_keyin1), DataType = CellValues.String },
new Cell() { CellValue = new CellValue(item.d_demo), DataType = CellValues.String } // new Cell() { CellValue = new CellValue(item.d_demo), DataType = CellValues.String }
); // );
sd.AppendChild(tr); // sd.AppendChild(tr);
} // }
Model.admin_log admin_log = new Model.admin_log(); // Model.admin_log admin_log = new Model.admin_log();
admin_log.writeLog(admin.info.u_id, (int)Model.admin_log.Systems.Order, (int)Model.admin_log.Status.Excel, admin_log.LogViewBtn(list.Select(x => x.order_no).ToList())); // admin_log.writeLog(admin.info.u_id, (int)Model.admin_log.Systems.Order, (int)Model.admin_log.Status.Excel, admin_log.LogViewBtn(list.Select(x => x.order_no).ToList()));
} // }
} //}
HttpContext.Current.Response.Clear(); //HttpContext.Current.Response.Clear();
HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=報名.xlsx"); //HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=報名.xlsx");
HttpContext.Current.Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; //HttpContext.Current.Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
HttpContext.Current.Response.BinaryWrite(memoryStream.ToArray()); //HttpContext.Current.Response.BinaryWrite(memoryStream.ToArray());
HttpContext.Current.Response.End(); //HttpContext.Current.Response.End();
} }