diff --git a/.vs/SGGL_SeDin/v17/.wsuo b/.vs/SGGL_SeDin/v17/.wsuo
index ccd69612..918d4df6 100644
Binary files a/.vs/SGGL_SeDin/v17/.wsuo and b/.vs/SGGL_SeDin/v17/.wsuo differ
diff --git a/DataBase/版本日志/SGGLDB_V2024-03-11.sql b/DataBase/版本日志/SGGLDB_V2024-03-11.sql
new file mode 100644
index 00000000..d8c8cae4
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2024-03-11.sql
@@ -0,0 +1,185 @@
+INSERT [Sys_Menu] ([MenuId],[MenuName],[SortIndex],[SuperMenu],[MenuType],[IsOffice],[IsEnd],[IsUsed])
+VALUES ( N'1FF4F8D5-C9AA-4C59-B392-1F025AEB8DEE',N'发票管理',90,N'0',N'Menu_PHTGL',0,0,1)
+Go
+ INSERT [Sys_Menu] ([MenuId],[MenuName],[Url],[SortIndex],[SuperMenu],[MenuType],[IsOffice],[IsEnd],[IsUsed])
+ VALUES ( N'B451C8DE-71B9-433E-ACB9-4465FB7E3C5C',N'发票台账',N'PHTGL/InvoiceManage/InvoiceStandingBook.aspx',10,'1FF4F8D5-C9AA-4C59-B392-1F025AEB8DEE',N'Menu_PHTGL',0,1,1)
+ GO
+ INSERT [Sys_ButtonToMenu] ([ButtonToMenuId],[MenuId],[ButtonName],[SortIndex])
+ VALUES ( N'336716CC-3A16-4197-BB05-68ED19A47A5D',N'B451C8DE-71B9-433E-ACB9-4465FB7E3C5C',N'修改',2)
+ INSERT [Sys_ButtonToMenu] ([ButtonToMenuId],[MenuId],[ButtonName],[SortIndex])
+ VALUES ( N'E7AC7D13-71AE-493D-B623-57B4D4CFFA79',N'B451C8DE-71B9-433E-ACB9-4465FB7E3C5C',N'删除',3)
+ INSERT [Sys_ButtonToMenu] ([ButtonToMenuId],[MenuId],[ButtonName],[SortIndex])
+ VALUES ( N'C3B7470A-979D-46FC-863A-7C8AAE63AAF6',N'B451C8DE-71B9-433E-ACB9-4465FB7E3C5C',N'保存',4)
+ INSERT [Sys_ButtonToMenu] ([ButtonToMenuId],[MenuId],[ButtonName],[SortIndex])
+ VALUES ( N'6EF9861A-89B6-4D2A-93A9-DF2F8FD3BA86',N'B451C8DE-71B9-433E-ACB9-4465FB7E3C5C',N'增加',1)
+ GO
+ INSERT [Sys_Menu] ([MenuId],[MenuName],[Url],[SortIndex],[SuperMenu],[MenuType],[IsOffice],[IsEnd],[IsUsed])
+ VALUES ( N'DD38AD86-513B-4BBC-AF64-0F52F56784BE',N'出入库单',N'PHTGL/InvoiceManage/InvoiceOrder.aspx',20,'1FF4F8D5-C9AA-4C59-B392-1F025AEB8DEE',N'Menu_PHTGL',0,1,1)
+ GO
+ INSERT [Sys_ButtonToMenu] ([ButtonToMenuId],[MenuId],[ButtonName],[SortIndex])
+ VALUES ( N'8912C056-7B82-4C37-B992-D9F5FA2F6435',N'DD38AD86-513B-4BBC-AF64-0F52F56784BE',N'修改',2)
+ INSERT [Sys_ButtonToMenu] ([ButtonToMenuId],[MenuId],[ButtonName],[SortIndex])
+ VALUES ( N'529076FA-3109-4E14-8F2B-CBFD308E1B51',N'DD38AD86-513B-4BBC-AF64-0F52F56784BE',N'删除',3)
+ INSERT [Sys_ButtonToMenu] ([ButtonToMenuId],[MenuId],[ButtonName],[SortIndex])
+ VALUES ( N'D7E5E87D-52F1-4B83-BE9E-80B4E4AB9A7C',N'DD38AD86-513B-4BBC-AF64-0F52F56784BE',N'保存',4)
+ CREATE TABLE PHTGL_Invoice
+ (
+ InvoiceId NVARCHAR(50) PRIMARY KEY,
+ ProjectId NVARCHAR(50),
+ ContractId NVARCHAR(50),
+ OrderCode NVARCHAR(50),
+ OrderInDate DATE,
+ OrderOutDate DATE,
+ MaterialRequisitionUnit NVARCHAR(100),
+ State int,
+ InvoiceCode NVARCHAR(50),
+ InvoiceNumber NVARCHAR(50),
+ SellerName NVARCHAR(100),
+ InvoiceDate NVARCHAR(50),
+ AmountExcludingTax DECIMAL(18,2),
+ TotalTax DECIMAL(18,2),
+ Remark NVARCHAR(500),
+ ImagePath NVARCHAR(500),
+ SellerTaxNumber NVARCHAR(50),
+ InvoiceAmount DECIMAL(18,2),
+ ApproveManJson NVARCHAR(2000),
+ CreateDate DATETIME,
+ CreateUser NVARCHAR(50),
+
+ )
+GO
+ INSERT [Sys_ButtonToMenu] ([ButtonToMenuId],[MenuId],[ButtonName],[SortIndex])
+ VALUES ( N'D6736D81-62AC-4695-9A84-19120E4AC9ED',N'DD38AD86-513B-4BBC-AF64-0F52F56784BE',N'增加',1)
+exec sp_addextendedproperty 'MS_Description', N'主键id', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'InvoiceId'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'项目id', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'ProjectId'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'状态', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN', 'State'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'发票代码', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'InvoiceCode'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'发票号码', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'InvoiceNumber'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'销方名称', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'SellerName'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'开票日期', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'InvoiceDate'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'不含税金额', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'AmountExcludingTax'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'合计税额', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'TotalTax'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'备注', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN', 'Remark'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'图片存储路径', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'ImagePath'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'销方税号', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'SellerTaxNumber'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'票面金额', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'InvoiceAmount'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'审批人信息json', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'ApproveManJson'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'创建日期', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'CreateDate'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'创建人id', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'CreateUser'
+go
+exec sp_addextendedproperty 'MS_Description', N'合同主键id', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'ContractId'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'入库日期', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'OrderInDate'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'订单编号', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'OrderCode'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'出库日期', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'OrderOutDate'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'领料单位', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_Invoice', 'COLUMN',
+ 'MaterialRequisitionUnit'
+go
+
+
+
+CREATE TABLE PHTGL_InvoiceDetail
+(
+ InvoiceDetailId NVARCHAR(50) PRIMARY KEY,
+ InvoiceId NVARCHAR(50),
+ GoodsOrServicesName NVARCHAR(100),
+ SpecificationModel NVARCHAR(100),
+ Unit NVARCHAR(50),
+ Quantity DECIMAL(18,2),
+ UnitPrice DECIMAL(18,2),
+ Amount DECIMAL(18,2),
+ TaxRate NVARCHAR(50),
+ Tax DECIMAL(18,2),
+)exec sp_addextendedproperty 'MS_Description', N'明细id', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_InvoiceDetail', 'COLUMN',
+ 'InvoiceDetailId'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'合同发票id', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_InvoiceDetail', 'COLUMN',
+ 'InvoiceId'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'货物或应税劳务名称', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_InvoiceDetail',
+ 'COLUMN', 'GoodsOrServicesName'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'规格型号', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_InvoiceDetail', 'COLUMN',
+ 'SpecificationModel'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'单位', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_InvoiceDetail', 'COLUMN', 'Unit'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'数量', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_InvoiceDetail', 'COLUMN',
+ 'Quantity'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'单价', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_InvoiceDetail', 'COLUMN',
+ 'UnitPrice'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'金额', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_InvoiceDetail', 'COLUMN',
+ 'Amount'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'税率', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_InvoiceDetail', 'COLUMN',
+ 'TaxRate'
+go
+
+exec sp_addextendedproperty 'MS_Description', N'税额', 'SCHEMA', 'dbo', 'TABLE', 'PHTGL_InvoiceDetail', 'COLUMN', 'Tax'
+go
+
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index a8d0c7b1..1038993f 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -80,8 +80,8 @@
False
..\Lib\Microsoft.SQLServer.ManagedDTS.dll
-
- ..\packages\MiniExcel.1.29.0\lib\net45\MiniExcel.dll
+
+ ..\packages\MiniExcel.1.31.3\lib\net45\MiniExcel.dll
..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll
@@ -632,6 +632,8 @@
+
+
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 2b19d5af..dc2d0a0c 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -3242,6 +3242,17 @@ namespace BLL
/// 进度检测
///
public const string PHTGL_ContractTrackProgressDetectionMenuId = "F545E899-B3B5-4B49-A741-DE19356553D5";
+ ///
+ /// 发票台账
+ ///
+ public const string PHTGL_InvoiceStandingBookMenuId = "B451C8DE-71B9-433E-ACB9-4465FB7E3C5C";
+ ///
+ /// 出入库单
+ ///
+ public const string PHTGL_InvoiceOrderMenuId = "DD38AD86-513B-4BBC-AF64-0F52F56784BE";
+
+
+
#endregion
@@ -3445,6 +3456,10 @@ namespace BLL
///
public const string TemContractTrackTemplateUrl = "File\\Excel\\DataIn\\合同价格信息导入模板.xlsx";
///
+ /// 合同发票信息导入模板
+ ///
+ public const string InvoiceTemplateUrl = "File\\Excel\\DataIn\\发票导入模版.xlsx";
+ ///
/// 施工日志模板文件原始虚拟路径
///
public const string ConstructionLogTemplateUrl = "File\\Excel\\ConstructionLog\\施工日志.xlsx";
diff --git a/SGGL/BLL/Common/Funs.cs b/SGGL/BLL/Common/Funs.cs
index adfb9664..bc002863 100644
--- a/SGGL/BLL/Common/Funs.cs
+++ b/SGGL/BLL/Common/Funs.cs
@@ -1498,6 +1498,8 @@ namespace BLL
return splitLists;
}
+
+
}
}
diff --git a/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanReviewService.cs b/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanReviewService.cs
index 1e3b9951..1dedc0da 100644
--- a/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanReviewService.cs
+++ b/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanReviewService.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
+using Model;
namespace BLL
{
diff --git a/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs b/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs
index 46ffd521..849de380 100644
--- a/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs
+++ b/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs
@@ -5,6 +5,7 @@ using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
+using Model;
namespace BLL
{
diff --git a/SGGL/BLL/PHTGL/BiddingManagement/BidDocumentsReviewService.cs b/SGGL/BLL/PHTGL/BiddingManagement/BidDocumentsReviewService.cs
index 1f0fbaab..d54bc8a0 100644
--- a/SGGL/BLL/PHTGL/BiddingManagement/BidDocumentsReviewService.cs
+++ b/SGGL/BLL/PHTGL/BiddingManagement/BidDocumentsReviewService.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
+using Model;
namespace BLL
{
diff --git a/SGGL/BLL/PHTGL/BiddingManagement/SetSubReviewService.cs b/SGGL/BLL/PHTGL/BiddingManagement/SetSubReviewService.cs
index b01da437..eb6e6882 100644
--- a/SGGL/BLL/PHTGL/BiddingManagement/SetSubReviewService.cs
+++ b/SGGL/BLL/PHTGL/BiddingManagement/SetSubReviewService.cs
@@ -7,6 +7,7 @@ using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web.UI.WebControls;
+using Model;
namespace BLL
{
diff --git a/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs b/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs
index caa74bde..aa41388b 100644
--- a/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs
+++ b/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs
@@ -10,6 +10,7 @@ using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
+using Model;
namespace BLL
{
diff --git a/SGGL/BLL/PHTGL/ContractCompile/PHTGL_ApproveService.cs b/SGGL/BLL/PHTGL/ContractCompile/PHTGL_ApproveService.cs
index c2175632..3562d8f2 100644
--- a/SGGL/BLL/PHTGL/ContractCompile/PHTGL_ApproveService.cs
+++ b/SGGL/BLL/PHTGL/ContractCompile/PHTGL_ApproveService.cs
@@ -1,4 +1,7 @@
-using System.Collections.Generic;
+using Model;
+using System;
+using System.Collections;
+using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
@@ -21,12 +24,18 @@ namespace BLL
return Funs.DB.PHTGL_Approve.FirstOrDefault(e => e.ApproveId == ApproveId);
}
+ ///
+ /// 获取未审批记录
+ ///
+ ///
+ ///
public static List GetPHTGL_ApproveByContractId(string contractId)
{
var q = (from x in Funs.DB.PHTGL_Approve where x.ContractId == contractId && x.State == 0 select x).ToList();
return q;
}
+
///
///获取当前人员的所有审批信息
///
@@ -80,6 +89,22 @@ namespace BLL
return IsExit;
}
///
+ /// 判断当前人员是否正在审批
+ ///
+ ///
+ ///
+ ///
+ public static bool IsApprovingMan(string contractId, string approveMan)
+ {
+ bool IsExit = false;
+ var q = (from x in Funs.DB.PHTGL_Approve where x.ContractId == contractId && x.ApproveMan == approveMan && x.State==0 select x).ToList();
+ if (q.Count>0)
+ {
+ IsExit = true;
+ }
+ return IsExit;
+ }
+ ///
/// 添加审批人员记录
///
///
@@ -207,23 +232,70 @@ namespace BLL
///
///
///
- public static DataTable GetAllApproveData(string ContractId)
+ //public static DataTable GetAllApproveData(string ContractId)
+ //{
+ // string strSql = @" select u.PersonName as ApproveMan,
+ // App.ApproveDate,
+ // (CASE App.IsAgree WHEN '1' THEN '不同意'
+ // WHEN '2' THEN '同意' END) AS IsAgree,
+ // App.ApproveIdea,
+ // App.ApproveId,
+ // App.ApproveType
+ // from PHTGL_Approve as App"
+ // + @" left join Person_Persons AS U ON U.PersonId = App.ApproveMan WHERE 1=1 and App.IsAgree <>0 and app.ContractId= @ContractId order by convert(datetime ,App.ApproveDate) ";
+ // List listStr = new List();
+ // listStr.Add(new SqlParameter("@ContractId", ContractId));
+ // SqlParameter[] parameter = listStr.ToArray();
+ // DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ // return tb;
+ //}
+ public static IEnumerable GetAllApproveData(string contractId)
{
- string strSql = @" select u.PersonName as ApproveMan,
- App.ApproveDate,
- (CASE App.IsAgree WHEN '1' THEN '不同意'
- WHEN '2' THEN '同意' END) AS IsAgree,
- App.ApproveIdea,
- App.ApproveId,
- App.ApproveType
- from PHTGL_Approve as App"
- + @" left join Person_Persons AS U ON U.PersonId = App.ApproveMan WHERE 1=1 and App.IsAgree <>0 and app.ContractId= @ContractId order by convert(datetime ,App.ApproveDate) ";
- List listStr = new List();
- listStr.Add(new SqlParameter("@ContractId", ContractId));
- SqlParameter[] parameter = listStr.ToArray();
- DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
- return tb;
+ var result = (from x in Funs.DB.PHTGL_Approve
+ join u in Funs.DB.Person_Persons on x.ApproveMan equals u.PersonId
+ where x.IsAgree != 0 && x.ContractId == contractId
+ orderby x.ApproveDate
+ select new
+ {
+ ApproveMan = u.PersonName,
+ x.ApproveDate,
+ IsAgree = x.IsAgree == 1 ? "不同意" : "同意",
+ x.ApproveIdea,
+ x.ApproveId,
+ x.ApproveType,
+ x.ApproveForm
+ }
+
+ ).ToList();
+
+ return result;
}
+ public static IEnumerable GetAllApproveData(string contractId,string aproveForm)
+ {
+ var result = (from x in Funs.DB.PHTGL_Approve
+ join u in Funs.DB.Person_Persons on x.ApproveMan equals u.PersonId
+ where x.IsAgree != 0 && x.ContractId == contractId
+ orderby x.ApproveDate
+ select new
+ {
+ ApproveMan = u.PersonName,
+ x.ApproveDate,
+ IsAgree = x.IsAgree == 1 ? "不同意" : "同意",
+ x.ApproveIdea,
+ x.ApproveId,
+ x.ApproveType,
+ x.ApproveForm
+ }
+
+ ).ToList();
+ if (!string.IsNullOrEmpty(aproveForm))
+ {
+ result = result.Where(x => x.ApproveForm == aproveForm).ToList();
+ }
+
+ return result;
+ }
+
///
/// 获取最后拒绝的人员
///
@@ -243,57 +315,4 @@ namespace BLL
return tb;
}
}
- public class ApproveManModel
- {
- public int Number
- {
- get;
- set;
- }
- public string userid
- {
- get;
- set;
- }
- public string Rolename
- {
- get;
- set;
- }
-
- }
- public class PrintModel
- {
- public int Number
- {
- get;
- set;
- }
- public string Rolename
- {
- get;
- set;
- }
- public string UserName
- {
- get;
- set;
- }
- public string Image
- {
- get;
- set;
- }
- public string ApproveIdea
- {
- get;
- set;
- }
- public string ApproveDate
- {
- get;
- set;
- }
-
- }
}
diff --git a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs
index 6e2ae0f6..afbbe131 100644
--- a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs
+++ b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs
@@ -217,8 +217,6 @@ namespace BLL
db.SubmitChanges();
}
-
-
public static void UpdatePHTGL_ContractTrack(PHTGL_ContractTrack newtable)
{
var table = Funs.DB.PHTGL_ContractTrack.FirstOrDefault(x => x.Id == newtable.Id);
@@ -1341,110 +1339,5 @@ namespace BLL
}
}
-
- }
- public class PHTGL_ContractTrackDtoIn
- {
- ///
- /// 序号
- ///
- [ExcelColumnIndex("A")] public string SerialNumber { get; set; }
- ///
- /// 主项号
- ///
- [ExcelColumnIndex("B")] public string MainItemCode { get; set; }
- ///
- /// 主项名称
- ///
- [ExcelColumnIndex("C")] public string MainItemName { get; set; }
- ///
- /// 专业代码
- ///
- [ExcelColumnIndex("D")] public string MajorCode { get; set; }
- ///
- /// 专业工程名称
- ///
- [ExcelColumnIndex("E")] public string MajorName { get; set; }
- ///
- /// 分部工程
- ///
- [ExcelColumnIndex("F")] public string SubProject { get; set; }
- ///
- /// 分项工程
- ///
- [ExcelColumnIndex("G")] public string SubItemProject { get; set; }
- ///
- /// 项目编码
- ///
- [ExcelColumnIndex("H")] public string ProjectCode { get; set; }
- ///
- /// 项目名称
- ///
- [ExcelColumnIndex("I")] public string ProjectName { get; set; }
- ///
- /// 项目特征描述
- ///
- [ExcelColumnIndex("J")] public string ProjectDescription { get; set; }
- ///
- /// 计量单位
- ///
- [ExcelColumnIndex("K")] public string UnitOfMeasurement { get; set; }
- ///
- /// 工程量
- ///
- [ExcelColumnIndex("L")] public string Quantity { get; set; }
- ///
- /// 全费用固定综合单价
- ///
- [ExcelColumnIndex("M")] public decimal TotalCostFixedComprehensiveUnitPrice { get; set; }
- ///
- /// 其中:主材费
- ///
- [ExcelColumnIndex("N")] public decimal MainMaterialCost { get; set; }
- ///
- /// 合价/元
- ///
- [ExcelColumnIndex("O")] public decimal TotalPrice { get; set; }
- ///
- /// 计算规则
- ///
- [ExcelColumnIndex("P")] public string CalculationRule { get; set; }
- ///
- /// 工作内容
- ///
- [ExcelColumnIndex("Q")] public string WorkContent { get; set; }
- ///
- /// 备注
- ///
- [ExcelColumnIndex("R")] public string Remarks { get; set; }
- ///
- /// 施工分包商
- ///
- [ExcelColumnIndex("S")] public string ConstructionSubcontractor { get; set; }
- ///
- /// 主材供应方
- ///
- [ExcelColumnIndex("T")] public string MaterialSupplier { get; set; }
- ///
- /// 是否总包合同范围内
- ///
- [ExcelColumnIndex("U")]
- public string IsWithinGeneralContractScope { get; set; }
- ///
- /// 概算工程量
- ///
- [ExcelColumnIndex("V")] public string EstimatedQuantity { get; set; }
- ///
- /// 概算金额
- ///
- [ExcelColumnIndex("W")] public decimal EstimatedAmount { get; set; }
- ///
- /// 预算工程量
- ///
- [ExcelColumnIndex("X")] public string SettledQuantity { get; set; }
- ///
- /// 预算金额
- ///
- [ExcelColumnIndex("Y")] public decimal SettledAmount { get; set; }
}
}
\ No newline at end of file
diff --git a/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoiceService .cs b/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoiceService .cs
new file mode 100644
index 00000000..7d65e020
--- /dev/null
+++ b/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoiceService .cs
@@ -0,0 +1,587 @@
+using EmitMapper;
+using FineUIPro;
+using MiniExcelLibs;
+using MiniExcelLibs.Attributes;
+using Model;
+using NPOI.SS.Formula.Functions;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics.Contracts;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using WIA;
+
+
+namespace BLL
+{
+
+ public static class PhtglInvoiceService
+ {
+ ///
+ /// 已导入
+ ///
+ public static int StateDataIn = -1;
+ ///
+ /// 已创建入库订单
+ ///
+ public static int StateCreate = 0;
+ ///
+ /// 入库审核
+ ///
+ public static int StateInPutApprove = 1;
+ ///
+ /// 入库审核拒绝
+ ///
+ public static int StateInPutApproveRefuse = 2;
+ ///
+ /// 入库审核成功
+ ///
+ public static int StateInPutApproveSuccess = 3;
+ ///
+ /// 出库审核中
+ ///
+ public static int StateOutPutApprove = 4;
+ ///
+ /// 出库审核拒绝
+ ///
+ public static int StateOutPutApproveRefuse = 5;
+ ///
+ /// 出库审核成功
+ ///
+ public static int StateOutPutApproveSuccess = 6;
+
+ public static string GetState(object invoiceId)
+ {
+ string result = "";
+ if (invoiceId!=null && !string.IsNullOrEmpty(invoiceId.ToString()) )
+ {
+ var InvoiceId=invoiceId.ToString();
+
+ var model = GetPHTGL_InvoiceById(InvoiceId);
+ var approveModel = PHTGL_ApproveService.GetPHTGL_ApproveByContractId(InvoiceId);
+
+ switch (model.State)
+ {
+ case -1:
+ result = "已导入";
+ break;
+ case 0:
+ result = "已创建入库订单";
+ break;
+ case 1:
+ result = "入库审核中"+",当前节点-"+BLL.Person_PersonsService.getPersonsNamesPersonIds(string.Join(",",approveModel.Select(x => x.ApproveMan)));
+ break;
+ case 2:
+ result = "入库审核拒绝";
+ break;
+ case 3:
+ result = "入库审核成功";
+ break;
+ case 4:
+ result = "出库审核中" + ",当前节点-" + BLL.Person_PersonsService.getPersonsNamesPersonIds(string.Join(",", approveModel.Select(x => x.ApproveMan)));
+ break;
+ case 5:
+ result = "出库审核拒绝";
+ break;
+ case 6:
+ result = "出库审核成功";
+ break;
+ }
+ }
+ return result;
+ }
+
+ #region 获取列表
+ ///
+ /// 记录数
+ ///
+ public static int Count
+ {
+ get;
+ set;
+ }
+ public static IEnumerable GetPHTGL_InvoiceByModle(Model.PHTGL_Invoice table)
+ {
+ var q = from x in Funs.DB.PHTGL_Invoice
+ where
+ (string.IsNullOrEmpty(table.InvoiceId) || x.InvoiceId.Contains(table.InvoiceId)) &&
+ (string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) &&
+ (string.IsNullOrEmpty(table.ContractId) || x.ProjectId.Contains(table.ContractId)) &&
+ (string.IsNullOrEmpty(table.InvoiceCode) || x.InvoiceCode.Contains(table.InvoiceCode)) &&
+ (string.IsNullOrEmpty(table.InvoiceNumber) || x.InvoiceNumber.Contains(table.InvoiceNumber)) &&
+ (string.IsNullOrEmpty(table.SellerName) || x.SellerName.Contains(table.SellerName)) &&
+ (string.IsNullOrEmpty(table.InvoiceDate) || x.InvoiceDate.Contains(table.InvoiceDate)) &&
+ (string.IsNullOrEmpty(table.Remark) || x.Remark.Contains(table.Remark)) &&
+ (string.IsNullOrEmpty(table.ImagePath) || x.ImagePath.Contains(table.ImagePath)) &&
+ (string.IsNullOrEmpty(table.SellerTaxNumber) || x.SellerTaxNumber.Contains(table.SellerTaxNumber)) &&
+ (string.IsNullOrEmpty(table.ApproveManJson) || x.ApproveManJson.Contains(table.ApproveManJson)) &&
+ (string.IsNullOrEmpty(table.CreateUser) || x.CreateUser.Contains(table.CreateUser)) &&
+ (table.State==null ||x.State==table.State)
+ select x
+ ;
+
+ return q.ToList();
+ }
+
+ ///
+ /// 获取分页列表
+ ///
+ ///
+ ///
+ ///
+ public static IEnumerable GetListData(Model.PHTGL_Invoice table, Grid grid1)
+ {
+ var q = GetPHTGL_InvoiceByModle(table);
+ Count = q.Count();
+ if (Count == 0)
+ {
+ return null;
+ }
+ q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize).ToList();
+ // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
+ return (from x in q
+ join y in Funs.DB.PHTGL_Contract on x.ContractId equals y.ContractId into g
+ from c in g.DefaultIfEmpty()
+ select new
+ {
+ c?.ContractName,
+ c?.ContractNum,
+ c?.Parties,
+ c?.ContractAmount,
+ x.InvoiceId,
+ x.ProjectId,
+ x.ContractId,
+ x.State,
+ x.InvoiceCode,
+ x.InvoiceNumber,
+ x.SellerName,
+ x.InvoiceDate,
+ x.AmountExcludingTax,
+ x.TotalTax,
+ x.Remark,
+ x.ImagePath,
+ x.SellerTaxNumber,
+ x.InvoiceAmount,
+ x.ApproveManJson,
+ x.CreateDate,
+ x.CreateUser,
+ x.OrderInDate,
+ x.OrderOutDate,
+ x.OrderCode,
+ x.MaterialRequisitionUnit
+ });
+ }
+
+ public static IEnumerable GetOrderInListData(Model.PHTGL_Invoice table, Grid grid1)
+ {
+ var q = GetPHTGL_InvoiceByModle(table);
+ Count = q.Count();
+ if (Count == 0)
+ {
+ return null;
+ }
+ q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize).ToList();
+ // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
+ return (from x in q
+ join y in Funs.DB.PHTGL_Contract on x.ContractId equals y.ContractId into g
+ from c in g.DefaultIfEmpty()
+ where x.State>StateDataIn
+ select new
+ {
+ c?.ContractName,
+ c?.ContractNum,
+ c?.Parties,
+ c?.ContractAmount,
+ x.InvoiceId,
+ x.ProjectId,
+ x.ContractId,
+ x.State,
+ x.InvoiceCode,
+ x.InvoiceNumber,
+ x.SellerName,
+ x.InvoiceDate,
+ x.AmountExcludingTax,
+ x.TotalTax,
+ x.Remark,
+ x.ImagePath,
+ x.SellerTaxNumber,
+ x.InvoiceAmount,
+ x.ApproveManJson,
+ x.CreateDate,
+ x.CreateUser,
+ x.OrderInDate,
+ x.OrderOutDate,
+ x.OrderCode,
+ x.MaterialRequisitionUnit
+ }).ToList();
+ }
+ #endregion
+
+ public static Model.PHTGL_Invoice GetPHTGL_InvoiceById(string InvoiceId)
+ {
+ return Funs.DB.PHTGL_Invoice.FirstOrDefault(x => x.InvoiceId == InvoiceId);
+ }
+
+ ///
+ /// 添加实体
+ ///
+ ///
+ public static void AddPHTGL_Invoice(Model.PHTGL_Invoice newtable)
+ {
+
+ Model.PHTGL_Invoice table = new Model.PHTGL_Invoice
+ {
+ InvoiceId = newtable.InvoiceId,
+ ProjectId = newtable.ProjectId,
+ ContractId = newtable.ContractId,
+ State = newtable.State,
+ InvoiceCode = newtable.InvoiceCode,
+ InvoiceNumber = newtable.InvoiceNumber,
+ SellerName = newtable.SellerName,
+ InvoiceDate = newtable.InvoiceDate,
+ AmountExcludingTax = newtable.AmountExcludingTax,
+ TotalTax = newtable.TotalTax,
+ Remark = newtable.Remark,
+ ImagePath = newtable.ImagePath,
+ SellerTaxNumber = newtable.SellerTaxNumber,
+ InvoiceAmount = newtable.InvoiceAmount,
+ ApproveManJson = newtable.ApproveManJson,
+ CreateDate = newtable.CreateDate,
+ CreateUser = newtable.CreateUser,
+ OrderInDate = newtable.OrderInDate,
+ OrderCode = newtable.OrderCode,
+ OrderOutDate = newtable.OrderOutDate,
+ MaterialRequisitionUnit = newtable.MaterialRequisitionUnit,
+ };
+ Funs.DB.PHTGL_Invoice.InsertOnSubmit(table);
+ Funs.DB.SubmitChanges();
+ }
+
+ ///
+ /// 修改实体
+ ///
+ ///
+ public static void UpdatePHTGL_Invoice(Model.PHTGL_Invoice newtable)
+ {
+
+ Model.PHTGL_Invoice table = Funs.DB.PHTGL_Invoice.FirstOrDefault(x => x.InvoiceId == newtable.InvoiceId);
+ if (table != null)
+ {
+ table.InvoiceId = newtable.InvoiceId;
+ table.ProjectId = newtable.ProjectId;
+ table.ContractId = newtable.ContractId;
+ table.State = newtable.State;
+ table.InvoiceCode = newtable.InvoiceCode;
+ table.InvoiceNumber = newtable.InvoiceNumber;
+ table.SellerName = newtable.SellerName;
+ table.InvoiceDate = newtable.InvoiceDate;
+ table.AmountExcludingTax = newtable.AmountExcludingTax;
+ table.TotalTax = newtable.TotalTax;
+ table.Remark = newtable.Remark;
+ table.ImagePath = newtable.ImagePath;
+ table.SellerTaxNumber = newtable.SellerTaxNumber;
+ table.InvoiceAmount = newtable.InvoiceAmount;
+ table.ApproveManJson = newtable.ApproveManJson;
+ table.CreateDate = newtable.CreateDate;
+ table.CreateUser = newtable.CreateUser;
+ table.OrderInDate = newtable.OrderInDate;
+ table.OrderCode = newtable.OrderCode;
+ table.OrderOutDate = newtable.OrderOutDate;
+ table.MaterialRequisitionUnit = newtable.MaterialRequisitionUnit;
+ Funs.DB.SubmitChanges();
+ }
+
+ }
+ ///
+ /// 删除实体
+ ///
+ ///
+ public static void DeletePHTGL_InvoiceById(string InvoiceId)
+ {
+
+ Model.PHTGL_Invoice table = Funs.DB.PHTGL_Invoice.FirstOrDefault(x => x.InvoiceId == InvoiceId);
+ if (table != null)
+ {
+ Funs.DB.PHTGL_Invoice.DeleteOnSubmit(table);
+ Funs.DB.SubmitChanges();
+ }
+
+ }
+ ///
+ /// 根据主键获取审批人实体
+ ///
+ ///
+ ///
+ public static Model.PHTGL_InvoiceApproveManEntity GetInvoiceApproveManEntity(string InvoiceId)
+ {
+ Model.PHTGL_InvoiceApproveManEntity list = new Model.PHTGL_InvoiceApproveManEntity();
+ Model.PHTGL_Invoice data = Funs.DB.PHTGL_Invoice.FirstOrDefault(e => e.InvoiceId == InvoiceId);
+ if (data != null && !string .IsNullOrEmpty(data.ApproveManJson))
+ {
+ list = Newtonsoft.Json.JsonConvert.DeserializeObject(data.ApproveManJson);
+ }
+ return list;
+ }
+ ///
+ /// 将状态改为已创建
+ ///
+ ///
+ public static void ChangeStateToCreate(string invoiceId)
+ {
+ var model = GetPHTGL_InvoiceById(invoiceId);
+ model.State = StateCreate;
+ UpdatePHTGL_Invoice(model);
+ }
+
+ ///
+ /// 保存入库审批人实体
+ ///
+ ///
+ ///
+ public static void SaveInputApproveManEntity(string invoiceId, Inputapproveman inputapproveman)
+ {
+ var table = GetInvoiceApproveManEntity(invoiceId);
+ table.InputApproveMan = inputapproveman;
+ var json = Newtonsoft.Json.JsonConvert.SerializeObject(table);
+ var data = Funs.DB.PHTGL_Invoice.FirstOrDefault(e => e.InvoiceId == invoiceId);
+ if (data != null)
+ {
+ data.ApproveManJson = json;
+ Funs.DB.SubmitChanges();
+ }
+
+ }
+ ///
+ /// 保存出库审批人实体
+ ///
+ ///
+ ///
+ public static void SaveOutputApproveManEntity(string invoiceId, Outputapproveman outputapproveman)
+ {
+ var table = GetInvoiceApproveManEntity(invoiceId);
+ table.OutputApproveMan = outputapproveman;
+ var json = Newtonsoft.Json.JsonConvert.SerializeObject(table);
+ var data = Funs.DB.PHTGL_Invoice.FirstOrDefault(e => e.InvoiceId == invoiceId);
+ if (data != null)
+ {
+ data.ApproveManJson = json;
+ Funs.DB.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 导入数据
+ ///
+ /// 文件地址
+ /// 项目id
+ /// 创建人id
+ ///
+ public static ResponeData ImportData(string path, string projectid, string creatUserId)
+ {
+ var responeData = new ResponeData();
+ List temeplateDtoIns;
+ try
+ {
+ temeplateDtoIns = MiniExcel.Query(path, startCell: "A2").ToList();
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = "模板错误:" + ex.ToString();
+ return responeData;
+ }
+ //数据校验
+ if (temeplateDtoIns.Count == 0)
+ {
+ responeData.code = 0;
+ responeData.message = "导入数据为空!";
+ return responeData;
+ }
+
+ var invoiceCodeList = temeplateDtoIns.Select(x => x.InvoiceCode).Distinct().ToList(); //获取所有发票代码
+ //根据发票代码分组插入数据
+ foreach (var invoiceCode in invoiceCodeList)
+ {
+ var invoiceCodeDtoIns = temeplateDtoIns.Where(x => x.InvoiceCode == invoiceCode).ToList();
+
+ var mapper =
+ ObjectMapperManager.DefaultInstance.GetMapper, List>();
+ var mapperDetail =
+ ObjectMapperManager.DefaultInstance.GetMapper, List>();
+ //通过映射实体赋值
+ var invoiceModel = mapper.Map(invoiceCodeDtoIns).FirstOrDefault();
+ var invoceDetailList = mapperDetail.Map(invoiceCodeDtoIns.Where(x => !string.IsNullOrEmpty(x.GoodsOrServicesName) && !string.IsNullOrEmpty(x.SpecificationModel)).ToList());
+
+ var queryModel = new PHTGL_Invoice
+ {
+ InvoiceCode = invoiceCode,
+ ProjectId = projectid
+ };
+ var queryresult = GetPHTGL_InvoiceByModle(queryModel).FirstOrDefault();//查询该发票代码是否存在
+ if (queryresult != null)
+ {
+ if (queryresult.State != StateDataIn)
+ {
+ continue;
+ }
+ invoiceModel.State = StateDataIn;
+ invoiceModel.ProjectId = projectid;
+ invoiceModel.InvoiceId = queryresult.InvoiceId;
+ invoiceModel.CreateUser = creatUserId;
+ invoiceModel.CreateDate = DateTime.Now;
+ UpdatePHTGL_Invoice(invoiceModel);
+ }
+ else
+ {
+ invoiceModel.InvoiceId = SQLHelper.GetNewID();
+ invoiceModel.State = StateDataIn;
+ invoiceModel.ProjectId = projectid;
+ invoiceModel.CreateUser = creatUserId;
+ invoiceModel.CreateDate = DateTime.Now;
+ AddPHTGL_Invoice(invoiceModel);
+
+ }
+ PhtglInvoicedetailService.DeletePHTGL_InvoiceDetailByInvoiceId(invoiceModel.InvoiceId);
+ PhtglInvoicedetailService.BatchAddPHTGL_InvoiveDetail(invoceDetailList, invoiceModel.InvoiceId); //插入发票明细
+
+ }
+ return responeData;
+
+ }
+
+ ///
+ /// 获取审批人员
+ ///
+ /// 主键id
+ /// 0 入库 1出库
+ ///
+ public static List GetApproveManModels(string invoiceId ,int type)
+ {
+ List approveManModels = new List();
+ var table = GetInvoiceApproveManEntity(invoiceId);
+
+ if (type==0) //入库
+ {
+ approveManModels.Add(new ApproveManModel { Number = 1, userid = table.InputApproveMan.ProfessionalEngineer, Rolename = "专业工程师" });
+ approveManModels.Add(new ApproveManModel { Number = 2, userid = table.InputApproveMan.ConstructionManager, Rolename = "施工经理" });
+ approveManModels.Add(new ApproveManModel { Number = 3, userid = table.InputApproveMan.ControlManager, Rolename = "控制经理" });
+ approveManModels.Add(new ApproveManModel { Number = 4, userid = table.InputApproveMan.ProjectManager, Rolename = "项目经理" }); }
+ else {
+ approveManModels.Add(new ApproveManModel { Number = 5, userid = table.OutputApproveMan.PurchasingMan, Rolename = "采购员" });
+ approveManModels.Add(new ApproveManModel { Number = 6, userid = table.OutputApproveMan.ControlManager, Rolename = "控制经理" });
+ approveManModels.Add(new ApproveManModel { Number = 7, userid = table.OutputApproveMan.ProjectManager, Rolename = "项目经理" });
+ approveManModels.Add(new ApproveManModel { Number = 8, userid = table.OutputApproveMan.ConUnitMaterialOfficer, Rolename = "施工单位材料经理" });
+ approveManModels.Add(new ApproveManModel { Number = 9, userid = table.OutputApproveMan.ConUnitProjectManager, Rolename = "施工单位项目经理" });
+ }
+
+
+ return approveManModels;
+ }
+
+ ///
+ /// 开启审批流程
+ ///
+ ///
+ public static void StartApprovalProcess(string invoiceId )
+ {
+
+ var model = GetPHTGL_InvoiceById(invoiceId);
+ if (model.State ==StateCreate || model.State == StateInPutApproveRefuse)
+ {
+ CreateFirstApprove(invoiceId, 0);
+ model.State = StateInPutApprove;
+ UpdatePHTGL_Invoice(model);
+ }
+ else if (model.State == StateInPutApproveSuccess || model.State == StateOutPutApproveRefuse)
+ {
+ CreateFirstApprove(invoiceId, 1);
+ model.State = StateOutPutApprove;
+ UpdatePHTGL_Invoice(model);
+ }
+ }
+
+ ///
+ /// 创建第一个审批流程
+ ///
+ /// 主键
+ /// 0 入库 1出库
+ public static void CreateFirstApprove(string invoiceId, int type)
+ {
+ var approveManModels = GetApproveManModels(invoiceId, type).OrderBy(x=>x.Number).FirstOrDefault();
+ Model.PHTGL_Approve _Approve = new Model.PHTGL_Approve();
+ _Approve.ApproveId = SQLHelper.GetNewID(typeof(Model.PHTGL_Approve));
+ _Approve.ContractId = invoiceId;
+ _Approve.ApproveMan = approveManModels.userid;
+ _Approve.ApproveDate = "";
+ _Approve.State = 0;
+ _Approve.IsAgree = 0;
+ _Approve.ApproveIdea = "";
+ _Approve.ApproveType = approveManModels.Rolename;
+ _Approve.ApproveForm =(type==0? "Invoice_Input": "Invoice_Output");
+ BLL.PHTGL_ApproveService.AddPHTGL_Approve(_Approve);
+ }
+
+ ///
+ /// 审批
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// 0 入库 1出库
+ public static void Approve(string invoiceId, int type, string userid, bool isAgree, string idea)
+ {
+ var approveManModels = GetApproveManModels(invoiceId, type); //获取审批人员
+ var thisApprovemodel = PHTGL_ApproveService.GetPHTGL_ApproveByUserId(invoiceId, userid);//获取当前人员正在审批的信息
+ if (thisApprovemodel == null) { return; }
+ var thisApproveTypeNumber = approveManModels.Find(x => x.userid == userid && x.Rolename == thisApprovemodel.ApproveType).Number; //当前审批人员序号
+ int nextApproveTypeNumber = thisApproveTypeNumber + 1; //下一个审批人员序号
+ int maxApproveTypeNumber = approveManModels.Max(x => x.Number); //最大审批人员序号
+
+
+ thisApprovemodel.ApproveDate = Funs.GetNewDateTimeOrNow("").ToString();
+ thisApprovemodel.IsAgree = isAgree ? 2 : 1;
+ thisApprovemodel.ApproveIdea = idea;
+ thisApprovemodel.State = 1;
+ PHTGL_ApproveService.UpdatePHTGL_Approve(thisApprovemodel);
+ if (isAgree)
+ {
+ if (PHTGL_ApproveService.GetPHTGL_ApproveByContractId(invoiceId).Count==0) //当前节点是否全部审批结束
+ {
+ if (thisApproveTypeNumber < maxApproveTypeNumber) //是否最末节点
+ {
+ Model.PHTGL_Approve _Approve = new Model.PHTGL_Approve();
+ _Approve.ContractId = thisApprovemodel.ContractId;
+ _Approve.ApproveMan = approveManModels.Find(e => e.Number == nextApproveTypeNumber).userid;
+ _Approve.ApproveDate = "";
+ _Approve.State = 0;
+ _Approve.IsAgree = 0;
+ _Approve.ApproveIdea = "";
+ _Approve.ApproveType = approveManModels.Find(e => e.Number == nextApproveTypeNumber).Rolename;
+ _Approve.IsPushOa = 0;
+ _Approve.ApproveForm = (type == 0 ? "Invoice_Input" : "Invoice_Output");
+ _Approve.ApproveId = SQLHelper.GetNewID(typeof(Model.PHTGL_Approve));
+ BLL.PHTGL_ApproveService.AddPHTGL_Approve(_Approve);
+ }
+ else
+ {
+ //流程走完结束
+ var model = GetPHTGL_InvoiceById(invoiceId);
+ model.State = (type == 0 ? StateInPutApproveSuccess:StateOutPutApproveSuccess);
+ UpdatePHTGL_Invoice(model);
+ }
+ }
+ }
+ else
+ { //审批拒绝-流程结束
+ var model = GetPHTGL_InvoiceById(invoiceId);
+ model.State = (type == 0 ? StateInPutApproveRefuse : StateOutPutApproveRefuse);
+ UpdatePHTGL_Invoice(model);
+ }
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoicedetailService.cs b/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoicedetailService.cs
new file mode 100644
index 00000000..7c34c5a1
--- /dev/null
+++ b/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoicedetailService.cs
@@ -0,0 +1,165 @@
+using FineUIPro;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+
+namespace BLL
+{
+
+ public static class PhtglInvoicedetailService
+ {
+
+
+
+ #region 获取列表
+ ///
+ /// 记录数
+ ///
+ public static int Count
+ {
+ get;
+ set;
+ }
+ public static IEnumerable GetPHTGL_InvoiceDetailByModle(Model.PHTGL_InvoiceDetail table)
+ {
+ var q = from x in Funs.DB.PHTGL_InvoiceDetail
+ where
+ (string.IsNullOrEmpty(table.InvoiceDetailId) || x.InvoiceDetailId.Contains(table.InvoiceDetailId)) &&
+ (string.IsNullOrEmpty(table.InvoiceId) || x.InvoiceId.Contains(table.InvoiceId)) &&
+ (string.IsNullOrEmpty(table.GoodsOrServicesName) || x.GoodsOrServicesName.Contains(table.GoodsOrServicesName)) &&
+ (string.IsNullOrEmpty(table.SpecificationModel) || x.SpecificationModel.Contains(table.SpecificationModel)) &&
+ (string.IsNullOrEmpty(table.Unit) || x.Unit.Contains(table.Unit)) &&
+ (string.IsNullOrEmpty(table.TaxRate) || x.TaxRate.Contains(table.TaxRate))
+ select x
+ ;
+
+ return q.ToList();
+ }
+
+ ///
+ /// 获取分页列表
+ ///
+ ///
+ ///
+ ///
+ public static IEnumerable GetListData(Model.PHTGL_InvoiceDetail table, Grid grid1)
+ {
+ var q = GetPHTGL_InvoiceDetailByModle(table);
+ Count = q.Count();
+ if (Count == 0)
+ {
+ return null;
+ }
+ q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize).ToList();
+ // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
+ return from x in q
+ select new
+ {
+ x.InvoiceDetailId,
+ x.InvoiceId,
+ x.GoodsOrServicesName,
+ x.SpecificationModel,
+ x.Unit,
+ x.Quantity,
+ x.UnitPrice,
+ x.Amount,
+ x.TaxRate,
+ x.Tax,
+
+ };
+ }
+ #endregion
+
+ public static Model.PHTGL_InvoiceDetail GetPHTGL_InvoiceDetailById(string InvoiceDetailId)
+ {
+ return Funs.DB.PHTGL_InvoiceDetail.FirstOrDefault(x => x.InvoiceDetailId == InvoiceDetailId);
+ }
+ public static List GetPHTGL_InvoiceDetailByInvoiceId(string InvoiceId)
+ {
+ var list = Funs.DB.PHTGL_InvoiceDetail.Where(x => x.InvoiceId == InvoiceId).ToList();
+ return list;
+ }
+ public static void AddPHTGL_InvoiceDetail(Model.PHTGL_InvoiceDetail newtable)
+ {
+ if (string.IsNullOrEmpty(newtable.InvoiceDetailId))
+ {
+ newtable.InvoiceDetailId = SQLHelper.GetNewID();
+ }
+ Model.PHTGL_InvoiceDetail table = new Model.PHTGL_InvoiceDetail
+ {
+ InvoiceDetailId = newtable.InvoiceDetailId,
+ InvoiceId = newtable.InvoiceId,
+ GoodsOrServicesName = newtable.GoodsOrServicesName,
+ SpecificationModel = newtable.SpecificationModel,
+ Unit = newtable.Unit,
+ Quantity = newtable.Quantity,
+ UnitPrice = newtable.UnitPrice,
+ Amount = newtable.Amount,
+ TaxRate = newtable.TaxRate,
+ Tax = newtable.Tax,
+ };
+ Funs.DB.PHTGL_InvoiceDetail.InsertOnSubmit(table);
+ Funs.DB.SubmitChanges();
+ }
+ public static void UpdatePHTGL_InvoiceDetail(Model.PHTGL_InvoiceDetail newtable)
+ {
+
+ Model.PHTGL_InvoiceDetail table = Funs.DB.PHTGL_InvoiceDetail.FirstOrDefault(x => x.InvoiceDetailId == newtable.InvoiceDetailId);
+ if (table != null)
+ {
+ table.InvoiceDetailId = newtable.InvoiceDetailId;
+ table.InvoiceId = newtable.InvoiceId;
+ table.GoodsOrServicesName = newtable.GoodsOrServicesName;
+ table.SpecificationModel = newtable.SpecificationModel;
+ table.Unit = newtable.Unit;
+ table.Quantity = newtable.Quantity;
+ table.UnitPrice = newtable.UnitPrice;
+ table.Amount = newtable.Amount;
+ table.TaxRate = newtable.TaxRate;
+ table.Tax = newtable.Tax;
+ Funs.DB.SubmitChanges();
+ }
+
+ }
+ public static void DeletePHTGL_InvoiceDetailById(string InvoiceDetailId)
+ {
+
+ Model.PHTGL_InvoiceDetail table = Funs.DB.PHTGL_InvoiceDetail.FirstOrDefault(x => x.InvoiceDetailId == InvoiceDetailId);
+ if (table != null)
+ {
+ Funs.DB.PHTGL_InvoiceDetail.DeleteOnSubmit(table);
+ Funs.DB.SubmitChanges();
+ }
+
+ }
+
+ public static void DeletePHTGL_InvoiceDetailByInvoiceId(string InvoiceId)
+ {
+ var list = Funs.DB.PHTGL_InvoiceDetail.Where(x => x.InvoiceId == InvoiceId);
+ if (list != null)
+ {
+ Funs.DB.PHTGL_InvoiceDetail.DeleteAllOnSubmit(list);
+ Funs.DB.SubmitChanges();
+ }
+
+ }
+ public static void BatchAddPHTGL_InvoiveDetail(IEnumerable list, string invoiceId )
+ {
+ foreach (var item in list)
+ {
+ item.InvoiceId= invoiceId;
+ AddPHTGL_InvoiceDetail(item);
+ }
+ }
+ public static void BatchAddPHTGL_InvoiveDetail(IEnumerable list)
+ {
+ foreach (var item in list)
+ {
+ AddPHTGL_InvoiceDetail(item);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/发票导入模版.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataIn/发票导入模版.xlsx
new file mode 100644
index 00000000..2916650c
Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/发票导入模版.xlsx differ
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 9f1f55da..a93aabd1 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -114,8 +114,8 @@
False
-
- ..\packages\MiniExcel.1.29.0\lib\net45\MiniExcel.dll
+
+ ..\packages\MiniExcel.1.31.3\lib\net45\MiniExcel.dll
..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll
@@ -1300,6 +1300,12 @@
+
+
+
+
+
+
@@ -12690,6 +12696,48 @@
SetSubFile.aspx
+
+ InvoiceDataIn.aspx
+ ASPXCodeBehind
+
+
+ InvoiceDataIn.aspx
+
+
+ InvoiceOrder.aspx
+ ASPXCodeBehind
+
+
+ InvoiceOrder.aspx
+
+
+ InvoiceOrderDetail.aspx
+ ASPXCodeBehind
+
+
+ InvoiceOrderDetail.aspx
+
+
+ InvoiceOrderReviewEdit.aspx
+ ASPXCodeBehind
+
+
+ InvoiceOrderReviewEdit.aspx
+
+
+ InvoiceStandingBook.aspx
+ ASPXCodeBehind
+
+
+ InvoiceStandingBook.aspx
+
+
+ InvoiceStandingBookEdit.aspx
+ ASPXCodeBehind
+
+
+ InvoiceStandingBookEdit.aspx
+
LongListNetApplication.aspx
ASPXCodeBehind
diff --git a/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExaminationEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExaminationEdit.aspx.cs
index d0fc1195..93f7c868 100644
--- a/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExaminationEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExaminationEdit.aspx.cs
@@ -1,7 +1,5 @@
using BLL;
-using Microsoft.Office.Core;
using System;
-using System.Web;
namespace FineUIPro.Web.HSSE.OccupationHealth
{
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs
index 887a9b85..a5437129 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs
@@ -1,8 +1,5 @@
using BLL;
-using Microsoft.Office.Core;
-using Newtonsoft.Json.Linq;
using System;
-using System.Linq;
namespace FineUIPro.Web.HSSE.SitePerson
{
diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewDetail.aspx.cs
index 7ad805ae..a62e29e1 100644
--- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewDetail.aspx.cs
+++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewDetail.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using Model;
namespace FineUIPro.Web.PHTGL.BiddingManagement
{
diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewEdit.aspx.cs
index 8cdf8354..01b3878a 100644
--- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewEdit.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using Model;
namespace FineUIPro.Web.PHTGL.BiddingManagement
{
diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewDetail.aspx.cs
index 1e44985d..8d3f8fd5 100644
--- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewDetail.aspx.cs
+++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewDetail.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using Model;
namespace FineUIPro.Web.PHTGL.BiddingManagement
{
diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs
index ec388773..45f54a4c 100644
--- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs
@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Web.DynamicData;
+using Model;
namespace FineUIPro.Web.PHTGL.BiddingManagement
{
diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewDetail.aspx.cs
index dcebd218..4df03d02 100644
--- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewDetail.aspx.cs
+++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewDetail.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using Model;
namespace FineUIPro.Web.PHTGL.BiddingManagement
{
diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewEdit.aspx.cs
index c660429e..64005fd4 100644
--- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewEdit.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using Model;
namespace FineUIPro.Web.PHTGL.BiddingManagement
{
diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx.cs
index 6e6c2043..1bd7ac6a 100644
--- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx.cs
+++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx.cs
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using Model;
namespace FineUIPro.Web.PHTGL.BiddingManagement
{
diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs
index 8ad9849e..698bc82f 100644
--- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs
+++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs
@@ -1,4 +1,5 @@
using BLL;
+using Model;
using System;
using System.Collections.Generic;
using System.Data;
@@ -182,7 +183,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
}
- DataTable tb = BLL.PHTGL_ApproveService.GetAllApproveData(ContractReviewId);
+ var tb = BLL.PHTGL_ApproveService.GetAllApproveData(ContractReviewId);
Grid1.DataSource = tb;
Grid1.DataBind();
}
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx
new file mode 100644
index 00000000..f069854d
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx
@@ -0,0 +1,35 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceDataIn.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceDataIn" %>
+
+
+
+
+
+
+ 导入
+
+
+
+
+
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.cs
new file mode 100644
index 00000000..275c0fde
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.cs
@@ -0,0 +1,147 @@
+using BLL;
+using Model;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.PHTGL.InvoiceManage
+{
+ public partial class InvoiceDataIn : PageBase
+ {
+ #region 加载
+
+
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+
+ }
+ }
+
+ #endregion
+
+ #region 导入
+
+ ///
+ /// 导入
+ ///
+ ///
+ ///
+ protected void btnImport_Click(object sender, EventArgs e)
+ {
+ var message = string.Empty;
+ errorInfos = string.Empty;
+ if (fuAttachUrl.HasFile == false)
+ {
+ ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning);
+ return;
+ }
+
+ var IsXls = Path.GetExtension(fuAttachUrl.FileName).Trim().ToLower();
+ if (IsXls != ".xlsx")
+ {
+ ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning);
+ return;
+ }
+ if (!string.IsNullOrEmpty(errorInfos)) errorInfos = string.Empty;
+ var rootPath = Server.MapPath("~/");
+ var initFullPath = rootPath + initPath;
+ if (!Directory.Exists(initFullPath)) Directory.CreateDirectory(initFullPath);
+ //指定上传文件名称
+ hdFileName.Text = Funs.GetNewFileName() + IsXls;
+ //上传文件路径
+ var filePath = initFullPath + hdFileName.Text;
+ //文件上传服务器
+ fuAttachUrl.PostedFile.SaveAs(filePath);
+ //文件上传服务器后的名称
+ var fileName = rootPath + initPath + hdFileName.Text;
+
+ ResponeData responeData;
+ responeData = PhtglInvoiceService.ImportData(fileName, this.CurrUser.LoginProjectId,this.CurrUser.PersonId);
+
+
+ if (responeData.code == 1)
+ {
+ ShowNotify("数据导入成功!", MessageBoxIcon.Success);
+
+ }
+ else
+ {
+ ShowNotify(responeData.message, MessageBoxIcon.Error);
+
+
+ }
+
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+
+ #endregion
+
+ #region 定义项
+
+ ///
+ /// 上传预设的虚拟路径
+ ///
+ private readonly string initPath = Const.ExcelUrl; //"File\\Excel\\DataIn\\";
+
+ ///
+ /// 错误集合
+ ///
+ public static string errorInfos = string.Empty;
+
+ #endregion
+
+ #region 模板下载
+
+ ///
+ /// 模板下载
+ ///
+ ///
+ ///
+ protected void btnDownLoad_Click(object sender, EventArgs e)
+ {
+ PageContext.RegisterStartupScript(Confirm.GetShowReference("确定要下载模板吗?", string.Empty,
+ MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"),
+ PageManager1.GetCustomEventReference("Confirm_Cancel")));
+ }
+
+ ///
+ /// 下载导入模板
+ ///
+ ///
+ ///
+ protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
+ {
+ if (e.EventArgument == "Confirm_OK")
+ {
+ var rootPath = Server.MapPath("~/");
+ var uploadfilepath = rootPath + Const.InvoiceTemplateUrl;
+ var filePath = Const.InvoiceTemplateUrl;
+ var fileName = Path.GetFileName(filePath);
+ var info = new FileInfo(uploadfilepath);
+ var fileSize = info.Length;
+ Response.ClearContent();
+ Response.AddHeader("Content-Disposition",
+ "attachment;filename=" + HttpUtility.UrlEncode(fileName, Encoding.UTF8));
+ Response.ContentType = "excel/plain";
+ Response.ContentEncoding = Encoding.UTF8;
+ Response.AddHeader("Content-Length", fileSize.ToString().Trim());
+ Response.TransmitFile(uploadfilepath, 0, fileSize);
+ Response.End();
+ }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.designer.cs
new file mode 100644
index 00000000..5a1f703c
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.designer.cs
@@ -0,0 +1,98 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.PHTGL.InvoiceManage
+{
+
+
+ public partial class InvoiceDataIn
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// btnImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnImport;
+
+ ///
+ /// btnDownLoad 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnDownLoad;
+
+ ///
+ /// fuAttachUrl 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FileUpload fuAttachUrl;
+
+ ///
+ /// hdFileName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdFileName;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx
new file mode 100644
index 00000000..6a77951a
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx
@@ -0,0 +1,128 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceOrder.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceOrder" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.cs
new file mode 100644
index 00000000..161810fe
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.cs
@@ -0,0 +1,215 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.PHTGL.InvoiceManage
+{
+ public partial class InvoiceOrder : PageBase
+ {
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.GetButtonPower();
+ this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
+ // 绑定表格
+ this.BindGrid();
+ }
+ }
+
+ #region 绑定数据
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ Model.PHTGL_Invoice table = new Model.PHTGL_Invoice();
+ table.ProjectId = this.CurrUser.LoginProjectId;
+ var tb = BLL.PhtglInvoiceService.GetOrderInListData(table, Grid1);
+ Grid1.RecordCount = PhtglInvoiceService.Count;
+ //tb = GetFilteredTable(Grid1.FilteredData, tb);
+ Grid1.DataSource = tb;
+ Grid1.DataBind();
+ }
+ #endregion
+
+ #region GV 数据操作
+ ///
+ /// 过滤表头
+ ///
+ ///
+ ///
+ //protected void Grid1_FilterChange(object sender, EventArgs e)
+ //{
+ // this.BindGrid();
+ //}
+
+ ///
+ /// 分页
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ this.Grid1.PageIndex = e.NewPageIndex;
+ this.BindGrid();
+ }
+
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ this.Grid1.SortDirection = e.SortDirection;
+ this.Grid1.SortField = e.SortField;
+ this.BindGrid();
+ }
+
+ ///
+ /// 分页显示条数下拉框
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
+ this.BindGrid();
+ }
+ #endregion
+
+
+ #region 关闭弹出窗
+ ///
+ /// 关闭弹出窗
+ ///
+ ///
+ ///
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 获取权限按钮
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.PHTGL_InvoiceStandingBookMenuId);
+ if (buttonList.Count > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnAdd))
+ {
+ // this.btnNew.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnModify))
+ {
+ //this.btnMenuEdit.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnDelete))
+ {
+ // this.btnMenuDelete.Hidden = false;
+ }
+ }
+ }
+ #endregion
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ string filename = Funs.GetNewFileName();
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("" + filename, System.Text.Encoding.UTF8) + ".xls");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = System.Text.Encoding.UTF8;
+ this.Grid1.PageSize = 500;
+ this.BindGrid();
+ Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+
+ ///
+ /// 导出方法
+ ///
+ ///
+ ///
+ private string GetGridTableHtml(Grid grid)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("");
+ sb.Append("");
+ sb.Append("");
+ foreach (GridColumn column in grid.Columns)
+ {
+ sb.AppendFormat("| {0} | ", column.HeaderText);
+ }
+ sb.Append("
");
+ foreach (GridRow row in grid.Rows)
+ {
+ sb.Append("");
+ foreach (GridColumn column in grid.Columns)
+ {
+ string html = row.Values[column.ColumnIndex].ToString();
+ if (column.ColumnID == "tfNumber")
+ {
+ html = (row.FindControl("lblNumber") as System.Web.UI.WebControls.Label).Text;
+ }
+ sb.AppendFormat("| {0} | ", html);
+ }
+
+ sb.Append("
");
+ }
+
+ sb.Append("
");
+
+ return sb.ToString();
+ }
+ #endregion
+
+
+ protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
+ {
+ if (e.CommandName== "OrderInDetail")
+ {
+ Window1.Title = "入库单详情";
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderDetail.aspx?InvoiceId={0}&&Type={1}", e.RowID, "0", "编辑 - ")));
+ }
+ else if(e.CommandName== "OrderOutDetail")
+ {
+ Window1.Title = "出库单详情";
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderDetail.aspx?InvoiceId={0}&&Type={1}", e.RowID, "1", "编辑 - ")));
+ }
+ }
+
+ protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
+ {
+ var id = e.RowID;
+ var model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(id);
+ if (model.State> PhtglInvoiceService.StateDataIn)
+ {
+ Grid1.FindColumn("btnOrderInDetail").Hidden = false;
+ }
+ if (model.State >= PhtglInvoiceService.StateInPutApproveSuccess)
+ {
+ Grid1.FindColumn("btnOrderOutDetail").Hidden = false;
+ }
+
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.designer.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.designer.cs
new file mode 100644
index 00000000..e23153ae
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.designer.cs
@@ -0,0 +1,116 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.PHTGL.InvoiceManage
+{
+
+
+ public partial class InvoiceOrder
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// lblNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblNumber;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx
new file mode 100644
index 00000000..dedf505e
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx
@@ -0,0 +1,182 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceOrderDetail.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceOrderDetail" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.cs
new file mode 100644
index 00000000..b3a33de7
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.cs
@@ -0,0 +1,216 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using BLL;
+
+namespace FineUIPro.Web.PHTGL.InvoiceManage
+{
+ public partial class InvoiceOrderDetail : PageBase
+ {
+ public string InvoiceId {
+ get
+ {
+ return (string)ViewState["InvoiceId"];
+ }
+ set
+ {
+ ViewState["InvoiceId"] = value;
+ }
+ }
+ public string Type
+ {
+ get
+ {
+ return (string)ViewState["Type"];
+ }
+ set
+ {
+ ViewState["Type"] = value;
+ }
+ }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ InvoiceId = Request.QueryString["InvoiceId"];
+ Type = Request.QueryString["Type"];
+
+ Model.PHTGL_Invoice table = new Model.PHTGL_Invoice();
+ table.ProjectId = this.CurrUser.LoginProjectId;
+ table.InvoiceId=InvoiceId;
+ var invoiceModel = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId);
+ var ContractModel = BLL.ContractService.GetContractById(invoiceModel.ContractId);
+
+ if (invoiceModel != null)
+ {
+ txtProjectName.Text=ProjectService.GetProjectNameByProjectId(invoiceModel.ProjectId);
+ txtContractNum.Text= ContractModel?.ContractNum;
+ txtSellerName.Text=invoiceModel.SellerName;
+ txtOrderInDate.SelectedDate=invoiceModel.OrderInDate;
+ txtInvoiceDate.Text=invoiceModel.InvoiceDate;
+ txtOrderCode.Text=invoiceModel.OrderCode;
+ txtInvoiceNumber.Text=invoiceModel.InvoiceNumber;
+ txtOrderOutDate.SelectedDate=invoiceModel.OrderOutDate;
+ txtMaterialRequisitionUnit.Text=invoiceModel.MaterialRequisitionUnit;
+ }
+
+ BindGrid();
+ BindApproveData();
+ if (Type=="0")
+ {
+ Grid1.Title = "入库单列表";
+ PanelOrderIn.Hidden = false;
+ }
+ else if (Type=="1")
+ {
+ PanelOrderOut.Hidden = false;
+ Grid1.Title = "出库单列表";
+ }
+
+ if (invoiceModel.CreateUser== this.CurrUser.PersonId) //创建人
+ {
+ TbCreate.Hidden = false;
+ if (invoiceModel.State> PhtglInvoiceService.StateCreate)
+ {
+ Form_approve.Hidden = false;
+ }
+ }
+
+ if (PHTGL_ApproveService.IsApprovingMan(InvoiceId, this.CurrUser.PersonId)) //判断当前人是否审批人
+ {
+ TbApprove.Hidden = false;
+ Form_approve.Hidden = false;
+
+ }
+ }
+ }
+
+ public void BindApproveData()
+ {
+ var approveModel = PHTGL_ApproveService.GetAllApproveData(InvoiceId, Type=="0"? "Invoice_Input" : "Invoice_Output");
+ if (approveModel != null)
+ {
+ Grid2.DataSource = approveModel;
+ Grid2.DataBind();
+ }
+ }
+ public void BindGrid()
+ {
+ var invoiceDetail = PhtglInvoicedetailService.GetPHTGL_InvoiceDetailByInvoiceId(InvoiceId);
+ Grid1.DataSource = invoiceDetail;
+ Grid1.DataBind();
+ txtSumUnitPrice.Text= invoiceDetail.Sum(p=>p.UnitPrice).ToString();
+ txtSumTax.Text=invoiceDetail.Sum(p=>p.Tax).ToString();
+ txtSumAmount.Text=invoiceDetail.Sum(p=>p.Amount).ToString();
+ txtAmountInWords.Text = Funs.NumericCapitalization(invoiceDetail.Sum(p => p.Amount)??0);
+ }
+
+
+ protected void Grid1_OnRowCommand(object sender, GridCommandEventArgs e)
+ {
+ if (e.CommandName=="delete")
+ {
+ PhtglInvoicedetailService.DeletePHTGL_InvoiceDetailById(e.RowID);
+ BindGrid();
+ }
+ }
+
+ protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
+ {
+ if (Type=="1")
+ {
+ Grid1.FindColumn("btnDelete").Hidden = true;
+ }
+ }
+
+ protected string GetTaxRate(object eval)
+ {
+ string result="";
+ if (eval!=null)
+ {
+ decimal taxRate = Convert.ToDecimal(eval);
+ string percentage = string.Format("{0:P0}", taxRate);
+ result= percentage.Replace("%", "");
+ }
+ return result;
+ }
+
+ protected string GetNoTaxPrice(object amount, object tax)
+ {
+ //获取amount-tax 的值
+ string result="";
+ if (amount != null && tax != null)
+ {
+ decimal amountValue = Convert.ToDecimal(amount);
+ decimal taxValue = Convert.ToDecimal(tax);
+ decimal noTaxPrice = amountValue - taxValue;
+ result= noTaxPrice.ToString();
+ }
+ return result;
+ }
+
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ var invoiceModel = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId);
+ invoiceModel.OrderInDate=txtOrderInDate.SelectedDate;
+ invoiceModel.OrderOutDate=txtOrderOutDate.SelectedDate;
+ invoiceModel.OrderCode=txtOrderCode.Text;
+ invoiceModel.MaterialRequisitionUnit=txtMaterialRequisitionUnit.Text;
+ BLL.PhtglInvoiceService.UpdatePHTGL_Invoice(invoiceModel);
+ ShowNotify("保存成功!" ,MessageBoxIcon.Success);
+ }
+
+ protected void btnEditProcess_Click(object sender, EventArgs e)
+ {
+ if (Type == "0")
+ {
+
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderReviewEdit.aspx?InvoiceId={0}&&Type={1}", InvoiceId, "0", "编辑 - ")));
+ }
+ else if (Type == "1")
+ {
+
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderReviewEdit.aspx?InvoiceId={0}&&Type={1}", InvoiceId, "1", "编辑 - ")));
+ }
+ }
+
+ protected void btnAgree_Click(object sender, EventArgs e)
+ {
+ PhtglInvoiceService.Approve(InvoiceId, int.Parse(Type),this.CurrUser.PersonId,true, txtApproveIdea.Text);
+ ShowNotify("审批成功!", MessageBoxIcon.Success);
+ if (!string.IsNullOrEmpty(Request.Params["PHTUrl"]))
+ {
+ PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
+ PageContext.RegisterStartupScript("closeActiveTab();");
+
+ }
+ else
+ {
+ PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
+
+ }
+
+ }
+
+ protected void btnDisgree_Click(object sender, EventArgs e)
+ {
+ PhtglInvoiceService.Approve(InvoiceId, int.Parse(Type), this.CurrUser.PersonId, false, txtApproveIdea.Text);
+ ShowNotify("审批成功!", MessageBoxIcon.Success);
+ if (!string.IsNullOrEmpty(Request.Params["PHTUrl"]))
+ {
+ PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
+ PageContext.RegisterStartupScript("closeActiveTab();");
+
+ }
+ else
+ {
+ PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
+
+ }
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.designer.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.designer.cs
new file mode 100644
index 00000000..13c8cd0b
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.designer.cs
@@ -0,0 +1,323 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.PHTGL.InvoiceManage
+{
+
+
+ public partial class InvoiceOrderDetail
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// Form2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form2;
+
+ ///
+ /// TbCreate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar TbCreate;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnEditProcess 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnEditProcess;
+
+ ///
+ /// TbApprove 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar TbApprove;
+
+ ///
+ /// btnAgree 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnAgree;
+
+ ///
+ /// btnDisgree 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnDisgree;
+
+ ///
+ /// Panel4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel4;
+
+ ///
+ /// txtProjectName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProjectName;
+
+ ///
+ /// txtContractNum 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtContractNum;
+
+ ///
+ /// txtSellerName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtSellerName;
+
+ ///
+ /// PanelOrderIn 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel PanelOrderIn;
+
+ ///
+ /// txtOrderInDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtOrderInDate;
+
+ ///
+ /// txtInvoiceDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtInvoiceDate;
+
+ ///
+ /// txtOrderCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtOrderCode;
+
+ ///
+ /// PanelOrderOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel PanelOrderOut;
+
+ ///
+ /// txtOrderOutDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtOrderOutDate;
+
+ ///
+ /// txtMaterialRequisitionUnit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtMaterialRequisitionUnit;
+
+ ///
+ /// txtInvoiceNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtInvoiceNumber;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// lblPageIndex 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPageIndex;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// Label2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label2;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// txtSumUnitPrice 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtSumUnitPrice;
+
+ ///
+ /// txtSumTax 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtSumTax;
+
+ ///
+ /// txtSumAmount 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtSumAmount;
+
+ ///
+ /// txtAmountInWords 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtAmountInWords;
+
+ ///
+ /// Form_approve 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form_approve;
+
+ ///
+ /// txtApproveIdea 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtApproveIdea;
+
+ ///
+ /// Grid2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid2;
+
+ ///
+ /// Label3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label3;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx
new file mode 100644
index 00000000..cdbbb019
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx
@@ -0,0 +1,107 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceOrderReviewEdit.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceOrderReviewEdit" %>
+
+
+
+
+
+
+
+ 编辑合同基本信息
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.cs
new file mode 100644
index 00000000..05187dc3
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.cs
@@ -0,0 +1,161 @@
+using BLL;
+using Model;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.PHTGL.InvoiceManage
+{
+ public partial class InvoiceOrderReviewEdit : PageBase
+ {
+ public string InvoiceId
+ {
+ get
+ {
+ return (string)ViewState["InvoiceId"];
+ }
+ set
+ {
+ ViewState["InvoiceId"] = value;
+ }
+ }
+ public string Type
+ {
+ get
+ {
+ return (string)ViewState["Type"];
+ }
+ set
+ {
+ ViewState["Type"] = value;
+ }
+ }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ InvoiceId = Request.QueryString["InvoiceId"];
+ Type = Request.QueryString["Type"];
+ this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
+ var model= PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId);
+ int[] arr = new Int32[] { PhtglInvoiceService.StateCreate, PhtglInvoiceService.StateInPutApproveRefuse, PhtglInvoiceService.StateInPutApproveSuccess, PhtglInvoiceService.StateOutPutApproveRefuse, };
+ if (arr.ToList().Contains(model.State.Value))
+ {
+ if (model.State== PhtglInvoiceService.StateInPutApproveRefuse|| model.State == PhtglInvoiceService.StateOutPutApproveRefuse)
+ {
+ btnSubmit.Text="重新发起流程";
+ }
+ btnSubmit.Hidden = false;
+ }
+ if (Type=="0")
+ {
+ Panel_OrderIn.Hidden = false;
+
+ }
+ else if (Type == "1")
+ {
+ Panel_OrderOut.Hidden = false;
+ }
+ //入库下拉框
+ BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropProfessionalEngineer, null, Const.UnitId_SEDIN, null, true);//专业工程师
+ BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropConstructionManager, null, Const.UnitId_SEDIN, null, true);//施工经理
+ BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropControlManager_In, null, Const.UnitId_SEDIN, null, true);//控制经理
+ BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropProjectManager_In, null, Const.UnitId_SEDIN, null, true);//项目经理
+ //出库下拉框
+ BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropPurchasingMan, null, Const.UnitId_SEDIN, null, true);//采购员
+ BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropControlManager_Out, null, Const.UnitId_SEDIN, null, true);//控制经理
+ BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropProjectManager_Out, null, Const.UnitId_SEDIN, null, true);//项目经理
+ BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropConUnitMaterialOfficer, null, Const.UnitId_SEDIN, null, true);//施工单位材料经理
+ BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropConUnitProjectManager, null, Const.UnitId_SEDIN, null, true);//施工单位项目经理
+
+ var invoiceApproveManEntity= PhtglInvoiceService.GetInvoiceApproveManEntity(InvoiceId);
+ //入库下拉框初始化值
+ DropProfessionalEngineer.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ProjectManager;
+ DropConstructionManager.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ConstructionManager;
+ DropControlManager_In.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ControlManager;
+ DropProjectManager_In.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ProjectManager;
+ //出库下拉框初始化值
+ DropPurchasingMan.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.PurchasingMan;
+ DropControlManager_Out.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.ControlManager;
+ DropProjectManager_Out.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.ProjectManager;
+ DropConUnitMaterialOfficer.SelectedValue = invoiceApproveManEntity.OutputApproveMan?.ConUnitMaterialOfficer;
+ DropConUnitProjectManager.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.ConUnitProjectManager;
+
+
+ }
+ }
+ private bool DropIsNull(Control c)
+ {
+ bool IsOk = true;
+ //遍历控件
+ //myDictionary.Clear();
+ foreach (Control childControl in c.Controls)
+ {
+ if (childControl is DropDownList)
+ {
+ DropDownList tb = (DropDownList)childControl;
+ if (tb.SelectedValue == Const._Null)
+ {
+ IsOk = false;
+ ShowNotify("请选择要审批的" + tb.Label, MessageBoxIcon.Warning);
+ return IsOk;
+ }
+ }
+
+ }
+ return IsOk;
+
+ }
+ protected void Save()
+ {
+ if (!DropIsNull(SimpleForm1))
+ {
+ return;
+ }
+ var model_In = new Inputapproveman()
+ {
+ ProfessionalEngineer= DropProfessionalEngineer.SelectedValue,
+ ConstructionManager= DropConstructionManager.SelectedValue,
+ ControlManager= DropControlManager_In.SelectedValue,
+ ProjectManager= DropProjectManager_In.SelectedValue
+ };
+ var model_Out = new Outputapproveman()
+ {
+ PurchasingMan = DropPurchasingMan.SelectedValue,
+ ControlManager = DropControlManager_Out.SelectedValue,
+ ProjectManager = DropProjectManager_Out.SelectedValue,
+ ConUnitMaterialOfficer = DropConUnitMaterialOfficer.SelectedValue,
+ ConUnitProjectManager = DropConUnitProjectManager.SelectedValue
+ };
+ if (Type == "0")
+ {
+ PhtglInvoiceService.SaveInputApproveManEntity(InvoiceId, model_In);
+
+ }
+ else if (Type == "1")
+ {
+ PhtglInvoiceService.SaveOutputApproveManEntity(InvoiceId, model_Out);
+ }
+
+
+ }
+
+ protected void btnSubmit_Click(object sender, EventArgs e)
+ {
+ Save();
+ PhtglInvoiceService.StartApprovalProcess(InvoiceId);
+
+ ShowNotify("提交成功!",MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHideReference());
+ }
+
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ Save();
+ ShowNotify("保存成功!", MessageBoxIcon.Success);
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.designer.cs
new file mode 100644
index 00000000..b6f28b78
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.designer.cs
@@ -0,0 +1,215 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.PHTGL.InvoiceManage
+{
+
+
+ public partial class InvoiceOrderReviewEdit
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// Panel_OrderIn 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel Panel_OrderIn;
+
+ ///
+ /// Form2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form2;
+
+ ///
+ /// DropProfessionalEngineer 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList DropProfessionalEngineer;
+
+ ///
+ /// DropConstructionManager 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList DropConstructionManager;
+
+ ///
+ /// DropControlManager_In 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList DropControlManager_In;
+
+ ///
+ /// DropProjectManager_In 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList DropProjectManager_In;
+
+ ///
+ /// Panel_OrderOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel Panel_OrderOut;
+
+ ///
+ /// Form3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form3;
+
+ ///
+ /// DropPurchasingMan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList DropPurchasingMan;
+
+ ///
+ /// DropControlManager_Out 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList DropControlManager_Out;
+
+ ///
+ /// DropProjectManager_Out 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList DropProjectManager_Out;
+
+ ///
+ /// DropConUnitMaterialOfficer 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList DropConUnitMaterialOfficer;
+
+ ///
+ /// DropConUnitProjectManager 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList DropConUnitProjectManager;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// btnSubmit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSubmit;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnClose 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnClose;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx
new file mode 100644
index 00000000..3792aad3
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx
@@ -0,0 +1,154 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceStandingBook.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceStandingBook" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.cs
new file mode 100644
index 00000000..d263b701
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.cs
@@ -0,0 +1,277 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.PHTGL.InvoiceManage
+{
+ public partial class InvoiceStandingBook :PageBase
+ {
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.GetButtonPower();
+ this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
+ // 绑定表格
+ this.BindGrid();
+ }
+ }
+
+ #region 绑定数据
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ Model.PHTGL_Invoice table = new Model.PHTGL_Invoice();
+ table.ProjectId=this.CurrUser.LoginProjectId;
+ table.State = PhtglInvoiceService.StateDataIn;
+ var tb = BLL.PhtglInvoiceService.GetListData(table, Grid1);
+ Grid1.RecordCount = PhtglInvoiceService.Count;
+ //tb = GetFilteredTable(Grid1.FilteredData, tb);
+ Grid1.DataSource = tb;
+ Grid1.DataBind();
+ }
+ #endregion
+
+ #region GV 数据操作
+ ///
+ /// 过滤表头
+ ///
+ ///
+ ///
+ //protected void Grid1_FilterChange(object sender, EventArgs e)
+ //{
+ // this.BindGrid();
+ //}
+
+ ///
+ /// 分页
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ this.Grid1.PageIndex = e.NewPageIndex;
+ this.BindGrid();
+ }
+
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ this.Grid1.SortDirection = e.SortDirection;
+ this.Grid1.SortField = e.SortField;
+ this.BindGrid();
+ }
+
+ ///
+ /// 分页显示条数下拉框
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
+ this.BindGrid();
+ }
+ #endregion
+
+ #region 数据编辑事件
+ ///
+ /// 新增
+ ///
+ ///
+ ///
+ protected void btnNew_Click(object sender, EventArgs e)
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceStandingBookEdit.aspx?InvoiceId={0}", string.Empty, "增加 - ")));
+ }
+
+ ///
+ /// 编辑按钮
+ ///
+ ///
+ ///
+ protected void btnEdit_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ string ID = Grid1.SelectedRowID;
+ var model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(ID);
+ if (model != null) ///已上报时不能删除
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceStandingBookEdit.aspx?InvoiceId={0}", ID, "编辑 - ")));
+ }
+ }
+
+ ///
+ /// Grid行双击事件
+ ///
+ ///
+ ///
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ this.btnEdit_Click(null, null);
+ }
+
+ ///
+ /// 批量删除
+ ///
+ ///
+ ///
+ protected void btnDelete_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length > 0)
+ {
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ var model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(rowID);
+ if (model != null)
+ {
+ BLL.PhtglInvoiceService.DeletePHTGL_InvoiceById(rowID);
+ }
+ }
+
+ BindGrid();
+ ShowNotify("删除数据成功!", MessageBoxIcon.Success);
+ }
+ }
+ #endregion
+
+ #region 关闭弹出窗
+ ///
+ /// 关闭弹出窗
+ ///
+ ///
+ ///
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 获取权限按钮
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.PHTGL_InvoiceStandingBookMenuId);
+ if (buttonList.Count > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnAdd))
+ {
+ // this.btnNew.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnModify))
+ {
+ this.btnMenuEdit.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnDelete))
+ {
+ this.btnMenuDelete.Hidden = false;
+ this.btnDelete.Hidden = false;
+ }
+ }
+ }
+ #endregion
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ string filename = Funs.GetNewFileName();
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("" + filename, System.Text.Encoding.UTF8) + ".xls");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = System.Text.Encoding.UTF8;
+ this.Grid1.PageSize = 500;
+ this.BindGrid();
+ Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+
+ ///
+ /// 导出方法
+ ///
+ ///
+ ///
+ private string GetGridTableHtml(Grid grid)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("");
+ sb.Append("");
+ sb.Append("");
+ foreach (GridColumn column in grid.Columns)
+ {
+ sb.AppendFormat("| {0} | ", column.HeaderText);
+ }
+ sb.Append("
");
+ foreach (GridRow row in grid.Rows)
+ {
+ sb.Append("");
+ foreach (GridColumn column in grid.Columns)
+ {
+ string html = row.Values[column.ColumnIndex].ToString();
+ if (column.ColumnID == "tfNumber")
+ {
+ html = (row.FindControl("lblNumber") as System.Web.UI.WebControls.Label).Text;
+ }
+ sb.AppendFormat("| {0} | ", html);
+ }
+
+ sb.Append("
");
+ }
+
+ sb.Append("
");
+
+ return sb.ToString();
+ }
+ #endregion
+
+ protected void btnImport_Click(object sender, EventArgs e)
+ {
+ PageContext.RegisterStartupScript(
+ Window1.GetShowReference(string.Format("InvoiceDataIn.aspx?", "导入 - ")));
+ }
+
+ protected void btnOrderIn_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ string ID = Grid1.SelectedRowID;
+ var model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(ID);
+ if (model != null && !string.IsNullOrEmpty(model.ContractId))
+ {
+ PhtglInvoiceService.ChangeStateToCreate(model.InvoiceId);
+ ShowNotify("操作成功!", MessageBoxIcon.Success);
+ }
+ else
+ {
+ ShowNotify("请先关联合同!", MessageBoxIcon.Question);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.designer.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.designer.cs
new file mode 100644
index 00000000..d7484921
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.designer.cs
@@ -0,0 +1,179 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.PHTGL.InvoiceManage
+{
+
+
+ public partial class InvoiceStandingBook
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// btnEdit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnEdit;
+
+ ///
+ /// btnOrderIn 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOrderIn;
+
+ ///
+ /// btnDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnDelete;
+
+ ///
+ /// btnImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnImport;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
+ ///
+ /// lblNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblNumber;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuEdit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuEdit;
+
+ ///
+ /// btnMenuDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDelete;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx
new file mode 100644
index 00000000..88a62baf
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx
@@ -0,0 +1,87 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceStandingBookEdit.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceStandingBookEdit" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.cs
new file mode 100644
index 00000000..da04f886
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.cs
@@ -0,0 +1,88 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.PHTGL.InvoiceManage
+{
+ public partial class InvoiceStandingBookEdit : PageBase
+ {
+ #region
+ ///
+ /// 主键
+ ///
+ public string InvoiceId
+ {
+ get
+ {
+ return (string)ViewState["InvoiceId"];
+ }
+ set
+ {
+ ViewState["InvoiceId"] = value;
+ }
+ }
+ #endregion
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
+
+ this.InvoiceId = Request.Params["InvoiceId"];
+
+ this.DropContractCode.DataTextField = "ContractNum";
+ this.DropContractCode.DataValueField = "ContractId";
+ this.DropContractCode.DataSource = BLL.PHTGL_ContractReviewService.GetContractReview_CompleteData(this.CurrUser.LoginProjectId);
+ this.DropContractCode.DataBind();
+ if (!string.IsNullOrEmpty(this.InvoiceId))
+ {
+ Model.PHTGL_Invoice model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(this.InvoiceId);
+ if (model != null)
+ {
+
+ this.txtInvoiceCode.Text = model.InvoiceCode;
+ this.txtInvoiceNumber.Text = model.InvoiceNumber;
+ this.txtSellerName.Text = model.SellerName;
+ this.txtInvoiceDate.Text = model.InvoiceDate;
+ this.txtAmountExcludingTax.Text = model.AmountExcludingTax.ToString();
+ this.txtTotalTax.Text = model.TotalTax.ToString();
+ this.txtRemark.Text = model.Remark;
+ this.txtImagePath.Text = model.ImagePath;
+ this.txtSellerTaxNumber.Text = model.SellerTaxNumber;
+ this.txtInvoiceAmount.Text = model.InvoiceAmount.ToString();
+ DropContractCode.SelectedValue = model.ContractId;
+
+ }
+ }
+ }
+ }
+
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+
+ if (string.IsNullOrEmpty(this.InvoiceId))
+ {
+ ShowNotify("暂不支持新增",MessageBoxIcon.Warning);
+
+ }
+ else
+ {
+ var model = PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId);
+ model.ContractId= DropContractCode.SelectedValue;
+ BLL.PhtglInvoiceService.UpdatePHTGL_Invoice(model);
+ }
+ PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.designer.cs
new file mode 100644
index 00000000..194b45cc
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.designer.cs
@@ -0,0 +1,179 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.PHTGL.InvoiceManage
+{
+
+
+ public partial class InvoiceStandingBookEdit
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// DropContractCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList DropContractCode;
+
+ ///
+ /// txtInvoiceCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtInvoiceCode;
+
+ ///
+ /// txtInvoiceNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtInvoiceNumber;
+
+ ///
+ /// txtSellerName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtSellerName;
+
+ ///
+ /// txtInvoiceDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtInvoiceDate;
+
+ ///
+ /// txtAmountExcludingTax 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtAmountExcludingTax;
+
+ ///
+ /// txtTotalTax 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtTotalTax;
+
+ ///
+ /// txtRemark 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtRemark;
+
+ ///
+ /// txtImagePath 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtImagePath;
+
+ ///
+ /// txtSellerTaxNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtSellerTaxNumber;
+
+ ///
+ /// txtInvoiceAmount 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtInvoiceAmount;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnClose 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnClose;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs
index bd486a7c..883e3665 100644
--- a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs
+++ b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs
@@ -1,5 +1,4 @@
using BLL;
-using Microsoft.Office.Core;
using System;
using System.Linq;
diff --git a/SGGL/FineUIPro.Web/common/Menu_DigData.xml b/SGGL/FineUIPro.Web/common/Menu_DigData.xml
index b532a9bb..bb7a7a34 100644
--- a/SGGL/FineUIPro.Web/common/Menu_DigData.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_DigData.xml
@@ -1,9 +1,51 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -16,12 +58,15 @@
+
+
+
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml
index b428bd9e..89357168 100644
--- a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml
@@ -14,7 +14,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml
index 95eeab91..129ab5fd 100644
--- a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml
@@ -1,8 +1,8 @@
-
-
-
+
+
+
diff --git a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml
index 8d4aa005..fd6a0762 100644
--- a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml
@@ -1,7 +1,11 @@
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml
index e9a16e96..5fcd6c9d 100644
--- a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml
@@ -4,10 +4,10 @@
-
+
@@ -37,4 +37,7 @@
+
+
+
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml
index ac07e539..2e2dc1ed 100644
--- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml
@@ -48,49 +48,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index 738f10eb..b7167cbe 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -1142,6 +1142,12 @@ namespace Model
partial void InsertPHTGL_ContractTrackProgress(PHTGL_ContractTrackProgress instance);
partial void UpdatePHTGL_ContractTrackProgress(PHTGL_ContractTrackProgress instance);
partial void DeletePHTGL_ContractTrackProgress(PHTGL_ContractTrackProgress instance);
+ partial void InsertPHTGL_Invoice(PHTGL_Invoice instance);
+ partial void UpdatePHTGL_Invoice(PHTGL_Invoice instance);
+ partial void DeletePHTGL_Invoice(PHTGL_Invoice instance);
+ partial void InsertPHTGL_InvoiceDetail(PHTGL_InvoiceDetail instance);
+ partial void UpdatePHTGL_InvoiceDetail(PHTGL_InvoiceDetail instance);
+ partial void DeletePHTGL_InvoiceDetail(PHTGL_InvoiceDetail instance);
partial void InsertPHTGL_MainProjectQuantity(PHTGL_MainProjectQuantity instance);
partial void UpdatePHTGL_MainProjectQuantity(PHTGL_MainProjectQuantity instance);
partial void DeletePHTGL_MainProjectQuantity(PHTGL_MainProjectQuantity instance);
@@ -4791,6 +4797,22 @@ namespace Model
}
}
+ public System.Data.Linq.Table PHTGL_Invoice
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
+ public System.Data.Linq.Table PHTGL_InvoiceDetail
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
public System.Data.Linq.Table PHTGL_MainProjectQuantity
{
get
@@ -11801,7 +11823,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(2000)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")]
public string ApproveIdea
{
get
@@ -151489,7 +151511,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(3000)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(500)")]
public string AttentPerson
{
get
@@ -182448,7 +182470,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(255)")]
public string ProjectDescription
{
get
@@ -182568,7 +182590,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(255)")]
public string CalculationRule
{
get
@@ -182628,7 +182650,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(100)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(50)")]
public string ConstructionSubcontractor
{
get
@@ -183012,7 +183034,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,3)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,2)")]
public System.Nullable WorkPackageEstimate
{
get
@@ -183307,6 +183329,826 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PHTGL_Invoice")]
+ public partial class PHTGL_Invoice : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _InvoiceId;
+
+ private string _ProjectId;
+
+ private System.Nullable _State;
+
+ private string _InvoiceCode;
+
+ private string _InvoiceNumber;
+
+ private string _SellerName;
+
+ private string _InvoiceDate;
+
+ private System.Nullable _AmountExcludingTax;
+
+ private System.Nullable _TotalTax;
+
+ private string _Remark;
+
+ private string _ImagePath;
+
+ private string _SellerTaxNumber;
+
+ private System.Nullable _InvoiceAmount;
+
+ private string _ApproveManJson;
+
+ private System.Nullable _CreateDate;
+
+ private string _CreateUser;
+
+ private string _ContractId;
+
+ private System.Nullable _OrderInDate;
+
+ private string _OrderCode;
+
+ private System.Nullable _OrderOutDate;
+
+ private string _MaterialRequisitionUnit;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnInvoiceIdChanging(string value);
+ partial void OnInvoiceIdChanged();
+ partial void OnProjectIdChanging(string value);
+ partial void OnProjectIdChanged();
+ partial void OnStateChanging(System.Nullable value);
+ partial void OnStateChanged();
+ partial void OnInvoiceCodeChanging(string value);
+ partial void OnInvoiceCodeChanged();
+ partial void OnInvoiceNumberChanging(string value);
+ partial void OnInvoiceNumberChanged();
+ partial void OnSellerNameChanging(string value);
+ partial void OnSellerNameChanged();
+ partial void OnInvoiceDateChanging(string value);
+ partial void OnInvoiceDateChanged();
+ partial void OnAmountExcludingTaxChanging(System.Nullable value);
+ partial void OnAmountExcludingTaxChanged();
+ partial void OnTotalTaxChanging(System.Nullable value);
+ partial void OnTotalTaxChanged();
+ partial void OnRemarkChanging(string value);
+ partial void OnRemarkChanged();
+ partial void OnImagePathChanging(string value);
+ partial void OnImagePathChanged();
+ partial void OnSellerTaxNumberChanging(string value);
+ partial void OnSellerTaxNumberChanged();
+ partial void OnInvoiceAmountChanging(System.Nullable value);
+ partial void OnInvoiceAmountChanged();
+ partial void OnApproveManJsonChanging(string value);
+ partial void OnApproveManJsonChanged();
+ partial void OnCreateDateChanging(System.Nullable value);
+ partial void OnCreateDateChanged();
+ partial void OnCreateUserChanging(string value);
+ partial void OnCreateUserChanged();
+ partial void OnContractIdChanging(string value);
+ partial void OnContractIdChanged();
+ partial void OnOrderInDateChanging(System.Nullable value);
+ partial void OnOrderInDateChanged();
+ partial void OnOrderCodeChanging(string value);
+ partial void OnOrderCodeChanged();
+ partial void OnOrderOutDateChanging(System.Nullable value);
+ partial void OnOrderOutDateChanged();
+ partial void OnMaterialRequisitionUnitChanging(string value);
+ partial void OnMaterialRequisitionUnitChanged();
+ #endregion
+
+ public PHTGL_Invoice()
+ {
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InvoiceId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string InvoiceId
+ {
+ get
+ {
+ return this._InvoiceId;
+ }
+ set
+ {
+ if ((this._InvoiceId != value))
+ {
+ this.OnInvoiceIdChanging(value);
+ this.SendPropertyChanging();
+ this._InvoiceId = value;
+ this.SendPropertyChanged("InvoiceId");
+ this.OnInvoiceIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
+ public string ProjectId
+ {
+ get
+ {
+ return this._ProjectId;
+ }
+ set
+ {
+ if ((this._ProjectId != value))
+ {
+ this.OnProjectIdChanging(value);
+ this.SendPropertyChanging();
+ this._ProjectId = value;
+ this.SendPropertyChanged("ProjectId");
+ this.OnProjectIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Int")]
+ public System.Nullable State
+ {
+ get
+ {
+ return this._State;
+ }
+ set
+ {
+ if ((this._State != value))
+ {
+ this.OnStateChanging(value);
+ this.SendPropertyChanging();
+ this._State = value;
+ this.SendPropertyChanged("State");
+ this.OnStateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InvoiceCode", DbType="NVarChar(50)")]
+ public string InvoiceCode
+ {
+ get
+ {
+ return this._InvoiceCode;
+ }
+ set
+ {
+ if ((this._InvoiceCode != value))
+ {
+ this.OnInvoiceCodeChanging(value);
+ this.SendPropertyChanging();
+ this._InvoiceCode = value;
+ this.SendPropertyChanged("InvoiceCode");
+ this.OnInvoiceCodeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InvoiceNumber", DbType="NVarChar(50)")]
+ public string InvoiceNumber
+ {
+ get
+ {
+ return this._InvoiceNumber;
+ }
+ set
+ {
+ if ((this._InvoiceNumber != value))
+ {
+ this.OnInvoiceNumberChanging(value);
+ this.SendPropertyChanging();
+ this._InvoiceNumber = value;
+ this.SendPropertyChanged("InvoiceNumber");
+ this.OnInvoiceNumberChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SellerName", DbType="NVarChar(100)")]
+ public string SellerName
+ {
+ get
+ {
+ return this._SellerName;
+ }
+ set
+ {
+ if ((this._SellerName != value))
+ {
+ this.OnSellerNameChanging(value);
+ this.SendPropertyChanging();
+ this._SellerName = value;
+ this.SendPropertyChanged("SellerName");
+ this.OnSellerNameChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InvoiceDate", DbType="NVarChar(50)")]
+ public string InvoiceDate
+ {
+ get
+ {
+ return this._InvoiceDate;
+ }
+ set
+ {
+ if ((this._InvoiceDate != value))
+ {
+ this.OnInvoiceDateChanging(value);
+ this.SendPropertyChanging();
+ this._InvoiceDate = value;
+ this.SendPropertyChanged("InvoiceDate");
+ this.OnInvoiceDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AmountExcludingTax", DbType="Decimal(18,2)")]
+ public System.Nullable AmountExcludingTax
+ {
+ get
+ {
+ return this._AmountExcludingTax;
+ }
+ set
+ {
+ if ((this._AmountExcludingTax != value))
+ {
+ this.OnAmountExcludingTaxChanging(value);
+ this.SendPropertyChanging();
+ this._AmountExcludingTax = value;
+ this.SendPropertyChanged("AmountExcludingTax");
+ this.OnAmountExcludingTaxChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTax", DbType="Decimal(18,2)")]
+ public System.Nullable TotalTax
+ {
+ get
+ {
+ return this._TotalTax;
+ }
+ set
+ {
+ if ((this._TotalTax != value))
+ {
+ this.OnTotalTaxChanging(value);
+ this.SendPropertyChanging();
+ this._TotalTax = value;
+ this.SendPropertyChanged("TotalTax");
+ this.OnTotalTaxChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(500)")]
+ public string Remark
+ {
+ get
+ {
+ return this._Remark;
+ }
+ set
+ {
+ if ((this._Remark != value))
+ {
+ this.OnRemarkChanging(value);
+ this.SendPropertyChanging();
+ this._Remark = value;
+ this.SendPropertyChanged("Remark");
+ this.OnRemarkChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ImagePath", DbType="NVarChar(500)")]
+ public string ImagePath
+ {
+ get
+ {
+ return this._ImagePath;
+ }
+ set
+ {
+ if ((this._ImagePath != value))
+ {
+ this.OnImagePathChanging(value);
+ this.SendPropertyChanging();
+ this._ImagePath = value;
+ this.SendPropertyChanged("ImagePath");
+ this.OnImagePathChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SellerTaxNumber", DbType="NVarChar(50)")]
+ public string SellerTaxNumber
+ {
+ get
+ {
+ return this._SellerTaxNumber;
+ }
+ set
+ {
+ if ((this._SellerTaxNumber != value))
+ {
+ this.OnSellerTaxNumberChanging(value);
+ this.SendPropertyChanging();
+ this._SellerTaxNumber = value;
+ this.SendPropertyChanged("SellerTaxNumber");
+ this.OnSellerTaxNumberChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InvoiceAmount", DbType="Decimal(18,2)")]
+ public System.Nullable InvoiceAmount
+ {
+ get
+ {
+ return this._InvoiceAmount;
+ }
+ set
+ {
+ if ((this._InvoiceAmount != value))
+ {
+ this.OnInvoiceAmountChanging(value);
+ this.SendPropertyChanging();
+ this._InvoiceAmount = value;
+ this.SendPropertyChanged("InvoiceAmount");
+ this.OnInvoiceAmountChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveManJson", DbType="NVarChar(2000)")]
+ public string ApproveManJson
+ {
+ get
+ {
+ return this._ApproveManJson;
+ }
+ set
+ {
+ if ((this._ApproveManJson != value))
+ {
+ this.OnApproveManJsonChanging(value);
+ this.SendPropertyChanging();
+ this._ApproveManJson = value;
+ this.SendPropertyChanged("ApproveManJson");
+ this.OnApproveManJsonChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateDate", DbType="DateTime")]
+ public System.Nullable CreateDate
+ {
+ get
+ {
+ return this._CreateDate;
+ }
+ set
+ {
+ if ((this._CreateDate != value))
+ {
+ this.OnCreateDateChanging(value);
+ this.SendPropertyChanging();
+ this._CreateDate = value;
+ this.SendPropertyChanged("CreateDate");
+ this.OnCreateDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateUser", DbType="NVarChar(50)")]
+ public string CreateUser
+ {
+ get
+ {
+ return this._CreateUser;
+ }
+ set
+ {
+ if ((this._CreateUser != value))
+ {
+ this.OnCreateUserChanging(value);
+ this.SendPropertyChanging();
+ this._CreateUser = value;
+ this.SendPropertyChanged("CreateUser");
+ this.OnCreateUserChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")]
+ public string ContractId
+ {
+ get
+ {
+ return this._ContractId;
+ }
+ set
+ {
+ if ((this._ContractId != value))
+ {
+ this.OnContractIdChanging(value);
+ this.SendPropertyChanging();
+ this._ContractId = value;
+ this.SendPropertyChanged("ContractId");
+ this.OnContractIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")]
+ public System.Nullable OrderInDate
+ {
+ get
+ {
+ return this._OrderInDate;
+ }
+ set
+ {
+ if ((this._OrderInDate != value))
+ {
+ this.OnOrderInDateChanging(value);
+ this.SendPropertyChanging();
+ this._OrderInDate = value;
+ this.SendPropertyChanged("OrderInDate");
+ this.OnOrderInDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")]
+ public string OrderCode
+ {
+ get
+ {
+ return this._OrderCode;
+ }
+ set
+ {
+ if ((this._OrderCode != value))
+ {
+ this.OnOrderCodeChanging(value);
+ this.SendPropertyChanging();
+ this._OrderCode = value;
+ this.SendPropertyChanged("OrderCode");
+ this.OnOrderCodeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")]
+ public System.Nullable OrderOutDate
+ {
+ get
+ {
+ return this._OrderOutDate;
+ }
+ set
+ {
+ if ((this._OrderOutDate != value))
+ {
+ this.OnOrderOutDateChanging(value);
+ this.SendPropertyChanging();
+ this._OrderOutDate = value;
+ this.SendPropertyChanged("OrderOutDate");
+ this.OnOrderOutDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")]
+ public string MaterialRequisitionUnit
+ {
+ get
+ {
+ return this._MaterialRequisitionUnit;
+ }
+ set
+ {
+ if ((this._MaterialRequisitionUnit != value))
+ {
+ this.OnMaterialRequisitionUnitChanging(value);
+ this.SendPropertyChanging();
+ this._MaterialRequisitionUnit = value;
+ this.SendPropertyChanged("MaterialRequisitionUnit");
+ this.OnMaterialRequisitionUnitChanged();
+ }
+ }
+ }
+
+ public event PropertyChangingEventHandler PropertyChanging;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void SendPropertyChanging()
+ {
+ if ((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, emptyChangingEventArgs);
+ }
+ }
+
+ protected virtual void SendPropertyChanged(String propertyName)
+ {
+ if ((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PHTGL_InvoiceDetail")]
+ public partial class PHTGL_InvoiceDetail : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _InvoiceDetailId;
+
+ private string _InvoiceId;
+
+ private string _GoodsOrServicesName;
+
+ private string _SpecificationModel;
+
+ private string _Unit;
+
+ private System.Nullable _Quantity;
+
+ private System.Nullable _UnitPrice;
+
+ private System.Nullable _Amount;
+
+ private string _TaxRate;
+
+ private System.Nullable _Tax;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnInvoiceDetailIdChanging(string value);
+ partial void OnInvoiceDetailIdChanged();
+ partial void OnInvoiceIdChanging(string value);
+ partial void OnInvoiceIdChanged();
+ partial void OnGoodsOrServicesNameChanging(string value);
+ partial void OnGoodsOrServicesNameChanged();
+ partial void OnSpecificationModelChanging(string value);
+ partial void OnSpecificationModelChanged();
+ partial void OnUnitChanging(string value);
+ partial void OnUnitChanged();
+ partial void OnQuantityChanging(System.Nullable value);
+ partial void OnQuantityChanged();
+ partial void OnUnitPriceChanging(System.Nullable value);
+ partial void OnUnitPriceChanged();
+ partial void OnAmountChanging(System.Nullable value);
+ partial void OnAmountChanged();
+ partial void OnTaxRateChanging(string value);
+ partial void OnTaxRateChanged();
+ partial void OnTaxChanging(System.Nullable value);
+ partial void OnTaxChanged();
+ #endregion
+
+ public PHTGL_InvoiceDetail()
+ {
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InvoiceDetailId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string InvoiceDetailId
+ {
+ get
+ {
+ return this._InvoiceDetailId;
+ }
+ set
+ {
+ if ((this._InvoiceDetailId != value))
+ {
+ this.OnInvoiceDetailIdChanging(value);
+ this.SendPropertyChanging();
+ this._InvoiceDetailId = value;
+ this.SendPropertyChanged("InvoiceDetailId");
+ this.OnInvoiceDetailIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InvoiceId", DbType="NVarChar(50)")]
+ public string InvoiceId
+ {
+ get
+ {
+ return this._InvoiceId;
+ }
+ set
+ {
+ if ((this._InvoiceId != value))
+ {
+ this.OnInvoiceIdChanging(value);
+ this.SendPropertyChanging();
+ this._InvoiceId = value;
+ this.SendPropertyChanged("InvoiceId");
+ this.OnInvoiceIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GoodsOrServicesName", DbType="NVarChar(100)")]
+ public string GoodsOrServicesName
+ {
+ get
+ {
+ return this._GoodsOrServicesName;
+ }
+ set
+ {
+ if ((this._GoodsOrServicesName != value))
+ {
+ this.OnGoodsOrServicesNameChanging(value);
+ this.SendPropertyChanging();
+ this._GoodsOrServicesName = value;
+ this.SendPropertyChanged("GoodsOrServicesName");
+ this.OnGoodsOrServicesNameChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecificationModel", DbType="NVarChar(100)")]
+ public string SpecificationModel
+ {
+ get
+ {
+ return this._SpecificationModel;
+ }
+ set
+ {
+ if ((this._SpecificationModel != value))
+ {
+ this.OnSpecificationModelChanging(value);
+ this.SendPropertyChanging();
+ this._SpecificationModel = value;
+ this.SendPropertyChanged("SpecificationModel");
+ this.OnSpecificationModelChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Unit", DbType="NVarChar(50)")]
+ public string Unit
+ {
+ get
+ {
+ return this._Unit;
+ }
+ set
+ {
+ if ((this._Unit != value))
+ {
+ this.OnUnitChanging(value);
+ this.SendPropertyChanging();
+ this._Unit = value;
+ this.SendPropertyChanged("Unit");
+ this.OnUnitChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quantity", DbType="Decimal(18,2)")]
+ public System.Nullable Quantity
+ {
+ get
+ {
+ return this._Quantity;
+ }
+ set
+ {
+ if ((this._Quantity != value))
+ {
+ this.OnQuantityChanging(value);
+ this.SendPropertyChanging();
+ this._Quantity = value;
+ this.SendPropertyChanged("Quantity");
+ this.OnQuantityChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitPrice", DbType="Decimal(18,2)")]
+ public System.Nullable UnitPrice
+ {
+ get
+ {
+ return this._UnitPrice;
+ }
+ set
+ {
+ if ((this._UnitPrice != value))
+ {
+ this.OnUnitPriceChanging(value);
+ this.SendPropertyChanging();
+ this._UnitPrice = value;
+ this.SendPropertyChanged("UnitPrice");
+ this.OnUnitPriceChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Amount", DbType="Decimal(18,2)")]
+ public System.Nullable Amount
+ {
+ get
+ {
+ return this._Amount;
+ }
+ set
+ {
+ if ((this._Amount != value))
+ {
+ this.OnAmountChanging(value);
+ this.SendPropertyChanging();
+ this._Amount = value;
+ this.SendPropertyChanged("Amount");
+ this.OnAmountChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TaxRate", DbType="NVarChar(50)")]
+ public string TaxRate
+ {
+ get
+ {
+ return this._TaxRate;
+ }
+ set
+ {
+ if ((this._TaxRate != value))
+ {
+ this.OnTaxRateChanging(value);
+ this.SendPropertyChanging();
+ this._TaxRate = value;
+ this.SendPropertyChanged("TaxRate");
+ this.OnTaxRateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Tax", DbType="Decimal(18,2)")]
+ public System.Nullable Tax
+ {
+ get
+ {
+ return this._Tax;
+ }
+ set
+ {
+ if ((this._Tax != value))
+ {
+ this.OnTaxChanging(value);
+ this.SendPropertyChanging();
+ this._Tax = value;
+ this.SendPropertyChanged("Tax");
+ this.OnTaxChanged();
+ }
+ }
+ }
+
+ public event PropertyChangingEventHandler PropertyChanging;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void SendPropertyChanging()
+ {
+ if ((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, emptyChangingEventArgs);
+ }
+ }
+
+ protected virtual void SendPropertyChanged(String propertyName)
+ {
+ if ((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PHTGL_MainProjectQuantity")]
public partial class PHTGL_MainProjectQuantity : INotifyPropertyChanging, INotifyPropertyChanged
{
@@ -295160,7 +296002,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")]
public string Name
{
get
@@ -295737,7 +296579,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
public string PackageContent
{
get
@@ -295928,7 +296770,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
public string PackageContent
{
get
@@ -301215,7 +302057,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
public string PackageContent
{
get
@@ -302687,7 +303529,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
public string PackageContent
{
get
@@ -312238,7 +313080,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(1500)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(500)")]
public string ContractNo
{
get
@@ -312258,7 +313100,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(1500)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(500)")]
public string UnitWorks
{
get
diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj
index d2e43c95..81b1185d 100644
--- a/SGGL/Model/Model.csproj
+++ b/SGGL/Model/Model.csproj
@@ -45,12 +45,16 @@
..\packages\EmitMapper.1.0.0\lib\EmitMapper.dll
+
+ ..\packages\MiniExcel.1.31.3\lib\net45\MiniExcel.dll
+
..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll
+
@@ -205,6 +209,11 @@
+
+
+
+
+
@@ -218,6 +227,9 @@
+
+
+