1. 優化報名頁面:彈出查詢頁面、顯示剛新增資料
2. 新增報名頁面加上取消鍵 3. 優化登入頁面:按下 enter 自動換格/送出 4. 修復新增報名頁面中,不同 search_dialog 中的 page 參數相互連動之異常 5. 修改報名頁面列印格式 6. 修復報名頁面匯出功能 7. 優化報到功能 8. 報名頁面中,無查詢資料時不可點選匯出/列印按鈕 9. 匯出/列印報名管理報表時,若無資料則顯示提示 10. 修復列印管理報表後父視窗 UI 不能點擊的問題 11. 新增報名管理表單匯出 excel 功能 12. 於新增信眾、新增活動頁面加上取消鍵 13. 優化報名管理匯出功能:若篩選條件包含特定活動,自動於「匯出條件」欄位標註活動名稱 14. 優化報名查詢匯出功能:匯出之文件中加上「匯出條件」欄位 15. 修復信眾資料頁面中,使用「生日」作為篩選基準時,後續執行「列印查詢資料」與「匯出查詢資料」會報錯 16. 修復「列印信眾查詢」功能中,電話搜尋欄位未正確帶入查詢條件之異常 17. 解決中文輸入法輸入電話號碼的跳字問題 18. 新增品項管理介面排序功能
This commit is contained in:
@@ -135,7 +135,7 @@
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
handler() {
|
||||
handler() {
|
||||
if (this.isSearched) {
|
||||
this.getList()
|
||||
}
|
||||
@@ -200,23 +200,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
//if (params.has('year')) {
|
||||
// this.print_search.year = parseInt(params.get('year'));
|
||||
// this.print_dialog.show = true;
|
||||
//}
|
||||
//if (params.has('month')) {
|
||||
// this.print_search.month = parseInt(params.get('month'));
|
||||
// this.print_dialog.show = true;
|
||||
//}
|
||||
//if (params.has('season')) {
|
||||
// this.print_search.season = parseInt(params.get('season'));
|
||||
// this.print_dialog.show = true;
|
||||
//}
|
||||
//if (params.has('mode')) {
|
||||
// this.print_conditions = params.get('mode');
|
||||
// this.print_dialog.show = true;
|
||||
//}
|
||||
|
||||
if (printResult === 'nodata' || printResult === 'success') {
|
||||
this.$nextTick(() => {
|
||||
this.print_search.year = parseInt(document.getElementById('<%= hid_print_year.ClientID %>').value) || this.print_search.year;
|
||||
@@ -231,8 +214,9 @@
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
['year', 'month', 'season', 'mode', 'msg'].forEach(p => params.delete(p));
|
||||
window.history.replaceState({}, '', url.pathname + url.search);
|
||||
// 清空 URL
|
||||
const cleanUrl = window.location.protocol + "//" + window.location.host + window.location.pathname;
|
||||
window.history.replaceState({}, '', cleanUrl);
|
||||
}, 100);
|
||||
});
|
||||
},
|
||||
@@ -255,7 +239,6 @@
|
||||
}
|
||||
|
||||
if (mode === 'print') {
|
||||
const printWindow = window.open('about:blank', '列印信眾資料');
|
||||
document.getElementById('<%= print_management.ClientID %>').click();
|
||||
}
|
||||
else if (mode === "excel") {
|
||||
@@ -397,13 +380,13 @@
|
||||
}
|
||||
},
|
||||
btn_search() {
|
||||
isSearched = true;
|
||||
this.isSearched = true;
|
||||
sessionStorage.setItem("member_query_params", JSON.stringify(this.search));
|
||||
this.getList(true)
|
||||
bootstrap.Offcanvas.getInstance(document.getElementById("offcanvasRight")).hide()
|
||||
},
|
||||
btn_all() {
|
||||
isSearched = false;
|
||||
this.isSearched = false;
|
||||
clearObjProps(this.search);
|
||||
sessionStorage.setItem("member_query_params", JSON.stringify(this.search));
|
||||
//this.btn_search()
|
||||
@@ -527,6 +510,7 @@
|
||||
<asp:HiddenField ID="hid_print_month" runat="server" />
|
||||
<asp:HiddenField ID="hid_print_season" runat="server" />
|
||||
<asp:HiddenField ID="hid_print_mode" runat="server" />
|
||||
<asp:HiddenField ID="hid_qry" runat="server" />
|
||||
<asp:LinkButton ID="excel_management" runat="server" OnClick="export_Click" style="display:none;" />
|
||||
<asp:LinkButton ID="print_management" runat="server" OnClick="export_Click" style="display:none;" />
|
||||
<div id="content" class="container-fluid">
|
||||
|
||||
@@ -13,6 +13,7 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Interop;
|
||||
using static TreeView;
|
||||
|
||||
@@ -243,7 +244,7 @@ public partial class admin_follower_index : MyWeb.config
|
||||
int selMonth = !string.IsNullOrEmpty(hid_print_month.Value) ? int.Parse(hid_print_month.Value) : 0;
|
||||
int selSeason = !string.IsNullOrEmpty(hid_print_season.Value) ? int.Parse(hid_print_season.Value) : 0;
|
||||
string selMode = !string.IsNullOrEmpty(hid_print_mode.Value) ? hid_print_mode.Value : "";
|
||||
|
||||
|
||||
var qry = _db.followers.AsQueryable();
|
||||
if (selYear > 0)
|
||||
{
|
||||
@@ -255,7 +256,7 @@ public partial class admin_follower_index : MyWeb.config
|
||||
}
|
||||
else if (selMode == "ss" && selSeason > 0)
|
||||
{
|
||||
urlParams += "&season=" + selSeason;
|
||||
urlParams += "&season=" + selSeason;
|
||||
}
|
||||
|
||||
if (list.Count > 0)
|
||||
@@ -266,17 +267,12 @@ public partial class admin_follower_index : MyWeb.config
|
||||
hid_print_season.Value = selSeason.ToString();
|
||||
hid_print_mode.Value = selMode;
|
||||
|
||||
string script = $@"window.open('print.aspx?{urlParams}&mode={selMode}', '列印信眾資料');";
|
||||
string script = $@"window.open('print.aspx?{urlParams}&mode={selMode}', '列印信眾資料', 'noopener,noreferrer');";
|
||||
ScriptManager.RegisterStartupScript(this, GetType(), "ExecutePrint", script, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
hid_err_msg.Value = "nodata";
|
||||
string script = $@"
|
||||
var win = window.open('', '列印信眾資料');
|
||||
if (win) win.close()";
|
||||
|
||||
ScriptManager.RegisterStartupScript(this, GetType(), "CancelPrint", script, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -357,7 +353,7 @@ public partial class admin_follower_index : MyWeb.config
|
||||
qry = qry.Where(o => o.address.Contains(s_address.Value.Trim()));
|
||||
_query += "地址:" + s_address.Value.Trim() + "\n";
|
||||
}
|
||||
|
||||
|
||||
// 電話/證號搜尋 (使用 search_keywords HEX 編碼)
|
||||
if (!isStrNull(s_phone_idcode.Value) && GlobalVariables.UseSearchKeywords)
|
||||
{
|
||||
@@ -372,12 +368,14 @@ public partial class admin_follower_index : MyWeb.config
|
||||
|
||||
if (!isStrNull(s_birthday.Value) && isDate(s_birthday.Value))
|
||||
{
|
||||
qry = qry.Where(o => o.birthday >= ValDate(s_birthday.Value));
|
||||
var tmp_s_birthday = ValDate(s_birthday.Value);
|
||||
qry = qry.Where(o => o.birthday >= tmp_s_birthday);
|
||||
_query += "生日(起):" + s_birthday.Value.Trim() + "\n";
|
||||
}
|
||||
if (!isStrNull(s_birthday2.Value) && isDate(s_birthday2.Value))
|
||||
{
|
||||
qry = qry.Where(o => o.birthday < Convert.ToDateTime(s_birthday2.Value).AddDays(1));
|
||||
var tmp_s_birthday2 = Convert.ToDateTime(s_birthday2.Value).AddDays(1);
|
||||
qry = qry.Where(o => o.birthday < tmp_s_birthday2);
|
||||
_query += "生日(訖):" + s_birthday2.Value.Trim() + "\n";
|
||||
}
|
||||
qry = qry.OrderByDescending(o => o.num);
|
||||
|
||||
@@ -61,7 +61,8 @@ public partial class admin_follower_print_ : System.Web.UI.Page
|
||||
if (!string.IsNullOrEmpty(Request["birthday2"]))
|
||||
{
|
||||
DateTime birthday2Param = Convert.ToDateTime(Request["birthday2"].Trim());
|
||||
qry = qry.Where(o => o.birthday < birthday2Param.AddDays(1));
|
||||
var tmpBirthday2Param = birthday2Param.AddDays(1);
|
||||
qry = qry.Where(o => o.birthday < tmpBirthday2Param);
|
||||
_query += "生日(訖):" + birthday2Param.ToString("yyyy/MM/dd") + "\n";
|
||||
}
|
||||
// ❌ 錯誤寫法: _db.countries.Where(x => x.ID == Request["country"].ToString())
|
||||
@@ -87,6 +88,18 @@ public partial class admin_follower_print_ : System.Web.UI.Page
|
||||
_query += "國家:" + (_db.countries.Where(x => x.ID == country2Id).Select(x => x.name_zh).FirstOrDefault() ?? "") + "\n";
|
||||
}
|
||||
|
||||
string phone_ipcode = Request["phone_idcode"]?.ToString();
|
||||
if (!string.IsNullOrEmpty(phone_ipcode) && GlobalVariables.UseSearchKeywords)
|
||||
{
|
||||
MyWeb.encrypt encrypt = new MyWeb.encrypt();
|
||||
string hexSearch = encrypt.ConvertToHex(phone_ipcode.Trim());
|
||||
if (!string.IsNullOrEmpty(hexSearch))
|
||||
{
|
||||
qry = qry.Where(o => o.search_keywords != null && o.search_keywords.Contains(hexSearch));
|
||||
_query += "電話/證號:" + phone_ipcode.Trim() + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
//管理報表
|
||||
if (!string.IsNullOrEmpty(Request["year"]))
|
||||
{
|
||||
|
||||
@@ -1318,13 +1318,32 @@
|
||||
$('.tab-pane,.edit_Click').removeClass('pe-none'); // 移除 pe-none 類,允許編輯
|
||||
}
|
||||
});
|
||||
|
||||
let isComposing = false;
|
||||
const cellphoneInput = document.querySelector('[id$="cellphone"]');
|
||||
if (cellphoneInput) {
|
||||
cellphoneInput.addEventListener('compositionstart', () => {
|
||||
isComposing = true;
|
||||
});
|
||||
cellphoneInput.addEventListener('compositionend', (e) => {
|
||||
isComposing = false;
|
||||
formatCellphone(e.target);
|
||||
});
|
||||
cellphoneInput.addEventListener('input', (e) => {
|
||||
if (!isComposing) {
|
||||
formatCellphone(e.target);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="page_nav" runat="Server">
|
||||
<div class="scroll-nav nav nav-tabs mb-2 mb-sm-0 d-none d-sm-flex">
|
||||
<template v-if="follower_id !='' "> {{titleword()}} </template>
|
||||
</div>
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="">
|
||||
<div class="form-check me-3 d-none" id="editCheckboxContainer">
|
||||
<input class="form-check-input" type="checkbox" id="editCheckbox">
|
||||
<label class="form-check-label" for="editCheckbox">
|
||||
@@ -1333,7 +1352,7 @@
|
||||
</div>
|
||||
<asp:Button ID="add" runat="server" Text="送出" OnClick="add_Click" CssClass="btn btn-primary edit_Click noedit" />
|
||||
<asp:Button ID="edit" runat="server" Text="儲存" Visible="false" OnClick="edit_Click" CssClass="btn btn-primary edit_Click noedit" />
|
||||
<asp:Button ID="goback" runat="server" Text="回列表" Visible="false" CausesValidation="false" OnClick="goback_Click" CssClass="btn btn-outline-secondary" />
|
||||
<asp:Button ID="goback" runat="server" Text="取消" Visible="true" CausesValidation="false" OnClick="goback_Click" CssClass="btn btn-outline-secondary" />
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
|
||||
@@ -1412,7 +1431,7 @@
|
||||
</div>
|
||||
<label class="col-sm-2 col-lg-1 col-form-label">手機號碼<asp:Literal ID="cellphoneReqStar" runat="server" Text=" *"></asp:Literal></label>
|
||||
<div class="col-sm-10 col-lg-3">
|
||||
<asp:TextBox ID="cellphone" MaxLength="12" runat="server" CssClass="form-control" data-encrypt="Y" placeholder="聯絡電話與手機號碼請至少填寫一項" oninput="formatCellphone(this)"></asp:TextBox>
|
||||
<asp:TextBox ID="cellphone" MaxLength="12" runat="server" CssClass="form-control" data-encrypt="Y" placeholder="聯絡電話與手機號碼請至少填寫一項"></asp:TextBox>
|
||||
<asp:RegularExpressionValidator ControlToValidate="cellphone" Display="Dynamic" ErrorMessage="格式有誤" ID="RegularExpressionValidator2" runat="server" SetFocusOnError="true" ValidationExpression="^09\d{2}-?\d{3}-?\d{3}$" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -2155,4 +2174,5 @@
|
||||
</template>
|
||||
</v-snackbar>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
Reference in New Issue
Block a user