From 2b9e266eb0051f97385db83418c5a372b039affa Mon Sep 17 00:00:00 2001 From: minom Date: Wed, 27 May 2026 17:52:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/App_Code/api/orderController.cs | 18 ++- web/admin/activity/reg.aspx | 4 +- web/admin/activity/reg.aspx.cs | 54 ++++--- web/admin/order/fastSignUp.vue | 139 +++--------------- web/admin/order/fastSignUp2.vue | 85 ++++++++--- web/admin/order/fastSignUp3.vue | 10 +- web/admin/print/tablet_edit/editorNewOne.html | 62 +++++++- 7 files changed, 193 insertions(+), 179 deletions(-) diff --git a/web/App_Code/api/orderController.cs b/web/App_Code/api/orderController.cs index 496d00f..7691475 100644 --- a/web/App_Code/api/orderController.cs +++ b/web/App_Code/api/orderController.cs @@ -14,6 +14,7 @@ using System.IdentityModel.Metadata; using System.Linq; using System.Net; using System.Net.Http; +using System.Web.Helpers; using System.Web.Http; using static TreeView; @@ -345,7 +346,7 @@ public class orderController : ApiController public IHttpActionResult GetList([FromBody] Model.ViewModel.pro_order q, int page, int pageSize = 10, string sortBy = "", bool sortDesc = false) { - + MyWeb.encrypt encrypt = new MyWeb.encrypt(); var qry = _db.pro_order.Include("activity").Include("activity.activity_check").AsQueryable(); //var aIDt = _db.actItems.AsEnumerable().Where(f => f.subject.Contains(q.actItemTxt.Trim())).Select(f => f.num);//品項 @@ -398,6 +399,21 @@ public class orderController : ApiController } } + if (q.f_user!=null&&!string.IsNullOrEmpty(q.f_user.u_name)) { + qry = qry.Where(o => o.f_num != null && o.follower != null && o.follower.u_name ==q.f_user.u_name); + } + if (q.f_user != null && !string.IsNullOrEmpty(q.f_user.phone)) + { + qry = qry.Where(o => o.f_num != null && o.follower != null && encrypt.DecryptAutoKey(o.follower.phone) == q.f_user.phone); + } + if (q.f_user != null && !string.IsNullOrEmpty(q.f_user.cellphone)) + { + qry = qry.Where(o => o.f_num != null && o.follower != null && encrypt.DecryptAutoKey(o.follower.cellphone) == q.f_user.cellphone); + } + if (q.f_user != null && !string.IsNullOrEmpty(q.f_user.id_code)) + { + qry = qry.Where(o => o.f_num != null && o.follower != null && encrypt.DecryptAutoKey(o.follower.id_code) == q.f_user.id_code); + } if (sortBy.Equals("order_no")) { diff --git a/web/admin/activity/reg.aspx b/web/admin/activity/reg.aspx index 7bc2925..168ad32 100644 --- a/web/admin/activity/reg.aspx +++ b/web/admin/activity/reg.aspx @@ -986,7 +986,7 @@
- +
@@ -1003,7 +1003,7 @@
- +
diff --git a/web/admin/activity/reg.aspx.cs b/web/admin/activity/reg.aspx.cs index 1c479ba..f38d801 100644 --- a/web/admin/activity/reg.aspx.cs +++ b/web/admin/activity/reg.aspx.cs @@ -254,7 +254,7 @@ public partial class admin_activity_reg : MyWeb.config { if (textBox.TextMode == TextBoxMode.Date) ObjValue.SetValue(activity, selectDate(textBox)); - + else ObjValue.SetValue(activity, ((TextBox)obj).Text.Trim()); } @@ -281,24 +281,31 @@ public partial class admin_activity_reg : MyWeb.config // printInit 欄位 //var printInitValue = printInit.Text.Trim(); //activity.print_init = !string.IsNullOrEmpty(printInitValue) ? printInitValue : null; - - activity.kind = Val(kind.Value); - activity.category_kind = Val(category_kind.Value); - activity.reg_time = DateTime.Now; - _db.activities.Add(activity); - _db.SaveChanges(); - int _id = activity.num; - if (_id > 0) + if (activity.startDate_solar == null || activity.endDate_solar == null) { - Model.admin_log admin_log = new Model.admin_log(); - admin_log.writeLog(admin.info.u_id, (int)Model.admin_log.Systems.Activity, (int)Model.admin_log.Status.Insert, subject.Text); - - Response.Redirect("index.aspx"); + L_msg.Type = alert_type.danger; + L_msg.Text = "開始、結束日期必須填寫"; } else { - L_msg.Type = alert_type.danger; - L_msg.Text = "Error"; + activity.kind = Val(kind.Value); + activity.category_kind = Val(category_kind.Value); + activity.reg_time = DateTime.Now; + _db.activities.Add(activity); + _db.SaveChanges(); + int _id = activity.num; + if (_id > 0) + { + Model.admin_log admin_log = new Model.admin_log(); + admin_log.writeLog(admin.info.u_id, (int)Model.admin_log.Systems.Activity, (int)Model.admin_log.Status.Insert, subject.Text); + + Response.Redirect("index.aspx"); + } + else + { + L_msg.Type = alert_type.danger; + L_msg.Text = "Error"; + } } } catch (Exception ex) @@ -363,12 +370,19 @@ public partial class admin_activity_reg : MyWeb.config // printInit 欄位 //var printInitValue = printInit.Text.Trim(); //activity.print_init = !string.IsNullOrEmpty(printInitValue) ? printInitValue : null; + if (activity.startDate_solar == null || activity.endDate_solar == null) + { + L_msg.Type = alert_type.danger; + L_msg.Text = "開始、結束日期必須填寫"; + } + else + { + activity.category_kind = Val(category_kind.Value); + _db.SaveChanges(); - activity.category_kind = Val(category_kind.Value); - _db.SaveChanges(); - - Model.admin_log admin_log = new Model.admin_log(); - admin_log.writeLog(admin.info.u_id, (int)Model.admin_log.Systems.Activity, (int)Model.admin_log.Status.Update, subject.Text); + Model.admin_log admin_log = new Model.admin_log(); + admin_log.writeLog(admin.info.u_id, (int)Model.admin_log.Systems.Activity, (int)Model.admin_log.Status.Update, subject.Text); + } } catch (Exception ex) { diff --git a/web/admin/order/fastSignUp.vue b/web/admin/order/fastSignUp.vue index f0d5fc8..d422cf8 100644 --- a/web/admin/order/fastSignUp.vue +++ b/web/admin/order/fastSignUp.vue @@ -6,11 +6,12 @@ 查詢條件 - - + + + + @@ -38,25 +39,6 @@ @input="startmenu = false"> - 查詢 清空條件 @@ -67,7 +49,6 @@ 0 && navEntries[0].type === "reload"; if (isReload) { @@ -291,6 +175,7 @@ this.options.page = savedPage; } } + this.initKindList() }, watch: { options: { @@ -307,6 +192,16 @@ }, }, methods: { + initKindList() { + axios + //.get(HTTP_HOST + 'api/activity_kind') + .get(HTTP_HOST + 'api/actItem_kind/GetAll') + .then(response => { + this.itemKindList = response.data + + }) + .catch(error => console.log(error)) + }, clearSearch() { this.search.subject = "" this.search.up_time1="" diff --git a/web/admin/order/fastSignUp2.vue b/web/admin/order/fastSignUp2.vue index 104da26..34e1f36 100644 --- a/web/admin/order/fastSignUp2.vue +++ b/web/admin/order/fastSignUp2.vue @@ -2,8 +2,51 @@
- 快速報名 - 返回 + + + + + + + + + 快速報名 + 返回 + + + + + + + + + + + + + + + + + + + + + + + + + + + 查詢 + 清空條件 + + + + + { this.detail_table.list = response.data.list this.detail_table.count = response.data.count; diff --git a/web/admin/order/fastSignUp3.vue b/web/admin/order/fastSignUp3.vue index fb74a7a..e4801cb 100644 --- a/web/admin/order/fastSignUp3.vue +++ b/web/admin/order/fastSignUp3.vue @@ -112,7 +112,7 @@ @@ -121,7 +121,7 @@ - +