搜尋身份證號, 電話功能選項
This commit is contained in:
@@ -65,6 +65,7 @@
|
||||
address: '',
|
||||
country: '',
|
||||
country2: '',
|
||||
phone_idcode: '', // 電話/證號搜尋
|
||||
/*注意這邊的參數不能跟下方print_search重複*/
|
||||
},
|
||||
//列印管理報表
|
||||
@@ -561,6 +562,10 @@
|
||||
<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>
|
||||
<input type="text" v-model="search.phone_idcode" class="form-control" placeholder="可輸入電話、手機、身份證號或護照號碼" id="s_phone_idcode" runat="server">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">地址 </label>
|
||||
<input type="text" v-model="search.address" class="form-control" placeholder="可輸入關鍵字查詢" id="s_address" runat="server">
|
||||
|
||||
@@ -245,6 +245,19 @@ public partial class admin_follower_index : MyWeb.config
|
||||
qry = qry.Where(o => o.address.Contains(s_address.Value.Trim()));
|
||||
_query += "地址:" + s_u_name.Value.Trim() + "\n";
|
||||
}
|
||||
|
||||
// 電話/證號搜尋 (使用 search_keywords HEX 編碼)
|
||||
if (!isStrNull(s_phone_idcode.Value) && GlobalVariables.UseSearchKeywords)
|
||||
{
|
||||
MyWeb.encrypt encrypt = new MyWeb.encrypt();
|
||||
string hexSearch = encrypt.ConvertToHex(s_phone_idcode.Value.Trim());
|
||||
if (!string.IsNullOrEmpty(hexSearch))
|
||||
{
|
||||
qry = qry.Where(o => o.search_keywords != null && o.search_keywords.Contains(hexSearch));
|
||||
_query += "電話/證號:" + s_phone_idcode.Value.Trim() + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (!isStrNull(s_birthday.Value) && isDate(s_birthday.Value))
|
||||
{
|
||||
qry = qry.Where(o => o.birthday >= ValDate(s_birthday.Value));
|
||||
|
||||
@@ -230,6 +230,13 @@ public partial class admin_follower_reg : MyWeb.config
|
||||
|
||||
if (_id > 0)
|
||||
{
|
||||
// 如果啟用 search_keywords 功能,生成並更新 search_keywords
|
||||
if (GlobalVariables.UseSearchKeywords)
|
||||
{
|
||||
followers.search_keywords = encrypt.GenerateSearchKeywords(followers);
|
||||
_db.SaveChanges();
|
||||
}
|
||||
|
||||
Model.admin_log admin_log = new Model.admin_log();
|
||||
admin_log.writeLog(admin.info.u_id, (int)Model.admin_log.Systems.Follower, (int)Model.admin_log.Status.Insert, f_number.Text + u_name.Text);
|
||||
|
||||
@@ -305,6 +312,13 @@ public partial class admin_follower_reg : MyWeb.config
|
||||
followers.tab = tab.Value.Trim(',');
|
||||
followers.admin_log = admin.info.u_id + " " + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
|
||||
followers.follower_hash = encrypt.followerHash(followers.phone, followers.id_code);
|
||||
|
||||
// 如果啟用 search_keywords 功能,生成並更新 search_keywords
|
||||
if (GlobalVariables.UseSearchKeywords)
|
||||
{
|
||||
followers.search_keywords = encrypt.GenerateSearchKeywords(followers);
|
||||
}
|
||||
|
||||
_db.SaveChanges();
|
||||
|
||||
Model.admin_log admin_log = new Model.admin_log();
|
||||
|
||||
Reference in New Issue
Block a user