改太多
This commit is contained in:
1 parent
be5352efed
commit
1cb2a7a35e
48 files changed
+17950
-465
No files matched your search
@@ -119,6 +119,10 @@ namespace Model
|
||||
public virtual DbSet<TabletPaperSize> TabletPaperSize { get; set; }
|
||||
public virtual DbSet<TabletStyle> TabletStyle { get; set; }
|
||||
public virtual DbSet<TabletStyleDetail> TabletStyleDetail { get; set; }
|
||||
public virtual DbSet<default_page> default_page { get; set; }
|
||||
public virtual DbSet<GuadaoSubDetail> GuadaoSubDetail { get; set; }
|
||||
public virtual DbSet<GuaDanOrderDetail> GuaDanOrderDetail { get; set; }
|
||||
public virtual DbSet<GuaDanLimits> GuaDanLimits { get; set; }
|
||||
|
||||
public virtual int pager_eztrust(Nullable<int> startRowIndex, Nullable<int> pageSize, string tableName, string columnName, string sqlWhere, string orderBy, ObjectParameter rowCount)
|
||||
{
|
||||
|
||||
@@ -883,6 +883,17 @@ namespace Model
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class default_page
|
||||
{
|
||||
public string u_id { get; set; }
|
||||
public string default_url { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class family_members
|
||||
{
|
||||
public int num { get; set; }
|
||||
@@ -1057,6 +1068,18 @@ namespace Model
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class GuaDanLimits
|
||||
{
|
||||
public string ParamNo { get; set; }
|
||||
public string ParamName { get; set; }
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class GuaDanOrder
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
@@ -1091,6 +1114,25 @@ namespace Model
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class GuaDanOrderDetail
|
||||
{
|
||||
public System.Guid Uuid { get; set; }
|
||||
public Nullable<System.Guid> RoomUuid { get; set; }
|
||||
public Nullable<System.Guid> BedUuid { get; set; }
|
||||
public string GuaDanDate { get; set; }
|
||||
public string Remark { get; set; }
|
||||
public string GuaDanOrderNo { get; set; }
|
||||
public Nullable<System.Guid> GuestUuid { get; set; }
|
||||
public Nullable<System.DateTime> CheckInAt { get; set; }
|
||||
public Nullable<System.DateTime> CheckOutAt { get; set; }
|
||||
public string StatusCode { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class GuaDanOrderGuest
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
@@ -1109,6 +1151,10 @@ namespace Model
|
||||
public Nullable<System.DateTime> CheckOutAt { get; set; }
|
||||
public string StatusCode { get; set; }
|
||||
public Nullable<System.Guid> OrderUuid { get; set; }
|
||||
public string Sex { get; set; }
|
||||
public string Handi { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Limits { get; set; }
|
||||
|
||||
public virtual follower followers { get; set; }
|
||||
public virtual GuaDanOrder GuaDanOrder { get; set; }
|
||||
@@ -1139,6 +1185,22 @@ namespace Model
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class GuadaoSubDetail
|
||||
{
|
||||
public System.Guid GUuid { get; set; }
|
||||
public Nullable<System.Guid> RoomUuid { get; set; }
|
||||
public Nullable<System.Guid> BedUuid { get; set; }
|
||||
public System.DateTime CheckInAt { get; set; }
|
||||
public Nullable<System.DateTime> CheckOutAt { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string StatusCode { get; set; }
|
||||
}
|
||||
}
|
||||
namespace Model
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class hr_arrange
|
||||
{
|
||||
public string company_id { get; set; }
|
||||
@@ -1719,6 +1781,7 @@ namespace Model
|
||||
public string print_id { get; set; }
|
||||
public Nullable<System.DateTime> UpdateTime { get; set; }
|
||||
public string style { get; set; }
|
||||
public Nullable<int> newid { get; set; }
|
||||
|
||||
public virtual actItem actItem { get; set; }
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
|
||||
@@ -445,6 +445,13 @@
|
||||
<Property Name="name_en" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="name_zh" Type="nvarchar" MaxLength="30" />
|
||||
</EntityType>
|
||||
<EntityType Name="default_page">
|
||||
<Key>
|
||||
<PropertyRef Name="u_id" />
|
||||
</Key>
|
||||
<Property Name="u_id" Type="varchar" MaxLength="50" Nullable="false" />
|
||||
<Property Name="default_url" Type="varchar" MaxLength="250" />
|
||||
</EntityType>
|
||||
<EntityType Name="family_members">
|
||||
<Key>
|
||||
<PropertyRef Name="num" />
|
||||
@@ -535,6 +542,14 @@
|
||||
<Property Name="tablet" Type="nvarchar(max)" />
|
||||
<Property Name="shuwen" Type="nvarchar(max)" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuaDanLimits">
|
||||
<Key>
|
||||
<PropertyRef Name="ParamNo" />
|
||||
</Key>
|
||||
<Property Name="ParamNo" Type="varchar" MaxLength="4" Nullable="false" />
|
||||
<Property Name="ParamName" Type="nvarchar" MaxLength="50" />
|
||||
<Property Name="Remark" Type="nvarchar" MaxLength="500" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuaDanOrder">
|
||||
<Key>
|
||||
<PropertyRef Name="Uuid" />
|
||||
@@ -554,6 +569,21 @@
|
||||
<Property Name="ActivityNum" Type="int" />
|
||||
<Property Name="IsCancel" Type="bit" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuaDanOrderDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="Uuid" />
|
||||
</Key>
|
||||
<Property Name="Uuid" Type="uniqueidentifier" Nullable="false" />
|
||||
<Property Name="RoomUuid" Type="uniqueidentifier" />
|
||||
<Property Name="BedUuid" Type="uniqueidentifier" />
|
||||
<Property Name="GuaDanDate" Type="varchar" MaxLength="10" />
|
||||
<Property Name="Remark" Type="nvarchar" MaxLength="50" />
|
||||
<Property Name="GuaDanOrderNo" Type="nvarchar" MaxLength="20" />
|
||||
<Property Name="GuestUuid" Type="uniqueidentifier" />
|
||||
<Property Name="CheckInAt" Type="date" />
|
||||
<Property Name="CheckOutAt" Type="date" />
|
||||
<Property Name="StatusCode" Type="nvarchar" MaxLength="20" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuaDanOrderGuest">
|
||||
<Key>
|
||||
<PropertyRef Name="Uuid" />
|
||||
@@ -568,6 +598,10 @@
|
||||
<Property Name="CheckOutAt" Type="date" />
|
||||
<Property Name="StatusCode" Type="nvarchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="OrderUuid" Type="uniqueidentifier" />
|
||||
<Property Name="Sex" Type="varchar" MaxLength="4" />
|
||||
<Property Name="Handi" Type="varchar" MaxLength="10" />
|
||||
<Property Name="Name" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="Limits" Type="varchar" MaxLength="100" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuadanTimeSetting">
|
||||
<Key>
|
||||
@@ -580,6 +614,19 @@
|
||||
<Property Name="CreatedAt" Type="datetime" />
|
||||
<Property Name="UpdatedAt" Type="datetime" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuadaoSubDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="GUuid" />
|
||||
<PropertyRef Name="CheckInAt" />
|
||||
</Key>
|
||||
<Property Name="GUuid" Type="uniqueidentifier" Nullable="false" />
|
||||
<Property Name="RoomUuid" Type="uniqueidentifier" />
|
||||
<Property Name="BedUuid" Type="uniqueidentifier" />
|
||||
<Property Name="CheckInAt" Type="date" Nullable="false" />
|
||||
<Property Name="CheckOutAt" Type="date" />
|
||||
<Property Name="Description" Type="nvarchar" MaxLength="500" />
|
||||
<Property Name="StatusCode" Type="nvarchar" MaxLength="20" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="hr_arrange">
|
||||
<Key>
|
||||
<PropertyRef Name="company_id" />
|
||||
@@ -994,6 +1041,7 @@
|
||||
<Property Name="printed_files" Type="nvarchar(max)" />
|
||||
<Property Name="UpdateTime" Type="datetime2" Precision="7" />
|
||||
<Property Name="style" Type="varchar" MaxLength="50" />
|
||||
<Property Name="newid" Type="int" />
|
||||
</EntityType>
|
||||
<EntityType Name="pro_order_record">
|
||||
<Key>
|
||||
@@ -1206,7 +1254,7 @@
|
||||
<PropertyRef Name="num" />
|
||||
</Key>
|
||||
<Property Name="num" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="shuwen_type" Type="varchar" MaxLength="4" Nullable="false" />
|
||||
<Property Name="shuwen_type" Type="nvarchar" MaxLength="4" />
|
||||
<Property Name="name" Type="nvarchar" MaxLength="50" />
|
||||
<Property Name="contents" Type="nvarchar(max)" />
|
||||
<Property Name="reg_time" Type="datetime" />
|
||||
@@ -2584,14 +2632,18 @@
|
||||
<EntitySet Name="bed_order_detail" EntityType="Self.bed_order_detail" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="company" EntityType="Self.company" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="country" EntityType="Self.country" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="default_page" EntityType="Self.default_page" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="family_members" EntityType="Self.family_members" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="files" EntityType="Self.files" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="followers" EntityType="Self.followers" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="followers_tablet" EntityType="Self.followers_tablet" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="followers_tablet_template" EntityType="Self.followers_tablet_template" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="GuaDanLimits" EntityType="Self.GuaDanLimits" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="GuaDanOrder" EntityType="Self.GuaDanOrder" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="GuaDanOrderDetail" EntityType="Self.GuaDanOrderDetail" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="GuaDanOrderGuest" EntityType="Self.GuaDanOrderGuest" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="GuadanTimeSetting" EntityType="Self.GuadanTimeSetting" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="GuadaoSubDetail" EntityType="Self.GuadaoSubDetail" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="hr_arrange" EntityType="Self.hr_arrange" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="hr_company" EntityType="Self.hr_company" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="hr_employee" EntityType="Self.hr_employee" Schema="dbo" store:Type="Tables" />
|
||||
@@ -3696,6 +3748,7 @@
|
||||
<NavigationProperty Name="accountings" Relationship="Model.FK_accounting_pro_order_detail" FromRole="pro_order_detail" ToRole="accounting" />
|
||||
<NavigationProperty Name="transfer_register" Relationship="Model.FK_transfer_register_pro_order_detail" FromRole="pro_order_detail" ToRole="transfer_register" />
|
||||
<Property Name="style" Type="String" Unicode="false" FixedLength="false" MaxLength="50" Nullable="true" />
|
||||
<Property Name="newid" Type="Int32" />
|
||||
</EntityType>
|
||||
<EntityType Name="pro_order_record">
|
||||
<Key>
|
||||
@@ -5090,6 +5143,10 @@
|
||||
<EntitySet Name="TabletPaperSize" EntityType="Model.TabletPaperSize" />
|
||||
<EntitySet Name="TabletStyle" EntityType="Model.TabletStyle" />
|
||||
<EntitySet Name="TabletStyleDetail" EntityType="Model.TabletStyleDetail" />
|
||||
<EntitySet Name="default_page" EntityType="Model.default_page" />
|
||||
<EntitySet Name="GuadaoSubDetail" EntityType="Model.GuadaoSubDetail" />
|
||||
<EntitySet Name="GuaDanOrderDetail" EntityType="Model.GuaDanOrderDetail" />
|
||||
<EntitySet Name="GuaDanLimits" EntityType="Model.GuaDanLimits" />
|
||||
</EntityContainer>
|
||||
<ComplexType Name="sp_helpdiagramdefinition_Result">
|
||||
<Property Type="Int32" Name="version" Nullable="true" />
|
||||
@@ -5734,6 +5791,10 @@
|
||||
<NavigationProperty Name="Room" Relationship="Model.FK_GuaDanOrderGuest_RoomUuid" FromRole="GuaDanOrderGuest" ToRole="Room" />
|
||||
<NavigationProperty Name="RegionRoomBedStatus" Relationship="Model.FK_GuaDanOrderGuest_StatusCode" FromRole="GuaDanOrderGuest" ToRole="RegionRoomBedStatus" />
|
||||
<NavigationProperty Name="RegionAndRoomAndBedSchedule" Relationship="Model.FK_Schedule_GuaDanOrderGuest" FromRole="GuaDanOrderGuest" ToRole="RegionAndRoomAndBedSchedule" />
|
||||
<Property Name="Sex" Type="String" MaxLength="4" FixedLength="false" Unicode="false" />
|
||||
<Property Name="Handi" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="Name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Limits" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
|
||||
</EntityType>
|
||||
<Association Name="FK_GuaDanOrderGuest_FOLLOWERS">
|
||||
<End Type="Model.follower" Role="follower" Multiplicity="0..1" />
|
||||
@@ -6164,7 +6225,7 @@
|
||||
<PropertyRef Name="num" />
|
||||
</Key>
|
||||
<Property Name="num" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
||||
<Property Name="shuwen_type" Type="String" Nullable="false" MaxLength="4" FixedLength="false" Unicode="false" />
|
||||
<Property Name="shuwen_type" Type="String" MaxLength="4" FixedLength="false" Unicode="true" />
|
||||
<Property Name="name" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
<Property Name="contents" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
||||
<Property Name="reg_time" Type="DateTime" Precision="3" />
|
||||
@@ -6250,6 +6311,49 @@
|
||||
<Property Name="TextHeight" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="TextSpan" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="default_page">
|
||||
<Key>
|
||||
<PropertyRef Name="u_id" />
|
||||
</Key>
|
||||
<Property Name="u_id" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="default_url" Type="String" MaxLength="250" FixedLength="false" Unicode="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuadaoSubDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="GUuid" />
|
||||
<PropertyRef Name="CheckInAt" />
|
||||
</Key>
|
||||
<Property Name="GUuid" Type="Guid" Nullable="false" />
|
||||
<Property Name="RoomUuid" Type="Guid" />
|
||||
<Property Name="BedUuid" Type="Guid" />
|
||||
<Property Name="CheckInAt" Type="DateTime" Nullable="false" Precision="0" />
|
||||
<Property Name="CheckOutAt" Type="DateTime" Precision="0" />
|
||||
<Property Name="Description" Type="String" MaxLength="500" FixedLength="false" Unicode="true" />
|
||||
<Property Name="StatusCode" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuaDanOrderDetail">
|
||||
<Key>
|
||||
<PropertyRef Name="Uuid" />
|
||||
</Key>
|
||||
<Property Name="Uuid" Type="Guid" Nullable="false" />
|
||||
<Property Name="RoomUuid" Type="Guid" />
|
||||
<Property Name="BedUuid" Type="Guid" />
|
||||
<Property Name="GuaDanDate" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="Remark" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
<Property Name="GuaDanOrderNo" Type="String" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
<Property Name="GuestUuid" Type="Guid" />
|
||||
<Property Name="CheckInAt" Type="DateTime" Precision="0" />
|
||||
<Property Name="CheckOutAt" Type="DateTime" Precision="0" />
|
||||
<Property Name="StatusCode" Type="String" MaxLength="20" FixedLength="false" Unicode="true" />
|
||||
</EntityType>
|
||||
<EntityType Name="GuaDanLimits">
|
||||
<Key>
|
||||
<PropertyRef Name="ParamNo" />
|
||||
</Key>
|
||||
<Property Name="ParamNo" Type="String" Nullable="false" MaxLength="4" FixedLength="false" Unicode="false" />
|
||||
<Property Name="ParamName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
|
||||
<Property Name="Remark" Type="String" MaxLength="500" FixedLength="false" Unicode="true" />
|
||||
</EntityType>
|
||||
</Schema>
|
||||
</edmx:ConceptualModels>
|
||||
<!-- C-S mapping content -->
|
||||
@@ -6834,6 +6938,7 @@
|
||||
<EntitySetMapping Name="pro_order_detail">
|
||||
<EntityTypeMapping TypeName="Model.pro_order_detail">
|
||||
<MappingFragment StoreEntitySet="pro_order_detail">
|
||||
<ScalarProperty Name="newid" ColumnName="newid" />
|
||||
<ScalarProperty Name="UpdateTime" ColumnName="UpdateTime" />
|
||||
<ScalarProperty Name="print_id" ColumnName="print_id" />
|
||||
<ScalarProperty Name="parent_num" ColumnName="parent_num" />
|
||||
@@ -7296,6 +7401,10 @@
|
||||
<EntitySetMapping Name="GuaDanOrderGuest">
|
||||
<EntityTypeMapping TypeName="Model.GuaDanOrderGuest">
|
||||
<MappingFragment StoreEntitySet="GuaDanOrderGuest">
|
||||
<ScalarProperty Name="Limits" ColumnName="Limits" />
|
||||
<ScalarProperty Name="Name" ColumnName="Name" />
|
||||
<ScalarProperty Name="Handi" ColumnName="Handi" />
|
||||
<ScalarProperty Name="Sex" ColumnName="Sex" />
|
||||
<ScalarProperty Name="OrderUuid" ColumnName="OrderUuid" />
|
||||
<ScalarProperty Name="StatusCode" ColumnName="StatusCode" />
|
||||
<ScalarProperty Name="CheckOutAt" ColumnName="CheckOutAt" />
|
||||
@@ -7730,6 +7839,52 @@
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="default_page">
|
||||
<EntityTypeMapping TypeName="Model.default_page">
|
||||
<MappingFragment StoreEntitySet="default_page">
|
||||
<ScalarProperty Name="default_url" ColumnName="default_url" />
|
||||
<ScalarProperty Name="u_id" ColumnName="u_id" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="GuadaoSubDetail">
|
||||
<EntityTypeMapping TypeName="Model.GuadaoSubDetail">
|
||||
<MappingFragment StoreEntitySet="GuadaoSubDetail">
|
||||
<ScalarProperty Name="StatusCode" ColumnName="StatusCode" />
|
||||
<ScalarProperty Name="Description" ColumnName="Description" />
|
||||
<ScalarProperty Name="CheckOutAt" ColumnName="CheckOutAt" />
|
||||
<ScalarProperty Name="CheckInAt" ColumnName="CheckInAt" />
|
||||
<ScalarProperty Name="BedUuid" ColumnName="BedUuid" />
|
||||
<ScalarProperty Name="RoomUuid" ColumnName="RoomUuid" />
|
||||
<ScalarProperty Name="GUuid" ColumnName="GUuid" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="GuaDanOrderDetail">
|
||||
<EntityTypeMapping TypeName="Model.GuaDanOrderDetail">
|
||||
<MappingFragment StoreEntitySet="GuaDanOrderDetail">
|
||||
<ScalarProperty Name="StatusCode" ColumnName="StatusCode" />
|
||||
<ScalarProperty Name="CheckOutAt" ColumnName="CheckOutAt" />
|
||||
<ScalarProperty Name="CheckInAt" ColumnName="CheckInAt" />
|
||||
<ScalarProperty Name="GuestUuid" ColumnName="GuestUuid" />
|
||||
<ScalarProperty Name="GuaDanOrderNo" ColumnName="GuaDanOrderNo" />
|
||||
<ScalarProperty Name="Remark" ColumnName="Remark" />
|
||||
<ScalarProperty Name="GuaDanDate" ColumnName="GuaDanDate" />
|
||||
<ScalarProperty Name="BedUuid" ColumnName="BedUuid" />
|
||||
<ScalarProperty Name="RoomUuid" ColumnName="RoomUuid" />
|
||||
<ScalarProperty Name="Uuid" ColumnName="Uuid" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="GuaDanLimits">
|
||||
<EntityTypeMapping TypeName="Model.GuaDanLimits">
|
||||
<MappingFragment StoreEntitySet="GuaDanLimits">
|
||||
<ScalarProperty Name="Remark" ColumnName="Remark" />
|
||||
<ScalarProperty Name="ParamName" ColumnName="ParamName" />
|
||||
<ScalarProperty Name="ParamNo" ColumnName="ParamNo" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
</EntityContainerMapping>
|
||||
</Mapping>
|
||||
</edmx:Mappings>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
|
||||
<!-- Diagram content (shape and connector positions) -->
|
||||
<edmx:Diagrams>
|
||||
<Diagram DiagramId="b267a343dc0c4bf0ae194b775754b108" Name="Diagram1" ZoomLevel="116">
|
||||
<Diagram DiagramId="b267a343dc0c4bf0ae194b775754b108" Name="Diagram1" ZoomLevel="127">
|
||||
<EntityTypeShape EntityType="Model.accounting" Width="1.5" PointX="22.5" PointY="22.125" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="Model.accounting_files" Width="1.5" PointX="15.75" PointY="27.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="Model.accounting_kind" Width="1.5" PointX="11.25" PointY="27.625" IsExpanded="true" />
|
||||
@@ -189,6 +189,10 @@
|
||||
<EntityTypeShape EntityType="Model.TabletPaperSize" Width="1.5" PointX="27.375" PointY="31.75" />
|
||||
<EntityTypeShape EntityType="Model.TabletStyle" Width="1.5" PointX="32.375" PointY="4.75" />
|
||||
<EntityTypeShape EntityType="Model.TabletStyleDetail" Width="1.5" PointX="32.375" PointY="22.75" />
|
||||
<EntityTypeShape EntityType="Model.default_page" Width="1.5" PointX="8.375" PointY="7.75" />
|
||||
<EntityTypeShape EntityType="Model.GuadaoSubDetail" Width="1.5" PointX="32.375" PointY="29.75" />
|
||||
<EntityTypeShape EntityType="Model.GuaDanOrderDetail" Width="1.5" PointX="33.375" PointY="0.75" />
|
||||
<EntityTypeShape EntityType="Model.GuaDanLimits" Width="1.5" PointX="21.375" PointY="0.75" />
|
||||
</Diagram>
|
||||
</edmx:Diagrams>
|
||||
</edmx:Designer>
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace Model.ViewModel
|
||||
public string deadline { get; set; }
|
||||
public string startDate_solar { get; set; }
|
||||
public string endDate_solar { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class actItem
|
||||
|
||||
@@ -1066,7 +1066,8 @@ public class FollowerController : ApiController
|
||||
{
|
||||
return Ok();
|
||||
}
|
||||
var orderrecord = _db.pro_order.Where(x => x.f_num == id).Include(x => x.pro_order_detail).Include(x => x.follower).ToList();
|
||||
var orderrecord = _db.pro_order.AsQueryable();
|
||||
orderrecord = orderrecord.Where(x => x.f_num == id).Include(x => x.pro_order_detail).Include(x => x.follower);//.ToList();
|
||||
var data = new
|
||||
{
|
||||
list = orderrecord.Select(x => new
|
||||
|
||||
@@ -286,6 +286,109 @@ public class activityController : ApiController
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/activity/GetListNewYet")]
|
||||
public IHttpActionResult GetListNewYet([FromBody] Model.ViewModel.activity q, int page, int pageSize = 10,
|
||||
string sortBy = "", bool sortDesc = false)
|
||||
{
|
||||
var qry = _db.activities.AsQueryable();
|
||||
if (!string.IsNullOrEmpty(q.subject))
|
||||
qry = qry.Where(o => o.subject.Contains(q.subject));
|
||||
if (q.kind.HasValue && q.kind > 0)
|
||||
{
|
||||
var _subKinds = new TreeView().subKinds(_db.activity_kind.Select(o => new TreeItem()
|
||||
{
|
||||
num = o.num,
|
||||
root = o.root,
|
||||
}).ToList(), q.kind.Value);
|
||||
|
||||
//qry = qry.Where(o => o.kind == q.kind);
|
||||
qry = qry.Where(o => o.kind == q.kind.Value || _subKinds.Any(s => s == o.kind));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(q.up_time1))
|
||||
{
|
||||
var s = DateTime.Parse(q.up_time1);
|
||||
qry = qry.Where(o => o.startDate_solar >= s);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(q.kindTxt))
|
||||
qry = qry.Where(o => o.activity_kind.kind.Contains(q.kindTxt));
|
||||
|
||||
if (sortBy.Equals("subject"))
|
||||
{
|
||||
if (sortDesc)
|
||||
qry = qry.OrderByDescending(o => o.subject);
|
||||
else
|
||||
qry = qry.OrderBy(o => o.subject);
|
||||
}
|
||||
else if (sortBy.Equals("kind"))
|
||||
{
|
||||
if (sortDesc)
|
||||
qry = qry.OrderByDescending(o => o.kind);
|
||||
else
|
||||
qry = qry.OrderBy(o => o.kind);
|
||||
}
|
||||
else if (sortBy.Equals("startDate_solar"))
|
||||
{
|
||||
if (sortDesc)
|
||||
qry = qry.OrderByDescending(o => o.startDate_solar);
|
||||
else
|
||||
qry = qry.OrderBy(o => o.startDate_solar);
|
||||
}
|
||||
else if (sortBy.Equals("endDate_solar"))
|
||||
{
|
||||
if (sortDesc)
|
||||
qry = qry.OrderByDescending(o => o.endDate_solar);
|
||||
else
|
||||
qry = qry.OrderBy(o => o.endDate_solar);
|
||||
}
|
||||
else if (sortBy.Equals("dueDate"))
|
||||
{
|
||||
if (sortDesc)
|
||||
qry = qry.OrderByDescending(o => o.dueDate);
|
||||
else
|
||||
qry = qry.OrderBy(o => o.dueDate);
|
||||
}
|
||||
else
|
||||
qry = qry.OrderByDescending(o => o.num);
|
||||
|
||||
var count = qry.Count(); //pageSize = count;//一次取回??
|
||||
var qryList = (pageSize > 0) ? qry.ToPagedList(page, pageSize).ToList() : qry.ToList();
|
||||
|
||||
var ret = new
|
||||
{
|
||||
list = qryList.Select(x => new
|
||||
{
|
||||
num = x.num,
|
||||
subject = x.subject,
|
||||
kind = x.kind,
|
||||
kindTxt = x.kind.HasValue ? x.activity_kind.kind : "",
|
||||
kindsTxt = x.kind.HasValue ? new TreeView().kindText(_db.activity_kind.Select(o => new TreeItem()
|
||||
{
|
||||
kind = o.kind,
|
||||
num = o.num,
|
||||
root = o.root,
|
||||
}).ToList(), x.kind) : "",
|
||||
startDate_solar = x.startDate_solar,
|
||||
endDate_solar = x.endDate_solar,
|
||||
startDate = x.startDate_solar?.ToString("yyyy-MM-dd"),
|
||||
endDate = x.endDate_solar?.ToString("yyyy-MM-dd"),
|
||||
startDate_lunar = x.startDate_lunar,
|
||||
endDate_lunar = x.endDate_lunar,
|
||||
dueDate = x.dueDate,
|
||||
orderCounts = _db.pro_order.Where(y => y.activity_num == x.num).Count(),
|
||||
}),
|
||||
count = count,
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
if (ret.list == null) throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||
return Ok(ret);
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/activity/GetListNew")]
|
||||
public IHttpActionResult GetListNew([FromBody] Model.ViewModel.activity q, int page, int pageSize = 10,
|
||||
@@ -311,6 +414,7 @@ public class activityController : ApiController
|
||||
qry = qry.Where(o => o.startDate_solar <=s&&o.endDate_solar>=s);
|
||||
}
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(q.startDate_solar)&& !string.IsNullOrEmpty(q.endDate_solar))
|
||||
{
|
||||
var sDate = DateTime.Parse(q.startDate_solar);
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Web.Http;
|
||||
using PagedList;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections;
|
||||
using System.Windows.Interop;
|
||||
|
||||
|
||||
// api/adminUser
|
||||
@@ -62,7 +63,15 @@ public class adminUserController : ApiController
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/adminUser/GetMyDefaultPage")]
|
||||
public IHttpActionResult GetMyDefaultPage([FromBody] Model.ViewModel.admin q)
|
||||
{
|
||||
var item = _db.default_page.Where(o => o.u_id == q.u_id).FirstOrDefault();
|
||||
if (item == null) throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||
|
||||
return Ok(new {result="ok",data=item});
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("api/adminUser/count")]
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
using PagedList;
|
||||
using System;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
/// <summary>
|
||||
/// billController 的摘要描述
|
||||
/// </summary>
|
||||
[ezAuthorize]
|
||||
public class billController : BaseApiController
|
||||
{
|
||||
public billController()
|
||||
{
|
||||
//
|
||||
// TODO: 在這裡新增建構函式邏輯
|
||||
//
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/bill/GetAuditList")]
|
||||
public IHttpActionResult GetAuditList([FromBody] dynamic data, int page, int pageSize = 10,
|
||||
string sortBy = "", bool sortDesc = false)
|
||||
{
|
||||
var json = data;
|
||||
var start_date = (json == null || json.start_date == null) ? "" : (string)json.start_date;
|
||||
var end_date = (json == null || json.end_date == null) ? "" : (string)json.end_date;
|
||||
var activity_num = (json == null || json.activity_num == null||(string)json.activity_num=="") ? 0 : (int)json.activity_num;
|
||||
//var args = new List<SqlParameter>();
|
||||
//StringBuilder sb = new StringBuilder();
|
||||
var qry = _db.transfer_register.AsQueryable();
|
||||
if (!string.IsNullOrEmpty(start_date))
|
||||
{
|
||||
qry = qry.Where(x=>x.check_date.Value.ToString("yyyyMMdd").CompareTo(start_date) >=0);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(end_date))
|
||||
{
|
||||
qry = qry.Where(x => x.check_date.Value.ToString("yyyyMMdd").CompareTo(end_date) <= 0);
|
||||
}
|
||||
if (activity_num > 0)
|
||||
{
|
||||
qry = qry.Where(x=>x.activity_num== activity_num);
|
||||
}
|
||||
qry = qry.OrderBy(x => x.id);
|
||||
var count = qry.Count();
|
||||
var qryList = (pageSize > 0) ? qry.ToPagedList(page, pageSize).ToList() : qry.ToList();
|
||||
var ret = new
|
||||
{
|
||||
list = qryList.Select(x => new
|
||||
{
|
||||
x.activity_num,x.id,x.name,x.pay_type,x.pay_mode,
|
||||
acc_name=_db.accounting_kind2.Where(y=>y.num==x.acc_num).Select(y=>y.kind).FirstOrDefault(),
|
||||
check_date=x.check_date.Value.ToString("yyyyMMdd"),
|
||||
followerName=_db.followers.Where(z=>z.num==x.f_num).Select(z=>z.u_name).FirstOrDefault(),
|
||||
x.check_amount,x.check_status
|
||||
}),
|
||||
count = count
|
||||
|
||||
};
|
||||
|
||||
|
||||
if (ret.list == null) throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||
return Ok(ret);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/bill/GetAuditDetailData")]
|
||||
public IHttpActionResult GetAuditDetailData([FromBody] dynamic data)
|
||||
{
|
||||
var json = data;
|
||||
var startDate =(json==null||json.startDate==null)?"": (string)json.startDate;
|
||||
var endDate = (json==null||json.endDate==null)?"":(string)json.endDate;
|
||||
var activityNum = (json == null || json.activityNum == null) ? 0 : (int)json.activityNum;
|
||||
var id = (json == null || json.id == null) ? 0 : (int)json.id;
|
||||
var args = new List<SqlParameter>();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("WITH Combined_JSON_Details AS ( ");
|
||||
sb.Append("SELECT ");
|
||||
sb.Append("t.id AS register_id, ");
|
||||
sb.Append("COALESCE(items.[f_num], CASE WHEN t.pay_mode = '個人' THEN t.f_num END) AS final_f_num, ");
|
||||
sb.Append("COALESCE(items.[follower_name], CASE WHEN t.pay_mode = '個人' THEN t.name END) AS final_follower_name, ");
|
||||
sb.Append("items.[pro_order_detail_num],items.[reconcile],items.[actitem_name],items.[activity_name], ");
|
||||
sb.Append("items.[register_date],items.[order_no],items.[price] ");
|
||||
sb.Append("FROM [transfer_register] AS t ");
|
||||
sb.Append("CROSS APPLY OPENJSON(t.[draft], CASE WHEN t.[draft] LIKE '%pro_order_detail_items%' THEN '$.pro_order_detail_items' ELSE '$' END) ");
|
||||
sb.Append("WITH ( ");
|
||||
sb.Append("[f_num] INT '$.f_num', ");
|
||||
sb.Append("[follower_name] NVARCHAR(50) '$.follower_name', ");
|
||||
sb.Append("[pro_order_detail_num] INT '$.pro_order_detail_num', ");
|
||||
sb.Append("[reconcile] DECIMAL(18,2) '$.reconcile', ");
|
||||
sb.Append("[actitem_name] NVARCHAR(100) '$.actitem_name', ");
|
||||
sb.Append(" [activity_name] NVARCHAR(100) '$.activity_name', ");
|
||||
sb.Append("[register_date] DATETIME2 '$.register_date', ");
|
||||
sb.Append("[order_no] VARCHAR(50) '$.order_no', ");
|
||||
sb.Append("[price] DECIMAL(18,2) '$.price' ");
|
||||
sb.Append(") AS items), ");
|
||||
sb.Append("Unique_Order_Activity AS ( ");
|
||||
sb.Append("SELECT pd.num AS pro_order_detail_num, MAX(p.activity_num) AS activity_num ");
|
||||
sb.Append("FROM pro_order_detail pd ");
|
||||
sb.Append("INNER JOIN pro_order p ON pd.order_no = p.order_no ");
|
||||
sb.Append("GROUP BY pd.num) ");
|
||||
sb.Append("SELECT ");
|
||||
sb.Append("t.id AS [轉帳序號], t.pay_mode AS [沖帳型態], convert(varchar(10),t.check_date,120) AS [沖帳日期], t.name AS [主要付款人], ");
|
||||
sb.Append("t.phone AS [付款人電話], t.amount AS [主單總金額], t.status AS [主單狀態], t.check_amount AS [已核對金額], ");
|
||||
sb.Append("t.f_num AS [付款人代號], k.kind AS [入帳帳戶], a.activity_num AS [法會編號], j.final_f_num AS [實際功德人代號], ");
|
||||
sb.Append("j.final_follower_name AS [實際功德人姓名], j.pro_order_detail_num AS [訂單明細編號], j.order_no AS [訂單編號], ");
|
||||
sb.Append("j.actitem_name AS [牌位/點燈項目], j.activity_name AS [法會名稱], j.price AS [項目原價], j.reconcile AS [本次實際沖帳金額], ");
|
||||
sb.Append("j.register_date AS [登記時間], [總金額] =(select sum(price) from pro_order_detail pd where pd.order_no in ( ");
|
||||
sb.Append("select order_no from pro_order p where activity_num=a.activity_num and p.f_num=j.final_f_num ) ) ");
|
||||
sb.Append("FROM [transfer_register] AS t ");
|
||||
sb.Append("INNER JOIN Combined_JSON_Details j ON t.id = j.register_id ");
|
||||
sb.Append("LEFT JOIN Unique_Order_Activity a ON a.pro_order_detail_num = j.pro_order_detail_num ");
|
||||
sb.Append("left join accounting_kind2 k on t.acc_num=k.num ");
|
||||
sb.Append("where 1=1 ");
|
||||
//and CONVERT(varchar,t.check_date,120)>='20260801' and convert(varchar,t.check_date,120)<='20260831'
|
||||
if (!string.IsNullOrEmpty(startDate))
|
||||
{
|
||||
sb.Append("and CONVERT(varchar,t.check_date,120)>=@startDate ");
|
||||
args.Add(new SqlParameter("startDate",startDate));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(endDate))
|
||||
{
|
||||
sb.Append("and CONVERT(varchar,t.check_date,120)<=@endDate ");
|
||||
args.Add(new SqlParameter("endDate", endDate));
|
||||
}
|
||||
if (activityNum>0)
|
||||
{
|
||||
sb.Append("and a.activity_num=@activityNum ");
|
||||
args.Add(new SqlParameter("activityNum", activityNum));
|
||||
}
|
||||
if (id > 0)
|
||||
{
|
||||
sb.Append("and t.id=@id ");
|
||||
args.Add(new SqlParameter("id", id));
|
||||
}
|
||||
sb.Append("ORDER BY a.activity_num,j.order_no ");
|
||||
sb.Append("for json auto ");
|
||||
var result=_db.Database.SqlQuery<string>(sb.ToString(),args.ToArray()).ToList();
|
||||
List<dynamic> list=new List<dynamic>();
|
||||
var fullJsonString = string.Join("", result);
|
||||
dynamic results = Newtonsoft.Json.JsonConvert.DeserializeObject<List<dynamic>>(fullJsonString);
|
||||
//foreach (var r in fullJsonString)
|
||||
//{
|
||||
// dynamic results = Newtonsoft.Json.JsonConvert.DeserializeObject<List<dynamic>>(r);
|
||||
// list.Add(results);
|
||||
//}
|
||||
return Ok(new
|
||||
{
|
||||
list= results
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,11 +14,13 @@ using System.Data.Entity;
|
||||
using System.Data.Entity.Core.Objects;
|
||||
using System.Diagnostics;
|
||||
using System.IdentityModel.Metadata;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Http;
|
||||
using static TreeView;
|
||||
@@ -211,6 +213,69 @@ public class orderController : ApiController
|
||||
return count;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/order/import")]
|
||||
public IHttpActionResult import() {
|
||||
|
||||
// 1. 檢查請求是否為 multipart/form-data
|
||||
if (!Request.Content.IsMimeMultipartContent())
|
||||
{
|
||||
return Content(HttpStatusCode.UnsupportedMediaType, "不支援的媒體類型,必須是表單資料。");
|
||||
}
|
||||
|
||||
// 2. 定義伺服器上的暫存/儲存資料夾路徑
|
||||
var rootUrl = HttpContext.Current.Server.MapPath("~/upload/temp");
|
||||
|
||||
// 確保資料夾存在
|
||||
if (!Directory.Exists(rootUrl))
|
||||
{
|
||||
Directory.CreateDirectory(rootUrl);
|
||||
}
|
||||
|
||||
// 3. 使用 StreamProvider 來自動接收並寫入檔案
|
||||
var provider = new MultipartFormDataStreamProvider(rootUrl);
|
||||
|
||||
try
|
||||
{
|
||||
// 非同步讀取表單內容,檔案會在此時被自動寫入 rootUrl 資料夾(檔名會變成 BodyPart_xxx 暫存名稱)
|
||||
Request.Content.ReadAsMultipartAsync(provider);
|
||||
|
||||
// 4. 取得前端傳過來的其他純文字欄位 (例如:formData.append('userId', '123'))
|
||||
string act_num = provider.FormData["act_num"];
|
||||
|
||||
// 5. 處理檔案(將暫存檔更名為原本的檔案名稱)
|
||||
foreach (var fileData in provider.FileData)
|
||||
{
|
||||
// 取得原始檔名(通常帶有雙引號,如 "photo.jpg",需要去除)
|
||||
string originalFileName = fileData.Headers.ContentDisposition.FileName.Trim('"');
|
||||
|
||||
// 取得當前寫入的暫存路徑
|
||||
string localFileName = fileData.LocalFileName;
|
||||
|
||||
// 組合最終要儲存的完整路徑
|
||||
string finalFilePath = Path.Combine(rootUrl, originalFileName);
|
||||
|
||||
// 如果已有同名檔案,先刪除或自行加上序號、GUID 防止覆蓋
|
||||
if (File.Exists(finalFilePath))
|
||||
{
|
||||
File.Delete(finalFilePath);
|
||||
}
|
||||
|
||||
// 將暫存檔重新命名/移動到最終目的地
|
||||
File.Move(localFileName, finalFilePath);
|
||||
}
|
||||
//讀取內容
|
||||
|
||||
|
||||
return Ok(new { message = "檔案上傳成功!" });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return InternalServerError(ex);
|
||||
}
|
||||
return Ok(new { result = "Y", message = "完成" });
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/order/BatchSave")]
|
||||
public IHttpActionResult BatchSave([FromBody] Model.ViewModel.pro_order po)
|
||||
|
||||
@@ -109,5 +109,40 @@ public class orderdetailController:ApiController
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/orderdetail/GetDetailToPrintByOrder")]
|
||||
public IHttpActionResult GetDetailToPrintByOrder([FromBody] dynamic data)
|
||||
{
|
||||
if (data.param is Newtonsoft.Json.Linq.JArray items)
|
||||
{
|
||||
string[] details = new string[items.Count];
|
||||
int i = 0;
|
||||
foreach (var item in items)
|
||||
{
|
||||
details[i] = item["order_no"].ToString();
|
||||
i++;
|
||||
}
|
||||
|
||||
var parameters = details.Select((s, j) => "@p" + j).ToArray();
|
||||
string sql = $"select * from pro_order_detail where order_no in ({string.Join(",", parameters)}) ";
|
||||
sql = sql + $"and num not in(select distinct parent_num from pro_order_detail where order_no in ({string.Join(",", parameters)}) and parent_num is not null)";
|
||||
int l = 0;
|
||||
List<SqlParameter> sqlList = new List<SqlParameter>();
|
||||
foreach (var item in details)
|
||||
{
|
||||
sqlList.Add(new SqlParameter("@p" + l, item));
|
||||
l++;
|
||||
}
|
||||
SqlParameter[] p = sqlList.ToArray();
|
||||
var ret = _db.Database.SqlQuery<pro_order_detail>(sql, p).ToList();
|
||||
if (ret == null) throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||
return Ok(ret);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new HttpResponseException(HttpStatusCode.NotFound);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ public class pivot01Controller : ApiController
|
||||
|
||||
// 建立查詢 SQL
|
||||
string sql = @"
|
||||
SELECT * FROM [報名明細查詢]
|
||||
SELECT * FROM [報名明細查詢_功德主]
|
||||
WHERE 法會ID = @activityNum
|
||||
ORDER BY 報名日期 DESC, 報名編號 DESC
|
||||
";
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
using Newtonsoft.Json;
|
||||
using PagedList;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using PagedList;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections;
|
||||
using System.Data.Entity;
|
||||
using static Model.admin_log;
|
||||
|
||||
// api/pivot
|
||||
[ezAuthorize]
|
||||
@@ -35,6 +36,10 @@ public class pivotController : ApiController
|
||||
{
|
||||
try
|
||||
{
|
||||
IQueryable<int> subQuery =_db.pro_order_detail
|
||||
.Where(d => d.parent_num != null)
|
||||
.Select(d => d.parent_num.Value)
|
||||
.Distinct();
|
||||
// 對應 README.md 中的視圖查詢結構,按顏色分類欄位
|
||||
var query = from pod in _db.pro_order_detail
|
||||
join po in _db.pro_order on pod.order_no equals po.order_no
|
||||
@@ -42,6 +47,7 @@ public class pivotController : ApiController
|
||||
join act in _db.activities on po.activity_num equals act.num
|
||||
join f in _db.followers on po.f_num equals f.num
|
||||
join aik in _db.actItem_kind on ai.kind equals aik.num
|
||||
|
||||
select new
|
||||
{
|
||||
// 🟠 橘色欄位 - 法會基礎資料 (法會相關的直接來源)
|
||||
@@ -57,7 +63,7 @@ public class pivotController : ApiController
|
||||
報名日期 = po.up_time,
|
||||
|
||||
// 🟢綠色欄位 - 功德資訊欄位 (功德相關資訊)
|
||||
功德主 = pod.parent_num != null ? "是" : "否",
|
||||
功德主 = subQuery.Contains(pod.num) ? "是" : "否", //pod.parent_num != null ? "是" : "否",
|
||||
功德類型 = aik.kind,
|
||||
功德名稱 = ai.subject,
|
||||
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
using DocumentFormat.OpenXml;
|
||||
using DocumentFormat.OpenXml.Drawing.Charts;
|
||||
using DocumentFormat.OpenXml.Office2010.PowerPoint;
|
||||
//using DocumentFormat.OpenXml.Drawing.Charts;
|
||||
//using DocumentFormat.OpenXml.Office2010.PowerPoint;
|
||||
using DocumentFormat.OpenXml.Packaging;
|
||||
//using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using DocumentFormat.OpenXml.Wordprocessing;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using PagedList;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
|
||||
/// <summary>
|
||||
/// shuwensController 的摘要描述
|
||||
@@ -146,12 +150,30 @@ public class shuwensController : BaseApiController
|
||||
public IHttpActionResult RenderShuWenByGong([FromBody] dynamic data)
|
||||
{
|
||||
var jsonData = data;
|
||||
var nums = (string)jsonData.activitynum;
|
||||
string[] numSplit = nums.Split(',');
|
||||
|
||||
var mode=(string)jsonData.mode;
|
||||
var xStart=(jsonData==null||jsonData.xStart==null)?"":(string)jsonData.xStart;
|
||||
var sStart = (jsonData == null || jsonData.sStart==null) ? "" : (string)jsonData.sStart;
|
||||
mode = "A";
|
||||
StringBuilder sb= new StringBuilder();
|
||||
List<int> args = new List<int>();
|
||||
List<string> parameters =new List<string>();
|
||||
List<SqlParameter> parameterList = new List<SqlParameter>();
|
||||
int a = 1;
|
||||
foreach (var num in numSplit)
|
||||
{
|
||||
args.Append(int.Parse(num));
|
||||
parameterList.Add(new SqlParameter($"num{a}", num));
|
||||
parameters.Add($"@num{a}");
|
||||
a++;
|
||||
}
|
||||
|
||||
|
||||
sb.Append("with gong as (select* from pro_order_detail ");
|
||||
sb.Append("where order_no in (select order_no from pro_order ");
|
||||
sb.Append("where activity_num in (72, 73)) ");
|
||||
sb.Append($"where activity_num in ({string.Join(",",parameters.ToArray())})) ");
|
||||
sb.Append("and (actItem_num in ");
|
||||
sb.Append("(select item_num from act_bom a ");
|
||||
sb.Append("left join actItem b on a.item_num = b.num ");
|
||||
@@ -160,13 +182,19 @@ public class shuwensController : BaseApiController
|
||||
sb.Append("select * from pro_order_detail a ");
|
||||
sb.Append("where (num in (select num from gong) ");
|
||||
sb.Append("or parent_num in (select num from gong)) ");
|
||||
var list=_db.Database.SqlQuery<Model.pro_order_detail>(sb.ToString()).ToList();
|
||||
Console.WriteLine(sb.ToString());
|
||||
var list=_db.Database.SqlQuery<Model.pro_order_detail>(sb.ToString(), parameterList.ToArray()).ToList();
|
||||
var head_list=list.Where(x=>x.parent_num==null).ToList();//消災,要參數化
|
||||
|
||||
var qry = _db.TabletStyleDetail.AsQueryable();
|
||||
var styles = qry.ToList();
|
||||
var ret = new object() { };
|
||||
using (WordprocessingDocument wordDocument = WordprocessingDocument.Create("d://HelloWorld.docx", WordprocessingDocumentType.Document))
|
||||
if( !Directory.Exists( Path.Combine(HttpContext.Current.Server.MapPath("~/rpt"), "shuwen")))
|
||||
{
|
||||
Directory.CreateDirectory(Path.Combine(HttpContext.Current.Server.MapPath("~/rpt"), "shuwen"));
|
||||
}
|
||||
string templatePath = Path.Combine(HttpContext.Current.Server.MapPath("~/rpt"), "shuwen", "template.docx");
|
||||
using (WordprocessingDocument wordDocument = WordprocessingDocument.Create(templatePath, WordprocessingDocumentType.Document))
|
||||
{
|
||||
// Add a main document part
|
||||
MainDocumentPart mainPart = wordDocument.AddMainDocumentPart();
|
||||
@@ -175,10 +203,31 @@ public class shuwensController : BaseApiController
|
||||
|
||||
List<string> result = new List<string>();
|
||||
var nowContent = new List<string>();
|
||||
|
||||
Paragraph para0 = new Paragraph();
|
||||
Run run0 = new Run();
|
||||
RunProperties runProps0 = new RunProperties(
|
||||
new Bold(),
|
||||
new FontSize() { Val = "36" },
|
||||
new RunFonts()
|
||||
{
|
||||
Ascii = "DFKai-SB", // 英數字型使用標楷體
|
||||
EastAsia = "DFKai-SB" // 中文字型使用標楷體
|
||||
}
|
||||
);
|
||||
run0.Append(runProps0);
|
||||
for (int gg=1;gg<=12;gg++)
|
||||
{
|
||||
Text txt = new Text($" ") { Space = DocumentFormat.OpenXml.SpaceProcessingModeValues.Preserve };
|
||||
run0.AppendChild(txt);
|
||||
}
|
||||
run0.AppendChild(new Text($"消災祈福名單"));
|
||||
para0.Append(run0);
|
||||
body.AppendChild(para0);
|
||||
foreach (var item in head_list)
|
||||
{
|
||||
//消災牌位
|
||||
var detail_list = list.Where(x => x.parent_num == item.num && x.print_id.Contains("X")).ToList();
|
||||
var detail_list = list.Where(x => x.parent_num == item.num && x.print_id.Contains(xStart)).ToList();
|
||||
|
||||
foreach (var d in detail_list)
|
||||
{
|
||||
@@ -360,115 +409,9 @@ public class shuwensController : BaseApiController
|
||||
if (leftItemsArray != null && leftItemsArray.Count > 0)
|
||||
nowContent.Add(string.Join(" ", leftItemsArray.Select(token => token["fam_name"]?.ToString().Replace("\r", "").Replace("\n", ""))) + ";");
|
||||
}
|
||||
//if (nowContent.Count > 6)
|
||||
//{
|
||||
// Paragraph para1 = new Paragraph();
|
||||
// //Run run1 = para1.AppendChild(new Run());
|
||||
// Run run1 = new Run();
|
||||
// RunProperties runProps1 = new RunProperties(
|
||||
// //new Bold(),
|
||||
// //new Italic(),
|
||||
// new FontSize() { Val = "36" }, // 12 pt
|
||||
// //new Color() { Val = "FF0000" }, // Red Text
|
||||
// new RunFonts()
|
||||
// {
|
||||
// Ascii = "DFKai-SB", // 英數字型使用標楷體
|
||||
// EastAsia = "DFKai-SB" // 中文字型使用標楷體
|
||||
// }
|
||||
// );
|
||||
|
||||
// // 建立段落屬性
|
||||
// ParagraphProperties pPr1 = new ParagraphProperties();
|
||||
// pPr1.Append(new TextDirection() { Val = TextDirectionValues.TopToBottomRightToLeft });
|
||||
// // 建立縮排物件
|
||||
// // 設定左縮排為 0,首行縮排 480 dxa (約 2 中文字寬)
|
||||
// Indentation ind = new Indentation() { Left = "720", LeftChars = 300 };
|
||||
|
||||
// // 將縮排加入段落屬性
|
||||
// pPr1.Append(ind);
|
||||
// para1.Append(pPr1);
|
||||
// run1.Append(runProps1);
|
||||
// string[] splits = string.Join("", nowContent).Split(';');
|
||||
// int j = 0;
|
||||
// foreach (var txt in splits)
|
||||
// {
|
||||
// run1.Append(new Text($"{string.Join(" ", txt)}"));
|
||||
// if (j != splits.Length - 1)
|
||||
// {
|
||||
// run1.Append(new Break());
|
||||
// }
|
||||
// j++;
|
||||
// }
|
||||
// para1.Append(run1);
|
||||
// body.AppendChild(para1);
|
||||
// nowContent.Clear();
|
||||
//}
|
||||
//if(string.Join(" ",nowContent).Length > 6)
|
||||
//{
|
||||
// if (result.Count > 0)
|
||||
// {
|
||||
// Paragraph para = body.AppendChild(new Paragraph());
|
||||
// Run run = para.AppendChild(new Run());
|
||||
// RunProperties runProps = new RunProperties(
|
||||
// //new Bold(),
|
||||
// //new Italic(),
|
||||
// new FontSize() { Val = "36" }, // 12 pt
|
||||
// //new Color() { Val = "FF0000" }, // Red Text
|
||||
// new RunFonts()
|
||||
// {
|
||||
// Ascii = "DFKai-SB", // 英數字型使用標楷體
|
||||
// EastAsia = "DFKai-SB" // 中文字型使用標楷體
|
||||
// }
|
||||
// );
|
||||
// run.Append(runProps);
|
||||
// run.AppendChild(new Text($"{string.Join(" ", result)}"));
|
||||
// }
|
||||
// result = new List<string>();
|
||||
|
||||
|
||||
// Paragraph para1 = body.AppendChild(new Paragraph());
|
||||
// Run run1 = para1.AppendChild(new Run());
|
||||
// RunProperties runProps1 = new RunProperties(
|
||||
// //new Bold(),
|
||||
// //new Italic(),
|
||||
// new FontSize() { Val = "36" }, // 12 pt
|
||||
// //new Color() { Val = "FF0000" }, // Red Text
|
||||
// new RunFonts()
|
||||
// {
|
||||
// Ascii = "DFKai-SB", // 英數字型使用標楷體
|
||||
// EastAsia = "DFKai-SB" // 中文字型使用標楷體
|
||||
// }
|
||||
// );
|
||||
// run1.Append(runProps1);
|
||||
// run1.AppendChild(new Text($"{string.Join(" ", nowContent)}"));
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// result.AddRange(nowContent);
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
//if (result.Count > 5)
|
||||
//{
|
||||
// Paragraph para = body.AppendChild(new Paragraph());
|
||||
// Run run = para.AppendChild(new Run());
|
||||
// RunProperties runProps = new RunProperties(
|
||||
// //new Bold(),
|
||||
// //new Italic(),
|
||||
// new FontSize() { Val = "36" }, // 12 pt
|
||||
// //new Color() { Val = "FF0000" }, // Red Text
|
||||
// new RunFonts()
|
||||
// {
|
||||
// Ascii = "DFKai-SB", // 英數字型使用標楷體
|
||||
// EastAsia = "DFKai-SB" // 中文字型使用標楷體
|
||||
// }
|
||||
// );
|
||||
// run.Append(runProps);
|
||||
// run.AppendChild(new Text($"{string.Join(" ", result)}"));
|
||||
|
||||
// result = new List<string>();
|
||||
//}
|
||||
if (nowContent.Count > 10000)
|
||||
{
|
||||
Paragraph para1 = new Paragraph();
|
||||
@@ -524,7 +467,7 @@ public class shuwensController : BaseApiController
|
||||
if (nowContent.Count > 0)
|
||||
{
|
||||
Paragraph para1 = new Paragraph();
|
||||
//Run run1 = para1.AppendChild(new Run());
|
||||
|
||||
Run run1 = new Run();
|
||||
RunProperties runProps1 = new RunProperties(
|
||||
//new Bold(),
|
||||
@@ -572,26 +515,6 @@ public class shuwensController : BaseApiController
|
||||
body.AppendChild(para1);
|
||||
nowContent.Clear();
|
||||
}
|
||||
//if (result.Count > 0)
|
||||
//{
|
||||
// Paragraph para = body.AppendChild(new Paragraph());
|
||||
// Run run = para.AppendChild(new Run());
|
||||
// RunProperties runProps = new RunProperties(
|
||||
// //new Bold(),
|
||||
// //new Italic(),
|
||||
// new FontSize() { Val = "36" }, // 12 pt
|
||||
// //new Color() { Val = "FF0000" }, // Red Text
|
||||
// new RunFonts()
|
||||
// {
|
||||
// Ascii = "DFKai-SB", // 英數字型使用標楷體
|
||||
// EastAsia = "DFKai-SB" // 中文字型使用標楷體
|
||||
// }
|
||||
// );
|
||||
// run.Append(runProps);
|
||||
// run.AppendChild(new Text($"{string.Join(" ", result)}"));
|
||||
|
||||
// result = new List<string>();
|
||||
//}
|
||||
|
||||
Paragraph pageBreakParagraph = new Paragraph(
|
||||
new Run(
|
||||
@@ -603,11 +526,31 @@ public class shuwensController : BaseApiController
|
||||
body.Append(pageBreakParagraph);
|
||||
//先強制換頁
|
||||
//在處理超薦牌位
|
||||
Paragraph para9 = new Paragraph();
|
||||
Run run9 = new Run();
|
||||
RunProperties runProps9 = new RunProperties(
|
||||
new Bold(),
|
||||
new FontSize() { Val = "36" },
|
||||
new RunFonts()
|
||||
{
|
||||
Ascii = "DFKai-SB", // 英數字型使用標楷體
|
||||
EastAsia = "DFKai-SB" // 中文字型使用標楷體
|
||||
}
|
||||
);
|
||||
run9.Append(runProps9);
|
||||
for (int gg = 1; gg <= 12; gg++)
|
||||
{
|
||||
Text txt= new Text($" ") { Space = DocumentFormat.OpenXml.SpaceProcessingModeValues.Preserve };
|
||||
run9.AppendChild(txt);
|
||||
}
|
||||
run9.AppendChild(new Text($"佛力超薦名單"));
|
||||
para9.Append(run9);
|
||||
body.AppendChild(para9);
|
||||
result = new List<string>();
|
||||
foreach (var item in head_list)
|
||||
{
|
||||
//S要參數化
|
||||
var detail_list = list.Where(x => x.parent_num == item.num && x.print_id.Contains("S")).ToList();
|
||||
var detail_list = list.Where(x => x.parent_num == item.num && x.print_id.Contains(sStart)).ToList();
|
||||
|
||||
//分兩種,一種每一張呈現,一種同樣陽上的拚在一起
|
||||
foreach(var d in detail_list)
|
||||
@@ -857,9 +800,9 @@ public class shuwensController : BaseApiController
|
||||
run1.Append(runProps1);
|
||||
string[] splits = string.Join("", nowContent).Split(';');
|
||||
int j = 0;
|
||||
foreach (var txt in splits)
|
||||
foreach (var txt1 in splits)
|
||||
{
|
||||
run1.Append(new Text($"{string.Join(" ", txt)}"));
|
||||
run1.Append(new Text($"{string.Join(" ", txt1)}"));
|
||||
if (j != splits.Length - 1)
|
||||
{
|
||||
run1.Append(new Break());
|
||||
@@ -900,7 +843,8 @@ public class shuwensController : BaseApiController
|
||||
}
|
||||
);
|
||||
run2.Append(runProps2);
|
||||
run2.AppendChild(new Text($"陽上報恩人 "));
|
||||
Text txt = new Text($"陽上報恩人 ") { Space = DocumentFormat.OpenXml.SpaceProcessingModeValues.Preserve };
|
||||
run2.AppendChild(txt);
|
||||
|
||||
Run run4 = para2.AppendChild(new Run());
|
||||
RunProperties runProps4 = new RunProperties(
|
||||
@@ -951,7 +895,8 @@ public class shuwensController : BaseApiController
|
||||
}
|
||||
return Ok(new
|
||||
{
|
||||
list= head_list
|
||||
//list= head_list,
|
||||
filePath="/rpt/shuwen/template.docx"
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -184,6 +184,7 @@ public class statisticsController: ApiController
|
||||
//{
|
||||
// query = query.Where(a => a.endDate_solar.Value.ToString("yyyyMMdd").CompareTo(e_date) <= 0);
|
||||
//}
|
||||
|
||||
var data = (from a in _db.activities
|
||||
join b in _db.pro_order on a.num equals b.activity_num
|
||||
join c in _db.pro_order_detail on b.order_no equals c.order_no
|
||||
@@ -200,17 +201,17 @@ public class statisticsController: ApiController
|
||||
item_subject = f.subject,
|
||||
c.qty,
|
||||
c.price,
|
||||
a.startDate_solar,
|
||||
a.endDate_solar
|
||||
startDate_solar=a.startDate_solar==null?DateTime.MinValue:a.startDate_solar,
|
||||
endDate_solar=a.endDate_solar==null?DateTime.MinValue:a.endDate_solar
|
||||
}).ToList();
|
||||
|
||||
if (!string.IsNullOrEmpty(s_date))
|
||||
{
|
||||
data = data.Where(a => a.startDate_solar.Value.ToString("yyyyMMdd").CompareTo(s_date) >= 0).ToList();
|
||||
data = data.Where(a => a.startDate_solar.Value.ToString("yyyyMMdd").CompareTo(s_date.Replace("-","")) >= 0).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(e_date))
|
||||
{
|
||||
data = data.Where(a => a.endDate_solar.Value.ToString("yyyyMMdd").CompareTo(e_date) <= 0).ToList();
|
||||
data = data.Where(a => a.endDate_solar.Value.ToString("yyyyMMdd").CompareTo(e_date.Replace("-", "")) <= 0).ToList();
|
||||
}
|
||||
int i = 0;
|
||||
i++;
|
||||
|
||||
+11965
File diff suppressed because it is too large.
Load diff
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Vue.js v2.6.11
|
||||
* (c) 2014-2019 Evan You
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Vue=t()}(this,function(){"use strict";var e=Object.freeze({});function t(e){return null==e}function n(e){return null!=e}function r(e){return!0===e}function i(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function o(e){return null!==e&&"object"==typeof e}var a=Object.prototype.toString;function s(e){return"[object Object]"===a.call(e)}function c(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function u(e){return n(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function l(e){return null==e?"":Array.isArray(e)||s(e)&&e.toString===a?JSON.stringify(e,null,2):String(e)}function f(e){var t=parseFloat(e);return isNaN(t)?e:t}function p(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var d=p("slot,component",!0),v=p("key,ref,slot,slot-scope,is");function h(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var m=Object.prototype.hasOwnProperty;function y(e,t){return m.call(e,t)}function g(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var _=/-(\w)/g,b=g(function(e){return e.replace(_,function(e,t){return t?t.toUpperCase():""})}),$=g(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),w=/\B([A-Z])/g,C=g(function(e){return e.replace(w,"-$1").toLowerCase()});var x=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function k(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function A(e,t){for(var n in t)e[n]=t[n];return e}function O(e){for(var t={},n=0;n<e.length;n++)e[n]&&A(t,e[n]);return t}function S(e,t,n){}var T=function(e,t,n){return!1},E=function(e){return e};function N(e,t){if(e===t)return!0;var n=o(e),r=o(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var i=Array.isArray(e),a=Array.isArray(t);if(i&&a)return e.length===t.length&&e.every(function(e,n){return N(e,t[n])});if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(i||a)return!1;var s=Object.keys(e),c=Object.keys(t);return s.length===c.length&&s.every(function(n){return N(e[n],t[n])})}catch(e){return!1}}function j(e,t){for(var n=0;n<e.length;n++)if(N(e[n],t))return n;return-1}function D(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var L="data-server-rendered",M=["component","directive","filter"],I=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],F={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:T,isReservedAttr:T,isUnknownElement:T,getTagNamespace:S,parsePlatformTagName:E,mustUseProp:T,async:!0,_lifecycleHooks:I},P=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function R(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var H=new RegExp("[^"+P.source+".$_\\d]");var B,U="__proto__"in{},z="undefined"!=typeof window,V="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,K=V&&WXEnvironment.platform.toLowerCase(),J=z&&window.navigator.userAgent.toLowerCase(),q=J&&/msie|trident/.test(J),W=J&&J.indexOf("msie 9.0")>0,Z=J&&J.indexOf("edge/")>0,G=(J&&J.indexOf("android"),J&&/iphone|ipad|ipod|ios/.test(J)||"ios"===K),X=(J&&/chrome\/\d+/.test(J),J&&/phantomjs/.test(J),J&&J.match(/firefox\/(\d+)/)),Y={}.watch,Q=!1;if(z)try{var ee={};Object.defineProperty(ee,"passive",{get:function(){Q=!0}}),window.addEventListener("test-passive",null,ee)}catch(e){}var te=function(){return void 0===B&&(B=!z&&!V&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),B},ne=z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function re(e){return"function"==typeof e&&/native code/.test(e.toString())}var ie,oe="undefined"!=typeof Symbol&&re(Symbol)&&"undefined"!=typeof Reflect&&re(Reflect.ownKeys);ie="undefined"!=typeof Set&&re(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ae=S,se=0,ce=function(){this.id=se++,this.subs=[]};ce.prototype.addSub=function(e){this.subs.push(e)},ce.prototype.removeSub=function(e){h(this.subs,e)},ce.prototype.depend=function(){ce.target&&ce.target.addDep(this)},ce.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},ce.target=Line truncated
|
||||
@@ -238,11 +238,11 @@
|
||||
</template>
|
||||
<template #item.slot_btn="{ item }">
|
||||
<a :href="'reg.aspx?num='+item.num" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>編輯</a>
|
||||
<a @click="copyItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-pencil-box-outline"></i>複製</a>
|
||||
<a @click="copyItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-content-copy"></i>複製</a>
|
||||
<a @click="deleteItem(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>刪除</a>
|
||||
<% if (IsPreOrder == "true")
|
||||
{ %>
|
||||
<a @click="compare(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-trash-can"></i>比對</a>
|
||||
<a @click="compare(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-file-compare"></i>比對</a>
|
||||
<% } %>
|
||||
</template>
|
||||
</v-data-table>
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
body {
|
||||
font-family: "Microsoft JhengHei", sans-serif;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
background: #f5f5f5;
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
#control-panel {
|
||||
width: 240px;
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
.control-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
select,
|
||||
input[type="range"] {
|
||||
padding: 6px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
button.action-btn {
|
||||
padding: 12px;
|
||||
background: #007bff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
#preview-container {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
background: #ddd;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#paper-preview {
|
||||
background: #fff;
|
||||
padding: 20mm;
|
||||
box-sizing: border-box;
|
||||
width: 210mm;
|
||||
height: 297mm;
|
||||
}
|
||||
|
||||
#editor {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
outline: none;
|
||||
writing-mode: vertical-rl;
|
||||
text-orient: upright;
|
||||
}
|
||||
|
||||
#editor > div {
|
||||
min-height: 1em;
|
||||
display: flex !important;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
margin-left: 10px;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#editor > div:hover {
|
||||
background: rgba(0, 123, 255, 0.05);
|
||||
}
|
||||
|
||||
#editor > div.selected-line {
|
||||
background: rgba(0, 123, 255, 0.1) !important;
|
||||
box-shadow: 0 0 0 1px #ff7675;
|
||||
}
|
||||
|
||||
#line-floating-menu {
|
||||
display: none;
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
left: 280px;
|
||||
background: #fff0f1;
|
||||
border: 2px solid #ff7675;
|
||||
padding: 12px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
|
||||
z-index: 99999;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
width: 210px;
|
||||
}
|
||||
|
||||
#line-floating-menu h4 {
|
||||
margin: 0;
|
||||
color: #d63031;
|
||||
font-size: 14px;
|
||||
cursor: move;
|
||||
background: #ffe4e6;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.menu-btn-group {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.menu-btn-group button {
|
||||
flex: 1;
|
||||
padding: 6px;
|
||||
border: 1px solid #ccc;
|
||||
background: #fff;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.menu-btn-group button.active {
|
||||
background: #28a745;
|
||||
color: #fff;
|
||||
border-color: #28a745;
|
||||
}
|
||||
|
||||
.adjust-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.adjust-row button {
|
||||
padding: 4px 10px;
|
||||
border: 1px solid #ccc;
|
||||
background: #fff;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
font-weight: 700;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.adjust-row button:hover {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.adjust-row input[type="range"] {
|
||||
flex-grow: 1;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
#control-panel,
|
||||
#line-floating-menu {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
body,
|
||||
#preview-container {
|
||||
background: #fff;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#paper-preview {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
box-shadow: none;
|
||||
/* 1. 移除原本的 flex 與置中設定,改為一般的區塊顯示 */
|
||||
display: block !important;
|
||||
/* 2. 透過 padding 設定您需要的上邊界與右邊界 (數值可自由調整) */
|
||||
padding-top: 30mm !important; /* 控制上方留白 */
|
||||
padding-right: 30mm !important; /* 控制右側留白 */
|
||||
padding-bottom: 0 !important;
|
||||
padding-left: 0 !important;
|
||||
/* padding: 0;
|
||||
display: flex !important;
|
||||
justify-content: center !important;
|
||||
align-items: center !important; */
|
||||
}
|
||||
|
||||
#editor {
|
||||
height: auto !important;
|
||||
/* width: auto !important; 加入這行,讓寬度貼合內容 */
|
||||
max-height: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
size: A4 portrait;
|
||||
margin: 0mm;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,369 @@
|
||||
<template>
|
||||
<v-container>
|
||||
<v-card>
|
||||
<v-card-title class="bg-primary white--text text-center">
|
||||
<h5 class="mb-0">沖帳查詢</h5>
|
||||
<button class="btn btn-default ms-auto"><i class="mdi mdi-close"></i></button>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-row class="mb-0 mt-4">
|
||||
<v-col cols="12" md="2">
|
||||
<v-text-field v-model="query.start_date" label="起始日" type="date" dense outlined></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="2">
|
||||
<v-text-field v-model="query.end_date" label="結束日" type="date" dense outlined></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="3">
|
||||
<v-text-field v-model="query.activity_name" label="法會" dense outlined readonly>
|
||||
<template v-slot:append>
|
||||
<v-btn icon @click="showActivityDialog"><v-icon>mdi-magnify</v-icon></v-btn>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="3">
|
||||
<v-text-field v-model="query.follower_name" label="信眾" dense outlined readonly>
|
||||
<template v-slot:append>
|
||||
<v-btn icon @click="showFollowerDialog"><v-icon>mdi-magnify</v-icon></v-btn>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="2" class="d-flex justify-end">
|
||||
<v-btn color="primary" class="mr-2" @click="search">查詢</v-btn>
|
||||
<v-btn color="grey" @click="reset">重設</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-data-table :headers="headers"
|
||||
:items="items"
|
||||
:loading="loading"
|
||||
loading-text="載入中..."
|
||||
class="elevation-1 verify-query-table"
|
||||
item-key="id"
|
||||
:footer-props="{ 'items-per-page-options': [10, 20, 50] }"
|
||||
:expanded.sync="expanded"
|
||||
show-expand
|
||||
@item-expanded="handleRowClick">
|
||||
<template v-slot:item.pay_type="{ item }">
|
||||
<div>
|
||||
<div class="font-weight-bold">{{ getPayType(item.pay_type) }}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-slot:expanded-item="{ headers, item }">
|
||||
<td :colspan="headers.length">
|
||||
<div class="pa-4">
|
||||
<h6 class="mb-3 text-primary">
|
||||
<v-icon color="primary" small class="mr-1">mdi-receipt</v-icon>
|
||||
沖帳明細
|
||||
</h6>
|
||||
<v-data-table :headers="detailHeaders"
|
||||
:items="detailItem"
|
||||
class="elevation-1"
|
||||
hide-default-footer
|
||||
:disable-pagination="true"
|
||||
dense>
|
||||
|
||||
</v-data-table>
|
||||
</div>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
<!-- 法會選取 Dialog -->
|
||||
<v-dialog v-model="activityDialog.show" max-width="700px">
|
||||
<v-card>
|
||||
<v-card-title class="grey lighten-2">
|
||||
<v-icon color="primary" class="mr-2">mdi-table</v-icon>
|
||||
選擇法會
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="activityDialog.show = false"><v-icon>mdi-close</v-icon></v-btn>
|
||||
</v-card-title>
|
||||
<v-card-text class="mt-4">
|
||||
<v-text-field v-model="activityDialog.search" label="搜尋法會" dense outlined @keyup.enter="searchActivity"></v-text-field>
|
||||
<v-data-table :headers="activityDialog.headers"
|
||||
:items="activityDialog.items"
|
||||
:loading="activityDialog.loading"
|
||||
item-key="num"
|
||||
class="elevation-1 mt-2"
|
||||
@click:row="selectActivity"
|
||||
hide-default-footer></v-data-table>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<!-- 信眾選取 Dialog -->
|
||||
<v-dialog v-model="followerDialog.show" max-width="700px">
|
||||
<v-card>
|
||||
<v-card-title class="grey lighten-2">
|
||||
<v-icon color="primary" class="mr-2">mdi-account</v-icon>
|
||||
選擇信眾
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="followerDialog.show = false"><v-icon>mdi-close</v-icon></v-btn>
|
||||
</v-card-title>
|
||||
<v-card-text class="mt-4">
|
||||
<v-text-field v-model="followerDialog.search" label="搜尋信眾" dense outlined
|
||||
@keydown.enter.prevent="searchFollower"></v-text-field>
|
||||
<v-data-table :headers="followerDialog.headers"
|
||||
:items="followerDialog.items"
|
||||
:loading="followerDialog.loading"
|
||||
item-key="num"
|
||||
class="elevation-1 mt-2"
|
||||
@click:row="selectFollower"
|
||||
hide-default-footer></v-data-table>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<!-- 詳細資訊對話框 -->
|
||||
<v-dialog v-model="dialog.show" max-width="900px">
|
||||
<v-card>
|
||||
<v-card-title class="grey lighten-2">
|
||||
<v-icon color="info" class="mr-2">mdi-information-outline</v-icon>
|
||||
詳細資訊
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="dialog.show = false">
|
||||
<v-icon>mdi-close</v-icon>
|
||||
</v-btn>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<div v-if="dialog.selected">
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<h6 class="mb-3 text-primary">匯款人資訊</h6>
|
||||
<div class="mb-2"><span class="font-weight-bold">姓名:</span>{{ dialog.selected.transfer_name }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">電話:</span>{{ dialog.selected.transfer_phone }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">信眾:</span>{{ dialog.selected.follower }}</div>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
<h6 class="mb-3 text-success">入帳資訊</h6>
|
||||
<div class="mb-2"><span class="font-weight-bold">入帳帳戶:</span>{{ dialog.selected.acc_name }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">入帳日期:</span>{{ dialog.selected.transfer_check_date | date }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">入帳金額:</span>{{ dialog.selected.transfer_check_amount | currency }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">應收總額:</span>{{ dialog.selected.price_totals | currency }}</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-divider class="my-4"></v-divider>
|
||||
<v-row>
|
||||
<v-col cols="12" md="6">
|
||||
<h6 class="mb-3 text-purple">活動資訊</h6>
|
||||
<div class="mb-2"><span class="font-weight-bold">活動名稱:</span>{{ dialog.selected.activity_name || '-' }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">支付方式:</span>{{ payTypeText[dialog.selected.transfer_pay_type] || dialog.selected.transfer_pay_type }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">帳號後5碼:</span>{{ dialog.selected.transfer_account_last5 || '-' }}</div>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6">
|
||||
<h6 class="mb-3 text-info">核對記錄</h6>
|
||||
<div class="mb-2"><span class="font-weight-bold">核對記錄:</span>{{ dialog.selected.transfer_verify_note || '-' }}</div>
|
||||
<div class="mb-2"><span class="font-weight-bold">帳簿備註:</span>{{ dialog.selected.transfer_check_memo || '-' }}</div>
|
||||
<div v-if="dialog.selected.transfer_proof_img" class="mb-2">
|
||||
<span class="font-weight-bold">證明圖片:</span>
|
||||
<a :href="'../../upload/transfer_proof/' + dialog.selected.transfer_proof_img" target="_blank">查看相片</a>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-container>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
expanded: [],
|
||||
query: {
|
||||
start_date: '',
|
||||
end_date: '',
|
||||
activity_num: '',
|
||||
activity_name: '',
|
||||
follower_num: '',
|
||||
follower_name: ''
|
||||
},
|
||||
headers: [
|
||||
{ text: '信眾/匯款人', value: 'followerName' },
|
||||
{ text: '法會/入帳帳戶', value: 'acc_name' },
|
||||
{ text: '入帳金額', value: 'check_amount' },
|
||||
{ text: '入帳日期', value: 'check_date' },
|
||||
{ text: '付款方式', value: 'pay_type' },
|
||||
{ text: '沖帳方式', value: 'pay_mode' },
|
||||
{ text: '狀態/備註', value: 'check_status' },
|
||||
//{ text: '操作', value: 'actions', sortable: false }
|
||||
],
|
||||
detailHeaders: [
|
||||
{ text: '法會名稱', value:'法會名稱'},
|
||||
{ text: '功德項目', value: '牌位/點燈項目' },
|
||||
{
|
||||
text: '實際功德人姓名', value: '實際功德人姓名'
|
||||
},
|
||||
{
|
||||
text: '應收金額', value: '項目原價'
|
||||
},
|
||||
{
|
||||
text: '沖帳金額', value: '本次實際沖帳金額' },
|
||||
{ text: '備註', value: 'memo' }
|
||||
],
|
||||
items: [],
|
||||
detailItem:[],
|
||||
dialog: {
|
||||
show: false,
|
||||
selected: null
|
||||
},
|
||||
activityDialog: {
|
||||
show: false,
|
||||
search: '',
|
||||
loading: false,
|
||||
items: [],
|
||||
headers: [
|
||||
{ text: '編號', value: 'num' },
|
||||
{ text: '名稱', value: 'subject' }
|
||||
]
|
||||
},
|
||||
followerDialog: {
|
||||
show: false,
|
||||
search: '',
|
||||
loading: false,
|
||||
items: [],
|
||||
headers: [
|
||||
{ text: '編號', value: 'num' },
|
||||
{ text: '姓名', value: 'u_name' }
|
||||
]
|
||||
},
|
||||
payTypeText: [
|
||||
{ text: '1', value: '現金' },
|
||||
{ text: '2', value: '匯款' },
|
||||
{ text: '3', value: '支票' }
|
||||
]
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
payType(val) {
|
||||
//console.log("payType:",val)
|
||||
let v = this.payTypeText.find(x => x.text === val);
|
||||
return v.value;
|
||||
},
|
||||
currency(val) {
|
||||
if (!val) return '0';
|
||||
return Number(val).toLocaleString();
|
||||
},
|
||||
date(val) {
|
||||
if (!val) return '';
|
||||
const date = new Date(val);
|
||||
return date.toLocaleDateString();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getPayType(val) {
|
||||
|
||||
let v = this.payTypeText.find(x => x.text === val);
|
||||
return v?v.value:val;
|
||||
},
|
||||
handleRowClick({item, value}) {
|
||||
this.$set(item, 'loading', true);
|
||||
if (value) {
|
||||
axios.post('../../api/bill/GetAuditDetailData', { id: item.id })
|
||||
.then(res => {
|
||||
console.log("handleRowClick:", res.data.list[0].k);
|
||||
if (res.status === 200 && res.data && res.data.list) {
|
||||
this.detailItem = res.data.list[0].k;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
search() {
|
||||
this.loading = true;
|
||||
// 串接查詢 API,帶入所有查詢條件
|
||||
axios.post('../../api/bill/GetAuditList', this.query, { params: { page: 1, pageSize: 1000 } })
|
||||
.then(res => {
|
||||
//console.log("QQ:",res);
|
||||
this.items = res.data.list;
|
||||
this.expanded = []; // 重置展開狀態
|
||||
})
|
||||
.catch(() => {
|
||||
this.items = [];
|
||||
this.expanded = [];
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
reset() {
|
||||
this.query.start_date = '';
|
||||
this.query.end_date = '';
|
||||
this.query.activity_num = '';
|
||||
this.query.activity_name = '';
|
||||
this.query.follower_num = '';
|
||||
this.query.follower_name = '';
|
||||
this.items = [];
|
||||
this.expanded = [];
|
||||
},
|
||||
showDetailDialog(item) {
|
||||
this.dialog.selected = item;
|
||||
this.dialog.show = true;
|
||||
},
|
||||
showActivityDialog() {
|
||||
this.activityDialog.show = true;
|
||||
this.searchActivity();
|
||||
},
|
||||
searchActivity() {
|
||||
this.activityDialog.loading = true;
|
||||
axios.get('../../api/activity', { params: { keyword: this.activityDialog.search } })
|
||||
.then(res => { this.activityDialog.items = res.data; })
|
||||
.catch(() => { this.activityDialog.items = []; })
|
||||
.finally(() => { this.activityDialog.loading = false; });
|
||||
},
|
||||
selectActivity(row) {
|
||||
this.query.activity_num = row.num;
|
||||
this.query.activity_name = row.subject;
|
||||
this.activityDialog.show = false;
|
||||
},
|
||||
showFollowerDialog() {
|
||||
this.followerDialog.show = true;
|
||||
//this.searchFollower();
|
||||
},
|
||||
searchFollower() {
|
||||
//event.preventDefault();
|
||||
this.followerDialog.loading = true;
|
||||
axios.post('/api/follower/GetList', { u_name: this.followerDialog.search }, { params: { page: 1, pageSize: 10 } })
|
||||
.then(res => { this.followerDialog.items = res.data.list; })
|
||||
.catch(() => { this.followerDialog.items = []; })
|
||||
.finally(() => { this.followerDialog.loading = false; });
|
||||
},
|
||||
selectFollower(row) {
|
||||
this.query.follower_num = row.num;
|
||||
this.query.follower_name = row.u_name;
|
||||
this.followerDialog.show = false;
|
||||
},
|
||||
getStatusColor(status) {
|
||||
switch (status) {
|
||||
case '90': return 'warning';
|
||||
case '99': return 'success';
|
||||
default: return 'grey';
|
||||
}
|
||||
},
|
||||
getStatusText(status) {
|
||||
switch (status) {
|
||||
case '90': return '沖帳有剩餘';
|
||||
case '99': return '沖帳完成';
|
||||
default: return '未知狀態';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.v-data-table.verify-query-table .v-data-table__wrapper tbody tr {
|
||||
min-height: 90px !important;
|
||||
height: 90px !important;
|
||||
}
|
||||
|
||||
.v-data-table.verify-query-table .v-data-table__wrapper tbody td {
|
||||
min-height: 90px !important;
|
||||
height: 90px !important;
|
||||
vertical-align: middle !important;
|
||||
}
|
||||
</style>
|
||||
@@ -34,7 +34,7 @@
|
||||
</template>
|
||||
<template v-slot:item.actions="{ item }">
|
||||
<v-btn small
|
||||
color="success"
|
||||
|
||||
@click="showReconcileDialog(item)">
|
||||
沖帳
|
||||
</v-btn>
|
||||
|
||||
@@ -17,10 +17,36 @@
|
||||
</v-select>
|
||||
</v-col>
|
||||
<v-col cols="2" md="2">
|
||||
<v-text-field label="法會時間(起)" v-model="query.s_date"></v-text-field>
|
||||
<v-menu ref="menu"
|
||||
v-model="menu"
|
||||
:close-on-content-click="true"
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
min-width="auto">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-text-field label="法會日期(起)" v-model="query.s_date"
|
||||
prepend-icon="mdi-calendar" readonly v-bind="attrs" v-on="on"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="query.s_date"
|
||||
show-adjacent-months></v-date-picker>
|
||||
</v-menu>
|
||||
|
||||
</v-col>
|
||||
<v-col cols="2" md="2">
|
||||
<v-text-field label="法會時間(迄)" v-model="query.e_date"></v-text-field>
|
||||
<v-menu ref="menu1"
|
||||
v-model="menu1"
|
||||
:close-on-content-click="true"
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
min-width="auto">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-text-field label="法會日期(迄)" v-model="query.e_date"
|
||||
prepend-icon="mdi-calendar" readonly v-bind="attrs" v-on="on"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="query.e_date"
|
||||
show-adjacent-months></v-date-picker>
|
||||
</v-menu>
|
||||
<!--<v-text-field label="法會日期(迄)" v-model="query.e_date"></v-text-field>-->
|
||||
</v-col>
|
||||
<v-col cols="2" md="2">
|
||||
<v-btn @click.prevent="getRpt()" :disabled="isdisabled">
|
||||
@@ -57,10 +83,22 @@
|
||||
category_id: "",
|
||||
isdisabled: false,
|
||||
isloading: false,
|
||||
query: {s_date:"",e_date:""}
|
||||
query: { s_date: "", e_date: "" },
|
||||
activePicker: null,
|
||||
date: null,
|
||||
menu: false,
|
||||
menu1: false,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
menu(val) {
|
||||
val && setTimeout(() => (this.activePicker = 'YEAR'))
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
save(date) {
|
||||
this.$refs.menu.save(date)
|
||||
},
|
||||
closeWindow() {
|
||||
this.$emit('close-dialog');
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,632 @@
|
||||
<template>
|
||||
<div class="container-fluid">
|
||||
<v-tabs>
|
||||
<v-tab value="tab-1" @click="tab='tab-1'">
|
||||
掛單資訊
|
||||
</v-tab>
|
||||
<v-tab value="tab-2" @click="tab='tab-2'">
|
||||
掛單明細
|
||||
</v-tab>
|
||||
</v-tabs>
|
||||
<v-tabs-items v-model="tab">
|
||||
<v-tab-item value="tab-1">
|
||||
<div class="border rounded p-3 bg-white shadow-sm ">
|
||||
<div class="form-group row mt-3">
|
||||
<label class="col-sm-2 col-form-label text-center">掛單單號(不可修改)</label>
|
||||
<div class="col-sm-4 text-left">
|
||||
<input class="form-control" v-model="guadanorder.order_form.orderNo" readonly />
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-center">關聯活動</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control" v-model="activityNum">
|
||||
<option :value="null">未關聯</option>
|
||||
<option v-for="activity in activityList" :key="activity.num" :value="activity.num">
|
||||
{{activity.subject}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row mt-3">
|
||||
<label class="col-sm-2 col-form-label text-center">
|
||||
預約開始日期
|
||||
</label>
|
||||
<div class="col-sm-4 text-left">
|
||||
<input class="form-control" type="date" v-model="guadanorder.order_form.startdate" />
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-center">
|
||||
預約結束日期
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" type="date" v-model="guadanorder.order_form.enddate" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row mt-3">
|
||||
<label class="col-sm-2 col-form-label text-center">預定人姓名</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" v-model="guadanorder.order_form.bookerName" />
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-center">預定人電話</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" v-model="guadanorder.order_form.bookerPhone" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row mt-3">
|
||||
<label class="col-sm-2 col-form-label text-center">備註</label>
|
||||
<div class="col-sm-4">
|
||||
<textarea class="form-control" v-model="guadanorder.order_form.note"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<button v-if="guadanorder.order_form.uuid" type="button" class="btn btn-primary mx-auto" style="width: 120px;" @click="updateGuadanOrder">存檔</button>
|
||||
<button v-else v-on:click="createGuadanOrder" type="button" class="btn btn-primary mx-auto" style="width: 120px;">儲存</button>
|
||||
</div>
|
||||
</div>
|
||||
</v-tab-item>
|
||||
<v-tab-item value="tab-2">
|
||||
<!-- 表格標題緊貼表格上方,居中 -->
|
||||
<div class="d-flex align-items-center mb-3">
|
||||
<!-- 左側按鈕 -->
|
||||
<v-btn color="primary" variant="elevated" @click="showCheckInModal" class="me-3">
|
||||
<v-icon start>mdi-plus</v-icon>
|
||||
設定人數
|
||||
</v-btn>
|
||||
<v-btn @click="showAutomaticBedAllocation">
|
||||
自動分配床位
|
||||
</v-btn>
|
||||
|
||||
<!-- 中間標題(flex-grow撐開居中) -->
|
||||
<div class="flex-grow-1 text-center">
|
||||
<h5 class="text-primary fw-bold mb-0">
|
||||
<i class="bi bi-people-fill me-2"></i>掛單蓮友
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- v-data-table 表格 -->
|
||||
<v-data-table :headers="guadanguest.headers" :items="guadanguest.items" class="elevation-1 rounded" dense>
|
||||
<template #item.checkinat="{item}">
|
||||
{{item.checkinat |timeString('YYYY-MM-DD')}}
|
||||
</template>
|
||||
<template #item.checkoutat="{item}">
|
||||
{{item.checkoutat |timeString('YYYY-MM-DD')}}
|
||||
</template>
|
||||
<template v-slot:item.name="{item}">
|
||||
{{item.fullname}}
|
||||
</template>
|
||||
<template v-slot:item.sex="{item}">
|
||||
{{item.gender}}
|
||||
</template>
|
||||
<template v-slot:item.specialNeeds="{item}">
|
||||
{{item.specialNeeds}}
|
||||
</template>
|
||||
<template #item.actions="{ item }">
|
||||
<div>
|
||||
<!-- 取消預訂 -->
|
||||
<v-btn color="red"
|
||||
variant="outlined"
|
||||
size="small"
|
||||
class="me-2"
|
||||
:disabled="item.statuscode !== '401'"
|
||||
@click="confirmDeleteGuadanOrderGuest(item)">
|
||||
取消預訂
|
||||
</v-btn>
|
||||
<v-btn color="red"
|
||||
variant="outlined"
|
||||
size="small"
|
||||
class="me-2"
|
||||
:disabled="item.statuscode !== '401'"
|
||||
@click="checkinGuadanGuest(item)">
|
||||
入住
|
||||
</v-btn>
|
||||
<v-btn color="red"
|
||||
variant="outlined"
|
||||
size="small"
|
||||
class="me-2"
|
||||
:disabled="item.statuscode !== '402'"
|
||||
@click="showXuzhuGuestModalMethod(item)">
|
||||
續住
|
||||
</v-btn>
|
||||
<!-- 退房 -->
|
||||
<v-btn color="primary"
|
||||
variant="outlined"
|
||||
size="small"
|
||||
:disabled="item.statuscode !== '402'"
|
||||
@click="checkoutGuadanOrderGuest(item)">
|
||||
<v-icon start>mdi-exit-run</v-icon>
|
||||
退房
|
||||
</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-tab-item>
|
||||
</v-tabs-items>
|
||||
|
||||
|
||||
<v-dialog v-model="message_dialog"
|
||||
max-width="1280"
|
||||
min-height="900"
|
||||
hide-overlay
|
||||
transition="dialog-bottom-transition">
|
||||
<v-card>
|
||||
<v-card-text">
|
||||
{{message}}
|
||||
</v-card-text">
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="confirm_dialog"
|
||||
max-width="1280"
|
||||
min-height="900"
|
||||
hide-overlay
|
||||
transition="dialog-bottom-transition">
|
||||
<v-card>
|
||||
<v-card-text">
|
||||
{{confirm}}
|
||||
</v-card-text">
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<v-dialog v-model="checkInGuest.showSelectGuadanOrderGuest"
|
||||
max-width="720"
|
||||
min-height="300"
|
||||
hide-overlay
|
||||
transition="dialog-bottom-transition">
|
||||
<v-card>
|
||||
<v-card-text>
|
||||
<v-container>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-text-field label="人數" v-model="e4"></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-text-field label="開始日期" v-model="s_date"></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-text-field label="結束日期" v-model="e_date"></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-select :items="e2" v-model="e5"
|
||||
label="性別"></v-select>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-select v-model="e6"
|
||||
:items="states"
|
||||
:menu-props="{ maxHeight: '400' }"
|
||||
label="特殊需求"
|
||||
multiple
|
||||
hint="選擇條件"
|
||||
persistent-hint></v-select>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-btn color="primary" @click="checkInGuest.showSelectGuadanOrderGuest = false">
|
||||
關閉
|
||||
</v-btn>
|
||||
<v-btn color="primary" @click.prevent="genGuestList">產生</v-btn>
|
||||
</v-col>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "apply-component",
|
||||
data() {
|
||||
return {
|
||||
e1: null,
|
||||
e2: ['請選擇', '男眾', '女眾'],
|
||||
e4: "",
|
||||
e5: "",
|
||||
e6: [],
|
||||
s_date: null,
|
||||
e_date: null,
|
||||
states: [
|
||||
'無特殊需求',
|
||||
'需要輪椅',
|
||||
'需要拐杖',
|
||||
'需要陪同人員',
|
||||
'需要特別飲食',
|
||||
'其他需求'
|
||||
],
|
||||
message_dialog: false,
|
||||
message: "",
|
||||
confirm_dialog: false,
|
||||
confirm: "",
|
||||
tab: "tab-1",
|
||||
activityList: [],
|
||||
availableBedCount: {
|
||||
male: 0,
|
||||
female: 0,
|
||||
},
|
||||
activityNum: null,
|
||||
guadanorder: {
|
||||
order_form: {
|
||||
uuid: '<%= Request.QueryString["orderid"] %>' || null,
|
||||
startdate: null,
|
||||
enddate: null,
|
||||
note: null,
|
||||
orderNo: null,
|
||||
bookerName: null,
|
||||
bookerPhone: null,
|
||||
bookerFollowerNum: null,
|
||||
activityNum: null,
|
||||
},
|
||||
status_items: [],
|
||||
},
|
||||
guadanguest: {
|
||||
guest: {
|
||||
uuid: null, // int?
|
||||
fullName: '', // string
|
||||
gender: null, // int?
|
||||
phone: '', // string
|
||||
idNumber: '', // string
|
||||
birthday: null, // Date (建議用 date picker)
|
||||
email: '', // string
|
||||
address: '', // string
|
||||
emergencyContact: '', // string
|
||||
emergencyPhone: '', // string
|
||||
status: null, // int?
|
||||
notes: '', // string
|
||||
specialNeeds: '', // string
|
||||
},
|
||||
headers: [{
|
||||
text: '姓名',
|
||||
value: 'name'
|
||||
},
|
||||
{
|
||||
text: '性別',
|
||||
value: 'sex'
|
||||
},
|
||||
{
|
||||
text: '掛單開始時間',
|
||||
value: 'checkinat'
|
||||
},
|
||||
{
|
||||
text: '掛單結束時間',
|
||||
value: 'checkoutat'
|
||||
},
|
||||
{
|
||||
text: '床位',
|
||||
value: 'bedName'
|
||||
},
|
||||
{
|
||||
text: '狀態',
|
||||
value: 'statusName'
|
||||
},
|
||||
{
|
||||
text: '備註',
|
||||
value: 'note'
|
||||
},
|
||||
{
|
||||
text: '特殊需求',
|
||||
value: 'specialNeeds'
|
||||
},
|
||||
{
|
||||
text: '',
|
||||
value: 'actions'
|
||||
},
|
||||
],
|
||||
items: [],
|
||||
showCreateGuestModal: false,
|
||||
xuzhu: {
|
||||
showXuzhuGuestModal: false,
|
||||
currentCheckoutDate: null,
|
||||
newCheckoutDate: null,
|
||||
guestUuid: null,
|
||||
guestBedUuid: null,
|
||||
}
|
||||
},
|
||||
checkInGuest: {
|
||||
showSelectGuadanOrderGuest: false,
|
||||
isEdit: false,
|
||||
|
||||
inGuest: {
|
||||
uuid: null,
|
||||
orderNo: null,
|
||||
followerNum: null,
|
||||
roomUuid: null,
|
||||
bedUuid: null,
|
||||
checkInAt: null,
|
||||
checkOutAt: null,
|
||||
statuscode: null,
|
||||
},
|
||||
status: [],
|
||||
},
|
||||
region_modal: {
|
||||
regions: [],
|
||||
currentSelectRegion: null,
|
||||
currentSelectRoom: null,
|
||||
currentSelectBeds: [],
|
||||
currentSelectBed: null,
|
||||
showSelectBedModal: false,
|
||||
selectedId: null, // 被選中項目ID
|
||||
selectedType: null, // 'region' 或 'room'
|
||||
expandAllFlag: false, // 控制全部展開
|
||||
collapseAllFlag: false, // 控制全部收起
|
||||
currentSelectBedText: null,
|
||||
},
|
||||
selectGuestModal: {
|
||||
showSelectGuestModal: false,
|
||||
currentSelectedGuest: null,
|
||||
fullNameText: null,
|
||||
|
||||
headers: [{
|
||||
text: '姓名',
|
||||
value: 'u_name'
|
||||
},
|
||||
{
|
||||
text: '電話',
|
||||
value: 'phone'
|
||||
},
|
||||
{
|
||||
text: '',
|
||||
value: 'actions'
|
||||
},
|
||||
],
|
||||
items: [],
|
||||
|
||||
options: { //v-data-table參數
|
||||
page: 1,
|
||||
itemsPerPage: 10,
|
||||
sortBy: [],
|
||||
sortDesc: [],
|
||||
multiSort: false,
|
||||
},
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
count: 0,
|
||||
footer: {
|
||||
showFirstLastPage: true,
|
||||
disableItemsPerPage: true,
|
||||
itemsPerPageAllText: '',
|
||||
itemsPerPageText: '',
|
||||
},
|
||||
searchNameOrPhone: null,
|
||||
},
|
||||
automaticBedAllocation: {
|
||||
showModal: false,
|
||||
|
||||
// 蓮友選擇彈出視窗
|
||||
followerModal: {
|
||||
showModal: false,
|
||||
followerList: [],
|
||||
selectedFollowerItems: [],
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchNameOrPhone: '',
|
||||
headers: [
|
||||
{ text: '姓名', value: 'u_name' },
|
||||
{ text: '電話', value: 'phone' },
|
||||
{ text: '操作', value: 'actions', sortable: false }
|
||||
],
|
||||
},
|
||||
|
||||
// 已選擇的待分配列表
|
||||
selectedFollowers: [],
|
||||
preBeds: [],
|
||||
headers: [
|
||||
{ text: '姓名', value: 'u_name' },
|
||||
{ text: '電話', value: 'phone' },
|
||||
{ text: '性別', value: 'sex' },
|
||||
{ text: '預分配床位', value: 'prebed' },
|
||||
{ text: '', value: 'actions' }
|
||||
],
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
activityNum: {
|
||||
handler(newVal, oldVal) {
|
||||
console.log('使用者資料更新了!', newVal);
|
||||
let act = this.activityList.find(activity => activity.num == newVal);
|
||||
if (act) {
|
||||
console.log('找到對應的活動:', act);
|
||||
this.guadanorder.order_form.startdate = act.startDate;
|
||||
this.guadanorder.order_form.enddate = act.endDate;
|
||||
}
|
||||
},
|
||||
deep: true, // 監聽 userProfile.name 或 age 的變化
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getActivityList()
|
||||
|
||||
},
|
||||
methods: {
|
||||
genGuestList() {//產生掛單明細
|
||||
console.log('產生掛單明細', this.e4, this.e5, this.e6);
|
||||
for (let i = 0; i < this.e4; i++) {
|
||||
this.guadanguest.items.push({
|
||||
uuid: null, // int?
|
||||
fullName: '', // string
|
||||
gender: this.e5, // int?
|
||||
specialNeeds: this.e6.join(",") // string
|
||||
});
|
||||
}
|
||||
},
|
||||
getActivityList() {//新增修改取得未過期的法會,查看則依照抓到的去讀取
|
||||
const params = {
|
||||
page: '1', pageSize: 10000,
|
||||
|
||||
};
|
||||
axios.post(HTTP_HOST + 'api/activity/GetListNewYet', {
|
||||
up_time1: moment(new Date()).format('YYYY-MM-DD')
|
||||
}, { params: params }).then((res) => {
|
||||
console.log(res);
|
||||
if (res.status == 200 && res.data && res.data.list) {
|
||||
this.activityList = res.data.list;
|
||||
}
|
||||
})
|
||||
},
|
||||
createGuadanOrder() {
|
||||
if (!this.validateOrderForm()) {
|
||||
return;
|
||||
}
|
||||
axios.post(HTTP_HOST + 'api/guadan/create', this.guadanorder.order_form)
|
||||
.then((res => {
|
||||
//this.$refs.messageModal.open({
|
||||
// title: '掛單提示',
|
||||
// message: '掛單資料建立成功'
|
||||
//})
|
||||
this.message_dialog = true
|
||||
this.message = '掛單資料建立成功'
|
||||
this.guadanorder.order_form.uuid = res.data.uuid;
|
||||
this.guadanorder.order_form.orderNo = res.data.guaDanOrderNo;
|
||||
console.log(this.guadanorder.order_form.uuid);
|
||||
|
||||
// 跳转到当前 URL 加上 ?orderId=UUID
|
||||
const currentUrl = window.location.origin + window.location.pathname;
|
||||
window.location.href = `${currentUrl}?orderId=${res.data.guaDanOrderNo}`;
|
||||
})).catch((error) => {
|
||||
//this.$refs.messageModal.open({
|
||||
// title: '錯誤',
|
||||
// message: '建立掛單資料失敗:' + (error.response?.data?.message || error.message)
|
||||
//});
|
||||
this.message_dialog = true
|
||||
this.message = '建立掛單資料失敗:' + (error.response?.data?.message || error.message)
|
||||
});
|
||||
},
|
||||
updateGuadanOrder() {
|
||||
if (!this.validateOrderForm()) {
|
||||
return;
|
||||
}
|
||||
axios.post(HTTP_HOST + 'api/guadan/update', this.guadanorder.order_form)
|
||||
.then((res => {
|
||||
//this.$refs.messageModal.open({
|
||||
// title: '掛單提示',
|
||||
// message: '掛單資料更新成功'
|
||||
//})
|
||||
this.message_dialog = true
|
||||
this.message = '掛單資料更新成功'
|
||||
this.guadanorder.order_form.uuid = res.data.uuid;
|
||||
console.log(this.guadanorder.order_form.uuid);
|
||||
})).catch((error) => {
|
||||
//this.$refs.messageModal.open({
|
||||
// title: '錯誤',
|
||||
// message: '建立掛單資料失敗:' + (error.response?.data?.message || error.message)
|
||||
//});
|
||||
this.message_dialog = true
|
||||
this.message = '建立掛單資料失敗:' + (error.response?.data?.message || error.message)
|
||||
});
|
||||
},
|
||||
showCheckInModal() {
|
||||
console.log('showCheckInModal called');
|
||||
if (!this.guadanorder.order_form.uuid) {
|
||||
//this.$refs.messageModal.open({
|
||||
// message: '請先創建掛單',
|
||||
//});
|
||||
this.message_dialog = true;
|
||||
this.message = '請先儲存掛單資訊';
|
||||
return;
|
||||
}
|
||||
this.checkInGuest.inGuest.checkInAt = this.guadanorder.order_form.startdate || null;
|
||||
this.checkInGuest.inGuest.checkOutAt = this.guadanorder.order_form.enddate || null;
|
||||
this.checkInGuest.inGuest.orderNo = this.guadanorder.order_form.orderNo;
|
||||
this.checkInGuest.showSelectGuadanOrderGuest = true;
|
||||
},
|
||||
showAutomaticBedAllocation() {
|
||||
if (!this.guadanorder.order_form.uuid) {
|
||||
//this.$refs.messageModal.open({
|
||||
// message: '請先儲存掛單資訊',
|
||||
//});
|
||||
this.message_dialog = true;
|
||||
this.message = '請先儲存掛單資訊';
|
||||
return;
|
||||
}
|
||||
this.automaticBedAllocation.showModal = true;
|
||||
this.getavailablebedcountbytime(this.guadanorder.order_form.startdate, this.guadanorder.order_form.enddate);
|
||||
},
|
||||
getavailablebedcountbytime(startTime, endTime) {
|
||||
axios.get(HTTP_HOST + 'api/region/bed/getavailablebedcountbytime', {
|
||||
params: {
|
||||
startTime: startTime,
|
||||
endTime: endTime
|
||||
}
|
||||
}).then((res) => {
|
||||
this.availableBedCount = res.data;
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* 調整 fieldset 風格 */
|
||||
fieldset {
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 0.5rem;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
legend {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
color: #0d6efd;
|
||||
width: auto;
|
||||
padding: 0 0.75rem;
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* 按鈕置右 */
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* 選擇床位相關 */
|
||||
.tree,
|
||||
.tree ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding-left: 1rem;
|
||||
}
|
||||
|
||||
.toggle-icon {
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
width: 1rem;
|
||||
display: inline-block;
|
||||
color: #007bff;
|
||||
}
|
||||
|
||||
.region-item-label {
|
||||
cursor: pointer;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.region-item-label.selected {
|
||||
background-color: #eaf4ff;
|
||||
color: #0d6efd;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.selected-room {
|
||||
background-color: #cce5ff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* 選擇床位相關 */
|
||||
</style>
|
||||
@@ -147,6 +147,8 @@
|
||||
|
||||
</v-data-table>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<!-- 🟢 續住彈出視窗 -->
|
||||
<div>
|
||||
<v-dialog v-model="guadanguest.xuzhu.showXuzhuGuestModal" max-width="50%">
|
||||
@@ -212,14 +214,32 @@
|
||||
<!-- 內容區 -->
|
||||
<v-card-text class="py-6">
|
||||
<v-container>
|
||||
<v-row>
|
||||
<v-col cols="12" sm="2">
|
||||
<v-btn color="blue lighten-2" variant="elevated" block>
|
||||
<v-icon left class="me-2">mdi-plus</v-icon>
|
||||
新增時段床位
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<!-- 蓮友選擇 -->
|
||||
<v-col cols="12" sm="2">
|
||||
<div class="d-flex align-center" style="height: 100%;">
|
||||
<v-btn color="teal lighten-3" variant="outlined" block @click="showSelectGuestModalMethod">
|
||||
<v-icon left class="me-2">mdi-account-search</v-icon>
|
||||
<!--選擇掛單蓮友-->
|
||||
{{ selectGuestModal?.fullNameText || '選擇蓮友' }}
|
||||
</v-btn>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row dense>
|
||||
<!-- 掛單單號 -->
|
||||
<v-col cols="12">
|
||||
<v-col cols="12" sm="2">
|
||||
<v-text-field v-model="checkInGuest.inGuest.orderNo" label="掛單單號" readonly variant="underlined"></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<!-- 入住時間 -->
|
||||
<v-col cols="12" sm="6">
|
||||
<v-col cols="12" sm="2">
|
||||
<v-text-field
|
||||
v-model="checkInGuest.inGuest.checkInAt"
|
||||
label="入住時間" type="date"
|
||||
@@ -227,23 +247,23 @@
|
||||
</v-col>
|
||||
|
||||
<!-- 退房時間 -->
|
||||
<v-col cols="12" sm="6">
|
||||
<v-col cols="12" sm="2">
|
||||
<v-text-field
|
||||
v-model="checkInGuest.inGuest.checkOutAt"
|
||||
label="退房時間" type="date"
|
||||
variant="underlined"></v-text-field>
|
||||
</v-col>
|
||||
<!-- 蓮友選擇 -->
|
||||
<v-col cols="12" sm="6">
|
||||
<%-- <v-col cols="12" sm="2">
|
||||
<div class="d-flex align-center" style="height: 100%;">
|
||||
<v-btn color="teal" variant="outlined" block @click="showSelectGuestModalMethod">
|
||||
<v-btn color="teal lighten-3" variant="outlined" block @click="showSelectGuestModalMethod">
|
||||
<v-icon left class="me-2">mdi-account-search</v-icon>
|
||||
選擇掛單蓮友
|
||||
{{ selectGuestModal?.fullNameText || '選擇蓮友' }}
|
||||
</v-btn>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-col>--%>
|
||||
|
||||
<v-col cols="12" sm="6">
|
||||
<%-- <v-col cols="12" sm="6">
|
||||
<div class="d-flex flex-column justify-center" style="height: 100%;">
|
||||
<div>
|
||||
<div class="text-muted text-sm">
|
||||
@@ -252,25 +272,32 @@
|
||||
<div class="text-info text-xs mt-1">如無符合,請先新增蓮友資料</div>
|
||||
</div>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-col>--%>
|
||||
|
||||
<!-- 床位選擇 -->
|
||||
<v-col cols="12" sm="6">
|
||||
<v-col cols="12" sm="2">
|
||||
<div class="d-flex align-center" style="height: 100%;">
|
||||
<v-btn color="indigo" variant="outlined" block @click="openSelectBedModal">
|
||||
<%--<div class="text-muted text-sm">
|
||||
已選床位:<strong>{{ region_modal.currentSelectBedText }}</strong>
|
||||
</div>--%>
|
||||
<v-btn color="indigo lighten-2" variant="elevated" block @click="openSelectBedModal">
|
||||
<v-icon left class="me-2">mdi-bed</v-icon>
|
||||
選擇床位
|
||||
<%--選擇床位--%>
|
||||
{{ region_modal.currentSelectBedText || "選擇床位" }}
|
||||
</v-btn>
|
||||
</div>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="6">
|
||||
<%-- <v-col cols="12" sm="2">
|
||||
<v-text-field v-model="checkInGuest.inGuest.orderNo" label="說明" variant="underlined"></v-text-field>
|
||||
</v-col>--%>
|
||||
<%-- <v-col cols="12" sm="6">
|
||||
<div class="d-flex flex-column justify-center" style="height: 100%;">
|
||||
<div class="text-muted text-sm">
|
||||
已選床位:<strong>{{ region_modal.currentSelectBedText }}</strong>
|
||||
</div>
|
||||
<div class="text-info text-xs mt-1">請從床位清單中選擇</div>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-col>--%>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
|
||||
+73
-208
@@ -1,10 +1,11 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Templates/TBS5ADM001/MasterPage.master" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="admin_guadan_index" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="page_header" Runat="Server">
|
||||
<script src="/js/httpVueLoader.js"></script>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="page_nav" Runat="Server">
|
||||
<nav>
|
||||
<a href="create.aspx" class="btn btn-primary" >新建掛單</a>
|
||||
<%-- <nav>
|
||||
<a href="create.aspx" class="btn btn-primary" >新增</a>
|
||||
</nav>
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<label class="mb-0">掛單單號</label>
|
||||
@@ -20,246 +21,110 @@
|
||||
|
||||
<button class="btn btn-primary" type="button" @click="handleSearch">查詢</button>
|
||||
<button class="btn btn-outline-primary" type="button" @click="clearSearch">清除條件</button>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
|
||||
<div id="content" class="container-fluid py-4">
|
||||
<keep-alive>
|
||||
<component :is="currentView" :form-data="$data"
|
||||
:num="twoData"
|
||||
@custom-event="changeView">
|
||||
</component>
|
||||
</keep-alive>
|
||||
|
||||
<div class="mx-5">
|
||||
<v-data-table
|
||||
:items="items"
|
||||
:headers="headers"
|
||||
:item-class="item => item.is_timeout ? 'row-timeout' : ''"
|
||||
hide-default-footer>
|
||||
<template #item.actions="{item}">
|
||||
<a :href="'view.aspx?orderId='+item.guaDanOrderNo" class="btn btn-primary">查看</a>
|
||||
<a :href="'create.aspx?orderId='+item.guaDanOrderNo" class="btn btn-secondary"
|
||||
:style="item.guadan_status?.code == 502 ? 'pointer-events: none; opacity: 0.5; cursor: not-allowed;' : ''">編輯</a>
|
||||
<a
|
||||
class="btn btn-outline-danger"
|
||||
href="#"
|
||||
:style="item.guest_count != 0 ? 'pointer-events: none; opacity: 0.5; cursor: not-allowed;' : ''"
|
||||
@click.prevent="item.guest_count != 0 ? null : deleteGuadanOrder(item)"
|
||||
<template>
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
max-width="1280"
|
||||
min-height="900"
|
||||
hide-overlay
|
||||
transition="dialog-bottom-transition">
|
||||
<v-card>
|
||||
<v-toolbar dark color="primary">
|
||||
<v-btn icon dark @click="dialog = false">
|
||||
<v-icon>mdi-close</v-icon>
|
||||
</v-btn>
|
||||
<v-toolbar-title>掛單作業</v-toolbar-title>
|
||||
<%-- <v-spacer></v-spacer>
|
||||
<v-toolbar-items>
|
||||
<v-btn
|
||||
dark
|
||||
text
|
||||
@click="dialog = false"
|
||||
>
|
||||
取消
|
||||
</a>
|
||||
|
||||
Save
|
||||
</v-btn>
|
||||
</v-toolbar-items>--%>
|
||||
</v-toolbar>
|
||||
<%--<v-card-title>Cafe Badilico</v-card-title>--%>
|
||||
<v-card-text>
|
||||
<apply-component v-if="dialog" @close="dialog = false" />
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
<template #item.room="{item}">
|
||||
{{item.room.name}}
|
||||
</template>
|
||||
<template #item.bed="{item}">
|
||||
{{item.bed.name}}
|
||||
</template>
|
||||
<template #item.guadan_status="{item}">
|
||||
{{item.guadan_status?.name}}
|
||||
</template>
|
||||
<template #item.start_date="{item}">
|
||||
{{item.start_date | timeString('YYYY/MM/DD')}}
|
||||
</template>
|
||||
<template #item.end_date="{item}">
|
||||
{{item.end_date | timeString('YYYY/MM/DD')}}
|
||||
</template>
|
||||
<template #item.created_at="{item}">
|
||||
{{item.created_at | timeString('YYYY/MM/DD HH:mm')}}
|
||||
</template>
|
||||
<template #item.activity="{item}">
|
||||
{{item.activity?.subject}}
|
||||
</template>
|
||||
<template #item.is_timeout="{item}">
|
||||
{{item.is_timeout ? '已超時': '否'}}
|
||||
</template>
|
||||
</v-data-table>
|
||||
<v-container>
|
||||
<v-row class="align-baseline" wrap="false">
|
||||
<v-col cols="12" md="8">
|
||||
<v-pagination
|
||||
v-model="options.page"
|
||||
:length="pageCount">
|
||||
</v-pagination>
|
||||
</v-col>
|
||||
<v-col class="text-truncate text-right" cols="12" md="2">
|
||||
共 {{ total }} 筆, 頁數:
|
||||
</v-col>
|
||||
<v-col cols="6" md="1">
|
||||
<v-text-field
|
||||
v-model="options.page"
|
||||
type="number"
|
||||
hide-details
|
||||
dense
|
||||
min="1"
|
||||
:max="pageCount"
|
||||
@input="options.page = parseInt($event, 10)"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<!-- 每頁條數選擇 -->
|
||||
<v-col cols="12" md="1">
|
||||
<v-select
|
||||
v-model="options.itemsPerPage"
|
||||
:items="[5, 10, 20, 50]"
|
||||
label="每頁條數"
|
||||
dense
|
||||
hide-details
|
||||
style="width: 100px;"
|
||||
></v-select>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</div>
|
||||
<!-- 更新修改確認彈出視窗 -->
|
||||
<message-modal ref="messageModal"></message-modal>
|
||||
<!-- 刪除確認彈出視窗 -->
|
||||
<confirm-modal ref="confirmModal"></confirm-modal>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="offCanvasRight" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="footer_script" Runat="Server">
|
||||
<script>
|
||||
Vue.filter('timeString', function (value, myFormat) {
|
||||
return value == null || value == "" ? "" : moment(value).format(myFormat || 'YYYY-MM-DD, HH:mm:ss');
|
||||
});
|
||||
new Vue({
|
||||
let VueApp = new Vue({
|
||||
el: '#app',
|
||||
vuetify: new Vuetify(vuetify_options),
|
||||
vuetify: new Vuetify(),
|
||||
mounted() {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
headers: [
|
||||
{ text: '登記掛單蓮友', value: 'bookerName' },
|
||||
{ text: '掛單單號', value: 'guaDanOrderNo'},
|
||||
{ text: '起始日期', value: 'start_date', align: 'center' },
|
||||
{ text: '結束日期', value: 'end_date', align: 'center' },
|
||||
{ text: '掛單人數', value: 'guest_count' },
|
||||
{ text: '狀態', value: 'guadan_status', align: 'center' },
|
||||
{ text: '建立時間', value: 'created_at', align: 'center' },
|
||||
{ text: '關聯活動', value: 'activity', align: 'center' },
|
||||
{ text: '超時退房', value: 'is_timeout', align: 'center' },
|
||||
{ text: '操作', value: 'actions', align: 'center' }
|
||||
],
|
||||
options: {
|
||||
page: 1, // 當前頁
|
||||
itemsPerPage: 10, // 每頁條數
|
||||
sortBy: [],
|
||||
sortDesc: []
|
||||
},
|
||||
search: {
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
guadanUser: null,
|
||||
guaDanOrderNo: null,
|
||||
},
|
||||
total: 0,
|
||||
loading: false,
|
||||
dialog: false,
|
||||
notifications: false,
|
||||
sound: true,
|
||||
widgets: false,
|
||||
currentView: 'main-component',
|
||||
twoData: {},
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
resetTableOptions() {
|
||||
this.options = {
|
||||
page: 1,
|
||||
itemsPerPage: 10,
|
||||
sortBy: [],
|
||||
sortDesc: []
|
||||
};
|
||||
},
|
||||
handleSearch() {
|
||||
|
||||
let orderNo = this.search.guaDanOrderNo;
|
||||
if (orderNo) {
|
||||
orderNo = orderNo.replace(/\s+/g, '');
|
||||
this.search.guaDanOrderNo = orderNo;
|
||||
}
|
||||
const val = this.search.guadanUser;
|
||||
|
||||
// 驗證是否包含空格
|
||||
if (val && /\s/.test(val)) {
|
||||
this.$refs.messageModal.open({
|
||||
message: '掛單登記人不能包含空格'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 驗證長度
|
||||
if (val && val.length > 10) {
|
||||
this.$refs.messageModal.open({
|
||||
message: '掛單登記人不能超過 10 個字'
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.resetTableOptions();
|
||||
},
|
||||
clearSearch() {
|
||||
this.search.startDate = null;
|
||||
this.search.endDate = null;
|
||||
this.search.guadanUser = null;
|
||||
this.search.guaDanOrderNo = null;
|
||||
this.resetTableOptions();
|
||||
},
|
||||
getGuadanOrder() {
|
||||
if (this.loading) return;
|
||||
axios.post(HTTP_HOST + 'api/guadan/list', {
|
||||
startDate: this.search.startDate,
|
||||
endDate: this.search.endDate,
|
||||
guadanUser: this.search.guadanUser,
|
||||
guaDanOrderNo: this.search.guaDanOrderNo,
|
||||
page: this.options.page,
|
||||
pageSize: this.options.itemsPerPage
|
||||
})
|
||||
.then((res) => {
|
||||
this.items = res.data.data;
|
||||
this.total = res.data.total;
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
deleteGuadanOrder(order) {
|
||||
this.$refs.confirmModal.open({
|
||||
message: '確認取消掛單?',
|
||||
onConfirm: () => {
|
||||
axios.post(HTTP_HOST + 'api/guadan/cancel', null, {
|
||||
params: {
|
||||
uuid: order.uuid
|
||||
}
|
||||
}).then((res) => {
|
||||
this.items = this.items.filter(a => a.uuid != order.uuid)
|
||||
this.$refs.messageModal.open({
|
||||
message: '取消成功'
|
||||
})
|
||||
}).catch((error) => {
|
||||
this.$refs.messageModal.open({
|
||||
message: error.response?.data || '取消失敗'
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
components: {
|
||||
'main-component': httpVueLoader('./main.vue'),
|
||||
'apply-component': httpVueLoader('./apply.vue'),
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
handler() {
|
||||
this.getGuadanOrder(); // 監聽分頁、排序變化,自動載入數據
|
||||
|
||||
},
|
||||
deep: true,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getGuadanOrder();
|
||||
|
||||
},
|
||||
methods: {
|
||||
changeView(item) {
|
||||
console.log("index changeView", item);
|
||||
if (item.action === "new") {
|
||||
console.log("go to new");
|
||||
this.dialog = true;
|
||||
} else if (item.action === "view") {
|
||||
console.log("go to view");
|
||||
} else if (item.action === "edit") {
|
||||
console.log("go to edit");
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
pageCount() {
|
||||
return Math.ceil(this.total / this.options.itemsPerPage)
|
||||
},
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.row-timeout {
|
||||
background-color: #ffdddd !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,254 @@
|
||||
<template>
|
||||
<div class="container-fluid">
|
||||
<nav>
|
||||
<!--<a href="create.aspx" class="btn btn-primary">新增</a>-->
|
||||
<button class="btn btn-primary" @click.prevent="changeViews()">新增</button>
|
||||
</nav>
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<label class="mb-0">掛單單號</label>
|
||||
<input class="form-control w-auto" style="width:150px;" v-model="search.guaDanOrderNo" />
|
||||
<label class="mb-0">掛單登記人</label>
|
||||
<input class="form-control w-auto" style="width:150px;" v-model="search.guadanUser" />
|
||||
|
||||
<label class="mb-0">開始時間</label>
|
||||
<input class="form-control w-auto" style="width:150px;" type="date" v-model="search.startDate" />
|
||||
|
||||
<label class="mb-0">結束時間</label>
|
||||
<input class="form-control w-auto" style="width:150px;" type="date" v-model="search.endDate" />
|
||||
|
||||
<button class="btn btn-primary" type="button" @click="handleSearch">查詢</button>
|
||||
<button class="btn btn-outline-primary" type="button" @click="clearSearch">清除條件</button>
|
||||
</div>
|
||||
|
||||
<div class="mx-5">
|
||||
<v-data-table :items="items"
|
||||
:headers="headers"
|
||||
:item-class="item => item.is_timeout ? 'row-timeout' : ''"
|
||||
hide-default-footer>
|
||||
<template #item.actions="{item}">
|
||||
<button class="btn btn-primary">查看</button>
|
||||
<!--<a :href="'view.aspx?orderId='+item.guaDanOrderNo" class="btn btn-primary">查看</a>-->
|
||||
<button class="btn btn-secondary"
|
||||
:style="item.guadan_status?.code == 502 ? 'pointer-events: none; opacity: 0.5; cursor: not-allowed;' : ''">編輯</button>
|
||||
<!--<a :href="'create.aspx?orderId='+item.guaDanOrderNo" class="btn btn-secondary"
|
||||
:style="item.guadan_status?.code == 502 ? 'pointer-events: none; opacity: 0.5; cursor: not-allowed;' : ''">編輯</a>-->
|
||||
<button class="btn btn-outline-danger" :style="item.guest_count != 0 ? 'pointer-events: none; opacity: 0.5; cursor: not-allowed;' : ''"
|
||||
@click.prevent="item.guest_count != 0 ? null : deleteGuadanOrder(item)">
|
||||
取消
|
||||
</button>
|
||||
<!--<a class="btn btn-outline-danger"
|
||||
href="#"
|
||||
:style="item.guest_count != 0 ? 'pointer-events: none; opacity: 0.5; cursor: not-allowed;' : ''"
|
||||
@click.prevent="item.guest_count != 0 ? null : deleteGuadanOrder(item)">
|
||||
取消
|
||||
</a>-->
|
||||
|
||||
</template>
|
||||
<template #item.room="{item}">
|
||||
{{item.room.name}}
|
||||
</template>
|
||||
<template #item.bed="{item}">
|
||||
{{item.bed.name}}
|
||||
</template>
|
||||
<template #item.guadan_status="{item}">
|
||||
{{item.guadan_status?.name}}
|
||||
</template>
|
||||
<template #item.start_date="{item}">
|
||||
{{item.start_date | timeString('YYYY/MM/DD')}}
|
||||
</template>
|
||||
<template #item.end_date="{item}">
|
||||
{{item.end_date | timeString('YYYY/MM/DD')}}
|
||||
</template>
|
||||
<template #item.created_at="{item}">
|
||||
{{item.created_at | timeString('YYYY/MM/DD HH:mm')}}
|
||||
</template>
|
||||
<template #item.activity="{item}">
|
||||
{{item.activity?.subject}}
|
||||
</template>
|
||||
<template #item.is_timeout="{item}">
|
||||
{{item.is_timeout ? '已超時': '否'}}
|
||||
</template>
|
||||
</v-data-table>
|
||||
<v-container>
|
||||
<v-row class="align-baseline" wrap="false">
|
||||
<v-col cols="12" md="8">
|
||||
<v-pagination v-model="options.page"
|
||||
:length="pageCount">
|
||||
</v-pagination>
|
||||
</v-col>
|
||||
<v-col class="text-truncate text-right" cols="12" md="2">
|
||||
共 {{ total }} 筆, 頁數:
|
||||
</v-col>
|
||||
<v-col cols="6" md="1">
|
||||
<v-text-field v-model="options.page"
|
||||
type="number"
|
||||
hide-details
|
||||
dense
|
||||
min="1"
|
||||
:max="pageCount"
|
||||
@input="options.page = parseInt($event, 10)"></v-text-field>
|
||||
</v-col>
|
||||
<!-- 每頁條數選擇 -->
|
||||
<v-col cols="12" md="1">
|
||||
<v-select v-model="options.itemsPerPage"
|
||||
:items="[5, 10, 20, 50]"
|
||||
label="每頁條數"
|
||||
dense
|
||||
hide-details
|
||||
style="width: 100px;"></v-select>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</div>
|
||||
<!-- 更新修改確認彈出視窗 -->
|
||||
<message-modal ref="messageModal"></message-modal>
|
||||
<!-- 刪除確認彈出視窗 -->
|
||||
<confirm-modal ref="confirmModal"></confirm-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
Vue.filter('timeString', function (value, myFormat) {
|
||||
return value == null || value == "" ? "" : moment(value).format(myFormat || 'YYYY-MM-DD, HH:mm:ss');
|
||||
});
|
||||
module.exports = {
|
||||
props: ['formData'],
|
||||
vuetify: new Vuetify(vuetify_options),
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
headers: [
|
||||
{ text: '登記掛單蓮友', value: 'bookerName' },
|
||||
{ text: '掛單單號', value: 'guaDanOrderNo' },
|
||||
{ text: '起始日期', value: 'start_date', align: 'center' },
|
||||
{ text: '結束日期', value: 'end_date', align: 'center' },
|
||||
{ text: '掛單人數', value: 'guest_count' },
|
||||
{ text: '狀態', value: 'guadan_status', align: 'center' },
|
||||
{ text: '建立時間', value: 'created_at', align: 'center' },
|
||||
{ text: '關聯活動', value: 'activity', align: 'center' },
|
||||
{ text: '超時退房', value: 'is_timeout', align: 'center' },
|
||||
{ text: '操作', value: 'actions', align: 'center' }
|
||||
],
|
||||
options: {
|
||||
page: 1, // 當前頁
|
||||
itemsPerPage: 10, // 每頁條數
|
||||
sortBy: [],
|
||||
sortDesc: []
|
||||
},
|
||||
search: {
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
guadanUser: null,
|
||||
guaDanOrderNo: null,
|
||||
},
|
||||
total: 0,
|
||||
loading: false,
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeViews() {
|
||||
console.log("changeViews");
|
||||
this.$emit('custom-event', { action: 'new', item: "1" });
|
||||
},
|
||||
resetTableOptions() {
|
||||
this.options = {
|
||||
page: 1,
|
||||
itemsPerPage: 10,
|
||||
sortBy: [],
|
||||
sortDesc: []
|
||||
};
|
||||
},
|
||||
handleSearch() {
|
||||
|
||||
let orderNo = this.search.guaDanOrderNo;
|
||||
if (orderNo) {
|
||||
orderNo = orderNo.replace(/\s+/g, '');
|
||||
this.search.guaDanOrderNo = orderNo;
|
||||
}
|
||||
const val = this.search.guadanUser;
|
||||
|
||||
// 驗證是否包含空格
|
||||
if (val && /\s/.test(val)) {
|
||||
this.$refs.messageModal.open({
|
||||
message: '掛單登記人不能包含空格'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 驗證長度
|
||||
if (val && val.length > 10) {
|
||||
this.$refs.messageModal.open({
|
||||
message: '掛單登記人不能超過 10 個字'
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.resetTableOptions();
|
||||
},
|
||||
clearSearch() {
|
||||
this.search.startDate = null;
|
||||
this.search.endDate = null;
|
||||
this.search.guadanUser = null;
|
||||
this.search.guaDanOrderNo = null;
|
||||
this.resetTableOptions();
|
||||
},
|
||||
getGuadanOrder() {
|
||||
if (this.loading) return;
|
||||
axios.post(HTTP_HOST + 'api/guadan/list', {
|
||||
startDate: this.search.startDate,
|
||||
endDate: this.search.endDate,
|
||||
guadanUser: this.search.guadanUser,
|
||||
guaDanOrderNo: this.search.guaDanOrderNo,
|
||||
page: this.options.page,
|
||||
pageSize: this.options.itemsPerPage
|
||||
})
|
||||
.then((res) => {
|
||||
this.items = res.data.data;
|
||||
this.total = res.data.total;
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
deleteGuadanOrder(order) {
|
||||
this.$refs.confirmModal.open({
|
||||
message: '確認取消掛單?',
|
||||
onConfirm: () => {
|
||||
axios.post(HTTP_HOST + 'api/guadan/cancel', null, {
|
||||
params: {
|
||||
uuid: order.uuid
|
||||
}
|
||||
}).then((res) => {
|
||||
this.items = this.items.filter(a => a.uuid != order.uuid)
|
||||
this.$refs.messageModal.open({
|
||||
message: '取消成功'
|
||||
})
|
||||
}).catch((error) => {
|
||||
this.$refs.messageModal.open({
|
||||
message: error.response?.data || '取消失敗'
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
handler() {
|
||||
this.getGuadanOrder(); // 監聽分頁、排序變化,自動載入數據
|
||||
},
|
||||
deep: true,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getGuadanOrder();
|
||||
},
|
||||
computed: {
|
||||
pageCount() {
|
||||
return Math.ceil(this.total / this.options.itemsPerPage)
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,6 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,6 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
@@ -7,6 +7,7 @@ using System.Configuration;
|
||||
using Newtonsoft.Json;
|
||||
using System.Web;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using NPOI.OpenXmlFormats;
|
||||
|
||||
public partial class admin_index : MyWeb.function
|
||||
{
|
||||
@@ -199,6 +200,7 @@ public partial class admin_index : MyWeb.function
|
||||
|
||||
if (!isErr)
|
||||
{
|
||||
|
||||
Response.Redirect("index2.aspx");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,6 +53,16 @@
|
||||
},
|
||||
getDefault() {
|
||||
|
||||
axios
|
||||
.post(HTTP_HOST + 'api/adminUser/GetMyDefaultPage', {u_id:"17168ERP"})
|
||||
.then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data.result == "ok") {
|
||||
window.location.href = response.data.data.default_url
|
||||
}
|
||||
})
|
||||
.catch(error => console.log(error))
|
||||
|
||||
this.data_table.loading = true
|
||||
axios
|
||||
.post(HTTP_HOST + 'api/activity/GetActivityBoard', this.search)
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
<template #item.slot_btn="{ item }">
|
||||
<a @click="gotoSignup(item)" class="btn btn-outline-secondary btn-sm">報名</a>
|
||||
<a @click="gotoBatchSignup(item)" class="btn btn-outline-secondary btn-sm">批次報名</a>
|
||||
<a @click="gotoImport(item)" class="btn btn-outline-secondary btn-sm">匯入Excel</a>
|
||||
<a @click="gotoSignupList(item)" class="btn btn-outline-secondary btn-sm">明細</a>
|
||||
|
||||
</template>
|
||||
@@ -213,6 +214,10 @@
|
||||
this.search.subject = ""
|
||||
this.search.up_time1=""
|
||||
},
|
||||
gotoImport(item) {
|
||||
this.$emit('custom-event', { action: 'import', item: item });
|
||||
|
||||
},
|
||||
gotoBatchSignup(item) {
|
||||
this.$emit('custom-event', { action: 'batchSign', item: item });
|
||||
},
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<div class="container-fluid">
|
||||
<v-card>
|
||||
<v-card-title class="bg-primary white--text text-center">
|
||||
<h4>Excel匯入</h4>
|
||||
<div class="ms-auto">
|
||||
<!--<v-btn @click.prevent="batchSave()">儲存</v-btn>
|
||||
<v-btn @click.prevent="back01()">返回</v-btn>-->
|
||||
</div>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-select :items="data_table.list"
|
||||
label="選擇法會"
|
||||
item-text="subject"
|
||||
item-value="num" v-model="selected">
|
||||
</v-select>
|
||||
<v-file-input v-model="selectedFiles" truncate-length="15" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel" label="請選擇要匯入的excel" outlined dense></v-file-input>
|
||||
<v-btn @click.prevent="importList">匯入</v-btn>
|
||||
</v-card-text>
|
||||
|
||||
</v-card>
|
||||
<v-dialog v-model="message_dialog.show" class="dialog_width">
|
||||
<template>
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
{{ message_dialog.message }}
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-btn @click.prevent="message_dialog.show=false" v-if="!message_dialog.show_confirm">關閉</v-btn>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
num: {
|
||||
type: Number
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options: { multiSort: false },
|
||||
search_options: { multiSort: false },
|
||||
message_dialog: { show: false, show_confirm: false, message: "" },
|
||||
data_table: {
|
||||
loading: true,
|
||||
list: [],
|
||||
selected: [],
|
||||
singleSelect: false,
|
||||
count: 0,
|
||||
page: 1,
|
||||
pageSize: -1,
|
||||
},
|
||||
selected: null,
|
||||
search: { subject: "" },
|
||||
selectedFiles:[],
|
||||
}
|
||||
},
|
||||
activated() {
|
||||
this.getActivity()
|
||||
},
|
||||
watch: {
|
||||
selected: {
|
||||
handler() {
|
||||
this.getProOrder()
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
importList() {
|
||||
if (!this.selectedFiles || this.selectedFiles.length === 0) return;
|
||||
|
||||
const formData = new FormData();
|
||||
|
||||
// If multiple files are enabled, loop through and append each file
|
||||
for (let i = 0; i < this.selectedFiles.length; i++) {
|
||||
formData.append('files', this.selectedFiles[i]);
|
||||
}
|
||||
|
||||
//try {
|
||||
// const response = await axios.post('/api/upload', formData, {
|
||||
// headers: {
|
||||
// 'Content-Type': 'multipart/form-data'
|
||||
// }
|
||||
// });
|
||||
// console.log('Upload success:', response.data);
|
||||
//} catch (error) {
|
||||
// console.error('Upload failed:', error);
|
||||
//}
|
||||
},
|
||||
back01() {//返回
|
||||
this.$emit('custom-event', { action: 'signup1', item: this.num });
|
||||
},
|
||||
getActivity() {//撈法會資料
|
||||
//const { sortBy, sortDesc, page, itemsPerPage } = this.options
|
||||
const params = {
|
||||
sortBy: "startDate_solar", sortDesc: true,
|
||||
page: 1, pageSize: -1
|
||||
};
|
||||
this.data_table.loading = true
|
||||
const self = this
|
||||
axios
|
||||
.post(HTTP_HOST + 'api/activity/GetListNew', this.search, { params: params })
|
||||
.then(response => {
|
||||
this.data_table.list = response.data.list
|
||||
this.data_table.list = this.data_table.list.filter(x => x.num != self.num)
|
||||
|
||||
this.data_table.count = response.data.count;
|
||||
this.data_table.loading = false
|
||||
})
|
||||
.catch(error => console.log(error))
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.v-dialog {
|
||||
width: 80% !important;
|
||||
}
|
||||
</style>
|
||||
@@ -96,6 +96,7 @@
|
||||
'fastSignUp3-component': httpVueLoader('./fastSignUp3.vue'),
|
||||
'fastSignUp4-component': httpVueLoader('./fastSignUp4.vue'),
|
||||
'fastSignUp5-component': httpVueLoader('./fastSignUp5.vue'),
|
||||
'fastSignUp6-component': httpVueLoader('./fastSignUp6.vue'),
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
@@ -126,6 +127,9 @@
|
||||
} else if (item.action === "batchSign") {
|
||||
this.twoData = item.item.num
|
||||
this.currentView = "fastSignUp5-component"
|
||||
} else if (item.action === "import") {
|
||||
this.twoData = item.item.num
|
||||
this.currentView = "fastSignUp6-component"
|
||||
}
|
||||
//console.log("item.action:",this.twoData)
|
||||
},
|
||||
|
||||
@@ -621,11 +621,11 @@
|
||||
</template>
|
||||
|
||||
<!-- 功德項目欄位格式化 -->
|
||||
<template v-for="meritItem in tab4MeritItems" v-slot:[`item.${meritItem}`]="{ item }">
|
||||
<%--<template v-for="meritItem in tab4MeritItems" v-slot:[`item.${meritItem}`]="{ item }">
|
||||
<span :class="{'grey--text': item[meritItem] === 0}">
|
||||
{{ tab4.valueType === 'amount' ? formatCurrency(item[meritItem]) : (item[meritItem] || '-') }}
|
||||
</span>
|
||||
</template>
|
||||
</template>--%>
|
||||
|
||||
<!-- 無資料提示 -->
|
||||
<template v-slot:no-data>
|
||||
|
||||
+19
-16
@@ -326,7 +326,7 @@
|
||||
:page.sync="tab2CurrentPage"
|
||||
:server-items-length="filteredRegistrations.length"
|
||||
class="elevation-1"
|
||||
item-key="報名編號"
|
||||
item-key="功德序號"
|
||||
:footer-props="{
|
||||
'items-per-page-options': [10, 20, 50, 100]
|
||||
}"
|
||||
@@ -393,7 +393,7 @@
|
||||
<v-col cols="12" md="3">
|
||||
<v-text-field
|
||||
v-model.number="tab3Filter.minCount"
|
||||
label="最少參與次數"
|
||||
label="最少功德數量"
|
||||
type="number"
|
||||
dense
|
||||
outlined
|
||||
@@ -416,8 +416,8 @@
|
||||
<v-select
|
||||
v-model="tab3SortBy"
|
||||
:items="[
|
||||
{text: '參與次數(降序)', value: 'count_desc'},
|
||||
{text: '參與次數(升序)', value: 'count_asc'},
|
||||
{text: '功德數量(降序)', value: 'count_desc'},
|
||||
{text: '功德數量(升序)', value: 'count_asc'},
|
||||
{text: '總金額(降序)', value: 'amount_desc'},
|
||||
{text: '總金額(升序)', value: 'amount_asc'}
|
||||
]"
|
||||
@@ -434,16 +434,16 @@
|
||||
<v-data-table
|
||||
:headers="tab3Headers"
|
||||
:items="filteredFollowerAnalysis"
|
||||
:items-per-page="20"
|
||||
:items-per-page="500"
|
||||
class="elevation-1"
|
||||
item-key="信眾編號"
|
||||
>
|
||||
<template v-slot:item.信眾編號="{ item }">
|
||||
<v-chip small color="info">{{ item.信眾編號 }}</v-chip>
|
||||
</template>
|
||||
<template v-slot:item.參與次數="{ item }">
|
||||
<v-chip small :color="item.參與次數 >= 5 ? 'success' : 'default'">
|
||||
{{ item.參與次數 }}
|
||||
<template v-slot:item.功德數量="{ item }">
|
||||
<v-chip small :color="item.功德數量 >= 5 ? 'success' : 'default'">
|
||||
{{ item.功德數量 }}
|
||||
</v-chip>
|
||||
</template>
|
||||
<template v-slot:item.總金額="{ item }">
|
||||
@@ -657,7 +657,7 @@
|
||||
tab3Headers: [
|
||||
{ text: '信眾編號', value: '信眾編號', width: 120 },
|
||||
{ text: '姓名', value: '姓名', width: 120 },
|
||||
{ text: '參與次數', value: '參與次數', width: 100, align: 'center' },
|
||||
{ text: '功德數量', value: '功德數量', width: 100, align: 'center' },
|
||||
{ text: '總金額', value: '總金額', width: 150, align: 'end' },
|
||||
{ text: '平均金額', value: '平均金額', width: 150, align: 'end' },
|
||||
{ text: '最近參與日期', value: '最近參與日期', width: 130 }
|
||||
@@ -719,6 +719,9 @@
|
||||
|
||||
// Tab 2: 不重複信眾數
|
||||
uniqueFollowersCount() {
|
||||
//console.log("uniqueFollowersCount:", this.filteredRegistrations.length)
|
||||
//let qq = this.filteredRegistrations.filter(x => x.信眾姓名 === "周阿着")
|
||||
//console.log(qq);
|
||||
if (!this.filteredRegistrations.length) return 0;
|
||||
const followers = new Set(this.filteredRegistrations.map(x => x.信眾編號));
|
||||
return followers.size;
|
||||
@@ -747,13 +750,13 @@
|
||||
followerMap[fNum] = {
|
||||
信眾編號: fNum,
|
||||
姓名: item.信眾姓名,
|
||||
參與次數: 0,
|
||||
功德數量: 0,
|
||||
總金額: 0,
|
||||
最近參與日期: item.報名日期
|
||||
};
|
||||
}
|
||||
|
||||
followerMap[fNum].參與次數++;
|
||||
followerMap[fNum].功德數量++;
|
||||
followerMap[fNum].總金額 += (item.金額 * item.數量);
|
||||
|
||||
// 更新最近參與日期
|
||||
@@ -765,7 +768,7 @@
|
||||
// 轉換為陣列,並計算平均金額
|
||||
return Object.values(followerMap).map(f => ({
|
||||
...f,
|
||||
平均金額: Math.round(f.總金額 / f.參與次數)
|
||||
平均金額: Math.round(f.總金額 / f.功德數量)
|
||||
}));
|
||||
},
|
||||
|
||||
@@ -778,9 +781,9 @@
|
||||
data = data.filter(x => x.信眾編號 && x.信眾編號.includes(this.tab3Filter.followerCode));
|
||||
}
|
||||
|
||||
// 過濾:最少參與次數
|
||||
// 過濾:最少功德數量
|
||||
if (this.tab3Filter.minCount) {
|
||||
data = data.filter(x => x.參與次數 >= this.tab3Filter.minCount);
|
||||
data = data.filter(x => x.功德數量 >= this.tab3Filter.minCount);
|
||||
}
|
||||
|
||||
// 過濾:最少總金額
|
||||
@@ -791,10 +794,10 @@
|
||||
// 排序
|
||||
switch (this.tab3SortBy) {
|
||||
case 'count_desc':
|
||||
data.sort((a, b) => b.參與次數 - a.參與次數);
|
||||
data.sort((a, b) => b.功德數量 - a.功德數量);
|
||||
break;
|
||||
case 'count_asc':
|
||||
data.sort((a, b) => a.參與次數 - b.參與次數);
|
||||
data.sort((a, b) => a.功德數量 - b.功德數量);
|
||||
break;
|
||||
case 'amount_desc':
|
||||
data.sort((a, b) => b.總金額 - a.總金額);
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Templates/TBS5ADM001/MasterPage.master" AutoEventWireup="true" CodeFile="preview.aspx.cs" Inherits="admin_print_preview" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="page_header" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="page_nav" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
|
||||
<div id="content" class="container-md">
|
||||
<v-data-table
|
||||
v-model="order_data.selected"
|
||||
:items="order_data.list"
|
||||
item-key="order_no"
|
||||
:headers="order_data.header"
|
||||
:loading="order_data.loading"
|
||||
show-select
|
||||
class="elevation-1">
|
||||
<template #item.detail ="{item}">
|
||||
{{item.detail.count}}
|
||||
</template>
|
||||
<template #item.slot_type ="{item}">
|
||||
{{item.detail.actItem?.substring(0,3)}}
|
||||
</template>
|
||||
<template #item.up_time ="{item}">
|
||||
{{item.up_time|timeString('YYYY-MM-DD')}}
|
||||
</template>
|
||||
<template #item.print="{item}">
|
||||
<v-icon color="blue" class="mr-2" @click="yulan_single(item);" >
|
||||
mdi-printer
|
||||
</v-icon>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="offCanvasRight" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="footer_script" Runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class admin_print_preview : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -237,6 +237,7 @@
|
||||
data.forEach(x => {
|
||||
param.push({ order_no: x.order_no, num: x.num });
|
||||
});
|
||||
console.log("param", param);
|
||||
await axios
|
||||
.post(this.http_host + 'api/orderdetail/GetDetailToPrint', { param: param })
|
||||
.then(response => {
|
||||
@@ -629,6 +630,7 @@
|
||||
<span class="sub-text">${parts[1] || ''}</span>
|
||||
</div>`;
|
||||
} else if (d.elementID === "address") {
|
||||
console.log(address, d.fontSize, d.height)
|
||||
newFontSize = self.scaleFontSize(address, d.fontSize, d.height);
|
||||
html = self.renderNormal(address, d)
|
||||
} else if (d.elementID === "lefttitle") {
|
||||
@@ -1022,23 +1024,31 @@
|
||||
let h = parseFloat(el.height);
|
||||
let w = parseFloat(el.width);
|
||||
let th = parseFloat(el.textHeight) || h;
|
||||
|
||||
let v_gap = parseFloat(el.textSpan) || 0;
|
||||
let h_gap = 5;
|
||||
let shrinkLimit = 4;
|
||||
if (Number(el.height) < 300) {
|
||||
shrinkLimit = 8;
|
||||
} else if (Number(el.height) < 500) {
|
||||
shrinkLimit = 6;
|
||||
}
|
||||
let s = parseFloat(el.fontSize);
|
||||
if (names.length == 2) {
|
||||
h = th + v_gap;
|
||||
}
|
||||
if (Number(el.height) < 300) shrinkLimit = 8;
|
||||
else if (Number(el.height) < 500) shrinkLimit = 6;
|
||||
|
||||
// 🚀 新增:取得這批名單的最大字數,確保所有格子高度統一
|
||||
let maxLen = Math.max(...names.map(x => x.length), 1);
|
||||
let s = parseFloat(el.style ? el.style.fontSize : el.fontSize);
|
||||
if (names.length == 2) h = th + v_gap;
|
||||
// 🚀 關鍵修復:刪除了
|
||||
// 確保 liveList 總高度永遠維持使用者設定的原始高度,不會異常縮小!
|
||||
|
||||
// 1. 建立 items 陣列,精準判斷短字串與長字串 (佔滿一整行)
|
||||
const init_size_px = s * 1.333;
|
||||
let items = names.map(rawName => {
|
||||
let name = rawName.trim();
|
||||
let l = name.length;
|
||||
// 6個字以內,或換算後能塞入預設區塊的視為短名
|
||||
let isShort = (l <= 6) || ((l * init_size_px) <= (th + (v_gap / 2)));
|
||||
return { name: name, l: l, isShort: isShort, isMulti: false };
|
||||
});
|
||||
|
||||
// 取得短名的最大字數作為標準網格基準
|
||||
let maxShortLen = Math.max(...items.filter(x => x.isShort).map(x => x.l), 1);
|
||||
|
||||
// 2. 單一變數 s 全局統一縮放,長字串為主計算
|
||||
while (s >= shrinkLimit) {
|
||||
let size_px = s * 1.333;
|
||||
let current_col_h = 0;
|
||||
@@ -1046,29 +1056,16 @@
|
||||
let cols_width = [];
|
||||
let any_wrapped = false;
|
||||
|
||||
for (let i = 0; i < names.length; i++) {
|
||||
let l = names[i].length;
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
let item = items[i];
|
||||
let l = item.l;
|
||||
|
||||
// 🚀 修正:排版預測時,統一使用最大字數來計算所需高度
|
||||
let natural_max_h = maxLen * size_px;
|
||||
if (item.isShort) {
|
||||
// 短字串照原規則疊加
|
||||
let natural_max_h = maxShortLen * size_px;
|
||||
let item_h = Math.max(th, natural_max_h);
|
||||
if (item_h > natural_max_h * 1.5) item_h = natural_max_h * 1.5;
|
||||
|
||||
if (item_h > natural_max_h * 1.5) {
|
||||
item_h = natural_max_h * 1.5;
|
||||
}
|
||||
|
||||
if (item_h > (h - 5)) {
|
||||
any_wrapped = true;
|
||||
if (current_col_h > 0) {
|
||||
cols_width.push(current_col_w);
|
||||
current_col_h = 0;
|
||||
current_col_w = 0;
|
||||
}
|
||||
let chars_per_col = Math.floor((h - 5) / size_px);
|
||||
if (chars_per_col < 1) chars_per_col = 1;
|
||||
let item_cols = Math.ceil(l / chars_per_col);
|
||||
cols_width.push(item_cols * (size_px * 1.1));
|
||||
} else {
|
||||
if (current_col_h === 0) {
|
||||
current_col_h = item_h;
|
||||
current_col_w = size_px;
|
||||
@@ -1080,17 +1077,34 @@
|
||||
current_col_h = item_h;
|
||||
current_col_w = size_px;
|
||||
}
|
||||
} else {
|
||||
// 長字串處理:一旦遇到長字串,強制換行並獨佔一整欄 (配發 h 高度)
|
||||
if (current_col_h > 0) {
|
||||
cols_width.push(current_col_w);
|
||||
current_col_h = 0;
|
||||
current_col_w = 0;
|
||||
}
|
||||
let item_w = size_px;
|
||||
if ((l * size_px) > (h - 10)) {
|
||||
item.isMulti = true;
|
||||
any_wrapped = true;
|
||||
let chars_per_col = Math.floor((h - 10) / size_px);
|
||||
if (chars_per_col < 1) chars_per_col = 1;
|
||||
let item_cols = Math.ceil(l / chars_per_col);
|
||||
item_w = item_cols * (size_px * 1.1);
|
||||
} else {
|
||||
item.isMulti = false;
|
||||
}
|
||||
cols_width.push(item_w);
|
||||
}
|
||||
}
|
||||
|
||||
if (current_col_h > 0) cols_width.push(current_col_w);
|
||||
|
||||
let totalWidth = cols_width.reduce((a, b) => a + b, 0) + (cols_width.length > 1 ? (cols_width.length - 1) * h_gap : 0);
|
||||
|
||||
if (totalWidth <= w && (!any_wrapped || s === shrinkLimit)) {
|
||||
if (totalWidth <= w) {
|
||||
break;
|
||||
}
|
||||
|
||||
s -= 1;
|
||||
}
|
||||
|
||||
@@ -1104,56 +1118,60 @@
|
||||
"align-items": "center",
|
||||
"margin": "auto",
|
||||
"width": `${w}px`,
|
||||
"height": `${h}px`,
|
||||
"height": `${h}px`, // 這裡的 h 已經恢復維持原設定值!
|
||||
"border": "0px solid transparent",
|
||||
"padding": "0px",
|
||||
"font-family": el.fontFamily,
|
||||
"font-family": el.style ? el.style.fontFamily : el.fontFamily,
|
||||
"column-gap": `${v_gap}px`
|
||||
});
|
||||
|
||||
let self = this;
|
||||
names.forEach(name => {
|
||||
// 🚀 將 maxLen 傳遞給渲染函式
|
||||
$namelist.append(self.renderLiveSpan(name, el, s, maxLen));
|
||||
// 3. 將 item 物件傳入,讓 renderLiveSpan 知道它是長或短
|
||||
items.forEach(item => {
|
||||
$namelist.append(self.renderLiveSpan(item, el, s, maxShortLen));
|
||||
});
|
||||
return $namelist;
|
||||
},
|
||||
|
||||
// 🚀 接收 maxLen 參數
|
||||
renderLiveSpan(name, el, fontSize, maxLen = 1) {
|
||||
renderLiveSpan(item, el, fontSize, maxLen = 1) {
|
||||
let h = parseFloat(el.height);
|
||||
let th = parseFloat(el.textHeight) || h;
|
||||
let size_px = fontSize * 1.333;
|
||||
let l = name.length;
|
||||
|
||||
// 支援舊有單純傳入字串的防呆
|
||||
let nameStr = typeof item === 'string' ? item : item.name;
|
||||
let isShort = typeof item === 'string' ? true : item.isShort;
|
||||
let isMulti = typeof item === 'string' ? false : item.isMulti;
|
||||
let l = nameStr.length;
|
||||
|
||||
// 4. 高度分配邏輯:長字串佔滿全高 h,短字串用網格標準高度
|
||||
let natural_max_h = maxLen * size_px;
|
||||
let boxH_num = Math.max(th, natural_max_h);
|
||||
let boxH_num = isShort ? Math.max(th, natural_max_h) : h;
|
||||
|
||||
if (boxH_num > natural_max_h * 1.5) {
|
||||
if (isShort && boxH_num > natural_max_h * 1.5) {
|
||||
boxH_num = natural_max_h * 1.5;
|
||||
}
|
||||
|
||||
let minH = `${boxH_num}px`;
|
||||
let alignStyle = "justify";
|
||||
let spanDisplay = "block";
|
||||
let spanJustifyContent = "flex-start";
|
||||
|
||||
// 預設對齊:長字串/多行靠上 (start),短字串預設分散 (justify)
|
||||
let alignStyle = isMulti || (!isMulti && !isShort) ? "start" : "justify";
|
||||
|
||||
if (isShort) {
|
||||
let contentH = l * size_px;
|
||||
let emptySpace = boxH_num - contentH;
|
||||
let gapsCount = l > 1 ? (l - 1) : 1;
|
||||
let avgGap = emptySpace / gapsCount;
|
||||
|
||||
// 🚀 關鍵修正:當陽上名字字距過大觸發防過度拉扯時,改為「靠上對齊 (start)」而不是置中 (center)
|
||||
// 短名防過度拉扯:字距超過字體的 1.5 倍時自動靠上切齊
|
||||
if (alignStyle === "justify" && avgGap > (size_px * 1.5)) {
|
||||
alignStyle = "justify"; // 改為靠上,讓字首切齊
|
||||
spanDisplay = "block";
|
||||
spanJustifyContent = "space-between"; // Flex 靠上
|
||||
alignStyle = "start";
|
||||
}
|
||||
}
|
||||
|
||||
return $(`<span style="font-size: ${fontSize}pt;">${name}</span>`).css({
|
||||
"display": spanDisplay,
|
||||
"justify-content": spanJustifyContent,
|
||||
"align-items": "center",
|
||||
// 完全使用 block 與原生對齊,避免 Flex 破壞直書對齊
|
||||
return $(`<span style="font-size: ${fontSize}pt;">${nameStr}</span>`).css({
|
||||
"display": "block",
|
||||
"min-height": minH,
|
||||
"max-height": `${h}px`,
|
||||
"width": "auto",
|
||||
@@ -1170,6 +1188,154 @@
|
||||
// let h = parseFloat(el.height);
|
||||
// let w = parseFloat(el.width);
|
||||
// let th = parseFloat(el.textHeight) || h;
|
||||
|
||||
// let v_gap = parseFloat(el.textSpan) || 0;
|
||||
// let h_gap = 5;
|
||||
// let shrinkLimit = 4;
|
||||
// if (Number(el.height) < 300) {
|
||||
// shrinkLimit = 8;
|
||||
// } else if (Number(el.height) < 500) {
|
||||
// shrinkLimit = 6;
|
||||
// }
|
||||
// let s = parseFloat(el.fontSize);
|
||||
// if (names.length == 2) {
|
||||
// h = th + v_gap;
|
||||
// }
|
||||
|
||||
// // 🚀 新增:取得這批名單的最大字數,確保所有格子高度統一
|
||||
// let maxLen = Math.max(...names.map(x => x.length), 1);
|
||||
|
||||
// while (s >= shrinkLimit) {
|
||||
// let size_px = s * 1.333;
|
||||
// let current_col_h = 0;
|
||||
// let current_col_w = 0;
|
||||
// let cols_width = [];
|
||||
// let any_wrapped = false;
|
||||
|
||||
// for (let i = 0; i < names.length; i++) {
|
||||
// let l = names[i].length;
|
||||
|
||||
// // 🚀 修正:排版預測時,統一使用最大字數來計算所需高度
|
||||
// let natural_max_h = maxLen * size_px;
|
||||
// let item_h = Math.max(th, natural_max_h);
|
||||
|
||||
// if (item_h > natural_max_h * 1.5) {
|
||||
// item_h = natural_max_h * 1.5;
|
||||
// }
|
||||
|
||||
// if (item_h > (h - 5)) {
|
||||
// any_wrapped = true;
|
||||
// if (current_col_h > 0) {
|
||||
// cols_width.push(current_col_w);
|
||||
// current_col_h = 0;
|
||||
// current_col_w = 0;
|
||||
// }
|
||||
// let chars_per_col = Math.floor((h - 5) / size_px);
|
||||
// if (chars_per_col < 1) chars_per_col = 1;
|
||||
// let item_cols = Math.ceil(l / chars_per_col);
|
||||
// cols_width.push(item_cols * (size_px * 1.1));
|
||||
// } else {
|
||||
// if (current_col_h === 0) {
|
||||
// current_col_h = item_h;
|
||||
// current_col_w = size_px;
|
||||
// } else if (current_col_h + v_gap + item_h <= h) {
|
||||
// current_col_h += v_gap + item_h;
|
||||
// if (size_px > current_col_w) current_col_w = size_px;
|
||||
// } else {
|
||||
// cols_width.push(current_col_w);
|
||||
// current_col_h = item_h;
|
||||
// current_col_w = size_px;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (current_col_h > 0) cols_width.push(current_col_w);
|
||||
|
||||
// let totalWidth = cols_width.reduce((a, b) => a + b, 0) + (cols_width.length > 1 ? (cols_width.length - 1) * h_gap : 0);
|
||||
|
||||
// if (totalWidth <= w && (!any_wrapped || s === shrinkLimit)) {
|
||||
// break;
|
||||
// }
|
||||
|
||||
// s -= 1;
|
||||
// }
|
||||
|
||||
// if (s < shrinkLimit) s = shrinkLimit;
|
||||
|
||||
// let $namelist = $(`<div class='liveList'></div>`).css({
|
||||
// "writing-mode": "vertical-rl",
|
||||
// "display": "flex",
|
||||
// "flex-flow": "wrap",
|
||||
// "align-content": "center",
|
||||
// "align-items": "center",
|
||||
// "margin": "auto",
|
||||
// "width": `${w}px`,
|
||||
// "height": `${h}px`,
|
||||
// "border": "0px solid transparent",
|
||||
// "padding": "0px",
|
||||
// "font-family": el.fontFamily,
|
||||
// "column-gap": `${v_gap}px`
|
||||
// });
|
||||
|
||||
// let self = this;
|
||||
// names.forEach(name => {
|
||||
// // 🚀 將 maxLen 傳遞給渲染函式
|
||||
// $namelist.append(self.renderLiveSpan(name, el, s, maxLen));
|
||||
// });
|
||||
// return $namelist;
|
||||
//},
|
||||
|
||||
//// 🚀 接收 maxLen 參數
|
||||
//renderLiveSpan(name, el, fontSize, maxLen = 1) {
|
||||
// let h = parseFloat(el.height);
|
||||
// let th = parseFloat(el.textHeight) || h;
|
||||
// let size_px = fontSize * 1.333;
|
||||
// let l = name.length;
|
||||
|
||||
// let natural_max_h = maxLen * size_px;
|
||||
// let boxH_num = Math.max(th, natural_max_h);
|
||||
|
||||
// if (boxH_num > natural_max_h * 1.5) {
|
||||
// boxH_num = natural_max_h * 1.5;
|
||||
// }
|
||||
|
||||
// let minH = `${boxH_num}px`;
|
||||
// let alignStyle = "justify";
|
||||
// let spanDisplay = "block";
|
||||
// let spanJustifyContent = "space-between";
|
||||
|
||||
// let contentH = l * size_px;
|
||||
// let emptySpace = boxH_num - contentH;
|
||||
// let gapsCount = l > 1 ? (l - 1) : 1;
|
||||
// let avgGap = emptySpace / gapsCount;
|
||||
|
||||
// // 🚀 關鍵修正:當陽上名字字距過大觸發防過度拉扯時,改為「靠上對齊 (start)」而不是置中 (center)
|
||||
// if (alignStyle === "justify" && avgGap > (size_px * 1.5)) {
|
||||
// alignStyle = "start"; // 改為靠上,讓字首切齊
|
||||
// spanDisplay = "block";
|
||||
// spanJustifyContent = "flex-start"; // Flex 靠上
|
||||
// }
|
||||
|
||||
// return $(`<span style="font-size: ${fontSize}pt;">${name}</span>`).css({
|
||||
// "display": spanDisplay,
|
||||
// "justify-content": spanJustifyContent,
|
||||
// "align-items": "center",
|
||||
// "min-height": minH,
|
||||
// "max-height": `${h}px`,
|
||||
// "width": "auto",
|
||||
// "text-align": alignStyle,
|
||||
// "text-align-last": alignStyle,
|
||||
// "margin-left": "0px",
|
||||
// "margin-top": "0px",
|
||||
// "text-justify": "inter-character",
|
||||
// "word-break": "break-all",
|
||||
// "white-space": "pre-line"
|
||||
// });
|
||||
//},
|
||||
//renderLiveList(names, el) {
|
||||
// let h = parseFloat(el.height);
|
||||
// let w = parseFloat(el.width);
|
||||
// let th = parseFloat(el.textHeight) || h;
|
||||
// let h_gap = parseFloat(el.textSpan) || 0; // 陽上的 textSpan 通常作為水平欄距 (column-gap)
|
||||
// let v_gap = 0; // 陽上通常不需要垂直間距
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class admin_print_print_multi_preview : MyWeb.function
|
||||
{
|
||||
private Model.ezEntities _db = new Model.ezEntities();
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -29,15 +29,20 @@ function init_print() {
|
||||
}
|
||||
//console.log(n,t,t.trim().length);
|
||||
});
|
||||
//console.log(i, $(this).html(),$(this).text());
|
||||
//console.log(i, txt==htm);
|
||||
//console.log(i, txt_arr, line, line_len);
|
||||
console.log(i, $(this).html(),$(this).text());
|
||||
console.log(i, txt==htm);
|
||||
console.log(i, txt_arr, line, line_len);
|
||||
line_len = Math.ceil(line_len / 3) * 3;
|
||||
//if(line>1){
|
||||
css = $(this).attr("style")||"";
|
||||
if(css.length>0){
|
||||
css += ";";
|
||||
}
|
||||
if (line_len > 20) {
|
||||
line = Math.ceil( line_len / 20);
|
||||
line_len = 20;
|
||||
|
||||
}
|
||||
css += "--lines:" + line + ";--line_len:" + line_len + ";";
|
||||
|
||||
//字少時, 加空間
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
.catch(error => console.log(error))
|
||||
},
|
||||
yulan_print() {
|
||||
_url = HTTP_HOST + 'admin/printpw/index.aspx';
|
||||
_url = HTTP_HOST + 'admin/print/print_multi_preview.aspx'; //'admin/printpw/index.aspx';
|
||||
var form = document.createElement("form");
|
||||
form.method = "POST";
|
||||
form.action = _url;
|
||||
@@ -167,19 +167,26 @@
|
||||
form.appendChild(hiddenField);
|
||||
};
|
||||
let orders = []
|
||||
let list = []
|
||||
console.log("Selected orders:", this.order_data.selected);
|
||||
this.order_data.selected.forEach(x => {
|
||||
orders.push(x.order_no)
|
||||
list.push({
|
||||
num: x.f_num, order_no: x.order_no
|
||||
})
|
||||
})
|
||||
if (orders.length==0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
localStorage.setItem("list", JSON.stringify(list));
|
||||
addHiddenField("orders", orders);
|
||||
document.body.appendChild(form); // Not entirely sure if this is necessary
|
||||
form.submit();
|
||||
document.body.removeChild(form);
|
||||
},
|
||||
yulan_single(item) {
|
||||
_url = HTTP_HOST + '/admin/printpw/index.aspx';
|
||||
_url = HTTP_HOST + 'admin/print/print_multi_preview.aspx'; //'/admin/printpw/index.aspx';
|
||||
var form = document.createElement("form");
|
||||
form.method = "POST";
|
||||
form.action = _url;
|
||||
@@ -193,6 +200,16 @@
|
||||
hiddenField.value = value;
|
||||
form.appendChild(hiddenField);
|
||||
};
|
||||
console.log("Selected orders:", this.order_data.selected);
|
||||
let list = []
|
||||
//console.log("print_data.selected:",this.print_data.item);
|
||||
this.order_data.selected.forEach(item => {
|
||||
list.push({
|
||||
num: item.f_num, order_no: item.order_no
|
||||
})
|
||||
})
|
||||
console.log("Selected orders list:", list);
|
||||
localStorage.setItem("list", JSON.stringify(list));
|
||||
addHiddenField("order_no", item.order_no);
|
||||
document.body.appendChild(form); // Not entirely sure if this is necessary
|
||||
form.submit();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="mb-2 mb-sm-0 d-flex align-items-center gap-2">
|
||||
<v-text-field v-model="query.start_date" label="活動起始日" type="date" dense outlined></v-text-field>
|
||||
<v-text-field v-model="query.end_date" label="活動結束日" type="date" dense outlined></v-text-field>
|
||||
<button class="btn btn-primary" @click="queryActivity">查詢</button>
|
||||
<button class="btn btn-primary" @click.prevent="queryActivity">查詢</button>
|
||||
<%--<span>查看疏文</span>
|
||||
<select v-model="currentActivityNum" @change="onActivityChange" class="form-select" style="width: auto;">
|
||||
<option value="">請選擇要查看的活動</option>
|
||||
@@ -40,8 +40,80 @@
|
||||
<v-col cols="12" md="3">
|
||||
<v-text-field v-model="query.sStart" label="超薦列印編號前置" type="text" dense outlined></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" md="2">
|
||||
<button class="btn btn-primary" @click.prevent="processShuwen">產生疏文</button>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-data-table
|
||||
v-model="data_table.selected"
|
||||
:items="data_table.list"
|
||||
:search-props="search"
|
||||
item-key="num"
|
||||
:options.sync="options"
|
||||
:headers="data_table.header"
|
||||
:footer-props="data_table.footer"
|
||||
:server-items-length="data_table.count"
|
||||
:loading="data_table.loading"
|
||||
:single-select="data_table.singleSelect"
|
||||
show-select
|
||||
hide-default-footer
|
||||
:page.sync="data_table.page"
|
||||
:items-per-page.sync="data_table.pageSize"
|
||||
class="elevation-1">
|
||||
<template #item.up_time="{ item }" >
|
||||
{{ item.up_time|timeString('YYYY/MM/DD') }}
|
||||
</template>
|
||||
<template #item.u_name="{ item }" >
|
||||
{{ item.u_name }}
|
||||
</template>
|
||||
<template #item.status="{ item }" >
|
||||
<a v-if="item.f_num != null && item.activity_num != null && item.status == 0" @click="checkIn(item)" class="btn btn-outline-secondary btn-sm"><i class="mdi mdi-account"></i>報到</a>
|
||||
<a v-if="item.f_num != null && item.activity_num != null && item.status == 1" class="btn btn-outline-secondary btn-sm opacity-50" style="pointer-events: none" ><i class="mdi mdi-account-check"></i>已報到</a>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
<v-container>
|
||||
<v-row class="align-baseline" wrap>
|
||||
<v-col cols="12" md="9">
|
||||
<v-pagination
|
||||
v-model="data_table.page"
|
||||
:length="pageCount">
|
||||
</v-pagination>
|
||||
</v-col>
|
||||
<v-col class="text-truncate text-right" cols="12" md="2">
|
||||
共 {{ data_table.count }} 筆, 頁數:
|
||||
</v-col>
|
||||
<v-col cols="6" md="1">
|
||||
<v-text-field
|
||||
v-model="data_table.page"
|
||||
type="number"
|
||||
hide-details
|
||||
dense
|
||||
min="1"
|
||||
:max="pageCount"
|
||||
@input="data_table.page = parseInt($event, 10)"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
||||
</v-container>
|
||||
|
||||
<v-snackbar
|
||||
v-model="snackbar.show"
|
||||
timeout="2000">
|
||||
{{ snackbar.text }}
|
||||
<template v-slot:action="{ attrs }">
|
||||
<v-btn
|
||||
text
|
||||
v-bind="attrs"
|
||||
@click="snackbar.show = false"
|
||||
>
|
||||
關閉
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-snackbar>
|
||||
</template>
|
||||
<%--<div v-if="currentActivityNum">
|
||||
<div><h2 style="text-align:center">消災疏文</h2></div>
|
||||
@@ -76,6 +148,9 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="footer_script" Runat="Server">
|
||||
<script>
|
||||
Vue.filter('timeString', function (value, myFormat) {
|
||||
return value == null || value == "" ? "" : moment(value).format(myFormat || 'YYYY-MM-DD, HH:mm:ss');
|
||||
});
|
||||
let VueApp = new Vue({
|
||||
el: '#app',
|
||||
vuetify: new Vuetify(vuetify_options),
|
||||
@@ -87,27 +162,124 @@
|
||||
ShuWenItem: '',
|
||||
updateShuWenLoading: false,
|
||||
latest: false,
|
||||
options: { multiSort: false },
|
||||
snackbar: {
|
||||
show: false,
|
||||
text: "",
|
||||
},
|
||||
data_table: {
|
||||
loading: false,
|
||||
list: [],
|
||||
selected: [],
|
||||
singleSelect: false,
|
||||
count: 0,
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
header: [
|
||||
|
||||
{ text: '法會名稱', value: 'subject', align: 'start' },
|
||||
{ text: '開始日期', value: 'startDate' },
|
||||
{ text: '結束日期', value: 'endDate' },
|
||||
//{ text: '', value: 'slot_btn', sortable: false, align: 'end' }
|
||||
],
|
||||
footer: {
|
||||
showFirstLastPage: true,
|
||||
itemsPerPageOptions: [5, 10, 20, 30],
|
||||
},
|
||||
},
|
||||
query: {
|
||||
start_date: '',
|
||||
end_date: '',
|
||||
xStart: '',//消災
|
||||
sSatrt: ''//超薦
|
||||
},
|
||||
search: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
queryActivity() {//列出區間內的活動/法會
|
||||
processShuwen() {
|
||||
// console.log(this.data_table.selected)
|
||||
if (this.query.xStart==="" || this.query.sStart==="") {
|
||||
this.snackbar.text = "請輸入消災及超薦牌位列印編號前置碼";
|
||||
this.snackbar.show = true;
|
||||
return;
|
||||
}
|
||||
if (this.data_table.selected.length===0) {
|
||||
this.snackbar.text = "請勾選要列印的法會";
|
||||
this.snackbar.show = true;
|
||||
return;
|
||||
}
|
||||
let activityNums = []
|
||||
this.data_table.selected.forEach((x) => {
|
||||
activityNums.push(x.num);
|
||||
});
|
||||
if (activityNums && activityNums.length>0) {
|
||||
axios.post(HTTP_HOST + 'api/shuwen/RenderShuWenByGong', {
|
||||
activitynum: activityNums.join(","),
|
||||
xStart: this.query.xStart,sStart:this.query.sStart
|
||||
})
|
||||
.then(res => {
|
||||
if (res.status == 200) {
|
||||
//const blob = new Blob([res.data.filePath]);
|
||||
//const url = window.URL.createObjectURL(blob);
|
||||
|
||||
// 2. Create a hidden anchoring element
|
||||
const link = document.createElement('a');
|
||||
link.href = res.data.filePath;
|
||||
|
||||
// 3. Define the desired filename
|
||||
link.setAttribute('download', 'template.docx');
|
||||
|
||||
// 4. Append to DOM, click it to trigger save, and clean up
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
|
||||
// Free up memory and remove temporary elements
|
||||
link.remove();
|
||||
//window.URL.revokeObjectURL(url);
|
||||
}
|
||||
this.data_table.loading = false;
|
||||
|
||||
|
||||
})
|
||||
.catch(err => {
|
||||
if (err.response && err.response.status === 400) {
|
||||
alert('錯誤訊息:' + err.response.data.Message);
|
||||
this.snackbar.text = '錯誤訊息:' + err.response.data.Message
|
||||
} else {
|
||||
//alert('發生錯誤:' + err.response.data.Message);
|
||||
//console.log(err);
|
||||
this.snackbar.text = '發生錯誤:'+err;// + err.response.data.Message
|
||||
}
|
||||
this.snackbar.show = true;
|
||||
});
|
||||
}
|
||||
},
|
||||
initActivity() {
|
||||
axios.get(HTTP_HOST + 'api/activity')
|
||||
queryActivity() {//列出區間內的活動/法會
|
||||
this.data_table.loading=true
|
||||
axios.post(HTTP_HOST + 'api/activity/GetListNew', { startDate_solar: this.query.start_date, endDate_solar: this.query.end_date }, { params: { page: 1, pageSize: 10000, sortDesc: false } })
|
||||
.then(response => {
|
||||
this.activityList = response.data;
|
||||
// console.log("queryActivity:", response.data.list);
|
||||
this.data_table.list = response.data.list;
|
||||
this.data_table.count = response.data.count;
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error)
|
||||
this.snackbar.text = '發生錯誤:' + error.response.data.Message
|
||||
this.snackbar.show = true;
|
||||
}).finally(() => {
|
||||
this.data_table.loading = false;
|
||||
})
|
||||
},
|
||||
initActivity() {
|
||||
//axios.get(HTTP_HOST + 'api/activity')
|
||||
// .then(response => {
|
||||
// this.activityList = response.data;
|
||||
// })
|
||||
// .catch(error => {
|
||||
// console.log(error)
|
||||
// })
|
||||
},
|
||||
onActivityChange() {
|
||||
this.latest = false
|
||||
this.getShuWen();
|
||||
@@ -165,6 +337,11 @@
|
||||
this.getShuWen()
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
pageCount() {
|
||||
return Math.ceil(this.data_table.count / this.data_table.pageSize)
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</asp:Content>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user