diff --git a/web/App_Code/Model/Model.Context.cs b/web/App_Code/Model/Model.Context.cs index efbcd6e..1388ca4 100644 --- a/web/App_Code/Model/Model.Context.cs +++ b/web/App_Code/Model/Model.Context.cs @@ -112,6 +112,8 @@ namespace Model public virtual DbSet hr_ins_ratio { get; set; } public virtual DbSet hr_org { get; set; } public virtual DbSet hr_section { get; set; } + public virtual DbSet activity_shuwen { get; set; } + public virtual DbSet shuwen_temp { 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 f46f0f6..18be874 100644 --- a/web/App_Code/Model/Model.cs +++ b/web/App_Code/Model/Model.cs @@ -423,6 +423,20 @@ namespace Model using System; using System.Collections.Generic; + public partial class activity_shuwen + { + public int act_num { get; set; } + public Nullable shuwen_num { get; set; } + public string shuwen_type { get; set; } + public string contents { get; set; } + public Nullable reg_time { get; set; } + } +} +namespace Model +{ + using System; + using System.Collections.Generic; + public partial class activity_spares { public int num { get; set; } @@ -2061,6 +2075,20 @@ namespace Model using System; using System.Collections.Generic; + public partial class shuwen_temp + { + public int num { get; set; } + public string shuwen_type { get; set; } + public string name { get; set; } + public string contents { get; set; } + public Nullable reg_time { get; set; } + } +} +namespace Model +{ + using System; + using System.Collections.Generic; + public partial class stock { [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 61685d5..0ac0afd 100644 --- a/web/App_Code/Model/Model.edmx +++ b/web/App_Code/Model/Model.edmx @@ -198,6 +198,17 @@ + + + + + + + + + + + @@ -700,17 +711,6 @@ - @@ -1188,6 +1188,16 @@ + + + + + + + + + + @@ -2448,6 +2458,7 @@ + @@ -2512,6 +2523,7 @@ + @@ -4954,6 +4966,8 @@ + + @@ -5999,6 +6013,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -7359,6 +7394,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/App_Code/Model/Model.edmx.diagram b/web/App_Code/Model/Model.edmx.diagram index 99ea8c3..8f962d8 100644 --- a/web/App_Code/Model/Model.edmx.diagram +++ b/web/App_Code/Model/Model.edmx.diagram @@ -182,6 +182,8 @@ + + diff --git a/web/App_Code/api/shuwensController.cs b/web/App_Code/api/shuwensController.cs new file mode 100644 index 0000000..5fc1a38 --- /dev/null +++ b/web/App_Code/api/shuwensController.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Http; + +/// +/// shuwensController 的摘要描述 +/// 0) + { + qry = qry.Where(x => x.num == temp.num); + } + return Ok(new {result="Y", data = qry.Select(x => new + { + x.num,x.shuwen_type,x.name,x.contents + }).FirstOrDefault() }); + } + + [HttpPost] + [Route("api/shuwens/ListShuwenTemplate")] + public IHttpActionResult ListShuwenTemplate([FromBody] Model.shuwen_temp temp) + { + var qry = _db.shuwen_temp.AsQueryable(); + if (temp!=null&& !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.num, + x.shuwen_type, + x.name, + x.contents + }).ToList() + }); + } +} \ No newline at end of file diff --git a/web/admin/activity/reg.aspx b/web/admin/activity/reg.aspx index 2e079de..b661322 100644 --- a/web/admin/activity/reg.aspx +++ b/web/admin/activity/reg.aspx @@ -288,10 +288,11 @@ { order_no: "D", member_name: "S", order_date: "2025-12-07" } ], }, + currentView: 'shuwen-component', - } }, + mounted() { this.search_dialog.current = this.search_dialog.controls.search1 this.loadUnfilledList(); @@ -1047,7 +1048,7 @@ -
+
@@ -1360,12 +1361,12 @@
- <%-- + - - --%> + +
diff --git a/web/admin/activity/shuwen02.vue b/web/admin/activity/shuwen02.vue index 6ad92b7..2f2d81b 100644 --- a/web/admin/activity/shuwen02.vue +++ b/web/admin/activity/shuwen02.vue @@ -1,371 +1,412 @@  - - + ` + let canvasHtml = document.getElementById("preview-container").outerHTML; //$("#preview-container").html(); + console.log(canvasHtml); + + let htmlContent = ` + + + + + + ${this.pageStyle} + + + ${canvasHtml} + + `; + + w.document.write(htmlContent); + w.document.close(); + w.onload = function () { + // 5. 將等待時間稍微拉長至 1.2 秒,確保大張的 SVG 底圖與外部字體(如標楷體)下載完畢 + setTimeout(() => { + w.focus(); + w.print(); + }, 1200); + } + }, + }, + + mounted() { + this.updateLayout(); + this.bindEvents(); + }, + + beforeDestroy() { + this.unbindEvents(); + }, + + activated() { + this.bindEvents(); + }, + + deactivated() { + this.unbindEvents(); + this.isDragging = false; + } +}; + + + \ No newline at end of file