提交代码
This commit is contained in:
parent
64ee6e8635
commit
58beeab458
|
@ -0,0 +1,188 @@
|
|||
alter table [dbo].[QuantityManagement_Drawing] alter column [CompletionStatus] bit null
|
||||
alter table [dbo].[QuantityManagement_Drawing] add [CompletionStatus2] bit null
|
||||
alter table [dbo].[QuantityManagement_Change] alter column [CompletionStatus] bit null
|
||||
alter table [dbo].[QuantityManagement_Change] add [CompletionStatus2] bit null
|
||||
alter table [dbo].[QuantityManagement_Change] add [DrawingId] nvarchar(50) null
|
||||
alter table [dbo].[QuantityManagement_DayInput] add WorkTeam nvarchar(50) null
|
||||
alter table [dbo].[QuantityManagement_Base] add State char(1) null
|
||||
GO
|
||||
|
||||
alter table dbo.QuantityManagement_Base drop constraint FK_QuantityManagement_Base_QuantityManagement_Drawing
|
||||
GO
|
||||
|
||||
|
||||
CREATE VIEW [dbo].[View_QuantityManagement_Base]
|
||||
AS
|
||||
/********工程量基础表********/
|
||||
|
||||
select BaseId,C.ProjectId,case when a.DrawingNo is not null then a.WorkSection else b.WorkSection end as WorkSection,case when a.DrawingNo is not null then a.DrawingNo else b.ChangeNo end as DrawingNo,
|
||||
case when a.DrawingName is not null then a.DrawingName else b.ChangeName end as DrawingName,C.State,
|
||||
case when a.DrawingNo is not null then ca.ProfessionalName else cb.ProfessionalName end as Major,
|
||||
Part,ProjectContent,Unit,Amount,t.TeamGroupName as WorkTeam
|
||||
from QuantityManagement_Base C
|
||||
left join QuantityManagement_Drawing a on a.DrawingId=C.DrawingId
|
||||
left join Base_CNProfessional ca on ca.CNProfessionalId=a.Major
|
||||
left join QuantityManagement_Change b on b.ChangeId=C.DrawingId
|
||||
left join Base_CNProfessional cb on cb.CNProfessionalId=b.Major
|
||||
left join ProjectData_TeamGroup t on t.TeamGroupId=C.WorkTeam
|
||||
GO
|
||||
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[QuantityManagement_BaseApprove](
|
||||
[BaseApproveId] [nvarchar](50) NOT NULL,
|
||||
[BaseId] [nvarchar](50) NULL,
|
||||
[ApproveMan] [nvarchar](50) NULL,
|
||||
[ApproveDate] [datetime] NULL,
|
||||
[IsAgree] [bit] NULL,
|
||||
[ApproveIdea] [nvarchar](200) NULL,
|
||||
[ApproveType] [char](1) NULL,
|
||||
CONSTRAINT [PK_QuantityManagement_BaseApprove] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[BaseApproveId] 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
|
||||
|
||||
SET ANSI_PADDING OFF
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[QuantityManagement_BaseApprove] WITH CHECK ADD CONSTRAINT [FK_QuantityManagement_BaseApprove_QuantityManagement_Base] FOREIGN KEY([BaseId])
|
||||
REFERENCES [dbo].[QuantityManagement_Base] ([BaseId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[QuantityManagement_BaseApprove] CHECK CONSTRAINT [FK_QuantityManagement_BaseApprove_QuantityManagement_Base]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[QuantityManagement_BaseApprove] WITH CHECK ADD CONSTRAINT [FK_QuantityManagement_BaseApprove_Sys_User] FOREIGN KEY([ApproveMan])
|
||||
REFERENCES [dbo].[Sys_User] ([UserId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[QuantityManagement_BaseApprove] CHECK CONSTRAINT [FK_QuantityManagement_BaseApprove_Sys_User]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工程量基础表审核表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'QuantityManagement_BaseApprove'
|
||||
GO
|
||||
|
||||
|
||||
|
||||
CREATE VIEW [dbo].[View_QuantityManagement_DayInput]
|
||||
AS
|
||||
/********工程量日常统计表********/
|
||||
|
||||
select distinct C.BaseId,C.ProjectId,case when a.DrawingNo is not null then a.WorkSection else b.WorkSection end as WorkSection,case when a.DrawingNo is not null then a.DrawingNo else b.ChangeNo end as DrawingNo,
|
||||
case when a.DrawingName is not null then a.DrawingName else b.ChangeName end as DrawingName,ba.State,
|
||||
case when a.DrawingNo is not null then ca.ProfessionalName else cb.ProfessionalName end as Major,
|
||||
Part,ProjectContent,Unit,Amount,t.TeamGroupName as WorkTeam,C.WorkTeam as WorkTeamId
|
||||
from QuantityManagement_DayInput C
|
||||
left join QuantityManagement_Base ba on ba.BaseId=C.BaseId
|
||||
left join QuantityManagement_Drawing a on a.DrawingId=ba.DrawingId
|
||||
left join Base_CNProfessional ca on ca.CNProfessionalId=a.Major
|
||||
left join QuantityManagement_Change b on b.ChangeId=ba.DrawingId
|
||||
left join Base_CNProfessional cb on cb.CNProfessionalId=b.Major
|
||||
left join ProjectData_TeamGroup t on t.TeamGroupId=C.WorkTeam
|
||||
union
|
||||
select BaseId,C.ProjectId,case when a.DrawingNo is not null then a.WorkSection else b.WorkSection end as WorkSection,case when a.DrawingNo is not null then a.DrawingNo else b.ChangeNo end as DrawingNo,
|
||||
case when a.DrawingName is not null then a.DrawingName else b.ChangeName end as DrawingName,C.State,
|
||||
case when a.DrawingNo is not null then ca.ProfessionalName else cb.ProfessionalName end as Major,
|
||||
Part,ProjectContent,Unit,Amount,t.TeamGroupName as WorkTeam,C.WorkTeam as WorkTeamId
|
||||
from QuantityManagement_Base C
|
||||
left join QuantityManagement_Drawing a on a.DrawingId=C.DrawingId
|
||||
left join Base_CNProfessional ca on ca.CNProfessionalId=a.Major
|
||||
left join QuantityManagement_Change b on b.ChangeId=C.DrawingId
|
||||
left join Base_CNProfessional cb on cb.CNProfessionalId=b.Major
|
||||
left join ProjectData_TeamGroup t on t.TeamGroupId=C.WorkTeam
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
CREATE VIEW [dbo].[View_QuantityManagement_WorkTeamStatistics]
|
||||
AS
|
||||
/********工程量整体及分类汇总表********/
|
||||
|
||||
select distinct C.ProjectId+','+(case when a.DrawingNo is not null then a.WorkSection else b.WorkSection end)+','+ProjectContent+','+t.TeamGroupName as Id, C.ProjectId,case when a.DrawingNo is not null then a.WorkSection else b.WorkSection end as WorkSection,ba.State,
|
||||
ProjectContent,Unit,t.TeamGroupName as WorkTeam,C.WorkTeam as WorkTeamId
|
||||
from QuantityManagement_DayInput C
|
||||
left join QuantityManagement_Base ba on ba.BaseId=C.BaseId
|
||||
left join QuantityManagement_Drawing a on a.DrawingId=ba.DrawingId
|
||||
left join Base_CNProfessional ca on ca.CNProfessionalId=a.Major
|
||||
left join QuantityManagement_Change b on b.ChangeId=ba.DrawingId
|
||||
left join Base_CNProfessional cb on cb.CNProfessionalId=b.Major
|
||||
left join ProjectData_TeamGroup t on t.TeamGroupId=C.WorkTeam
|
||||
union
|
||||
select C.ProjectId+','+(case when a.DrawingNo is not null then a.WorkSection else b.WorkSection end)+','+ProjectContent+','+t.TeamGroupName as Id,C.ProjectId,case when a.DrawingNo is not null then a.WorkSection else b.WorkSection end as WorkSection,C.State,
|
||||
ProjectContent,Unit,t.TeamGroupName as WorkTeam,C.WorkTeam as WorkTeamId
|
||||
from QuantityManagement_Base C
|
||||
left join QuantityManagement_Drawing a on a.DrawingId=C.DrawingId
|
||||
left join Base_CNProfessional ca on ca.CNProfessionalId=a.Major
|
||||
left join QuantityManagement_Change b on b.ChangeId=C.DrawingId
|
||||
left join Base_CNProfessional cb on cb.CNProfessionalId=b.Major
|
||||
left join ProjectData_TeamGroup t on t.TeamGroupId=C.WorkTeam
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
CREATE VIEW [dbo].[View_QuantityManagement_DayInput2]
|
||||
AS
|
||||
/********工程量日常统计表********/
|
||||
select distinct C.BaseId,C.ProjectId,case when a.DrawingNo is not null then a.WorkSection else b.WorkSection end as WorkSection,case when a.DrawingNo is not null then a.DrawingNo else b.ChangeNo end as DrawingNo,
|
||||
case when a.DrawingName is not null then a.DrawingName else b.ChangeName end as DrawingName,ba.State,
|
||||
case when a.DrawingNo is not null then ca.ProfessionalName else cb.ProfessionalName end as Major,
|
||||
Part,ProjectContent,Unit,Amount,t.TeamGroupName as WorkTeam,C.WorkTeam as WorkTeamId,C.Date,C.DayAmount
|
||||
from QuantityManagement_DayInput C
|
||||
left join QuantityManagement_Base ba on ba.BaseId=C.BaseId
|
||||
left join QuantityManagement_Drawing a on a.DrawingId=ba.DrawingId
|
||||
left join Base_CNProfessional ca on ca.CNProfessionalId=a.Major
|
||||
left join QuantityManagement_Change b on b.ChangeId=ba.DrawingId
|
||||
left join Base_CNProfessional cb on cb.CNProfessionalId=b.Major
|
||||
left join ProjectData_TeamGroup t on t.TeamGroupId=C.WorkTeam
|
||||
GO
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('998E2611-DB93-4B54-A1D0-3E243AE21831','项目内容汇总表','CQMS/QuantityManagement/ProjectContentStatistics.aspx',70,'0','Menu_JDGL',0,1,1)
|
||||
GO
|
||||
|
||||
CREATE VIEW [dbo].[View_QuantityManagement_ProjectContentStatistics]
|
||||
AS
|
||||
/********工程量整体及分类汇总表********/
|
||||
|
||||
select distinct C.ProjectId+','+ProjectContent+','+t.TeamGroupName as Id, C.ProjectId,ba.State,
|
||||
ProjectContent,Unit,t.TeamGroupName as WorkTeam,C.WorkTeam as WorkTeamId
|
||||
from QuantityManagement_DayInput C
|
||||
left join QuantityManagement_Base ba on ba.BaseId=C.BaseId
|
||||
left join QuantityManagement_Drawing a on a.DrawingId=ba.DrawingId
|
||||
left join Base_CNProfessional ca on ca.CNProfessionalId=a.Major
|
||||
left join QuantityManagement_Change b on b.ChangeId=ba.DrawingId
|
||||
left join Base_CNProfessional cb on cb.CNProfessionalId=b.Major
|
||||
left join ProjectData_TeamGroup t on t.TeamGroupId=C.WorkTeam
|
||||
union
|
||||
select C.ProjectId+','+ProjectContent+','+t.TeamGroupName as Id,C.ProjectId,C.State,
|
||||
ProjectContent,Unit,t.TeamGroupName as WorkTeam,C.WorkTeam as WorkTeamId
|
||||
from QuantityManagement_Base C
|
||||
left join QuantityManagement_Drawing a on a.DrawingId=C.DrawingId
|
||||
left join Base_CNProfessional ca on ca.CNProfessionalId=a.Major
|
||||
left join QuantityManagement_Change b on b.ChangeId=C.DrawingId
|
||||
left join Base_CNProfessional cb on cb.CNProfessionalId=b.Major
|
||||
left join ProjectData_TeamGroup t on t.TeamGroupId=C.WorkTeam
|
||||
|
||||
|
||||
GO
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('C1CEE66F-FBDD-4B8B-BF7E-DF04A839E06C','工程管理','',40,'0','Menu_Server',0,0,1)
|
||||
GO
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('A3435F75-3CE2-42E0-B63B-6AEEDBD47C16','日常统计表','CQMS/QuantityManagement/DayInputStatistics.aspx',10,'C1CEE66F-FBDD-4B8B-BF7E-DF04A839E06C','Menu_Server',0,1,1)
|
||||
GO
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('C9C95D5A-4A15-4F4B-B091-EB5BECC254A4','整体及分类汇总表','CQMS/QuantityManagement/WorkTeamStatistics.aspx',20,'C1CEE66F-FBDD-4B8B-BF7E-DF04A839E06C','Menu_Server',0,1,1)
|
||||
GO
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('CE235B20-C6BB-4A34-A11C-70F90921B803','项目内容汇总表','CQMS/QuantityManagement/ProjectContentStatistics.aspx',30,'C1CEE66F-FBDD-4B8B-BF7E-DF04A839E06C','Menu_Server',0,1,1)
|
||||
GO
|
|
@ -378,6 +378,7 @@
|
|||
<Compile Include="CQMS\ProcessControl\InspectionManagementApproveService.cs" />
|
||||
<Compile Include="CQMS\ProcessControl\NondestructiveTestService.cs" />
|
||||
<Compile Include="CQMS\ProcessControl\TestPackageManagementService.cs" />
|
||||
<Compile Include="CQMS\QuantityManagement\BaseApproveService.cs" />
|
||||
<Compile Include="CQMS\QuantityManagement\BaseService.cs" />
|
||||
<Compile Include="CQMS\QuantityManagement\ChangeService.cs" />
|
||||
<Compile Include="CQMS\QuantityManagement\DayInputService.cs" />
|
||||
|
|
|
@ -0,0 +1,176 @@
|
|||
using Newtonsoft.Json.Serialization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class BaseApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 获取工程量基础表模板列表
|
||||
/// </summary>
|
||||
/// <param name="satartRowIndex"></param>
|
||||
/// <param name="maximumRows"></param>
|
||||
/// <returns></returns>
|
||||
public static DataTable getListData(string BaseId)
|
||||
{
|
||||
var res = from x in db.QuantityManagement_BaseApprove
|
||||
where x.BaseId == BaseId && x.ApproveDate != null && x.ApproveType != "S"
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.BaseApproveId,
|
||||
x.BaseId,
|
||||
ApproveMan = (from y in db.Sys_User where y.UserId == x.ApproveMan select y.UserName).First(),
|
||||
x.ApproveDate,
|
||||
x.IsAgree,
|
||||
x.ApproveIdea,
|
||||
x.ApproveType,
|
||||
};
|
||||
return Funs.LINQToDataTable(res);
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据工程量基础表编号删除对应的所有工程量基础表审批信息
|
||||
/// </summary>
|
||||
/// <param name="BaseId">工程量基础表编号</param>
|
||||
public static void DeleteBaseApprovesByBaseId(string BaseId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.QuantityManagement_BaseApprove where x.BaseId == BaseId select x).ToList();
|
||||
db.QuantityManagement_BaseApprove.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取登录人的通知信息
|
||||
/// </summary>
|
||||
/// <param name="BaseId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static IQueryable getList(string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var res = from x in db.QuantityManagement_BaseApprove
|
||||
join ca in db.QuantityManagement_Base on x.BaseId equals ca.BaseId
|
||||
where x.ApproveDate == null && x.ApproveType == "S" && x.ApproveMan == userId
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
//x.BaseApproveId,
|
||||
x.BaseId,
|
||||
//x.ApproveDate,
|
||||
//x.IsAgree,
|
||||
//x.ApproveIdea,
|
||||
//x.ApproveType,
|
||||
};
|
||||
return res.AsQueryable().Distinct();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新通知信息提醒
|
||||
/// </summary>
|
||||
/// <param name="BaseId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.QuantityManagement_BaseApprove GetSee(string BaseId, string userId)
|
||||
{
|
||||
return db.QuantityManagement_BaseApprove.FirstOrDefault(x => x.BaseId == BaseId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
}
|
||||
public static void See(string BaseId, string userId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var res = db.QuantityManagement_BaseApprove.FirstOrDefault(x => x.BaseId == BaseId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
if (res != null)
|
||||
{
|
||||
res.ApproveDate = DateTime.Now;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据工程量基础表编号获取一个工程量基础表审批信息
|
||||
/// </summary>
|
||||
/// <param name="BaseId">工程量基础表编号</param>
|
||||
/// <returns>一个工程量基础表审批实体</returns>
|
||||
public static Model.QuantityManagement_BaseApprove GetBaseApproveByBaseId(string BaseId)
|
||||
{
|
||||
return db.QuantityManagement_BaseApprove.FirstOrDefault(x => x.BaseId == BaseId && x.ApproveType != "S" && x.ApproveDate == null);
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改工程量基础表审批信息
|
||||
/// </summary>
|
||||
/// <param name="managerRuleApprove">工程量基础表审批实体</param>
|
||||
public static void UpdateBaseApprove(Model.QuantityManagement_BaseApprove approve)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.QuantityManagement_BaseApprove newApprove = db.QuantityManagement_BaseApprove.First(e => e.BaseApproveId == approve.BaseApproveId && e.ApproveDate == null);
|
||||
newApprove.BaseId = approve.BaseId;
|
||||
newApprove.ApproveMan = approve.ApproveMan;
|
||||
newApprove.ApproveDate = approve.ApproveDate;
|
||||
newApprove.ApproveIdea = approve.ApproveIdea;
|
||||
newApprove.IsAgree = approve.IsAgree;
|
||||
newApprove.ApproveType = approve.ApproveType;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
/// <summary>
|
||||
/// 增加工程量基础表审批信息
|
||||
/// </summary>
|
||||
/// <param name="managerRuleApprove">工程量基础表审批实体</param>
|
||||
public static void AddBaseApprove(Model.QuantityManagement_BaseApprove approve)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.QuantityManagement_BaseApprove));
|
||||
Model.QuantityManagement_BaseApprove newApprove = new Model.QuantityManagement_BaseApprove();
|
||||
newApprove.BaseApproveId = newKeyID;
|
||||
newApprove.BaseId = approve.BaseId;
|
||||
newApprove.ApproveMan = approve.ApproveMan;
|
||||
newApprove.ApproveDate = approve.ApproveDate;
|
||||
newApprove.ApproveIdea = approve.ApproveIdea;
|
||||
newApprove.IsAgree = approve.IsAgree;
|
||||
newApprove.ApproveType = approve.ApproveType;
|
||||
db.QuantityManagement_BaseApprove.InsertOnSubmit(newApprove);
|
||||
db.SubmitChanges();
|
||||
|
||||
}
|
||||
public static string AddBaseApproveForApi(Model.QuantityManagement_BaseApprove approve)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.QuantityManagement_BaseApprove));
|
||||
Model.QuantityManagement_BaseApprove newApprove = new Model.QuantityManagement_BaseApprove();
|
||||
newApprove.BaseApproveId = newKeyID;
|
||||
newApprove.BaseId = approve.BaseId;
|
||||
newApprove.ApproveMan = approve.ApproveMan;
|
||||
newApprove.ApproveDate = approve.ApproveDate;
|
||||
newApprove.ApproveIdea = approve.ApproveIdea;
|
||||
newApprove.IsAgree = approve.IsAgree;
|
||||
newApprove.ApproveType = approve.ApproveType;
|
||||
|
||||
db.QuantityManagement_BaseApprove.InsertOnSubmit(newApprove);
|
||||
db.SubmitChanges();
|
||||
return newKeyID;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 总包负责人审批信息
|
||||
/// </summary>
|
||||
/// <param name="BaseId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.QuantityManagement_BaseApprove GetAudit1(string BaseId)
|
||||
{
|
||||
return db.QuantityManagement_BaseApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.BaseId == BaseId && x.ApproveType == BLL.Const.Base_Audit1);
|
||||
}
|
||||
|
||||
public static Model.QuantityManagement_BaseApprove GetComplie(string BaseId)
|
||||
{
|
||||
return db.QuantityManagement_BaseApprove.FirstOrDefault(x => x.BaseId == BaseId && x.ApproveType == BLL.Const.Base_Compile);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -39,6 +39,7 @@ namespace BLL
|
|||
newBase.WorkTeam = Base.WorkTeam;
|
||||
newBase.CompileMan = Base.CompileMan;
|
||||
newBase.CompileDate = Base.CompileDate;
|
||||
newBase.State = Base.State;
|
||||
|
||||
db.QuantityManagement_Base.InsertOnSubmit(newBase);
|
||||
db.SubmitChanges();
|
||||
|
@ -62,6 +63,7 @@ namespace BLL
|
|||
newBase.Amount = Base.Amount;
|
||||
newBase.WorkTeam = Base.WorkTeam;
|
||||
newBase.CompileMan = Base.CompileMan;
|
||||
newBase.State = Base.State;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
@ -108,7 +110,7 @@ namespace BLL
|
|||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q = (from x in db.QuantityManagement_Base
|
||||
where x.DrawingId == drawingId
|
||||
where x.DrawingId == drawingId && x.State == BLL.Const.Base_Complete
|
||||
orderby x.Part
|
||||
select x.Part).Distinct().ToList();
|
||||
ListItem[] list = new ListItem[q.Count()];
|
||||
|
@ -147,10 +149,47 @@ namespace BLL
|
|||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.QuantityManagement_Base
|
||||
where x.DrawingId == drawingId && x.Part == part
|
||||
where x.DrawingId == drawingId && x.Part == part && x.State == BLL.Const.Base_Complete
|
||||
orderby x.ProjectContent
|
||||
select x).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public static void Init(FineUIPro.DropDownList dropName, string state, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Value";
|
||||
dropName.DataTextField = "Text";
|
||||
dropName.DataSource = GetDHandleTypeByState(state);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据状态选择下一步办理类型
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetDHandleTypeByState(string state)
|
||||
{
|
||||
if (state == Const.Base_Compile || state == Const.Base_ReCompile) //无是否同意
|
||||
{
|
||||
ListItem[] lis = new ListItem[1];
|
||||
lis[0] = new ListItem("审核", Const.Base_Audit1);
|
||||
return lis;
|
||||
}
|
||||
else if (state == Const.Base_Audit1)//有是否同意
|
||||
{
|
||||
ListItem[] lis = new ListItem[2];
|
||||
lis[0] = new ListItem("审批完成", Const.Base_Complete);//是 加载
|
||||
lis[1] = new ListItem("重新编制", Const.Base_ReCompile);//否加载
|
||||
return lis;
|
||||
}
|
||||
|
||||
else
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,9 @@ namespace BLL
|
|||
newChange.Major = Change.Major;
|
||||
newChange.AcceptDate = Change.AcceptDate;
|
||||
newChange.CompletionStatus = Change.CompletionStatus;
|
||||
newChange.CompletionStatus2 = Change.CompletionStatus2;
|
||||
newChange.DutyPerson = Change.DutyPerson;
|
||||
newChange.DrawingId = Change.DrawingId;
|
||||
newChange.Remark = Change.Remark;
|
||||
newChange.CompileMan = Change.CompileMan;
|
||||
newChange.CompileDate = Change.CompileDate;
|
||||
|
@ -63,7 +65,9 @@ namespace BLL
|
|||
newChange.Major = Change.Major;
|
||||
newChange.AcceptDate = Change.AcceptDate;
|
||||
newChange.CompletionStatus = Change.CompletionStatus;
|
||||
newChange.CompletionStatus2 = Change.CompletionStatus2;
|
||||
newChange.DutyPerson = Change.DutyPerson;
|
||||
newChange.DrawingId = Change.DrawingId;
|
||||
newChange.Remark = Change.Remark;
|
||||
newChange.CompileMan = Change.CompileMan;
|
||||
db.SubmitChanges();
|
||||
|
|
|
@ -33,6 +33,7 @@ namespace BLL
|
|||
newDayInput.ProjectId = DayInput.ProjectId;
|
||||
newDayInput.BaseId = DayInput.BaseId;
|
||||
newDayInput.Date = DayInput.Date;
|
||||
newDayInput.WorkTeam = DayInput.WorkTeam;
|
||||
newDayInput.DayAmount = DayInput.DayAmount;
|
||||
newDayInput.CompileMan = DayInput.CompileMan;
|
||||
newDayInput.CompileDate = DayInput.CompileDate;
|
||||
|
@ -54,6 +55,7 @@ namespace BLL
|
|||
newDayInput.ProjectId = DayInput.ProjectId;
|
||||
newDayInput.BaseId = DayInput.BaseId;
|
||||
newDayInput.Date = DayInput.Date;
|
||||
newDayInput.WorkTeam = DayInput.WorkTeam;
|
||||
newDayInput.DayAmount = DayInput.DayAmount;
|
||||
newDayInput.CompileMan = DayInput.CompileMan;
|
||||
db.SubmitChanges();
|
||||
|
|
|
@ -37,6 +37,7 @@ namespace BLL
|
|||
newDrawing.Major = Drawing.Major;
|
||||
newDrawing.AcceptDate = Drawing.AcceptDate;
|
||||
newDrawing.CompletionStatus = Drawing.CompletionStatus;
|
||||
newDrawing.CompletionStatus2 = Drawing.CompletionStatus2;
|
||||
newDrawing.DutyPerson = Drawing.DutyPerson;
|
||||
newDrawing.Remark = Drawing.Remark;
|
||||
newDrawing.CompileMan = Drawing.CompileMan;
|
||||
|
@ -63,6 +64,7 @@ namespace BLL
|
|||
newDrawing.Major = Drawing.Major;
|
||||
newDrawing.AcceptDate = Drawing.AcceptDate;
|
||||
newDrawing.CompletionStatus = Drawing.CompletionStatus;
|
||||
newDrawing.CompletionStatus2 = Drawing.CompletionStatus2;
|
||||
newDrawing.DutyPerson = Drawing.DutyPerson;
|
||||
newDrawing.Remark = Drawing.Remark;
|
||||
newDrawing.CompileMan = Drawing.CompileMan;
|
||||
|
@ -102,6 +104,23 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 图纸登记下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitDrawingChangeDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "Value";
|
||||
dropName.DataTextField = "Text";
|
||||
dropName.DataSource = GetDrawingChangeListByProjectId(projectId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目Id获取图纸登记下拉选择项
|
||||
/// </summary>
|
||||
|
@ -112,11 +131,41 @@ namespace BLL
|
|||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q = (from x in db.QuantityManagement_Drawing
|
||||
where x.ProjectId == projectId
|
||||
where x.ProjectId == projectId
|
||||
orderby x.DrawingNo
|
||||
select x).ToList();
|
||||
return q;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目Id获取图纸登记下拉选择项
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static ListItem[] GetDrawingChangeListByProjectId(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q1 = (from x in db.QuantityManagement_Drawing
|
||||
where x.ProjectId == projectId
|
||||
orderby x.DrawingNo
|
||||
select x).ToList();
|
||||
var q2 = (from x in db.QuantityManagement_Change
|
||||
where x.ProjectId == projectId
|
||||
orderby x.ChangeNo
|
||||
select x).ToList();
|
||||
ListItem[] list = new ListItem[q1.Count() + q2.Count()];
|
||||
for (int i = 0; i < q1.Count(); i++)
|
||||
{
|
||||
list[i] = new ListItem(q1[i].DrawingNo ?? "", q1[i].DrawingId.ToString());
|
||||
}
|
||||
for (int j = q1.Count(); j < q1.Count() + q2.Count(); j++)
|
||||
{
|
||||
list[j] = new ListItem(q2[j - q1.Count()].ChangeNo ?? "", q2[j - q1.Count()].ChangeId.ToString());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,8 +106,21 @@ namespace BLL
|
|||
/// </summary>
|
||||
public const string PersonManageUrl = "File\\Excel\\HJGL_DataIn\\焊工人员导入模板.xls";
|
||||
|
||||
/// <summary>
|
||||
/// 工程量日常统计表导出模板
|
||||
/// </summary>
|
||||
public const string DayInputStatisticsTemplateUrl = "File\\Excel\\DataOut\\工程量日常统计表.xlsx";
|
||||
|
||||
/// <summary>
|
||||
/// 整体及分类汇总表导出模板
|
||||
/// </summary>
|
||||
public const string WorkTeamStatisticsTemplateUrl = "File\\Excel\\DataOut\\整体及分类汇总表.xlsx";
|
||||
|
||||
/// <summary>
|
||||
/// 项目内容汇总表导出模板
|
||||
/// </summary>
|
||||
public const string ProjectContentStatisticsTemplateUrl = "File\\Excel\\DataOut\\项目内容汇总表.xlsx";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 管道点口日报表
|
||||
/// </summary>
|
||||
|
@ -5004,6 +5017,27 @@ namespace BLL
|
|||
|
||||
#endregion
|
||||
|
||||
#region 工程量基础表流程定义
|
||||
/// <summary>
|
||||
/// 重新编制
|
||||
/// </summary>
|
||||
public const string Base_ReCompile = "0";//总包
|
||||
|
||||
/// <summary>
|
||||
/// 编制
|
||||
/// </summary>
|
||||
public const string Base_Compile = "1";//总包
|
||||
|
||||
/// <summary>
|
||||
/// 审核
|
||||
/// </summary>
|
||||
public static string Base_Audit1 = "2";//总包
|
||||
|
||||
/// <summary>
|
||||
/// 审批完成
|
||||
/// </summary>
|
||||
public static string Base_Complete = "3";
|
||||
#endregion
|
||||
|
||||
#region 施工方案及审查流程定义
|
||||
|
||||
|
|
|
@ -127,6 +127,20 @@ namespace BLL
|
|||
orderby x.TeamGroupCode select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目ID获取班组下拉选择项
|
||||
/// </summary>
|
||||
/// <param name="p"></param>
|
||||
/// <param name="p_2"></param>
|
||||
/// <returns></returns>
|
||||
public static object GetTeamGroupListByProjectId(string projectId)
|
||||
{
|
||||
return (from x in Funs.DB.ProjectData_TeamGroup
|
||||
where x.ProjectId == projectId
|
||||
orderby x.TeamGroupCode
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
#region 表下拉框
|
||||
/// <summary>
|
||||
/// 表下拉框
|
||||
|
@ -146,6 +160,25 @@ namespace BLL
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region 表下拉框
|
||||
/// <summary>
|
||||
/// 表下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitTeamGroupProjectDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "TeamGroupId";
|
||||
dropName.DataTextField = "TeamGroupName";
|
||||
dropName.DataSource = GetTeamGroupListByProjectId(projectId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 表下拉框
|
||||
/// <summary>
|
||||
/// 表下拉框
|
||||
|
|
|
@ -196,7 +196,7 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void UpdatePassword(string userId )
|
||||
public static void UpdatePassword(string userId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Sys_User m = db.Sys_User.FirstOrDefault(e => e.UserId == userId);
|
||||
|
@ -295,7 +295,8 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
catch (Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -397,7 +398,7 @@ namespace BLL
|
|||
{
|
||||
getPUser = (from x in db.Project_ProjectUser
|
||||
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)
|
||||
where x.ProjectId == projectId && (u.UnitId == unitId)
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
|
@ -412,7 +413,7 @@ namespace BLL
|
|||
foreach (var item in getPUser)
|
||||
{
|
||||
List<string> roleIdList = Funs.GetStrListByStr(item.RoleId, ',');
|
||||
var getRoles = db.Sys_Role.FirstOrDefault(x =>roleIdList.Contains(x.RoleId));
|
||||
var getRoles = db.Sys_Role.FirstOrDefault(x => roleIdList.Contains(x.RoleId));
|
||||
if (getRoles != null)
|
||||
{
|
||||
string userName = RoleService.getRoleNamesRoleIds(item.RoleId) + "-" + UserService.GetUserNameByUserId(item.UserId);
|
||||
|
@ -445,7 +446,7 @@ namespace BLL
|
|||
{
|
||||
users = (from x in db.Sys_User
|
||||
join z in db.Sys_Role on x.RoleId equals z.RoleId
|
||||
where x.IsPost == true
|
||||
where x.IsPost == true
|
||||
orderby x.UserCode
|
||||
select new Model.SpSysUserItem
|
||||
{
|
||||
|
@ -600,12 +601,12 @@ namespace BLL
|
|||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目号和角色Id获取用户下拉选项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Sys_User> GetUserListByProjectIdUnitIdRoleId(string projectId,string unitId, string roleIds)
|
||||
public static List<Model.Sys_User> GetUserListByProjectIdUnitIdRoleId(string projectId, string unitId, string roleIds)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
|
@ -618,7 +619,7 @@ namespace BLL
|
|||
list = (from x in db.Sys_User
|
||||
join y in db.Project_ProjectUser
|
||||
on x.UserId equals y.UserId
|
||||
where y.ProjectId == projectId && x.UnitId == unitId && listRoles.Contains(y.RoleId)
|
||||
where y.ProjectId == projectId && x.UnitId == unitId && listRoles.Contains(y.RoleId)
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
}
|
||||
|
@ -635,7 +636,7 @@ namespace BLL
|
|||
else
|
||||
{
|
||||
list = (from x in db.Sys_User
|
||||
where x.UnitId == unitId && x.UserId != BLL.Const.hfnbdId && x.UserId != Const.sedinId
|
||||
where x.UnitId == unitId && x.UserId != BLL.Const.hfnbdId && x.UserId != Const.sedinId
|
||||
orderby x.UserName
|
||||
select x).ToList();
|
||||
|
||||
|
@ -734,7 +735,7 @@ namespace BLL
|
|||
{
|
||||
dropName.DataValueField = "UserId";
|
||||
dropName.DataTextField = "UserName";
|
||||
dropName.DataSource = BLL.UserService.GetUserListByProjectIdUnitIdRoleId(projectId,unitId, roleIds);
|
||||
dropName.DataSource = BLL.UserService.GetUserListByProjectIdUnitIdRoleId(projectId, unitId, roleIds);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
|
@ -858,6 +859,24 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用户下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="projectId">项目id</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitUserDropDownList2(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease, string UnitId)
|
||||
{
|
||||
dropName.DataValueField = "Value";
|
||||
dropName.DataTextField = "Text";
|
||||
dropName.DataSource = GetUserByUnitId(projectId, UnitId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按照单位查询用户
|
||||
/// </summary>
|
||||
|
@ -1611,7 +1630,7 @@ namespace BLL
|
|||
{
|
||||
if (getUnit.UnitCode.Length > 4)
|
||||
{
|
||||
prefixValue = getUnit.UnitCode.Substring(getUnit.UnitCode.Length-4, 4);
|
||||
prefixValue = getUnit.UnitCode.Substring(getUnit.UnitCode.Length - 4, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1623,7 +1642,7 @@ namespace BLL
|
|||
{
|
||||
if (idCard.Length > 4)
|
||||
{
|
||||
suffixValue = idCard.Substring(idCard.Length-4, 4);
|
||||
suffixValue = idCard.Substring(idCard.Length - 4, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -51,6 +51,9 @@
|
|||
<f:RenderField ColumnID="DrawingName" DataField="DrawingName" FieldType="String" HeaderText="图纸名称" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="200px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Major" DataField="Major" FieldType="String" HeaderText="专业" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Part" DataField="Part" FieldType="String" HeaderText="部位" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
|
@ -60,12 +63,24 @@
|
|||
<f:RenderField ColumnID="Unit" DataField="Unit" FieldType="String" HeaderText="单位" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="80px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Amount" DataField="Amount" FieldType="Float" HeaderText="数量" TextAlign="Center"
|
||||
<f:RenderField ColumnID="Amount" DataField="Amount" FieldType="Float" HeaderText="总数" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="WorkTeam" DataField="WorkTeam" FieldType="String" HeaderText="作业队" TextAlign="Center"
|
||||
<f:RenderField ColumnID="WorkTeam" DataField="WorkTeam" FieldType="String" HeaderText="计划作业队" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="State" Width="100px" HeaderText="审批状态" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="labState" runat="server" Text='<%# ConvertState(Eval("State")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField ColumnID="AuditMan" Width="80px" HeaderText="办理人" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbAuditMan" runat="server" Text='<%# ConvertMan(Eval("BaseId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
|
@ -100,6 +115,9 @@
|
|||
<Items>
|
||||
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Text="修改" Icon="Pencil" OnClick="btnMenuModify_Click" Hidden="true">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuView" EnablePostBack="true" runat="server" Text="查看" Icon="ApplicationViewIcons"
|
||||
OnClick="btnMenuView_Click">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
|
||||
OnClick="btnMenuDel_Click" Hidden="true">
|
||||
</f:MenuButton>
|
||||
|
|
|
@ -29,9 +29,7 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
/// </summary>
|
||||
public void BindGrid()
|
||||
{
|
||||
string strSql = @"select BaseId,C.ProjectId,a.WorkSection,DrawingNo,DrawingName,Part,ProjectContent,Unit,Amount,WorkTeam
|
||||
from QuantityManagement_Base C
|
||||
left join QuantityManagement_Drawing a on a.DrawingId=C.DrawingId
|
||||
string strSql = @"select * from View_QuantityManagement_Base C
|
||||
where C.ProjectId = @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
|
@ -143,7 +141,58 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BaseEdit.aspx?BaseId={0}", Grid1.SelectedRowID, "编辑 - ")));
|
||||
string id = Grid1.SelectedRowID;
|
||||
var bases = BLL.BaseService.GetBaseById(id);
|
||||
if (bases != null)
|
||||
{
|
||||
if (bases.State.Equals(Const.Base_Complete))
|
||||
{
|
||||
Alert.ShowInTop("已审批完成,请右键查看!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.QuantityManagement_BaseApprove approve = BLL.BaseApproveService.GetBaseApproveByBaseId(id);
|
||||
if (approve != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(approve.ApproveMan))
|
||||
{
|
||||
if (this.CurrUser.UserId == approve.ApproveMan || CurrUser.UserId == Const.sysglyId || CurrUser.UserId == Const.hfnbdId)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BaseEdit.aspx?BaseId={0}", id, "编辑 - ")));
|
||||
return;
|
||||
}
|
||||
else if (bases.State == BLL.Const.Base_Complete)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BaseView.aspx?BaseId={0}", id, "查看 - ")));
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您不是当前办理人,无法编辑,请右键查看!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您不是当前办理人,无法编辑,请右键查看!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnMenuView_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Grid1.SelectedRowID;
|
||||
var bases = BLL.BaseService.GetBaseById(id);
|
||||
if (bases != null)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BaseView.aspx?BaseId={0}", id, "查看 - ")));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -173,6 +222,7 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
var Base = BLL.BaseService.GetBaseById(rowID);
|
||||
if (Base != null)
|
||||
{
|
||||
BLL.BaseApproveService.DeleteBaseApprovesByBaseId(rowID);
|
||||
BLL.BaseService.DeleteBase(rowID);
|
||||
}
|
||||
}
|
||||
|
@ -233,5 +283,62 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 把状态转换代号为文字形式
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertState(object state)
|
||||
{
|
||||
if (state != null)
|
||||
{
|
||||
if (state.ToString() == BLL.Const.Base_ReCompile)
|
||||
{
|
||||
return "重新编制";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.Base_Compile)
|
||||
{
|
||||
return "编制";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.Base_Audit1)
|
||||
{
|
||||
return "审核";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.Base_Complete)
|
||||
{
|
||||
return "审批完成";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
//<summary>
|
||||
//获取办理人姓名
|
||||
//</summary>
|
||||
//<param name="state"></param>
|
||||
//<returns></returns>
|
||||
protected string ConvertMan(object BaseCode)
|
||||
{
|
||||
if (BaseCode != null)
|
||||
{
|
||||
Model.QuantityManagement_BaseApprove a = BLL.BaseApproveService.GetBaseApproveByBaseId(BaseCode.ToString());
|
||||
if (a != null)
|
||||
{
|
||||
if (a.ApproveMan != null)
|
||||
{
|
||||
return BLL.UserService.GetUserByUserId(a.ApproveMan).UserName;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -120,6 +120,24 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
/// <summary>
|
||||
/// labState 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label labState;
|
||||
|
||||
/// <summary>
|
||||
/// lbAuditMan 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbAuditMan;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
|
@ -183,6 +201,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuView 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuView;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDel 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -169,7 +169,16 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
var drawings = from x in Funs.DB.QuantityManagement_Drawing
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
|
||||
var changes = from x in Funs.DB.QuantityManagement_Change
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
var teamGroups = from x in Funs.DB.ProjectData_TeamGroup
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
var projectUsers = from x in Funs.DB.Sys_User
|
||||
join y in Funs.DB.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
var cns = from x in Funs.DB.Base_CNProfessional select x;
|
||||
|
||||
for (int i = 0; i < ir; i++)
|
||||
|
@ -177,7 +186,8 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
Model.QuantityManagement_Base oldViewInfo = new Model.QuantityManagement_Base();
|
||||
string row0 = pds.Rows[i][0].ToString().Trim();
|
||||
var drawing = drawings.Where(y => y.DrawingNo == row0).FirstOrDefault();
|
||||
if (drawing != null && !string.IsNullOrEmpty(row0))
|
||||
var change = changes.Where(y => y.ChangeNo == row0).FirstOrDefault();
|
||||
if ((drawing != null || change != null) && !string.IsNullOrEmpty(row0))
|
||||
{
|
||||
string row1 = pds.Rows[i][1].ToString();
|
||||
if (string.IsNullOrEmpty(row1))
|
||||
|
@ -217,7 +227,24 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
string row5 = pds.Rows[i][5].ToString();
|
||||
if (string.IsNullOrEmpty(row5))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "作业队" + "," + "此项为必填项!" + "|";
|
||||
result += (i + 2).ToString() + "," + "计划作业队" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
var teamGroup = teamGroups.Where(y => y.TeamGroupName == row5).FirstOrDefault();
|
||||
if (teamGroup == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "计划作业队" + "," + "[" + row5 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
string row6 = pds.Rows[i][6].ToString();
|
||||
if (!string.IsNullOrEmpty(row6))
|
||||
{
|
||||
var projectUser = projectUsers.Where(y => y.UserName == row6).FirstOrDefault();
|
||||
if (projectUser == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "审核人" + "," + "[" + row6 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -368,16 +395,35 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
var drawings = from x in Funs.DB.QuantityManagement_Drawing
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
var changes = from x in Funs.DB.QuantityManagement_Change
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
var teamGroups = from x in Funs.DB.ProjectData_TeamGroup
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
var projectUsers = from x in Funs.DB.Sys_User
|
||||
join y in Funs.DB.Project_ProjectUser on x.UserId equals y.UserId
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
Model.QuantityManagement_Base oldViewInfo = new Model.QuantityManagement_Base();
|
||||
string row0 = pds.Rows[i][0].ToString().Trim();
|
||||
string row6 = pds.Rows[i][6].ToString().Trim();
|
||||
var drawing = drawings.Where(y => y.DrawingNo == row0).FirstOrDefault();
|
||||
if (drawing != null && !string.IsNullOrEmpty(row0))
|
||||
var change = changes.Where(y => y.ChangeNo == row0).FirstOrDefault();
|
||||
if ((drawing != null || change != null) && !string.IsNullOrEmpty(row0))
|
||||
{
|
||||
Model.QuantityManagement_Base Ins = new Model.QuantityManagement_Base();
|
||||
Ins.ProjectId = this.CurrUser.LoginProjectId;
|
||||
Ins.DrawingId = drawing.DrawingId;
|
||||
if (drawing != null)
|
||||
{
|
||||
Ins.DrawingId = drawing.DrawingId;
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.DrawingId = change.ChangeId;
|
||||
}
|
||||
Ins.Part = pds.Rows[i][1].ToString().Trim();
|
||||
Ins.ProjectContent = pds.Rows[i][2].ToString().Trim();
|
||||
Ins.Unit = pds.Rows[i][3].ToString().Trim();
|
||||
|
@ -385,11 +431,41 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
{
|
||||
Ins.Amount = Convert.ToDecimal(pds.Rows[i][4].ToString().Trim());
|
||||
}
|
||||
Ins.WorkTeam = pds.Rows[i][5].ToString().Trim();
|
||||
var teamGroup = teamGroups.Where(y => y.TeamGroupName == pds.Rows[i][5].ToString().Trim()).FirstOrDefault();
|
||||
if (teamGroup != null)
|
||||
{
|
||||
Ins.WorkTeam = teamGroup.TeamGroupId;
|
||||
}
|
||||
Ins.BaseId = SQLHelper.GetNewID(typeof(Model.QuantityManagement_Base));
|
||||
Ins.CompileMan = this.CurrUser.UserId;
|
||||
Ins.CompileDate = DateTime.Now.Date;
|
||||
BLL.BaseService.AddBase(Ins);
|
||||
|
||||
Model.QuantityManagement_BaseApprove approve1 = new Model.QuantityManagement_BaseApprove();
|
||||
approve1.BaseId = Ins.BaseId;
|
||||
approve1.ApproveMan = this.CurrUser.UserId;
|
||||
approve1.ApproveType = BLL.Const.Base_Compile;
|
||||
if (!string.IsNullOrEmpty(row6))
|
||||
{
|
||||
Ins.State = BLL.Const.Base_Audit1;
|
||||
BLL.BaseService.AddBase(Ins);
|
||||
approve1.ApproveDate = DateTime.Now;
|
||||
Model.QuantityManagement_BaseApprove approve = new Model.QuantityManagement_BaseApprove();
|
||||
approve.BaseId = Ins.BaseId;
|
||||
var projectUser = projectUsers.Where(y => y.UserName == row6).FirstOrDefault();
|
||||
if (projectUser != null)
|
||||
{
|
||||
approve.ApproveMan = projectUser.UserId;
|
||||
}
|
||||
approve.ApproveType = BLL.Const.Base_Audit1;
|
||||
BLL.BaseApproveService.AddBaseApprove(approve);
|
||||
}
|
||||
else
|
||||
{
|
||||
Ins.State = BLL.Const.Base_Compile;
|
||||
BLL.BaseService.AddBase(Ins);
|
||||
approve1.ApproveDate = null;
|
||||
}
|
||||
BLL.BaseApproveService.AddBaseApprove(approve1);
|
||||
}
|
||||
|
||||
else
|
||||
|
|
|
@ -33,8 +33,70 @@
|
|||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox runat="server" ID="txtAmount" Label="数量" NoDecimal="false" NoNegative="true" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="120px"></f:NumberBox>
|
||||
<f:TextBox ID="txtWorkTeam" runat="server" Label="作业队" Required="true" ShowRedStar="true" MaxLength="200" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:NumberBox runat="server" ID="txtAmount" Label="总数" NoDecimal="false" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="120px"></f:NumberBox>
|
||||
<f:DropDownList ID="drpWorkTeam" ShowRedStar="true" runat="server" LabelWidth="120px" Required="true" Label="计划作业队" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel5" Title="工程量基础表审批流程设置" runat="server" ShowHeader="true" EnableCollapse="true"
|
||||
BodyPadding="0px">
|
||||
<f:Form ID="Form5" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:RadioButtonList runat="server" ID="rblIsAgree" Label="是否同意" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="rblIsAgree_SelectedIndexChanged">
|
||||
<f:RadioItem Text="同意" Value="true" />
|
||||
<f:RadioItem Text="不同意" Value="false" />
|
||||
</f:RadioButtonList>
|
||||
<f:Label runat="server" CssStyle="display:none"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpHandleType" OnSelectedIndexChanged="drpHandleType_SelectedIndexChanged"
|
||||
AutoPostBack="true" runat="server" Label="办理步骤" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpHandleMan" runat="server" Label="办理人员" Required="true" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="plApprove1">
|
||||
<Items>
|
||||
<f:TextArea ID="txtOpinions" runat="server" Label="我的意见" MaxLength="3000">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="plApprove2">
|
||||
<Items>
|
||||
|
||||
<f:ContentPanel Title="工程量基础表审批列表" ShowBorder="true"
|
||||
BodyPadding="10px" EnableCollapse="true" ShowHeader="true" AutoScroll="true"
|
||||
runat="server">
|
||||
<f:Grid ID="gvApprove" IsFluid="true" CssClass="blockpanel" ShowBorder="true" ShowHeader="false" runat="server" EnableCollapse="false"
|
||||
DataKeyNames="BaseApproveId" EnableColumnLines="true" ForceFit="true">
|
||||
<Columns>
|
||||
<f:RowNumberField Width="20px" />
|
||||
<f:TemplateField ColumnID="State" Width="250px" HeaderText="办理类型" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbtype" runat="server" Text='<%# ConvertState(Eval("ApproveType")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:BoundField Width="180px" DataField="ApproveMan" HeaderTextAlign="Center" HeaderText="办理人员" TextAlign="Center" />
|
||||
<f:BoundField Width="200px" DataField="ApproveDate" HeaderTextAlign="Center" TextAlign="Center" DataFormatString="{0:yyyy-MM-dd}" HeaderText="办理时间" />
|
||||
<f:BoundField Width="180px" DataField="ApproveIdea" HeaderTextAlign="Center" TextAlign="Center" HeaderText="办理意见" />
|
||||
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
|
@ -21,6 +22,21 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
ViewState["BaseId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 办理类型
|
||||
/// </summary>
|
||||
public string State
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["State"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["State"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
|
@ -35,18 +51,35 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
{
|
||||
GetButtonPower();
|
||||
this.BaseId = Request.Params["BaseId"];
|
||||
BLL.DrawingService.InitDrawingDropDownList(drpDrawingNo, this.CurrUser.LoginProjectId, true);
|
||||
plApprove1.Hidden = true;
|
||||
plApprove2.Hidden = true;
|
||||
rblIsAgree.Hidden = true;
|
||||
rblIsAgree.SelectedValue = "true";
|
||||
BLL.DrawingService.InitDrawingChangeDropDownList(drpDrawingNo, this.CurrUser.LoginProjectId, true);
|
||||
BLL.TeamGroupService.InitTeamGroupProjectDropDownList(drpWorkTeam, this.CurrUser.LoginProjectId, true);
|
||||
var Base = BLL.BaseService.GetBaseById(this.BaseId);
|
||||
if (Base != null)
|
||||
{
|
||||
Model.QuantityManagement_Drawing drawing = BLL.DrawingService.GetDrawingById(Base.DrawingId);
|
||||
Model.QuantityManagement_Change change = BLL.ChangeService.GetChangeById(Base.DrawingId);
|
||||
this.BaseId = Base.BaseId;
|
||||
plApprove1.Hidden = false;
|
||||
plApprove2.Hidden = false;
|
||||
var dt = BaseApproveService.getListData(BaseId);
|
||||
gvApprove.DataSource = dt;
|
||||
gvApprove.DataBind();
|
||||
if (drawing != null)
|
||||
{
|
||||
this.txtWorkSection.Text = drawing.WorkSection;
|
||||
this.drpDrawingNo.SelectedValue = Base.DrawingId;
|
||||
this.txtDrawingName.Text = drawing.DrawingName;
|
||||
}
|
||||
else if (change != null)
|
||||
{
|
||||
this.txtWorkSection.Text = change.WorkSection;
|
||||
this.drpDrawingNo.SelectedValue = Base.DrawingId;
|
||||
this.txtDrawingName.Text = change.ChangeName;
|
||||
}
|
||||
this.txtPart.Text = Base.Part;
|
||||
this.txtProjectContent.Text = Base.ProjectContent;
|
||||
this.txtUnit.Text = Base.Unit;
|
||||
|
@ -54,27 +87,197 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
{
|
||||
this.txtAmount.Text = Base.Amount.ToString();
|
||||
}
|
||||
this.txtWorkTeam.Text = Base.WorkTeam;
|
||||
if (!string.IsNullOrEmpty(Base.WorkTeam))
|
||||
{
|
||||
this.drpWorkTeam.SelectedValue = Base.WorkTeam;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Base.State))
|
||||
{
|
||||
State = Base.State;
|
||||
}
|
||||
else
|
||||
{
|
||||
State = BLL.Const.Base_Compile;
|
||||
this.rblIsAgree.Visible = false;
|
||||
}
|
||||
if (State != BLL.Const.Base_Complete)
|
||||
{
|
||||
//Funs.Bind(drpHandleType, BaseService.GetDHandleTypeByState(State));
|
||||
BaseService.Init(drpHandleType, State, false);
|
||||
}
|
||||
if (State == BLL.Const.Base_Compile)
|
||||
{
|
||||
this.rblIsAgree.Visible = false;
|
||||
UserService.InitUserDropDownList2(drpHandleMan, CurrUser.LoginProjectId, false, string.Empty);
|
||||
this.drpHandleMan.SelectedIndex = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
UserService.InitUserDropDownList2(drpHandleMan, CurrUser.LoginProjectId, false, string.Empty);
|
||||
this.rblIsAgree.Visible = true;
|
||||
if (drpHandleType.SelectedValue == BLL.Const.Base_ReCompile)
|
||||
{
|
||||
var HandleMan = BLL.BaseApproveService.GetComplie(this.BaseId);
|
||||
if (HandleMan != null)
|
||||
{
|
||||
this.drpHandleMan.SelectedValue = UserService.GetUserNameByUserId(HandleMan.ApproveMan);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//设置流程上是否有同意不同意
|
||||
if (State == Const.Base_Audit1)
|
||||
{
|
||||
rblIsAgree.Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
rblIsAgree.Hidden = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
State = Const.Base_Compile;
|
||||
BaseService.Init(drpHandleType, State, false);
|
||||
UserService.InitUserDropDownList2(drpHandleMan, CurrUser.LoginProjectId, false, string.Empty);
|
||||
}
|
||||
//是否同意触发
|
||||
if (!rblIsAgree.Hidden)
|
||||
{
|
||||
HandleType();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 待办事项的下拉框的处理
|
||||
/// </summary>
|
||||
public void HandleType()
|
||||
{
|
||||
drpHandleType.Items.Clear();
|
||||
BaseService.Init(drpHandleType, State, false);
|
||||
string res = null;
|
||||
List<string> list = new List<string>();
|
||||
list.Add(Const.Base_ReCompile);
|
||||
var count = drpHandleType.Items.Count;
|
||||
List<ListItem> listitem = new List<ListItem>();
|
||||
if (rblIsAgree.SelectedValue.Equals("true"))
|
||||
{
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
res = drpHandleType.Items[i].Value;
|
||||
if (list.Contains(res))
|
||||
{
|
||||
var item = (drpHandleType.Items[i]);
|
||||
listitem.Add(item);
|
||||
}
|
||||
}
|
||||
if (listitem.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < listitem.Count; i++)
|
||||
{
|
||||
drpHandleType.Items.Remove(listitem[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
|
||||
res = drpHandleType.Items[i].Value;
|
||||
if (!list.Contains(res))
|
||||
{
|
||||
var item = drpHandleType.Items[i];
|
||||
listitem.Add(item);
|
||||
}
|
||||
}
|
||||
if (listitem.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < listitem.Count; i++)
|
||||
{
|
||||
drpHandleType.Items.Remove(listitem[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (count > 0)
|
||||
{
|
||||
drpHandleType.SelectedIndex = 0;
|
||||
HandleMan();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 办理人员的自动筛选
|
||||
/// </summary>
|
||||
protected void HandleMan()
|
||||
{
|
||||
drpHandleMan.Items.Clear();
|
||||
if (!string.IsNullOrEmpty(drpHandleType.SelectedText))
|
||||
{
|
||||
UserService.InitUserDropDownList2(drpHandleMan, CurrUser.LoginProjectId, false, string.Empty);
|
||||
if (drpHandleMan.Items.Count > 0)
|
||||
{
|
||||
drpHandleMan.SelectedIndex = 0;
|
||||
}
|
||||
if (drpHandleType.SelectedText.Contains("重新编制"))
|
||||
{
|
||||
UserService.InitUserDropDownList2(drpHandleMan, CurrUser.LoginProjectId, false, string.Empty);
|
||||
var HandleMan = BLL.BaseApproveService.GetComplie(this.BaseId);
|
||||
if (HandleMan != null)
|
||||
{
|
||||
this.drpHandleMan.SelectedValue = HandleMan.ApproveMan;
|
||||
}
|
||||
}
|
||||
if (drpHandleType.SelectedValue == BLL.Const.Base_Complete)
|
||||
{
|
||||
drpHandleMan.Items.Clear();
|
||||
drpHandleMan.Enabled = false;
|
||||
drpHandleMan.Required = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
drpHandleMan.Enabled = true;
|
||||
drpHandleMan.Required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void drpHandleType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
HandleMan();
|
||||
}
|
||||
|
||||
protected void rblIsAgree_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
HandleType();
|
||||
}
|
||||
|
||||
protected void drpDrawingNo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Model.QuantityManagement_Drawing drawing = BLL.DrawingService.GetDrawingById(this.drpDrawingNo.SelectedValue);
|
||||
Model.QuantityManagement_Change change = BLL.ChangeService.GetChangeById(this.drpDrawingNo.SelectedValue);
|
||||
if (drawing != null)
|
||||
{
|
||||
this.txtWorkSection.Text = drawing.WorkSection;
|
||||
this.txtDrawingName.Text = drawing.DrawingName;
|
||||
this.txtAmount.NoNegative = true;
|
||||
}
|
||||
else if (change != null)
|
||||
{
|
||||
this.txtWorkSection.Text = change.WorkSection;
|
||||
this.txtDrawingName.Text = change.ChangeName;
|
||||
this.txtAmount.NoNegative = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtWorkSection.Text = string.Empty;
|
||||
this.txtDrawingName.Text = string.Empty;
|
||||
this.txtAmount.NoNegative = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,6 +294,21 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
Alert.ShowInTop("请选择图号", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpWorkTeam.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择计划作业队", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.QuantityManagement_Drawing drawing = BLL.DrawingService.GetDrawingById(this.drpDrawingNo.SelectedValue);
|
||||
if (drawing != null)
|
||||
{
|
||||
decimal d = Funs.GetNewDecimalOrZero(this.txtAmount.Text.Trim());
|
||||
if (d < 0)
|
||||
{
|
||||
Alert.ShowInTop("图纸工程量总数不能为负数", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
Model.QuantityManagement_Base newBase = new Model.QuantityManagement_Base();
|
||||
newBase.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newBase.DrawingId = this.drpDrawingNo.SelectedValue;
|
||||
|
@ -98,7 +316,8 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
newBase.ProjectContent = this.txtProjectContent.Text.Trim();
|
||||
newBase.Unit = this.txtUnit.Text.Trim();
|
||||
newBase.Amount = Funs.GetNewDecimal(this.txtAmount.Text.Trim());
|
||||
newBase.WorkTeam = this.txtWorkTeam.Text.Trim();
|
||||
newBase.WorkTeam = this.drpWorkTeam.SelectedValue;
|
||||
newBase.State = drpHandleType.SelectedValue.Trim();
|
||||
if (string.IsNullOrEmpty(this.BaseId))
|
||||
{
|
||||
newBase.BaseId = SQLHelper.GetNewID(typeof(Model.QuantityManagement_Base));
|
||||
|
@ -111,6 +330,21 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
// return;
|
||||
//}
|
||||
BLL.BaseService.AddBase(newBase);
|
||||
Model.QuantityManagement_BaseApprove approve1 = new Model.QuantityManagement_BaseApprove();
|
||||
approve1.BaseId = newBase.BaseId;
|
||||
approve1.ApproveDate = DateTime.Now;
|
||||
approve1.ApproveMan = this.CurrUser.UserId;
|
||||
approve1.ApproveType = BLL.Const.Base_Compile;
|
||||
BLL.BaseApproveService.AddBaseApprove(approve1);
|
||||
|
||||
Model.QuantityManagement_BaseApprove approve = new Model.QuantityManagement_BaseApprove();
|
||||
approve.BaseId = newBase.BaseId;
|
||||
if (this.drpHandleMan.SelectedValue != "")
|
||||
{
|
||||
approve.ApproveMan = this.drpHandleMan.SelectedValue;
|
||||
}
|
||||
approve.ApproveType = this.drpHandleType.SelectedValue;
|
||||
BLL.BaseApproveService.AddBaseApprove(approve);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -121,20 +355,27 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
// Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
var oldBase = Funs.DB.QuantityManagement_Base.Where(u => u.BaseId == this.BaseId).FirstOrDefault();
|
||||
if (oldBase == null)
|
||||
Model.QuantityManagement_BaseApprove approve1 = BLL.BaseApproveService.GetBaseApproveByBaseId(BaseId);
|
||||
if (approve1 != null)
|
||||
{
|
||||
newBase.CompileMan = this.CurrUser.UserId;
|
||||
newBase.CompileDate = DateTime.Now;
|
||||
BLL.BaseService.AddBase(newBase);
|
||||
approve1.ApproveDate = DateTime.Now;
|
||||
approve1.ApproveIdea = txtOpinions.Text.Trim();
|
||||
approve1.IsAgree = Convert.ToBoolean(this.rblIsAgree.SelectedValue);
|
||||
BLL.BaseApproveService.UpdateBaseApprove(approve1);
|
||||
}
|
||||
else
|
||||
if (this.drpHandleMan.SelectedValue != null)
|
||||
{
|
||||
newBase.CompileMan = oldBase.CompileMan;
|
||||
newBase.CompileDate = oldBase.CompileDate;
|
||||
BLL.BaseService.UpdateBase(newBase);
|
||||
|
||||
Model.QuantityManagement_BaseApprove approve = new Model.QuantityManagement_BaseApprove();
|
||||
approve.BaseId = BaseId;
|
||||
approve.ApproveMan = this.drpHandleMan.SelectedValue;
|
||||
approve.ApproveType = this.drpHandleType.SelectedValue;
|
||||
if (this.drpHandleType.SelectedValue == BLL.Const.Base_Complete)
|
||||
{
|
||||
approve.ApproveDate = DateTime.Now.AddMinutes(1);
|
||||
}
|
||||
BLL.BaseApproveService.AddBaseApprove(approve);
|
||||
}
|
||||
BLL.BaseService.UpdateBase(newBase);
|
||||
}
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
|
@ -163,5 +404,38 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 把状态转换代号为文字形式
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertState(object state)
|
||||
{
|
||||
if (state != null)
|
||||
{
|
||||
if (state.ToString() == BLL.Const.Base_ReCompile)
|
||||
{
|
||||
return "重新编制";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.Base_Compile)
|
||||
{
|
||||
return "编制";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.Base_Audit1)
|
||||
{
|
||||
return "审核";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.Base_Complete)
|
||||
{
|
||||
return "审批完成";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -103,13 +103,103 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
protected global::FineUIPro.NumberBox txtAmount;
|
||||
|
||||
/// <summary>
|
||||
/// txtWorkTeam 控件。
|
||||
/// drpWorkTeam 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWorkTeam;
|
||||
protected global::FineUIPro.DropDownList drpWorkTeam;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel5;
|
||||
|
||||
/// <summary>
|
||||
/// Form5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form5;
|
||||
|
||||
/// <summary>
|
||||
/// rblIsAgree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rblIsAgree;
|
||||
|
||||
/// <summary>
|
||||
/// drpHandleType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpHandleType;
|
||||
|
||||
/// <summary>
|
||||
/// drpHandleMan 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpHandleMan;
|
||||
|
||||
/// <summary>
|
||||
/// plApprove1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow plApprove1;
|
||||
|
||||
/// <summary>
|
||||
/// txtOpinions 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtOpinions;
|
||||
|
||||
/// <summary>
|
||||
/// plApprove2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow plApprove2;
|
||||
|
||||
/// <summary>
|
||||
/// gvApprove 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid gvApprove;
|
||||
|
||||
/// <summary>
|
||||
/// lbtype 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbtype;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BaseView.aspx.cs" Inherits="FineUIPro.Web.CQMS.QuantityManagement.BaseView" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>编辑工程量基础表</title>
|
||||
</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">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpDrawingNo" OnSelectedIndexChanged="drpDrawingNo_SelectedIndexChanged" AutoPostBack="true" Readonly="true" ShowRedStar="true" runat="server" LabelWidth="120px" Required="true" Label="图号" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtWorkSection" runat="server" Readonly="true" Label="工段" MaxLength="100" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtDrawingName" runat="server" Label="图纸名称" Readonly="true" MaxLength="100" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:TextBox ID="txtPart" runat="server" Label="部位" Required="true" ShowRedStar="true" Readonly="true" MaxLength="100" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtProjectContent" runat="server" Label="项目内容" Required="true" Readonly="true" ShowRedStar="true" MaxLength="100" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:TextBox ID="txtUnit" runat="server" Label="单位" Required="true" ShowRedStar="true" Readonly="true" MaxLength="50" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox runat="server" ID="txtAmount" Label="总数" NoDecimal="false" Required="true" Readonly="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="120px"></f:NumberBox>
|
||||
<f:DropDownList ID="drpWorkTeam" ShowRedStar="true" runat="server" LabelWidth="120px" Required="true" Readonly="true" Label="计划作业队" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="plApprove2">
|
||||
<Items>
|
||||
|
||||
<f:ContentPanel Title="工程量基础表审批列表" ShowBorder="true"
|
||||
BodyPadding="10px" EnableCollapse="true" ShowHeader="true" AutoScroll="true"
|
||||
runat="server">
|
||||
<f:Grid ID="gvApprove" IsFluid="true" CssClass="blockpanel" ShowBorder="true" ShowHeader="false" runat="server" EnableCollapse="false"
|
||||
DataKeyNames="BaseApproveId" EnableColumnLines="true" ForceFit="true">
|
||||
<Columns>
|
||||
<f:RowNumberField Width="20px" />
|
||||
<f:TemplateField ColumnID="State" Width="250px" HeaderText="办理类型" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbtype" runat="server" Text='<%# ConvertState(Eval("ApproveType")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:BoundField Width="180px" DataField="ApproveMan" HeaderTextAlign="Center" HeaderText="办理人员" TextAlign="Center" />
|
||||
<f:BoundField Width="200px" DataField="ApproveDate" HeaderTextAlign="Center" TextAlign="Center" DataFormatString="{0:yyyy-MM-dd}" HeaderText="办理时间" />
|
||||
<f:BoundField Width="180px" DataField="ApproveIdea" HeaderTextAlign="Center" TextAlign="Center" HeaderText="办理意见" />
|
||||
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</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>
|
|
@ -0,0 +1,184 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
{
|
||||
public partial class BaseView : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string BaseId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["BaseId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["BaseId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 办理类型
|
||||
/// </summary>
|
||||
public string State
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["State"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["State"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
GetButtonPower();
|
||||
this.BaseId = Request.Params["BaseId"];
|
||||
plApprove2.Hidden = true;
|
||||
BLL.DrawingService.InitDrawingChangeDropDownList(drpDrawingNo, this.CurrUser.LoginProjectId, true);
|
||||
BLL.TeamGroupService.InitTeamGroupProjectDropDownList(drpWorkTeam, this.CurrUser.LoginProjectId, true);
|
||||
var Base = BLL.BaseService.GetBaseById(this.BaseId);
|
||||
if (Base != null)
|
||||
{
|
||||
Model.QuantityManagement_Drawing drawing = BLL.DrawingService.GetDrawingById(Base.DrawingId);
|
||||
Model.QuantityManagement_Change change = BLL.ChangeService.GetChangeById(Base.DrawingId);
|
||||
this.BaseId = Base.BaseId;
|
||||
plApprove2.Hidden = false;
|
||||
var dt = BaseApproveService.getListData(BaseId);
|
||||
gvApprove.DataSource = dt;
|
||||
gvApprove.DataBind();
|
||||
if (drawing != null)
|
||||
{
|
||||
this.txtWorkSection.Text = drawing.WorkSection;
|
||||
this.drpDrawingNo.SelectedValue = Base.DrawingId;
|
||||
this.txtDrawingName.Text = drawing.DrawingName;
|
||||
}
|
||||
else if (change != null)
|
||||
{
|
||||
this.txtWorkSection.Text = change.WorkSection;
|
||||
this.drpDrawingNo.SelectedValue = Base.DrawingId;
|
||||
this.txtDrawingName.Text = change.ChangeName;
|
||||
}
|
||||
this.txtPart.Text = Base.Part;
|
||||
this.txtProjectContent.Text = Base.ProjectContent;
|
||||
this.txtUnit.Text = Base.Unit;
|
||||
if (Base.Amount != null)
|
||||
{
|
||||
this.txtAmount.Text = Base.Amount.ToString();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Base.WorkTeam))
|
||||
{
|
||||
this.drpWorkTeam.SelectedValue = Base.WorkTeam;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Base.State))
|
||||
{
|
||||
State = Base.State;
|
||||
}
|
||||
else
|
||||
{
|
||||
State = BLL.Const.Base_Compile;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
State = Const.Base_Compile;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void drpDrawingNo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Model.QuantityManagement_Drawing drawing = BLL.DrawingService.GetDrawingById(this.drpDrawingNo.SelectedValue);
|
||||
Model.QuantityManagement_Change change = BLL.ChangeService.GetChangeById(this.drpDrawingNo.SelectedValue);
|
||||
if (drawing != null)
|
||||
{
|
||||
this.txtWorkSection.Text = drawing.WorkSection;
|
||||
this.txtDrawingName.Text = drawing.DrawingName;
|
||||
this.txtAmount.NoNegative = true;
|
||||
}
|
||||
else if (change != null)
|
||||
{
|
||||
this.txtWorkSection.Text = change.WorkSection;
|
||||
this.txtDrawingName.Text = change.ChangeName;
|
||||
this.txtAmount.NoNegative = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtWorkSection.Text = string.Empty;
|
||||
this.txtDrawingName.Text = string.Empty;
|
||||
this.txtAmount.NoNegative = true;
|
||||
}
|
||||
}
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (Request.Params["value"] == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.BaseMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 把状态转换代号为文字形式
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertState(object state)
|
||||
{
|
||||
if (state != null)
|
||||
{
|
||||
if (state.ToString() == BLL.Const.Base_ReCompile)
|
||||
{
|
||||
return "重新编制";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.Base_Compile)
|
||||
{
|
||||
return "编制";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.Base_Audit1)
|
||||
{
|
||||
return "审核";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.Base_Complete)
|
||||
{
|
||||
return "审批完成";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.QuantityManagement {
|
||||
|
||||
|
||||
public partial class BaseView {
|
||||
|
||||
/// <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>
|
||||
/// drpDrawingNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDrawingNo;
|
||||
|
||||
/// <summary>
|
||||
/// txtWorkSection 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWorkSection;
|
||||
|
||||
/// <summary>
|
||||
/// txtDrawingName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtDrawingName;
|
||||
|
||||
/// <summary>
|
||||
/// txtPart 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPart;
|
||||
|
||||
/// <summary>
|
||||
/// txtProjectContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtProjectContent;
|
||||
|
||||
/// <summary>
|
||||
/// txtUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUnit;
|
||||
|
||||
/// <summary>
|
||||
/// txtAmount 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtAmount;
|
||||
|
||||
/// <summary>
|
||||
/// drpWorkTeam 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWorkTeam;
|
||||
|
||||
/// <summary>
|
||||
/// plApprove2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow plApprove2;
|
||||
|
||||
/// <summary>
|
||||
/// gvApprove 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid gvApprove;
|
||||
|
||||
/// <summary>
|
||||
/// lbtype 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbtype;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
|
@ -6,6 +6,43 @@
|
|||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>变更登记</title>
|
||||
<style type="text/css">
|
||||
.labcenter {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.LabelColor {
|
||||
color: Red;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.Green {
|
||||
background-color: Green;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.Yellow {
|
||||
background-color: #FFFF93;
|
||||
}
|
||||
|
||||
.Red {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.LightGreen {
|
||||
background-color: LightGreen
|
||||
}
|
||||
|
||||
.f-grid-colheader-text {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
|
@ -15,7 +52,7 @@
|
|||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="变更登记" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ChangeId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="2" DataIDField="ChangeId" AllowSorting="true" SortField="ChangeNo" ForceFit="true"
|
||||
ClicksToEdit="2" DataIDField="ChangeId" AllowSorting="true" SortField="AcceptDate" ForceFit="true"
|
||||
SortDirection="DESC" OnSort="Grid1_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true">
|
||||
|
@ -56,15 +93,21 @@
|
|||
<f:RenderField ColumnID="ChangeName" DataField="ChangeName" FieldType="String" HeaderText="变更名称" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="200px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="DrawingNo" DataField="DrawingNo" FieldType="String" HeaderText="原图纸号" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="250px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Major" DataField="Major" FieldType="String" HeaderText="专业" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="AcceptDate" DataField="AcceptDate" FieldType="Date" Renderer="Date" HeaderText="接收日期" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="CompletionStatus" DataField="CompletionStatus" FieldType="String" HeaderText="完成情况" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:CheckBoxField Width="100px" SortField="CompletionStatus" RenderAsStaticField="true" DataField="CompletionStatus"
|
||||
HeaderText="材料计划是否完成" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:CheckBoxField>
|
||||
<f:CheckBoxField Width="100px" SortField="CompletionStatus2" RenderAsStaticField="true" DataField="CompletionStatus2"
|
||||
HeaderText="工程量统计是否完成" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:CheckBoxField>
|
||||
<f:RenderField ColumnID="DutyPerson" DataField="DutyPerson" FieldType="String" HeaderText="责任人" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
|
|
|
@ -29,8 +29,10 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
/// </summary>
|
||||
public void BindGrid()
|
||||
{
|
||||
string strSql = @"select ChangeId,ProjectId,C.WorkSection,ChangeNo,ChangeName,Major,AcceptDate,CompletionStatus,DutyPerson,Remark
|
||||
string strSql = @"select ChangeId,C.ProjectId,C.WorkSection,C.ChangeNo,ChangeName,cn.ProfessionalName as Major,d.DrawingNo,C.AcceptDate,C.CompletionStatus,C.CompletionStatus2,C.DutyPerson,C.Remark
|
||||
from QuantityManagement_Change C
|
||||
left join Base_CNProfessional cn on C.Major=cn.CNProfessionalId
|
||||
left join QuantityManagement_Drawing d on d.DrawingId=C.DrawingId
|
||||
where C.ProjectId = @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
|
@ -55,6 +57,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
for (int i = 0; i < this.Grid1.Rows.Count; i++)
|
||||
{
|
||||
string id = this.Grid1.Rows[i].RowID;
|
||||
Model.QuantityManagement_Change change = BLL.ChangeService.GetChangeById(id);
|
||||
if (change != null && (change.CompletionStatus != true || change.CompletionStatus2 != true))
|
||||
{
|
||||
this.Grid1.Rows[i].RowCssClass = "Yellow";
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -14,29 +14,38 @@
|
|||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtWorkSection" runat="server" Label="工段" MaxLength="100" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:TextBox ID="txtChangeNo" runat="server" Label="变更号" MaxLength="100" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:TextBox ID="txtWorkSection" runat="server" Label="工段" MaxLength="100" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="140px"></f:TextBox>
|
||||
<f:TextBox ID="txtChangeNo" runat="server" Label="变更号" MaxLength="100" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="140px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtChangeName" runat="server" Label="变更名称" MaxLength="100" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:TextBox ID="txtMajor" runat="server" Label="专业" Required="true" ShowRedStar="true" MaxLength="50" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:TextBox ID="txtChangeName" runat="server" Label="变更名称" MaxLength="100" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="140px"></f:TextBox>
|
||||
<f:DropDownList ID="drpMajor" ShowRedStar="true" runat="server" LabelWidth="140px" Required="true" Label="专业" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<f:FormRow ColumnWidths="50% 25% 25%">
|
||||
<Items>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="接收日期" ID="txtAcceptDate"
|
||||
LabelAlign="right" LabelWidth="120px">
|
||||
LabelAlign="right" LabelWidth="140px">
|
||||
</f:DatePicker>
|
||||
<f:TextBox ID="txtCompletionStatus" runat="server" Label="完成情况" Required="true" ShowRedStar="true" MaxLength="50" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:CheckBox ID="cbCompletionStatus" runat="server" Label="材料计划是否完成" LabelAlign="Right" LabelWidth="140px"></f:CheckBox>
|
||||
<f:CheckBox ID="cbCompletionStatus2" runat="server" Label="工程量统计是否完成" LabelAlign="Right" LabelWidth="160px"></f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtDutyPerson" runat="server" Label="责任人" MaxLength="50" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:TextBox ID="txtRemark" runat="server" Label="备注" Required="true" ShowRedStar="true" MaxLength="200" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
</Items>
|
||||
<f:TextBox ID="txtDutyPerson" runat="server" Label="责任人" MaxLength="50" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="140px"></f:TextBox>
|
||||
<f:TextBox ID="txtRemark" runat="server" Label="备注" MaxLength="200" LabelAlign="Right" LabelWidth="140px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpDrawingNo" ShowRedStar="true" runat="server" LabelWidth="140px" Required="true" Label="原图纸号" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:Label runat="server"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow Hidden="true">
|
||||
<Items>
|
||||
|
|
|
@ -35,6 +35,8 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
{
|
||||
GetButtonPower();
|
||||
this.ChangeId = Request.Params["ChangeId"];
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(drpMajor, true);
|
||||
BLL.DrawingService.InitDrawingDropDownList(drpDrawingNo, this.CurrUser.LoginProjectId, true);
|
||||
var Change = BLL.ChangeService.GetChangeById(this.ChangeId);
|
||||
if (Change != null)
|
||||
{
|
||||
|
@ -42,9 +44,28 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
this.txtWorkSection.Text = Change.WorkSection;
|
||||
this.txtChangeNo.Text = Change.ChangeNo;
|
||||
this.txtChangeName.Text = Change.ChangeName;
|
||||
this.txtMajor.Text = Change.Major;
|
||||
this.drpMajor.SelectedValue = Change.Major;
|
||||
this.txtAcceptDate.Text = Change.AcceptDate.HasValue ? string.Format("{0:yyyy-MM-dd}", Change.AcceptDate) : "";
|
||||
this.txtCompletionStatus.Text = Change.CompletionStatus;
|
||||
if (Change.CompletionStatus == true)
|
||||
{
|
||||
this.cbCompletionStatus.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.cbCompletionStatus.Checked = false;
|
||||
}
|
||||
if (Change.CompletionStatus2 == true)
|
||||
{
|
||||
this.cbCompletionStatus2.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.cbCompletionStatus2.Checked = false;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Change.DrawingId))
|
||||
{
|
||||
this.drpDrawingNo.SelectedValue = Change.DrawingId;
|
||||
}
|
||||
this.txtDutyPerson.Text = Change.DutyPerson;
|
||||
this.txtRemark.Text = Change.Remark;
|
||||
}
|
||||
|
@ -63,18 +84,43 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (this.drpMajor.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择专业", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpDrawingNo.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择原图纸号", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.QuantityManagement_Change newChange = new Model.QuantityManagement_Change();
|
||||
newChange.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newChange.WorkSection = this.txtWorkSection.Text.Trim();
|
||||
newChange.ChangeNo = this.txtChangeNo.Text.Trim();
|
||||
newChange.ChangeName = this.txtChangeName.Text.Trim();
|
||||
newChange.Major = this.txtMajor.Text.Trim();
|
||||
newChange.Major = this.drpMajor.SelectedValue;
|
||||
newChange.DrawingId = this.drpDrawingNo.SelectedValue;
|
||||
if (!string.IsNullOrEmpty(this.txtAcceptDate.Text))
|
||||
{
|
||||
newChange.AcceptDate = Convert.ToDateTime(this.txtAcceptDate.Text);
|
||||
}
|
||||
newChange.CompletionStatus = this.txtCompletionStatus.Text.Trim();
|
||||
if (cbCompletionStatus.Checked)
|
||||
{
|
||||
newChange.CompletionStatus = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newChange.CompletionStatus = false;
|
||||
}
|
||||
if (cbCompletionStatus2.Checked)
|
||||
{
|
||||
newChange.CompletionStatus2 = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newChange.CompletionStatus2 = false;
|
||||
}
|
||||
newChange.DutyPerson = this.txtDutyPerson.Text.Trim();
|
||||
newChange.Remark = this.txtRemark.Text.Trim();
|
||||
if (string.IsNullOrEmpty(this.ChangeId))
|
||||
|
|
|
@ -67,13 +67,13 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
protected global::FineUIPro.TextBox txtChangeName;
|
||||
|
||||
/// <summary>
|
||||
/// txtMajor 控件。
|
||||
/// drpMajor 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtMajor;
|
||||
protected global::FineUIPro.DropDownList drpMajor;
|
||||
|
||||
/// <summary>
|
||||
/// txtAcceptDate 控件。
|
||||
|
@ -85,13 +85,22 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
protected global::FineUIPro.DatePicker txtAcceptDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompletionStatus 控件。
|
||||
/// cbCompletionStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCompletionStatus;
|
||||
protected global::FineUIPro.CheckBox cbCompletionStatus;
|
||||
|
||||
/// <summary>
|
||||
/// cbCompletionStatus2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox cbCompletionStatus2;
|
||||
|
||||
/// <summary>
|
||||
/// txtDutyPerson 控件。
|
||||
|
@ -111,6 +120,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// drpDrawingNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDrawingNo;
|
||||
|
||||
/// <summary>
|
||||
/// Panel2 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="工程量日常录入" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="DayInputId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="2" DataIDField="DayInputId" AllowSorting="true" SortField="DrawingNo,Part,ProjectContent" ForceFit="true"
|
||||
ClicksToEdit="2" DataIDField="DayInputId" AllowSorting="true" SortField="DrawingNo,Part,ProjectContent,Date" ForceFit="true"
|
||||
SortDirection="DESC" OnSort="Grid1_Sort"
|
||||
AllowPaging="true" IsDataBasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true">
|
||||
|
@ -60,10 +60,10 @@
|
|||
<f:RenderField ColumnID="Unit" DataField="Unit" FieldType="String" HeaderText="单位" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="80px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Amount" DataField="Amount" FieldType="Float" HeaderText="数量" TextAlign="Center"
|
||||
<f:RenderField ColumnID="Amount" DataField="Amount" FieldType="Float" HeaderText="总数" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="WorkTeam" DataField="WorkTeam" FieldType="String" HeaderText="作业队" TextAlign="Center"
|
||||
<f:RenderField ColumnID="WorkTeam" DataField="WorkTeam" FieldType="String" HeaderText="实际作业队" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Date" DataField="Date" FieldType="Date" Renderer="Date" HeaderText="日期" TextAlign="Center"
|
||||
|
|
|
@ -29,10 +29,11 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
/// </summary>
|
||||
public void BindGrid()
|
||||
{
|
||||
string strSql = @"select DayInputId,C.ProjectId,a.WorkSection,DrawingNo,DrawingName,Part,ProjectContent,Unit,Amount,WorkTeam,C.Date,C.DayAmount
|
||||
string strSql = @"select DayInputId,C.ProjectId,a.WorkSection,DrawingNo,DrawingName,Part,ProjectContent,Unit,Amount,t.TeamGroupName as WorkTeam,C.Date,C.DayAmount
|
||||
from QuantityManagement_DayInput C
|
||||
left join QuantityManagement_Base b on b.BaseId=C.BaseId
|
||||
left join QuantityManagement_Drawing a on a.DrawingId=b.DrawingId
|
||||
left join ProjectData_TeamGroup t on t.TeamGroupId=C.WorkTeam
|
||||
where C.ProjectId = @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpDrawingNo" OnSelectedIndexChanged="drpDrawingNo_SelectedIndexChanged" AutoPostBack="true" ShowRedStar="true" runat="server" LabelWidth="120px" Required="true" Label="图号" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtWorkSection" runat="server" Readonly="true" Label="工段" MaxLength="100" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
@ -23,20 +23,21 @@
|
|||
<Items>
|
||||
<f:TextBox ID="txtDrawingName" runat="server" Label="图纸名称" Readonly="true" MaxLength="100" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:DropDownList ID="drpPart" OnSelectedIndexChanged="drpPart_SelectedIndexChanged" AutoPostBack="true" ShowRedStar="true" runat="server" LabelWidth="120px" Required="true" Label="部位" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpProjectContent" OnSelectedIndexChanged="drpProjectContent_SelectedIndexChanged" AutoPostBack="true" ShowRedStar="true" runat="server" LabelWidth="120px" Required="true" Label="项目内容" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtUnit" runat="server" Readonly="true" Label="单位" MaxLength="50" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox runat="server" ID="txtAmount" Label="数量" NoDecimal="false" NoNegative="true" Readonly="true" LabelAlign="Right" LabelWidth="120px"></f:NumberBox>
|
||||
<f:TextBox ID="txtWorkTeam" runat="server" Label="作业队" Readonly="true" MaxLength="200" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:NumberBox runat="server" ID="txtAmount" Label="剩余数量" NoDecimal="false" NoNegative="true" Readonly="true" LabelAlign="Right" LabelWidth="120px"></f:NumberBox>
|
||||
<f:DropDownList ID="drpWorkTeam" ShowRedStar="true" runat="server" LabelWidth="120px" Required="true" Label="实际作业队" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
|
@ -47,12 +48,27 @@
|
|||
<f:NumberBox runat="server" ID="txtDayAmount" Label="完成工程量" NoDecimal="false" NoNegative="true" ShowRedStar="true" Required="true" LabelAlign="Right" LabelWidth="120px"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel ID="Panel2" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
|
||||
<Items>
|
||||
<f:Label ID="Label1" runat="server" ShowRedStar="true" Label="上传附件"
|
||||
LabelWidth="120px" LabelAlign="Right">
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:HiddenField ID="hdAttachUrl" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:HiddenField ID="hdDayInputId" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
|
|
|
@ -35,10 +35,12 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
{
|
||||
GetButtonPower();
|
||||
this.DayInputId = Request.Params["DayInputId"];
|
||||
BLL.DrawingService.InitDrawingDropDownList(drpDrawingNo, this.CurrUser.LoginProjectId, true);
|
||||
BLL.DrawingService.InitDrawingChangeDropDownList(drpDrawingNo, this.CurrUser.LoginProjectId, true);
|
||||
BLL.TeamGroupService.InitTeamGroupProjectDropDownList(drpWorkTeam, this.CurrUser.LoginProjectId, true);
|
||||
var DayInput = BLL.DayInputService.GetDayInputById(this.DayInputId);
|
||||
if (DayInput != null)
|
||||
{
|
||||
this.hdDayInputId.Text = this.DayInputId;
|
||||
Model.QuantityManagement_Base b = BLL.BaseService.GetBaseById(DayInput.BaseId);
|
||||
if (b != null)
|
||||
{
|
||||
|
@ -55,11 +57,16 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
BLL.BaseService.InitProjectContentDropDownList(this.drpProjectContent, b.DrawingId, b.Part, true);
|
||||
this.drpProjectContent.SelectedValue = b.BaseId;
|
||||
this.txtUnit.Text = b.Unit;
|
||||
decimal usedAmount = (from x in Funs.DB.QuantityManagement_DayInput where x.BaseId == DayInput.BaseId select x.DayAmount ?? 0).Sum();
|
||||
if (b.Amount != null)
|
||||
{
|
||||
this.txtAmount.Text = b.Amount.ToString();
|
||||
this.txtAmount.Text = (b.Amount - usedAmount).ToString();
|
||||
this.txtDayAmount.MaxValue = Convert.ToDouble(b.Amount - usedAmount);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(DayInput.WorkTeam))
|
||||
{
|
||||
this.drpWorkTeam.SelectedValue = DayInput.WorkTeam;
|
||||
}
|
||||
this.txtWorkTeam.Text = b.WorkTeam;
|
||||
if (DayInput.Date != null)
|
||||
{
|
||||
this.txtDate.Text = string.Format("{0:yyyy-MM-dd}", DayInput.Date);
|
||||
|
@ -81,6 +88,7 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
protected void drpDrawingNo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Model.QuantityManagement_Drawing drawing = BLL.DrawingService.GetDrawingById(this.drpDrawingNo.SelectedValue);
|
||||
Model.QuantityManagement_Change change = BLL.ChangeService.GetChangeById(this.drpDrawingNo.SelectedValue);
|
||||
if (drawing != null)
|
||||
{
|
||||
this.txtWorkSection.Text = drawing.WorkSection;
|
||||
|
@ -88,7 +96,14 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
BLL.BaseService.InitPartDropDownList(this.drpPart, drawing.DrawingId, true);
|
||||
this.drpPart.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
else
|
||||
else if (change != null)
|
||||
{
|
||||
this.txtWorkSection.Text = change.WorkSection;
|
||||
this.txtDrawingName.Text = change.ChangeName;
|
||||
BLL.BaseService.InitPartDropDownList(this.drpPart, change.ChangeId, true);
|
||||
this.drpPart.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtWorkSection.Text = string.Empty;
|
||||
this.txtDrawingName.Text = string.Empty;
|
||||
|
@ -101,7 +116,7 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
this.drpProjectContent.SelectedValue = BLL.Const._Null;
|
||||
this.txtUnit.Text = string.Empty;
|
||||
this.txtAmount.Text = string.Empty;
|
||||
this.txtWorkTeam.Text = string.Empty;
|
||||
this.drpWorkTeam.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
|
||||
protected void drpPart_SelectedIndexChanged(object sender, EventArgs e)
|
||||
|
@ -119,7 +134,7 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
}
|
||||
this.txtUnit.Text = string.Empty;
|
||||
this.txtAmount.Text = string.Empty;
|
||||
this.txtWorkTeam.Text = string.Empty;
|
||||
this.drpWorkTeam.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
|
||||
protected void drpProjectContent_SelectedIndexChanged(object sender, EventArgs e)
|
||||
|
@ -130,11 +145,13 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
if (b != null)
|
||||
{
|
||||
this.txtUnit.Text = b.Unit;
|
||||
decimal usedAmount = (from x in Funs.DB.QuantityManagement_DayInput where x.BaseId == this.drpProjectContent.SelectedValue select x).ToList().Sum(x => x.DayAmount ?? 0);
|
||||
if (b.Amount != null)
|
||||
{
|
||||
this.txtAmount.Text = b.Amount.ToString();
|
||||
this.txtAmount.Text = (b.Amount - usedAmount).ToString();
|
||||
this.txtDayAmount.MaxValue = Convert.ToDouble(b.Amount - usedAmount);
|
||||
}
|
||||
this.txtWorkTeam.Text = b.WorkTeam;
|
||||
this.drpWorkTeam.SelectedValue = b.WorkTeam;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -144,7 +161,7 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
this.drpProjectContent.SelectedValue = BLL.Const._Null;
|
||||
this.txtUnit.Text = string.Empty;
|
||||
this.txtAmount.Text = string.Empty;
|
||||
this.txtWorkTeam.Text = string.Empty;
|
||||
this.drpWorkTeam.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -171,14 +188,27 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
Alert.ShowInTop("请选择项目内容", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpWorkTeam.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择实际作业队", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.QuantityManagement_DayInput newDayInput = new Model.QuantityManagement_DayInput();
|
||||
newDayInput.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDayInput.BaseId = this.drpProjectContent.SelectedValue;
|
||||
newDayInput.Date = Funs.GetNewDateTimeOrNow(this.txtDate.Text.Trim());
|
||||
newDayInput.DayAmount = Funs.GetNewDecimal(this.txtDayAmount.Text.Trim());
|
||||
newDayInput.WorkTeam = this.drpWorkTeam.SelectedValue;
|
||||
if (string.IsNullOrEmpty(this.DayInputId))
|
||||
{
|
||||
newDayInput.DayInputId = SQLHelper.GetNewID(typeof(Model.QuantityManagement_DayInput));
|
||||
if (string.IsNullOrEmpty(this.hdDayInputId.Text))
|
||||
{
|
||||
newDayInput.DayInputId = SQLHelper.GetNewID(typeof(Model.QuantityManagement_DayInput));
|
||||
}
|
||||
else
|
||||
{
|
||||
newDayInput.DayInputId = this.hdDayInputId.Text;
|
||||
}
|
||||
newDayInput.CompileMan = this.CurrUser.UserId;
|
||||
newDayInput.CompileDate = DateTime.Now;
|
||||
//var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == newDayInput.DayInputId);
|
||||
|
@ -240,5 +270,21 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 附件上传
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttach_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.hdDayInputId.Text)) //新增记录
|
||||
{
|
||||
this.hdDayInputId.Text = SQLHelper.GetNewID();
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/JDGL/DayInput&menuId={1}", this.hdDayInputId.Text, BLL.Const.DayInputMenuId)));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -103,13 +103,13 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
protected global::FineUIPro.NumberBox txtAmount;
|
||||
|
||||
/// <summary>
|
||||
/// txtWorkTeam 控件。
|
||||
/// drpWorkTeam 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWorkTeam;
|
||||
protected global::FineUIPro.DropDownList drpWorkTeam;
|
||||
|
||||
/// <summary>
|
||||
/// txtDate 控件。
|
||||
|
@ -129,6 +129,33 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtDayAmount;
|
||||
|
||||
/// <summary>
|
||||
/// Panel2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel2;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttach 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttach;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
@ -147,6 +174,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// hdDayInputId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdDayInputId;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -14,19 +14,27 @@
|
|||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="工程量基础表" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="BaseId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="2" DataIDField="BaseId" AllowSorting="true" SortField="WorkSection,DrawingNo,Part,ProjectContent"
|
||||
runat="server" BoxFlex="1" DataKeyNames="BaseId,WorkTeamId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="WorkSection,DrawingNo,Part,ProjectContent"
|
||||
SortDirection="DESC" OnSort="Grid1_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
AllowPaging="false" PageSize="10000" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtDrawingNo" Label="图号" LabelWidth="60px" LabelAlign="Right"></f:TextBox>
|
||||
<f:TextBox runat="server" ID="txtPart" Label="部位" LabelWidth="60px" LabelAlign="Right"></f:TextBox>
|
||||
<f:TextBox runat="server" ID="txtProjectContent" Label="项目内容" LabelWidth="100px" LabelAlign="Right"></f:TextBox>
|
||||
<f:DropDownList ID="drpProject" runat="server" Label="项目" Width="300px" LabelWidth="60px" EmptyText="请选择项目"
|
||||
EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:TextBox runat="server" ID="txtDrawingNo" Label="图号" LabelWidth="60px" LabelAlign="Right" Width="200px"></f:TextBox>
|
||||
<f:TextBox runat="server" ID="txtPart" Label="部位" LabelWidth="60px" LabelAlign="Right" Width="200px"></f:TextBox>
|
||||
<f:TextBox runat="server" ID="txtProjectContent" Label="项目内容" LabelWidth="100px" LabelAlign="Right" Width="240px"></f:TextBox>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM" DisplayType="Month" Label="选择月份" ID="txtMonths" LabelAlign="right" LabelWidth="110px">
|
||||
</f:DatePicker>
|
||||
<f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
|
@ -56,7 +64,7 @@
|
|||
<f:RenderField ColumnID="Unit" DataField="Unit" FieldType="String" HeaderText="单位" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="80px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Amount" DataField="Amount" FieldType="Float" HeaderText="数量" TextAlign="Center"
|
||||
<f:RenderField ColumnID="Amount" DataField="Amount" FieldType="Float" HeaderText="总数" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="WorkTeam" DataField="WorkTeam" FieldType="String" HeaderText="作业队" TextAlign="Center"
|
||||
|
@ -68,12 +76,12 @@
|
|||
<f:RenderField ColumnID="Remain" DataField="Remain" FieldType="Float" HeaderText="剩余量" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:GroupField HeaderText="完成工程量" TextAlign="Center" >
|
||||
|
||||
</f:GroupField>
|
||||
<f:RenderField ColumnID="MonthComplete" DataField="MonthComplete" FieldType="Float" HeaderText="本月完成" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:GroupField HeaderText="完成工程量" TextAlign="Center" >
|
||||
|
||||
</f:GroupField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
|
@ -95,7 +103,7 @@
|
|||
</form>
|
||||
<script type="text/javascript">
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['WorkSection','DrawingNo','DrawingName', 'Part', 'ProjectContent'], {
|
||||
this.mergeColumns(['WorkSection','DrawingNo','DrawingName', 'Part', 'ProjectContent','Amount','Remain'], {
|
||||
depends: true
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
using BLL;
|
||||
using NPOI.SS.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
|
@ -15,6 +17,14 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
/// </summary>
|
||||
protected void Page_Init(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Request.Params["Date"]))
|
||||
{
|
||||
this.txtMonths.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtMonths.Text = string.Format(Request.Params["Date"]);
|
||||
}
|
||||
InitGrid();
|
||||
}
|
||||
|
||||
|
@ -26,26 +36,55 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
{
|
||||
DateTime startDate, endDate;
|
||||
List<DateTime> days = new List<DateTime>();
|
||||
int year = DateTime.Now.Year;
|
||||
int month = DateTime.Now.Month;
|
||||
DateTime now = Convert.ToDateTime(txtMonths.Text + "-01");
|
||||
int year = now.Year;
|
||||
int month = now.Month;
|
||||
int day = DateTime.Now.Day;
|
||||
if (day >= 26)
|
||||
if (now.AddMonths(1) <= DateTime.Now) //选择的是当前月之前的月份
|
||||
{
|
||||
startDate = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-" + "26");
|
||||
endDate = DateTime.Now;
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime lastMonth = DateTime.Now.AddMonths(-1);
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = DateTime.Now;
|
||||
endDate = now.AddDays(24);
|
||||
}
|
||||
else //选择的是当前月
|
||||
{
|
||||
if (now <= DateTime.Now)
|
||||
{
|
||||
if (now.Month == DateTime.Now.Month)
|
||||
{
|
||||
if (day >= 26)
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = now.AddDays(24);
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = DateTime.Now;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = DateTime.Now;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = DateTime.Now;
|
||||
}
|
||||
}
|
||||
do
|
||||
{
|
||||
days.Add(startDate);
|
||||
startDate = startDate.AddDays(1);
|
||||
} while (startDate <= endDate);
|
||||
GroupField gd = Grid1.Columns[11] as GroupField;
|
||||
GroupField gd = Grid1.Columns[12] as GroupField;
|
||||
for (int i = 0; i < days.Count; i++)
|
||||
{
|
||||
RenderField d = new RenderField();
|
||||
|
@ -71,6 +110,29 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Request.Params["DrawingNo"]))
|
||||
{
|
||||
this.txtDrawingNo.Text = Request.Params["DrawingNo"];
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Request.Params["Part"]))
|
||||
{
|
||||
this.txtPart.Text = Request.Params["Part"];
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Request.Params["ProjectContent"]))
|
||||
{
|
||||
this.txtProjectContent.Text = Request.Params["ProjectContent"];
|
||||
}
|
||||
ProjectService.InitAllProjectDropDownList(this.drpProject, false);
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
this.drpProject.SelectedValue = this.CurrUser.LoginProjectId;
|
||||
this.drpProject.Enabled = false;
|
||||
this.drpProject.Hidden = true;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Request.Params["ProjectId"]))
|
||||
{
|
||||
this.drpProject.SelectedValue = Request.Params["ProjectId"];
|
||||
}
|
||||
GetButtonPower();
|
||||
BindGrid();
|
||||
}
|
||||
|
@ -81,14 +143,10 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
/// </summary>
|
||||
public void BindGrid()
|
||||
{
|
||||
string strSql = @"select BaseId,C.ProjectId,a.WorkSection,DrawingNo,DrawingName,Part,ProjectContent,Unit,Amount,WorkTeam,
|
||||
isnull((select sum(DayAmount) from QuantityManagement_DayInput d where d.BaseId=C.BaseId),0) as TotalComplete,
|
||||
Amount-isnull((select sum(DayAmount) from QuantityManagement_DayInput d where d.BaseId=C.BaseId),0) as Remain
|
||||
from QuantityManagement_Base C
|
||||
left join QuantityManagement_Drawing a on a.DrawingId=C.DrawingId
|
||||
string strSql = @"select newid() as Id,C.* from View_QuantityManagement_DayInput C
|
||||
where C.ProjectId = @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue));
|
||||
if (!string.IsNullOrEmpty(this.txtDrawingNo.Text.Trim()))
|
||||
{
|
||||
strSql += " AND DrawingNo like @DrawingNo";
|
||||
|
@ -113,49 +171,125 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
//绑定数据
|
||||
DateTime startDate, endDate, startDate1, endDate1;
|
||||
List<DateTime> days = new List<DateTime>();
|
||||
int year = DateTime.Now.Year;
|
||||
int month = DateTime.Now.Month;
|
||||
//int year = DateTime.Now.Year;
|
||||
//int month = DateTime.Now.Month;
|
||||
//int day = DateTime.Now.Day;
|
||||
//if (day >= 26)
|
||||
//{
|
||||
// startDate = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-" + "26");
|
||||
// startDate1 = startDate;
|
||||
// endDate = DateTime.Now;
|
||||
// endDate1 = endDate;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// DateTime lastMonth = DateTime.Now.AddMonths(-1);
|
||||
// startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
// startDate1 = startDate;
|
||||
// endDate = DateTime.Now;
|
||||
// endDate1 = endDate;
|
||||
//}
|
||||
//var dayInputs = from x in Funs.DB.QuantityManagement_DayInput
|
||||
// where x.ProjectId == this.CurrUser.LoginProjectId && x.Date >= startDate && x.Date <= endDate
|
||||
// orderby x.Date
|
||||
// select x;
|
||||
//do
|
||||
//{
|
||||
// days.Add(startDate1);
|
||||
// startDate1 = startDate1.AddDays(1);
|
||||
//} while (startDate1 <= endDate1);
|
||||
DateTime now = Convert.ToDateTime(txtMonths.Text + "-01");
|
||||
int year = now.Year;
|
||||
int month = now.Month;
|
||||
int day = DateTime.Now.Day;
|
||||
if (day >= 26)
|
||||
if (now.AddMonths(1) <= DateTime.Now) //选择的是当前月之前的月份
|
||||
{
|
||||
startDate = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-" + "26");
|
||||
startDate1 = startDate;
|
||||
endDate = DateTime.Now;
|
||||
endDate1 = endDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime lastMonth = DateTime.Now.AddMonths(-1);
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = now.AddDays(24);
|
||||
startDate1 = startDate;
|
||||
endDate = DateTime.Now;
|
||||
endDate1 = endDate;
|
||||
}
|
||||
var dayInputs = from x in Funs.DB.QuantityManagement_DayInput
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.Date >= startDate && x.Date <= endDate
|
||||
orderby x.Date
|
||||
select x;
|
||||
else //选择的是当前月
|
||||
{
|
||||
if (now <= DateTime.Now)
|
||||
{
|
||||
if (now.Month == DateTime.Now.Month)
|
||||
{
|
||||
if (day >= 26)
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = now.AddDays(24);
|
||||
startDate1 = startDate;
|
||||
endDate1 = endDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = DateTime.Now;
|
||||
startDate1 = startDate;
|
||||
endDate1 = endDate;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = DateTime.Now;
|
||||
startDate1 = startDate;
|
||||
endDate1 = endDate;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = DateTime.Now;
|
||||
startDate1 = startDate;
|
||||
endDate1 = endDate;
|
||||
}
|
||||
}
|
||||
do
|
||||
{
|
||||
days.Add(startDate1);
|
||||
startDate1 = startDate1.AddDays(1);
|
||||
} while (startDate1 <= endDate1);
|
||||
var dayInputs = from x in Funs.DB.QuantityManagement_DayInput
|
||||
where x.ProjectId == this.drpProject.SelectedValue && x.Date <= endDate
|
||||
orderby x.Date
|
||||
select x;
|
||||
var bases = from x in Funs.DB.QuantityManagement_Base
|
||||
where x.ProjectId == this.drpProject.SelectedValue
|
||||
select x;
|
||||
for (int i = 0; i < this.Grid1.Rows.Count; i++)
|
||||
{
|
||||
string baseId = this.Grid1.Rows[i].RowID;
|
||||
string baseId = this.Grid1.Rows[i].DataKeys[0].ToString();
|
||||
string workTeamId = this.Grid1.Rows[i].DataKeys[1].ToString();
|
||||
int j = 0;
|
||||
decimal monthComplete = 0;
|
||||
foreach (var d in days)
|
||||
{
|
||||
var dayInput = dayInputs.FirstOrDefault(x => x.BaseId == baseId && x.Date == d);
|
||||
var dayInput = dayInputs.FirstOrDefault(x => x.BaseId == baseId && x.Date == d && x.WorkTeam == workTeamId);
|
||||
if (dayInput != null)
|
||||
{
|
||||
this.Grid1.Rows[i].Values[12 + j] = dayInput.DayAmount.Value.ToString("0.##");
|
||||
this.Grid1.Rows[i].Values[13 + j] = dayInput.DayAmount.Value.ToString("0.##");
|
||||
monthComplete += dayInput.DayAmount.Value;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
this.Grid1.Rows[i].Values[12+days.Count]= monthComplete.ToString("0.##");
|
||||
var b = bases.FirstOrDefault(x => x.BaseId == baseId);
|
||||
decimal totalAmount = 0;
|
||||
if (b != null)
|
||||
{
|
||||
totalAmount = b.Amount ?? 0;
|
||||
}
|
||||
decimal completedAmount = dayInputs.Where(x => x.BaseId == baseId && x.WorkTeam == workTeamId).ToList().Sum(x => x.DayAmount ?? 0);
|
||||
decimal totalCompletedAmount = dayInputs.Where(x => x.BaseId == baseId).ToList().Sum(x => x.DayAmount ?? 0);
|
||||
this.Grid1.Rows[i].Values[9] = completedAmount.ToString("0.##");
|
||||
this.Grid1.Rows[i].Values[10] = (totalAmount - totalCompletedAmount).ToString("0.##");
|
||||
this.Grid1.Rows[i].Values[11] = monthComplete.ToString("0.##");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@ -203,7 +337,9 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
/// <param name="e"></param>
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
string url = "~/CQMS/QuantityManagement/DayInputStatistics.aspx?Date=" + this.txtMonths.Text.Trim() + "&DrawingNo=" + this.txtDrawingNo.Text.Trim()
|
||||
+ "&Part=" + this.txtPart.Text.Trim() + "&ProjectContent=" + this.txtProjectContent.Text.Trim() + "&ProjectId=" + this.drpProject.SelectedValue;
|
||||
PageContext.Redirect(url, "_self");
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -262,5 +398,217 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initTemplatePath = string.Empty;
|
||||
string uploadfilepath = string.Empty;
|
||||
string newUrl = string.Empty;
|
||||
string filePath = string.Empty;
|
||||
initTemplatePath = Const.DayInputStatisticsTemplateUrl;
|
||||
uploadfilepath = rootPath + initTemplatePath;
|
||||
if (this.Grid1.Rows.Count > 0)
|
||||
{
|
||||
newUrl = uploadfilepath.Replace(".xlsx", "(" + this.txtMonths.Text.Trim() + ")" + ".xlsx");
|
||||
File.Copy(uploadfilepath, newUrl);
|
||||
|
||||
DateTime startDate, endDate;
|
||||
List<DateTime> days = new List<DateTime>();
|
||||
DateTime now = Convert.ToDateTime(txtMonths.Text + "-01");
|
||||
int year = now.Year;
|
||||
int month = now.Month;
|
||||
int day = DateTime.Now.Day;
|
||||
if (now.AddMonths(1) <= DateTime.Now) //选择的是当前月之前的月份
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = now.AddDays(24);
|
||||
}
|
||||
else //选择的是当前月
|
||||
{
|
||||
if (now <= DateTime.Now)
|
||||
{
|
||||
if (now.Month == DateTime.Now.Month)
|
||||
{
|
||||
if (day >= 26)
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = now.AddDays(24);
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = DateTime.Now;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = DateTime.Now;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = DateTime.Now;
|
||||
}
|
||||
}
|
||||
do
|
||||
{
|
||||
days.Add(startDate);
|
||||
startDate = startDate.AddDays(1);
|
||||
} while (startDate <= endDate);
|
||||
|
||||
// 第一步:读取文件流
|
||||
NPOI.SS.UserModel.IWorkbook workbook;
|
||||
using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
|
||||
}
|
||||
|
||||
// 创建单元格样式
|
||||
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
|
||||
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.None;
|
||||
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.None;
|
||||
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.None;
|
||||
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.None;
|
||||
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
var font = workbook.CreateFont();
|
||||
font.FontHeightInPoints = 12;
|
||||
font.IsBold = true;
|
||||
//font.FontHeightInPoints = (short)8.5;字号为小数时要转为short
|
||||
cellStyle0.SetFont(font);
|
||||
// 第二步:创建新数据行
|
||||
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
|
||||
var font2 = workbook.CreateFont();
|
||||
font2.FontHeightInPoints = 10;
|
||||
// 创建单元格样式
|
||||
NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
|
||||
cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
cellStyle.WrapText = true;
|
||||
cellStyle.SetFont(font2);
|
||||
// 创建单元格样式
|
||||
NPOI.SS.UserModel.ICellStyle cellStyleYellow = workbook.CreateCellStyle();
|
||||
cellStyleYellow.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyleYellow.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyleYellow.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyleYellow.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyleYellow.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyleYellow.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
//NPOI.SS.UserModel.IRow row5 = sheet.GetRow(5);
|
||||
//NPOI.SS.UserModel.ICell cell5;
|
||||
//cell5 = row5.GetCell(4);
|
||||
cellStyleYellow.FillBackgroundColor = 120;
|
||||
cellStyleYellow.SetFont(font2);
|
||||
int r0 = 0;
|
||||
int r = 1;
|
||||
NPOI.SS.UserModel.IRow row;
|
||||
NPOI.SS.UserModel.ICell cell;
|
||||
row = sheet.GetRow(r0);
|
||||
for (int i = 0; i < days.Count; i++)
|
||||
{
|
||||
cell = row.CreateCell(12 + i);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue("完成工程量");
|
||||
}
|
||||
row = sheet.GetRow(r);
|
||||
for (int i = 0; i < days.Count; i++)
|
||||
{
|
||||
cell = row.CreateCell(12 + i);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(string.Format("{0:MM-dd}", days[i]));
|
||||
}
|
||||
sheet.AddMergedRegion(new CellRangeAddress(0, 0, 12, 11 + days.Count));
|
||||
r++;
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
row = sheet.CreateRow(r + i);
|
||||
cell = row.CreateCell(0);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue((i + 1).ToString());
|
||||
cell = row.CreateCell(1);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[1].ToString());
|
||||
cell = row.CreateCell(2);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[2].ToString());
|
||||
cell = row.CreateCell(3);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[3].ToString());
|
||||
cell = row.CreateCell(4);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[4].ToString());
|
||||
cell = row.CreateCell(5);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[5].ToString());
|
||||
cell = row.CreateCell(6);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[6].ToString());
|
||||
cell = row.CreateCell(7);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[7].ToString());
|
||||
cell = row.CreateCell(8);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[8].ToString());
|
||||
cell = row.CreateCell(9);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[9].ToString());
|
||||
cell = row.CreateCell(10);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[10].ToString());
|
||||
cell = row.CreateCell(11);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[11].ToString());
|
||||
for (int j = 0; j < days.Count; j++)
|
||||
{
|
||||
cell = row.CreateCell(12 + j);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[13 + j].ToString());
|
||||
}
|
||||
}
|
||||
// 第三步:写入文件流
|
||||
using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
|
||||
{
|
||||
workbook.Write(stream);
|
||||
workbook.Close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
string fileName = Path.GetFileName(newUrl);
|
||||
FileInfo info = new FileInfo(newUrl);
|
||||
long fileSize = info.Length;
|
||||
Response.Clear();
|
||||
Response.ContentType = "application/x-zip-compressed";
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
Response.TransmitFile(newUrl, 0, fileSize);
|
||||
Response.Flush();
|
||||
Response.Close();
|
||||
File.Delete(newUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("当期无记录,无法导出!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -57,6 +57,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar ToolSearch;
|
||||
|
||||
/// <summary>
|
||||
/// drpProject 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpProject;
|
||||
|
||||
/// <summary>
|
||||
/// txtDrawingNo 控件。
|
||||
/// </summary>
|
||||
|
@ -84,6 +93,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtProjectContent;
|
||||
|
||||
/// <summary>
|
||||
/// txtMonths 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtMonths;
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
|
@ -93,6 +111,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearch;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -6,6 +6,43 @@
|
|||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>图纸登记</title>
|
||||
<style type="text/css">
|
||||
.labcenter {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.LabelColor {
|
||||
color: Red;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.Green {
|
||||
background-color: Green;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.Yellow {
|
||||
background-color: #FFFF93;
|
||||
}
|
||||
|
||||
.Red {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.LightGreen {
|
||||
background-color: LightGreen
|
||||
}
|
||||
|
||||
.f-grid-colheader-text {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
|
@ -15,7 +52,7 @@
|
|||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="图纸登记" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="DrawingId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="2" DataIDField="DrawingId" AllowSorting="true" SortField="DrawingNo" ForceFit="true"
|
||||
ClicksToEdit="2" DataIDField="DrawingId" AllowSorting="true" SortField="AcceptDate" ForceFit="true"
|
||||
SortDirection="DESC" OnSort="Grid1_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true">
|
||||
|
@ -62,9 +99,12 @@
|
|||
<f:RenderField ColumnID="AcceptDate" DataField="AcceptDate" FieldType="Date" Renderer="Date" HeaderText="接收日期" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="CompletionStatus" DataField="CompletionStatus" FieldType="String" HeaderText="完成情况" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:CheckBoxField Width="100px" SortField="CompletionStatus" RenderAsStaticField="true" DataField="CompletionStatus"
|
||||
HeaderText="材料计划是否完成" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:CheckBoxField>
|
||||
<f:CheckBoxField Width="100px" SortField="CompletionStatus2" RenderAsStaticField="true" DataField="CompletionStatus2"
|
||||
HeaderText="工程量统计是否完成" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:CheckBoxField>
|
||||
<f:RenderField ColumnID="DutyPerson" DataField="DutyPerson" FieldType="String" HeaderText="责任人" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
|
|
|
@ -29,8 +29,9 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
/// </summary>
|
||||
public void BindGrid()
|
||||
{
|
||||
string strSql = @"select DrawingId,ProjectId,C.WorkSection,DrawingNo,DrawingName,Major,AcceptDate,CompletionStatus,DutyPerson,Remark
|
||||
string strSql = @"select DrawingId,ProjectId,C.WorkSection,DrawingNo,DrawingName,cn.ProfessionalName as Major,AcceptDate,CompletionStatus,CompletionStatus2,DutyPerson,Remark
|
||||
from QuantityManagement_Drawing C
|
||||
left join Base_CNProfessional cn on C.Major=cn.CNProfessionalId
|
||||
where C.ProjectId = @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
|
@ -55,6 +56,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
for (int i = 0; i < this.Grid1.Rows.Count; i++)
|
||||
{
|
||||
string id = this.Grid1.Rows[i].RowID;
|
||||
Model.QuantityManagement_Drawing drawing = BLL.DrawingService.GetDrawingById(id);
|
||||
if (drawing != null && (drawing.CompletionStatus != true || drawing.CompletionStatus2 != true))
|
||||
{
|
||||
this.Grid1.Rows[i].RowCssClass = "Yellow";
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -14,28 +14,31 @@
|
|||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtWorkSection" runat="server" Label="工段" MaxLength="100" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:TextBox ID="txtDrawingNo" runat="server" Label="图号" MaxLength="100" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:TextBox ID="txtWorkSection" runat="server" Label="工段" MaxLength="100" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="140px"></f:TextBox>
|
||||
<f:TextBox ID="txtDrawingNo" runat="server" Label="图号" MaxLength="100" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="140px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtDrawingName" runat="server" Label="图纸名称" MaxLength="100" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:TextBox ID="txtMajor" runat="server" Label="专业" Required="true" ShowRedStar="true" MaxLength="50" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:TextBox ID="txtDrawingName" runat="server" Label="图纸名称" MaxLength="100" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="140px"></f:TextBox>
|
||||
<f:DropDownList ID="drpMajor" ShowRedStar="true" runat="server" LabelWidth="140px" Required="true" Label="专业" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<f:FormRow ColumnWidths="50% 25% 25%">
|
||||
<Items>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="接收日期" ID="txtAcceptDate"
|
||||
LabelAlign="right" LabelWidth="120px">
|
||||
LabelAlign="right" LabelWidth="140px">
|
||||
</f:DatePicker>
|
||||
<f:TextBox ID="txtCompletionStatus" runat="server" Label="完成情况" Required="true" ShowRedStar="true" MaxLength="50" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:CheckBox ID="cbCompletionStatus" runat="server" Label="材料计划是否完成" LabelAlign="Right" LabelWidth="140px"></f:CheckBox>
|
||||
<f:CheckBox ID="cbCompletionStatus2" runat="server" Label="工程量统计是否完成" LabelAlign="Right" LabelWidth="160px"></f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtDutyPerson" runat="server" Label="责任人" MaxLength="50" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
<f:TextBox ID="txtRemark" runat="server" Label="备注" Required="true" ShowRedStar="true" MaxLength="200" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
|
||||
|
||||
<f:TextBox ID="txtDutyPerson" runat="server" Label="责任人" MaxLength="50" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="140px"></f:TextBox>
|
||||
<f:TextBox ID="txtRemark" runat="server" Label="备注" MaxLength="200" LabelAlign="Right" LabelWidth="140px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow Hidden="true">
|
||||
|
|
|
@ -35,6 +35,7 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
{
|
||||
GetButtonPower();
|
||||
this.DrawingId = Request.Params["DrawingId"];
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(drpMajor, true);
|
||||
var Drawing = BLL.DrawingService.GetDrawingById(this.DrawingId);
|
||||
if (Drawing != null)
|
||||
{
|
||||
|
@ -42,9 +43,24 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
this.txtWorkSection.Text = Drawing.WorkSection;
|
||||
this.txtDrawingNo.Text = Drawing.DrawingNo;
|
||||
this.txtDrawingName.Text = Drawing.DrawingName;
|
||||
this.txtMajor.Text = Drawing.Major;
|
||||
this.drpMajor.SelectedValue = Drawing.Major;
|
||||
this.txtAcceptDate.Text = Drawing.AcceptDate.HasValue ? string.Format("{0:yyyy-MM-dd}", Drawing.AcceptDate) : "";
|
||||
this.txtCompletionStatus.Text = Drawing.CompletionStatus;
|
||||
if (Drawing.CompletionStatus == true)
|
||||
{
|
||||
this.cbCompletionStatus.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.cbCompletionStatus.Checked = false;
|
||||
}
|
||||
if (Drawing.CompletionStatus2 == true)
|
||||
{
|
||||
this.cbCompletionStatus2.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.cbCompletionStatus2.Checked = false;
|
||||
}
|
||||
this.txtDutyPerson.Text = Drawing.DutyPerson;
|
||||
this.txtRemark.Text = Drawing.Remark;
|
||||
}
|
||||
|
@ -63,18 +79,37 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (this.drpMajor.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择专业", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.QuantityManagement_Drawing newDrawing = new Model.QuantityManagement_Drawing();
|
||||
newDrawing.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDrawing.WorkSection = this.txtWorkSection.Text.Trim();
|
||||
newDrawing.DrawingNo = this.txtDrawingNo.Text.Trim();
|
||||
newDrawing.DrawingName = this.txtDrawingName.Text.Trim();
|
||||
newDrawing.Major = this.txtMajor.Text.Trim();
|
||||
newDrawing.Major = this.drpMajor.SelectedValue;
|
||||
if (!string.IsNullOrEmpty(this.txtAcceptDate.Text))
|
||||
{
|
||||
newDrawing.AcceptDate = Convert.ToDateTime(this.txtAcceptDate.Text);
|
||||
}
|
||||
newDrawing.CompletionStatus = this.txtCompletionStatus.Text.Trim();
|
||||
if (cbCompletionStatus.Checked)
|
||||
{
|
||||
newDrawing.CompletionStatus = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newDrawing.CompletionStatus = false;
|
||||
}
|
||||
if (cbCompletionStatus2.Checked)
|
||||
{
|
||||
newDrawing.CompletionStatus2 = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newDrawing.CompletionStatus2 = false;
|
||||
}
|
||||
newDrawing.DutyPerson = this.txtDutyPerson.Text.Trim();
|
||||
newDrawing.Remark = this.txtRemark.Text.Trim();
|
||||
if (string.IsNullOrEmpty(this.DrawingId))
|
||||
|
|
|
@ -67,13 +67,13 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
protected global::FineUIPro.TextBox txtDrawingName;
|
||||
|
||||
/// <summary>
|
||||
/// txtMajor 控件。
|
||||
/// drpMajor 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtMajor;
|
||||
protected global::FineUIPro.DropDownList drpMajor;
|
||||
|
||||
/// <summary>
|
||||
/// txtAcceptDate 控件。
|
||||
|
@ -85,13 +85,22 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
protected global::FineUIPro.DatePicker txtAcceptDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompletionStatus 控件。
|
||||
/// cbCompletionStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCompletionStatus;
|
||||
protected global::FineUIPro.CheckBox cbCompletionStatus;
|
||||
|
||||
/// <summary>
|
||||
/// cbCompletionStatus2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox cbCompletionStatus2;
|
||||
|
||||
/// <summary>
|
||||
/// txtDutyPerson 控件。
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectContentStatistics.aspx.cs" Inherits="FineUIPro.Web.CQMS.QuantityManagement.ProjectContentStatistics" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>项目内容汇总表</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
|
||||
<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"
|
||||
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" EnableColumnLines="true" ForceFit="true"
|
||||
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="ProjectContent"
|
||||
SortDirection="DESC" OnSort="Grid1_Sort"
|
||||
AllowPaging="false" IsDatabasePaging="true" PageSize="10000"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpProject" runat="server" Label="项目" Width="300px" LabelWidth="60px" EmptyText="请选择项目"
|
||||
EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:TextBox runat="server" ID="txtWorkTeam" Label="作业队" LabelWidth="80px" LabelAlign="Right"></f:TextBox>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM" DisplayType="Month" Label="选择月份" ID="txtMonths" LabelAlign="right" LabelWidth="110px">
|
||||
</f:DatePicker>
|
||||
<f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField ColumnID="ProjectContent" DataField="ProjectContent" FieldType="String" HeaderText="项目内容" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Unit" DataField="Unit" FieldType="String" HeaderText="单位" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="80px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Amount" DataField="Amount" FieldType="Float" HeaderText="总数" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="WorkTeam" DataField="WorkTeam" FieldType="String" HeaderText="作业队" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="TotalComplete" DataField="TotalComplete" FieldType="Float" HeaderText="累计完成" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Remain" DataField="Remain" FieldType="Float" HeaderText="剩余量" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="MonthComplete" DataField="MonthComplete" FieldType="Float" HeaderText="本月完成" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['ProjectContent','Amount','Remain'], {
|
||||
depends: true
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,350 @@
|
|||
using BLL;
|
||||
using NPOI.SS.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.QuantityManagement
|
||||
{
|
||||
public partial class ProjectContentStatistics : PageBase
|
||||
{
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.txtMonths.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
|
||||
ProjectService.InitAllProjectDropDownList(this.drpProject, false);
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
this.drpProject.SelectedValue = this.CurrUser.LoginProjectId;
|
||||
this.drpProject.Enabled = false;
|
||||
this.drpProject.Hidden = true;
|
||||
}
|
||||
GetButtonPower();
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数据绑定
|
||||
/// </summary>
|
||||
public void BindGrid()
|
||||
{
|
||||
string strSql = @"select * from View_QuantityManagement_ProjectContentStatistics C
|
||||
where C.ProjectId = @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue));
|
||||
if (!string.IsNullOrEmpty(this.txtWorkTeam.Text.Trim()))
|
||||
{
|
||||
strSql += " AND WorkTeam like @WorkTeam";
|
||||
listStr.Add(new SqlParameter("@WorkTeam", "%" + this.txtWorkTeam.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
//绑定数据
|
||||
DateTime startDate, endDate, startDate1, endDate1;
|
||||
List<DateTime> days = new List<DateTime>();
|
||||
DateTime now = Convert.ToDateTime(txtMonths.Text + "-01");
|
||||
int year = now.Year;
|
||||
int month = now.Month;
|
||||
int day = DateTime.Now.Day;
|
||||
if (day >= 26)
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = now.AddDays(24);
|
||||
startDate1 = startDate;
|
||||
endDate1 = endDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = DateTime.Now;
|
||||
startDate1 = startDate;
|
||||
endDate1 = endDate;
|
||||
}
|
||||
var totalDayInputs = from x in Funs.DB.View_QuantityManagement_DayInput2
|
||||
where x.ProjectId == this.drpProject.SelectedValue && x.Date <= endDate
|
||||
orderby x.Date
|
||||
select x;
|
||||
var dayInputs = from x in Funs.DB.View_QuantityManagement_DayInput2
|
||||
where x.ProjectId == this.drpProject.SelectedValue && x.Date >= startDate && x.Date <= endDate
|
||||
orderby x.Date
|
||||
select x;
|
||||
var bases = from x in Funs.DB.View_QuantityManagement_Base
|
||||
where x.ProjectId == this.drpProject.SelectedValue
|
||||
select x;
|
||||
do
|
||||
{
|
||||
days.Add(startDate1);
|
||||
startDate1 = startDate1.AddDays(1);
|
||||
} while (startDate1 <= endDate1);
|
||||
for (int i = 0; i < this.Grid1.Rows.Count; i++)
|
||||
{
|
||||
string[] strs = this.Grid1.Rows[i].RowID.Split(',');
|
||||
string projectContent = strs[1];
|
||||
string workTeam = strs[2];
|
||||
decimal totalAmount = 0, completedAmount = 0, totalCompletedAmount = 0, monthComplete = 0;
|
||||
totalAmount = bases.Where(x => x.ProjectContent == projectContent).ToList().Sum(x => x.Amount ?? 0);
|
||||
foreach (var d in days)
|
||||
{
|
||||
monthComplete = dayInputs.Where(x => x.ProjectContent == projectContent && x.WorkTeam == workTeam).ToList().Sum(x => x.DayAmount ?? 0);
|
||||
}
|
||||
completedAmount = totalDayInputs.Where(x => x.ProjectContent == projectContent && x.WorkTeam == workTeam).ToList().Sum(x => x.DayAmount ?? 0);
|
||||
totalCompletedAmount = totalDayInputs.Where(x => x.ProjectContent == projectContent).ToList().Sum(x => x.DayAmount ?? 0);
|
||||
this.Grid1.Rows[i].Values[3] = totalAmount.ToString("0.##");
|
||||
this.Grid1.Rows[i].Values[5] = completedAmount.ToString("0.##");
|
||||
this.Grid1.Rows[i].Values[6] = (totalAmount - totalCompletedAmount).ToString("0.##");
|
||||
this.Grid1.Rows[i].Values[7] = monthComplete.ToString("0.##");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页、排序
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭弹出窗口
|
||||
/// <summary>
|
||||
/// 关闭弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (Request.Params["value"] == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.DayInputMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.Grid1.EnableRowDoubleClickEvent = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Grid1.EnableRowDoubleClickEvent = false;
|
||||
}
|
||||
//if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
//{
|
||||
// this.btnImport.Hidden = false;
|
||||
//}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initTemplatePath = string.Empty;
|
||||
string uploadfilepath = string.Empty;
|
||||
string newUrl = string.Empty;
|
||||
string filePath = string.Empty;
|
||||
initTemplatePath = Const.ProjectContentStatisticsTemplateUrl;
|
||||
uploadfilepath = rootPath + initTemplatePath;
|
||||
if (this.Grid1.Rows.Count > 0)
|
||||
{
|
||||
newUrl = uploadfilepath.Replace(".xlsx", "(" + this.txtMonths.Text.Trim() + ")" + ".xlsx");
|
||||
File.Copy(uploadfilepath, newUrl);
|
||||
|
||||
DateTime startDate, endDate;
|
||||
List<DateTime> days = new List<DateTime>();
|
||||
DateTime now = Convert.ToDateTime(txtMonths.Text + "-01");
|
||||
int year = now.Year;
|
||||
int month = now.Month;
|
||||
int day = DateTime.Now.Day;
|
||||
if (day >= 26)
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = now.AddDays(24);
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = DateTime.Now;
|
||||
}
|
||||
do
|
||||
{
|
||||
days.Add(startDate);
|
||||
startDate = startDate.AddDays(1);
|
||||
} while (startDate <= endDate);
|
||||
|
||||
// 第一步:读取文件流
|
||||
NPOI.SS.UserModel.IWorkbook workbook;
|
||||
using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
|
||||
}
|
||||
|
||||
// 创建单元格样式
|
||||
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
|
||||
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.None;
|
||||
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.None;
|
||||
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.None;
|
||||
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.None;
|
||||
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
var font = workbook.CreateFont();
|
||||
font.FontHeightInPoints = 12;
|
||||
font.IsBold = true;
|
||||
//font.FontHeightInPoints = (short)8.5;字号为小数时要转为short
|
||||
cellStyle0.SetFont(font);
|
||||
// 第二步:创建新数据行
|
||||
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
|
||||
var font2 = workbook.CreateFont();
|
||||
font2.FontHeightInPoints = 10;
|
||||
// 创建单元格样式
|
||||
NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
|
||||
cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
cellStyle.WrapText = true;
|
||||
cellStyle.SetFont(font2);
|
||||
// 创建单元格样式
|
||||
NPOI.SS.UserModel.ICellStyle cellStyleYellow = workbook.CreateCellStyle();
|
||||
cellStyleYellow.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyleYellow.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyleYellow.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyleYellow.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyleYellow.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyleYellow.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
//NPOI.SS.UserModel.IRow row5 = sheet.GetRow(5);
|
||||
//NPOI.SS.UserModel.ICell cell5;
|
||||
//cell5 = row5.GetCell(4);
|
||||
cellStyleYellow.FillBackgroundColor = 120;
|
||||
cellStyleYellow.SetFont(font2);
|
||||
int r = 1;
|
||||
NPOI.SS.UserModel.IRow row;
|
||||
NPOI.SS.UserModel.ICell cell;
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
row = sheet.CreateRow(r + i);
|
||||
cell = row.CreateCell(0);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue((i + 1).ToString());
|
||||
cell = row.CreateCell(1);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[1].ToString());
|
||||
cell = row.CreateCell(2);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[2].ToString());
|
||||
cell = row.CreateCell(3);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[3].ToString());
|
||||
cell = row.CreateCell(4);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[4].ToString());
|
||||
cell = row.CreateCell(5);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[5].ToString());
|
||||
cell = row.CreateCell(6);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[6].ToString());
|
||||
cell = row.CreateCell(7);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[7].ToString());
|
||||
}
|
||||
// 第三步:写入文件流
|
||||
using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
|
||||
{
|
||||
workbook.Write(stream);
|
||||
workbook.Close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
string fileName = Path.GetFileName(newUrl);
|
||||
FileInfo info = new FileInfo(newUrl);
|
||||
long fileSize = info.Length;
|
||||
Response.Clear();
|
||||
Response.ContentType = "application/x-zip-compressed";
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
Response.TransmitFile(newUrl, 0, fileSize);
|
||||
Response.Flush();
|
||||
Response.Close();
|
||||
File.Delete(newUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("当期无记录,无法导出!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
114
SGGL/FineUIPro.Web/CQMS/QuantityManagement/ProjectContentStatistics.aspx.designer.cs
generated
Normal file
114
SGGL/FineUIPro.Web/CQMS/QuantityManagement/ProjectContentStatistics.aspx.designer.cs
generated
Normal file
|
@ -0,0 +1,114 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.QuantityManagement {
|
||||
|
||||
|
||||
public partial class ProjectContentStatistics {
|
||||
|
||||
/// <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>
|
||||
/// ToolSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar ToolSearch;
|
||||
|
||||
/// <summary>
|
||||
/// drpProject 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpProject;
|
||||
|
||||
/// <summary>
|
||||
/// txtWorkTeam 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWorkTeam;
|
||||
|
||||
/// <summary>
|
||||
/// txtMonths 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtMonths;
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearch;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
}
|
||||
}
|
|
@ -14,19 +14,26 @@
|
|||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="工程量基础表" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="BaseId" AllowCellEditing="true" EnableColumnLines="true" ForceFit="true"
|
||||
ClicksToEdit="2" DataIDField="BaseId" AllowSorting="true" SortField="WorkSection,DrawingNo,Part,ProjectContent"
|
||||
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" EnableColumnLines="true" ForceFit="true"
|
||||
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="WorkSection,ProjectContent"
|
||||
SortDirection="DESC" OnSort="Grid1_Sort"
|
||||
AllowPaging="false" IsDatabasePaging="true" PageSize="10000"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpProject" runat="server" Label="项目" Width="300px" LabelWidth="60px" EmptyText="请选择项目"
|
||||
EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:TextBox runat="server" ID="txtWorkSection" Label="工段" LabelWidth="60px" LabelAlign="Right"></f:TextBox>
|
||||
<f:TextBox runat="server" ID="txtDrawingNo" Label="图号" LabelWidth="60px" LabelAlign="Right"></f:TextBox>
|
||||
<f:TextBox runat="server" ID="txtWorkTeam" Label="作业队" LabelWidth="80px" LabelAlign="Right"></f:TextBox>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM" DisplayType="Month" Label="选择月份" ID="txtMonths" LabelAlign="right" LabelWidth="110px">
|
||||
</f:DatePicker>
|
||||
<f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
|
@ -41,22 +48,13 @@
|
|||
<f:RenderField ColumnID="WorkSection" DataField="WorkSection" FieldType="String" HeaderText="工段" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="DrawingNo" DataField="DrawingNo" FieldType="String" HeaderText="图号" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="250px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="DrawingName" DataField="DrawingName" FieldType="String" HeaderText="图纸名称" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="200px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Part" DataField="Part" FieldType="String" HeaderText="部位" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="ProjectContent" DataField="ProjectContent" FieldType="String" HeaderText="项目内容" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Unit" DataField="Unit" FieldType="String" HeaderText="单位" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="80px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="Amount" DataField="Amount" FieldType="Float" HeaderText="数量" TextAlign="Center"
|
||||
<f:RenderField ColumnID="Amount" DataField="Amount" FieldType="Float" HeaderText="总数" TextAlign="Center"
|
||||
HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="WorkTeam" DataField="WorkTeam" FieldType="String" HeaderText="作业队" TextAlign="Center"
|
||||
|
@ -81,7 +79,7 @@
|
|||
</form>
|
||||
<script type="text/javascript">
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['WorkSection','DrawingNo','DrawingName', 'Part', 'ProjectContent'], {
|
||||
this.mergeColumns(['WorkSection', 'ProjectContent','Amount','Remain'], {
|
||||
depends: true
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
using BLL;
|
||||
using NPOI.SS.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
|
@ -20,6 +22,14 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.txtMonths.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
|
||||
ProjectService.InitAllProjectDropDownList(this.drpProject, false);
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
this.drpProject.SelectedValue = this.CurrUser.LoginProjectId;
|
||||
this.drpProject.Enabled = false;
|
||||
this.drpProject.Hidden = true;
|
||||
}
|
||||
GetButtonPower();
|
||||
BindGrid();
|
||||
}
|
||||
|
@ -30,24 +40,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
/// </summary>
|
||||
public void BindGrid()
|
||||
{
|
||||
string strSql = @"select BaseId,C.ProjectId,a.WorkSection,DrawingNo,DrawingName,Part,ProjectContent,Unit,Amount,WorkTeam,
|
||||
isnull((select sum(DayAmount) from QuantityManagement_DayInput d where d.BaseId=C.BaseId),0) as TotalComplete,
|
||||
Amount-isnull((select sum(DayAmount) from QuantityManagement_DayInput d where d.BaseId=C.BaseId),0) as Remain
|
||||
from QuantityManagement_Base C
|
||||
left join QuantityManagement_Drawing a on a.DrawingId=C.DrawingId
|
||||
string strSql = @"select * from View_QuantityManagement_WorkTeamStatistics C
|
||||
where C.ProjectId = @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue));
|
||||
if (!string.IsNullOrEmpty(this.txtWorkSection.Text.Trim()))
|
||||
{
|
||||
strSql += " AND WorkSection like @WorkSection";
|
||||
listStr.Add(new SqlParameter("@WorkSection", "%" + this.txtWorkSection.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtDrawingNo.Text.Trim()))
|
||||
{
|
||||
strSql += " AND DrawingNo like @DrawingNo";
|
||||
listStr.Add(new SqlParameter("@DrawingNo", "%" + this.txtDrawingNo.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtWorkTeam.Text.Trim()))
|
||||
{
|
||||
strSql += " AND WorkTeam like @WorkTeam";
|
||||
|
@ -62,28 +63,37 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
//绑定数据
|
||||
DateTime startDate, endDate, startDate1, endDate1;
|
||||
List<DateTime> days = new List<DateTime>();
|
||||
int year = DateTime.Now.Year;
|
||||
int month = DateTime.Now.Month;
|
||||
DateTime now = Convert.ToDateTime(txtMonths.Text + "-01");
|
||||
int year = now.Year;
|
||||
int month = now.Month;
|
||||
int day = DateTime.Now.Day;
|
||||
if (day >= 26)
|
||||
{
|
||||
startDate = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-" + "26");
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = now.AddDays(24);
|
||||
startDate1 = startDate;
|
||||
endDate = DateTime.Now;
|
||||
endDate1 = endDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime lastMonth = DateTime.Now.AddMonths(-1);
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
startDate1 = startDate;
|
||||
endDate = DateTime.Now;
|
||||
startDate1 = startDate;
|
||||
endDate1 = endDate;
|
||||
}
|
||||
var dayInputs = from x in Funs.DB.QuantityManagement_DayInput
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.Date >= startDate && x.Date <= endDate
|
||||
var totalDayInputs = from x in Funs.DB.View_QuantityManagement_DayInput2
|
||||
where x.ProjectId == this.drpProject.SelectedValue && x.Date <= endDate
|
||||
orderby x.Date
|
||||
select x;
|
||||
var dayInputs = from x in Funs.DB.View_QuantityManagement_DayInput2
|
||||
where x.ProjectId == this.drpProject.SelectedValue && x.Date >= startDate && x.Date <= endDate
|
||||
orderby x.Date
|
||||
select x;
|
||||
var bases = from x in Funs.DB.View_QuantityManagement_Base
|
||||
where x.ProjectId == this.drpProject.SelectedValue
|
||||
select x;
|
||||
do
|
||||
{
|
||||
days.Add(startDate1);
|
||||
|
@ -91,19 +101,22 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
} while (startDate1 <= endDate1);
|
||||
for (int i = 0; i < this.Grid1.Rows.Count; i++)
|
||||
{
|
||||
string baseId = this.Grid1.Rows[i].RowID;
|
||||
int j = 0;
|
||||
decimal monthComplete = 0;
|
||||
string[] strs = this.Grid1.Rows[i].RowID.Split(',');
|
||||
string workSection = strs[1];
|
||||
string projectContent = strs[2];
|
||||
string workTeam = strs[3];
|
||||
decimal totalAmount = 0, completedAmount = 0, totalCompletedAmount = 0, monthComplete = 0;
|
||||
totalAmount = bases.Where(x => x.WorkSection == workSection && x.ProjectContent == projectContent).ToList().Sum(x => x.Amount ?? 0);
|
||||
foreach (var d in days)
|
||||
{
|
||||
var dayInput = dayInputs.FirstOrDefault(x => x.BaseId == baseId && x.Date == d);
|
||||
if (dayInput != null)
|
||||
{
|
||||
monthComplete += dayInput.DayAmount.Value;
|
||||
}
|
||||
j++;
|
||||
monthComplete = dayInputs.Where(x => x.WorkSection == workSection && x.ProjectContent == projectContent && x.WorkTeam == workTeam).ToList().Sum(x => x.DayAmount ?? 0);
|
||||
}
|
||||
this.Grid1.Rows[i].Values[11] = monthComplete.ToString("0.##");
|
||||
completedAmount= totalDayInputs.Where(x => x.WorkSection == workSection && x.ProjectContent == projectContent && x.WorkTeam == workTeam).ToList().Sum(x => x.DayAmount ?? 0);
|
||||
totalCompletedAmount = totalDayInputs.Where(x => x.WorkSection == workSection && x.ProjectContent == projectContent).ToList().Sum(x => x.DayAmount ?? 0);
|
||||
this.Grid1.Rows[i].Values[4] = totalAmount.ToString("0.##");
|
||||
this.Grid1.Rows[i].Values[6] = completedAmount.ToString("0.##");
|
||||
this.Grid1.Rows[i].Values[7] = (totalAmount - totalCompletedAmount).ToString("0.##");
|
||||
this.Grid1.Rows[i].Values[8] = monthComplete.ToString("0.##");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@ -189,5 +202,158 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initTemplatePath = string.Empty;
|
||||
string uploadfilepath = string.Empty;
|
||||
string newUrl = string.Empty;
|
||||
string filePath = string.Empty;
|
||||
initTemplatePath = Const.WorkTeamStatisticsTemplateUrl;
|
||||
uploadfilepath = rootPath + initTemplatePath;
|
||||
if (this.Grid1.Rows.Count > 0)
|
||||
{
|
||||
newUrl = uploadfilepath.Replace(".xlsx", "(" + this.txtMonths.Text.Trim() + ")" + ".xlsx");
|
||||
File.Copy(uploadfilepath, newUrl);
|
||||
|
||||
DateTime startDate, endDate;
|
||||
List<DateTime> days = new List<DateTime>();
|
||||
DateTime now = Convert.ToDateTime(txtMonths.Text + "-01");
|
||||
int year = now.Year;
|
||||
int month = now.Month;
|
||||
int day = DateTime.Now.Day;
|
||||
if (day >= 26)
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = now.AddDays(24);
|
||||
}
|
||||
else
|
||||
{
|
||||
DateTime lastMonth = now.AddMonths(-1);
|
||||
startDate = Convert.ToDateTime(lastMonth.Year.ToString() + "-" + lastMonth.Month.ToString() + "-" + "26");
|
||||
endDate = DateTime.Now;
|
||||
}
|
||||
do
|
||||
{
|
||||
days.Add(startDate);
|
||||
startDate = startDate.AddDays(1);
|
||||
} while (startDate <= endDate);
|
||||
|
||||
// 第一步:读取文件流
|
||||
NPOI.SS.UserModel.IWorkbook workbook;
|
||||
using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
|
||||
}
|
||||
|
||||
// 创建单元格样式
|
||||
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
|
||||
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.None;
|
||||
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.None;
|
||||
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.None;
|
||||
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.None;
|
||||
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
var font = workbook.CreateFont();
|
||||
font.FontHeightInPoints = 12;
|
||||
font.IsBold = true;
|
||||
//font.FontHeightInPoints = (short)8.5;字号为小数时要转为short
|
||||
cellStyle0.SetFont(font);
|
||||
// 第二步:创建新数据行
|
||||
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
|
||||
var font2 = workbook.CreateFont();
|
||||
font2.FontHeightInPoints = 10;
|
||||
// 创建单元格样式
|
||||
NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
|
||||
cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
cellStyle.WrapText = true;
|
||||
cellStyle.SetFont(font2);
|
||||
// 创建单元格样式
|
||||
NPOI.SS.UserModel.ICellStyle cellStyleYellow = workbook.CreateCellStyle();
|
||||
cellStyleYellow.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyleYellow.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyleYellow.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyleYellow.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyleYellow.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyleYellow.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
//NPOI.SS.UserModel.IRow row5 = sheet.GetRow(5);
|
||||
//NPOI.SS.UserModel.ICell cell5;
|
||||
//cell5 = row5.GetCell(4);
|
||||
cellStyleYellow.FillBackgroundColor = 120;
|
||||
cellStyleYellow.SetFont(font2);
|
||||
int r = 1;
|
||||
NPOI.SS.UserModel.IRow row;
|
||||
NPOI.SS.UserModel.ICell cell;
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
row = sheet.CreateRow(r + i);
|
||||
cell = row.CreateCell(0);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue((i + 1).ToString());
|
||||
cell = row.CreateCell(1);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[1].ToString());
|
||||
cell = row.CreateCell(2);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[2].ToString());
|
||||
cell = row.CreateCell(3);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[3].ToString());
|
||||
cell = row.CreateCell(4);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[4].ToString());
|
||||
cell = row.CreateCell(5);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[5].ToString());
|
||||
cell = row.CreateCell(6);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[6].ToString());
|
||||
cell = row.CreateCell(7);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[7].ToString());
|
||||
cell = row.CreateCell(8);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(Grid1.Rows[i].Values[8].ToString());
|
||||
}
|
||||
// 第三步:写入文件流
|
||||
using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
|
||||
{
|
||||
workbook.Write(stream);
|
||||
workbook.Close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
string fileName = Path.GetFileName(newUrl);
|
||||
FileInfo info = new FileInfo(newUrl);
|
||||
long fileSize = info.Length;
|
||||
Response.Clear();
|
||||
Response.ContentType = "application/x-zip-compressed";
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
Response.TransmitFile(newUrl, 0, fileSize);
|
||||
Response.Flush();
|
||||
Response.Close();
|
||||
File.Delete(newUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("当期无记录,无法导出!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -57,6 +57,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar ToolSearch;
|
||||
|
||||
/// <summary>
|
||||
/// drpProject 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpProject;
|
||||
|
||||
/// <summary>
|
||||
/// txtWorkSection 控件。
|
||||
/// </summary>
|
||||
|
@ -66,15 +75,6 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWorkSection;
|
||||
|
||||
/// <summary>
|
||||
/// txtDrawingNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtDrawingNo;
|
||||
|
||||
/// <summary>
|
||||
/// txtWorkTeam 控件。
|
||||
/// </summary>
|
||||
|
@ -84,6 +84,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWorkTeam;
|
||||
|
||||
/// <summary>
|
||||
/// txtMonths 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtMonths;
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
|
@ -93,6 +102,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearch;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -1,186 +1 @@
|
|||
|
||||
错误信息开始=====>
|
||||
错误类型:IndexOutOfRangeException
|
||||
错误信息:索引超出了数组界限。
|
||||
错误堆栈:
|
||||
在 FineUIPro.Web.CQMS.QuantityManagement.WorkTeamStatistics.BindGrid() 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\FineUIPro.Web\CQMS\QuantityManagement\WorkTeamStatistics.aspx.cs:行号 107
|
||||
在 FineUIPro.Web.CQMS.QuantityManagement.WorkTeamStatistics.Page_Load(Object sender, EventArgs e) 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\FineUIPro.Web\CQMS\QuantityManagement\WorkTeamStatistics.aspx.cs:行号 24
|
||||
在 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)
|
||||
出错时间:02/06/2025 14:32:10
|
||||
出错文件:http://localhost:4528/CQMS/QuantityManagement/WorkTeamStatistics.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:02/06/2025 14:32:10
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:IndexOutOfRangeException
|
||||
错误信息:索引超出了数组界限。
|
||||
错误堆栈:
|
||||
在 FineUIPro.Web.CQMS.QuantityManagement.WorkTeamStatistics.BindGrid() 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\FineUIPro.Web\CQMS\QuantityManagement\WorkTeamStatistics.aspx.cs:行号 102
|
||||
在 FineUIPro.Web.CQMS.QuantityManagement.WorkTeamStatistics.Page_Load(Object sender, EventArgs e) 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\FineUIPro.Web\CQMS\QuantityManagement\WorkTeamStatistics.aspx.cs:行号 24
|
||||
在 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)
|
||||
出错时间:02/06/2025 14:56:15
|
||||
出错文件:http://localhost:4528/CQMS/QuantityManagement/WorkTeamStatistics.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:02/06/2025 14:56:15
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:SqlException
|
||||
错误信息:必须声明标量变量 "@WorkTeam"。
|
||||
错误堆栈:
|
||||
在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
|
||||
在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
|
||||
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
|
||||
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
|
||||
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
|
||||
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
|
||||
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
|
||||
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
|
||||
在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
|
||||
在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
|
||||
在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\BLL\SQLHelper.cs:行号 311
|
||||
在 FineUIPro.Web.CQMS.QuantityManagement.WorkTeamStatistics.BindGrid() 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\FineUIPro.Web\CQMS\QuantityManagement\WorkTeamStatistics.aspx.cs:行号 57
|
||||
在 FineUIPro.Web.CQMS.QuantityManagement.WorkTeamStatistics.btnSearch_Click(Object sender, EventArgs e) 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\FineUIPro.Web\CQMS\QuantityManagement\WorkTeamStatistics.aspx.cs:行号 133
|
||||
在 FineUIPro.Button.OnClick(EventArgs e)
|
||||
在 (Button , EventArgs )
|
||||
在 FineUIPro.Button.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)
|
||||
出错时间:02/06/2025 15:07:32
|
||||
出错文件:http://localhost:4528/CQMS/QuantityManagement/WorkTeamStatistics.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:02/06/2025 15:07:32
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:SqlException
|
||||
错误信息:必须声明标量变量 "@WorkTeam"。
|
||||
错误堆栈:
|
||||
在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
|
||||
在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
|
||||
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
|
||||
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
|
||||
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
|
||||
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
|
||||
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
|
||||
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
|
||||
在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
|
||||
在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
|
||||
在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\BLL\SQLHelper.cs:行号 311
|
||||
在 FineUIPro.Web.CQMS.QuantityManagement.WorkTeamStatistics.BindGrid() 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\FineUIPro.Web\CQMS\QuantityManagement\WorkTeamStatistics.aspx.cs:行号 57
|
||||
在 FineUIPro.Web.CQMS.QuantityManagement.WorkTeamStatistics.btnSearch_Click(Object sender, EventArgs e) 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\FineUIPro.Web\CQMS\QuantityManagement\WorkTeamStatistics.aspx.cs:行号 133
|
||||
在 FineUIPro.Button.OnClick(EventArgs e)
|
||||
在 (Button , EventArgs )
|
||||
在 FineUIPro.Button.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)
|
||||
出错时间:02/06/2025 15:07:33
|
||||
出错文件:http://localhost:4528/CQMS/QuantityManagement/WorkTeamStatistics.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:02/06/2025 15:07:33
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:SqlException
|
||||
错误信息:必须声明标量变量 "@WorkTeam"。
|
||||
错误堆栈:
|
||||
在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
|
||||
在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
|
||||
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
|
||||
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
|
||||
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
|
||||
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
|
||||
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
|
||||
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
|
||||
在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
|
||||
在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
|
||||
在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\BLL\SQLHelper.cs:行号 311
|
||||
在 FineUIPro.Web.CQMS.QuantityManagement.WorkTeamStatistics.BindGrid() 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\FineUIPro.Web\CQMS\QuantityManagement\WorkTeamStatistics.aspx.cs:行号 57
|
||||
在 FineUIPro.Web.CQMS.QuantityManagement.WorkTeamStatistics.btnSearch_Click(Object sender, EventArgs e) 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\FineUIPro.Web\CQMS\QuantityManagement\WorkTeamStatistics.aspx.cs:行号 133
|
||||
在 FineUIPro.Button.OnClick(EventArgs e)
|
||||
在 (Button , EventArgs )
|
||||
在 FineUIPro.Button.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)
|
||||
出错时间:02/06/2025 15:07:34
|
||||
出错文件:http://localhost:4528/CQMS/QuantityManagement/WorkTeamStatistics.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:02/06/2025 15:07:34
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:SqlException
|
||||
错误信息:必须声明标量变量 "@WorkTeam"。
|
||||
错误堆栈:
|
||||
在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
|
||||
在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
|
||||
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
|
||||
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
|
||||
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
|
||||
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
|
||||
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
|
||||
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
|
||||
在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
|
||||
在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
|
||||
在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
|
||||
在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\BLL\SQLHelper.cs:行号 311
|
||||
在 FineUIPro.Web.CQMS.QuantityManagement.WorkTeamStatistics.BindGrid() 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\FineUIPro.Web\CQMS\QuantityManagement\WorkTeamStatistics.aspx.cs:行号 57
|
||||
在 FineUIPro.Web.CQMS.QuantityManagement.WorkTeamStatistics.btnSearch_Click(Object sender, EventArgs e) 位置 E:\工作\河北安装\SGGL_HBAZ\SGGL\FineUIPro.Web\CQMS\QuantityManagement\WorkTeamStatistics.aspx.cs:行号 133
|
||||
在 FineUIPro.Button.OnClick(EventArgs e)
|
||||
在 (Button , EventArgs )
|
||||
在 FineUIPro.Button.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)
|
||||
出错时间:02/06/2025 15:07:34
|
||||
出错文件:http://localhost:4528/CQMS/QuantityManagement/WorkTeamStatistics.aspx
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:02/06/2025 15:07:34
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -558,6 +558,7 @@
|
|||
<Content Include="CQMS\QuantityManagement\Base.aspx" />
|
||||
<Content Include="CQMS\QuantityManagement\BaseDataIn.aspx" />
|
||||
<Content Include="CQMS\QuantityManagement\BaseEdit.aspx" />
|
||||
<Content Include="CQMS\QuantityManagement\BaseView.aspx" />
|
||||
<Content Include="CQMS\QuantityManagement\Change.aspx" />
|
||||
<Content Include="CQMS\QuantityManagement\ChangeEdit.aspx" />
|
||||
<Content Include="CQMS\QuantityManagement\DayInput.aspx" />
|
||||
|
@ -565,6 +566,7 @@
|
|||
<Content Include="CQMS\QuantityManagement\DayInputStatistics.aspx" />
|
||||
<Content Include="CQMS\QuantityManagement\Drawing.aspx" />
|
||||
<Content Include="CQMS\QuantityManagement\DrawingEdit.aspx" />
|
||||
<Content Include="CQMS\QuantityManagement\ProjectContentStatistics.aspx" />
|
||||
<Content Include="CQMS\QuantityManagement\WorkTeamStatistics.aspx" />
|
||||
<Content Include="CQMS\Solution\ConstructSolutionFinal.aspx" />
|
||||
<Content Include="CQMS\Solution\ConstructSolution.aspx" />
|
||||
|
@ -9541,6 +9543,13 @@
|
|||
<Compile Include="CQMS\QuantityManagement\BaseEdit.aspx.designer.cs">
|
||||
<DependentUpon>BaseEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\QuantityManagement\BaseView.aspx.cs">
|
||||
<DependentUpon>BaseView.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\QuantityManagement\BaseView.aspx.designer.cs">
|
||||
<DependentUpon>BaseView.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\QuantityManagement\Change.aspx.cs">
|
||||
<DependentUpon>Change.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -9590,6 +9599,13 @@
|
|||
<Compile Include="CQMS\QuantityManagement\DrawingEdit.aspx.designer.cs">
|
||||
<DependentUpon>DrawingEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\QuantityManagement\ProjectContentStatistics.aspx.cs">
|
||||
<DependentUpon>ProjectContentStatistics.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\QuantityManagement\ProjectContentStatistics.aspx.designer.cs">
|
||||
<DependentUpon>ProjectContentStatistics.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\QuantityManagement\WorkTeamStatistics.aspx.cs">
|
||||
<DependentUpon>WorkTeamStatistics.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
|
|
@ -14,34 +14,14 @@
|
|||
<TreeNode id="e728cc1a-fd65-4f1a-8f22-2b72e62f78ee" Text="控制点检查检测" EnText="控制点检查检测" NavigateUrl="CQMS/ProcessControl/InspectionManagement.aspx"></TreeNode>
|
||||
<TreeNode id="d563d7a9-e574-4e25-b868-a124aa789789" Text="控制点检查检测合格率统计" EnText="控制点检查检测合格率统计" NavigateUrl="CQMS/ProcessControl/InspectionManagementStatistics.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="7ecf0229-8a0b-40ce-8b04-e556f7bd3394" Text="质量报表管理" EnText="质量报表管理" NavigateUrl=""><TreeNode id="51ee983f-085e-4f02-b819-cab049d9cc26" Text="施工质量周报(开发中)" EnText="施工质量周报(开发中)" NavigateUrl="CQMS/ManageReport/WeekReport.aspx"></TreeNode>
|
||||
<TreeNode id="8048c87a-c2b6-4a0d-bca9-f4f2dca42e5b" Text="施工质量月报(开发中)" EnText="施工质量月报(开发中)" NavigateUrl="CQMS/ManageReport/MonthReport.aspx"></TreeNode>
|
||||
<TreeNode id="50D0D416-A025-4939-8653-A796E4CAB68D" Text="施工管理部质量目标统计表" EnText="施工管理部质量目标统计表" NavigateUrl="CQMS/ManageReport/QualityGoalStatic.aspx"></TreeNode>
|
||||
<TreeNode id="1443C901-A9C3-4CCC-B858-55512DE8C5CA" Text="质量管理工作总结报告" EnText="质量管理工作总结报告" NavigateUrl="CQMS/ManageReport/QualityWorkSummaryReport.aspx"></TreeNode>
|
||||
<TreeNode id="267064F1-88F7-4468-998A-49A1A2F25BB8" Text="季度工程项目质量信息表" EnText="季度工程项目质量信息表" NavigateUrl="CQMS/ManageReport/QuarterlyProjectQuality.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="A54EC449-5F77-4068-83B9-AA305B721A0B" Text="质量检查" EnText="质量检查" NavigateUrl=""><TreeNode id="7918FD50-3410-42A2-A680-ECAB0E5E9719" Text="质量罚款单(试用)" EnText="质量罚款单(试用)" NavigateUrl="CQMS/Check/CheckFineList.aspx"></TreeNode>
|
||||
<TreeNode id="A54EC449-5F77-4068-83B9-AA305B721A0B" Text="质量检查" EnText="质量检查" NavigateUrl=""><TreeNode id="7918FD50-3410-42A2-A680-ECAB0E5E9719" Text="质量罚款单" EnText="质量罚款单" NavigateUrl="CQMS/Check/CheckFineList.aspx"></TreeNode>
|
||||
<TreeNode id="B3E99BD9-FDC7-4F15-8C3C-A7821AC9E306" Text="质量巡检" EnText="质量巡检" NavigateUrl="CQMS/Check/CheckList.aspx"></TreeNode>
|
||||
<TreeNode id="AA65E45D-E677-41F3-B621-4EA841B908EF" Text="问题统计(图表)" EnText="问题统计(图表)" NavigateUrl="CQMS/Check/JointCheckChartStatistics.aspx"></TreeNode>
|
||||
<TreeNode id="D3B1433E-00DE-432B-A30A-0EFB513480A8" Text="问题统计" EnText="问题统计" NavigateUrl="CQMS/Check/JointCheckStatistics.aspx"></TreeNode>
|
||||
<TreeNode id="EB9C6102-7A01-4D3C-B25A-5B317ECFBEDF" Text="单位问题统计" EnText="单位问题统计" NavigateUrl="CQMS/Check/JointCheckUnitStatistics.aspx"></TreeNode>
|
||||
<TreeNode id="288C955A-E379-4F24-85F9-585343B33D46" Text="奖罚通知单(定稿)(试用)" EnText="奖罚通知单(定稿)(试用)" NavigateUrl="CQMS/Check/RewardAndPunish.aspx"></TreeNode>
|
||||
<TreeNode id="288C955A-E379-4F24-85F9-585343B33D46" Text="奖罚通知单(定稿)" EnText="奖罚通知单(定稿)" NavigateUrl="CQMS/Check/RewardAndPunish.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="26C48580-6AF2-4BC1-BDCB-0B666E15C5B3" Text="变更管理" EnText="变更管理" NavigateUrl=""><TreeNode id="C4ED62E6-3D2D-4DD9-937D-2AA039032B79" Text="工程签证申请/评审表" EnText="工程签证申请/评审表" NavigateUrl="CQMS/Information/VisaApplication.aspx"></TreeNode>
|
||||
<TreeNode id="B09DB1FB-9C42-47C2-A234-3062445FFE96" Text="工程签证申请/评审定稿文件" EnText="工程签证申请/评审定稿文件" NavigateUrl="CQMS/Information/VisaApplicationFinal.aspx"></TreeNode>
|
||||
<TreeNode id="96C3CE88-D5CD-4C22-8F0E-EC01120618E8" Text="工程签证工作委托单" EnText="工程签证工作委托单" NavigateUrl="CQMS/Information/WorkOrder.aspx"></TreeNode>
|
||||
<TreeNode id="31CBA190-8847-474F-8562-B0990F4FB2A3" Text="工程签证工作委托单定稿文件" EnText="工程签证工作委托单定稿文件" NavigateUrl="CQMS/Information/WorkOrderFinal.aspx"></TreeNode>
|
||||
<TreeNode id="83C5F947-4DD4-4E20-B383-B6583479854C" Text="工程签证确认单" EnText="工程签证确认单" NavigateUrl="CQMS/Information/ConfirmForm.aspx"></TreeNode>
|
||||
<TreeNode id="98F1B927-C473-461C-B58D-778D24354D76" Text="工程签证结算单" EnText="工程签证结算单" NavigateUrl="CQMS/Information/Statement.aspx"></TreeNode>
|
||||
<TreeNode id="12C29C4E-BBF6-44F6-BA66-745806C540FB" Text="工程签证费用报审表" EnText="工程签证费用报审表" NavigateUrl="CQMS/Information/CostReport.aspx"></TreeNode>
|
||||
<TreeNode id="457B5233-5169-49BA-A40A-F4A2093FEFE3" Text="工程签证管理表" EnText="工程签证管理表" NavigateUrl="CQMS/Information/ConfirmFormList.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="BBBF69F1-9520-4E0A-B0C0-9F4D3FBF4C10" Text="施工方案管理" EnText="施工方案管理" NavigateUrl=""><TreeNode id="91C4BFDB-0A51-4992-99CC-EB4EC185593D" Text="施工组织设计及施工方案" EnText="施工组织设计及施工方案" NavigateUrl="CQMS/Solution/ConstructSolution.aspx"></TreeNode>
|
||||
<TreeNode id="B068DA9C-FDB8-42CF-82FB-377F63840431" Text="施工方案定稿文件" EnText="施工方案定稿文件" NavigateUrl="CQMS/Solution/ConstructSolutionFinal.aspx"></TreeNode>
|
||||
<TreeNode id="BBBF69F1-9520-4E0A-B0C0-9F4D3FBF4C10" Text="施工方案管理" EnText="施工方案管理" NavigateUrl=""><TreeNode id="B068DA9C-FDB8-42CF-82FB-377F63840431" Text="施工方案定稿文件" EnText="施工方案定稿文件" NavigateUrl="CQMS/Solution/ConstructSolutionFinal.aspx"></TreeNode>
|
||||
<TreeNode id="fd116c94-714b-4b92-a3c9-cc83d358e2b3" Text="超过一定规模的危大施工方案" EnText="超过一定规模的危大施工方案" NavigateUrl="CQMS/Comprehensive/MajorPlanApproval.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="E632DCA0-5A68-49C4-90CE-793EFC693C4A" Text="资料管理(开发中)" EnText="资料管理(开发中)" NavigateUrl=""><TreeNode id="151BFF86-5B2D-4852-A846-690EA4D4DB51" Text="标准规范" EnText="标准规范" NavigateUrl="CQMS/DataBase/ConstructionStandardListProject.aspx"></TreeNode>
|
||||
<TreeNode id="3A50A067-6FF2-43EF-BFF3-C04E7E66F8F9" Text="资料库" EnText="资料库" NavigateUrl="CQMS/DataBase/DataBaseProject.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="3FCD953E-6F9F-48F0-827E-591FF95F5647" Text="施工日志" EnText="施工日志" NavigateUrl="CQMS/ConstructionLog/ConstructionLog.aspx"></TreeNode>
|
||||
</Tree>
|
|
@ -19,9 +19,7 @@
|
|||
<TreeNode id="D86917DB-D00A-4E18-9793-C290B5BBA84C" Text="事故案例库" EnText="事故案例库" NavigateUrl="HSSE/EduTrain/AccidentCase.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="D70D9BF5-C72E-414D-941B-CF9B4065F6BA" Text="安全技术" EnText="安全技术" NavigateUrl=""><TreeNode id="8333727B-A2CE-4CE2-A019-21AC9EE61A4C" Text="危险源清单" EnText="危险源清单" NavigateUrl="HSSE/Technique/HazardList.aspx"></TreeNode>
|
||||
<TreeNode id="C0018E8C-C88B-4E25-BCFC-F0BF3CACC63A" Text="公司危险源清单" EnText="公司危险源清单" NavigateUrl="HSSE/Technique/CompanyHazardList.aspx"></TreeNode>
|
||||
<TreeNode id="773B59F9-61F9-4F5E-9D68-A1BF9322AFFA" Text="环境因素危险源" EnText="环境因素危险源" NavigateUrl="HSSE/Technique/Environmental.aspx"></TreeNode>
|
||||
<TreeNode id="DC2AA8C2-82A8-4F7A-832D-9889C65AA228" Text="公司环境因素危险源" EnText="公司环境因素危险源" NavigateUrl="HSSE/Technique/CompanyEnvironmental.aspx"></TreeNode>
|
||||
<TreeNode id="2D86AD87-4108-428C-BA3D-F81FB85511FE" Text="安全隐患" EnText="安全隐患" NavigateUrl="HSSE/Technique/Rectify.aspx"></TreeNode>
|
||||
<TreeNode id="9C26BF2A-091D-4AC3-8678-334DE4E1CED7" Text="项目安全检查项" EnText="项目安全检查项" NavigateUrl="HSSE/Technique/CheckItemSet.aspx"></TreeNode>
|
||||
<TreeNode id="D11BFC83-BE64-457D-B8FA-11C37D35CD72" Text="应急预案" EnText="应急预案" NavigateUrl="HSSE/Technique/Emergency.aspx"></TreeNode>
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Tree>
|
||||
<TreeNode id="E38EE43D-C526-493F-A177-712BA9B22291" Text="项目策划" EnText="项目策划" NavigateUrl="">
|
||||
<TreeNode id="3637B4CC-29FE-45E1-BE2E-9CF02A69A63E" Text="资源维护" EnText="资源维护" NavigateUrl="HSSE/Material/MaterialList.aspx">
|
||||
</TreeNode>
|
||||
<TreeNode id="7CCA86F7-E43F-438F-AAB6-CA2661FBB362" Text="HSE体系" EnText="HSE体系" NavigateUrl=""><TreeNode id="9D2E1FEB-5E3D-4E37-9C11-0F6BABE8BA8F" Text="HSE组织机构图" EnText="HSE组织机构图" NavigateUrl="HSSE/SecuritySystem/SafetyOrganizationPic.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="7944B1C6-636B-4AD8-980C-A2F6D44883D3" Text="HSE管理规定" EnText="HSE管理规定" NavigateUrl=""><TreeNode id="ec0942af-b1ae-4676-8442-4be3a5e22ea0" Text="项目HSE管理制度" EnText="项目HSE管理制度" NavigateUrl="HSSE/ActionPlan/ProjectManageRule.aspx"></TreeNode>
|
||||
<TreeNode id="7CCA86F7-E43F-438F-AAB6-CA2661FBB362" Text="HSE体系" EnText="HSE体系" NavigateUrl="">
|
||||
<TreeNode id="9D2E1FEB-5E3D-4E37-9C11-0F6BABE8BA8F" Text="HSE组织机构图" EnText="HSE组织机构图" NavigateUrl="HSSE/SecuritySystem/SafetyOrganizationPic.aspx">
|
||||
</TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="CBC47C8B-141C-446B-90D9-CE8F5AE66CE4" Text="HSE实施计划" EnText="HSE实施计划" NavigateUrl="HSSE/ActionPlan/ActionPlanList.aspx"></TreeNode>
|
||||
<TreeNode id="9A3212F8-2392-4F21-A8C7-FF5EE3B191F1" Text="风险分级管控(试运行)" EnText="风险分级管控(试运行)" NavigateUrl=""><TreeNode id="762F0BF9-471B-4115-B35E-03A26C573877" Text="环境因素识别与评价" EnText="环境因素识别与评价" NavigateUrl="HSSE/Hazard/EnvironmentalRiskList.aspx"></TreeNode>
|
||||
<TreeNode id="9A3212F8-2392-4F21-A8C7-FF5EE3B191F1" Text="风险分级管控" EnText="风险分级管控" NavigateUrl=""><TreeNode id="762F0BF9-471B-4115-B35E-03A26C573877" Text="环境因素识别与评价" EnText="环境因素识别与评价" NavigateUrl="HSSE/Hazard/EnvironmentalRiskList.aspx"></TreeNode>
|
||||
<TreeNode id="EDC50857-7762-4498-83C6-5BDE85036BAB" Text="安全风险评价" EnText="安全风险评价" NavigateUrl="HSSE/Hazard/HazardList.aspx"></TreeNode>
|
||||
<TreeNode id="74A6B343-5837-416B-AE9C-D2BBCA08E41F" Text="风险信息库" EnText="风险信息库" NavigateUrl="HSSE/Hazard/HazardInfo.aspx"></TreeNode>
|
||||
<TreeNode id="F6A6D53A-150E-43DB-A3C4-6FA18E9401E9" Text="风险分级管控" EnText="风险分级管控" NavigateUrl="HSSE/Hazard/RiskControl.aspx"></TreeNode>
|
||||
|
@ -48,15 +46,9 @@
|
|||
<TreeNode id="467A0CB9-737D-4451-965E-869EBC3A4BD6" Text="HSE检查" EnText="HSE检查" NavigateUrl=""><TreeNode id="2FC8AA2A-F421-4174-A05E-2711167AF141" Text="HSE日常巡检" EnText="HSE日常巡检" NavigateUrl="HSSE/HiddenInspection/HiddenRectificationList.aspx"></TreeNode>
|
||||
<TreeNode id="1B08048F-93ED-4E84-AE65-DB7917EA2DFB" Text="专项检查" EnText="专项检查" NavigateUrl="HSSE/Check/CheckSpecial.aspx"></TreeNode>
|
||||
<TreeNode id="C7481FEE-EA92-44B8-99F6-C5CA6BBDCFF5" Text="专项检查记录" EnText="专项检查记录" NavigateUrl="HSSE/Check/CheckSpecialRecord.aspx"></TreeNode>
|
||||
<TreeNode id="355265DE-901A-4110-B934-B4DA067C4334" Text="领导带班检查" EnText="领导带班检查" NavigateUrl="HSSE/Check/ProjectLeaderCheck.aspx"></TreeNode>
|
||||
<TreeNode id="F057C207-4549-48AE-B838-A1920E5709D8" Text="联系单" EnText="联系单" NavigateUrl="HSSE/Check/ContactList.aspx"></TreeNode>
|
||||
<TreeNode id="C3B6B222-44DC-46F3-B783-B1FC0F743C48" Text="隐患整改单" EnText="隐患整改单" NavigateUrl="HSSE/Check/RectifyNotices.aspx"></TreeNode>
|
||||
<TreeNode id="8284289A-56F5-403F-B2C7-0D2BCF61A4EA" Text="隐患整改单(定稿文件)" EnText="隐患整改单(定稿文件)" NavigateUrl="HSSE/Check/RectifyNoticesFinalDoc.aspx"></TreeNode>
|
||||
<TreeNode id="C81DB7ED-165E-4C69-86B0-A3AAE37059FE" Text="工程暂停令" EnText="工程暂停令" NavigateUrl="HSSE/Check/PauseNotice.aspx"></TreeNode>
|
||||
<TreeNode id="7B272C3F-39D2-496D-A87C-E2C89A20E4EE" Text="HSE巡检统计" EnText="HSE巡检统计" NavigateUrl="HSSE/HiddenInspection/RishAnalysis.aspx"></TreeNode>
|
||||
<TreeNode id="4E312813-1A2E-4AF7-8106-9210A6E83926" Text="隐患整改统计" EnText="隐患整改统计" NavigateUrl="HSSE/Check/RectifyNoticesStatistics.aspx"></TreeNode>
|
||||
<TreeNode id="F531D523-35BC-4D13-88D3-CB2554C4185C" Text="施工作业风险" EnText="施工作业风险" NavigateUrl="HSSE/Hazard/ConstructionRisk.aspx"></TreeNode>
|
||||
<TreeNode id="81735D5D-712D-4D90-A471-5E0CCE98EF48" Text="施工作业风险(地图)" EnText="施工作业风险(地图)" NavigateUrl="HSSE/Hazard/ConstructionRiskMap.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="5309E7E0-395E-4F11-8F5E-D52E11526A2A" Text="HSE会议" EnText="HSE会议" NavigateUrl=""><TreeNode id="DFB56743-17BA-40BA-82EA-FCB9B0DBFAFF" Text="安全领导小组会议" EnText="安全领导小组会议" NavigateUrl="HSSE/Meeting/SafetyLeaderGroupMeeting.aspx"></TreeNode>
|
||||
<TreeNode id="5236B1D9-8B57-495E-8644-231DF5D066CE" Text="HSE周例会" EnText="HSE周例会" NavigateUrl="HSSE/Meeting/WeekMeeting.aspx"></TreeNode>
|
||||
|
@ -64,20 +56,6 @@
|
|||
<TreeNode id="BB6CEC48-283B-46AD-BEDD-F964D261698F" Text="HSE专题会议" EnText="HSE专题会议" NavigateUrl="HSSE/Meeting/SpecialMeeting.aspx"></TreeNode>
|
||||
<TreeNode id="F8ADCDBC-AAAD-4884-9935-2B63562E4779" Text="班前会" EnText="班前会" NavigateUrl="HSSE/Meeting/ClassMeeting.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="473A87D2-1365-4A68-BD38-06F312F81BC2" Text="作业许可(优化中)" EnText="作业许可(优化中)" NavigateUrl=""><TreeNode id="2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D5B" Text="作业票申请" EnText="作业票申请" NavigateUrl="HSSE/License/Apply.aspx"></TreeNode>
|
||||
<TreeNode id="2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B" Text="动火作业票" EnText="动火作业票" NavigateUrl="HSSE/License/FireWork.aspx"></TreeNode>
|
||||
<TreeNode id="DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9" Text="高处作业票" EnText="高处作业票" NavigateUrl="HSSE/License/HeightWork.aspx"></TreeNode>
|
||||
<TreeNode id="AEC9166D-1C91-45F0-8BFE-D3D0479A28C7" Text="受限空间作业票" EnText="受限空间作业票" NavigateUrl="HSSE/License/LimitedSpace.aspx"></TreeNode>
|
||||
<TreeNode id="F72FF20B-D3EB-46A5-97F7-C99B2473A140" Text="射线作业票" EnText="射线作业票" NavigateUrl="HSSE/License/RadialWork.aspx"></TreeNode>
|
||||
<TreeNode id="4E607E83-41FC-4F49-B26F-A21CFE38328F" Text="断路(占道)作业票" EnText="断路(占道)作业票" NavigateUrl="HSSE/License/OpenCircuit.aspx"></TreeNode>
|
||||
<TreeNode id="755C6AC9-2E38-4D4F-AF33-33CB1744A907" Text="动土作业票" EnText="动土作业票" NavigateUrl="HSSE/License/BreakGround.aspx"></TreeNode>
|
||||
<TreeNode id="7BBAE649-7B00-4475-A911-BFE3A37AC55B" Text="夜间施工作业票" EnText="夜间施工作业票" NavigateUrl="HSSE/License/NightWork.aspx"></TreeNode>
|
||||
<TreeNode id="A1BE3AB6-9D4A-41E7-8870-E73423165451" Text="吊装作业票" EnText="吊装作业票" NavigateUrl="HSSE/License/LiftingWork.aspx"></TreeNode>
|
||||
<TreeNode id="E9EF8980-C60C-4A87-8498-5A0A061844ED" Text="临电作业票" EnText="临电作业票" NavigateUrl="HSSE/License/TempElectricity.aspx"></TreeNode>
|
||||
<TreeNode id="F0EBACC6-DAED-4A3F-A174-9AB639409C4B" Text="试压作业票" EnText="试压作业票" NavigateUrl="HSSE/License/PressureTest.aspx"></TreeNode>
|
||||
<TreeNode id="7F1C5B31-10D7-49AB-8AA2-01FAC565C964" Text="加班作业票" EnText="加班作业票" NavigateUrl="HSSE/License/JiaBan.aspx"></TreeNode>
|
||||
<TreeNode id="0E9B7084-D021-4CA3-B9D2-9CBAA27A571B" Text="作业票(定稿)" EnText="作业票(定稿)" NavigateUrl="HSSE/License/LicenseManager.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="012DF857-AD6B-49AA-87A8-030CD5F66D4C" Text="HSE奖惩" EnText="HSE奖惩" NavigateUrl=""><TreeNode id="96F21A83-6871-4CC4-8901-1B99C376395C" Text="奖励通知单" EnText="奖励通知单" NavigateUrl="HSSE/Check/IncentiveNotice.aspx"></TreeNode>
|
||||
<TreeNode id="C13F1CE7-DAEF-4604-A13F-192621D28DF5" Text="奖励统计" EnText="奖励统计" NavigateUrl="HSSE/Check/IncentiveNoticeStatistics.aspx"></TreeNode>
|
||||
<TreeNode id="755F1C1D-2178-47D8-9F82-A501B53A2436" Text="处罚通知单" EnText="处罚通知单" NavigateUrl="HSSE/Check/PunishNotice.aspx"></TreeNode>
|
||||
|
@ -92,8 +70,6 @@
|
|||
<TreeNode id="CF5516F7-0735-44EF-9A6D-46FABF8EBC6E" Text="应急演练开展情况" EnText="应急演练开展情况" NavigateUrl="HSSE/Emergency/DrillRecordList.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="03235B30-960D-4FCF-99F7-97773A2EE108" Text="工作报告" EnText="工作报告" NavigateUrl=""><TreeNode id="8E5B4A8E-B06E-4C8A-A2C8-1091A9BCAF72" Text="工程师HSE日志" EnText="工程师HSE日志" NavigateUrl="HSSE/Manager/HSEDiary.aspx"></TreeNode>
|
||||
<TreeNode id="AE118E9C-C309-43B7-A198-8CA90A8D98EB" Text="管理周报" EnText="管理周报" NavigateUrl="HSSE/Manager/ManagerWeek.aspx"></TreeNode>
|
||||
<TreeNode id="9BEB66C0-E6DE-44DD-94F6-5C7433E6DE62" Text="项目HSE总结" EnText="项目HSE总结" NavigateUrl="HSSE/ActionPlan/ActionPlanSummary.aspx"></TreeNode>
|
||||
<TreeNode id="B58179BE-FE6E-4E91-84FC-D211E4692354" Text="项目图片" EnText="项目图片" NavigateUrl="PZHGL/InformationProject/Picture.aspx"></TreeNode>
|
||||
<TreeNode id="C483220C-0FEE-4E45-9B78-BBBA857EFFB3" Text="安全数据" EnText="安全数据" NavigateUrl="ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSE.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
|
@ -105,7 +81,7 @@
|
|||
<TreeNode id="7788B48E-8D80-4B22-BBD5-6192758E5DFC" Text="职业健康" EnText="职业健康" NavigateUrl=""><TreeNode id="9EACCED2-B646-489C-84AD-1C22066F00AE" Text="体检管理" EnText="体检管理" NavigateUrl="HSSE/OccupationHealth/PhysicalExamination.aspx"></TreeNode>
|
||||
<TreeNode id="775B77C0-E28D-4746-BCFE-F3E927D515A8" Text="职业病事故" EnText="职业病事故" NavigateUrl="HSSE/OccupationHealth/OccupationalDiseaseAccident.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="E765DADB-B7BF-4F01-AFBC-F20E9D2F62D6" Text="环境保护" EnText="环境保护" NavigateUrl=""><TreeNode id="342B5DEA-ECE1-46A4-BAA6-F0DB5276C769" Text="环境监测数据(开发中)" EnText="环境监测数据(开发中)" NavigateUrl="HSSE/Environmental/EnvironmentalMonitoring.aspx"></TreeNode>
|
||||
<TreeNode id="E765DADB-B7BF-4F01-AFBC-F20E9D2F62D6" Text="环境保护" EnText="环境保护" NavigateUrl=""><TreeNode id="342B5DEA-ECE1-46A4-BAA6-F0DB5276C769" Text="环境监测数据" EnText="环境监测数据" NavigateUrl="HSSE/Environmental/EnvironmentalMonitoring.aspx"></TreeNode>
|
||||
<TreeNode id="74F23370-56D8-426E-822D-5E367F620546" Text="突发环境事件" EnText="突发环境事件" NavigateUrl="HSSE/Environmental/UnexpectedEnvironmental.aspx"></TreeNode>
|
||||
<TreeNode id="3EF6E488-21D2-47BB-AA33-4FB0E9FED606" Text="环境事件应急预案" EnText="环境事件应急预案" NavigateUrl="HSSE/Environmental/EnvironmentalEmergencyPlan.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
|
|
|
@ -1,25 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Tree>
|
||||
<TreeNode id="B707B4E0-EF73-4010-A13B-59263A5029C7" Text="单位、分部、分项工程设置" EnText="单位、分部、分项工程设置" NavigateUrl="">
|
||||
<TreeNode id="858E83E9-ADE5-452E-BD65-82D8DFF872C0" Text="单位、分部、分项工程设置" EnText="单位、分部、分项工程设置" NavigateUrl="JDGL/WBS/WBSSetAudit.aspx">
|
||||
</TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="27C1D718-2DC0-42A5-96C0-F7A2D0DBC5F6" Text="进度测量标志(权重)设置" EnText="进度测量标志(权重)设置" NavigateUrl=""><TreeNode id="6844F671-8545-4DD9-B9A0-AA36CB5F1D6F" Text="进度测量标志(权重)设置" EnText="进度测量标志(权重)设置" NavigateUrl="JDGL/WBSWeights/WeightsAudit.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="BE150D8E-9BAB-4207-9CDD-5B05E847D906" Text="进度计划及计划值设置" EnText="进度计划及计划值设置" NavigateUrl=""><TreeNode id="9FEB264F-4124-48E8-A43C-5663BBFB55F0" Text="进度计划及计划值设置" EnText="进度计划及计划值设置" NavigateUrl="JDGL/WBSPlan/WBSPlanAudit.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="0B9BFD3F-AD3A-41D0-9144-9BABCB8E8422" Text="实际进度(完成值/实耗值)测量" EnText="实际进度(完成值/实耗值)测量" NavigateUrl=""><TreeNode id="6CFA0EE1-F075-417E-9D96-05B31122BB95" Text="实际进度(完成值/实耗值)测量录入" EnText="实际进度(完成值/实耗值)测量录入" NavigateUrl="JDGL/WBSCompleteAndReal/WBSCompleteAudit.aspx"></TreeNode>
|
||||
<TreeNode id="4FB962B3-905B-4560-9957-46A11392BB0B" Text="进度(完成值)测量报告" EnText="进度(完成值)测量报告" NavigateUrl="JDGL/WBSCompleteAndReal/WBSReport.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="3478449A-681A-4DB1-8E79-598BB24DD0C4" Text="进度/费用偏差分析与纠偏" EnText="进度/费用偏差分析与纠偏" NavigateUrl=""><TreeNode id="64197BF4-2622-4588-B49B-815188184CE2" Text="赢得值曲线" EnText="赢得值曲线" NavigateUrl="JDGL/CostAnalysis/EarnedValueCurve.aspx"></TreeNode>
|
||||
<TreeNode id="AA5C8AB2-CE89-41BC-B7B5-C689ED368B98" Text="计划调整及纠偏措施设置" EnText="计划调整及纠偏措施设置" NavigateUrl="JDGL/CostAnalysis/PlanAdjust.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="8F15D3BE-BE21-4A6F-AD5C-2BBECEE46149" Text="人工时日报" EnText="人工时日报" NavigateUrl="HSSE/SitePerson/DayReport.aspx"></TreeNode>
|
||||
<TreeNode id="781CD912-5D14-4371-97BC-3C4773C13B38" Text="工程量过程管理" EnText="工程量过程管理" NavigateUrl=""><TreeNode id="13015CB5-444A-45FF-9253-FBD2A72C41CD" Text="图纸登记" EnText="图纸登记" NavigateUrl="CQMS/QuantityManagement/Drawing.aspx"></TreeNode>
|
||||
<TreeNode id="13015CB5-444A-45FF-9253-FBD2A72C41CD" Text="图纸登记" EnText="图纸登记" NavigateUrl="CQMS/QuantityManagement/Drawing.aspx">
|
||||
</TreeNode>
|
||||
<TreeNode id="12E34CE4-99C9-4F25-BE59-3D208F7C6363" Text="变更登记" EnText="变更登记" NavigateUrl="CQMS/QuantityManagement/Change.aspx"></TreeNode>
|
||||
<TreeNode id="2D70E848-F055-4EF3-B385-2C4AEF9E5E6A" Text="工程量基础表" EnText="工程量基础表" NavigateUrl="CQMS/QuantityManagement/Base.aspx"></TreeNode>
|
||||
<TreeNode id="771D6E8F-3067-48FD-BC26-9225723AE8CE" Text="工程量日常录入" EnText="工程量日常录入" NavigateUrl="CQMS/QuantityManagement/DayInput.aspx"></TreeNode>
|
||||
<TreeNode id="57217CE1-E4FE-46EE-931E-B2E586C0AF0A" Text="日常统计表" EnText="日常统计表" NavigateUrl="CQMS/QuantityManagement/DayInputStatistics.aspx"></TreeNode>
|
||||
<TreeNode id="91246AF7-BCBB-4A78-A13A-4BFE6A2DE544" Text="整体及分类汇总表" EnText="整体及分类汇总表" NavigateUrl="CQMS/QuantityManagement/WorkTeamStatistics.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="998E2611-DB93-4B54-A1D0-3E243AE21831" Text="项目内容汇总表" EnText="项目内容汇总表" NavigateUrl="CQMS/QuantityManagement/ProjectContentStatistics.aspx"></TreeNode>
|
||||
</Tree>
|
|
@ -2,6 +2,4 @@
|
|||
<Tree>
|
||||
<TreeNode id="B95DF6F0-EB0C-4120-BD56-A4453AB42059" Text="项目列表" EnText="项目列表" NavigateUrl="ProjectData/ProjectList.aspx">
|
||||
</TreeNode>
|
||||
<TreeNode id="749B2E04-E4C2-4CBC-849E-FD2041135A43" Text="主数据项目列表" EnText="主数据项目列表" NavigateUrl="ProjectData/MainDataProjectList.aspx"></TreeNode>
|
||||
<TreeNode id="CD167198-1667-4552-9876-E768C2542C30" Text="实业信息" EnText="实业信息" NavigateUrl="BaseInfo/BaseFactory.aspx"></TreeNode>
|
||||
</Tree>
|
|
@ -4,4 +4,8 @@
|
|||
</TreeNode>
|
||||
<TreeNode id="6090DD54-FE59-4011-92EE-9906C9BC69B6" Text="发起检查" EnText="发起检查" NavigateUrl="OfficeCheck/Check/CheckInfo.aspx"></TreeNode>
|
||||
<TreeNode id="DEE90726-E00D-462B-A4BF-7E36180DD5B8" Text="项目绩效评价" EnText="项目绩效评价" NavigateUrl="OfficeCheck/ProjectEvaluation/ProjectEvaluation.aspx"></TreeNode>
|
||||
<TreeNode id="C1CEE66F-FBDD-4B8B-BF7E-DF04A839E06C" Text="工程管理" EnText="工程管理" NavigateUrl=""><TreeNode id="A3435F75-3CE2-42E0-B63B-6AEEDBD47C16" Text="日常统计表" EnText="日常统计表" NavigateUrl="CQMS/QuantityManagement/DayInputStatistics.aspx"></TreeNode>
|
||||
<TreeNode id="C9C95D5A-4A15-4F4B-B091-EB5BECC254A4" Text="整体及分类汇总表" EnText="整体及分类汇总表" NavigateUrl="CQMS/QuantityManagement/WorkTeamStatistics.aspx"></TreeNode>
|
||||
<TreeNode id="CE235B20-C6BB-4A34-A11C-70F90921B803" Text="项目内容汇总表" EnText="项目内容汇总表" NavigateUrl="CQMS/QuantityManagement/ProjectContentStatistics.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
</Tree>
|
|
@ -326,7 +326,7 @@
|
|||
</f:Button>
|
||||
</div>--%>
|
||||
<div class="h-nav-bar" data-id="3">
|
||||
<f:Button runat="server" CssClass="bgbtn" Text="<%$ Resources:Lan,ScheduleManage %>" CssStyle="color: #ffffff;" OnClick="btnJDGL_Click" OnClientClick="parent.removeActiveTab();"
|
||||
<f:Button runat="server" CssClass="bgbtn" Text="工程管理" CssStyle="color: #ffffff;" OnClick="btnJDGL_Click" OnClientClick="parent.removeActiveTab();"
|
||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnJDGL">
|
||||
</f:Button>
|
||||
</div>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 59 KiB |
1595
SGGL/Model/Model.cs
1595
SGGL/Model/Model.cs
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue