快速報名
This commit is contained in:
@@ -137,6 +137,99 @@ public class FollowerController : ApiController
|
||||
var count = _db.followers.Count();
|
||||
return count;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/follower/GetFollower")]
|
||||
public IHttpActionResult GetFollower([FromBody] Model.ViewModel.follower q)
|
||||
{
|
||||
////var qry = _db.followers.Where(a => a.IsDel == false).AsQueryable();////不確定是否新增欄位? 先註解
|
||||
var qry = _db.followers.AsQueryable();
|
||||
|
||||
if (!string.IsNullOrEmpty(q.f_number))
|
||||
qry = qry.Where(o => o.f_number.Contains(q.f_number.Trim()));
|
||||
if (!string.IsNullOrEmpty(q.u_name))
|
||||
qry = qry.Where(o => o.u_name.Contains(q.u_name.Trim()));
|
||||
if (q.birthday.HasValue)
|
||||
qry = qry.Where(o => o.birthday >= q.birthday.Value);
|
||||
if (q.birthday2.HasValue)
|
||||
{
|
||||
var tmpBirthday2 = Convert.ToDateTime(q.birthday2.Value).AddDays(1);
|
||||
qry = qry.Where(o => o.birthday < tmpBirthday2);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(q.address))
|
||||
qry = qry.Where(o => o.address != null && o.address.Contains(q.address.Trim()));
|
||||
//if (q.num.HasValue && q.num.Value>0)
|
||||
// qry = qry.Where(o => o.num==q.num.Value);
|
||||
if (q.ept_self.HasValue && q.ept_self.Value)//排除自己
|
||||
{
|
||||
qry = qry.Where(o => o.num != q.num.Value);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(q.country))
|
||||
qry = qry.Where(o => o.country == q.country);
|
||||
if (!string.IsNullOrEmpty(q.country2))
|
||||
{
|
||||
if (q.country2 == "1")
|
||||
{
|
||||
qry = qry.Where(o => o.country == "158");
|
||||
}
|
||||
else if (q.country2 == "2")
|
||||
{
|
||||
qry = qry.Where(o => o.country != "158");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 電話/證號搜尋 (使用 search_keywords HEX 編碼)
|
||||
if (!string.IsNullOrEmpty(q.phone_idcode) && GlobalVariables.UseSearchKeywords)
|
||||
{
|
||||
MyWeb.encrypt enc = new MyWeb.encrypt();
|
||||
string hexSearch = enc.ConvertToHex(q.phone_idcode.Trim());
|
||||
if (!string.IsNullOrEmpty(hexSearch))
|
||||
{
|
||||
qry = qry.Where(o => o.search_keywords != null && o.search_keywords.Contains(hexSearch));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MyWeb.encrypt encrypt = new MyWeb.encrypt();
|
||||
|
||||
var tdesc = publicFun.enum_desc<Model.follower.type>();
|
||||
var ret = new
|
||||
{
|
||||
list = qry.AsEnumerable().Select(x => new
|
||||
{
|
||||
num = x.num,
|
||||
f_number = x.f_number,
|
||||
u_name = x.u_name,
|
||||
sex = x.sex,
|
||||
birthday = x.birthday, //?.ToString("yyyy/MM/dd"),
|
||||
birthday2 = publicFun.chagenDate(x.birthday), //?.ToString("yyyy/MM/dd"),
|
||||
sign = Model.follower.chagenSign(x.birthday), //NULL??
|
||||
sexagenary = Model.follower.sexagenary(x.birthday),
|
||||
identity_type = x.identity_type,
|
||||
identity_type_desc = tdesc[x.identity_type ?? 1],//TryGetValue..
|
||||
id_code=x.id_code,
|
||||
id_codeDes=encrypt.DecryptAutoKey(x.id_code),
|
||||
passport=x.passport,
|
||||
passportDes=encrypt.DecryptAutoKey(x.passport),
|
||||
phone = x.phone,
|
||||
phoneDes = encrypt.DecryptAutoKey(x.phone), //--MyWeb.function X
|
||||
refugedate = x.refugedate,
|
||||
refuge_name = x.refuge_name,
|
||||
email = x.email,
|
||||
address = x.address,
|
||||
cellphone = x.cellphone,
|
||||
cellphoneDes = encrypt.DecryptAutoKey(x.cellphone),
|
||||
|
||||
}).FirstOrDefault()
|
||||
};
|
||||
|
||||
|
||||
if (ret.list == null) throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||
return Ok(ret);
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/follower/GetList")]
|
||||
public IHttpActionResult GetList([FromBody] Model.ViewModel.follower q,
|
||||
|
||||
@@ -162,30 +162,19 @@
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a @click="balance_query()" class="list-group-item list-group-item-action">
|
||||
<%-- <a @click="balance_query()" class="list-group-item list-group-item-action">
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<div class="d-flex">
|
||||
<i class="bi bi-file-spreadsheet text-secondary me-3 function-icon"></i>
|
||||
<div>
|
||||
<div>應收應付(依活動)</div>
|
||||
<div>帳務查詢</div>
|
||||
<small class="text-muted"></small>
|
||||
</div>
|
||||
</div>
|
||||
<span class="badge bg-secondary">會計</span>
|
||||
</div>
|
||||
</a>
|
||||
<a @click="balance_query()" class="list-group-item list-group-item-action">
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<div class="d-flex">
|
||||
<i class="bi bi-file-spreadsheet text-secondary me-3 function-icon"></i>
|
||||
<div>
|
||||
<div>應收應付(依信眾)</div>
|
||||
<small class="text-muted"></small>
|
||||
</div>
|
||||
</div>
|
||||
<span class="badge bg-secondary">會計</span>
|
||||
</div>
|
||||
</a>
|
||||
</a>--%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,382 @@
|
||||
<template>
|
||||
<v-container>
|
||||
<v-card>
|
||||
<v-card-title class="bg-primary white--text text-center">
|
||||
<h5 class="mb-0">帳務查詢</h5>
|
||||
<button class="btn btn-default ms-auto"><i class="mdi mdi-close"></i></button>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-row class="mb-0 mt-4">
|
||||
<v-col cols="12" md="2">
|
||||
<v-text-field v-model="query.start_date" label="起始日" type="date" dense outlined></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="2">
|
||||
<v-text-field v-model="query.end_date" label="結束日" type="date" dense outlined></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="3">
|
||||
<v-text-field v-model="query.activity_name" label="法會" dense outlined readonly>
|
||||
<template v-slot:append>
|
||||
<v-btn icon @click="showActivityDialog"><v-icon>mdi-magnify</v-icon></v-btn>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="3">
|
||||
<v-text-field v-model="query.follower_name" label="信眾" dense outlined readonly>
|
||||
<template v-slot:append>
|
||||
<v-btn icon @click="showFollowerDialog"><v-icon>mdi-magnify</v-icon></v-btn>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="2" class="d-flex justify-end">
|
||||
<v-btn color="primary" class="mr-2" @click="search">查詢</v-btn>
|
||||
<v-btn color="grey" @click="reset">重設</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-data-table :headers="headers"
|
||||
:items="items"
|
||||
:loading="loading"
|
||||
loading-text="載入中..."
|
||||
class="elevation-1 verify-query-table"
|
||||
item-key="transfer_id"
|
||||
:footer-props="{ 'items-per-page-options': [10, 20, 50] }"
|
||||
:expanded.sync="expanded"
|
||||
show-expand>
|
||||
<template v-slot:item.follower="{ item }">
|
||||
<div>
|
||||
<div class="font-weight-bold">{{ item.follower }}</div>
|
||||
<div class="caption text--secondary">{{ item.transfer_name }}</div>
|
||||
<div class="caption text--secondary">{{ item.transfer_phone }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:item.activity_info="{ item }">
|
||||
<div>
|
||||
<div class="font-weight-bold">{{ item.activity_name }}</div>
|
||||
<div class="caption text--secondary">{{ item.acc_name }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:item.transfer_info="{ item }">
|
||||
<div>
|
||||
<div class="font-weight-bold text-primary">應收總額:{{ item.price_totals | currency }}</div>
|
||||
<div class="font-weight-bold text-primary">入帳金額:{{ item.transfer_check_amount | currency }}</div>
|
||||
<div class="text-success">沖帳日期:{{ item.transfer_check_date | date }}</div>
|
||||
<div v-if="item.transfer_remain_amount > 0" class="text-warning">
|
||||
剩餘金額:{{ item.transfer_remain_amount | currency }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:item.status_info="{ item }">
|
||||
<div>
|
||||
<v-chip small :color="getStatusColor(item.transfer_check_status)" text-color="white">
|
||||
{{ getStatusText(item.transfer_check_status) }}
|
||||
</v-chip>
|
||||
<div class="caption text--secondary mt-1">{{ item.transfer_check_memo }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:item.actions="{ item }">
|
||||
<v-btn color="info" outlined small @click="showDetailDialog(item)">
|
||||
<v-icon small class="mr-1">mdi-information-outline</v-icon> 詳細
|
||||
</v-btn>
|
||||
</template>
|
||||
<template v-slot:expanded-item="{ headers, item }">
|
||||
<td :colspan="headers.length">
|
||||
<div class="pa-4">
|
||||
<h6 class="mb-3 text-primary">
|
||||
<v-icon color="primary" small class="mr-1">mdi-receipt</v-icon>
|
||||
沖帳明細
|
||||
</h6>
|
||||
<v-data-table :headers="detailHeaders"
|
||||
:items="item.pro_order_records"
|
||||
class="elevation-1"
|
||||
hide-default-footer
|
||||
:disable-pagination="true"
|
||||
dense>
|
||||
<template v-slot:item.order_info="{ item }">
|
||||
<div>
|
||||
<div class="font-weight-bold">{{ item.pro_order_detail?.pro_order?.order_no }}</div>
|
||||
<div class="caption text--secondary">{{ item.pro_order_detail?.actitem_name }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:item.payment_info="{ item }">
|
||||
<div>
|
||||
<div class="font-weight-bold">{{ item.payment_name }}</div>
|
||||
<div class="caption text--secondary">{{ item.bank_code }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:item.amount_info="{ item }">
|
||||
<div>
|
||||
<div class="font-weight-bold text-success">{{ item.price | currency }}</div>
|
||||
<div class="caption text--secondary">{{ item.pay_date | date }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:item.memo="{ item }">
|
||||
<div style="white-space: pre-line;">{{ item.reconcile_memo }}</div>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</div>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
<!-- 法會選取 Dialog -->
|
||||
<v-dialog v-model="activityDialog.show" max-width="700px">
|
||||
<v-card>
|
||||
<v-card-title class="grey lighten-2">
|
||||
<v-icon color="primary" class="mr-2">mdi-table</v-icon>
|
||||
選擇法會
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="activityDialog.show = false"><v-icon>mdi-close</v-icon></v-btn>
|
||||
</v-card-title>
|
||||
<v-card-text class="mt-4">
|
||||
<v-text-field v-model="activityDialog.search" label="搜尋法會" dense outlined @keyup.enter="searchActivity"></v-text-field>
|
||||
<v-data-table :headers="activityDialog.headers"
|
||||
:items="activityDialog.items"
|
||||
:loading="activityDialog.loading"
|
||||
item-key="num"
|
||||
class="elevation-1 mt-2"
|
||||
@click:row="selectActivity"
|
||||
hide-default-footer></v-data-table>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<!-- 信眾選取 Dialog -->
|
||||
<v-dialog v-model="followerDialog.show" max-width="700px">
|
||||
<v-card>
|
||||
<v-card-title class="grey lighten-2">
|
||||
<v-icon color="primary" class="mr-2">mdi-account</v-icon>
|
||||
選擇信眾
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="followerDialog.show = false"><v-icon>mdi-close</v-icon></v-btn>
|
||||
</v-card-title>
|
||||
<v-card-text class="mt-4">
|
||||
<v-text-field v-model="followerDialog.search" label="搜尋信眾" dense outlined @keyup.enter="searchFollower"></v-text-field>
|
||||
<v-data-table :headers="followerDialog.headers"
|
||||
:items="followerDialog.items"
|
||||
:loading="followerDialog.loading"
|
||||
item-key="num"
|
||||
class="elevation-1 mt-2"
|
||||
@click:row="selectFollower"
|
||||
hide-default-footer></v-data-table>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<!-- 詳細資訊對話框 -->
|
||||
<v-dialog v-model="dialog.show" max-width="900px">
|
||||
<v-card>
|
||||
<v-card-title class="grey lighten-2">
|
||||
<v-icon color="info" class="mr-2">mdi-information-outline</v-icon>
|
||||
詳細資訊
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="dialog.show = false">
|
||||
<v-icon>mdi-close</v-icon>
|
||||
</v-btn>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<div v-if="dialog.selected">
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<h6 class="mb-3 text-primary">匯款人資訊</h6>
|
||||
<div class="mb-2"><span class="font-weight-bold">姓名:</span>{{ dialog.selected.transfer_name }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">電話:</span>{{ dialog.selected.transfer_phone }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">信眾:</span>{{ dialog.selected.follower }}</div>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
<h6 class="mb-3 text-success">入帳資訊</h6>
|
||||
<div class="mb-2"><span class="font-weight-bold">入帳帳戶:</span>{{ dialog.selected.acc_name }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">入帳日期:</span>{{ dialog.selected.transfer_check_date | date }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">入帳金額:</span>{{ dialog.selected.transfer_check_amount | currency }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">應收總額:</span>{{ dialog.selected.price_totals | currency }}</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-divider class="my-4"></v-divider>
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<h6 class="mb-3 text-purple">活動資訊</h6>
|
||||
<div class="mb-2"><span class="font-weight-bold">活動名稱:</span>{{ dialog.selected.activity_name || '-' }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">支付方式:</span>{{ payTypeText[dialog.selected.transfer_pay_type] || dialog.selected.transfer_pay_type }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">帳號後5碼:</span>{{ dialog.selected.transfer_account_last5 || '-' }}</div>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
<h6 class="mb-3 text-info">核對記錄</h6>
|
||||
<div class="mb-2"><span class="font-weight-bold">核對記錄:</span>{{ dialog.selected.transfer_verify_note || '-' }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">帳簿備註:</span>{{ dialog.selected.transfer_check_memo || '-' }}</div>
|
||||
<div v-if="dialog.selected.transfer_proof_img" class="mb-2">
|
||||
<span class="font-weight-bold">證明圖片:</span>
|
||||
<a :href="'../../upload/transfer_proof/' + dialog.selected.transfer_proof_img" target="_blank">查看相片</a>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-container>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
expanded: [],
|
||||
query: {
|
||||
start_date: '',
|
||||
end_date: '',
|
||||
activity_num: '',
|
||||
activity_name: '',
|
||||
follower_num: '',
|
||||
follower_name: ''
|
||||
},
|
||||
headers: [
|
||||
{ text: '信眾/匯款人', value: 'follower' },
|
||||
{ text: '法會/入帳帳戶', value: 'activity_info' },
|
||||
{ text: '入帳資訊', value: 'transfer_info' },
|
||||
{ text: '狀態/備註', value: 'status_info' },
|
||||
{ text: '操作', value: 'actions', sortable: false }
|
||||
],
|
||||
detailHeaders: [
|
||||
{ text: '訂單/項目', value: 'order_info' },
|
||||
{ text: '付款機構', value: 'payment_info' },
|
||||
{ text: '沖帳金額/日期', value: 'amount_info' },
|
||||
{ text: '備註', value: 'memo' }
|
||||
],
|
||||
items: [],
|
||||
dialog: {
|
||||
show: false,
|
||||
selected: null
|
||||
},
|
||||
activityDialog: {
|
||||
show: false,
|
||||
search: '',
|
||||
loading: false,
|
||||
items: [],
|
||||
headers: [
|
||||
{ text: '編號', value: 'num' },
|
||||
{ text: '名稱', value: 'subject' }
|
||||
]
|
||||
},
|
||||
followerDialog: {
|
||||
show: false,
|
||||
search: '',
|
||||
loading: false,
|
||||
items: [],
|
||||
headers: [
|
||||
{ text: '編號', value: 'num' },
|
||||
{ text: '姓名', value: 'u_name' }
|
||||
]
|
||||
},
|
||||
payTypeText: {
|
||||
1: '現金',
|
||||
2: '匯款',
|
||||
3: '支票'
|
||||
}
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
currency(val) {
|
||||
if (!val) return '0';
|
||||
return Number(val).toLocaleString();
|
||||
},
|
||||
date(val) {
|
||||
if (!val) return '';
|
||||
const date = new Date(val);
|
||||
return date.toLocaleDateString();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
this.loading = true;
|
||||
// 串接查詢 API,帶入所有查詢條件
|
||||
axios.get('../../api/transfer_register/verify_order_record_query', { params: this.query })
|
||||
.then(res => {
|
||||
this.items = res.data;
|
||||
this.expanded = []; // 重置展開狀態
|
||||
})
|
||||
.catch(() => {
|
||||
this.items = [];
|
||||
this.expanded = [];
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
reset() {
|
||||
this.query.start_date = '';
|
||||
this.query.end_date = '';
|
||||
this.query.activity_num = '';
|
||||
this.query.activity_name = '';
|
||||
this.query.follower_num = '';
|
||||
this.query.follower_name = '';
|
||||
this.items = [];
|
||||
this.expanded = [];
|
||||
},
|
||||
showDetailDialog(item) {
|
||||
this.dialog.selected = item;
|
||||
this.dialog.show = true;
|
||||
},
|
||||
showActivityDialog() {
|
||||
this.activityDialog.show = true;
|
||||
this.searchActivity();
|
||||
},
|
||||
searchActivity() {
|
||||
this.activityDialog.loading = true;
|
||||
axios.get('../../api/activity', { params: { keyword: this.activityDialog.search } })
|
||||
.then(res => { this.activityDialog.items = res.data; })
|
||||
.catch(() => { this.activityDialog.items = []; })
|
||||
.finally(() => { this.activityDialog.loading = false; });
|
||||
},
|
||||
selectActivity(row) {
|
||||
this.query.activity_num = row.num;
|
||||
this.query.activity_name = row.subject;
|
||||
this.activityDialog.show = false;
|
||||
},
|
||||
showFollowerDialog() {
|
||||
this.followerDialog.show = true;
|
||||
this.searchFollower();
|
||||
},
|
||||
searchFollower() {
|
||||
this.followerDialog.loading = true;
|
||||
axios.post('../..../..../../api/follower/GetList', { u_name: this.followerDialog.search }, { params: { page: 1, pageSize: 10 } })
|
||||
.then(res => { this.followerDialog.items = res.data.list; })
|
||||
.catch(() => { this.followerDialog.items = []; })
|
||||
.finally(() => { this.followerDialog.loading = false; });
|
||||
},
|
||||
selectFollower(row) {
|
||||
this.query.follower_num = row.num;
|
||||
this.query.follower_name = row.u_name;
|
||||
this.followerDialog.show = false;
|
||||
},
|
||||
getStatusColor(status) {
|
||||
switch (status) {
|
||||
case '90': return 'warning';
|
||||
case '99': return 'success';
|
||||
default: return 'grey';
|
||||
}
|
||||
},
|
||||
getStatusText(status) {
|
||||
switch (status) {
|
||||
case '90': return '沖帳有剩餘';
|
||||
case '99': return '沖帳完成';
|
||||
default: return '未知狀態';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.v-data-table.verify-query-table .v-data-table__wrapper tbody tr {
|
||||
min-height: 90px !important;
|
||||
height: 90px !important;
|
||||
}
|
||||
|
||||
.v-data-table.verify-query-table .v-data-table__wrapper tbody td {
|
||||
min-height: 90px !important;
|
||||
height: 90px !important;
|
||||
vertical-align: middle !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,582 @@
|
||||
<template>
|
||||
<div class="container-fluid">
|
||||
<v-data-table v-model="data_table.selected"
|
||||
:items="data_table.list"
|
||||
:search-props="search"
|
||||
item-key="order_no"
|
||||
:options.sync="options"
|
||||
:headers="data_table.header"
|
||||
:footer-props="data_table.footer"
|
||||
:server-items-length="data_table.count"
|
||||
:loading="data_table.loading"
|
||||
:single-select="data_table.singleSelect"
|
||||
show-select
|
||||
hide-default-footer
|
||||
:page.sync="data_table.page"
|
||||
:items-per-page.sync="data_table.pageSize"
|
||||
class="elevation-1">
|
||||
<template #item.up_time="{ item }">
|
||||
{{ item.up_time|timeString('YYYY/MM/DD') }}
|
||||
</template>
|
||||
<template #item.u_name="{ item }">
|
||||
<a v-if="item.f_num != null && item.activity_num != null" @click="checkInMsg(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-account-check"></i>報到</a>
|
||||
{{ item.u_name }}
|
||||
</template>
|
||||
<template #item.slot_btn="{ item }">
|
||||
<a @click="gotoSignupList(item)" 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>
|
||||
</template>
|
||||
</v-data-table>
|
||||
<v-container>
|
||||
<v-row class="align-baseline" wrap>
|
||||
<v-col cols="12" md="9">
|
||||
<v-pagination v-model="data_table.page"
|
||||
:length="pageCount">
|
||||
</v-pagination>
|
||||
</v-col>
|
||||
<v-col class="text-truncate text-right" cols="12" md="2">
|
||||
共 {{ data_table.count }} 筆, 頁數:
|
||||
</v-col>
|
||||
<v-col cols="6" md="1">
|
||||
<v-text-field v-model="data_table.page"
|
||||
type="number"
|
||||
hide-details
|
||||
dense
|
||||
min="1"
|
||||
:max="pageCount"
|
||||
@input="data_table.page = parseInt($event, 10)"></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
module.exports = {
|
||||
props: ['formData'],
|
||||
data() {
|
||||
return {
|
||||
this_act:'',
|
||||
options: { multiSort: false },
|
||||
search_options: { multiSort: false },
|
||||
|
||||
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() {
|
||||
//this.detalKeyinArray();
|
||||
this.search_dialog.current = this.search_dialog.controls.search1 ///default
|
||||
if (this.this_act != '')
|
||||
this.search.activity_num = this.this_act;
|
||||
//this.initPrintSearch();
|
||||
//this.initActivity();
|
||||
const navEntries = performance.getEntriesByType("navigation");
|
||||
const isReload = navEntries.length > 0 && navEntries[0].type === "reload";
|
||||
if (isReload) {
|
||||
sessionStorage.removeItem("orderpage");
|
||||
}
|
||||
else {
|
||||
const savedPage = parseInt(sessionStorage.getItem('orderpage'));
|
||||
if (savedPage) {
|
||||
this.options.page = savedPage;
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
handler() {
|
||||
this.getDefault()
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
search_options: {
|
||||
handler() {
|
||||
this.search_get()
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
gotoSignupList(item) {
|
||||
this.$emit('custom-event', { action:'detail', item:item });
|
||||
},
|
||||
search_show(curr) {
|
||||
//console.log("btn_click:", curr, curr.api_url);
|
||||
this.search_dialog.current = curr;
|
||||
this.search_clear()
|
||||
//this.search_get()//清除完自動會重抓, 故取消
|
||||
this.search_dialog.show = true;
|
||||
},
|
||||
search_clear() {
|
||||
if (!this.search_dialog.current.keys) return;
|
||||
this.search_dialog.current.keys.forEach((t, i) => { t.value = '' })
|
||||
this.search_get()
|
||||
},
|
||||
search_get() {
|
||||
if (!this.search_dialog.current.keys) return;
|
||||
let api_url = this.search_dialog.current.api_url;
|
||||
let keys = this.search_dialog.current.keys;
|
||||
//const { page, itemsPerPage } = this.options
|
||||
//const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||
this.search_dialog.page = this.search_options.page ?? 1
|
||||
let params = { page: this.search_dialog.page, pageSize: 10 };//url params
|
||||
var search = {};//post body
|
||||
keys.forEach((t, i) => {
|
||||
search[t.id] = t.value;
|
||||
});
|
||||
//necessary parameter===
|
||||
if (this.search_dialog.current.id == 'search2') {
|
||||
params = { sortBy: 'startDate_solar', sortDesc: true, page: this.search_dialog.page, pageSize: 10 };//url params
|
||||
}
|
||||
|
||||
console.log("search_get", api_url, search, params, this.search_options);
|
||||
this.search_dialog.loading = true
|
||||
axios.post(api_url, search, { params: params })
|
||||
.then(response => {
|
||||
this.search_dialog.list = response.data.list
|
||||
this.search_dialog.count = response.data.count
|
||||
this.search_dialog.loading = false
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error)
|
||||
this.search_dialog.list = []
|
||||
this.search_dialog.count = 0
|
||||
this.search_dialog.loading = false
|
||||
this.snackbar.text = "錯誤:" + error
|
||||
this.snackbar.show = true
|
||||
})
|
||||
},
|
||||
search_headers() {
|
||||
if (!this.search_dialog.current.columns) return;
|
||||
r = [];
|
||||
this.search_dialog.current.columns.forEach((t, i) => {
|
||||
r.push({
|
||||
text: t.title,
|
||||
align: 'start',
|
||||
sortable: false,
|
||||
value: t.id,
|
||||
})
|
||||
})
|
||||
return r
|
||||
},
|
||||
search_select(row) {
|
||||
let curr = this.search_dialog.current;
|
||||
let target = $(`[data-search-control=${curr.id}]`);
|
||||
curr.selected = row;
|
||||
target.children("input.search-text").val(curr.selected[curr.text_prop])//text
|
||||
target.children("input:hidden").val(curr.selected[curr.value_prop])//value
|
||||
if (curr.select instanceof Function) {
|
||||
curr.select(row, this);
|
||||
}
|
||||
this.search_dialog.show = false;
|
||||
//console.log(row, row["u_name"], row["f_number"], curr.id, target);
|
||||
},
|
||||
getDetail(clearpage = false) {
|
||||
console.log("test");
|
||||
const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||
const params = {
|
||||
sortBy: sortBy[0], sortDesc: sortDesc[0],
|
||||
page: clearpage ? '1' : page, pageSize: itemsPerPage
|
||||
};
|
||||
this.detail_table.loading = true
|
||||
sessionStorage.setItem('orderpage', clearpage ? '1' : page);
|
||||
axios
|
||||
//.post(HTTP_HOST + 'api/order/GetList', this.search, { params: params })
|
||||
.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))
|
||||
},
|
||||
getDefault(clearpage = false) {
|
||||
const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||
const params = {
|
||||
sortBy: sortBy[0], sortDesc: sortDesc[0],
|
||||
page: clearpage ? '1' : page, pageSize: itemsPerPage
|
||||
};
|
||||
this.data_table.loading = true
|
||||
sessionStorage.setItem('orderpage', clearpage ? '1' : page);
|
||||
axios
|
||||
//.post(HTTP_HOST + 'api/order/GetList', this.search, { params: params })
|
||||
.post(HTTP_HOST + 'api/activity/GetList', this.search, { params: params })
|
||||
.then(response => {
|
||||
this.data_table.list = response.data.list
|
||||
this.data_table.count = response.data.count;
|
||||
this.data_table.loading = false
|
||||
})
|
||||
.catch(error => console.log(error))
|
||||
},
|
||||
editItem(item) {
|
||||
console.log("edit", item);
|
||||
},
|
||||
deleteItem(item) {
|
||||
if (confirm('是否確定刪除此筆資料?')) {
|
||||
const index = this.data_table.list.indexOf(item)
|
||||
if (index != -1) {
|
||||
axios
|
||||
.delete(HTTP_HOST + 'api/order/' + item.order_no)
|
||||
.then(response => {
|
||||
console.log("del", item);
|
||||
this.data_table.list.splice(index, 1);
|
||||
this.data_table.count = this.data_table.list.length
|
||||
})
|
||||
.catch(error => console.log(error))
|
||||
}
|
||||
}
|
||||
},
|
||||
deleteAll() {
|
||||
if (confirm('是否確定刪除已勾選的資料?')) {
|
||||
axios
|
||||
.delete(HTTP_HOST + 'api/order/DeleteAll/' + this.data_table.selected.map(x => x.order_no))
|
||||
.then(response => {
|
||||
//console.log("delAll");
|
||||
|
||||
//for (var i = 0; i < this.data_table.selected.length; i++) {
|
||||
// const index = this.data_table.list.indexOf(this.data_table.selected[i]);
|
||||
// this.data_table.list.splice(index, 1);
|
||||
//}
|
||||
//this.data_table.selected = [];
|
||||
//this.data_table.count = this.data_table.list.length
|
||||
location.reload();
|
||||
})
|
||||
.catch(error => console.log(error))
|
||||
}
|
||||
},
|
||||
btn_search() {
|
||||
this.this_act = '';
|
||||
this.search.activity_num = '';
|
||||
|
||||
this.getDefault(true)
|
||||
},
|
||||
btn_all() {
|
||||
this.this_act = '';
|
||||
this.search.activity_num = '';
|
||||
clearObjProps(this.search);
|
||||
this.btn_search()
|
||||
},
|
||||
checkInMsg(item) {
|
||||
this.check_data.f_num = item.f_num;
|
||||
this.check_data.u_name = item.u_name;
|
||||
this.check_data.activity_num = item.activity_num;
|
||||
this.check_data.activity_name = item.subject;
|
||||
this.check_dialog.show = true;
|
||||
},
|
||||
checkIn() {
|
||||
if (this.check_data.qty > 0 && this.check_data.status.val > 0) {
|
||||
var chechdata =
|
||||
{
|
||||
f_num: this.check_data.f_num,
|
||||
activity_num: this.check_data.activity_num,
|
||||
status: this.check_data.status.val,
|
||||
qty: this.check_data.qty,
|
||||
}
|
||||
axios
|
||||
.post(HTTP_HOST + 'api/activity/OrderCheckIn', chechdata)
|
||||
.then(response => {
|
||||
//清空
|
||||
this.check_data.f_num = 0;
|
||||
this.check_data.u_name = '';
|
||||
this.check_data.activity_num = 0;
|
||||
this.check_data.activity_name = '';
|
||||
this.check_data.qty = 1;
|
||||
this.check_data.status.text = '';
|
||||
this.check_data.status.val = 1;
|
||||
|
||||
this.check_dialog.show = false;
|
||||
msgtop('簽到成功')
|
||||
})
|
||||
.catch(
|
||||
error => {
|
||||
console.log(error)
|
||||
msgtop('簽到失敗', 'error')
|
||||
}
|
||||
)
|
||||
} else {
|
||||
msgbox('報到資訊請填寫完整');
|
||||
}
|
||||
}, goPrint() {
|
||||
let _qry = "";
|
||||
Object.keys(this.search).forEach(key => {
|
||||
//console.log(`${key}: ${this.search[key]}`);
|
||||
if (this.search[key] != undefined && this.search[key] != null && this.search[key] != '') {
|
||||
_qry += (_qry != '' ? '&' : '?') + (key + '=' + this.search[key]);
|
||||
}
|
||||
});
|
||||
window.open("print.aspx" + _qry, '_blank');
|
||||
},
|
||||
countryChange() {
|
||||
this.search.country = '';
|
||||
$('#country_txt').val('')
|
||||
},
|
||||
//列印管理報表
|
||||
print_close() {
|
||||
this.print_dialog.show = false;
|
||||
}
|
||||
,
|
||||
initPrintSearch() {
|
||||
//下拉選單
|
||||
for (let i = 1; i <= 12; i++) {
|
||||
var _tmp = {
|
||||
text: i,
|
||||
val: i,
|
||||
}
|
||||
this.select_items.month.push(_tmp);
|
||||
}
|
||||
for (let i = 1; i <= 4; i++) {
|
||||
var _tmp = {
|
||||
text: i,
|
||||
val: i,
|
||||
}
|
||||
this.select_items.season.push(_tmp);
|
||||
}
|
||||
|
||||
//預設值
|
||||
const Today = new Date();//現在日期時間
|
||||
const first_date = new Date(Today.getFullYear(), Today.getMonth(), 1); //本月第一天
|
||||
const last_month_date = new Date(first_date - 1); //上個月最後一天
|
||||
|
||||
this.print_search.year = last_month_date.getFullYear();
|
||||
this.print_search.month = last_month_date.getMonth() + 1 //預設上個月的年份
|
||||
|
||||
let _season = 1;
|
||||
const _month = first_date.getMonth() + 1; //本月
|
||||
if (_month >= 1 && _month <= 3) {
|
||||
_season = 4;
|
||||
} else if (_month >= 4 && _month <= 6) {
|
||||
_season = 1;
|
||||
} else if (_month >= 7 && _month <= 9) {
|
||||
_season = 2;
|
||||
} else if (_month >= 10 && _month <= 12) {
|
||||
_season = 3;
|
||||
}
|
||||
this.print_search.season = _season; //預設上一季
|
||||
|
||||
},
|
||||
goPrint2() {
|
||||
if (this.print_search.year != '') {
|
||||
if (this.print_search.chk_noact || this.print_search.chk_hasact) {
|
||||
let _qry = "";
|
||||
Object.keys(this.print_search).forEach(key => {
|
||||
if (this.print_search[key] != undefined && this.print_search[key] != null && this.print_search[key] != '') {
|
||||
if (key == 'month') {
|
||||
if (this.print_conditions == 'mm') {
|
||||
_qry += "&month=" + this.print_search.month;
|
||||
}
|
||||
} else if (key == 'season') {
|
||||
if (this.print_conditions == 'ss') {
|
||||
_qry += "&season=" + this.print_search.season;
|
||||
}
|
||||
}
|
||||
else {
|
||||
_qry += (_qry != '' ? '&' : '?') + (key + '=' + this.print_search[key]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.print_dialog.show = false;
|
||||
window.open("print.aspx" + _qry, '_blank');
|
||||
} else {
|
||||
msgbox('活動/非活動至少勾選一項');
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
msgbox('請輸入年份');
|
||||
}
|
||||
|
||||
}, chk_hasact_change() {
|
||||
if (!this.print_search.chk_hasact) {
|
||||
//$('#activity_num_txt').val('')
|
||||
//this.print_search.select_act = '';
|
||||
this.clear_select_act();
|
||||
$('#activity_num_txt').attr("placeholder", "可選擇單一活動(需先勾選活動報名)");
|
||||
} else {
|
||||
$('#activity_num_txt').attr("placeholder", "可選擇單一活動");
|
||||
}
|
||||
|
||||
},
|
||||
clear_select_act() {
|
||||
$('#activity_num_txt').val('')
|
||||
this.print_search.select_act = '';
|
||||
}, clear_select_actitem() {
|
||||
$('#actItem_num_txt').val('')
|
||||
this.print_search.select_actitem = '';
|
||||
},
|
||||
initActivity() {
|
||||
axios.get(HTTP_HOST + 'api/activity')
|
||||
.then(response => {
|
||||
this.select_act_list = response.data
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
pageCount() {
|
||||
return Math.ceil(this.data_table.count / this.data_table.pageSize)
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<div class="container-fluid">
|
||||
<template>
|
||||
<v-btn @click.prevent='fast_signup'>快速報名</v-btn>
|
||||
</template>
|
||||
<v-data-table v-model="detail_table.selected"
|
||||
:items="detail_table.list"
|
||||
:search-props="search"
|
||||
item-key="order_no"
|
||||
:options.sync="options"
|
||||
:headers="detail_table.header"
|
||||
:footer-props="detail_table.footer"
|
||||
:server-items-length="detail_table.count"
|
||||
:loading="detail_table.loading"
|
||||
:single-select="detail_table.singleSelect"
|
||||
show-select
|
||||
hide-default-footer
|
||||
:page.sync="detail_table.page"
|
||||
:items-per-page.sync="detail_table.pageSize"
|
||||
class="elevation-1">
|
||||
<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 @click="$root.currentView='step-three';$root.selected_order=item.order_no" 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>
|
||||
</template>
|
||||
</v-data-table>
|
||||
<v-container>
|
||||
<v-row class="align-baseline" wrap>
|
||||
<v-col cols="12" md="9">
|
||||
<v-pagination v-model="detail_table.page"
|
||||
:length="pageCount">
|
||||
</v-pagination>
|
||||
</v-col>
|
||||
<v-col class="text-truncate text-right" cols="12" md="2">
|
||||
共 {{ detail_table.count }} 筆, 頁數:
|
||||
</v-col>
|
||||
<v-col cols="6" md="1">
|
||||
<v-text-field v-model="detail_table.page"
|
||||
type="number"
|
||||
hide-details
|
||||
dense
|
||||
min="1"
|
||||
:max="pageCount"
|
||||
@input="detail_table.page = parseInt($event, 10)"></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
num: {
|
||||
type: Number }
|
||||
},
|
||||
activated() {
|
||||
console.log("yes ,go go", this.num);
|
||||
this.getDetail();
|
||||
},
|
||||
|
||||
mounted() {
|
||||
console.log("yes ,go go", this.num);
|
||||
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],
|
||||
},
|
||||
},
|
||||
search: {
|
||||
keyin1: '',
|
||||
order_no: '',
|
||||
subject: '',
|
||||
u_name: '',
|
||||
up_time1: '',
|
||||
up_time2: '',
|
||||
actItemTxt: '',
|
||||
introducerTxt: '',
|
||||
activity_num: '',
|
||||
country: '',
|
||||
country2: '',
|
||||
hasPrice: '',
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
handler() {
|
||||
this.getDetail()
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
fast_signup() {
|
||||
this.$emit('custom-event', { action: 'add', item: null });
|
||||
},
|
||||
getDetail() {
|
||||
const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||
const params = {
|
||||
//sortBy: sortBy == undefined ? "order_no" : sortBy[0],
|
||||
//sortDesc: sortDesc == undefined ? "" : sortDesc[0],
|
||||
//page: clearpage ? '1' : page, pageSize: itemsPerPage,
|
||||
page: '1', pageSize: 10,
|
||||
|
||||
};
|
||||
this.search = { activity_num: this.num }
|
||||
this.detail_table.loading = true
|
||||
sessionStorage.setItem('orderpage', '1');// 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))
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
pageCount() {
|
||||
return Math.ceil(this.detail_table.count / this.detail_table.pageSize)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,95 @@
|
||||
<template>
|
||||
<v-container>
|
||||
<v-card>
|
||||
<v-card-title class="bg-primary white--text text-center">
|
||||
<h5 class="mb-0">快速報名</h5>
|
||||
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col cols="12" md="2">
|
||||
<v-text-field v-model="idNo"
|
||||
:counter="20"
|
||||
label="身分證號"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="2">
|
||||
<v-text-field v-model="phoneNum"
|
||||
:counter="20"
|
||||
label="行動電話/市話"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="2">
|
||||
<v-btn @click.prevent="getFollower">查詢</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-divider></v-divider>
|
||||
<v-row>
|
||||
<v-col cols="12" md="2">
|
||||
<v-text-field v-model="follower.f_number"
|
||||
label="信眾編號"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="2">
|
||||
<v-text-field v-model="follower.u_name"
|
||||
label="信眾姓名"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="2">
|
||||
<v-text-field v-model="follower.phoneDes"
|
||||
label="電話"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="2">
|
||||
<v-text-field v-model="follower.cellphoneDes"
|
||||
label="行動電話"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="2">
|
||||
<v-text-field v-model="follower.id_code"
|
||||
label="身分證號"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="2">
|
||||
<v-text-field v-model="follower.passport"
|
||||
label="護照號碼"></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col cols="12" md="12">
|
||||
<v-text-field v-model="follower.address"
|
||||
label="地址"></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
idNo: "",
|
||||
phoneNum: "",
|
||||
follower: {},
|
||||
search: {},
|
||||
query: {
|
||||
id_code: { type: String }, cellphone: { type: String }
|
||||
}
|
||||
}
|
||||
},
|
||||
activated() {
|
||||
//this.getFollower()
|
||||
},
|
||||
methods: {
|
||||
getFollower() {
|
||||
this.search = { id_code: this.query.id_code, cellphone: this.query.cellphone }
|
||||
axios
|
||||
.post(HTTP_HOST + 'api/follower/GetFollower', this.search)
|
||||
.then(response => {
|
||||
console.log(response)
|
||||
if (response.data.list)
|
||||
this.follower = response.data.list
|
||||
else
|
||||
console.log("查無資料");
|
||||
})
|
||||
.catch(error => console.log(error))
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
+42
-10
@@ -1,12 +1,21 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Templates/TBS5ADM001/MasterPage.master" AutoEventWireup="true" CodeFile="index3.aspx.cs" Inherits="admin_order_index3" %>
|
||||
<%@ Register Src="~/admin/_uc/alert.ascx" TagPrefix="uc1" TagName="alert" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="page_header" runat="Server">
|
||||
<style>
|
||||
.modify_modal{
|
||||
width:calc(100vw-20%);
|
||||
background-color:white;
|
||||
opacity:1;
|
||||
z-index:1046 !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="page_nav" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
||||
<uc1:alert runat="server" ID="L_msg" Text="" />
|
||||
|
||||
|
||||
<keep-alive>
|
||||
<component
|
||||
@@ -16,8 +25,24 @@
|
||||
</keep-alive>
|
||||
|
||||
|
||||
<div id="print_data">
|
||||
</div>
|
||||
<div id="print_data">
|
||||
|
||||
</div>
|
||||
<%-- <v-container>
|
||||
<v-card>
|
||||
<v-card-text>
|
||||
<v-dialog v-model="modify_dialog.show" class="modify_modal">
|
||||
<template>
|
||||
|
||||
<keep-alive>
|
||||
<component :is="modifyView" @close-dialog="modify_dialog.show=false"></component>
|
||||
</keep-alive>
|
||||
|
||||
</template>
|
||||
</v-dialog>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-container>--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="offCanvasRight" runat="Server">
|
||||
|
||||
@@ -625,6 +650,9 @@
|
||||
Vue.component('step-two', {
|
||||
template: `
|
||||
<div class="container-fluid">
|
||||
<template>
|
||||
<button class='btn btn-plus' @click.prevent='fast_signup'>快速報名</button>
|
||||
</template>
|
||||
<v-data-table
|
||||
v-model="detail_table.selected"
|
||||
:items="detail_table.list"
|
||||
@@ -728,6 +756,10 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
fast_signup() {
|
||||
//this.$root.modify_dialog.show = true
|
||||
this.$root.currentView = "step-three"
|
||||
},
|
||||
getDetail() {
|
||||
const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||
const params = {
|
||||
@@ -765,13 +797,8 @@
|
||||
let VueApp = new Vue({
|
||||
el: '#app',
|
||||
vuetify: new Vuetify(),
|
||||
data() {
|
||||
return {
|
||||
currentView: 'step-one',
|
||||
selected_act: '',
|
||||
selected_order:'',
|
||||
};
|
||||
},activated() {
|
||||
|
||||
activated() {
|
||||
console.log("yes ,go go");
|
||||
this.getDetail();
|
||||
},
|
||||
@@ -779,6 +806,8 @@
|
||||
return {
|
||||
options: { multiSort: false },
|
||||
search_options: { multiSort: false },
|
||||
selected_act: '',
|
||||
selected_order: '',
|
||||
sign_table: {
|
||||
loading: true,
|
||||
list: [],
|
||||
@@ -812,7 +841,10 @@
|
||||
country: '',
|
||||
country2: '',
|
||||
hasPrice: '',
|
||||
}
|
||||
},
|
||||
modifyView: '',
|
||||
modify_dialog: { show: false },
|
||||
currentView: 'step-one',
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Templates/TBS5ADM001/MasterPage.master" AutoEventWireup="true" CodeFile="index4.aspx.cs" Inherits="admin_order_index4" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="page_header" Runat="Server">
|
||||
<link rel="stylesheet" href="../../js/_bootstrap-icons-1.8.1/bootstrap-icons.css">
|
||||
<style>
|
||||
.function-icon {
|
||||
font-size: 2em;
|
||||
line-height: 1;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.external-link-icon {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.modify_modal {
|
||||
width: calc(100vw-20%);
|
||||
background-color: white;
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
<script src="/js/httpVueLoader.js"></script>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="page_nav" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
|
||||
<v-container>
|
||||
<div id="content" class="container py-4">
|
||||
<keep-alive>
|
||||
<component :is="currentView" :form-data="$data"
|
||||
:twoData="twoData"
|
||||
@custom-event="changeView">
|
||||
</component>
|
||||
</keep-alive>
|
||||
</div>
|
||||
</v-container>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="offCanvasRight" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="footer_script" Runat="Server">
|
||||
<script>
|
||||
let VueApp = new Vue({
|
||||
el: '#app',
|
||||
vuetify: new Vuetify(),
|
||||
activated() {
|
||||
this.getDetail();
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options: { multiSort: false },
|
||||
search_options: { multiSort: false },
|
||||
selected_act: '',
|
||||
selected_order: '',
|
||||
sign_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],
|
||||
},
|
||||
},
|
||||
search: {
|
||||
keyin1: '',
|
||||
order_no: '',
|
||||
subject: '',
|
||||
u_name: '',
|
||||
up_time1: '',
|
||||
up_time2: '',
|
||||
actItemTxt: '',
|
||||
introducerTxt: '',
|
||||
activity_num: '',
|
||||
country: '',
|
||||
country2: '',
|
||||
hasPrice: '',
|
||||
},
|
||||
currentView: 'fastSignUp-component',
|
||||
twoData: {}
|
||||
};
|
||||
},
|
||||
components: {
|
||||
'fastSignUp-component': httpVueLoader('./fastSignUp.vue'),
|
||||
'fastSignUp2-component': httpVueLoader('./fastSignUp2.vue'),
|
||||
'fastSignUp3-component': httpVueLoader('./fastSignUp3.vue'),
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
handler() {
|
||||
this.getDetail()
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
changeView(item) {
|
||||
console.log(item);
|
||||
if (item.action === "detail") {
|
||||
this.twoData = item.item.num
|
||||
console.log(this.twoData);
|
||||
this.currentView = "fastSignUp2-component"
|
||||
} else if (item.action==="add") {
|
||||
this.currentView = "fastSignUp3-component"
|
||||
}
|
||||
},
|
||||
getDetail() {
|
||||
const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||
const params = {
|
||||
page: '1', pageSize: 10,
|
||||
|
||||
};
|
||||
this.search = { activity_num: this.$root.selected_act }
|
||||
this.detail_table.loading = true
|
||||
sessionStorage.setItem('orderpage', '1');// 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))
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
pageCount() {
|
||||
return Math.ceil(this.detail_table.count / this.detail_table.pageSize)
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class admin_order_index4 : MyWeb.config
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user