From fa1ed1f827306de2647bed0ed9c965147a5b8f57 Mon Sep 17 00:00:00 2001 From: minom Date: Tue, 25 Aug 2026 17:52:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BF=A1=E7=9C=BE=E7=89=8C?= =?UTF-8?q?=E4=BD=8D=E7=AF=84=E6=9C=AC=E5=8F=8A=E7=96=8F=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/App_Code/Entity/Style.cs | 162 +++--- web/App_Code/Model/Model.Context.cs | 5 + web/App_Code/Model/Model.cs | 113 ++++ web/App_Code/Model/Model.edmx | 338 +++++++++++- web/App_Code/Model/Model.edmx.diagram | 7 +- web/App_Code/api/designerController.cs | 37 ++ web/App_Code/api/orderController.cs | 2 +- web/App_Code/api/shuwensController.cs | 25 + web/admin/activity/reg.aspx | 2 +- web/admin/activity/shuwen02.vue | 63 ++- web/admin/follower/reg.aspx | 56 +- web/admin/order/reg.aspx | 14 +- web/admin/pivot/query.aspx | 4 +- web/admin/print/tablet_edit/editorNewOne.html | 490 +++++++++--------- 14 files changed, 943 insertions(+), 375 deletions(-) diff --git a/web/App_Code/Entity/Style.cs b/web/App_Code/Entity/Style.cs index d95664f..9e982ae 100644 --- a/web/App_Code/Entity/Style.cs +++ b/web/App_Code/Entity/Style.cs @@ -6,88 +6,88 @@ using System.Web; /// /// Style 的摘要描述 /// -public class TabletStyle -{ - public TabletStyle() - { - // - // TODO: 在這裡新增建構函式邏輯 - // - } +//public class TabletStyle +//{ +// public TabletStyle() +// { +// // +// // TODO: 在這裡新增建構函式邏輯 +// // +// } - public string StyleID { get; set; } - public string Name { get; set; } - public string Descr { get; set; } - public string PaperSize { get; set; } - public string BackendImg { get; set; } - public string PrintSize { get; set; } - public string PrintMode { get; set; } - public string Orientation { get; set; } - public string PrintPageCount { get; set; } - public string RosterLimit { get; set; } - public string CUser { get; set; } - public string CDate { get; set; } - public string CTime { get; set; } - public string UUser { get; set; } - public string UDate { get; set; } - public string UTime { get; set; } -} +// public string StyleID { get; set; } +// public string Name { get; set; } +// public string Descr { get; set; } +// public string PaperSize { get; set; } +// public string BackendImg { get; set; } +// public string PrintSize { get; set; } +// public string PrintMode { get; set; } +// public string Orientation { get; set; } +// public string PrintPageCount { get; set; } +// public string RosterLimit { get; set; } +// public string CUser { get; set; } +// public string CDate { get; set; } +// public string CTime { get; set; } +// public string UUser { get; set; } +// public string UDate { get; set; } +// public string UTime { get; set; } +//} -public class TabletStyleDetail -{ - public TabletStyleDetail() { } - public string StyleID { get; set; } - public string Name { get; set; } - public string Descr { get; set; } - public string ElementID { get; set; } - public string StartX { get; set; } - public string StartY { get; set; } - public string FontSize { get; set; } - public string FontFamily { get; set; } - public string TwoOffset { get; set; } - public string ThreeOffset { get; set; } - public string FourOffset { get; set; } - public string IsActive { get; set; } - public string Width { get; set; } - public string Height { get; set; } - public string TextWidth { get; set; } - public string TextHeight { get; set; } - public string TextSpan { get; set; } - public string BreakLen { get; set; } - public string CUser { get; set; } - public string CDate { get; set; } - public string CTime { get; set; } - public string UUser { get; set; } - public string UDate { get; set; } - public string UTime { get; set; } -} +//public class TabletStyleDetail +//{ +// public TabletStyleDetail() { } +// public string StyleID { get; set; } +// public string Name { get; set; } +// public string Descr { get; set; } +// public string ElementID { get; set; } +// public string StartX { get; set; } +// public string StartY { get; set; } +// public string FontSize { get; set; } +// public string FontFamily { get; set; } +// public string TwoOffset { get; set; } +// public string ThreeOffset { get; set; } +// public string FourOffset { get; set; } +// public string IsActive { get; set; } +// public string Width { get; set; } +// public string Height { get; set; } +// public string TextWidth { get; set; } +// public string TextHeight { get; set; } +// public string TextSpan { get; set; } +// public string BreakLen { get; set; } +// public string CUser { get; set; } +// public string CDate { get; set; } +// public string CTime { get; set; } +// public string UUser { get; set; } +// public string UDate { get; set; } +// public string UTime { get; set; } +//} -public class TabletElement -{ - public TabletElement() { } - public string ElementID { get; set; } - public string Name { get; set; } - public string ElementType { get; set; } - public string SampleContent { get; set; } - public string CUser { get; set; } - public string CDate { get; set; } - public string CTime { get; set; } - public string UUser { get; set; } - public string UDate { get; set; } - public string UTime { get; set; } -} +//public class TabletElement +//{ +// public TabletElement() { } +// public string ElementID { get; set; } +// public string Name { get; set; } +// public string ElementType { get; set; } +// public string SampleContent { get; set; } +// public string CUser { get; set; } +// public string CDate { get; set; } +// public string CTime { get; set; } +// public string UUser { get; set; } +// public string UDate { get; set; } +// public string UTime { get; set; } +//} -public class TabletPaperSize -{ - public TabletPaperSize() { } - public string PaperID { get; set; } - public string PaperName { get; set; } - public string Width { get; set; } - public string Height { get; set; } - public string CUser { get; set; } - public string CDate { get; set; } - public string CTime { get; set; } - public string UUser { get; set; } - public string UDate { get; set; } - public string UTime { get; set; } -} \ No newline at end of file +//public class TabletPaperSize +//{ +// public TabletPaperSize() { } +// public string PaperID { get; set; } +// public string PaperName { get; set; } +// public string Width { get; set; } +// public string Height { get; set; } +// public string CUser { get; set; } +// public string CDate { get; set; } +// public string CTime { get; set; } +// public string UUser { get; set; } +// public string UDate { get; set; } +// public string UTime { get; set; } +//} \ No newline at end of file diff --git a/web/App_Code/Model/Model.Context.cs b/web/App_Code/Model/Model.Context.cs index 1388ca4..461bcae 100644 --- a/web/App_Code/Model/Model.Context.cs +++ b/web/App_Code/Model/Model.Context.cs @@ -100,6 +100,7 @@ namespace Model public virtual DbSet receipt_style { get; set; } public virtual DbSet receipt_style_d { get; set; } public virtual DbSet pre_order { get; set; } + public virtual DbSet followers_tablet_template { get; set; } public virtual DbSet hr_arrange { get; set; } public virtual DbSet hr_company { get; set; } public virtual DbSet hr_employee { get; set; } @@ -114,6 +115,10 @@ namespace Model public virtual DbSet hr_section { get; set; } public virtual DbSet activity_shuwen { get; set; } public virtual DbSet shuwen_temp { get; set; } + public virtual DbSet TabletElement { get; set; } + public virtual DbSet TabletPaperSize { get; set; } + public virtual DbSet TabletStyle { get; set; } + public virtual DbSet TabletStyleDetail { get; set; } public virtual int pager_eztrust(Nullable startRowIndex, Nullable pageSize, string tableName, string columnName, string sqlWhere, string orderBy, ObjectParameter rowCount) { diff --git a/web/App_Code/Model/Model.cs b/web/App_Code/Model/Model.cs index 18be874..beb6364 100644 --- a/web/App_Code/Model/Model.cs +++ b/web/App_Code/Model/Model.cs @@ -430,6 +430,8 @@ namespace Model public string shuwen_type { get; set; } public string contents { get; set; } public Nullable reg_time { get; set; } + public string paper_size { get; set; } + public string direction { get; set; } } } namespace Model @@ -1040,6 +1042,21 @@ namespace Model using System; using System.Collections.Generic; + public partial class followers_tablet_template + { + public int num { get; set; } + public Nullable follower_num { get; set; } + public string name { get; set; } + public string style_id { get; set; } + public string tablet { get; set; } + public string shuwen { get; set; } + } +} +namespace Model +{ + using System; + using System.Collections.Generic; + public partial class GuaDanOrder { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] @@ -2249,6 +2266,102 @@ namespace Model using System; using System.Collections.Generic; + public partial class TabletElement + { + public string ElementID { get; set; } + public string Name { get; set; } + public string ElementType { get; set; } + public string CUser { get; set; } + public string CDate { get; set; } + public string CTime { get; set; } + public string UUser { get; set; } + public string UDate { get; set; } + public string UTime { get; set; } + public string SampleContent { get; set; } + } +} +namespace Model +{ + using System; + using System.Collections.Generic; + + public partial class TabletPaperSize + { + public string PaperID { get; set; } + public string PaperName { get; set; } + public string Width { get; set; } + public string Height { get; set; } + public string CUser { get; set; } + public string CDate { get; set; } + public string CTime { get; set; } + public string UUser { get; set; } + public string UDate { get; set; } + public string UTime { get; set; } + } +} +namespace Model +{ + using System; + using System.Collections.Generic; + + public partial class TabletStyle + { + public string StyleID { get; set; } + public string Name { get; set; } + public string Descr { get; set; } + public string PaperSize { get; set; } + public string BackendImg { get; set; } + public string PrintSize { get; set; } + public string PrintMode { get; set; } + public string Orientation { get; set; } + public string PrintPageCount { get; set; } + public string CUser { get; set; } + public string CDate { get; set; } + public string CTime { get; set; } + public string UUser { get; set; } + public string UDate { get; set; } + public string UTime { get; set; } + public string RosterLimit { get; set; } + } +} +namespace Model +{ + using System; + using System.Collections.Generic; + + public partial class TabletStyleDetail + { + public string StyleID { get; set; } + public string Name { get; set; } + public string Descr { get; set; } + public string ElementID { get; set; } + public string StartX { get; set; } + public string StartY { get; set; } + public string FontSize { get; set; } + public string BreakLen { get; set; } + public string FontFamily { get; set; } + public string TwoOffset { get; set; } + public string ThreeOffset { get; set; } + public string FourOffset { get; set; } + public string IsActive { get; set; } + public string CUser { get; set; } + public string CDate { get; set; } + public string CTime { get; set; } + public string UUser { get; set; } + public string UDate { get; set; } + public string UTime { get; set; } + public string Width { get; set; } + public string Height { get; set; } + public string TextWidth { get; set; } + public string TextHeight { get; set; } + public string TextSpan { get; set; } + } +} +namespace Model +{ + using System; + using System.Collections.Generic; + public partial class transfer_register { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] diff --git a/web/App_Code/Model/Model.edmx b/web/App_Code/Model/Model.edmx index 0ac0afd..11fbac3 100644 --- a/web/App_Code/Model/Model.edmx +++ b/web/App_Code/Model/Model.edmx @@ -91,10 +91,10 @@ + - @@ -208,6 +208,8 @@ + + @@ -357,7 +359,7 @@ - + @@ -430,7 +432,7 @@ - + @@ -511,7 +513,7 @@ - + @@ -522,6 +524,17 @@ + + + + + + + + + + + @@ -845,8 +858,8 @@ - - + + @@ -1280,6 +1293,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1450,6 +1544,18 @@ + + + + + + + + + + + + @@ -1839,7 +1945,9 @@ - + + + @@ -2480,6 +2588,7 @@ + @@ -2530,6 +2639,10 @@ + + + + @@ -2575,6 +2688,10 @@ + + + + @@ -3282,7 +3399,7 @@ - + @@ -3359,7 +3476,7 @@ - + @@ -3450,8 +3567,8 @@ - - + + @@ -4954,6 +5071,7 @@ + @@ -4968,6 +5086,10 @@ + + + + @@ -5694,7 +5816,7 @@ - + @@ -5803,6 +5925,17 @@ + + + + + + + + + + + @@ -6023,6 +6156,8 @@ + + @@ -6034,6 +6169,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7189,6 +7405,18 @@ + + + + + + + + + + + + @@ -7397,6 +7625,8 @@ + + @@ -7416,6 +7646,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/App_Code/Model/Model.edmx.diagram b/web/App_Code/Model/Model.edmx.diagram index 8f962d8..e7af1ef 100644 --- a/web/App_Code/Model/Model.edmx.diagram +++ b/web/App_Code/Model/Model.edmx.diagram @@ -170,6 +170,7 @@ + @@ -183,7 +184,11 @@ - + + + + + diff --git a/web/App_Code/api/designerController.cs b/web/App_Code/api/designerController.cs index 4543535..c521c6e 100644 --- a/web/App_Code/api/designerController.cs +++ b/web/App_Code/api/designerController.cs @@ -3,6 +3,7 @@ using MINOM.COM.Utility; using Model; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using PagedList; using System; using System.Collections.Generic; using System.Linq; @@ -329,4 +330,40 @@ public class designerController : ApiController object[] obj = new StyleDataAccess().DelTabletStyle(StyleID); return Ok(new { result = obj[0].ToString(), message = obj[1].ToString() }); } + + [HttpPost] + [Route("api/tablet/GetTabletStyleList")] + public IHttpActionResult GetTabletStyleList([FromBody] dynamic data) + { + var qry = _db.TabletStyle.AsQueryable(); + //var count = qry.Count(); //pageSize = count;//一次取回?? + //var qryList = (pageSize > 0) ? qry.ToPagedList(page, pageSize).ToList() : qry.ToList(); + qry = qry.Where(x=>x.StyleID!= "000001"); + var ret = new + { + list = qry.Select(x => new + { + x.StyleID, + x.BackendImg, + x.Name, + x.RosterLimit, + x.Descr, + x.PrintMode, + x.PrintSize, + x.PaperSize, + details = _db.TabletStyleDetail.Where(y => y.StyleID == x.StyleID).Select(y => new + { + y.StyleID, + y.ElementID, y.Name,y.Descr,y.FontFamily,y.FontSize,y.Height,y.Width, + y.TextHeight,y.TextSpan,y.StartX,y.StartY,y.IsActive + }).ToList() + }), + papers = _db.TabletPaperSize.Select(z => new { z.PaperID, z.PaperName, z.Width, z.Height }).ToList(), + elements = _db.TabletElement.Select(w => new {w.Name,w.ElementID,w.SampleContent}).ToList(), + //count = count + }; + + if (ret.list == null) throw new HttpResponseException(HttpStatusCode.NotFound); + return Ok(ret); + } } \ No newline at end of file diff --git a/web/App_Code/api/orderController.cs b/web/App_Code/api/orderController.cs index a826abe..4add9d4 100644 --- a/web/App_Code/api/orderController.cs +++ b/web/App_Code/api/orderController.cs @@ -1219,7 +1219,7 @@ public class orderController : ApiController ? item.from_id : null; order.f_num_tablet = item.f_num_tablet; order.from_id_tablet = item.from_id_tablet; - order.print_id = item.GenerateSequentialId(); + order.print_id =(!string.IsNullOrEmpty(order.print_id)? order.print_id: item.GenerateSequentialId()); order.address = item.address; order.start_date = item.start_date.HasValue ? item.start_date : null; diff --git a/web/App_Code/api/shuwensController.cs b/web/App_Code/api/shuwensController.cs index 5fc1a38..dd2921d 100644 --- a/web/App_Code/api/shuwensController.cs +++ b/web/App_Code/api/shuwensController.cs @@ -16,6 +16,31 @@ public class shuwensController: BaseApiController // TODO: 在這裡新增建構函式邏輯 // } + [HttpPost] + [Route("api/shuwens/GetActShuwen")] + public IHttpActionResult GetActShuwen([FromBody] Model.activity_shuwen temp) + { + var qry = _db.activity_shuwen.AsQueryable(); + if (temp.act_num > 0) + { + qry = qry.Where(x => x.act_num == temp.act_num); + } + if (!string.IsNullOrEmpty(temp.shuwen_type)) + { + qry = qry.Where(x => x.shuwen_type == temp.shuwen_type); + } + return Ok(new + { + result = "Y", + data = qry.Select(x => new + { + x.act_num, + x.shuwen_type, + x.shuwen_num, + x.contents + }).FirstOrDefault() + }); + } [HttpPost] [Route("api/shuwens/GetShuwenTemplate")] diff --git a/web/admin/activity/reg.aspx b/web/admin/activity/reg.aspx index b661322..f8bf68a 100644 --- a/web/admin/activity/reg.aspx +++ b/web/admin/activity/reg.aspx @@ -1363,7 +1363,7 @@
- + diff --git a/web/admin/activity/shuwen02.vue b/web/admin/activity/shuwen02.vue index 2f2d81b..47384fd 100644 --- a/web/admin/activity/shuwen02.vue +++ b/web/admin/activity/shuwen02.vue @@ -10,9 +10,18 @@
+
+ + +
@@ -73,13 +82,14 @@
-
+
中元普渡祈福文疏
@@ -170,8 +180,11 @@ -