20230606新增费用申请页面、项目列表按活跃度排序
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"ExpandedNodes": [
|
||||
""
|
||||
],
|
||||
"SelectedNode": "\\SGGL.sln",
|
||||
"PreviewInSolutionExplorer": false
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
ALTER TABLE Technique_CheckItemDetail ALTER COLUMN CheckContent NVARCHAR(4000) NULL
|
||||
GO
|
||||
ALTER TABLE CostGoods_CostManageItem add SupCostTypeId NVARCHAR(50) NULL
|
||||
GO
|
||||
ALTER TABLE CostGoods_CostManageItem add SupCostTypeName NVARCHAR(50) NULL
|
||||
GO
|
||||
ALTER TABLE CostGoods_CostManageItem add SupSortIndex int NULL
|
||||
GO
|
||||
ALTER TABLE CostGoods_CostManageItem add CostTypeId NVARCHAR(50) NULL
|
||||
GO
|
||||
ALTER TABLE CostGoods_CostManageItem add CostTypeName NVARCHAR(50) NULL
|
||||
GO
|
||||
ALTER TABLE CostGoods_CostManageItem add SortIndex int NULL
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageItem', @level2type=N'COLUMN',@level2name=N'SupCostTypeId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageItem', @level2type=N'COLUMN',@level2name=N'SupCostTypeName'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别序号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageItem', @level2type=N'COLUMN',@level2name=N'SupSortIndex'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分项id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageItem', @level2type=N'COLUMN',@level2name=N'CostTypeId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分项名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageItem', @level2type=N'COLUMN',@level2name=N'CostTypeName'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分项序号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageItem', @level2type=N'COLUMN',@level2name=N'SortIndex'
|
||||
GO
|
||||
|
||||
ALTER TABLE CostGoods_CostManage add SumMoney decimal(18,2) NULL
|
||||
GO
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'总金额' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManage', @level2type=N'COLUMN',@level2name=N'SumMoney'
|
||||
GO
|
||||
|
||||
CREATE TABLE [dbo].[CostGoods_CostManageFlowOperate](
|
||||
[FlowOperateId] [nvarchar](50) NOT NULL,
|
||||
[CostManageId] [nvarchar](50) NULL,
|
||||
[AuditFlowName] [nvarchar](50) NULL,
|
||||
[SortIndex] [int] NULL,
|
||||
[UnitId] [nvarchar](50) NULL,
|
||||
[OperaterId] [nvarchar](50) NULL,
|
||||
[OperaterTime] [datetime] NULL,
|
||||
[IsAgree] [bit] NULL,
|
||||
[Opinion] [nvarchar](500) NULL,
|
||||
[IsClosed] [bit] NULL,
|
||||
CONSTRAINT [PK_CostGoods_CostManageFlowOperate] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[FlowOperateId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[CostGoods_CostManageFlowOperate] WITH CHECK ADD CONSTRAINT [FK_CostGoods_CostManageFlowOperate_Base_Unit] FOREIGN KEY([UnitId])
|
||||
REFERENCES [dbo].[Base_Unit] ([UnitId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[CostGoods_CostManageFlowOperate] CHECK CONSTRAINT [FK_CostGoods_CostManageFlowOperate_Base_Unit]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[CostGoods_CostManageFlowOperate] WITH CHECK ADD CONSTRAINT [FK_CostGoods_CostManageFlowOperate_CostGoods_CostManage] FOREIGN KEY([CostManageId])
|
||||
REFERENCES [dbo].[CostGoods_CostManage] ([CostManageId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[CostGoods_CostManageFlowOperate] CHECK CONSTRAINT [FK_CostGoods_CostManageFlowOperate_CostGoods_CostManage]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[CostGoods_CostManageFlowOperate] WITH CHECK ADD CONSTRAINT [FK_CostGoods_CostManageFlowOperate_Person_Persons] FOREIGN KEY([OperaterId])
|
||||
REFERENCES [dbo].[Person_Persons] ([PersonId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[CostGoods_CostManageFlowOperate] CHECK CONSTRAINT [FK_CostGoods_CostManageFlowOperate_Person_Persons]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageFlowOperate', @level2type=N'COLUMN',@level2name=N'FlowOperateId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主表ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageFlowOperate', @level2type=N'COLUMN',@level2name=N'CostManageId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageFlowOperate', @level2type=N'COLUMN',@level2name=N'AuditFlowName'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'序号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageFlowOperate', @level2type=N'COLUMN',@level2name=N'SortIndex'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核单位ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageFlowOperate', @level2type=N'COLUMN',@level2name=N'UnitId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核人ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageFlowOperate', @level2type=N'COLUMN',@level2name=N'OperaterId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageFlowOperate', @level2type=N'COLUMN',@level2name=N'OperaterTime'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否同意' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageFlowOperate', @level2type=N'COLUMN',@level2name=N'IsAgree'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核意见' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageFlowOperate', @level2type=N'COLUMN',@level2name=N'Opinion'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核完成' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageFlowOperate', @level2type=N'COLUMN',@level2name=N'IsClosed'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核流程表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManageFlowOperate'
|
||||
GO
|
||||
|
||||
CREATE TABLE [dbo].[Project_ProjectUnitItem](
|
||||
[ProjectUnitItemId] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NULL,
|
||||
[UnitId] [nvarchar](50) NULL,
|
||||
[ContractNum] [nvarchar](50) NULL,
|
||||
[TotalMoney] [decimal](18, 2) NULL,
|
||||
[HSEMoney] [decimal](18, 2) NULL,
|
||||
[CompileManId] [nvarchar](50) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
CONSTRAINT [PK_Project_ProjectUnitItem] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[ProjectUnitItemId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Project_ProjectUnitItem] WITH CHECK ADD CONSTRAINT [FK_Project_ProjectUnitItem_Base_Project] FOREIGN KEY([ProjectId])
|
||||
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Project_ProjectUnitItem] CHECK CONSTRAINT [FK_Project_ProjectUnitItem_Base_Project]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Project_ProjectUnitItem] WITH CHECK ADD CONSTRAINT [FK_Project_ProjectUnitItem_Base_Unit] FOREIGN KEY([UnitId])
|
||||
REFERENCES [dbo].[Base_Unit] ([UnitId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Project_ProjectUnitItem] CHECK CONSTRAINT [FK_Project_ProjectUnitItem_Base_Unit]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_ProjectUnitItem', @level2type=N'COLUMN',@level2name=N'ProjectUnitItemId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_ProjectUnitItem', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单位ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_ProjectUnitItem', @level2type=N'COLUMN',@level2name=N'UnitId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'合同号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_ProjectUnitItem', @level2type=N'COLUMN',@level2name=N'ContractNum'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'总金额' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_ProjectUnitItem', @level2type=N'COLUMN',@level2name=N'TotalMoney'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'HSE费用' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_ProjectUnitItem', @level2type=N'COLUMN',@level2name=N'HSEMoney'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_ProjectUnitItem', @level2type=N'COLUMN',@level2name=N'CompileManId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_ProjectUnitItem', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目单位明细表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_ProjectUnitItem'
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX [NonClusteredIndex-PersonId-RoleIds] ON [dbo].[SitePerson_Person]
|
||||
(
|
||||
[PersonId] ASC,
|
||||
[RoleIds] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
UPDATE Sys_Menu SET SortIndex=20,MenuName='HSE费用申请' WHERE MenuId='FF68C697-B058-4687-A98F-71C591650E02'
|
||||
GO
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('F1AE30A2-A210-4607-B39E-4DC8DEF02EB8','项目HSE费用汇总','HSSE/CostGoods/CostSummary.aspx',40,'20ECB69E-28C4-4FAC-941A-15F446AEB634','Menu_HSSE',0,1,1)
|
||||
GO
|
||||
DELETE FROM Sys_ButtonToMenu WHERE MenuId='0C311396-C859-40B0-9D72-6A8B20733002'
|
||||
GO
|
||||
DELETE FROM Sys_Menu WHERE MenuId='0C311396-C859-40B0-9D72-6A8B20733002'
|
||||
GO
|
||||
|
||||
|
||||
delete from Sys_Menu where MenuId in ('39EE4D09-D413-4C3E-B719-542B63AEA9ED','E1052483-2591-4408-92A4-14E85805BBA0')
|
||||
go
|
||||
@@ -0,0 +1,4 @@
|
||||
--ADD BY YangHongwei 2023-06-06
|
||||
1、新增分包费用申请功能页面。
|
||||
2、新增项目首页项目下拉框按照活跃度排序功能
|
||||
--END
|
||||
@@ -773,22 +773,7 @@ GO
|
||||
GO
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('0C311396-C859-40B0-9D72-6A8B20733002','安全费用支出','HSSE/CostGoods/CostSmallDetail.aspx',20,'20ECB69E-28C4-4FAC-941A-15F446AEB634','Menu_HSSE',0,1,1)
|
||||
GO
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('0350BD71-7C72-4483-90E3-A89908174FAA','0C311396-C859-40B0-9D72-6A8B20733002','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('67B1ED33-136C-4554-B21A-D11436E57A0E','0C311396-C859-40B0-9D72-6A8B20733002','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('CA54078C-F2EF-4C88-B222-8CA9A2FF6BD4','0C311396-C859-40B0-9D72-6A8B20733002','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('349D7D73-668D-4DC5-9087-DD5E5D1A1CBB','0C311396-C859-40B0-9D72-6A8B20733002','保存',4)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('9BF12C2D-6A82-4B5E-A358-AA2FED75A925','0C311396-C859-40B0-9D72-6A8B20733002','提交',5)
|
||||
GO
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('FF68C697-B058-4687-A98F-71C591650E02','分包商HSE费用申请','HSSE/CostGoods/CostManage.aspx',30,'20ECB69E-28C4-4FAC-941A-15F446AEB634','Menu_HSSE',0,1,1)
|
||||
VALUES('FF68C697-B058-4687-A98F-71C591650E02','HSE费用申请','HSSE/CostGoods/CostManage.aspx',20,'20ECB69E-28C4-4FAC-941A-15F446AEB634','Menu_HSSE',0,1,1)
|
||||
GO
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('878A7D17-D5DC-42DB-9C15-8613C31ADEBF','FF68C697-B058-4687-A98F-71C591650E02','增加',1)
|
||||
@@ -802,6 +787,26 @@ GO
|
||||
VALUES('26B751C0-3CD6-49EA-B1DD-FB0BC2FDEA88','FF68C697-B058-4687-A98F-71C591650E02','提交',5)
|
||||
GO
|
||||
|
||||
|
||||
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
--VALUES('0C311396-C859-40B0-9D72-6A8B20733002','安全费用支出','HSSE/CostGoods/CostSmallDetail.aspx',30,'20ECB69E-28C4-4FAC-941A-15F446AEB634','Menu_HSSE',0,1,1)
|
||||
--GO
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('0350BD71-7C72-4483-90E3-A89908174FAA','0C311396-C859-40B0-9D72-6A8B20733002','增加',1)
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('67B1ED33-136C-4554-B21A-D11436E57A0E','0C311396-C859-40B0-9D72-6A8B20733002','修改',2)
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('CA54078C-F2EF-4C88-B222-8CA9A2FF6BD4','0C311396-C859-40B0-9D72-6A8B20733002','删除',3)
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('349D7D73-668D-4DC5-9087-DD5E5D1A1CBB','0C311396-C859-40B0-9D72-6A8B20733002','保存',4)
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('9BF12C2D-6A82-4B5E-A358-AA2FED75A925','0C311396-C859-40B0-9D72-6A8B20733002','提交',5)
|
||||
--GO
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('F1AE30A2-A210-4607-B39E-4DC8DEF02EB8','项目HSE费用汇总','HSSE/CostGoods/CostSummary.aspx',40,'20ECB69E-28C4-4FAC-941A-15F446AEB634','Menu_HSSE',0,1,1)
|
||||
GO
|
||||
|
||||
--施工机具
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('28C8EDB9-F1C2-4287-8013-28A976B093E2','施工机具','',140,'0','Menu_HSSE',0,0,1)
|
||||
|
||||
@@ -71,12 +71,70 @@ namespace BLL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取费用类型下拉列表项
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="costTypeItemId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Base_CostTypeItem GetCostTypeItemById(string costTypeItemId)
|
||||
{
|
||||
return Funs.DB.Base_CostTypeItem.FirstOrDefault(e => e.CostTypeItemId == costTypeItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取费用类型下拉列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_CostType> GetCostTypeList()
|
||||
{
|
||||
return (from x in Funs.DB.Base_CostType orderby x.CostTypeCode select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取费用类型明细项下拉列表
|
||||
/// </summary>
|
||||
/// <param name="costTypeId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_CostTypeItem> GetCostTypeItemList(string costTypeId)
|
||||
{
|
||||
return (from x in Funs.DB.Base_CostTypeItem
|
||||
where x.CostTypeId == costTypeId
|
||||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 费用类型下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitCostTypeDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "CostTypeId";
|
||||
dropName.DataTextField = "CostTypeName";
|
||||
dropName.DataSource = GetCostTypeList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 费用类型下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitCostTypeItemDropDownList(FineUIPro.DropDownList dropName,string costTypeId, bool isShowPlease)
|
||||
{
|
||||
dropName.Items.Clear();
|
||||
dropName.DataValueField = "CostTypeItemId";
|
||||
dropName.DataTextField = "CostTypeItemName";
|
||||
dropName.DataSource = GetCostTypeItemList(costTypeId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,42 +32,32 @@ namespace BLL
|
||||
return (from x in Funs.DB.CostGoods_CostManageItem where x.CostManageId == costManageId select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目Id,单位Id和月份获取安全费用管理明细
|
||||
/// </summary>
|
||||
/// <param name="costManageId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.CostGoods_CostManageItem> GetCostManageItemByUnitIdAndDate(string projectId, string unidId, DateTime date)
|
||||
{
|
||||
return (from x in Funs.DB.CostGoods_CostManageItem
|
||||
join y in Funs.DB.CostGoods_CostManage
|
||||
on x.CostManageId equals y.CostManageId
|
||||
where y.ProjectId == projectId && y.UnitId == unidId
|
||||
&& y.CostManageDate.Value.Year == date.Year && y.CostManageDate.Value.Month == date.Month
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加费用管理明细
|
||||
/// </summary>
|
||||
/// <param name="costManageItem"></param>
|
||||
public static void AddCostManageItem(Model.CostGoods_CostManageItem costManageItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CostGoods_CostManageItem newCostManageItem = new Model.CostGoods_CostManageItem
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
CostManageItemId = costManageItem.CostManageItemId,
|
||||
CostManageId = costManageItem.CostManageId,
|
||||
InvestCostProject = costManageItem.InvestCostProject,
|
||||
UseReason = costManageItem.UseReason,
|
||||
Counts = costManageItem.Counts,
|
||||
PriceMoney = costManageItem.PriceMoney,
|
||||
AuditCounts = costManageItem.AuditCounts,
|
||||
AuditPriceMoney = costManageItem.AuditPriceMoney,
|
||||
Remark = costManageItem.Remark
|
||||
};
|
||||
db.CostGoods_CostManageItem.InsertOnSubmit(newCostManageItem);
|
||||
db.SubmitChanges();
|
||||
Model.CostGoods_CostManageItem newCostManageItem = new Model.CostGoods_CostManageItem
|
||||
{
|
||||
CostManageItemId = costManageItem.CostManageItemId,
|
||||
CostManageId = costManageItem.CostManageId,
|
||||
InvestCostProject = costManageItem.InvestCostProject,
|
||||
PriceMoney = costManageItem.PriceMoney,
|
||||
SupCostTypeId = costManageItem.SupCostTypeId,
|
||||
SupCostTypeName = costManageItem.SupCostTypeName,
|
||||
SupSortIndex = costManageItem.SupSortIndex,
|
||||
CostTypeId = costManageItem.CostTypeId,
|
||||
CostTypeName = costManageItem.CostTypeName,
|
||||
SortIndex = costManageItem.SortIndex,
|
||||
};
|
||||
|
||||
db.CostGoods_CostManageItem.InsertOnSubmit(newCostManageItem);
|
||||
db.SubmitChanges();
|
||||
CostManageService.UpdateSumMoney(newCostManageItem.CostManageId);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -76,19 +66,23 @@ namespace BLL
|
||||
/// <param name="costManageItem"></param>
|
||||
public static void UpdateCostManageItem(Model.CostGoods_CostManageItem costManageItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CostGoods_CostManageItem newCostManageItem = db.CostGoods_CostManageItem.FirstOrDefault(e => e.CostManageItemId == costManageItem.CostManageItemId);
|
||||
if (newCostManageItem != null)
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
newCostManageItem.CostManageId = costManageItem.CostManageId;
|
||||
newCostManageItem.InvestCostProject = costManageItem.InvestCostProject;
|
||||
newCostManageItem.UseReason = costManageItem.UseReason;
|
||||
newCostManageItem.Counts = costManageItem.Counts;
|
||||
newCostManageItem.PriceMoney = costManageItem.PriceMoney;
|
||||
newCostManageItem.AuditCounts = costManageItem.AuditCounts;
|
||||
newCostManageItem.AuditPriceMoney = costManageItem.AuditPriceMoney;
|
||||
newCostManageItem.Remark = costManageItem.Remark;
|
||||
db.SubmitChanges();
|
||||
Model.CostGoods_CostManageItem newCostManageItem = db.CostGoods_CostManageItem.FirstOrDefault(e => e.CostManageItemId == costManageItem.CostManageItemId);
|
||||
if (newCostManageItem != null)
|
||||
{
|
||||
newCostManageItem.InvestCostProject = costManageItem.InvestCostProject;
|
||||
newCostManageItem.PriceMoney = costManageItem.PriceMoney;
|
||||
newCostManageItem.SupCostTypeId = costManageItem.SupCostTypeId;
|
||||
newCostManageItem.SupCostTypeName = costManageItem.SupCostTypeName;
|
||||
newCostManageItem.SupSortIndex = costManageItem.SupSortIndex;
|
||||
newCostManageItem.CostTypeId = costManageItem.CostTypeId;
|
||||
newCostManageItem.CostTypeName = costManageItem.CostTypeName;
|
||||
newCostManageItem.SortIndex = costManageItem.SortIndex;
|
||||
db.SubmitChanges();
|
||||
|
||||
CostManageService.UpdateSumMoney(newCostManageItem.CostManageId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,12 +92,16 @@ namespace BLL
|
||||
/// <param name="costManageId"></param>
|
||||
public static void DeleteCostManageItemByCostManageId(string costManageId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.CostGoods_CostManageItem where x.CostManageId == costManageId select x).ToList();
|
||||
if (q != null)
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
db.CostGoods_CostManageItem.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
var q = (from x in db.CostGoods_CostManageItem where x.CostManageId == costManageId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
db.CostGoods_CostManageItem.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
CostManageService.UpdateSumMoney(costManageId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,67 +111,17 @@ namespace BLL
|
||||
/// <param name="costManageItemId"></param>
|
||||
public static void DeleteCostManageItemById(string costManageItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CostGoods_CostManageItem costManageItem = db.CostGoods_CostManageItem.FirstOrDefault(e => e.CostManageItemId == costManageItemId);
|
||||
if (costManageItem != null)
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
db.CostGoods_CostManageItem.DeleteOnSubmit(costManageItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
Model.CostGoods_CostManageItem costManageItem = db.CostGoods_CostManageItem.FirstOrDefault(e => e.CostManageItemId == costManageItemId);
|
||||
if (costManageItem != null)
|
||||
{
|
||||
db.CostGoods_CostManageItem.DeleteOnSubmit(costManageItem);
|
||||
db.SubmitChanges();
|
||||
|
||||
/// <summary>
|
||||
/// 投入费用项目下拉框内容
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetInvestCostProjectList()
|
||||
{
|
||||
ListItem[] lis = new ListItem[29];
|
||||
lis[0] = new ListItem("内业管理", "内业管理");
|
||||
lis[1] = new ListItem("检测器材", "检测器材");
|
||||
lis[2] = new ListItem("警示警戒", "警示警戒");
|
||||
lis[3] = new ListItem("安全奖励", "安全奖励");
|
||||
lis[4] = new ListItem("其他", "其他");
|
||||
lis[5] = new ListItem("安全技术", "安全技术");
|
||||
lis[6] = new ListItem("工业卫生", "工业卫生");
|
||||
lis[7] = new ListItem("安全用电", "安全用电");
|
||||
lis[8] = new ListItem("高处作业及基坑", "高处作业及基坑");
|
||||
lis[9] = new ListItem("临边洞口防护", "临边洞口防护");
|
||||
lis[10] = new ListItem("受限空间内作业", "受限空间内作业");
|
||||
lis[11] = new ListItem("动火作业", "动火作业");
|
||||
lis[12] = new ListItem("机械装备防护", "机械装备防护");
|
||||
lis[13] = new ListItem("吊装运输和起重", "吊装运输和起重");
|
||||
lis[14] = new ListItem("硼砂作业", "硼砂作业");
|
||||
lis[15] = new ListItem("拆除工程", "拆除工程");
|
||||
lis[16] = new ListItem("试压试车与有害介质作业", "试压试车与有害介质作业");
|
||||
lis[17] = new ListItem("特种作业防护", "特种作业防护");
|
||||
lis[18] = new ListItem("应急管理", "应急管理");
|
||||
lis[19] = new ListItem("非常措施", "非常措施");
|
||||
lis[20] = new ListItem("其他安全措施", "其他安全措施");
|
||||
lis[21] = new ListItem("装置区封闭管理", "装置区封闭管理");
|
||||
lis[22] = new ListItem("防爆施工器具", "防爆施工器具");
|
||||
lis[23] = new ListItem("标识标签与锁定", "标识标签与锁定");
|
||||
lis[24] = new ListItem("关键场所封闭", "关键场所封闭");
|
||||
lis[25] = new ListItem("催化剂加装还原", "催化剂加装还原");
|
||||
lis[26] = new ListItem("联动和化工试车", "联动和化工试车");
|
||||
lis[27] = new ListItem("教育培训", "教育培训");
|
||||
lis[28] = new ListItem("防护控制和排放", "防护控制和排放");
|
||||
return lis;
|
||||
}
|
||||
|
||||
public static decimal? GetCostsByUnitId(string unitId, DateTime startTime, DateTime endTime)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.CostGoods_CostManageItem
|
||||
join y in db.CostGoods_CostManage
|
||||
on x.CostManageId equals y.CostManageId
|
||||
where y.UnitId == unitId && y.States == BLL.Const.State_2 && y.CostManageDate >= startTime && y.CostManageDate < endTime
|
||||
select x).ToList();
|
||||
if (q.Count > 0)
|
||||
{
|
||||
return q.Sum(e => (e.AuditCounts * e.AuditPriceMoney));
|
||||
CostManageService.UpdateSumMoney(costManageItem.CostManageId);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,8 @@
|
||||
using System;
|
||||
using Microsoft.SqlServer.Dts.Runtime;
|
||||
using Model;
|
||||
using NPOI.SS.UserModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
@@ -21,13 +25,26 @@ namespace BLL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目Id,单位Id和月份获取安全费用管理
|
||||
/// 获取 已支付的HSE费用
|
||||
/// </summary>
|
||||
/// <param name="costManageId"></param>
|
||||
/// <param name="ProjectId"></param>
|
||||
/// <param name="UnitId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.CostGoods_CostManage GetCostManageByUnitIdAndDate(string projectId, string unidId, DateTime date)
|
||||
public static decimal GetSumHSECost(string ProjectId, string UnitId, string costManageId )
|
||||
{
|
||||
return Funs.DB.CostGoods_CostManage.FirstOrDefault(e => e.CostManageId == projectId && e.UnitId == unidId && e.CostManageDate.Value.Year == date.Year && e.CostManageDate.Value.Month == date.Month);
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
decimal sumCost = 0;
|
||||
var getData = from x in db.CostGoods_CostManage
|
||||
where x.ProjectId == ProjectId && x.UnitId == UnitId && x.States == Const.State_2 && x.CostManageId != costManageId
|
||||
select x;
|
||||
if (getData.Count() > 0)
|
||||
{
|
||||
sumCost = getData.Sum(x => x.SumMoney ?? 0);
|
||||
}
|
||||
|
||||
return sumCost;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -36,26 +53,32 @@ namespace BLL
|
||||
/// <param name="costManage"></param>
|
||||
public static void AddCostManage(Model.CostGoods_CostManage costManage)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CostGoods_CostManage newCostManage = new Model.CostGoods_CostManage
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
CostManageId = costManage.CostManageId,
|
||||
ProjectId = costManage.ProjectId,
|
||||
CostManageCode = costManage.CostManageCode,
|
||||
CostManageName = costManage.CostManageName,
|
||||
UnitId = costManage.UnitId,
|
||||
ContractNum = costManage.ContractNum,
|
||||
CostManageDate = costManage.CostManageDate,
|
||||
Opinion = costManage.Opinion,
|
||||
SubCN = costManage.SubCN,
|
||||
SubHSE = costManage.SubHSE,
|
||||
SubProject = costManage.SubProject,
|
||||
States = costManage.States,
|
||||
CompileMan = costManage.CompileMan,
|
||||
CompileDate = costManage.CompileDate
|
||||
};
|
||||
db.CostGoods_CostManage.InsertOnSubmit(newCostManage);
|
||||
db.SubmitChanges();
|
||||
Model.CostGoods_CostManage newCostManage = new Model.CostGoods_CostManage
|
||||
{
|
||||
CostManageId = costManage.CostManageId,
|
||||
ProjectId = costManage.ProjectId,
|
||||
CostManageCode = costManage.CostManageCode,
|
||||
CostManageName = costManage.CostManageName,
|
||||
UnitId = costManage.UnitId,
|
||||
ContractNum = costManage.ContractNum,
|
||||
CostManageDate = costManage.CostManageDate,
|
||||
Opinion = costManage.Opinion,
|
||||
SubCN = costManage.SubCN,
|
||||
SubHSE = costManage.SubHSE,
|
||||
SubProject = costManage.SubProject,
|
||||
States = costManage.States,
|
||||
CompileMan = costManage.CompileMan,
|
||||
CompileDate = costManage.CompileDate
|
||||
};
|
||||
|
||||
db.CostGoods_CostManage.InsertOnSubmit(newCostManage);
|
||||
db.SubmitChanges();
|
||||
|
||||
AddCostManageFlowOperate(newCostManage);
|
||||
}
|
||||
|
||||
CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectCostManageMenuId, costManage.ProjectId, null, costManage.CostManageId, costManage.CompileDate);
|
||||
}
|
||||
|
||||
@@ -65,24 +88,25 @@ namespace BLL
|
||||
/// <param name="costManage"></param>
|
||||
public static void UpdateCostManage(Model.CostGoods_CostManage costManage)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CostGoods_CostManage newCostManage = db.CostGoods_CostManage.FirstOrDefault(e => e.CostManageId == costManage.CostManageId);
|
||||
if (newCostManage != null)
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
//newCostManage.ProjectId = costManage.ProjectId;
|
||||
newCostManage.CostManageCode = costManage.CostManageCode;
|
||||
newCostManage.CostManageName = costManage.CostManageName;
|
||||
newCostManage.UnitId = costManage.UnitId;
|
||||
newCostManage.ContractNum = costManage.ContractNum;
|
||||
newCostManage.CostManageDate = costManage.CostManageDate;
|
||||
newCostManage.Opinion = costManage.Opinion;
|
||||
newCostManage.SubCN = costManage.SubCN;
|
||||
newCostManage.SubHSE = costManage.SubHSE;
|
||||
newCostManage.SubProject = costManage.SubProject;
|
||||
newCostManage.States = costManage.States;
|
||||
newCostManage.CompileMan = costManage.CompileMan;
|
||||
newCostManage.CompileDate = costManage.CompileDate;
|
||||
db.SubmitChanges();
|
||||
Model.CostGoods_CostManage newCostManage = db.CostGoods_CostManage.FirstOrDefault(e => e.CostManageId == costManage.CostManageId);
|
||||
if (newCostManage != null)
|
||||
{
|
||||
//newCostManage.ProjectId = costManage.ProjectId;
|
||||
newCostManage.CostManageName = costManage.CostManageName;
|
||||
newCostManage.UnitId = costManage.UnitId;
|
||||
newCostManage.ContractNum = costManage.ContractNum;
|
||||
newCostManage.CostManageDate = costManage.CostManageDate;
|
||||
newCostManage.Opinion = costManage.Opinion;
|
||||
newCostManage.SubCN = costManage.SubCN;
|
||||
newCostManage.SubHSE = costManage.SubHSE;
|
||||
newCostManage.SubProject = costManage.SubProject;
|
||||
newCostManage.States = costManage.States;
|
||||
newCostManage.CompileMan = costManage.CompileMan;
|
||||
newCostManage.CompileDate = costManage.CompileDate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,16 +116,254 @@ namespace BLL
|
||||
/// <param name="costManageId"></param>
|
||||
public static void DeleteCostManageById(string costManageId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CostGoods_CostManage costManage = db.CostGoods_CostManage.FirstOrDefault(e => e.CostManageId == costManageId);
|
||||
if (costManage != null)
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
CodeRecordsService.DeleteCodeRecordsByDataId(costManageId);//删除编号
|
||||
ProjectDataFlowSetService.DeleteFlowSetByDataId(costManageId);//删除流程
|
||||
CommonService.DeleteFlowOperateByID(costManageId); //删除审核流程
|
||||
CommonService.DeleteAttachFileById(costManageId);//删除附件
|
||||
db.CostGoods_CostManage.DeleteOnSubmit(costManage);
|
||||
db.SubmitChanges();
|
||||
var costManage = db.CostGoods_CostManage.FirstOrDefault(e => e.CostManageId == costManageId);
|
||||
if (costManage != null)
|
||||
{
|
||||
deleteCostManageFlowOperate(costManageId);
|
||||
CommonService.DeleteAttachFileById(costManageId);//删除附件
|
||||
db.CostGoods_CostManage.DeleteOnSubmit(costManage);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按照明细取当前单据总费用
|
||||
/// </summary>
|
||||
/// <param name="costManageId"></param>
|
||||
public static void UpdateSumMoney(string costManageId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var costManage = db.CostGoods_CostManage.FirstOrDefault(e => e.CostManageId == costManageId);
|
||||
if (costManage != null)
|
||||
{
|
||||
decimal sumC = 0;
|
||||
var getItems = db.CostGoods_CostManageItem.Where(x => x.CostManageId == costManageId);
|
||||
if (getItems.Count() > 0)
|
||||
{
|
||||
sumC = getItems.Sum(x => x.PriceMoney ?? 0);
|
||||
}
|
||||
costManage.SumMoney = sumC;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表ID获取审核列表
|
||||
/// </summary>
|
||||
/// <param name="costManageId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.CostGoods_CostManageFlowOperate> getCostManageFlowOperateList(string costManageId)
|
||||
{
|
||||
return (from x in Funs.DB.CostGoods_CostManageFlowOperate
|
||||
where x.CostManageId == costManageId
|
||||
orderby x.SortIndex
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前步骤审核人
|
||||
/// </summary>
|
||||
/// <param name="costManageId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.CostGoods_CostManageFlowOperate getNowCostManageFlowOperateList(string costManageId)
|
||||
{
|
||||
var getAllNoClose = Funs.DB.CostGoods_CostManageFlowOperate.Where(x => x.CostManageId == costManageId && (x.IsClosed == null || x.IsClosed == false));
|
||||
if (getAllNoClose.Count() > 0)
|
||||
{
|
||||
var minSortIndex = getAllNoClose.Min(x => x.SortIndex) ?? 0;
|
||||
return getAllNoClose.FirstOrDefault(x => x.SortIndex == minSortIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取下一步审核人
|
||||
/// </summary>
|
||||
/// <param name="costManageId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.CostGoods_CostManageFlowOperate getNextCostManageFlowOperateList(string costManageId,string operaterId)
|
||||
{
|
||||
int minSortIndex = 1;
|
||||
var getAllNoClose = Funs.DB.CostGoods_CostManageFlowOperate.Where(x => x.CostManageId == costManageId && (x.IsClosed == null || x.IsClosed == false));
|
||||
if (getAllNoClose.Count() > 0)
|
||||
{
|
||||
var getFlowOperate = getAllNoClose.Where(x => x.OperaterId == operaterId);
|
||||
if (getFlowOperate.Count() > 0)
|
||||
{
|
||||
minSortIndex = (getFlowOperate.Min(x => x.SortIndex) ?? 0) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
minSortIndex = getAllNoClose.Min(x => x.SortIndex) ?? 1;
|
||||
}
|
||||
|
||||
return getAllNoClose.FirstOrDefault(x => x.SortIndex == minSortIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据新增费用申请表 自动生成审核流程表
|
||||
/// </summary>
|
||||
public static void AddCostManageFlowOperate(Model.CostGoods_CostManage costManage)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.CostGoods_CostManageFlowOperate> flowList = new List<CostGoods_CostManageFlowOperate>();
|
||||
/// 施工单位
|
||||
if (ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(costManage.ProjectId, costManage.UnitId))
|
||||
{
|
||||
string cUnitId = Const.UnitId_SEDIN;
|
||||
var getUnit = db.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == costManage.ProjectId && x.UnitType == Const.ProjectUnitType_1);
|
||||
if (getUnit != null && !string.IsNullOrEmpty(getUnit.UnitId))
|
||||
{
|
||||
cUnitId = getUnit.UnitId;
|
||||
}
|
||||
|
||||
//// 分包单位项目经理审批、总包单位HSE经理审核、总包单位项目控制经理审核、总包单位项目经理审批
|
||||
var Flow1 = new CostGoods_CostManageFlowOperate()
|
||||
{
|
||||
FlowOperateId = SQLHelper.GetNewID(),
|
||||
CostManageId = costManage.CostManageId,
|
||||
AuditFlowName = "分包单位项目经理审批",
|
||||
SortIndex = 1,
|
||||
UnitId = costManage.UnitId,
|
||||
IsClosed = false,
|
||||
};
|
||||
flowList.Add(Flow1);
|
||||
|
||||
var Flow2 = new CostGoods_CostManageFlowOperate()
|
||||
{
|
||||
FlowOperateId = SQLHelper.GetNewID(),
|
||||
CostManageId = costManage.CostManageId,
|
||||
AuditFlowName = "总包单位HSE经理审核",
|
||||
SortIndex = 2,
|
||||
UnitId = cUnitId,
|
||||
IsClosed = false,
|
||||
};
|
||||
flowList.Add(Flow2);
|
||||
|
||||
var Flow3 = new CostGoods_CostManageFlowOperate()
|
||||
{
|
||||
FlowOperateId = SQLHelper.GetNewID(),
|
||||
CostManageId = costManage.CostManageId,
|
||||
AuditFlowName = "总包单位项目控制经理审核",
|
||||
SortIndex = 3,
|
||||
UnitId = cUnitId,
|
||||
IsClosed = false,
|
||||
};
|
||||
flowList.Add(Flow3);
|
||||
|
||||
var Flow4 = new CostGoods_CostManageFlowOperate()
|
||||
{
|
||||
FlowOperateId = SQLHelper.GetNewID(),
|
||||
CostManageId = costManage.CostManageId,
|
||||
AuditFlowName = "总包单位项目经理审批",
|
||||
SortIndex = 4,
|
||||
UnitId = cUnitId,
|
||||
IsClosed = false,
|
||||
};
|
||||
flowList.Add(Flow4);
|
||||
|
||||
}
|
||||
else ///非施工单位
|
||||
{
|
||||
////安全工程师发起、安全经理审核、项目经理批准
|
||||
var Flow1 = new CostGoods_CostManageFlowOperate()
|
||||
{
|
||||
FlowOperateId = SQLHelper.GetNewID(),
|
||||
CostManageId = costManage.CostManageId,
|
||||
AuditFlowName = "安全经理审核",
|
||||
SortIndex = 1,
|
||||
UnitId = costManage.UnitId,
|
||||
IsClosed = false,
|
||||
};
|
||||
flowList.Add(Flow1);
|
||||
|
||||
var Flow2 = new CostGoods_CostManageFlowOperate()
|
||||
{
|
||||
FlowOperateId = SQLHelper.GetNewID(),
|
||||
CostManageId = costManage.CostManageId,
|
||||
AuditFlowName = "项目经理批准",
|
||||
SortIndex = 2,
|
||||
UnitId = costManage.UnitId,
|
||||
IsClosed = false,
|
||||
};
|
||||
|
||||
flowList.Add(Flow2);
|
||||
}
|
||||
|
||||
if (flowList.Count() > 0)
|
||||
{
|
||||
db.CostGoods_CostManageFlowOperate.InsertAllOnSubmit(flowList);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 审核意见更新
|
||||
/// </summary>
|
||||
/// <param name="flow"></param>
|
||||
public static void updateCostManageFlowOperate(Model.CostGoods_CostManageFlowOperate flow)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getData = db.CostGoods_CostManageFlowOperate.FirstOrDefault(x => x.FlowOperateId == flow.FlowOperateId);
|
||||
if (getData != null)
|
||||
{
|
||||
getData.OperaterId = flow.OperaterId;
|
||||
getData.OperaterTime = flow.OperaterTime;
|
||||
getData.IsAgree = flow.IsAgree;
|
||||
getData.Opinion = flow.Opinion;
|
||||
getData.IsClosed = flow.IsClosed;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 所以关闭步骤 打开
|
||||
/// </summary>
|
||||
/// <param name="flow"></param>
|
||||
public static void updateOpenCostManageFlowOperate(string costManageId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getDatas = db.CostGoods_CostManageFlowOperate.Where(x => x.CostManageId == costManageId && x.IsClosed==true);
|
||||
foreach ( var item in getDatas)
|
||||
{
|
||||
item.IsClosed= false;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="costMangeId"></param>
|
||||
public static void deleteCostManageFlowOperate(string costManageId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getData = db.CostGoods_CostManageFlowOperate.Where(x => x.CostManageId == costManageId);
|
||||
if (getData.Count() > 0)
|
||||
{
|
||||
db.CostGoods_CostManageFlowOperate.DeleteAllOnSubmit(getData);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -466,21 +466,24 @@ namespace BLL
|
||||
IQueryable<Model.SpSysUserItem> users = null;
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
var getSitepersons = from x in db.SitePerson_Person
|
||||
join p in db.Person_Persons on x.PersonId equals p.PersonId
|
||||
where x.ProjectId == projectId && x.States == Const.State_1 && x.RoleIds != null && p.Account != null
|
||||
select x;
|
||||
List<Model.SpSysUserItem> returUsers = new List<Model.SpSysUserItem>();
|
||||
List<Model.SitePerson_Person> getPUser = new List<Model.SitePerson_Person>();
|
||||
if (!string.IsNullOrEmpty(unitId))
|
||||
{
|
||||
getPUser = (from x in db.SitePerson_Person
|
||||
/// 为啥 有单位id 还判断单位类型
|
||||
/// (u.UnitId == unitId || u.UnitType == BLL.Const.ProjectUnitType_1 || u.UnitType == BLL.Const.ProjectUnitType_3 || u.UnitType == BLL.Const.ProjectUnitType_4)
|
||||
getPUser = (from x in getSitepersons
|
||||
join u in db.Project_ProjectUnit on new { x.ProjectId, x.UnitId } equals new { u.ProjectId, u.UnitId }
|
||||
where x.ProjectId == projectId && (u.UnitId == unitId || u.UnitType == BLL.Const.ProjectUnitType_1 || u.UnitType == BLL.Const.ProjectUnitType_3 || u.UnitType == BLL.Const.ProjectUnitType_4)
|
||||
&& x.States == Const.State_1
|
||||
where x.UnitId == unitId
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
getPUser = (from x in db.SitePerson_Person
|
||||
where x.ProjectId == projectId && x.States == Const.State_1
|
||||
select x).ToList();
|
||||
getPUser = getSitepersons.ToList();
|
||||
}
|
||||
|
||||
if (getPUser.Count() > 0)
|
||||
@@ -509,7 +512,7 @@ namespace BLL
|
||||
{
|
||||
users = (from x in db.Person_Persons
|
||||
join z in db.Sys_Role on x.RoleIds equals z.RoleId
|
||||
where (x.IsPost == true || !x.IsPost.HasValue) && x.UnitId == unitId
|
||||
where (x.IsPost == true || !x.IsPost.HasValue) && x.UnitId == unitId && x.Account != null && x.RoleIds != null
|
||||
orderby x.JobNum
|
||||
select new Model.SpSysUserItem
|
||||
{
|
||||
@@ -521,7 +524,7 @@ namespace BLL
|
||||
{
|
||||
users = (from x in db.Person_Persons
|
||||
join z in db.Sys_Role on x.RoleIds equals z.RoleId
|
||||
where (x.IsPost == true || !x.IsPost.HasValue)
|
||||
where (x.IsPost == true || !x.IsPost.HasValue) && x.Account != null && x.RoleIds != null
|
||||
orderby x.JobNum
|
||||
select new Model.SpSysUserItem
|
||||
{
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
namespace BLL
|
||||
{
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
public static class ProjectService
|
||||
{
|
||||
@@ -272,31 +274,85 @@
|
||||
orderby x.ProjectCode descending
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
List<Model.Base_Project> getLists = new List<Model.Base_Project>();
|
||||
var getUser = Person_PersonsService.GetPerson_PersonsById(userId);
|
||||
if (getUser != null)
|
||||
if (getUser != null && !string.IsNullOrEmpty(getUser.Account))
|
||||
{
|
||||
List<string> roleidList = Funs.GetStrListByStr(getUser.RoleIds, ',');
|
||||
/// 获取角色类型
|
||||
var getRoleP = Funs.DB.Sys_RolePower.FirstOrDefault(x => roleidList.Contains(x.RoleId) && x.IsOffice == false);
|
||||
if (getRoleP != null)
|
||||
//List<string> roleidList = Funs.GetStrListByStr(getUser.RoleIds, ',');
|
||||
///// 获取角色类型
|
||||
//var getRoleP = Funs.DB.Sys_RolePower.FirstOrDefault(x => roleidList.Contains(x.RoleId) && x.IsOffice == false);
|
||||
if (getUser.IsOffice == true)
|
||||
{
|
||||
return (from x in Funs.DB.Base_Project
|
||||
where x.ProjectState == null || x.ProjectState == BLL.Const.ProjectState_1
|
||||
orderby x.ProjectCode descending
|
||||
select x).ToList();
|
||||
getLists = (from x in Funs.DB.Base_Project
|
||||
where x.ProjectState == null || x.ProjectState == BLL.Const.ProjectState_1
|
||||
orderby x.ProjectCode descending
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
return (from x in Funs.DB.Base_Project
|
||||
join y in Funs.DB.SitePerson_Person on x.ProjectId equals y.ProjectId
|
||||
where x.ProjectState == null || x.ProjectState == BLL.Const.ProjectState_1 && y.PersonId == userId
|
||||
orderby x.ProjectCode descending
|
||||
select x).ToList();
|
||||
var getProjectIdList = Funs.DB.SitePerson_Person.Where(x => x.PersonId == userId && x.RoleIds != null).Select(x => x.ProjectId);
|
||||
if (getProjectIdList.Count() > 0)
|
||||
{
|
||||
getLists = (from x in Funs.DB.Base_Project
|
||||
where x.ProjectState == null || x.ProjectState == BLL.Const.ProjectState_1 && getProjectIdList.Contains(x.ProjectId)
|
||||
orderby x.ProjectCode descending
|
||||
select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
return getLists;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取userId参与项目下拉框 -- 按操作频率排序
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_Project> GetSortIndexProjectByUserIdDropDownList(string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
return null;
|
||||
IQueryable<Model.Base_Project> getProjects = null;
|
||||
getProjects = from x in db.Base_Project
|
||||
where x.ProjectState == null || x.ProjectState == BLL.Const.ProjectState_1
|
||||
select x;
|
||||
|
||||
if (userId != Const.sysglyId && userId != Const.hfnbdId && userId != Const.sedinId)
|
||||
{
|
||||
var getUser = Person_PersonsService.GetPerson_PersonsById(userId);
|
||||
if (getUser != null && !string.IsNullOrEmpty(getUser.Account))
|
||||
{
|
||||
//List<string> roleidList = Funs.GetStrListByStr(getUser.RoleIds, ',');
|
||||
///// 获取角色类型
|
||||
//var getRoleP = db.Sys_RolePower.FirstOrDefault(x => roleidList.Contains(x.RoleId) && x.IsOffice == false);
|
||||
if (getUser.IsOffice != true)
|
||||
{
|
||||
var getProjectIdList = db.SitePerson_Person.Where(x => x.PersonId == userId && x.RoleIds != null).Select(x => x.ProjectId);
|
||||
if (getProjectIdList.Count() > 0)
|
||||
{
|
||||
getProjects = getProjects.Where(x => getProjectIdList.Contains(x.ProjectId));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var pcount = from x in db.Sys_Log
|
||||
where x.ProjectId != null && x.OperationTime > DateTime.Now.AddDays(-3)
|
||||
group x by x.ProjectId into g
|
||||
select new { g.First().ProjectId, count = g.Count() };
|
||||
|
||||
List<Model.Base_Project> getList = new List<Base_Project>();
|
||||
if (getProjects.Count() > 0)
|
||||
{
|
||||
getList = (from x in getProjects
|
||||
join y in pcount on x.ProjectId equals y.ProjectId into PP
|
||||
from p in PP.DefaultIfEmpty()
|
||||
orderby p.count descending
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
return getList;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -195,5 +195,113 @@
|
||||
orderby x.UnitType, y.UnitCode
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
#region 项目单位费用明细
|
||||
/// <summary>
|
||||
///获取项目单位信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static Model.Project_ProjectUnitItem GetProjectUnitItemById(string ProjectUnitItemId)
|
||||
{
|
||||
return Funs.DB.Project_ProjectUnitItem.FirstOrDefault(e => e.ProjectUnitItemId == ProjectUnitItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ProjectId"></param>
|
||||
/// <param name="UnitId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Project_ProjectUnitItem> GetProjectUnitItemList(string ProjectId, string UnitId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getData = from x in db.Project_ProjectUnitItem where x.ProjectId == ProjectId && x.UnitId == UnitId select x;
|
||||
return getData.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取 总HSE费用
|
||||
/// </summary>
|
||||
/// <param name="ProjectId"></param>
|
||||
/// <param name="UnitId"></param>
|
||||
/// <returns></returns>
|
||||
public static decimal GetSumHSECost(string ProjectId, string UnitId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
decimal sumCost = 0;
|
||||
var getData = from x in db.Project_ProjectUnitItem where x.ProjectId == ProjectId && x.UnitId == UnitId select x;
|
||||
if (getData.Count() > 0)
|
||||
{
|
||||
sumCost = getData.Sum(x => x.HSEMoney ?? 0);
|
||||
}
|
||||
return sumCost;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加项目单位信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static void AddProjectUnitItem(Project_ProjectUnitItem projectUnit)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Project_ProjectUnitItem newProjectUnit = new Project_ProjectUnitItem
|
||||
{
|
||||
ProjectUnitItemId = SQLHelper.GetNewID(),
|
||||
ProjectId = projectUnit.ProjectId,
|
||||
UnitId = projectUnit.UnitId,
|
||||
ContractNum = projectUnit.ContractNum,
|
||||
TotalMoney = projectUnit.TotalMoney,
|
||||
HSEMoney = projectUnit.HSEMoney,
|
||||
CompileManId = projectUnit.CompileManId,
|
||||
CompileDate = projectUnit.CompileDate,
|
||||
};
|
||||
|
||||
db.Project_ProjectUnitItem.InsertOnSubmit(newProjectUnit);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///修改项目单位信息
|
||||
/// </summary>
|
||||
/// <param name="projectUnit"></param>
|
||||
public static void UpdateProjectUnitItem(Model.Project_ProjectUnitItem projectUnit)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Project_ProjectUnitItem newProjectUnit = db.Project_ProjectUnitItem.FirstOrDefault(e => e.ProjectUnitItemId == projectUnit.ProjectUnitItemId);
|
||||
if (newProjectUnit != null)
|
||||
{
|
||||
newProjectUnit.ContractNum = projectUnit.ContractNum;
|
||||
newProjectUnit.TotalMoney = projectUnit.TotalMoney;
|
||||
newProjectUnit.HSEMoney = projectUnit.HSEMoney;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目单位Id删除一个项目单位信息
|
||||
/// </summary>
|
||||
/// <param name="projectUnitId"></param>
|
||||
public static void DeleteProjectUnitItemById(string ProjectUnitItemId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Project_ProjectUnitItem delProjectUnit = db.Project_ProjectUnitItem.FirstOrDefault(e => e.ProjectUnitItemId == ProjectUnitItemId);
|
||||
if (delProjectUnit != null)
|
||||
{
|
||||
db.Project_ProjectUnitItem.DeleteOnSubmit(delProjectUnit);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全事故" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="安全事故(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ID" DataIDField="ID" AllowSorting="true"
|
||||
SortField="ProjectCode,AccidentDate" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全监督检查" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="安全监督检查(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ID" DataIDField="ID" AllowSorting="true"
|
||||
SortField="CheckDate" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="企业总部人员" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="企业总部人员(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="PersonId" DataIDField="PersonId" AllowSorting="true"
|
||||
SortField="PersonName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="施工机具" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="施工机具(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ID" DataIDField="ID" AllowSorting="true"
|
||||
SortField="ProjectCode,SizeModel" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="教育培训" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="教育培训(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="TrainingId" DataIDField="TrainingId" AllowSorting="true"
|
||||
SortField="ProjectCode,TrainStartDate" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<Tabs>
|
||||
<f:Tab ID="Tab1" Title="应急预案" BodyPadding="5px" Layout="VBox" IconFont="Bookmark" runat="server">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="应急预案" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="应急预案(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="EmergencyListId" DataIDField="EmergencyListId" AllowSorting="true"
|
||||
SortField="CompileDate" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
@@ -103,7 +103,7 @@
|
||||
</f:Tab>
|
||||
<f:Tab ID="Tab3" Title="应急演练" BodyPadding="5px" Layout="Fit" IconFont="Bookmark" runat="server">
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="应急演练" EnableCollapse="true"
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="true" Title="应急演练(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="DrillRecordListId" DataIDField="DrillRecordListId" AllowSorting="true"
|
||||
SortField="DrillRecordDate" SortDirection="DESC" OnSort="Grid2_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid2_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="环保数据" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="环保数据(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ID" DataIDField="ID" AllowSorting="true"
|
||||
SortField="M" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="缺陷分析" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="缺陷分析(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ID" DataIDField="ID" AllowSorting="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊工" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="焊工(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="WED_ID" DataIDField="WED_ID" AllowSorting="true"
|
||||
SortField="ProjectCode,UnitName,PersonName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊接数据" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="焊接数据(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊接数据" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="焊接数据(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="WeldJointId" DataIDField="WeldJointId" AllowSorting="true"
|
||||
SortField="WeldJointCode" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="隐患排查" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="隐患排查(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="隐患排查" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="隐患排查(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="HazardRegisterId" DataIDField="HazardRegisterId" AllowSorting="true"
|
||||
SortField="RectificationTime" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true" EnableTextSelection="True">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="危大工程" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="危大工程(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="危大工程" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="危大工程(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="HazardId" DataIDField="HazardId" AllowSorting="true"
|
||||
SortField="RecordTime" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link href="~/res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script src="~/Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<title>施工机具</title>
|
||||
<title>作业许可</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="施工机具" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="作业许可(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="LicenseManagerId" DataIDField="LicenseManagerId" AllowSorting="true"
|
||||
SortField="CompileDate" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="会议" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="安全会议(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ID" DataIDField="ID" AllowSorting="true"
|
||||
SortField="MeetingDate" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="项目" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="项目信息(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="工程划分" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="工程划分(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="项目人员" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="项目人员(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="SitePersonId" DataIDField="SitePersonId" AllowSorting="true"
|
||||
SortField="ProjectCode,UnitName,PersonName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="质量验收" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="质量验收(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ID" DataIDField="ID" AllowSorting="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="质量控制点" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="质量控制点(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="计量器具" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="计量器具(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="计量器具" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="计量器具(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="InspectionMachineId" DataIDField="InspectionMachineId" AllowSorting="true"
|
||||
SortField="InspectionDate" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true" EnableTextSelection="True">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="质量人员" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="质量人员(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="PersonId" DataIDField="PersonId" AllowSorting="true"
|
||||
SortField="ProjectName,UnitName, PersonName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="质量问题" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="质量问题(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="质量问题" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="质量问题(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="CheckControlCode" DataIDField="CheckControlCode" AllowSorting="true"
|
||||
SortField="CheckDate" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true" EnableTextSelection="True">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="质量培训" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="质量培训(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="质量培训" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="质量培训(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="InspectionPersonId" DataIDField="InspectionPersonId" AllowSorting="true"
|
||||
SortField="CompileDate" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true" EnableTextSelection="True">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="质量培训" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="质量培训(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="DesignDetailsId" DataIDField="DesignDetailsId" AllowSorting="true"
|
||||
SortField="DetailsDate" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true" EnableTextSelection="True">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全费用" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="安全费用(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="CostSmallDetailId" DataIDField="CostSmallDetailId" AllowSorting="true"
|
||||
SortField="Months" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全风险" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="安全风险(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全工时" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="安全工时(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="HazardSelectedItemId" DataIDField="HazardSelectedItemId" AllowSorting="true"
|
||||
SortField="IdentificationDate" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true" EnableTextSelection="True">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全工时" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="安全工时(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true"
|
||||
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="安全工时" EnableCollapse="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="项目安全工时(赛鼎工程有限公司)" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="DayReportId" DataIDField="DayReportId" AllowSorting="true"
|
||||
SortField="CompileDate" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true" EnableTextSelection="True">
|
||||
@@ -33,7 +33,7 @@
|
||||
<f:DatePicker ID="txtEndTime" runat="server" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
|
||||
Width="130px">
|
||||
</f:DatePicker>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" Text="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
@@ -46,16 +46,16 @@
|
||||
<asp:Label ID="labNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="150px" ColumnID="CompileDate" DataField="CompileDate" SortField="CompileDate"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="日期"
|
||||
HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="tfWorkTime" Width="200px" HeaderText="当日人工时" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblWorkTime" runat="server" Text='<%# ConvertPersonWorkTimeSum(Eval("DayReportId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="150px" ColumnID="CompileDate" DataField="CompileDate" SortField="CompileDate"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="日期"
|
||||
HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="tfWorkTime" Width="200px" HeaderText="当日人工时" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblWorkTime" runat="server" Text='<%# ConvertPersonWorkTimeSum(Eval("DayReportId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
@@ -76,7 +76,7 @@
|
||||
<script type="text/javascript">
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
// F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
// F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,223 +0,0 @@
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:NotSupportedException
|
||||
错误信息:方法“Boolean IsNullOrEmpty(System.String)”不支持转换为 SQL。
|
||||
错误堆栈:
|
||||
在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.TranslateStringStaticMethod(SqlMethodCall mc)
|
||||
在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitMethodCall(SqlMethodCall mc)
|
||||
在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node)
|
||||
在 System.Data.Linq.SqlClient.SqlVisitor.VisitExpression(SqlExpression exp)
|
||||
在 System.Data.Linq.SqlClient.SqlVisitor.VisitUnaryOperator(SqlUnary uo)
|
||||
在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitUnaryOperator(SqlUnary uo)
|
||||
在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node)
|
||||
在 System.Data.Linq.SqlClient.SqlVisitor.VisitExpression(SqlExpression exp)
|
||||
在 System.Data.Linq.SqlClient.SqlVisitor.VisitBinaryOperator(SqlBinary bo)
|
||||
在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitBinaryOperator(SqlBinary bo)
|
||||
在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node)
|
||||
在 System.Data.Linq.SqlClient.SqlVisitor.VisitExpression(SqlExpression exp)
|
||||
在 System.Data.Linq.SqlClient.SqlVisitor.VisitBinaryOperator(SqlBinary bo)
|
||||
在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitBinaryOperator(SqlBinary bo)
|
||||
在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node)
|
||||
在 System.Data.Linq.SqlClient.SqlVisitor.VisitExpression(SqlExpression exp)
|
||||
在 System.Data.Linq.SqlClient.SqlVisitor.VisitSelectCore(SqlSelect select)
|
||||
在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Visitor.VisitSelect(SqlSelect select)
|
||||
在 System.Data.Linq.SqlClient.SqlVisitor.Visit(SqlNode node)
|
||||
在 System.Data.Linq.SqlClient.PostBindDotNetConverter.Convert(SqlNode node, SqlFactory sql, ProviderMode providerMode)
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.BuildQuery(ResultShape resultShape, Type resultType, SqlNode node, ReadOnlyCollection`1 parentParameters, SqlNodeAnnotations annotations)
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.BuildQuery(Expression query, SqlNodeAnnotations annotations)
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
|
||||
在 System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
|
||||
在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
|
||||
在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
|
||||
在 FineUIPro.Web.ZHGL.Plan.MainContractEdit.Page_Load(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\ZHGL\Plan\MainContractEdit.aspx.cs:行号 72
|
||||
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
|
||||
在 System.EventHandler.Invoke(Object sender, EventArgs e)
|
||||
在 System.Web.UI.Control.OnLoad(EventArgs e)
|
||||
在 System.Web.UI.Control.LoadRecursive()
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:06/05/2023 11:15:20
|
||||
出错文件:http://localhost:14646/ZHGL/Plan/MainContractEdit.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:06/05/2023 11:15:20
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:HttpCompileException
|
||||
错误信息:e:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\ZHGL\Plan\ProjectPlanEdit.aspx(118): error CS1061: “ASP.zhgl_plan_projectplanedit_aspx”不包含“ddlPageSize_SelectedIndexChanged”的定义,并且找不到可接受类型为“ASP.zhgl_plan_projectplanedit_aspx”的第一个参数的扩展方法“ddlPageSize_SelectedIndexChanged”(是否缺少 using 指令或程序集引用?)
|
||||
错误堆栈:
|
||||
在 System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)
|
||||
在 System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode, Boolean ensureIsUpToDate)
|
||||
在 System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath, Boolean ensureIsUpToDate)
|
||||
在 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
|
||||
在 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
|
||||
在 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
|
||||
在 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
|
||||
在 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
|
||||
在 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
|
||||
在 System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
|
||||
在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
|
||||
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
|
||||
出错时间:06/05/2023 15:21:11
|
||||
出错文件:http://localhost:14646/ZHGL/Plan/ProjectPlanEdit.aspx
|
||||
IP地址:::1
|
||||
|
||||
出错时间:06/05/2023 15:21:11
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:ArgumentException
|
||||
错误信息:空文件名是非法的。
|
||||
参数名: sourceFileName
|
||||
错误堆栈:
|
||||
在 System.IO.File.Copy(String sourceFileName, String destFileName)
|
||||
在 FineUIPro.Web.ZHGL.Plan.MainContract.Grid1_RowCommand(Object sender, GridCommandEventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\ZHGL\Plan\MainContract.aspx.cs:行号 371
|
||||
在 FineUIPro.Grid.OnRowCommand(GridCommandEventArgs e)
|
||||
在 (Grid , GridCommandEventArgs )
|
||||
在 FineUIPro.Grid.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:06/05/2023 20:03:01
|
||||
出错文件:http://localhost:14646/ZHGL/Plan/MainContract.aspx
|
||||
IP地址:::1
|
||||
操作人员:王志亮
|
||||
|
||||
出错时间:06/05/2023 20:03:01
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:ArgumentException
|
||||
错误信息:空文件名是非法的。
|
||||
参数名: sourceFileName
|
||||
错误堆栈:
|
||||
在 System.IO.File.Copy(String sourceFileName, String destFileName)
|
||||
在 FineUIPro.Web.ZHGL.Plan.MainContract.Grid1_RowCommand(Object sender, GridCommandEventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\ZHGL\Plan\MainContract.aspx.cs:行号 371
|
||||
在 FineUIPro.Grid.OnRowCommand(GridCommandEventArgs e)
|
||||
在 (Grid , GridCommandEventArgs )
|
||||
在 FineUIPro.Grid.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:06/05/2023 20:03:06
|
||||
出错文件:http://localhost:14646/ZHGL/Plan/MainContract.aspx
|
||||
IP地址:::1
|
||||
操作人员:王志亮
|
||||
|
||||
出错时间:06/05/2023 20:03:06
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:HttpException
|
||||
错误信息:服务器无法在发送 HTTP 标头之后设置内容类型。
|
||||
错误堆栈:
|
||||
在 System.Web.HttpResponse.set_ContentType(String value)
|
||||
在 (HttpResponse , String )
|
||||
在 xCmAQBtUiwmKoGvxhPONMYvYbMln.jcLvABeDsHQyyAbZhsfaLCMRNprM()
|
||||
在 (xCmAQBtUiwmKoGvxhPONMYvYbMln )
|
||||
在 xCmAQBtUiwmKoGvxhPONMYvYbMln.jcLvABeDsHQyyAbZhsfaLCMRNprM(Object , EventArgs )
|
||||
在 System.Web.UI.Page.OnPreRenderComplete(EventArgs e)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:06/05/2023 20:07:48
|
||||
出错文件:http://localhost:14646/ZHGL/Plan/MainContract.aspx
|
||||
IP地址:::1
|
||||
操作人员:王志亮
|
||||
|
||||
出错时间:06/05/2023 20:07:48
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:HttpException
|
||||
错误信息:服务器无法在发送 HTTP 标头之后设置内容类型。
|
||||
错误堆栈:
|
||||
在 System.Web.HttpResponse.set_ContentType(String value)
|
||||
在 (HttpResponse , String )
|
||||
在 xCmAQBtUiwmKoGvxhPONMYvYbMln.jcLvABeDsHQyyAbZhsfaLCMRNprM()
|
||||
在 (xCmAQBtUiwmKoGvxhPONMYvYbMln )
|
||||
在 xCmAQBtUiwmKoGvxhPONMYvYbMln.jcLvABeDsHQyyAbZhsfaLCMRNprM(Object , EventArgs )
|
||||
在 System.Web.UI.Page.OnPreRenderComplete(EventArgs e)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:06/05/2023 20:12:29
|
||||
出错文件:http://localhost:14646/ZHGL/Plan/MainContract.aspx
|
||||
IP地址:::1
|
||||
操作人员:王志亮
|
||||
|
||||
出错时间:06/05/2023 20:12:29
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:HttpException
|
||||
错误信息:服务器无法在发送 HTTP 标头之后设置内容类型。
|
||||
错误堆栈:
|
||||
在 System.Web.HttpResponse.set_ContentType(String value)
|
||||
在 (HttpResponse , String )
|
||||
在 xCmAQBtUiwmKoGvxhPONMYvYbMln.jcLvABeDsHQyyAbZhsfaLCMRNprM()
|
||||
在 (xCmAQBtUiwmKoGvxhPONMYvYbMln )
|
||||
在 xCmAQBtUiwmKoGvxhPONMYvYbMln.jcLvABeDsHQyyAbZhsfaLCMRNprM(Object , EventArgs )
|
||||
在 System.Web.UI.Page.OnPreRenderComplete(EventArgs e)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:06/05/2023 20:16:08
|
||||
出错文件:http://localhost:14646/ZHGL/Plan/MainContract.aspx
|
||||
IP地址:::1
|
||||
操作人员:王志亮
|
||||
|
||||
出错时间:06/05/2023 20:16:08
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:HttpException
|
||||
错误信息:服务器无法在发送 HTTP 标头之后设置内容类型。
|
||||
错误堆栈:
|
||||
在 System.Web.HttpResponse.set_ContentType(String value)
|
||||
在 (HttpResponse , String )
|
||||
在 xCmAQBtUiwmKoGvxhPONMYvYbMln.jcLvABeDsHQyyAbZhsfaLCMRNprM()
|
||||
在 (xCmAQBtUiwmKoGvxhPONMYvYbMln )
|
||||
在 xCmAQBtUiwmKoGvxhPONMYvYbMln.jcLvABeDsHQyyAbZhsfaLCMRNprM(Object , EventArgs )
|
||||
在 System.Web.UI.Page.OnPreRenderComplete(EventArgs e)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:06/05/2023 20:17:29
|
||||
出错文件:http://localhost:14646/ZHGL/Plan/MainContract.aspx
|
||||
IP地址:::1
|
||||
操作人员:王志亮
|
||||
|
||||
出错时间:06/05/2023 20:17:29
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:HttpException
|
||||
错误信息:服务器无法在发送 HTTP 标头之后设置内容类型。
|
||||
错误堆栈:
|
||||
在 System.Web.HttpResponse.set_ContentType(String value)
|
||||
在 (HttpResponse , String )
|
||||
在 xCmAQBtUiwmKoGvxhPONMYvYbMln.jcLvABeDsHQyyAbZhsfaLCMRNprM()
|
||||
在 (xCmAQBtUiwmKoGvxhPONMYvYbMln )
|
||||
在 xCmAQBtUiwmKoGvxhPONMYvYbMln.jcLvABeDsHQyyAbZhsfaLCMRNprM(Object , EventArgs )
|
||||
在 System.Web.UI.Page.OnPreRenderComplete(EventArgs e)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:06/05/2023 20:20:05
|
||||
出错文件:http://localhost:14646/ZHGL/Plan/MainContract.aspx
|
||||
IP地址:::1
|
||||
操作人员:王志亮
|
||||
|
||||
出错时间:06/05/2023 20:20:05
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:HttpException
|
||||
错误信息:服务器无法在发送 HTTP 标头之后设置内容类型。
|
||||
错误堆栈:
|
||||
在 System.Web.HttpResponse.set_ContentType(String value)
|
||||
在 (HttpResponse , String )
|
||||
在 xCmAQBtUiwmKoGvxhPONMYvYbMln.jcLvABeDsHQyyAbZhsfaLCMRNprM()
|
||||
在 (xCmAQBtUiwmKoGvxhPONMYvYbMln )
|
||||
在 xCmAQBtUiwmKoGvxhPONMYvYbMln.jcLvABeDsHQyyAbZhsfaLCMRNprM(Object , EventArgs )
|
||||
在 System.Web.UI.Page.OnPreRenderComplete(EventArgs e)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:06/05/2023 20:24:09
|
||||
出错文件:http://localhost:14646/ZHGL/Plan/MainContract.aspx
|
||||
IP地址:::1
|
||||
操作人员:王志亮
|
||||
|
||||
出错时间:06/05/2023 20:24:09
|
||||
|
||||
|
||||
@@ -113,17 +113,17 @@
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI, Version=1.2.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DotNetCore.NPOI.Core.1.2.3\lib\net461\NPOI.dll</HintPath>
|
||||
<Reference Include="NPOI">
|
||||
<HintPath>..\FineUIPro\Reference BLL\NPOI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OOXML, Version=1.2.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DotNetCore.NPOI.1.2.3\lib\net461\NPOI.OOXML.dll</HintPath>
|
||||
<Reference Include="NPOI.OOXML">
|
||||
<HintPath>..\FineUIPro\Reference BLL\NPOI.OOXML.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OpenXml4Net, Version=1.2.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DotNetCore.NPOI.OpenXml4Net.1.2.3\lib\net461\NPOI.OpenXml4Net.dll</HintPath>
|
||||
<Reference Include="NPOI.OpenXml4Net">
|
||||
<HintPath>..\FineUIPro\Reference BLL\NPOI.OpenXml4Net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OpenXmlFormats, Version=1.2.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DotNetCore.NPOI.OpenXmlFormats.1.2.3\lib\net461\NPOI.OpenXmlFormats.dll</HintPath>
|
||||
<Reference Include="NPOI.OpenXmlFormats">
|
||||
<HintPath>..\FineUIPro\Reference BLL\NPOI.OpenXmlFormats.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RestSharp, Version=106.15.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll</HintPath>
|
||||
@@ -321,6 +321,7 @@
|
||||
<Content Include="common\Menu_PDigData.xml" />
|
||||
<Content Include="common\Menu_Person.xml" />
|
||||
<Content Include="common\Menu_PHTGL.xml" />
|
||||
<Content Include="common\Menu_PPerson.xml" />
|
||||
<Content Include="common\Menu_ProjectSet.xml" />
|
||||
<Content Include="common\Menu_PZHGL.xml" />
|
||||
<Content Include="common\Menu_SmartSite.xml" />
|
||||
@@ -774,12 +775,15 @@
|
||||
<Content Include="HSSE\Check\ShowCheckItem.aspx" />
|
||||
<Content Include="HSSE\Check\ShowCompletedDate.aspx" />
|
||||
<Content Include="HSSE\CostGoods\CostManage.aspx" />
|
||||
<Content Include="HSSE\CostGoods\CostManageAudit.aspx" />
|
||||
<Content Include="HSSE\CostGoods\CostManageEdit.aspx" />
|
||||
<Content Include="HSSE\CostGoods\CostManageItemEdit.aspx" />
|
||||
<Content Include="HSSE\CostGoods\CostManageView.aspx" />
|
||||
<Content Include="HSSE\CostGoods\CostSmallDetail.aspx" />
|
||||
<Content Include="HSSE\CostGoods\CostSmallDetailEdit.aspx" />
|
||||
<Content Include="HSSE\CostGoods\CostSmallDetailView.aspx" />
|
||||
<Content Include="HSSE\CostGoods\CostSummary.aspx" />
|
||||
<Content Include="HSSE\CostGoods\CostSummaryUnit.aspx" />
|
||||
<Content Include="HSSE\CostGoods\ExpenseUnit.aspx" />
|
||||
<Content Include="HSSE\CostGoods\ExpenseEdit.aspx" />
|
||||
<Content Include="HSSE\CostGoods\ExpenseView.aspx" />
|
||||
@@ -9100,7 +9104,6 @@
|
||||
</Compile>
|
||||
<Compile Include="HSSE\ActionPlan\ProjectManageRuleView.aspx.cs">
|
||||
<DependentUpon>ProjectManageRuleView.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\ActionPlan\ProjectManageRuleView.aspx.designer.cs">
|
||||
<DependentUpon>ProjectManageRuleView.aspx</DependentUpon>
|
||||
@@ -9350,6 +9353,13 @@
|
||||
<Compile Include="HSSE\CostGoods\CostManage.aspx.designer.cs">
|
||||
<DependentUpon>CostManage.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\CostGoods\CostManageAudit.aspx.cs">
|
||||
<DependentUpon>CostManageAudit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\CostGoods\CostManageAudit.aspx.designer.cs">
|
||||
<DependentUpon>CostManageAudit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\CostGoods\CostManageEdit.aspx.cs">
|
||||
<DependentUpon>CostManageEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -9392,6 +9402,20 @@
|
||||
<Compile Include="HSSE\CostGoods\CostSmallDetailView.aspx.designer.cs">
|
||||
<DependentUpon>CostSmallDetailView.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\CostGoods\CostSummary.aspx.cs">
|
||||
<DependentUpon>CostSummary.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\CostGoods\CostSummary.aspx.designer.cs">
|
||||
<DependentUpon>CostSummary.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\CostGoods\CostSummaryUnit.aspx.cs">
|
||||
<DependentUpon>CostSummaryUnit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\CostGoods\CostSummaryUnit.aspx.designer.cs">
|
||||
<DependentUpon>CostSummaryUnit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\CostGoods\ExpenseUnit.aspx.cs">
|
||||
<DependentUpon>ExpenseUnit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -8,92 +8,106 @@
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="HSE费用申请表" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="CostManageId"
|
||||
DataIDField="CostManageId" AllowSorting="true" SortField="CostManageCode" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Text="新增" Icon="Add" EnablePostBack="false" Hidden="true"
|
||||
runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="120px" ColumnID="CostManageCode" DataField="CostManageCode"
|
||||
SortField="CostManageCode" FieldType="String" HeaderText="编号" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="CostManageName" DataField="CostManageName"
|
||||
SortField="CostManageName" FieldType="String" HeaderText="名称" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="250px" ColumnID="UnitName" DataField="UnitName"
|
||||
SortField="UnitName" FieldType="String" HeaderText="分包商" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="CostManageDate" DataField="CostManageDate"
|
||||
SortField="CostManageDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderText="申请时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="FlowOperateName" DataField="FlowOperateName"
|
||||
SortField="FlowOperateName" FieldType="String" HeaderText="状态" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<%-- <f:WindowField TextAlign="Left" Width="80px" WindowID="WindowAtt" HeaderText="附件"
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="HSE费用申请表" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="CostManageId" ForceFit="true"
|
||||
DataIDField="CostManageId" AllowSorting="true" SortField="CostManageDate" SortDirection="DESC"
|
||||
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:RadioButtonList runat="server" ID="rblState" Label="状态" LabelWidth="60px"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="rblState_SelectedIndexChanged" AutoColumnWidth="true" >
|
||||
<f:RadioItem Selected="true" Text="全部" Value="-1" />
|
||||
<f:RadioItem Text="待提交" Value="0" />
|
||||
<f:RadioItem Text="审核中" Value="1" />
|
||||
<f:RadioItem Text="已完成" Value="2" />
|
||||
</f:RadioButtonList>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Text="新增" Icon="Add" EnablePostBack="false" Hidden="true"
|
||||
runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="250px" ColumnID="UnitName" DataField="UnitName" FieldType="String"
|
||||
HeaderText="单位名称" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="ContractNum" DataField="ContractNum" FieldType="String"
|
||||
HeaderText="合同编号" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="SumMoney" DataField="SumMoney" FieldType="Double"
|
||||
HeaderText="本次申请费用(元)" HeaderTextAlign="Center" TextAlign="Right">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="CostManageDate" DataField="CostManageDate"
|
||||
SortField="CostManageDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderText="申请时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="CompileManName" DataField="CompileManName" FieldType="String"
|
||||
HeaderText="申请人" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="StatesName" DataField="StatesName"
|
||||
FieldType="String" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:TemplateField Width="180px" ColumnID="OperateName" HeaderText="办理人" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbOperateName" runat="server" Text='<%# ConvertOperateName(Eval("CostManageId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<%-- <f:WindowField TextAlign="Left" Width="80px" WindowID="WindowAtt" HeaderText="附件"
|
||||
Text="详细" ToolTip="附件上传查看" DataIFrameUrlFields="CostManageId" DataIFrameUrlFormatString="~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CostManageAttachUrl&menuId=FF68C697-B058-4687-A98F-71C591650E02"
|
||||
IFrameUrl="~/alert.aspx" HeaderTextAlign="Center" />--%>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="分包HSE费用管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1100px"
|
||||
Height="650px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="附件" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="Pencil" EnablePostBack="true"
|
||||
Hidden="true" runat="server" Text="编辑">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
Hidden="true" Icon="Delete" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server"
|
||||
Text="删除">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="分包HSE费用管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1200px" OnClose="Window1_Close"
|
||||
Height="650px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="附件" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="Pencil" EnablePostBack="true"
|
||||
Hidden="true" runat="server" Text="编辑">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnView" EnablePostBack="true" runat="server"
|
||||
Text="查看" Icon="Find" OnClick="btnView_Click">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
Hidden="true" Icon="Delete" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server"
|
||||
Text="删除">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
@@ -106,6 +120,8 @@
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -54,48 +54,37 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @" SELECT CostManage.CostManageId, "
|
||||
+ @" CostManage.ProjectId,"
|
||||
+ @" CodeRecords.Code AS CostManageCode,"
|
||||
+ @" CostManage.CostManageName,"
|
||||
+ @" CostManage.UnitId,"
|
||||
+ @" CostManage.ContractNum,"
|
||||
+ @" CostManage.CostManageDate,"
|
||||
+ @" CostManage.Opinion,"
|
||||
+ @" CostManage.SubHSE,"
|
||||
+ @" CostManage.SubCN,"
|
||||
+ @" CostManage.SubProject,"
|
||||
+ @" CostManage.States,"
|
||||
+ @" CostManage.CompileMan,"
|
||||
+ @" CostManage.CompileDate,"
|
||||
+ @" Unit.UnitName,"
|
||||
+ @" (CASE WHEN CostManage.States = " + BLL.Const.State_0 + " OR CostManage.States IS NULL THEN '待['+OperateUser.PersonName+']提交' WHEN CostManage.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.PersonName+']办理' END) AS FlowOperateName"
|
||||
+ @" FROM CostGoods_CostManage AS CostManage "
|
||||
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON CostManage.CostManageId = CodeRecords.DataId "
|
||||
+ @" LEFT JOIN Sys_FlowOperate AS FlowOperate ON CostManage.CostManageId = FlowOperate.DataId AND FlowOperate.IsClosed <> 1"
|
||||
+ @" LEFT JOIN Person_Persons AS OperateUser ON FlowOperate.OperaterId = OperateUser.PersonId"
|
||||
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = CostManage.UnitId"
|
||||
+ @" LEFT JOIN Person_Persons AS Users ON CostManage.CompileMan = Users.PersonId WHERE 1=1 ";
|
||||
string strSql = @" SELECT CostManage.CostManageId, CostManage.ProjectId,CostManage.UnitId,Unit.UnitName,CostManage.ContractNum,CostManage.CostManageDate,
|
||||
CostManage.States,(CASE WHEN CostManage.States =1 THEN '审核中' WHEN CostManage.States =2 THEN '已完成' ELSE '待提交' END) AS StatesName,
|
||||
CostManage.CompileMan,Users.PersonName AS CompileManName,CostManage.CompileDate,CostManage.SumMoney
|
||||
FROM CostGoods_CostManage AS CostManage
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = CostManage.UnitId
|
||||
LEFT JOIN Person_Persons AS Users ON CostManage.CompileMan = Users.PersonId WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND CostManage.ProjectId = @ProjectId";
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
||||
strSql += " AND CostManage.States = @States"; ///状态为已完成
|
||||
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
|
||||
}
|
||||
else
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
}
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
strSql += " AND CostManage.UnitId = @UnitId"; ///状态为已完成
|
||||
listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId));
|
||||
}
|
||||
|
||||
if (this.rblState.SelectedValue != "-1")
|
||||
{
|
||||
if (this.rblState.SelectedValue == Const.State_0)
|
||||
{
|
||||
strSql += " AND (CostManage.States IS NULL OR CostManage.States = @States)"; ///状态为已完成
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql += " AND CostManage.States = @States"; ///状态为已完成
|
||||
}
|
||||
listStr.Add(new SqlParameter("@States", this.rblState.SelectedValue));
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
@@ -167,17 +156,21 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Grid1.SelectedRowID;
|
||||
var costManage = BLL.CostManageService.GetCostManageById(id);
|
||||
var costManage = CostManageService.GetCostManageById(Grid1.SelectedRowID);
|
||||
if (costManage != null)
|
||||
{
|
||||
if (this.btnMenuEdit.Hidden || costManage.States == BLL.Const.State_2) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||
var getNowFlow = CostManageService.getNowCostManageFlowOperateList(costManage.CostManageId);
|
||||
if (costManage.States == Const.State_1 && getNowFlow != null && getNowFlow.OperaterId == this.CurrUser.PersonId)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CostManageView.aspx?CostManageId={0}", id, "查看 - ")));
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CostManageAudit.aspx?CostManageId={0}", costManage.CostManageId, "编辑 - ")));
|
||||
}
|
||||
else if ((costManage.States == Const.State_0 || string.IsNullOrEmpty(costManage.States)) && !this.btnMenuEdit.Hidden)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CostManageEdit.aspx?CostManageId={0}", costManage.CostManageId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CostManageEdit.aspx?CostManageId={0}", id, "编辑 - ")));
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CostManageView.aspx?CostManageId={0}", costManage.CostManageId, "查看 - ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -255,10 +248,75 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = this.Grid1.RecordCount;
|
||||
this.BindGrid();
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.Write(GetGridTableHtml(this.Grid1));
|
||||
Response.End();
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 查看
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnView_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CostManageView.aspx?CostManageId={0}", Grid1.SelectedRowID, "查看 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 状态事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void rblState_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
#region 根据ID获取审核信息
|
||||
/// <summary>
|
||||
/// 根据ID获取审核信息
|
||||
/// </summary>
|
||||
/// <param name="costManageId"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertOperateName(object costManageId)
|
||||
{
|
||||
string strValue = "";
|
||||
if (costManageId != null)
|
||||
{
|
||||
var costManage = CostManageService.GetCostManageById(costManageId.ToString());
|
||||
if (costManage != null && costManage.States != Const.State_2)
|
||||
{
|
||||
if (costManage.States == Const.State_1)
|
||||
{
|
||||
var getNowFlow = CostManageService.getNowCostManageFlowOperateList(costManage.CostManageId);
|
||||
if (getNowFlow != null)
|
||||
{
|
||||
strValue = "待【" + Person_PersonsService.GetPersonsNameById(getNowFlow.OperaterId) + "】审核";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
strValue="待【"+Person_PersonsService.GetPersonsNameById(costManage.CompileMan) +"】提交";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return strValue;
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
+31
-2
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
|
||||
|
||||
public partial class CostManage {
|
||||
public partial class CostManage
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -57,6 +59,15 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// rblState 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rblState;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
@@ -93,6 +104,15 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblNumber;
|
||||
|
||||
/// <summary>
|
||||
/// lbOperateName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbOperateName;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
@@ -156,6 +176,15 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnView 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnView;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CostManageAudit.aspx.cs"
|
||||
Inherits="FineUIPro.Web.HSSE.CostGoods.CostManageAudit" ValidateRequest="false" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>编辑安全费用管理</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" LabelWidth="90px">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtProjectName" Label="项目名称" Readonly="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="drpUnit" runat="server" Label="单位名称" Readonly="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtContractNum" runat="server" Label="合同号" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtCostManageDate" runat="server" Label="日期" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtHseCost" runat="server" Label="HSE费用总金额(元)" LabelWidth="180px" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtGetCost" runat="server" Label="已支付的HSE费用(元)" LabelWidth="180px" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="本次申请HSE费用明细" EnableCollapse="false"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="CostManageItemId"
|
||||
DataIDField="CostManageItemId" PageSize="100" ForceFit="true" AllowSorting="true"
|
||||
SortField="SupSortIndex,SortIndex" SortDirection="ASC" EnableSummary="true" SummaryPosition="Flow"
|
||||
EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:Label runat="server" Text="本次申请HSE费用明细"></f:Label>
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||
</f:ToolbarFill>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
<f:GroupField HeaderText="费用分项明细" HeaderTextAlign="Center" TextAlign="Center" ColumnID="GpCost">
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="类别名称" ColumnID="SupCostTypeName" DataField="SupCostTypeName"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="200px"
|
||||
FieldType="String">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="分项名称" ColumnID="CostTypeName" DataField="CostTypeName"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="250px"
|
||||
FieldType="String">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="子项名称" ColumnID="InvestCostProject" DataField="InvestCostProject"
|
||||
SortField="InvestCostProject" HeaderTextAlign="Center" TextAlign="Center" Width="200px"
|
||||
FieldType="String">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:GroupField>
|
||||
<f:RenderField HeaderText="费用(元)" ColumnID="PriceMoney" DataField="PriceMoney"
|
||||
SortField="PriceMoney" HeaderTextAlign="Center" TextAlign="Center" Width="150px"
|
||||
FieldType="String">
|
||||
</f:RenderField>
|
||||
<f:WindowField TextAlign="Center" Width="150px" WindowID="WindowAtt" HeaderText="附件(收据、发票、照片)"
|
||||
Text="详细" ToolTip="附件上传查看" DataIFrameUrlFields="CostManageItemId"
|
||||
DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&type=-1"
|
||||
HeaderTextAlign="Center" />
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:RadioButtonList runat="server" ID="rblIsAgree" AutoColumnWidth="true"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="rblIsAgree_SelectedIndexChanged">
|
||||
<f:RadioItem Text="同意" Value="1" Selected="true" />
|
||||
<f:RadioItem Text="不同意" Value="0" />
|
||||
</f:RadioButtonList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow runat="server" ID="trO" Hidden="true">
|
||||
<Items>
|
||||
<f:TextArea runat="server" Label="意见" ID="txtOpinion" MaxLength="500"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow runat="server" ID="trN" ColumnWidths="20% 80%">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="Label1" Text="下一步办理人"></f:Label>
|
||||
<f:DropDownList ID="drpNextMan" runat="server"
|
||||
EnableEdit="true" Required="true" ShowRedStar="true" LabelWidth="200px">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" EnableCollapse="true" EnableColumnLines="true"
|
||||
EnableColumnMove="true" runat="server" BoxFlex="1" DataKeyNames="FlowOperateId" DataIDField="FlowOperateId"
|
||||
AllowSorting="true" SortField="SortIndex" SortDirection="Desc" AllowPaging="false" ForceFit="true"
|
||||
EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="序号" ColumnID="SortIndex" DataField="SortIndex" FieldType="Int"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="50px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="步骤" ColumnID="AuditFlowName" DataField="AuditFlowName" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="单位" ColumnID="UnitName" DataField="UnitName" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="审核/审批人" ColumnID="OperaterName" DataField="OperaterName" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="审核/审批时间" ColumnID="OperaterTime" DataField="OperaterTime"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="意见" ColumnID="Opinion" DataField="Opinion" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbTemp">
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSubmit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="1100px" Height="460px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['SupCostTypeName', 'CostTypeName'], { depends: true });
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,267 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
public partial class CostManageAudit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
private string CostManageId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["CostManageId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["CostManageId"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 当前办理步骤
|
||||
/// </summary>
|
||||
private static Model.CostGoods_CostManageFlowOperate NowFlow = new Model.CostGoods_CostManageFlowOperate();
|
||||
/// <summary>
|
||||
/// 下一步办理步骤
|
||||
/// </summary>
|
||||
private static Model.CostGoods_CostManageFlowOperate NextFlow = new Model.CostGoods_CostManageFlowOperate();
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideRefreshReference();
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.CostManageId = Request.Params["CostManageId"];
|
||||
var costManage = BLL.CostManageService.GetCostManageById(this.CostManageId);
|
||||
if (costManage != null)
|
||||
{
|
||||
this.ProjectId = costManage.ProjectId;
|
||||
this.drpUnit.Text = UnitService.GetUnitNameByUnitId(costManage.UnitId);
|
||||
|
||||
this.txtContractNum.Text = costManage.ContractNum;
|
||||
this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", costManage.CostManageDate);
|
||||
BindGrid();
|
||||
this.txtProjectName.Text = ProjectService.GetProjectNameByProjectId(this.ProjectId);
|
||||
this.txtHseCost.Text = ProjectUnitService.GetSumHSECost(this.ProjectId, costManage.UnitId).ToString();
|
||||
this.txtGetCost.Text = CostManageService.GetSumHSECost(this.ProjectId, costManage.UnitId , this.CostManageId).ToString();
|
||||
NowFlow = CostManageService.getNowCostManageFlowOperateList(costManage.CostManageId);
|
||||
if (NowFlow != null)
|
||||
{
|
||||
this.txtOpinion.Text = NowFlow.Opinion;
|
||||
}
|
||||
|
||||
NextFlow = CostManageService.getNextCostManageFlowOperateList(costManage.CostManageId,this.CurrUser.PersonId);
|
||||
if (NextFlow != null)
|
||||
{
|
||||
Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpNextMan, this.ProjectId, NextFlow.UnitId, true);
|
||||
this.drpNextMan.Label = NextFlow.AuditFlowName;
|
||||
if (!string.IsNullOrEmpty(NextFlow.OperaterId))
|
||||
{
|
||||
this.drpNextMan.SelectedValue = NextFlow.OperaterId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Label1.Text = "审核完成";
|
||||
this.drpNextMan.Hidden = true;
|
||||
}
|
||||
BindGrid2();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 绑定Grid
|
||||
/// <summary>
|
||||
/// 绑定Grid
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
var costManageItems = BLL.CostManageItemService.GetCostManageItemByCostManageId(this.CostManageId);
|
||||
this.Grid1.DataSource = costManageItems;
|
||||
this.Grid1.PageIndex = 0;
|
||||
this.Grid1.DataBind();
|
||||
OutputSummaryData(costManageItems);
|
||||
}
|
||||
|
||||
private void OutputSummaryData(List<Model.CostGoods_CostManageItem> getItem)
|
||||
{
|
||||
JObject summary = new JObject();
|
||||
summary.Add("InvestCostProject", "本次申请合计金额(元)");
|
||||
summary.Add("PriceMoney", getItem.Sum(x=>x.PriceMoney ?? 0));
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region BindGrid2
|
||||
/// <summary>
|
||||
/// 绑定Grid
|
||||
/// </summary>
|
||||
private void BindGrid2()
|
||||
{
|
||||
var FlowOperates = from x in Funs.DB.CostGoods_CostManageFlowOperate
|
||||
where x.CostManageId == this.CostManageId
|
||||
select new
|
||||
{
|
||||
x.FlowOperateId,
|
||||
x.CostManageId,
|
||||
x.AuditFlowName,
|
||||
x.SortIndex,
|
||||
x.UnitId,
|
||||
UnitName=Funs.DB.Base_Unit.First(u=>u.UnitId == x.UnitId).UnitName,
|
||||
x.OperaterId,
|
||||
OperaterName= Funs.DB.Person_Persons.First(u => u.PersonId == x.OperaterId).PersonName,
|
||||
x.OperaterTime,
|
||||
x.IsAgree,
|
||||
x.Opinion,
|
||||
x.IsClosed
|
||||
};
|
||||
|
||||
this.Grid2.DataSource = FlowOperates.OrderByDescending(x => x.SortIndex);
|
||||
this.Grid2.PageIndex = 0;
|
||||
this.Grid2.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 提交
|
||||
/// <summary>
|
||||
/// 提交按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpNextMan.SelectedValue == BLL.Const._Null && this.rblIsAgree.SelectedValue == "1" && NextFlow != null)
|
||||
{
|
||||
Alert.ShowInTop("请选择" + this.drpNextMan.Label + "!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
this.SaveData();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
private void SaveData()
|
||||
{
|
||||
var getCost = CostManageService.GetCostManageById(this.CostManageId);
|
||||
if (getCost != null)
|
||||
{
|
||||
bool isAgree = true;
|
||||
if (this.rblIsAgree.SelectedValue == "0") ///不同意 直接打回编制人
|
||||
{
|
||||
isAgree = false;
|
||||
NowFlow.Opinion = this.rblIsAgree.SelectedItem.Text + ","+ this.txtOpinion.Text;
|
||||
getCost.States = BLL.Const.State_0;
|
||||
BLL.CostManageService.UpdateCostManage(getCost);
|
||||
CostManageService.updateOpenCostManageFlowOperate(this.CostManageId);
|
||||
}
|
||||
else
|
||||
{
|
||||
NowFlow.Opinion = this.rblIsAgree.SelectedItem.Text+"。";
|
||||
NowFlow.IsClosed = true;
|
||||
if (NextFlow != null)
|
||||
{
|
||||
NextFlow.OperaterId = this.drpNextMan.SelectedValue;
|
||||
BLL.CostManageService.updateCostManageFlowOperate(NextFlow);
|
||||
}
|
||||
else
|
||||
{
|
||||
getCost.States = BLL.Const.State_2;
|
||||
BLL.CostManageService.UpdateCostManage(getCost);
|
||||
}
|
||||
}
|
||||
|
||||
NowFlow.IsAgree = isAgree;
|
||||
NowFlow.OperaterTime = DateTime.Now;
|
||||
BLL.CostManageService.updateCostManageFlowOperate(NowFlow);
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.CostManageId))
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CostManageAttachUrl&menuId={1}&type=-1", this.CostManageId, BLL.Const.ProjectCostManageMenuId)));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 是否同意
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void rblIsAgree_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.rblIsAgree.SelectedValue == "1")
|
||||
{
|
||||
this.trO.Hidden = true;
|
||||
this.trN.Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.trO.Hidden = false;
|
||||
this.trN.Hidden = true;
|
||||
}
|
||||
if (NextFlow == null)
|
||||
{
|
||||
this.Label1.Text = "审核完成";
|
||||
this.drpNextMan.Hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,260 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
|
||||
|
||||
public partial class CostManageAudit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// txtProjectName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtProjectName;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// txtContractNum 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtContractNum;
|
||||
|
||||
/// <summary>
|
||||
/// txtCostManageDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCostManageDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtHseCost 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtHseCost;
|
||||
|
||||
/// <summary>
|
||||
/// txtGetCost 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtGetCost;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
||||
|
||||
/// <summary>
|
||||
/// rblIsAgree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rblIsAgree;
|
||||
|
||||
/// <summary>
|
||||
/// trO 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow trO;
|
||||
|
||||
/// <summary>
|
||||
/// txtOpinion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtOpinion;
|
||||
|
||||
/// <summary>
|
||||
/// trN 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow trN;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// drpNextMan 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpNextMan;
|
||||
|
||||
/// <summary>
|
||||
/// Grid2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid2;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// lbTemp 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbTemp;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CostManageEdit.aspx.cs"
|
||||
Inherits="FineUIPro.Web.HSSE.CostGoods.CostManageEdit" ValidateRequest="false" %>
|
||||
|
||||
<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl"
|
||||
TagPrefix="uc1" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
@@ -10,260 +8,196 @@
|
||||
<title>编辑安全费用管理</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.customlabel span
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1"/>
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCostManageCode" runat="server" Label="编号" LabelAlign="Right" MaxLength="50"
|
||||
Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtCostManageName" runat="server" Label="名称" LabelAlign="Right" MaxLength="50">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpUnitId" runat="server" Label="分包商" Required="true" ShowRedStar="true"
|
||||
LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtContractNum" runat="server" Label="合同号" LabelAlign="Right" MaxLength="50">
|
||||
</f:TextBox>
|
||||
<f:DatePicker ID="txtCostManageDate" runat="server" Label="日期" EnableEdit="true">
|
||||
</f:DatePicker>
|
||||
<f:Label ID="Label1" runat="server">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="投入费用明细" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="CostManageItemId"
|
||||
AllowCellEditing="true" ClicksToEdit="1" DataIDField="CostManageItemId" PageSize="100" OnPageIndexChange="Grid1_PageIndexChange" EnableSummary="true" SummaryPosition="Flow"
|
||||
EnableTextSelection="True" OnRowCommand="gvMonthPlan_RowCommand" Height="300px">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:Label ID="lblT" runat="server" Text="投入费用明细" CssClass="customlabel span">
|
||||
</f:Label>
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Icon="Add" runat="server" Text="新增" ToolTip="新增投入费用明细" ValidateForms="SimpleForm1"
|
||||
OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:LinkButtonField Width="40px" ConfirmText="删除选中行?" ConfirmTarget="Parent" CommandName="Delete"
|
||||
ToolTip="删除" Icon="Delete" TextAlign="Center" />
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
<f:RenderField HeaderText="投入费用项目" ColumnID="InvestCostProject" DataField="InvestCostProject"
|
||||
SortField="InvestCostProject" HeaderTextAlign="Center" TextAlign="Center" Width="120px"
|
||||
FieldType="String">
|
||||
<Editor>
|
||||
<f:DropDownList ID="drpInvestCostProject" runat="server" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="费用使用原因" ColumnID="UseReason" DataField="UseReason" SortField="UseReason"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="150px" FieldType="String" ExpandUnusedSpace="true">
|
||||
<Editor>
|
||||
<f:TextBox runat="server" ID="txtUseReason" MaxLength="50">
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="数量" ColumnID="Counts" DataField="Counts" SortField="Counts"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="100px" FieldType="Int">
|
||||
<Editor>
|
||||
<f:NumberBox ID="txtCounts" runat="server" NoNegative="true" NoDecimal="true">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="单价(元)" ColumnID="PriceMoney" DataField="PriceMoney" SortField="PriceMoney"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="100px" FieldType="Double">
|
||||
<Editor>
|
||||
<f:NumberBox ID="txtPriceMoney" runat="server" NoNegative="true" NoDecimal="false">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="总价(元)" ColumnID="TotalMoney" DataField="TotalMoney" SortField="TotalMoney"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="100px" FieldType="Double">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="审核数量" ColumnID="AuditCounts" DataField="AuditCounts" SortField="AuditCounts"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="100px" FieldType="Int">
|
||||
<Editor>
|
||||
<f:NumberBox ID="txtAuditCounts" runat="server" NoNegative="true" NoDecimal="true">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="审核单价(元)" ColumnID="AuditPriceMoney" DataField="AuditPriceMoney"
|
||||
SortField="AuditPriceMoney" HeaderTextAlign="Center" TextAlign="Center" Width="110px"
|
||||
FieldType="Double">
|
||||
<Editor>
|
||||
<f:NumberBox ID="txtAuditPriceMoney" runat="server" NoNegative="true" NoDecimal="false">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="审核总价(元)" ColumnID="AuditTotalMoney" DataField="AuditTotalMoney"
|
||||
SortField="AuditTotalMoney" HeaderTextAlign="Center" TextAlign="Center" Width="110px"
|
||||
FieldType="Double">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="afteredit" Handler="onGridAfterEdit" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtOpinion" runat="server" Label="分包负责人意见" LabelAlign="Right" MaxLength="500"
|
||||
LabelWidth="140px">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtSubHSE" runat="server" Label="分包HSE经理" LabelAlign="Right" MaxLength="50"
|
||||
LabelWidth="140px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtSubCN" runat="server" Label="分包施工经理" LabelAlign="Right" MaxLength="50"
|
||||
LabelWidth="140px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtSubProject" runat="server" Label="分包项目经理" LabelAlign="Right" MaxLength="50"
|
||||
LabelWidth="140px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:FlowOperateControl ID="ctlAuditFlow" runat="server" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbTemp">
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSubmit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="850px" Height="420px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" LabelWidth="90px">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtProjectName" Label="项目名称" Readonly="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="单位名称" EnableEdit="true" Required="true" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtContractNum" runat="server" Label="合同号" MaxLength="50" FocusOnPageLoad="true">
|
||||
</f:TextBox>
|
||||
<f:DatePicker ID="txtCostManageDate" runat="server" Label="日期" EnableEdit="false">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtHseCost" runat="server" Label="HSE费用总金额(元)" LabelWidth="180px" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtGetCost" runat="server" Label="已支付的HSE费用(元)" LabelWidth="180px" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="本次申请HSE费用明细" EnableCollapse="false"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="CostManageItemId"
|
||||
DataIDField="CostManageItemId" PageSize="100" ForceFit="true" AllowSorting="true"
|
||||
SortField="SupSortIndex,SortIndex" SortDirection="ASC" EnableSummary="true" SummaryPosition="Flow"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
|
||||
EnableTextSelection="True" OnRowCommand="gvMonthPlan_RowCommand">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:Label runat="server" Text="本次申请HSE费用明细"></f:Label>
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Icon="Add" runat="server" Text="新增" ToolTip="新增费用明细" ValidateForms="SimpleForm1"
|
||||
OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:LinkButtonField Width="50px" ConfirmText="删除选中行?" ConfirmTarget="Parent" CommandName="Delete"
|
||||
ToolTip="删除" Icon="Delete" TextAlign="Center" />
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
<f:GroupField HeaderText="费用分项明细" HeaderTextAlign="Center" TextAlign="Center" ColumnID="GpCost">
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="类别名称" ColumnID="SupCostTypeName" DataField="SupCostTypeName"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="200px"
|
||||
FieldType="String">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="分项名称" ColumnID="CostTypeName" DataField="CostTypeName"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="250px"
|
||||
FieldType="String">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="子项名称" ColumnID="InvestCostProject" DataField="InvestCostProject"
|
||||
SortField="InvestCostProject" HeaderTextAlign="Center" TextAlign="Center" Width="200px"
|
||||
FieldType="String">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:GroupField>
|
||||
<f:RenderField HeaderText="费用(元)" ColumnID="PriceMoney" DataField="PriceMoney"
|
||||
SortField="PriceMoney" HeaderTextAlign="Center" TextAlign="Center" Width="150px"
|
||||
FieldType="String">
|
||||
</f:RenderField>
|
||||
<f:WindowField TextAlign="Center" Width="150px" WindowID="WindowAtt" HeaderText="附件(收据、发票、照片)"
|
||||
Text="详细" ToolTip="附件上传查看" DataIFrameUrlFields="CostManageItemId"
|
||||
DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&type=-1"
|
||||
HeaderTextAlign="Center" />
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lb" Text="下一步办理人"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpNextMan" runat="server"
|
||||
EnableEdit="true" Required="true" ShowRedStar="true" LabelWidth="200px">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" EnableCollapse="true" EnableColumnLines="true" Hidden="true"
|
||||
EnableColumnMove="true" runat="server" BoxFlex="1" DataKeyNames="FlowOperateId" DataIDField="FlowOperateId"
|
||||
AllowSorting="true" SortField="SortIndex" SortDirection="DESC" AllowPaging="false" ForceFit="true"
|
||||
EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="序号" ColumnID="SortIndex" DataField="SortIndex" FieldType="Int"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="50px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="步骤" ColumnID="AuditFlowName" DataField="AuditFlowName" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="单位" ColumnID="UnitName" DataField="UnitName" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="审核/审批人" ColumnID="OperaterName" DataField="OperaterName" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="审核/审批时间" ColumnID="OperaterTime" DataField="OperaterTime"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="意见" ColumnID="Opinion" DataField="Opinion" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbTemp">
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSubmit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="1100px" Height="460px">
|
||||
</f:Window>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="Pencil" EnablePostBack="true"
|
||||
runat="server" Text="编辑">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
Icon="Delete" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server"
|
||||
Text="删除">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function onGridAfterEdit(event, value, params) {
|
||||
var me = this, columnId = params.columnId, rowId = params.rowId;
|
||||
var change = false;
|
||||
if (columnId === 'Counts') {
|
||||
var counts = me.getCellValue(rowId, 'Counts');
|
||||
var priceMoney = me.getCellValue(rowId, 'PriceMoney');
|
||||
if (counts.toString() == "" || priceMoney.toString() == "") {
|
||||
me.updateCellValue(rowId, 'TotalMoney', 0);
|
||||
}
|
||||
else {
|
||||
me.updateCellValue(rowId, 'TotalMoney', (counts * priceMoney).toFixed(2));
|
||||
}
|
||||
if (counts.toString() != "" && priceMoney.toString() != "") {
|
||||
change = true;
|
||||
}
|
||||
}
|
||||
if (columnId === 'PriceMoney') {
|
||||
var counts = me.getCellValue(rowId, 'Counts');
|
||||
var priceMoney = me.getCellValue(rowId, 'PriceMoney');
|
||||
if (counts.toString() == "" || priceMoney.toString() == "") {
|
||||
me.updateCellValue(rowId, 'TotalMoney', 0);
|
||||
}
|
||||
else {
|
||||
me.updateCellValue(rowId, 'TotalMoney', (counts * priceMoney).toFixed(2));
|
||||
}
|
||||
if (counts.toString() != "" && priceMoney.toString() != "") {
|
||||
change = true;
|
||||
}
|
||||
}
|
||||
if (columnId === 'AuditCounts') {
|
||||
var auditCounts = me.getCellValue(rowId, 'AuditCounts');
|
||||
var auditPriceMoney = me.getCellValue(rowId, 'AuditPriceMoney');
|
||||
if (auditCounts.toString() == "" || auditPriceMoney.toString() == "") {
|
||||
me.updateCellValue(rowId, 'AuditTotalMoney', 0);
|
||||
}
|
||||
else {
|
||||
me.updateCellValue(rowId, 'AuditTotalMoney', (auditCounts * auditPriceMoney).toFixed(2));
|
||||
}
|
||||
if (auditCounts.toString() != "" && auditPriceMoney.toString() != "") {
|
||||
change = true;
|
||||
}
|
||||
}
|
||||
if (columnId === 'AuditPriceMoney') {
|
||||
var auditCounts = me.getCellValue(rowId, 'AuditCounts');
|
||||
var auditPriceMoney = me.getCellValue(rowId, 'AuditPriceMoney');
|
||||
if (auditCounts.toString() == "" || auditPriceMoney.toString() == "") {
|
||||
me.updateCellValue(rowId, 'AuditTotalMoney', 0);
|
||||
}
|
||||
else {
|
||||
me.updateCellValue(rowId, 'AuditTotalMoney', (auditCounts * auditPriceMoney).toFixed(2));
|
||||
}
|
||||
if (auditCounts.toString() != "" && auditPriceMoney.toString() != "") {
|
||||
change = true;
|
||||
}
|
||||
}
|
||||
if (change == true) {
|
||||
updateSummary();
|
||||
}
|
||||
}
|
||||
|
||||
function updateSummary() {
|
||||
// 回发到后台更新
|
||||
__doPostBack('', 'UPDATE_SUMMARY');
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['SupCostTypeName', 'CostTypeName'], { depends: true });
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
@@ -36,10 +38,6 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 定义集合
|
||||
/// </summary>
|
||||
private static List<Model.CostGoods_CostManageItem> costManageItems = new List<Model.CostGoods_CostManageItem>();
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
@@ -52,151 +50,78 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideRefreshReference();
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.InitDropDownList();
|
||||
this.CostManageId = Request.Params["CostManageId"];
|
||||
this.drpInvestCostProject.DataTextField = "Text";
|
||||
this.drpInvestCostProject.DataValueField = "Value";
|
||||
this.drpInvestCostProject.DataSource = BLL.CostManageItemService.GetInvestCostProjectList();
|
||||
this.drpInvestCostProject.DataBind();
|
||||
if (!BLL.CommonService.IsMainUnitOrAdmin(this.CurrUser.PersonId)) //分包单位用户,隐藏审核列
|
||||
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, false);
|
||||
this.CostManageId = Request.Params["CostManageId"] ?? SQLHelper.GetNewID();
|
||||
var costManage = BLL.CostManageService.GetCostManageById(this.CostManageId);
|
||||
if (costManage != null)
|
||||
{
|
||||
this.Grid1.Columns[7].Hidden = true;
|
||||
this.Grid1.Columns[8].Hidden = true;
|
||||
this.Grid1.Columns[9].Hidden = true;
|
||||
}
|
||||
this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", System.DateTime.Now);
|
||||
if (!string.IsNullOrEmpty(this.CostManageId))
|
||||
{
|
||||
Model.CostGoods_CostManage costManage = BLL.CostManageService.GetCostManageById(this.CostManageId);
|
||||
if (costManage != null)
|
||||
this.ProjectId = costManage.ProjectId;
|
||||
if (this.ProjectId != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = costManage.ProjectId;
|
||||
if (this.ProjectId != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.InitDropDownList();
|
||||
}
|
||||
this.txtCostManageCode.Text = CodeRecordsService.ReturnCodeByDataId(this.CostManageId);
|
||||
this.txtCostManageName.Text = costManage.CostManageName;
|
||||
if (!string.IsNullOrEmpty(costManage.UnitId))
|
||||
{
|
||||
this.drpUnitId.SelectedValue = costManage.UnitId;
|
||||
}
|
||||
this.txtContractNum.Text = costManage.ContractNum;
|
||||
this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", costManage.CostManageDate);
|
||||
this.txtOpinion.Text = costManage.Opinion;
|
||||
this.txtSubHSE.Text = costManage.SubHSE;
|
||||
this.txtSubCN.Text = costManage.SubCN;
|
||||
this.txtSubProject.Text = costManage.SubProject;
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, false);
|
||||
}
|
||||
BindGrid();
|
||||
|
||||
if (!string.IsNullOrEmpty(costManage.UnitId))
|
||||
{
|
||||
this.drpUnit.SelectedValue = costManage.UnitId;
|
||||
}
|
||||
this.txtContractNum.Text = costManage.ContractNum;
|
||||
this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", costManage.CostManageDate);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtCostManageCode.Text = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectCostManageMenuId, this.ProjectId, this.CurrUser.PersonId);
|
||||
this.txtCostManageName.Text = "分包商HSE措施费申请表";
|
||||
this.drpUnit.SelectedValue = this.CurrUser.UnitId ?? Const.UnitId_SEDIN;
|
||||
this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", System.DateTime.Now);
|
||||
}
|
||||
///初始化审核菜单
|
||||
this.ctlAuditFlow.MenuId = BLL.Const.ProjectCostManageMenuId;
|
||||
this.ctlAuditFlow.DataId = this.CostManageId;
|
||||
this.ctlAuditFlow.ProjectId = this.ProjectId;
|
||||
this.ctlAuditFlow.UnitId = this.CurrUser.UnitId;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetRequestEventArgument() == "UPDATE_SUMMARY")
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
jerqueSaveMonthPlanList();
|
||||
this.Grid1.DataSource = costManageItems;
|
||||
this.Grid1.DataBind();
|
||||
// 页面要求重新计算合计行的值
|
||||
OutputSummaryData();
|
||||
this.drpUnit.Readonly = true;
|
||||
}
|
||||
|
||||
BindGrid();
|
||||
this.txtProjectName.Text = ProjectService.GetProjectNameByProjectId(this.ProjectId);
|
||||
this.txtHseCost.Text = ProjectUnitService.GetSumHSECost(this.ProjectId, this.drpUnit.SelectedValue).ToString();
|
||||
this.txtGetCost.Text = CostManageService.GetSumHSECost(this.ProjectId, this.drpUnit.SelectedValue, this.CostManageId).ToString();
|
||||
|
||||
Person_PersonsService.InitFlowOperateControlUserDropDownList(this.drpNextMan, this.ProjectId, this.drpUnit.SelectedValue, true);
|
||||
if (ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.drpUnit.SelectedValue))
|
||||
{
|
||||
this.drpNextMan.Label = "分包单位项目经理审批";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpNextMan.Label = "安全经理审核";
|
||||
}
|
||||
BindGrid2();
|
||||
}
|
||||
}
|
||||
|
||||
#region 计算合计及各行总价
|
||||
/// <summary>
|
||||
/// 计算合计
|
||||
/// </summary>
|
||||
private void OutputSummaryData()
|
||||
{
|
||||
Grid1.CommitChanges();
|
||||
decimal sumTotalMoney = 0, sumAuditTotalMoney = 0, totalMoney = 0, auditTotalMoney = 0, priceMoney = 0, auditPriceMoney = 0;
|
||||
int counts = 0, auditCounts = 0;
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
counts = Funs.GetNewIntOrZero(this.Grid1.Rows[i].Values[4].ToString());
|
||||
priceMoney = Funs.GetNewDecimalOrZero(this.Grid1.Rows[i].Values[5].ToString());
|
||||
totalMoney = counts * priceMoney;
|
||||
sumTotalMoney += totalMoney;
|
||||
this.Grid1.Rows[i].Values[6] = totalMoney.ToString();
|
||||
auditCounts = Funs.GetNewIntOrZero(this.Grid1.Rows[i].Values[7].ToString());
|
||||
auditPriceMoney = Funs.GetNewDecimalOrZero(this.Grid1.Rows[i].Values[8].ToString());
|
||||
auditTotalMoney = auditCounts * auditPriceMoney;
|
||||
sumAuditTotalMoney += auditTotalMoney;
|
||||
this.Grid1.Rows[i].Values[9] = auditTotalMoney.ToString();
|
||||
}
|
||||
if (this.Grid1.Rows.Count > 0)
|
||||
{
|
||||
JObject summary = new JObject
|
||||
{
|
||||
{ "PriceMoney", "总计" },
|
||||
{ "TotalMoney", sumTotalMoney },
|
||||
{ "AuditTotalMoney", sumAuditTotalMoney }
|
||||
};
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
else
|
||||
{
|
||||
Grid1.SummaryData = null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 初始化下拉框
|
||||
/// </summary>
|
||||
private void InitDropDownList()
|
||||
{
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
||||
}
|
||||
|
||||
#region 绑定Grid
|
||||
/// <summary>
|
||||
/// 绑定Grid
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
costManageItems = BLL.CostManageItemService.GetCostManageItemByCostManageId(this.CostManageId);
|
||||
var costManageItems = BLL.CostManageItemService.GetCostManageItemByCostManageId(this.CostManageId);
|
||||
this.Grid1.DataSource = costManageItems;
|
||||
this.Grid1.PageIndex = 0;
|
||||
this.Grid1.DataBind();
|
||||
OutputSummaryData();
|
||||
OutputSummaryData(costManageItems);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 改变索引事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
private void OutputSummaryData(List<Model.CostGoods_CostManageItem> getItem)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
JObject summary = new JObject();
|
||||
summary.Add("InvestCostProject", "本次申请合计金额(元)");
|
||||
summary.Add("PriceMoney", getItem.Sum(x=>x.PriceMoney ?? 0));
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -210,6 +135,130 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 新增费用申请情况
|
||||
/// <summary>
|
||||
/// 新增费用申请情况
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpUnit.SelectedValue == BLL.Const._Null && !string.IsNullOrEmpty(this.drpUnit.SelectedValue))
|
||||
{
|
||||
Alert.ShowInTop("请选择分包商!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var getCost = CostManageService.GetCostManageById(this.CostManageId);
|
||||
if (getCost == null)
|
||||
{
|
||||
SaveData(Const.BtnSave);
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CostManageItemEdit.aspx?CostManageId={0}", this.CostManageId, "编辑 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
this.Edit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Edit();
|
||||
}
|
||||
|
||||
private void Edit()
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Grid1.SelectedRowID;
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CostManageItemEdit.aspx?CostManageItemId={0}", id, "编辑 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
Delete(rowID);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void gvMonthPlan_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
string rowID = this.Grid1.DataKeys[e.RowIndex][0].ToString();
|
||||
if (e.CommandName == "Delete")
|
||||
{
|
||||
Delete(rowID);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="rowId"></param>
|
||||
private void Delete(string rowId)
|
||||
{
|
||||
BLL.CostManageItemService.DeleteCostManageItemById(rowId);
|
||||
this.BindGrid();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region BindGrid2
|
||||
/// <summary>
|
||||
/// 绑定Grid
|
||||
/// </summary>
|
||||
private void BindGrid2()
|
||||
{
|
||||
var FlowOperates = from x in Funs.DB.CostGoods_CostManageFlowOperate
|
||||
where x.CostManageId == this.CostManageId
|
||||
select new
|
||||
{
|
||||
x.FlowOperateId,
|
||||
x.CostManageId,
|
||||
x.AuditFlowName,
|
||||
x.SortIndex,
|
||||
x.UnitId,
|
||||
UnitName=Funs.DB.Base_Unit.First(u=>u.UnitId == x.UnitId).UnitName,
|
||||
x.OperaterId,
|
||||
OperaterName= Funs.DB.Person_Persons.First(u => u.PersonId == x.OperaterId).PersonName,
|
||||
x.OperaterTime,
|
||||
x.IsAgree,
|
||||
x.Opinion,
|
||||
x.IsClosed
|
||||
};
|
||||
|
||||
this.Grid2.DataSource = FlowOperates.OrderByDescending(x=>x.SortIndex);
|
||||
this.Grid2.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
@@ -218,11 +267,6 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpUnitId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择分包商!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
this.SaveData(BLL.Const.BtnSave);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
@@ -234,14 +278,9 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
/// <param name="e"></param>
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpUnitId.SelectedValue == BLL.Const._Null)
|
||||
if (this.drpNextMan.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择分包商!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.ctlAuditFlow.NextStep == BLL.Const.State_1 && this.ctlAuditFlow.NextPerson == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择下一步办理人!", MessageBoxIcon.Warning);
|
||||
Alert.ShowInTop("请选择" + this.drpNextMan.Label + "!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
this.SaveData(BLL.Const.BtnSubmit);
|
||||
@@ -254,36 +293,30 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
/// <param name="type"></param>
|
||||
private void SaveData(string type)
|
||||
{
|
||||
if (!BLL.CommonService.IsMainUnitOrAdmin(this.CurrUser.PersonId) && type == BLL.Const.BtnSubmit && this.ctlAuditFlow.NextStep == BLL.Const.State_2)
|
||||
if (this.drpUnit.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInParent("分包商不能关闭审核流程", MessageBoxIcon.Warning);
|
||||
Alert.ShowInTop("请选择单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
Model.CostGoods_CostManage costManage = new Model.CostGoods_CostManage
|
||||
{
|
||||
ProjectId = this.ProjectId,
|
||||
CostManageCode = this.txtCostManageCode.Text.Trim(),
|
||||
CostManageName = this.txtCostManageName.Text.Trim()
|
||||
UnitId = this.drpUnit.SelectedValue == Const._Null ? null : this.drpUnit.SelectedValue,
|
||||
ContractNum = this.txtContractNum.Text.Trim(),
|
||||
CostManageDate = Funs.GetNewDateTime(this.txtCostManageDate.Text.Trim()),
|
||||
States = BLL.Const.State_0,
|
||||
CompileMan = this.CurrUser.PersonId,
|
||||
CompileDate = DateTime.Now,
|
||||
};
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
|
||||
if (type == Const.BtnSubmit)
|
||||
{
|
||||
costManage.UnitId = this.drpUnitId.SelectedValue;
|
||||
costManage.States = BLL.Const.State_1;
|
||||
}
|
||||
costManage.ContractNum = this.txtContractNum.Text.Trim();
|
||||
costManage.CostManageDate = Funs.GetNewDateTime(this.txtCostManageDate.Text.Trim());
|
||||
costManage.Opinion = this.txtOpinion.Text.Trim();
|
||||
costManage.SubHSE = this.txtSubHSE.Text.Trim();
|
||||
costManage.SubCN = this.txtSubCN.Text.Trim();
|
||||
costManage.SubProject = this.txtSubProject.Text.Trim();
|
||||
costManage.CompileMan = this.CurrUser.PersonId;
|
||||
costManage.CompileDate = DateTime.Now;
|
||||
costManage.States = BLL.Const.State_0;
|
||||
if (type == BLL.Const.BtnSubmit)
|
||||
{
|
||||
costManage.States = this.ctlAuditFlow.NextStep;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.CostManageId))
|
||||
|
||||
var getCost= CostManageService.GetCostManageById(this.CostManageId);
|
||||
if (getCost != null)
|
||||
{
|
||||
costManage.CostManageId = this.CostManageId;
|
||||
BLL.CostManageService.UpdateCostManage(costManage);
|
||||
@@ -291,20 +324,21 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
}
|
||||
else
|
||||
{
|
||||
this.CostManageId = SQLHelper.GetNewID(typeof(Model.CostGoods_CostManage));
|
||||
costManage.CostManageCode = Funs.GetNewFileName();
|
||||
costManage.CostManageId = this.CostManageId;
|
||||
BLL.CostManageService.AddCostManage(costManage);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, costManage.CostManageCode, costManage.CostManageId, BLL.Const.ProjectCostManageMenuId, BLL.Const.BtnAdd);
|
||||
}
|
||||
jerqueSaveMonthPlanList();
|
||||
BLL.CostManageItemService.DeleteCostManageItemByCostManageId(this.CostManageId);
|
||||
foreach (var costManageItem in costManageItems)
|
||||
|
||||
if (type == Const.BtnSubmit)
|
||||
{
|
||||
costManageItem.CostManageId = this.CostManageId;
|
||||
BLL.CostManageItemService.AddCostManageItem(costManageItem);
|
||||
var getNext=CostManageService.getNextCostManageFlowOperateList(this.CostManageId, this.CurrUser.PersonId);
|
||||
if(getNext != null)
|
||||
{
|
||||
getNext.OperaterId = this.drpNextMan.SelectedValue ;
|
||||
CostManageService.updateCostManageFlowOperate(getNext);
|
||||
}
|
||||
}
|
||||
////保存流程审核数据
|
||||
this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.ProjectCostManageMenuId, this.CostManageId, (type == BLL.Const.BtnSubmit ? true : false), costManage.CostManageName, "../CostGoods/CostManageView.aspx?CostManageId={0}");
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -323,120 +357,5 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CostManageAttachUrl&menuId={1}", this.CostManageId, BLL.Const.ProjectCostManageMenuId)));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 新增费用申请情况
|
||||
/// <summary>
|
||||
/// 新增费用申请情况
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
//if (this.drpUnitId.SelectedValue == BLL.Const._Null)
|
||||
//{
|
||||
// Alert.ShowInTop("请选择分包商!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
jerqueSaveMonthPlanList();
|
||||
Model.CostGoods_CostManageItem costManageItem = new Model.CostGoods_CostManageItem
|
||||
{
|
||||
CostManageItemId = SQLHelper.GetNewID(typeof(Model.CostGoods_CostManageItem))
|
||||
};
|
||||
costManageItems.Add(costManageItem);
|
||||
this.Grid1.DataSource = costManageItems;
|
||||
this.Grid1.DataBind();
|
||||
OutputSummaryData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查并保存其他HSE管理活动集合
|
||||
/// </summary>
|
||||
private void jerqueSaveMonthPlanList()
|
||||
{
|
||||
costManageItems.Clear();
|
||||
JArray mergedData = Grid1.GetMergedData();
|
||||
foreach (JObject mergedRow in mergedData)
|
||||
{
|
||||
string status = mergedRow.Value<string>("status");
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int i = mergedRow.Value<int>("index");
|
||||
Model.CostGoods_CostManageItem costManageItem = new Model.CostGoods_CostManageItem
|
||||
{
|
||||
CostManageItemId = this.Grid1.Rows[i].DataKeys[0].ToString(),
|
||||
InvestCostProject = values.Value<string>("InvestCostProject").ToString(),
|
||||
UseReason = values.Value<string>("UseReason").ToString(),
|
||||
Counts = Funs.GetNewIntOrZero(values.Value<string>("Counts").ToString()),
|
||||
PriceMoney = Funs.GetNewDecimalOrZero(values.Value<string>("PriceMoney").ToString()),
|
||||
AuditCounts = !string.IsNullOrEmpty(values.Value<string>("AuditCounts").ToString()) ? Funs.GetNewInt(values.Value<string>("AuditCounts").ToString()) : null,
|
||||
AuditPriceMoney = !string.IsNullOrEmpty(values.Value<string>("AuditPriceMoney").ToString()) ? Funs.GetNewDecimal(values.Value<string>("AuditPriceMoney").ToString()) : null
|
||||
};
|
||||
costManageItems.Add(costManageItem);
|
||||
}
|
||||
}
|
||||
|
||||
protected void gvMonthPlan_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
jerqueSaveMonthPlanList();
|
||||
string rowID = this.Grid1.DataKeys[e.RowIndex][0].ToString();
|
||||
if (e.CommandName == "Delete")
|
||||
{
|
||||
foreach (var item in costManageItems)
|
||||
{
|
||||
if (item.CostManageItemId == rowID)
|
||||
{
|
||||
costManageItems.Remove(item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Grid1.DataSource = costManageItems;
|
||||
Grid1.DataBind();
|
||||
OutputSummaryData();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 格式化字符串
|
||||
/// <summary>
|
||||
/// 获取总价
|
||||
/// </summary>
|
||||
/// <param name="costManageId"></param>
|
||||
/// <returns></returns>
|
||||
protected string GetTotalMoney(object costManageItemId)
|
||||
{
|
||||
string total = string.Empty;
|
||||
if (costManageItemId != null)
|
||||
{
|
||||
var costManageItem = BLL.CostManageItemService.GetCostManageItemById(costManageItemId.ToString());
|
||||
if (costManageItem != null)
|
||||
{
|
||||
decimal? price = costManageItem.PriceMoney;
|
||||
int? count = costManageItem.Counts;
|
||||
total = Convert.ToString(price * count);
|
||||
}
|
||||
}
|
||||
return total;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取审核总价
|
||||
/// </summary>
|
||||
/// <param name="costManageId"></param>
|
||||
/// <returns></returns>
|
||||
protected string GetAuditTotalMoney(object costManageItemId)
|
||||
{
|
||||
string total = string.Empty;
|
||||
if (costManageItemId != null)
|
||||
{
|
||||
var costManageItem = BLL.CostManageItemService.GetCostManageItemById(costManageItemId.ToString());
|
||||
if (costManageItem != null)
|
||||
{
|
||||
decimal? price = costManageItem.AuditPriceMoney;
|
||||
int? count = costManageItem.AuditCounts;
|
||||
total = Convert.ToString(price * count);
|
||||
}
|
||||
}
|
||||
return total;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+52
-140
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
|
||||
|
||||
public partial class CostManageEdit {
|
||||
public partial class CostManageEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -40,31 +42,22 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// txtCostManageCode 控件。
|
||||
/// txtProjectName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCostManageCode;
|
||||
protected global::FineUIPro.TextBox txtProjectName;
|
||||
|
||||
/// <summary>
|
||||
/// txtCostManageName 控件。
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCostManageName;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitId;
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// txtContractNum 控件。
|
||||
@@ -85,13 +78,22 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
protected global::FineUIPro.DatePicker txtCostManageDate;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// txtHseCost 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
protected global::FineUIPro.TextBox txtHseCost;
|
||||
|
||||
/// <summary>
|
||||
/// txtGetCost 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtGetCost;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
@@ -111,15 +113,6 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// lblT 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lblT;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill2 控件。
|
||||
/// </summary>
|
||||
@@ -139,139 +132,31 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// drpInvestCostProject 控件。
|
||||
/// lb 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpInvestCostProject;
|
||||
protected global::FineUIPro.Label lb;
|
||||
|
||||
/// <summary>
|
||||
/// txtUseReason 控件。
|
||||
/// drpNextMan 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUseReason;
|
||||
protected global::FineUIPro.DropDownList drpNextMan;
|
||||
|
||||
/// <summary>
|
||||
/// txtCounts 控件。
|
||||
/// Grid2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtCounts;
|
||||
|
||||
/// <summary>
|
||||
/// txtPriceMoney 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtPriceMoney;
|
||||
|
||||
/// <summary>
|
||||
/// txtAuditCounts 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtAuditCounts;
|
||||
|
||||
/// <summary>
|
||||
/// txtAuditPriceMoney 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtAuditPriceMoney;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// txtOpinion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtOpinion;
|
||||
|
||||
/// <summary>
|
||||
/// txtSubHSE 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSubHSE;
|
||||
|
||||
/// <summary>
|
||||
/// txtSubCN 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSubCN;
|
||||
|
||||
/// <summary>
|
||||
/// txtSubProject 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSubProject;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ctlAuditFlow 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.FlowOperateControl ctlAuditFlow;
|
||||
protected global::FineUIPro.Grid Grid2;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
@@ -353,5 +238,32 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,63 +5,60 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>编辑投入费用项目</title>
|
||||
<title>编辑费用</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1"/>
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpInvestCostProject" runat="server" Label="投入费用项目" Required="true" ShowRedStar="true"
|
||||
LabelAlign="Right" EnableEdit="true" LabelWidth="150px">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtUseReason" runat="server" Label="费用使用明细及描述" LabelAlign="Right" MaxLength="50" LabelWidth="150px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtCount" runat="server" Label="数量" LabelAlign="Right" NoDecimal="true"
|
||||
NoNegative="true" AutoPostBack="true" OnTextChanged="Text_TextChanged" LabelWidth="150px">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtPriceMoney" runat="server" Label="单价(元)" LabelAlign="Right" NoNegative="true"
|
||||
AutoPostBack="true" OnTextChanged="Text_TextChanged" LabelWidth="150px">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtTotalMoney" runat="server" Label="总价(元)" LabelAlign="Right" Readonly="true" LabelWidth="150px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" LabelWidth="100px">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpSupCostType" runat="server" Label="类别名称" Required="true" ShowRedStar="true"
|
||||
EnableEdit="true"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="drpSupCostType_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpCostType" runat="server" Label="分项名称" Required="true" ShowRedStar="true"
|
||||
EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtInvestCostProject" runat="server" Label="子项名称" MaxLength="50"
|
||||
ShowRedStar="true" Required="true">
|
||||
</f:TextBox>
|
||||
<f:NumberBox ID="txtPriceMoney" runat="server" Label="费用(元)" ShowRedStar="true" Required="true"
|
||||
NoNegative="true" DecimalPrecision="2">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbTemp">
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
using Model;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
@@ -49,28 +51,23 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.CostManageId = Request.Params["CostManageId"];
|
||||
this.CostManageItemId = Request.Params["CostManageItemId"];
|
||||
this.drpInvestCostProject.DataTextField = "Text";
|
||||
this.drpInvestCostProject.DataValueField = "Value";
|
||||
this.drpInvestCostProject.DataSource = BLL.CostManageItemService.GetInvestCostProjectList();
|
||||
this.drpInvestCostProject.DataBind();
|
||||
this.CostManageItemId = Request.Params["CostManageItemId"] ?? SQLHelper.GetNewID();
|
||||
|
||||
CostTypeService.InitCostTypeDropDownList(this.drpSupCostType, true);
|
||||
if (!string.IsNullOrEmpty(this.CostManageItemId))
|
||||
{
|
||||
Model.CostGoods_CostManageItem costManageItem = BLL.CostManageItemService.GetCostManageItemById(this.CostManageItemId);
|
||||
var costManageItem = BLL.CostManageItemService.GetCostManageItemById(this.CostManageItemId);
|
||||
if (costManageItem != null)
|
||||
{
|
||||
this.CostManageId = costManageItem.CostManageId;
|
||||
this.drpInvestCostProject.SelectedValue = costManageItem.InvestCostProject;
|
||||
this.txtUseReason.Text = costManageItem.UseReason;
|
||||
if (costManageItem.Counts != null)
|
||||
{
|
||||
this.txtCount.Text = Convert.ToString(costManageItem.Counts);
|
||||
}
|
||||
this.drpSupCostType.SelectedValue = costManageItem.SupCostTypeId;
|
||||
CostTypeService.InitCostTypeItemDropDownList(this.drpCostType, this.drpSupCostType.SelectedValue, false);
|
||||
this.drpCostType.SelectedValue = costManageItem.CostTypeId;
|
||||
this.txtInvestCostProject.Text= costManageItem.InvestCostProject;
|
||||
if (costManageItem.PriceMoney != null)
|
||||
{
|
||||
this.txtPriceMoney.Text = Convert.ToString(costManageItem.PriceMoney);
|
||||
}
|
||||
this.txtTotalMoney.Text = Convert.ToString(costManageItem.Counts * costManageItem.PriceMoney);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,43 +82,80 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool isSave = true;
|
||||
Model.CostGoods_CostManageItem costManageItem = new Model.CostGoods_CostManageItem
|
||||
{
|
||||
CostManageId = this.CostManageId,
|
||||
InvestCostProject = this.drpInvestCostProject.SelectedValue,
|
||||
UseReason = this.txtUseReason.Text.Trim(),
|
||||
Counts = Funs.GetNewInt(this.txtCount.Text.Trim()),
|
||||
CostManageItemId = this.CostManageItemId,
|
||||
InvestCostProject = this.txtInvestCostProject.Text.Trim(),
|
||||
PriceMoney = Funs.GetNewDecimalOrZero(this.txtPriceMoney.Text.Trim()),
|
||||
};
|
||||
if (!string.IsNullOrEmpty(this.CostManageItemId))
|
||||
|
||||
var getSupType =CostTypeService.GetCostTypeById(this.drpSupCostType.SelectedValue);
|
||||
if (getSupType != null)
|
||||
{
|
||||
costManageItem.CostManageItemId = this.CostManageItemId;
|
||||
BLL.CostManageItemService.UpdateCostManageItem(costManageItem);
|
||||
costManageItem.SupCostTypeId = getSupType.CostTypeId;
|
||||
costManageItem.SupCostTypeName = getSupType.CostTypeName;
|
||||
costManageItem.SupSortIndex = getSupType.CostTypeCode;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.CostManageItemId = SQLHelper.GetNewID(typeof(Model.CostGoods_CostManageItem));
|
||||
costManageItem.CostManageItemId = this.CostManageItemId;
|
||||
BLL.CostManageItemService.AddCostManageItem(costManageItem);
|
||||
isSave = false;
|
||||
}
|
||||
var getCostType=CostTypeService.GetCostTypeItemById(this.drpCostType.SelectedValue);
|
||||
if (getCostType != null)
|
||||
{
|
||||
costManageItem.CostTypeId = getCostType.CostTypeItemId;
|
||||
costManageItem.CostTypeName = getCostType.CostTypeItemName;
|
||||
costManageItem.SortIndex = getCostType.SortIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
isSave = false;
|
||||
}
|
||||
|
||||
if (isSave)
|
||||
{
|
||||
var getItem = BLL.CostManageItemService.GetCostManageItemById(this.CostManageItemId);
|
||||
if (getItem != null)
|
||||
{
|
||||
costManageItem.CostManageItemId = this.CostManageItemId;
|
||||
BLL.CostManageItemService.UpdateCostManageItem(costManageItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
costManageItem.CostManageItemId = this.CostManageItemId;
|
||||
BLL.CostManageItemService.AddCostManageItem(costManageItem);
|
||||
}
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("费用类别或分项存在问题,请重新选择!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 计算总价
|
||||
/// <summary>
|
||||
/// 计算总价
|
||||
/// 类型下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Text_TextChanged(object sender, EventArgs e)
|
||||
protected void drpSupCostType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtCount.Text.Trim()) && !string.IsNullOrEmpty(this.txtPriceMoney.Text.Trim()))
|
||||
{
|
||||
int? count = Funs.GetNewInt(this.txtCount.Text.Trim());
|
||||
decimal? price = Funs.GetNewDecimalOrZero(this.txtPriceMoney.Text.Trim());
|
||||
this.txtTotalMoney.Text = Convert.ToString(count * price);
|
||||
}
|
||||
CostTypeService.InitCostTypeItemDropDownList(this.drpCostType,this.drpSupCostType.SelectedValue, false);
|
||||
}
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CostManageItemAttachUrl&menuId={1}", this.CostManageItemId, BLL.Const.ProjectCostManageMenuId)));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
|
||||
|
||||
public partial class CostManageItemEdit {
|
||||
public partial class CostManageItemEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -40,31 +42,31 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// drpInvestCostProject 控件。
|
||||
/// drpSupCostType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpInvestCostProject;
|
||||
protected global::FineUIPro.DropDownList drpSupCostType;
|
||||
|
||||
/// <summary>
|
||||
/// txtUseReason 控件。
|
||||
/// drpCostType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUseReason;
|
||||
protected global::FineUIPro.DropDownList drpCostType;
|
||||
|
||||
/// <summary>
|
||||
/// txtCount 控件。
|
||||
/// txtInvestCostProject 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtCount;
|
||||
protected global::FineUIPro.TextBox txtInvestCostProject;
|
||||
|
||||
/// <summary>
|
||||
/// txtPriceMoney 控件。
|
||||
@@ -75,15 +77,6 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtPriceMoney;
|
||||
|
||||
/// <summary>
|
||||
/// txtTotalMoney 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTotalMoney;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -93,6 +86,24 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// lbTemp 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbTemp;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
@@ -119,5 +130,14 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,158 +1,164 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CostManageView.aspx.cs" Inherits="FineUIPro.Web.HSSE.CostGoods.CostManageView" ValidateRequest="false" %>
|
||||
<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl"
|
||||
TagPrefix="uc1" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>查看安全费用管理</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>编辑安全费用管理</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.customlabel span
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1"/>
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCostManageCode" runat="server" Label="编号" LabelAlign="Right"
|
||||
Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtCostManageName" runat="server" Label="名称" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtUnitName" runat="server" Label="分包商" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtContractNum" runat="server" Label="合同号" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCostManageDate" runat="server" Label="日期" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:Label ID="Label1" runat="server">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="投入费用明细" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="CostManageItemId"
|
||||
AllowCellEditing="true" ClicksToEdit="2" DataIDField="CostManageItemId" PageSize="100"
|
||||
OnPageIndexChange="Grid1_PageIndexChange" EnableSummary="true" SummaryPosition="Flow"
|
||||
EnableTextSelection="True" Height="220px">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:Label ID="lblT" runat="server" Text="投入费用明细" CssClass="customlabel span">
|
||||
</f:Label>
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||
</f:ToolbarFill>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
<f:RenderField Width="120px" ColumnID="InvestCostProject" DataField="InvestCostProject"
|
||||
SortField="InvestCostProject" FieldType="String" HeaderText="投入费用项目" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="UseReason" DataField="UseReason" SortField="UseReason"
|
||||
FieldType="String" HeaderText="费用使用原因" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="Counts" DataField="Counts" SortField="Counts"
|
||||
FieldType="Int" HeaderText="数量" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PriceMoney" DataField="PriceMoney" SortField="PriceMoney"
|
||||
FieldType="Float" HeaderText="单价(元)" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:TemplateField HeaderText="总价(元)" Width="120px" HeaderTextAlign="Center" TextAlign="Left" ColumnID="TotalMoney">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblTotalMoney" runat="server" Text='<%# GetTotalMoney(Eval("CostManageItemId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="100px" ColumnID="AuditCounts" DataField="AuditCounts" SortField="AuditCounts"
|
||||
FieldType="Int" HeaderText="数量" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="AuditPriceMoney" DataField="AuditPriceMoney" SortField="AuditPriceMoney"
|
||||
FieldType="Float" HeaderText="单价(元)" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:TemplateField HeaderText="总价(元)" Width="120px" HeaderTextAlign="Center" TextAlign="Left" ColumnID="AuditTotalMoney">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# GetAuditTotalMoney(Eval("CostManageItemId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</Columns>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtOpinion" runat="server" Label="分包商负责人意见" LabelAlign="Right" Readonly="true" LabelWidth="140px">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtSubHSE" runat="server" Label="分包商HSE经理" LabelAlign="Right" Readonly="true" LabelWidth="140px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtSubCN" runat="server" Label="分包商施工经理" LabelAlign="Right" Readonly="true" LabelWidth="140px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtSubProject" runat="server" Label="分包商项目经理" LabelAlign="Right" Readonly="true" LabelWidth="140px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:FlowOperateControl ID="ctlAuditFlow" runat="server" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbTemp">
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" LabelWidth="90px">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtProjectName" Label="项目名称" Readonly="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="drpUnit" runat="server" Label="单位名称" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtContractNum" runat="server" Label="合同号" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtCostManageDate" runat="server" Label="日期" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtHseCost" runat="server" Label="HSE费用总金额(元)" LabelWidth="180px" Readonly="true">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtGetCost" runat="server" Label="已支付的HSE费用(元)" LabelWidth="180px" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="本次申请HSE费用明细" EnableCollapse="false"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="CostManageItemId"
|
||||
DataIDField="CostManageItemId" PageSize="100" ForceFit="true" AllowSorting="true"
|
||||
SortField="SupSortIndex,SortIndex" SortDirection="ASC" EnableSummary="true" SummaryPosition="Flow"
|
||||
EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:Label runat="server" Text="本次申请HSE费用明细"></f:Label>
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||
</f:ToolbarFill>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
<f:GroupField HeaderText="费用分项明细" HeaderTextAlign="Center" TextAlign="Center" ColumnID="GpCost">
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="类别名称" ColumnID="SupCostTypeName" DataField="SupCostTypeName"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="200px"
|
||||
FieldType="String">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="分项名称" ColumnID="CostTypeName" DataField="CostTypeName"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="250px"
|
||||
FieldType="String">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="子项名称" ColumnID="InvestCostProject" DataField="InvestCostProject"
|
||||
SortField="InvestCostProject" HeaderTextAlign="Center" TextAlign="Center" Width="200px"
|
||||
FieldType="String">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:GroupField>
|
||||
<f:RenderField HeaderText="费用(元)" ColumnID="PriceMoney" DataField="PriceMoney"
|
||||
SortField="PriceMoney" HeaderTextAlign="Center" TextAlign="Center" Width="150px"
|
||||
FieldType="String">
|
||||
</f:RenderField>
|
||||
<f:WindowField TextAlign="Center" Width="150px" WindowID="WindowAtt" HeaderText="附件(收据、发票、照片)"
|
||||
Text="详细" ToolTip="附件上传查看" DataIFrameUrlFields="CostManageItemId"
|
||||
DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&type=-1"
|
||||
HeaderTextAlign="Center" />
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" EnableCollapse="true" EnableColumnLines="true"
|
||||
EnableColumnMove="true" runat="server" BoxFlex="1" DataKeyNames="FlowOperateId" DataIDField="FlowOperateId"
|
||||
AllowSorting="true" SortField="SortIndex" SortDirection="DESC" AllowPaging="false" ForceFit="true"
|
||||
EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="序号" ColumnID="SortIndex" DataField="SortIndex" FieldType="Int"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="50px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="步骤" ColumnID="AuditFlowName" DataField="AuditFlowName" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="单位" ColumnID="UnitName" DataField="UnitName" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="审核/审批人" ColumnID="OperaterName" DataField="OperaterName" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="审核/审批时间" ColumnID="OperaterTime" DataField="OperaterTime"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="意见" ColumnID="Opinion" DataField="Opinion" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbTemp">
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
// F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['SupCostTypeName', 'CostTypeName'], { depends: true });
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
@@ -22,11 +23,6 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
ViewState["CostManageId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义集合
|
||||
/// </summary>
|
||||
private static List<Model.CostGoods_CostManageItem> costManageItems = new List<Model.CostGoods_CostManageItem>();
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
@@ -39,111 +35,47 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.CostManageId = Request.Params["CostManageId"];
|
||||
if (!string.IsNullOrEmpty(this.CostManageId))
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideRefreshReference();
|
||||
string strProjectId = this.CurrUser.LoginProjectId;
|
||||
this.CostManageId = Request.Params["CostManageId"] ?? SQLHelper.GetNewID();
|
||||
var costManage = BLL.CostManageService.GetCostManageById(this.CostManageId);
|
||||
if (costManage != null)
|
||||
{
|
||||
Model.CostGoods_CostManage costManage = BLL.CostManageService.GetCostManageById(this.CostManageId);
|
||||
if (costManage != null)
|
||||
{
|
||||
this.txtCostManageCode.Text = CodeRecordsService.ReturnCodeByDataId(this.CostManageId);
|
||||
this.txtCostManageName.Text = costManage.CostManageName;
|
||||
if (!string.IsNullOrEmpty(costManage.UnitId))
|
||||
{
|
||||
var unit = BLL.UnitService.GetUnitByUnitId(costManage.UnitId);
|
||||
if (unit != null)
|
||||
{
|
||||
this.txtUnitName.Text = unit.UnitName;
|
||||
}
|
||||
}
|
||||
this.txtContractNum.Text = costManage.ContractNum;
|
||||
if (costManage.CostManageDate != null)
|
||||
{
|
||||
this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", costManage.CostManageDate);
|
||||
}
|
||||
this.txtOpinion.Text = costManage.Opinion;
|
||||
this.txtSubHSE.Text = costManage.SubHSE;
|
||||
this.txtSubCN.Text = costManage.SubCN;
|
||||
this.txtSubProject.Text = costManage.SubProject;
|
||||
}
|
||||
strProjectId = costManage.ProjectId;
|
||||
this.drpUnit.Text=UnitService.GetUnitNameByUnitId(costManage.UnitId);
|
||||
this.txtContractNum.Text = costManage.ContractNum;
|
||||
this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", costManage.CostManageDate);
|
||||
this.txtProjectName.Text = ProjectService.GetProjectNameByProjectId(strProjectId);
|
||||
this.txtHseCost.Text = ProjectUnitService.GetSumHSECost(strProjectId, costManage.UnitId).ToString();
|
||||
this.txtGetCost.Text = CostManageService.GetSumHSECost(strProjectId, costManage.UnitId, this.CostManageId).ToString();
|
||||
BindGrid();
|
||||
BindGrid2();
|
||||
}
|
||||
///初始化审核菜单
|
||||
this.ctlAuditFlow.MenuId = BLL.Const.ProjectCostManageMenuId;
|
||||
this.ctlAuditFlow.DataId = this.CostManageId;
|
||||
}
|
||||
}
|
||||
|
||||
#region 计算合计及各行总价
|
||||
/// <summary>
|
||||
/// 计算合计
|
||||
/// </summary>
|
||||
private void OutputSummaryData()
|
||||
{
|
||||
Grid1.CommitChanges();
|
||||
decimal sumTotalMoney = 0, sumAuditTotalMoney = 0, totalMoney = 0, auditTotalMoney = 0, priceMoney = 0, auditPriceMoney = 0;
|
||||
int counts = 0, auditCounts = 0;
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
counts = Funs.GetNewIntOrZero(this.Grid1.Rows[i].Values[3].ToString());
|
||||
priceMoney = Funs.GetNewDecimalOrZero(this.Grid1.Rows[i].Values[4].ToString());
|
||||
totalMoney = counts * priceMoney;
|
||||
sumTotalMoney += totalMoney;
|
||||
this.Grid1.Rows[i].Values[5] = totalMoney.ToString();
|
||||
auditCounts = Funs.GetNewIntOrZero(this.Grid1.Rows[i].Values[6].ToString());
|
||||
auditPriceMoney = Funs.GetNewDecimalOrZero(this.Grid1.Rows[i].Values[7].ToString());
|
||||
auditTotalMoney = auditCounts * auditPriceMoney;
|
||||
sumAuditTotalMoney += auditTotalMoney;
|
||||
this.Grid1.Rows[i].Values[8] = auditTotalMoney.ToString();
|
||||
}
|
||||
if (this.Grid1.Rows.Count > 0)
|
||||
{
|
||||
JObject summary = new JObject();
|
||||
summary.Add("PriceMoney", "总计");
|
||||
summary.Add("TotalMoney", sumTotalMoney);
|
||||
summary.Add("AuditTotalMoney", sumAuditTotalMoney);
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
else
|
||||
{
|
||||
Grid1.SummaryData = null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 绑定Grid
|
||||
/// <summary>
|
||||
/// 绑定Grid
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
costManageItems = BLL.CostManageItemService.GetCostManageItemByCostManageId(this.CostManageId);
|
||||
var costManageItems = BLL.CostManageItemService.GetCostManageItemByCostManageId(this.CostManageId);
|
||||
this.Grid1.DataSource = costManageItems;
|
||||
this.Grid1.PageIndex = 0;
|
||||
this.Grid1.DataBind();
|
||||
OutputSummaryData();
|
||||
OutputSummaryData(costManageItems);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 改变索引事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
private void OutputSummaryData(List<Model.CostGoods_CostManageItem> getItem)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
JObject summary = new JObject();
|
||||
summary.Add("InvestCostProject", "本次申请合计金额(元)");
|
||||
summary.Add("PriceMoney", getItem.Sum(x => x.PriceMoney ?? 0));
|
||||
Grid1.SummaryData = summary;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -157,6 +89,39 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region BindGrid2
|
||||
/// <summary>
|
||||
/// 绑定Grid
|
||||
/// </summary>
|
||||
private void BindGrid2()
|
||||
{
|
||||
var FlowOperates = from x in Funs.DB.CostGoods_CostManageFlowOperate
|
||||
where x.CostManageId == this.CostManageId
|
||||
select new
|
||||
{
|
||||
x.FlowOperateId,
|
||||
x.CostManageId,
|
||||
x.AuditFlowName,
|
||||
x.SortIndex,
|
||||
x.UnitId,
|
||||
UnitName = Funs.DB.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName,
|
||||
x.OperaterId,
|
||||
OperaterName = Funs.DB.Person_Persons.First(u => u.PersonId == x.OperaterId).PersonName,
|
||||
x.OperaterTime,
|
||||
x.IsAgree,
|
||||
x.Opinion,
|
||||
x.IsClosed
|
||||
};
|
||||
|
||||
this.Grid2.DataSource = FlowOperates.OrderByDescending(x=> x.SortIndex);
|
||||
this.Grid2.DataBind();
|
||||
if (FlowOperates.FirstOrDefault(x => x.OperaterId != null) != null)
|
||||
{
|
||||
this.Grid2.Hidden = false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
@@ -167,52 +132,9 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.CostManageId))
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CostManageAttachUrl&menuId={1}", this.CostManageId, BLL.Const.ProjectCostManageMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CostManageAttachUrl&menuId={1}&type=-1", this.CostManageId, BLL.Const.ProjectCostManageMenuId)));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 格式化字符串
|
||||
/// <summary>
|
||||
/// 获取总价
|
||||
/// </summary>
|
||||
/// <param name="costManageId"></param>
|
||||
/// <returns></returns>
|
||||
protected string GetTotalMoney(object costManageItemId)
|
||||
{
|
||||
string total = string.Empty;
|
||||
if (costManageItemId != null)
|
||||
{
|
||||
var costManageItem = BLL.CostManageItemService.GetCostManageItemById(costManageItemId.ToString());
|
||||
if (costManageItem != null)
|
||||
{
|
||||
decimal? price = costManageItem.PriceMoney;
|
||||
int? count = costManageItem.Counts;
|
||||
total = Convert.ToString(price * count);
|
||||
}
|
||||
}
|
||||
return total;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取审核总价
|
||||
/// </summary>
|
||||
/// <param name="costManageId"></param>
|
||||
/// <returns></returns>
|
||||
protected string GetAuditTotalMoney(object costManageItemId)
|
||||
{
|
||||
string total = string.Empty;
|
||||
if (costManageItemId != null)
|
||||
{
|
||||
var costManageItem = BLL.CostManageItemService.GetCostManageItemById(costManageItemId.ToString());
|
||||
if (costManageItem != null)
|
||||
{
|
||||
decimal? auditPrice = costManageItem.AuditPriceMoney;
|
||||
int? auditCount = costManageItem.AuditCounts;
|
||||
total = Convert.ToString(auditPrice * auditCount);
|
||||
}
|
||||
}
|
||||
return total;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
+21
-118
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
|
||||
|
||||
public partial class CostManageView {
|
||||
public partial class CostManageView
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -40,31 +42,22 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// txtCostManageCode 控件。
|
||||
/// txtProjectName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCostManageCode;
|
||||
protected global::FineUIPro.TextBox txtProjectName;
|
||||
|
||||
/// <summary>
|
||||
/// txtCostManageName 控件。
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCostManageName;
|
||||
|
||||
/// <summary>
|
||||
/// txtUnitName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUnitName;
|
||||
protected global::FineUIPro.TextBox drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// txtContractNum 控件。
|
||||
@@ -85,13 +78,22 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
protected global::FineUIPro.TextBox txtCostManageDate;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// txtHseCost 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
protected global::FineUIPro.TextBox txtHseCost;
|
||||
|
||||
/// <summary>
|
||||
/// txtGetCost 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtGetCost;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
@@ -111,15 +113,6 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// lblT 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lblT;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill2 控件。
|
||||
/// </summary>
|
||||
@@ -130,103 +123,13 @@ namespace FineUIPro.Web.HSSE.CostGoods {
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
||||
|
||||
/// <summary>
|
||||
/// lblTotalMoney 控件。
|
||||
/// Grid2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblTotalMoney;
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// txtOpinion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtOpinion;
|
||||
|
||||
/// <summary>
|
||||
/// txtSubHSE 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSubHSE;
|
||||
|
||||
/// <summary>
|
||||
/// txtSubCN 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSubCN;
|
||||
|
||||
/// <summary>
|
||||
/// txtSubProject 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSubProject;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ctlAuditFlow 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.FlowOperateControl ctlAuditFlow;
|
||||
protected global::FineUIPro.Grid Grid2;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CostSummary.aspx.cs"
|
||||
Inherits="FineUIPro.Web.HSSE.CostGoods.CostSummary" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>项目HSE费用汇总</title>
|
||||
<style type="text/css">
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="项目HSE费用汇总" runat="server" BoxFlex="1" ForceFit="true"
|
||||
AllowPaging="false" IsDatabasePaging="true" PageSize="100" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableColumnLines="true" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" ID="drpUnit" EnableEdit="true" Width="300px"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<%--<f:DatePicker runat="server" Required="true" DateFormatString="yyyy" EmptyText="请选择年度" AutoPostBack="true"
|
||||
ID="txtYear" DisplayType="Year" ShowTodayButton="false" OnTextChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DatePicker>--%>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<%-- <f:Button ID="btnSearch" runat="server" Icon="SystemSearch" ToolTip="查询" OnClick="btnSearch_Click">
|
||||
</f:Button>--%>
|
||||
<f:Button ID="btnUnit" Text="按单位" Icon="Table" EnablePostBack="false"
|
||||
runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window2" Title="按单位" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Maximized="true"
|
||||
Width="1200px" Height="650px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
// F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
//function onGridDataLoad() {
|
||||
// this.mergeColumns(['SupCostTypeName'], { depends: true });
|
||||
//}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['GroupB']);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,337 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
public partial class CostSummary : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目id
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#region Page_Init
|
||||
|
||||
// 注意:动态创建的代码需要放置于Page_Init(不是Page_Load),这样每次构造页面时都会执行
|
||||
protected void Page_Init(object sender, EventArgs e)
|
||||
{
|
||||
InitYearGrid();
|
||||
}
|
||||
|
||||
protected static int sDate = 0;
|
||||
protected static int eDate = 0;
|
||||
#region 按年份
|
||||
private void InitYearGrid()
|
||||
{
|
||||
FineUIPro.BoundField bf;
|
||||
FineUIPro.GroupField gr;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = "Id";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "编号";
|
||||
bf.Width = 60;
|
||||
bf.Hidden = true;
|
||||
Grid1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = "SupCostTypeName";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "类别名称";
|
||||
bf.ColumnID = "GroupB";
|
||||
bf.Width = 90;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
Grid1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = "CostTypeName";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "分项名称";
|
||||
bf.Width = 120;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
Grid1.Columns.Add(bf);
|
||||
|
||||
this.ProjectId = this.ProjectId ?? this.CurrUser.LoginProjectId;
|
||||
var getProject = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == this.ProjectId);
|
||||
if (getProject != null)
|
||||
{
|
||||
sDate = getProject.StartDate.HasValue ? getProject.StartDate.Value.Year : DateTime.Now.Year;
|
||||
eDate = getProject.EndDate.HasValue ? getProject.EndDate.Value.Year : DateTime.Now.Year;
|
||||
var getCostEx = Funs.DB.CostGoods_Expense.Where(x => x.ProjectId == this.ProjectId);
|
||||
if (getCostEx.Count() > 0)
|
||||
{
|
||||
var getMaxYear = getCostEx.Max(x => x.Year);
|
||||
if (getMaxYear.HasValue && getMaxYear > eDate)
|
||||
{
|
||||
eDate = getMaxYear.Value;
|
||||
}
|
||||
var getMinYear = getCostEx.Min(x => x.Year);
|
||||
if (getMinYear.HasValue && getMinYear < sDate)
|
||||
{
|
||||
sDate = getMinYear.Value;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; sDate + i <= eDate; i++)
|
||||
{
|
||||
gr = new FineUIPro.GroupField();
|
||||
gr.HeaderText = (sDate + i).ToString() + "年(元)";
|
||||
gr.HeaderTextAlign= TextAlign.Center;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = (sDate + i).ToString() +"a";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "计划";
|
||||
bf.Width = 100;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
gr.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = (sDate + i).ToString() +"b";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "申请";
|
||||
bf.Width = 100;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
gr.Columns.Add(bf);
|
||||
|
||||
Grid1.Columns.Add(gr);
|
||||
}
|
||||
}
|
||||
|
||||
gr = new FineUIPro.GroupField();
|
||||
gr.HeaderText = "合计(元)";
|
||||
gr.HeaderTextAlign = TextAlign.Center;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = "SumC";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "计划";
|
||||
bf.Width = 90;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
gr.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = "SumD";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "申请";
|
||||
bf.Width = 90;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
gr.Columns.Add(bf);
|
||||
|
||||
Grid1.Columns.Add(gr);
|
||||
Grid1.DataKeyNames = new string[] { "Id", "CostTypeName" };
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
////权限按钮方法
|
||||
this.btnUnit.OnClientClick = Window2.GetShowReference("CostSummaryUnit.aspx") + "return false;";
|
||||
UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, false);
|
||||
Funs.FineUIPleaseSelect(drpUnit, "请选择单位");
|
||||
LoadData();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据
|
||||
/// </summary>
|
||||
private void LoadData()
|
||||
{
|
||||
DataTable tb = GetDataTable(); //this.LINQToDataTable(getData.ToList());
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取模拟树表格
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DataTable GetDataTable()
|
||||
{
|
||||
DataTable table = new DataTable();
|
||||
table.Columns.Add(new DataColumn("Id", typeof(string)));
|
||||
table.Columns.Add(new DataColumn("SupCostTypeName", typeof(string)));
|
||||
table.Columns.Add(new DataColumn("CostTypeName", typeof(string)));
|
||||
for (int i = 0; sDate + i <= eDate; i++)
|
||||
{
|
||||
table.Columns.Add(new DataColumn((sDate + i).ToString() +"a", typeof(string)));
|
||||
table.Columns.Add(new DataColumn((sDate + i).ToString() + "b", typeof(string)));
|
||||
}
|
||||
|
||||
table.Columns.Add(new DataColumn("SumC", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("SumD", typeof(String)));
|
||||
|
||||
if (!string.IsNullOrEmpty(this.drpUnit.SelectedValue) && this.drpUnit.SelectedValue != Const._Null)
|
||||
{
|
||||
string unitId = this.drpUnit.SelectedValue;
|
||||
SetRow(table, unitId);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetRow(table, null);
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置table
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
/// <param name="unitId"></param>
|
||||
private void SetRow(DataTable table, string unitId)
|
||||
{
|
||||
var getDetail = from x in Funs.DB.CostGoods_ExpenseDetail
|
||||
join y in Funs.DB.CostGoods_Expense on x.ExpenseId equals y.ExpenseId
|
||||
where y.ProjectId == this.ProjectId && (unitId == null || y.UnitId == unitId)
|
||||
orderby y.Year, x.SupSortIndex, x.SortIndex
|
||||
select new { x.ExpenseDetailId, x.ExpenseId, y.Year, x.SupCostTypeId, x.SupCostTypeName, x.SupSortIndex, x.CostType, x.CostTypeName, x.SortIndex, x.CostMoney };
|
||||
var getType = (from x in getDetail select new { x.SupSortIndex, x.SortIndex, x.CostType }).Distinct();
|
||||
|
||||
var getCostManageItem = from x in Funs.DB.CostGoods_CostManageItem
|
||||
join y in Funs.DB.CostGoods_CostManage on x.CostManageId equals y.CostManageId
|
||||
where y.ProjectId == this.ProjectId && (unitId == null || y.UnitId == unitId)
|
||||
select new { x.CostManageId, x.CostManageItemId, Year = y.CostManageDate.Value.Year, x.SupCostTypeId, x.CostTypeId, x.PriceMoney };
|
||||
|
||||
foreach (var item in getType)
|
||||
{
|
||||
decimal sumC = 0;
|
||||
decimal sumCD = 0;
|
||||
|
||||
var getD = getDetail.FirstOrDefault(x => x.CostType == item.CostType);
|
||||
if (getD != null)
|
||||
{
|
||||
DataRow row = table.NewRow();
|
||||
row[0] = getD.ExpenseDetailId + "#" + getD.ExpenseId;
|
||||
row[1] = getD.SupCostTypeName;
|
||||
row[2] = getD.CostTypeName;
|
||||
int r = 3;
|
||||
for (int i = 0; sDate + i <= eDate; i++)
|
||||
{
|
||||
row[r] = 0.00;
|
||||
var getV = getDetail.Where(x => x.Year == sDate + i && x.CostType == item.CostType);
|
||||
if (getV.Count() > 0)
|
||||
{
|
||||
decimal c = getV.Sum(x => x.CostMoney ?? 0);
|
||||
row[r] = c;
|
||||
sumC += c;
|
||||
}
|
||||
|
||||
row[r + 1] = 0.00;
|
||||
var getCD = getCostManageItem.Where(x => x.Year == sDate + i && x.CostTypeId == item.CostType);
|
||||
if (getCD.Count() > 0)
|
||||
{
|
||||
decimal d = getCD.Sum(x => x.PriceMoney ?? 0);
|
||||
row[r + 1] = d;
|
||||
sumCD += d;
|
||||
}
|
||||
|
||||
r = r + 2;
|
||||
}
|
||||
|
||||
row[r] = sumC;
|
||||
row[r + 1] = sumCD;
|
||||
table.Rows.Add(row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("项目HSE费用汇总" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = this.Grid1.RecordCount;
|
||||
|
||||
Response.Write(GetGridTableHtml(this.Grid1));
|
||||
Response.End();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页 排序
|
||||
/// <summary>
|
||||
/// 改变索引事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
LoadData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
|
||||
LoadData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
LoadData();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 单位查询事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.LoadData();
|
||||
}
|
||||
|
||||
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
LoadData();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
|
||||
|
||||
public partial class CostSummary
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// btnUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnUnit;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CostSummaryUnit.aspx.cs"
|
||||
Inherits="FineUIPro.Web.HSSE.CostGoods.CostSummaryUnit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>费用计划</title>
|
||||
<style type="text/css">
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="费用计划" runat="server" BoxFlex="1" ForceFit="true"
|
||||
AllowPaging="false" IsDatabasePaging="true" PageSize="100" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableColumnLines="true" EnableTextSelection="True" >
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DatePicker runat="server" Required="true" DateFormatString="yyyy" EmptyText="请选择年度" AutoPostBack="true" AutoShowClearIcon="true"
|
||||
ID="txtYear" DisplayType="Year" ShowTodayButton="false" OnTextChanged="drpUnit_SelectedIndexChanged" OnClearIconClick="txtYear_ClearIconClick">
|
||||
</f:DatePicker>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<%-- <f:Button ID="btnSearch" runat="server" Icon="SystemSearch" ToolTip="查询" OnClick="btnSearch_Click">
|
||||
</f:Button>--%>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="FolderUp" Hidden="true"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="费用计划" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true"
|
||||
Width="1200px" Height="650px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
// F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['GroupB']);
|
||||
}
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,372 @@
|
||||
using BLL;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
public partial class CostSummaryUnit : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目id
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#region Page_Init
|
||||
|
||||
// 注意:动态创建的代码需要放置于Page_Init(不是Page_Load),这样每次构造页面时都会执行
|
||||
protected void Page_Init(object sender, EventArgs e)
|
||||
{
|
||||
InitUnitGrid();
|
||||
}
|
||||
|
||||
protected static List<Model.Base_Unit> getUnit= new List<Model.Base_Unit>();
|
||||
protected static List<Model.Base_Unit> getSUnit = new List<Model.Base_Unit>();
|
||||
|
||||
#region 按年份
|
||||
private void InitUnitGrid()
|
||||
{
|
||||
FineUIPro.BoundField bf;
|
||||
FineUIPro.GroupField gr;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = "Id";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "编号";
|
||||
bf.Width = 60;
|
||||
bf.Hidden = true;
|
||||
Grid1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = "SupCostTypeName";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "类别名称";
|
||||
bf.ColumnID = "GroupB";
|
||||
bf.Width = 90;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
Grid1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = "CostTypeName";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "分项名称";
|
||||
bf.Width = 150;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
Grid1.Columns.Add(bf);
|
||||
|
||||
this.ProjectId = this.ProjectId ?? this.CurrUser.LoginProjectId;
|
||||
getUnit = (from x in Funs.DB.Project_ProjectUnit
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_1
|
||||
select y).ToList();
|
||||
foreach (var item in getUnit)
|
||||
{
|
||||
gr = new FineUIPro.GroupField();
|
||||
gr.HeaderText = item.UnitName + "(元)";
|
||||
gr.HeaderTextAlign = TextAlign.Center;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = item.UnitId+"a";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "计划";
|
||||
bf.Width = 100;
|
||||
gr.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = item.UnitId + "b";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "申请";
|
||||
bf.Width = 100;
|
||||
gr.Columns.Add(bf);
|
||||
|
||||
Grid1.Columns.Add(gr);
|
||||
}
|
||||
getSUnit = (from x in Funs.DB.Project_ProjectUnit
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
where x.ProjectId == this.ProjectId && x.UnitType == Const.ProjectUnitType_2
|
||||
select y).ToList();
|
||||
foreach (var item in getSUnit)
|
||||
{
|
||||
gr = new FineUIPro.GroupField();
|
||||
gr.HeaderText = item.UnitName + "(元)";
|
||||
gr.HeaderTextAlign = TextAlign.Center;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = item.UnitId + "a";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "计划";
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.Width = 100;
|
||||
gr.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = item.UnitId + "b";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "申请";
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
bf.Width = 100;
|
||||
gr.Columns.Add(bf);
|
||||
|
||||
Grid1.Columns.Add(gr);
|
||||
}
|
||||
|
||||
gr = new FineUIPro.GroupField();
|
||||
gr.HeaderText = "合计(元)";
|
||||
gr.HeaderTextAlign = TextAlign.Center;
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = "SumC";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "计划";
|
||||
bf.Width = 90;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
gr.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = "SumD";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "申请";
|
||||
bf.Width = 90;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
gr.Columns.Add(bf);
|
||||
Grid1.Columns.Add(gr);
|
||||
|
||||
Grid1.DataKeyNames = new string[] { "Id", "CostTypeName" };
|
||||
if (Grid1.Columns.Count() > 9)
|
||||
{
|
||||
Grid1.ForceFit = false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
LoadData();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据
|
||||
/// </summary>
|
||||
private void LoadData()
|
||||
{
|
||||
DataTable tb = GetDataTable(); //this.LINQToDataTable(getData.ToList());
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取模拟树表格
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DataTable GetDataTable()
|
||||
{
|
||||
DataTable table = new DataTable();
|
||||
table.Columns.Add(new DataColumn("Id", typeof(string)));
|
||||
table.Columns.Add(new DataColumn("SupCostTypeName", typeof(string)));
|
||||
table.Columns.Add(new DataColumn("CostTypeName", typeof(string)));
|
||||
foreach (var item in getUnit)
|
||||
{
|
||||
table.Columns.Add(new DataColumn(item.UnitId+"a", typeof(string)));
|
||||
table.Columns.Add(new DataColumn(item.UnitId+"b", typeof(string)));
|
||||
}
|
||||
foreach (var item in getSUnit)
|
||||
{
|
||||
table.Columns.Add(new DataColumn(item.UnitId + "a", typeof(string)));
|
||||
table.Columns.Add(new DataColumn(item.UnitId + "b", typeof(string)));
|
||||
}
|
||||
|
||||
table.Columns.Add(new DataColumn("SumC", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("SumD", typeof(String)));
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtYear.Text))
|
||||
{
|
||||
int year = Funs.GetNewIntOrZero(this.txtYear.Text);
|
||||
SetTable(table, year);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetTable(table, null);
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置table
|
||||
/// </summary>
|
||||
/// <param name="table"></param>
|
||||
/// <param name="year"></param>
|
||||
private void SetTable(DataTable table, int? year)
|
||||
{
|
||||
var getDetail = from x in Funs.DB.CostGoods_ExpenseDetail
|
||||
join y in Funs.DB.CostGoods_Expense on x.ExpenseId equals y.ExpenseId
|
||||
where y.ProjectId == this.ProjectId && (!year.HasValue || y.Year == year)
|
||||
orderby y.Year, x.SupSortIndex, x.SortIndex
|
||||
select new { x.ExpenseDetailId, x.ExpenseId, y.UnitId, y.Year, x.SupCostTypeId, x.SupCostTypeName, x.SupSortIndex, x.CostType, x.CostTypeName, x.SortIndex, x.CostMoney };
|
||||
|
||||
var getCostManageItem = from x in Funs.DB.CostGoods_CostManageItem
|
||||
join y in Funs.DB.CostGoods_CostManage on x.CostManageId equals y.CostManageId
|
||||
where y.ProjectId == this.ProjectId && (!year.HasValue || y.CostManageDate.Value.Year == year)
|
||||
select new { x.CostManageId, x.CostManageItemId, y.UnitId, Year = y.CostManageDate.Value.Year, x.SupCostTypeId, x.CostTypeId, x.PriceMoney };
|
||||
|
||||
var getType = (from x in getDetail select new { x.SupSortIndex, x.SortIndex, x.CostType }).Distinct();
|
||||
foreach (var item in getType)
|
||||
{
|
||||
decimal sumC = 0;
|
||||
decimal sumCD = 0;
|
||||
var getD = getDetail.FirstOrDefault(x => x.CostType == item.CostType);
|
||||
if (getD != null)
|
||||
{
|
||||
DataRow row = table.NewRow();
|
||||
row[0] = getD.ExpenseDetailId + "#" + getD.ExpenseId;
|
||||
row[1] = getD.SupCostTypeName;
|
||||
row[2] = getD.CostTypeName;
|
||||
int r = 3;
|
||||
foreach (var uitem in getUnit)
|
||||
{
|
||||
row[r] = 0.00;
|
||||
var getD1 = getDetail.Where(x => x.UnitId == uitem.UnitId && x.CostType == item.CostType);
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
decimal c = getD1.Sum(X => X.CostMoney ?? 0);
|
||||
row[r] = c;
|
||||
sumC += c;
|
||||
}
|
||||
|
||||
row[r + 1] = 0.00;
|
||||
var getCD = getCostManageItem.Where(x => x.UnitId == uitem.UnitId && x.CostTypeId == item.CostType);
|
||||
if (getCD.Count() > 0)
|
||||
{
|
||||
decimal d = getCD.Sum(x => x.PriceMoney ?? 0);
|
||||
row[r + 1] = d;
|
||||
sumCD += d;
|
||||
}
|
||||
r = r + 2;
|
||||
}
|
||||
|
||||
foreach (var suitem in getSUnit)
|
||||
{
|
||||
row[r] = 0.00;
|
||||
var getD1 = getDetail.Where(x => x.UnitId == suitem.UnitId && x.CostType == item.CostType);
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
decimal c = getD1.Sum(X => X.CostMoney ?? 0);
|
||||
row[r] = c;
|
||||
sumC += c;
|
||||
}
|
||||
|
||||
row[r + 1] = 0.00;
|
||||
var getCD = getCostManageItem.Where(x => x.UnitId == suitem.UnitId && x.CostTypeId == item.CostType);
|
||||
if (getCD.Count() > 0)
|
||||
{
|
||||
decimal d = getCD.Sum(x => x.PriceMoney ?? 0);
|
||||
row[r + 1] = d;
|
||||
sumCD += d;
|
||||
}
|
||||
r = r + 2;
|
||||
}
|
||||
|
||||
row[r] = sumC;
|
||||
row[r + 1] = sumCD;
|
||||
table.Rows.Add(row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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 = this.Grid1.RecordCount;
|
||||
|
||||
Response.Write(GetGridTableHtml(this.Grid1));
|
||||
Response.End();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页 排序
|
||||
/// <summary>
|
||||
/// 改变索引事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
LoadData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
|
||||
LoadData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
LoadData();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 单位查询事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.LoadData();
|
||||
}
|
||||
|
||||
protected void txtYear_ClearIconClick(object sender, EventArgs e)
|
||||
{
|
||||
this.txtYear.Text = string.Empty;
|
||||
this.LoadData();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
|
||||
|
||||
public partial class CostSummaryUnit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtYear 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtYear;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Listeners>
|
||||
<%-- <f:Listener Event="dataload" Handler="onGridDataLoad" />--%>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
@@ -88,9 +88,9 @@
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
//function onGridDataLoad(event) {
|
||||
// this.mergeColumns(['SupCostTypeName'], { depends: true });
|
||||
//}
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['GroupB']);
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
|
||||
@@ -45,13 +45,14 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "编号";
|
||||
bf.Width = 60;
|
||||
bf.Hidden = true;
|
||||
bf.Hidden = true;
|
||||
Grid1.Columns.Add(bf);
|
||||
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = "SupCostTypeName";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "类别名称";
|
||||
bf.ColumnID = "GroupB";
|
||||
bf.Width = 90;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
Grid1.Columns.Add(bf);
|
||||
@@ -68,8 +69,8 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
var getProject = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == this.ProjectId);
|
||||
if (getProject != null)
|
||||
{
|
||||
sDate= getProject.StartDate.HasValue ? getProject.StartDate.Value.Year : DateTime.Now.Year;
|
||||
eDate = getProject.EndDate.HasValue ? getProject.EndDate.Value.Year: DateTime.Now.Year;
|
||||
sDate = getProject.StartDate.HasValue ? getProject.StartDate.Value.Year : DateTime.Now.Year;
|
||||
eDate = getProject.EndDate.HasValue ? getProject.EndDate.Value.Year : DateTime.Now.Year;
|
||||
var getCostEx = Funs.DB.CostGoods_Expense.Where(x => x.ProjectId == this.ProjectId);
|
||||
if (getCostEx.Count() > 0)
|
||||
{
|
||||
@@ -90,7 +91,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = (sDate + i).ToString();
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = (sDate + i).ToString() +"年";
|
||||
bf.HeaderText = (sDate + i).ToString() + "年(元)";
|
||||
bf.Width = 200;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
Grid1.Columns.Add(bf);
|
||||
@@ -100,12 +101,13 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = "SumC";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "合计";
|
||||
bf.HeaderText = "合计(元)";
|
||||
bf.Width = 90;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
Grid1.Columns.Add(bf);
|
||||
|
||||
Grid1.DataKeyNames = new string[] { "Id", "CostTypeName" };
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -162,82 +164,54 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
|
||||
if (!string.IsNullOrEmpty(this.drpUnit.SelectedValue) && this.drpUnit.SelectedValue != Const._Null)
|
||||
{
|
||||
var getDetail = from x in Funs.DB.CostGoods_ExpenseDetail
|
||||
join y in Funs.DB.CostGoods_Expense on x.ExpenseId equals y.ExpenseId
|
||||
where y.ProjectId == this.ProjectId && y.UnitId == this.drpUnit.SelectedValue
|
||||
orderby y.Year, x.SupSortIndex, x.SortIndex
|
||||
select new { x.ExpenseDetailId, x.ExpenseId, y.Year, x.SupCostTypeId, x.SupCostTypeName, x.SupSortIndex, x.CostType, x.CostTypeName, x.SortIndex, x.CostMoney };
|
||||
var getType = (from x in getDetail select new { x.SupSortIndex, x.SortIndex, x.CostType }).Distinct();
|
||||
foreach (var item in getType)
|
||||
{
|
||||
var getD = getDetail.FirstOrDefault(x => x.CostType == item.CostType);
|
||||
if (getD != null)
|
||||
{
|
||||
DataRow row = table.NewRow();
|
||||
row[0] = getD.ExpenseDetailId + "#" + getD.ExpenseId;
|
||||
row[1] = getD.SupCostTypeName;
|
||||
row[2] = getD.CostTypeName;
|
||||
int r = 3;
|
||||
for (int i = 0; sDate + i <= eDate; i++)
|
||||
{
|
||||
var getV = getDetail.Where(x => x.Year == sDate + i && x.CostType == item.CostType);
|
||||
if (getV.Count() > 0)
|
||||
{
|
||||
row[r] = getV.Sum(x => x.CostMoney ?? 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
row[r] = 0.00;
|
||||
}
|
||||
|
||||
r = i + 4;
|
||||
}
|
||||
row[r] = getDetail.Where(x => x.CostType == item.CostType).Sum(x => x.CostMoney ?? 0);
|
||||
table.Rows.Add(row);
|
||||
}
|
||||
}
|
||||
SetTable(table, this.drpUnit.SelectedText);
|
||||
}
|
||||
else
|
||||
{
|
||||
var getDetail = from x in Funs.DB.CostGoods_ExpenseDetail
|
||||
join y in Funs.DB.CostGoods_Expense on x.ExpenseId equals y.ExpenseId
|
||||
where y.ProjectId == this.ProjectId
|
||||
orderby y.Year, x.SupSortIndex, x.SortIndex
|
||||
select new { x.ExpenseDetailId, x.ExpenseId, y.Year, x.SupCostTypeId, x.SupCostTypeName, x.SupSortIndex, x.CostType, x.CostTypeName, x.SortIndex, x.CostMoney };
|
||||
var getType = (from x in getDetail select new { x.SupSortIndex, x.SortIndex, x.CostType }).Distinct();
|
||||
foreach (var item in getType)
|
||||
{
|
||||
var getD = getDetail.FirstOrDefault(x => x.CostType == item.CostType);
|
||||
if (getD != null)
|
||||
{
|
||||
DataRow row = table.NewRow();
|
||||
row[0] = getD.ExpenseDetailId + "#" + getD.ExpenseId;
|
||||
row[1] = getD.SupCostTypeName;
|
||||
row[2] = getD.CostTypeName;
|
||||
int r = 3;
|
||||
for (int i = 0; sDate + i <= eDate; i++)
|
||||
{
|
||||
var getV = getDetail.Where(x => x.Year == sDate + i && x.CostType == item.CostType);
|
||||
if (getV.Count() > 0)
|
||||
{
|
||||
row[r] = getV.Sum(x => x.CostMoney ?? 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
row[r] = "0.00";
|
||||
}
|
||||
|
||||
r = i + 4;
|
||||
}
|
||||
row[r] = getDetail.Where(x => x.CostType == item.CostType).Sum(x => x.CostMoney ?? 0);
|
||||
table.Rows.Add(row);
|
||||
}
|
||||
}
|
||||
SetTable(table, null);
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
private void SetTable(DataTable table,string unitId)
|
||||
{
|
||||
var getDetail = from x in Funs.DB.CostGoods_ExpenseDetail
|
||||
join y in Funs.DB.CostGoods_Expense on x.ExpenseId equals y.ExpenseId
|
||||
where y.ProjectId == this.ProjectId && (unitId == null || y.UnitId == this.drpUnit.SelectedValue)
|
||||
orderby y.Year, x.SupSortIndex, x.SortIndex
|
||||
select new { x.ExpenseDetailId, x.ExpenseId, y.Year, x.SupCostTypeId, x.SupCostTypeName, x.SupSortIndex, x.CostType, x.CostTypeName, x.SortIndex, x.CostMoney };
|
||||
var getType = (from x in getDetail select new { x.SupSortIndex, x.SortIndex, x.CostType }).Distinct();
|
||||
foreach (var item in getType)
|
||||
{
|
||||
var getD = getDetail.FirstOrDefault(x => x.CostType == item.CostType);
|
||||
if (getD != null)
|
||||
{
|
||||
DataRow row = table.NewRow();
|
||||
row[0] = getD.ExpenseDetailId + "#" + getD.ExpenseId;
|
||||
row[1] = getD.SupCostTypeName;
|
||||
row[2] = getD.CostTypeName;
|
||||
int r = 3;
|
||||
for (int i = 0; sDate + i <= eDate; i++)
|
||||
{
|
||||
var getV = getDetail.Where(x => x.Year == sDate + i && x.CostType == item.CostType);
|
||||
if (getV.Count() > 0)
|
||||
{
|
||||
row[r] = getV.Sum(x => x.CostMoney ?? 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
row[r] = 0.00;
|
||||
}
|
||||
|
||||
r = r + 1;
|
||||
}
|
||||
row[r] = getDetail.Where(x => x.CostType == item.CostType).Sum(x => x.CostMoney ?? 0);
|
||||
table.Rows.Add(row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
HeaderTextAlign="Center" TextAlign="Center" HeaderText="分项名称">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="CostMoney" DataField="CostMoney" SortField="CostMoney"
|
||||
FieldType="Double" HeaderTextAlign="Center" TextAlign="Left" HeaderText="计划费用">
|
||||
FieldType="Double" HeaderTextAlign="Center" TextAlign="Left" HeaderText="计划费用(元)">
|
||||
<Editor>
|
||||
<f:NumberBox ID="txtCostMoney" Text='<%# Eval("CostMoney")%>' runat="server" DecimalPrecision="2" NoNegative="true">
|
||||
</f:NumberBox>
|
||||
@@ -57,6 +57,9 @@
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
@@ -82,5 +85,10 @@
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['SupCostTypeName']);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
return;
|
||||
}
|
||||
this.SaveData(BLL.Const.BtnSave);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
</Toolbars>
|
||||
|
||||
<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
@@ -78,7 +79,9 @@
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['GroupB']);
|
||||
}
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
bf.DataField = "SupCostTypeName";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "类别名称";
|
||||
bf.ColumnID = "GroupB";
|
||||
bf.Width = 90;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
Grid1.Columns.Add(bf);
|
||||
@@ -73,7 +74,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = item.UnitId;
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = item.UnitName;
|
||||
bf.HeaderText = item.UnitName+ "(元)";
|
||||
bf.Width = 200;
|
||||
Grid1.Columns.Add(bf);
|
||||
}
|
||||
@@ -86,7 +87,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = item.UnitId;
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = item.UnitName;
|
||||
bf.HeaderText = item.UnitName+ "(元)";
|
||||
bf.Width = 220;
|
||||
Grid1.Columns.Add(bf);
|
||||
}
|
||||
@@ -94,7 +95,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
bf = new FineUIPro.BoundField();
|
||||
bf.DataField = "SumC";
|
||||
bf.DataFormatString = "{0}";
|
||||
bf.HeaderText = "合计";
|
||||
bf.HeaderText = "合计(元)";
|
||||
bf.Width = 90;
|
||||
bf.HeaderTextAlign = TextAlign.Center;
|
||||
Grid1.Columns.Add(bf);
|
||||
@@ -156,126 +157,84 @@ namespace FineUIPro.Web.HSSE.CostGoods
|
||||
{
|
||||
table.Columns.Add(new DataColumn(item.UnitId, typeof(string)));
|
||||
}
|
||||
|
||||
table.Columns.Add(new DataColumn("SumC", typeof(String)));
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtYear.Text))
|
||||
{
|
||||
int year = Funs.GetNewIntOrZero(this.txtYear.Text);
|
||||
var getDetail = from x in Funs.DB.CostGoods_ExpenseDetail
|
||||
join y in Funs.DB.CostGoods_Expense on x.ExpenseId equals y.ExpenseId
|
||||
where y.ProjectId == this.ProjectId && y.Year == year
|
||||
orderby y.Year, x.SupSortIndex, x.SortIndex
|
||||
select new { x.ExpenseDetailId, x.ExpenseId,y.UnitId, y.Year, x.SupCostTypeId, x.SupCostTypeName, x.SupSortIndex, x.CostType, x.CostTypeName, x.SortIndex, x.CostMoney };
|
||||
var getType = (from x in getDetail select new { x.SupSortIndex, x.SortIndex, x.CostType }).Distinct();
|
||||
foreach (var item in getType)
|
||||
{
|
||||
var getD = getDetail.FirstOrDefault(x => x.CostType == item.CostType);
|
||||
if (getD != null)
|
||||
{
|
||||
DataRow row = table.NewRow();
|
||||
row[0] = getD.ExpenseDetailId + "#" + getD.ExpenseId;
|
||||
row[1] = getD.SupCostTypeName;
|
||||
row[2] = getD.CostTypeName;
|
||||
int r = 3;
|
||||
foreach (var uitem in getUnit)
|
||||
{
|
||||
var getD1 = getDetail.Where(x => x.UnitId == uitem.UnitId && x.CostType == item.CostType);
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
row[r] = getD1.Sum(X => X.CostMoney ?? 0).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
row[r] = 0.00;
|
||||
}
|
||||
|
||||
r++;
|
||||
}
|
||||
|
||||
foreach (var suitem in getSUnit)
|
||||
{
|
||||
var getD2 = getDetail.Where(x => x.UnitId == suitem.UnitId && x.CostType == item.CostType);
|
||||
if (getD2.Count() > 0)
|
||||
{
|
||||
row[r] = getD2.Sum(X => X.CostMoney ?? 0).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
row[r] = 0.00;
|
||||
}
|
||||
r++;
|
||||
}
|
||||
|
||||
row[r] = getDetail.Where(x => x.Year == getD.Year && x.CostType == item.CostType).Sum(x => x.CostMoney ?? 0);
|
||||
table.Rows.Add(row);
|
||||
}
|
||||
}
|
||||
SetTable(table, Funs.GetNewIntOrZero(this.txtYear.Text));
|
||||
}
|
||||
else
|
||||
{
|
||||
var getDetail = from x in Funs.DB.CostGoods_ExpenseDetail
|
||||
join y in Funs.DB.CostGoods_Expense on x.ExpenseId equals y.ExpenseId
|
||||
where y.ProjectId == this.ProjectId
|
||||
orderby y.Year, x.SupSortIndex, x.SortIndex
|
||||
select new { x.ExpenseDetailId, x.ExpenseId,y.UnitId, y.Year, x.SupCostTypeId, x.SupCostTypeName, x.SupSortIndex, x.CostType, x.CostTypeName, x.SortIndex, x.CostMoney };
|
||||
|
||||
var getType = (from x in getDetail select new { x.SupSortIndex, x.SortIndex, x.CostType }).Distinct();
|
||||
foreach (var item in getType)
|
||||
{
|
||||
var getD = getDetail.FirstOrDefault(x => x.CostType == item.CostType);
|
||||
if (getD != null)
|
||||
{
|
||||
DataRow row = table.NewRow();
|
||||
row[0] = getD.ExpenseDetailId + "#" + getD.ExpenseId;
|
||||
row[1] = getD.SupCostTypeName;
|
||||
row[2] = getD.CostTypeName;
|
||||
int r = 3;
|
||||
foreach (var uitem in getUnit)
|
||||
{
|
||||
var getD1 = getDetail.Where(x => x.UnitId == uitem.UnitId && x.CostType == item.CostType);
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
row[r] = getD1.Sum(X => X.CostMoney ?? 0).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
row[r] = 0.00;
|
||||
}
|
||||
|
||||
r++;
|
||||
}
|
||||
|
||||
foreach (var suitem in getSUnit)
|
||||
{
|
||||
var getD2 = getDetail.Where(x => x.UnitId == suitem.UnitId && x.CostType == item.CostType);
|
||||
if (getD2.Count() > 0)
|
||||
{
|
||||
row[r] = getD2.Sum(X => X.CostMoney ?? 0).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
row[r] = 0.00;
|
||||
}
|
||||
r++;
|
||||
}
|
||||
|
||||
row[r] = getDetail.Where(x => x.CostType == item.CostType).Sum(x => x.CostMoney ?? 0);
|
||||
table.Rows.Add(row);
|
||||
}
|
||||
}
|
||||
SetTable(table, null);
|
||||
}
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// <summary>
|
||||
/// 设置table
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
/// <param name="table"></param>
|
||||
/// <param name="year"></param>
|
||||
private void SetTable(DataTable table, int? year)
|
||||
{
|
||||
var getDetail = from x in Funs.DB.CostGoods_ExpenseDetail
|
||||
join y in Funs.DB.CostGoods_Expense on x.ExpenseId equals y.ExpenseId
|
||||
where y.ProjectId == this.ProjectId && (!year.HasValue || y.Year == year)
|
||||
orderby y.Year, x.SupSortIndex, x.SortIndex
|
||||
select new { x.ExpenseDetailId, x.ExpenseId, y.UnitId, y.Year, x.SupCostTypeId, x.SupCostTypeName, x.SupSortIndex, x.CostType, x.CostTypeName, x.SortIndex, x.CostMoney };
|
||||
var getType = (from x in getDetail select new { x.SupSortIndex, x.SortIndex, x.CostType }).Distinct();
|
||||
foreach (var item in getType)
|
||||
{
|
||||
var getD = getDetail.FirstOrDefault(x => x.CostType == item.CostType);
|
||||
if (getD != null)
|
||||
{
|
||||
DataRow row = table.NewRow();
|
||||
row[0] = getD.ExpenseDetailId + "#" + getD.ExpenseId;
|
||||
row[1] = getD.SupCostTypeName;
|
||||
row[2] = getD.CostTypeName;
|
||||
int r = 3;
|
||||
foreach (var uitem in getUnit)
|
||||
{
|
||||
var getD1 = getDetail.Where(x => x.UnitId == uitem.UnitId && x.CostType == item.CostType);
|
||||
if (getD1.Count() > 0)
|
||||
{
|
||||
row[r] = getD1.Sum(X => X.CostMoney ?? 0).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
row[r] = 0.00;
|
||||
}
|
||||
|
||||
r++;
|
||||
}
|
||||
|
||||
foreach (var suitem in getSUnit)
|
||||
{
|
||||
var getD2 = getDetail.Where(x => x.UnitId == suitem.UnitId && x.CostType == item.CostType);
|
||||
if (getD2.Count() > 0)
|
||||
{
|
||||
row[r] = getD2.Sum(X => X.CostMoney ?? 0).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
row[r] = 0.00;
|
||||
}
|
||||
r++;
|
||||
}
|
||||
|
||||
row[r] = getDetail.Where(x => x.Year == getD.Year && x.CostType == item.CostType).Sum(x => x.CostMoney ?? 0);
|
||||
table.Rows.Add(row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
|
||||
@@ -17,34 +17,37 @@
|
||||
<Rows>
|
||||
<f:FormRow ColumnWidths="50% 25% 20%">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" ID="drpUnit" EnableEdit="true" Label="单位"
|
||||
<f:DropDownList runat="server" ID="drpUnit" EnableEdit="true" Label="单位"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker runat="server" Required="true" DateFormatString="yyyy" Label="年度" AutoPostBack="true"
|
||||
ID="txtYear" DisplayType="Year" ShowTodayButton="false" OnTextChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DatePicker>
|
||||
<f:TextBox ID="txtReportDate" runat="server" Label="填报日期" Readonly="true">
|
||||
<f:TextBox ID="txtReportDate" runat="server" Label="填报日期" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
|
||||
BoxFlex="1" DataKeyNames="ExpenseDetailId" AllowCellEditing="true" SortField="SupSortIndex,SortIndex" AllowSorting="true"
|
||||
ClicksToEdit="1" DataIDField="ExpenseDetailId" EnableColumnLines="true" ForceFit="true"
|
||||
EnableHeaderMenu="false">
|
||||
EnableHeaderMenu="false">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="100px" ColumnID="SupCostTypeName" DataField="SupCostTypeName" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Center" HeaderText="类别名称">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="CostTypeName" DataField="CostTypeName" FieldType="String"
|
||||
<f:RenderField Width="100px" ColumnID="CostTypeName" DataField="CostTypeName" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Center" HeaderText="分项名称">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="CostMoney" DataField="CostMoney" SortField="CostMoney"
|
||||
FieldType="Double" HeaderTextAlign="Center" TextAlign="Left" HeaderText="计划费用" >
|
||||
FieldType="Double" HeaderTextAlign="Center" TextAlign="Left" HeaderText="计划费用(元)">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
@@ -67,5 +70,10 @@
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['SupCostTypeName']);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -205,11 +205,11 @@ namespace FineUIPro.Web.ProjectData
|
||||
|
||||
if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectUnitView.aspx?ProjectUnitId={0}", Grid1.SelectedRowID), "查看项目单位", 800, 500));
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectUnitView.aspx?ProjectUnitId={0}", Grid1.SelectedRowID), "查看项目单位", 900, 650));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectUnitSave.aspx?ProjectUnitId={0}", Grid1.SelectedRowID), "编辑项目单位", 800, 500));
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectUnitSave.aspx?ProjectUnitId={0}", Grid1.SelectedRowID), "编辑项目单位", 900, 650));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,96 +8,165 @@
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true" LabelWidth="140px"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="lbProjectName" runat="server" Label="项目名称"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="lbUnitName" runat="server" Label="单位名称"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnitType" Label="单位类型" runat="server" FocusOnPageLoad="true">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtCollCropCode" runat="server" Label="社会统一信用代码" Required="true"
|
||||
MaxLength="50" ShowRedStar="true" >
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtLinkName" runat="server" Label="联系人姓名"
|
||||
MaxLength="50" >
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpIdcardType" runat="server" Label="联系人证件类型" EnableEdit="true"
|
||||
>
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtIdcardNumber" runat="server" Label="联系人证件号"
|
||||
MaxLength="50" >
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtLinkMobile" runat="server" Label="联系人电话"
|
||||
MaxLength="50" >
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:RadioButtonList runat="server" ID="rblIsChina" Label="是否中国企业">
|
||||
<f:RadioItem Value="Y" Text="是" Selected="true"/>
|
||||
<f:RadioItem Value="N" Text="否" />
|
||||
</f:RadioButtonList>
|
||||
<f:RadioButtonList runat="server" ID="rblCollCropStatus" Label="是否黑名单企业">
|
||||
<f:RadioItem Value="Y" Text="是" />
|
||||
<f:RadioItem Value="N" Text="否" Selected="true" />
|
||||
</f:RadioButtonList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker runat="server" Label="入场时间" ID="txtInTime"></f:DatePicker>
|
||||
<f:DatePicker runat="server" Label="出场时间" ID="txtOutTime"></f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="nbPlanCostA" NoDecimal="false" NoNegative="false" MinValue="0" runat="server"
|
||||
Label="安全生产费</br>计划额(总额)" LabelWidth="120px" Hidden="true">
|
||||
</f:NumberBox>
|
||||
<f:NumberBox ID="nbPlanCostB" NoDecimal="false" NoNegative="false" MinValue="0" runat="server"
|
||||
Label="文明施工措施费</br>计划额(总额)" LabelWidth="120px" Hidden="true">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea runat="server" ID="txtContractRange" Label="承包范围" Height="60px">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</rows>
|
||||
<toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click" Text="保存">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</toolbars>
|
||||
</f:Form>
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true" LabelWidth="140px"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="lbProjectName" runat="server" Label="项目名称"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="lbUnitName" runat="server" Label="单位名称"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnitType" Label="单位类型" runat="server" FocusOnPageLoad="true">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtCollCropCode" runat="server" Label="社会统一信用代码" Required="true"
|
||||
MaxLength="50" ShowRedStar="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtLinkName" runat="server" Label="联系人姓名"
|
||||
MaxLength="50">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpIdcardType" runat="server" Label="联系人证件类型" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtIdcardNumber" runat="server" Label="联系人证件号"
|
||||
MaxLength="50">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtLinkMobile" runat="server" Label="联系人电话"
|
||||
MaxLength="50">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:RadioButtonList runat="server" ID="rblIsChina" Label="是否中国企业">
|
||||
<f:RadioItem Value="Y" Text="是" Selected="true" />
|
||||
<f:RadioItem Value="N" Text="否" />
|
||||
</f:RadioButtonList>
|
||||
<f:RadioButtonList runat="server" ID="rblCollCropStatus" Label="是否黑名单企业">
|
||||
<f:RadioItem Value="Y" Text="是" />
|
||||
<f:RadioItem Value="N" Text="否" Selected="true" />
|
||||
</f:RadioButtonList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker runat="server" Label="入场时间" ID="txtInTime"></f:DatePicker>
|
||||
<f:DatePicker runat="server" Label="出场时间" ID="txtOutTime"></f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="nbPlanCostA" NoDecimal="false" NoNegative="false" MinValue="0" runat="server"
|
||||
Label="安全生产费</br>计划额(总额)" LabelWidth="120px" Hidden="true">
|
||||
</f:NumberBox>
|
||||
<f:NumberBox ID="nbPlanCostB" NoDecimal="false" NoNegative="false" MinValue="0" runat="server"
|
||||
Label="文明施工措施费</br>计划额(总额)" LabelWidth="120px" Hidden="true">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea runat="server" ID="txtContractRange" Label="承包范围" Height="60px">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow runat="server" ID="tr0" Hidden="true">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="hdProjectUnitItemId" Hidden="true"></f:Label>
|
||||
<f:TextBox runat="server" ID="txtContractNum" Label="合同号" LabelWidth="80px"></f:TextBox>
|
||||
<f:NumberBox runat="server" ID="txtTotalMoney" Label="总金额(元)" LabelWidth="90px"
|
||||
DecimalPrecision="2" NoNegative="true"></f:NumberBox>
|
||||
<f:NumberBox runat="server" ID="txtHSEMoney" Label="HSE费用(元)" LabelWidth="100px"
|
||||
DecimalPrecision="2" NoNegative="true"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="费用明细" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProjectUnitItemId" EnableColumnLines="true"
|
||||
DataIDField="ProjectUnitItemId" AllowSorting="true" SortField="ContractNum" ForceFit="true"
|
||||
SortDirection="ASC" AllowPaging="false" IsDatabasePaging="true" PageSize="50"
|
||||
EnableRowDoubleClickEvent="true" Height="200px" OnRowDoubleClick="Grid1_RowDoubleClick"
|
||||
EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnAdd" Text="新增" Icon="Add" ValidateForms="SimpleForm1" runat="server"
|
||||
OnClick="btnAdd_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnItemSave" Text="保存" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
|
||||
OnClick="btnItemSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RenderField Width="200px" ColumnID="ContractNum" DataField="ContractNum" FieldType="String"
|
||||
HeaderText="合同号" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="TotalMoney" DataField="TotalMoney" FieldType="Double"
|
||||
HeaderText="总金额" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="HSEMoney" DataField="HSEMoney" FieldType="Double"
|
||||
HeaderText="HSE费用" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click" Text="保存">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||
runat="server" Text="编辑" Icon="Pencil">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除"
|
||||
Icon="Delete">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/jscript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.ProjectData
|
||||
{
|
||||
public partial class ProjectUnitSave : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 定义项
|
||||
/// </summary>
|
||||
@@ -20,6 +23,31 @@ namespace FineUIPro.Web.ProjectData
|
||||
}
|
||||
}
|
||||
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string UnitId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["UnitId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["UnitId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
@@ -42,11 +70,13 @@ namespace FineUIPro.Web.ProjectData
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(projectUnit.ProjectId);
|
||||
if (project != null)
|
||||
{
|
||||
this.ProjectId = projectUnit.ProjectId;
|
||||
this.lbProjectName.Text = project.ProjectName;
|
||||
}
|
||||
var unit = BLL.UnitService.GetUnitByUnitId(projectUnit.UnitId);
|
||||
if (unit != null)
|
||||
{
|
||||
this.UnitId = projectUnit.UnitId;
|
||||
this.lbUnitName.Text = unit.UnitName;
|
||||
this.txtCollCropCode.Text = unit.CollCropCode;
|
||||
this.txtLinkName.Text = unit.LinkName;
|
||||
@@ -81,6 +111,8 @@ namespace FineUIPro.Web.ProjectData
|
||||
}
|
||||
this.txtContractRange.Text = projectUnit.ContractRange;
|
||||
}
|
||||
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,5 +158,117 @@ namespace FineUIPro.Web.ProjectData
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
this.Grid1.DataSource =ProjectUnitService.GetProjectUnitItemList(this.ProjectId, this.UnitId);
|
||||
this.Grid1.PageIndex = 0;
|
||||
this.Grid1.DataBind();
|
||||
}
|
||||
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
private void EditData()
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInParent("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
reSetTable(true);
|
||||
var trainTypeItem = ProjectUnitService.GetProjectUnitItemById(Grid1.SelectedRowID);
|
||||
if (trainTypeItem != null)
|
||||
{
|
||||
this.txtContractNum.Text = trainTypeItem.ContractNum.ToString();
|
||||
this.txtTotalMoney.Text = trainTypeItem.TotalMoney.ToString();
|
||||
this.txtHSEMoney.Text = trainTypeItem.HSEMoney.ToString();
|
||||
this.hdProjectUnitItemId.Text = trainTypeItem.ProjectUnitItemId;
|
||||
}
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
BLL.ProjectUnitService.DeleteProjectUnitItemById(rowID);
|
||||
}
|
||||
}
|
||||
|
||||
this.BindGrid();
|
||||
this.reSetTable(false);
|
||||
this.ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
reSetTable(true);
|
||||
}
|
||||
|
||||
protected void btnItemSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.ProjectId) && !string.IsNullOrEmpty(this.UnitId))
|
||||
{
|
||||
Model.Project_ProjectUnitItem newItem = new Model.Project_ProjectUnitItem()
|
||||
{
|
||||
ProjectId = this.ProjectId,
|
||||
UnitId = this.UnitId,
|
||||
ContractNum = this.txtContractNum.Text.Trim(),
|
||||
TotalMoney = Funs.GetNewDecimalOrZero(this.txtTotalMoney.Text.Trim()),
|
||||
HSEMoney = Funs.GetNewDecimalOrZero(this.txtHSEMoney.Text.Trim()),
|
||||
};
|
||||
|
||||
var getItem = ProjectUnitService.GetProjectUnitItemById(this.hdProjectUnitItemId.Text);
|
||||
if (getItem != null)
|
||||
{
|
||||
newItem.ProjectUnitItemId = getItem.ProjectUnitItemId;
|
||||
ProjectUnitService.UpdateProjectUnitItem(newItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
newItem.CompileDate = DateTime.Now;
|
||||
newItem.CompileManId = this.CurrUser.PersonId;
|
||||
ProjectUnitService.AddProjectUnitItem(newItem);
|
||||
}
|
||||
|
||||
reSetTable(false);
|
||||
this.ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
this.BindGrid();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ShowNotify("请重新选择单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重置
|
||||
/// </summary>
|
||||
private void reSetTable(bool isShow)
|
||||
{
|
||||
this.txtContractNum.Focus();
|
||||
this.tr0.Hidden = !isShow;
|
||||
this.txtContractNum.Text = string.Empty;
|
||||
this.txtTotalMoney.Text = string.Empty;
|
||||
this.txtHSEMoney.Text = string.Empty;
|
||||
this.hdProjectUnitItemId.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
+121
-2
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.ProjectData {
|
||||
namespace FineUIPro.Web.ProjectData
|
||||
{
|
||||
|
||||
|
||||
public partial class ProjectUnitSave {
|
||||
public partial class ProjectUnitSave
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -174,6 +176,96 @@ namespace FineUIPro.Web.ProjectData {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtContractRange;
|
||||
|
||||
/// <summary>
|
||||
/// tr0 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow tr0;
|
||||
|
||||
/// <summary>
|
||||
/// hdProjectUnitItemId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label hdProjectUnitItemId;
|
||||
|
||||
/// <summary>
|
||||
/// txtContractNum 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtContractNum;
|
||||
|
||||
/// <summary>
|
||||
/// txtTotalMoney 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtTotalMoney;
|
||||
|
||||
/// <summary>
|
||||
/// txtHSEMoney 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtHSEMoney;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAdd 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnItemSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnItemSave;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -200,5 +292,32 @@ namespace FineUIPro.Web.ProjectData {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,28 @@
|
||||
<f:TextBox runat="server" Label="出场时间" ID="txtOutTime" Readonly="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="费用明细" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ProjectUnitItemId" EnableColumnLines="true"
|
||||
DataIDField="ProjectUnitItemId" AllowSorting="true" SortField="ContractNum" ForceFit="true"
|
||||
SortDirection="ASC" AllowPaging="false" IsDatabasePaging="true" PageSize="50"
|
||||
EnableRowDoubleClickEvent="true" Height="200px"
|
||||
EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:RenderField Width="200px" ColumnID="ContractNum" DataField="ContractNum" FieldType="String"
|
||||
HeaderText="合同号" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="TotalMoney" DataField="TotalMoney" FieldType="Double"
|
||||
HeaderText="总金额" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="HSEMoney" DataField="HSEMoney" FieldType="Double"
|
||||
HeaderText="HSE费用" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</rows>
|
||||
<toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
|
||||
@@ -70,9 +70,24 @@ namespace FineUIPro.Web.ProjectData
|
||||
{
|
||||
this.drpUnitType.Text = unitType.ConstText;
|
||||
}
|
||||
|
||||
this.BindGrid(projectUnit.ProjectId, projectUnit.UnitId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ProjectId"></param>
|
||||
/// <param name="UnitId"></param>
|
||||
private void BindGrid(string ProjectId, string UnitId)
|
||||
{
|
||||
this.Grid1.DataSource = ProjectUnitService.GetProjectUnitItemList(ProjectId, UnitId);
|
||||
this.Grid1.PageIndex = 0;
|
||||
this.Grid1.DataBind();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+13
-2
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.ProjectData {
|
||||
namespace FineUIPro.Web.ProjectData
|
||||
{
|
||||
|
||||
|
||||
public partial class ProjectUnitView {
|
||||
public partial class ProjectUnitView
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -147,6 +149,15 @@ namespace FineUIPro.Web.ProjectData {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtOutTime;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Hidden="true" EnableIFrame="true" EnableMaximize="true" Width="1200px" Height="650px"
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true">
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true" Maximized="true">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true" Hidden="true"
|
||||
|
||||
@@ -61,11 +61,12 @@
|
||||
,SitePerson.RoleIds,SitePerson.States,WorkPost.WorkPostName
|
||||
FROM SitePerson_Person AS SitePerson
|
||||
LEFT JOIN Base_Project AS Project ON SitePerson.ProjectId = Project.ProjectId
|
||||
LEFT JOIN Person_Persons AS Persons ON SitePerson.PersonId = Persons.PersonId
|
||||
LEFT JOIN Project_ProjectUnit AS ProjectUnit ON SitePerson.UnitId = ProjectUnit.UnitId AND SitePerson.ProjectId= ProjectUnit.ProjectId
|
||||
LEFT JOIN Base_Unit AS Unit ON SitePerson.UnitId = Unit.UnitId
|
||||
LEFT JOIN Base_WorkPost AS WorkPost ON SitePerson.WorkPostId =WorkPost.WorkPostId
|
||||
LEFT JOIN Sys_Const AS sysConst ON sysConst.GroupId ='" + BLL.ConstValue.Group_ProjectUnitType + "' " +
|
||||
" AND ProjectUnit.UnitType=sysConst.ConstValue WHERE SitePerson.RoleIds IS NOT NULL";
|
||||
" AND ProjectUnit.UnitType=sysConst.ConstValue WHERE SitePerson.RoleIds IS NOT NULL AND Persons.Account IS NOT NULL ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND SitePerson.ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue));
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
</TreeNode>
|
||||
<TreeNode id="BA383490-BAE3-4E65-B221-8F89D2431135" Text="质量奖惩" NavigateUrl=""><TreeNode id="81053EAB-09C6-4A6B-A952-B756071EE0DA" Text="质量奖励处罚" NavigateUrl="CQMS/RewardAndPunish/RewardAndPunish.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="7ecf0229-8a0b-40ce-8b04-e556f7bd3394" Text="质量报表管理" NavigateUrl=""><TreeNode id="1443C901-A9C3-4CCC-B858-55512DE8C5CA" Text="质量管理工作总结报告" NavigateUrl="CQMS/ManageReport/QualityWorkSummaryReport.aspx"></TreeNode>
|
||||
<TreeNode id="267064F1-88F7-4468-998A-49A1A2F25BB8" Text="季度工程项目质量信息表" NavigateUrl="CQMS/ManageReport/QuarterlyProjectQuality.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="F54EABD2-4242-4A5D-9154-680E02E9F466" Text="质量样板管理" NavigateUrl=""><TreeNode id="B44EC915-7854-4F06-8C87-CD5FF41E3AC0" Text="质量样板" NavigateUrl="CQMS/Models/QualityModel.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="C91C8319-0BFC-4585-BE14-ED41D45A160D" Text="质量月报" NavigateUrl=""><TreeNode id="786864C0-2875-49CD-B55E-0B5C8253295D" Text="质量月报" NavigateUrl="CQMS/Check/CheckMonth.aspx"></TreeNode>
|
||||
|
||||
@@ -72,8 +72,8 @@
|
||||
<TreeNode id="0E9B7084-D021-4CA3-B9D2-9CBAA27A571B" Text="作业票(定稿)" NavigateUrl="HSSE/License/LicenseManager.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="20ECB69E-28C4-4FAC-941A-15F446AEB634" Text="安全费用" NavigateUrl=""><TreeNode id="EEE7CBBE-2EFB-4D64-96A6-A932E20FF9DB" Text="安全费用计划" NavigateUrl="HSSE/CostGoods/Expense.aspx"></TreeNode>
|
||||
<TreeNode id="0C311396-C859-40B0-9D72-6A8B20733002" Text="安全费用支出" NavigateUrl="HSSE/CostGoods/CostSmallDetail.aspx"></TreeNode>
|
||||
<TreeNode id="FF68C697-B058-4687-A98F-71C591650E02" Text="分包商HSE费用申请" NavigateUrl="HSSE/CostGoods/CostManage.aspx"></TreeNode>
|
||||
<TreeNode id="FF68C697-B058-4687-A98F-71C591650E02" Text="HSE费用申请" NavigateUrl="HSSE/CostGoods/CostManage.aspx"></TreeNode>
|
||||
<TreeNode id="F1AE30A2-A210-4607-B39E-4DC8DEF02EB8" Text="项目HSE费用汇总" NavigateUrl="HSSE/CostGoods/CostSummary.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="28C8EDB9-F1C2-4287-8013-28A976B093E2" Text="施工机具" NavigateUrl=""><TreeNode id="3E167389-4775-4AC3-9D31-2E570682EDA1" Text="特种设备机具入场报批" NavigateUrl="HSSE/InApproveManager/EquipmentIn.aspx"></TreeNode>
|
||||
<TreeNode id="A4832598-E3D4-4906-88E5-A3886A85FC5A" Text="特种设备机具出场报批" NavigateUrl="HSSE/InApproveManager/EquipmentOut.aspx"></TreeNode>
|
||||
@@ -96,11 +96,17 @@
|
||||
<TreeNode id="03235B30-960D-4FCF-99F7-97773A2EE108" Text="工作报告" NavigateUrl=""><TreeNode id="88AE0EF8-D29E-409F-A154-CCA3999B00AE" Text="安全完工报告" NavigateUrl="HSSE/Manager/CompletionReport.aspx"></TreeNode>
|
||||
<TreeNode id="D0EC3002-E1FA-457D-AC3B-4C7B2D71DD82" Text="月报" NavigateUrl="HSSE/Manager/ManagerMonth_SeDin.aspx"></TreeNode>
|
||||
<TreeNode id="8E5B4A8E-B06E-4C8A-A2C8-1091A9BCAF72" Text="工程师HSE日志" NavigateUrl="HSSE/Manager/HSEDiary.aspx"></TreeNode>
|
||||
<TreeNode id="C554E471-B740-4559-B543-E00F247289FD" Text="集团安全报表" NavigateUrl=""><TreeNode id="6E7DC075-A7AF-4E42-8F8B-0174EFDD54A1" Text="百万工时安全统计月报" NavigateUrl="HSSE/InformationProject/MillionsMonthlyReport.aspx"></TreeNode>
|
||||
<TreeNode id="C554E471-B740-4559-B543-E00F247289FD" Text="集团安全报表" NavigateUrl=""><TreeNode id="6E7DC075-A7AF-4E42-8F8B-0174EFDD54A1" Text="企业安全数据统计月报" NavigateUrl="HSSE/InformationProject/MillionsMonthlyReport.aspx"></TreeNode>
|
||||
<TreeNode id="38E948BA-E043-4E89-9038-0CE1B508FA19" Text="职工伤亡事故原因分析报" NavigateUrl="HSSE/InformationProject/AccidentCauseReport.aspx"></TreeNode>
|
||||
<TreeNode id="8B17DC64-A4B9-4283-B7A1-D2E944205FA5" Text="安全生产数据季报" NavigateUrl="HSSE/InformationProject/SafetyQuarterlyReport.aspx"></TreeNode>
|
||||
<TreeNode id="0CDFC1BE-0796-4817-ADB8-7A0B48655E00" Text="应急演练开展情况季报" NavigateUrl="HSSE/InformationProject/DrillConductedQuarterlyReport.aspx"></TreeNode>
|
||||
<TreeNode id="0973EE1C-CD2A-4116-BD67-1ABAD71D6C7C" Text="应急演练工作计划半年报" NavigateUrl="HSSE/InformationProject/DrillPlanHalfYearReport.aspx"></TreeNode>
|
||||
<TreeNode id="86F71934-7149-470E-BEAB-FFDC5BF3C0F2" Text="实业安全简报" NavigateUrl="SHIYE/InformationProject/SafetyBriefing.aspx"></TreeNode>
|
||||
<TreeNode id="FB174DD6-CBAE-43AF-9356-B098A17B719D" Text="安全管理工作总结报告" NavigateUrl="HSSE/InformationProject/WorkSummaryReport.aspx"></TreeNode>
|
||||
<TreeNode id="FD572EFA-8E87-43D1-B514-25A39768106F" Text="生态环保工作总结报告" NavigateUrl="HSSE/InformationProject/EPSummaryReport.aspx"></TreeNode>
|
||||
<TreeNode id="25CE6894-2840-4DC4-AD2E-D72292849CEE" Text="建筑行业能源节约与生态环境保护汇总表" NavigateUrl="ZHGL/Environmental/ProjectArchitectureReport.aspx"></TreeNode>
|
||||
<TreeNode id="A44E98F6-E9FE-43F8-8349-C166263BF608" Text="化工行业能源节约与生态环境保护汇总表" NavigateUrl="ZHGL/Environmental/ProjectChemicalReport.aspx"></TreeNode>
|
||||
<TreeNode id="EFA6E45F-1267-4804-BEE7-41E0C5461204" Text="中央企业节能环保产业企业基本情况和经营情况报表" NavigateUrl="ZHGL/Environmental/ProjectOperationReport.aspx"></TreeNode>
|
||||
<TreeNode id="9DE996D9-A2CF-40C8-86D3-6A472AB30E5D" Text="中央企业节能环保产业企业生产和服务业务情况报表" NavigateUrl="ZHGL/Environmental/ProjectEnergyReport.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="C483220C-0FEE-4E45-9B78-BBBA857EFFB3" Text="安全数据" NavigateUrl="ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSE.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
|
||||
@@ -15,11 +15,19 @@
|
||||
<TreeNode id="C619988F-307B-4A39-B518-7F45CA7326F5" Text="检查记录" NavigateUrl=""></TreeNode>
|
||||
<TreeNode id="DEE90726-E00D-462B-A4BF-7E36180DD5B8" Text="项目绩效评价" NavigateUrl="OfficeCheck/ProjectEvaluation/ProjectEvaluation.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001" Text="安全信息上报" NavigateUrl=""><TreeNode id="3156A9F0-276D-4AD4-BF84-45CF6DFC215C" Text="百万工时安全统计月报" NavigateUrl="ZHGL/Information/MillionsMonthlyReport.aspx"></TreeNode>
|
||||
<TreeNode id="ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001" Text="安全信息上报" NavigateUrl=""><TreeNode id="3156A9F0-276D-4AD4-BF84-45CF6DFC215C" Text="企业安全数据统计月报" NavigateUrl="ZHGL/Information/MillionsMonthlyReport.aspx"></TreeNode>
|
||||
<TreeNode id="4BC71D2E-7D94-48C1-A61A-139637825AA5" Text="职工伤亡事故原因分析报" NavigateUrl="ZHGL/Information/AccidentCauseReport.aspx"></TreeNode>
|
||||
<TreeNode id="A3894BAD-3F4A-4BB4-98CF-A76C588AE53F" Text="安全生产数据季报" NavigateUrl="ZHGL/Information/SafetyQuarterlyReport.aspx"></TreeNode>
|
||||
<TreeNode id="7985C759-8EB9-4B7D-AC65-00541280B46C" Text="应急演练开展情况季报" NavigateUrl="ZHGL/Information/DrillConductedQuarterlyReport.aspx"></TreeNode>
|
||||
<TreeNode id="70DEB27A-D6FF-4D57-879B-0270F2967FA0" Text="应急演练工作计划半年报" NavigateUrl="ZHGL/Information/DrillPlanHalfYearReport.aspx"></TreeNode>
|
||||
<TreeNode id="AAC7C263-6E25-49DC-985B-DC3FA7AAF3A1" Text="实业安全简报" NavigateUrl="ZHGL/Information/SafetyBriefing.aspx"></TreeNode>
|
||||
<TreeNode id="07FEEC9D-09C1-4C19-9269-62F69532086C" Text="安全管理工作总结报告" NavigateUrl="ZHGL/Information/WorkSummaryReport.aspx"></TreeNode>
|
||||
<TreeNode id="CF9C1F00-34B8-42E5-B2D1-704094169CA3" Text="季度工程项目质量信息表" NavigateUrl="ZHGL/Information/QuarterlyProjectQuality.aspx"></TreeNode>
|
||||
<TreeNode id="12941594-2171-411A-8CC8-32E3BD9FCDDF" Text="质量管理工作总结报告" NavigateUrl="ZHGL/Information/QualityWorkSummaryReport.aspx"></TreeNode>
|
||||
<TreeNode id="5B344750-79DD-40AA-8AA7-34B04E41FA72" Text="生态环保工作总结报告" NavigateUrl="ZHGL/Information/EPSummaryReport.aspx"></TreeNode>
|
||||
<TreeNode id="7C47F078-D4C9-40D9-BEEF-E657EAFEC650" Text="建筑行业能源节约与生态环境保护汇总表" NavigateUrl="ZHGL/Environmental/ArchitectureReport.aspx"></TreeNode>
|
||||
<TreeNode id="ECDD89AC-1E16-4D82-B3BE-5D62F31B7A14" Text="化工行业能源节约与生态环境保护汇总表" NavigateUrl="ZHGL/Environmental/ChemicalReport.aspx"></TreeNode>
|
||||
<TreeNode id="7652D239-1897-4886-8DF2-B71E3B060D21" Text="中央企业节能环保产业企业基本情况和经营情况报表" NavigateUrl="ZHGL/Environmental/OperationReport.aspx"></TreeNode>
|
||||
<TreeNode id="30579BFE-AB4B-49A7-A73D-B7CE902A8B69" Text="中央企业节能环保产业企业生产和服务业务情况报表" NavigateUrl="ZHGL/Environmental/EnergyReport.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="76E236DA-DDFC-4CE8-8CB8-02F8A27A8535" Text="专业技术方案评审" NavigateUrl=""><TreeNode id="B6A2B6EB-6B90-4953-B544-83FFF4F0EC19" Text="安全实施计划" NavigateUrl="ZHGL/Plan/ActionPlanList.aspx"></TreeNode>
|
||||
<TreeNode id="B9ADD006-BA46-4191-BCD1-CCB56767C82B" Text="总包施工质量计划" NavigateUrl="ZHGL/Plan/MainPlan.aspx"></TreeNode>
|
||||
|
||||
@@ -289,7 +289,12 @@ namespace FineUIPro.Web
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
ProjectService.InitAllProjectShortNameDropDownList(this.drpProject, this.CurrUser.PersonId, false);
|
||||
this.drpProject.DataValueField = "ProjectId";
|
||||
this.drpProject.DataTextField = "ShortName";
|
||||
var projectlist =ProjectService.GetSortIndexProjectByUserIdDropDownList(this.CurrUser.PersonId);
|
||||
this.drpProject.DataSource = projectlist;
|
||||
this.drpProject.DataBind();
|
||||
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]))
|
||||
{
|
||||
this.drpProject.SelectedValue = Request.Params["projectId"];
|
||||
@@ -572,11 +577,15 @@ namespace FineUIPro.Web
|
||||
this.Tab1.IFrameUrl = "~/common/mainMenu_HJGL_AVEVA.aspx";
|
||||
|
||||
}
|
||||
if (type == Const.Menu_PZHGL)
|
||||
else if (type == Const.Menu_PZHGL)
|
||||
{
|
||||
this.Tab1.IFrameUrl = "~/PZHGL/InformationProject/ConstructionPlan.aspx";
|
||||
this.Tab1.Title = "总承包商施工计划";
|
||||
}
|
||||
else if (type == Const.Menu_PPerson)
|
||||
{
|
||||
this.Tab1.IFrameUrl = "~/Person/ProjectPerson.aspx";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -654,7 +663,7 @@ namespace FineUIPro.Web
|
||||
|
||||
protected void btnPPerson_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_PDigData);
|
||||
this.MenuSwitchMethod(Const.Menu_PPerson);
|
||||
}
|
||||
|
||||
protected void btnJDGL_Click(object sender, EventArgs e)
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user