From 58beeab45889c4da02f20c74c3c474de11c513ea Mon Sep 17 00:00:00 2001
From: gaofei1985 <181547018@qq.com>
Date: Wed, 5 Mar 2025 16:48:17 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../SGGLDB_V2025-03-05-001-gaofei.sql | 188 ++
SGGL/BLL/BLL.csproj | 1 +
.../QuantityManagement/BaseApproveService.cs | 176 ++
.../CQMS/QuantityManagement/BaseService.cs | 43 +-
.../CQMS/QuantityManagement/ChangeService.cs | 4 +
.../QuantityManagement/DayInputService.cs | 2 +
.../CQMS/QuantityManagement/DrawingService.cs | 51 +-
SGGL/BLL/Common/Const.cs | 36 +-
SGGL/BLL/ProjectData/TeamGroupService.cs | 33 +
SGGL/BLL/SysManage/UserService.cs | 43 +-
.../CQMS/QuantityManagement/Base.aspx | 22 +-
.../CQMS/QuantityManagement/Base.aspx.cs | 115 +-
.../QuantityManagement/Base.aspx.designer.cs | 27 +
.../QuantityManagement/BaseDataIn.aspx.cs | 90 +-
.../CQMS/QuantityManagement/BaseEdit.aspx | 66 +-
.../CQMS/QuantityManagement/BaseEdit.aspx.cs | 300 +++-
.../BaseEdit.aspx.designer.cs | 94 +-
.../CQMS/QuantityManagement/BaseView.aspx | 74 +
.../CQMS/QuantityManagement/BaseView.aspx.cs | 184 ++
.../BaseView.aspx.designer.cs | 150 ++
.../CQMS/QuantityManagement/Change.aspx | 51 +-
.../CQMS/QuantityManagement/Change.aspx.cs | 13 +-
.../CQMS/QuantityManagement/ChangeEdit.aspx | 29 +-
.../QuantityManagement/ChangeEdit.aspx.cs | 56 +-
.../ChangeEdit.aspx.designer.cs | 26 +-
.../CQMS/QuantityManagement/DayInput.aspx | 6 +-
.../CQMS/QuantityManagement/DayInput.aspx.cs | 3 +-
.../CQMS/QuantityManagement/DayInputEdit.aspx | 26 +-
.../QuantityManagement/DayInputEdit.aspx.cs | 66 +-
.../DayInputEdit.aspx.designer.cs | 40 +-
.../DayInputStatistics.aspx | 30 +-
.../DayInputStatistics.aspx.cs | 424 ++++-
.../DayInputStatistics.aspx.designer.cs | 27 +
.../CQMS/QuantityManagement/Drawing.aspx | 48 +-
.../CQMS/QuantityManagement/Drawing.aspx.cs | 12 +-
.../CQMS/QuantityManagement/DrawingEdit.aspx | 21 +-
.../QuantityManagement/DrawingEdit.aspx.cs | 45 +-
.../DrawingEdit.aspx.designer.cs | 17 +-
.../ProjectContentStatistics.aspx | 84 +
.../ProjectContentStatistics.aspx.cs | 350 ++++
.../ProjectContentStatistics.aspx.designer.cs | 114 ++
.../WorkTeamStatistics.aspx | 26 +-
.../WorkTeamStatistics.aspx.cs | 224 ++-
.../WorkTeamStatistics.aspx.designer.cs | 36 +-
SGGL/FineUIPro.Web/ErrLog.txt | 187 +-
.../DataIn/工程量基础表导入模板.xls | Bin 20992 -> 21504 bytes
.../DataOut/工程量日常统计表.xlsx | Bin 0 -> 12156 bytes
.../DataOut/整体及分类汇总表.xlsx | Bin 0 -> 11905 bytes
.../Excel/DataOut/项目内容汇总表.xlsx | Bin 0 -> 11890 bytes
SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 16 +
SGGL/FineUIPro.Web/common/Menu_CQMS.xml | 26 +-
SGGL/FineUIPro.Web/common/Menu_DigData.xml | 2 -
SGGL/FineUIPro.Web/common/Menu_HSSE.xml | 34 +-
SGGL/FineUIPro.Web/common/Menu_JDGL.xml | 20 +-
SGGL/FineUIPro.Web/common/Menu_Project.xml | 2 -
SGGL/FineUIPro.Web/common/Menu_Server.xml | 4 +
SGGL/FineUIPro.Web/indexProject.aspx | 2 +-
.../res/indexv2/assets/image/logo1.png | Bin 21256 -> 60427 bytes
SGGL/Model/Model.cs | 1595 ++++++++++++++++-
59 files changed, 4829 insertions(+), 532 deletions(-)
create mode 100644 DataBase/版本日志/SGGLDB_V2025-03-05-001-gaofei.sql
create mode 100644 SGGL/BLL/CQMS/QuantityManagement/BaseApproveService.cs
create mode 100644 SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseView.aspx
create mode 100644 SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseView.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseView.aspx.designer.cs
create mode 100644 SGGL/FineUIPro.Web/CQMS/QuantityManagement/ProjectContentStatistics.aspx
create mode 100644 SGGL/FineUIPro.Web/CQMS/QuantityManagement/ProjectContentStatistics.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/CQMS/QuantityManagement/ProjectContentStatistics.aspx.designer.cs
create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataOut/工程量日常统计表.xlsx
create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataOut/整体及分类汇总表.xlsx
create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataOut/项目内容汇总表.xlsx
diff --git a/DataBase/版本日志/SGGLDB_V2025-03-05-001-gaofei.sql b/DataBase/版本日志/SGGLDB_V2025-03-05-001-gaofei.sql
new file mode 100644
index 0000000..9da48a6
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2025-03-05-001-gaofei.sql
@@ -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
\ No newline at end of file
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index 63e2e63..ceeee26 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -378,6 +378,7 @@
+
diff --git a/SGGL/BLL/CQMS/QuantityManagement/BaseApproveService.cs b/SGGL/BLL/CQMS/QuantityManagement/BaseApproveService.cs
new file mode 100644
index 0000000..f44caff
--- /dev/null
+++ b/SGGL/BLL/CQMS/QuantityManagement/BaseApproveService.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;
+ ///
+ /// 获取工程量基础表模板列表
+ ///
+ ///
+ ///
+ ///
+ 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);
+ }
+ ///
+ /// 根据工程量基础表编号删除对应的所有工程量基础表审批信息
+ ///
+ /// 工程量基础表编号
+ 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();
+ }
+ ///
+ /// 获取登录人的通知信息
+ ///
+ ///
+ ///
+ ///
+ 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();
+ }
+ }
+ ///
+ /// 更新通知信息提醒
+ ///
+ ///
+ ///
+ ///
+ 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();
+ }
+ }
+ }
+ ///
+ /// 根据工程量基础表编号获取一个工程量基础表审批信息
+ ///
+ /// 工程量基础表编号
+ /// 一个工程量基础表审批实体
+ public static Model.QuantityManagement_BaseApprove GetBaseApproveByBaseId(string BaseId)
+ {
+ return db.QuantityManagement_BaseApprove.FirstOrDefault(x => x.BaseId == BaseId && x.ApproveType != "S" && x.ApproveDate == null);
+ }
+ ///
+ /// 修改工程量基础表审批信息
+ ///
+ /// 工程量基础表审批实体
+ 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();
+ }
+ ///
+ /// 增加工程量基础表审批信息
+ ///
+ /// 工程量基础表审批实体
+ 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;
+ }
+ }
+ ///
+ /// 总包负责人审批信息
+ ///
+ ///
+ ///
+ 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);
+ }
+ }
+}
diff --git a/SGGL/BLL/CQMS/QuantityManagement/BaseService.cs b/SGGL/BLL/CQMS/QuantityManagement/BaseService.cs
index 5876e08..d51c966 100644
--- a/SGGL/BLL/CQMS/QuantityManagement/BaseService.cs
+++ b/SGGL/BLL/CQMS/QuantityManagement/BaseService.cs
@@ -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);
+ }
+ }
+
+ ///
+ /// 根据状态选择下一步办理类型
+ ///
+ ///
+ ///
+ 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;
+ }
}
}
diff --git a/SGGL/BLL/CQMS/QuantityManagement/ChangeService.cs b/SGGL/BLL/CQMS/QuantityManagement/ChangeService.cs
index 6a92ea0..1c20bd5 100644
--- a/SGGL/BLL/CQMS/QuantityManagement/ChangeService.cs
+++ b/SGGL/BLL/CQMS/QuantityManagement/ChangeService.cs
@@ -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();
diff --git a/SGGL/BLL/CQMS/QuantityManagement/DayInputService.cs b/SGGL/BLL/CQMS/QuantityManagement/DayInputService.cs
index c4a93d5..d1ef58a 100644
--- a/SGGL/BLL/CQMS/QuantityManagement/DayInputService.cs
+++ b/SGGL/BLL/CQMS/QuantityManagement/DayInputService.cs
@@ -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();
diff --git a/SGGL/BLL/CQMS/QuantityManagement/DrawingService.cs b/SGGL/BLL/CQMS/QuantityManagement/DrawingService.cs
index 88904f6..e1c27fe 100644
--- a/SGGL/BLL/CQMS/QuantityManagement/DrawingService.cs
+++ b/SGGL/BLL/CQMS/QuantityManagement/DrawingService.cs
@@ -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
}
}
+ ///
+ /// 图纸登记下拉框
+ ///
+ /// 下拉框名字
+ /// 是否显示请选择
+ 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);
+ }
+ }
+
///
/// 根据项目Id获取图纸登记下拉选择项
///
@@ -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;
}
}
+
+ ///
+ /// 根据项目Id获取图纸登记下拉选择项
+ ///
+ ///
+ ///
+ 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;
+ }
+ }
}
}
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 5175135..2ccb2d2 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -106,8 +106,21 @@ namespace BLL
///
public const string PersonManageUrl = "File\\Excel\\HJGL_DataIn\\焊工人员导入模板.xls";
+ ///
+ /// 工程量日常统计表导出模板
+ ///
+ public const string DayInputStatisticsTemplateUrl = "File\\Excel\\DataOut\\工程量日常统计表.xlsx";
+
+ ///
+ /// 整体及分类汇总表导出模板
+ ///
+ public const string WorkTeamStatisticsTemplateUrl = "File\\Excel\\DataOut\\整体及分类汇总表.xlsx";
+
+ ///
+ /// 项目内容汇总表导出模板
+ ///
+ public const string ProjectContentStatisticsTemplateUrl = "File\\Excel\\DataOut\\项目内容汇总表.xlsx";
-
///
/// 管道点口日报表
///
@@ -5004,6 +5017,27 @@ namespace BLL
#endregion
+ #region 工程量基础表流程定义
+ ///
+ /// 重新编制
+ ///
+ public const string Base_ReCompile = "0";//总包
+
+ ///
+ /// 编制
+ ///
+ public const string Base_Compile = "1";//总包
+
+ ///
+ /// 审核
+ ///
+ public static string Base_Audit1 = "2";//总包
+
+ ///
+ /// 审批完成
+ ///
+ public static string Base_Complete = "3";
+ #endregion
#region 施工方案及审查流程定义
diff --git a/SGGL/BLL/ProjectData/TeamGroupService.cs b/SGGL/BLL/ProjectData/TeamGroupService.cs
index 4686a00..8e32dc5 100644
--- a/SGGL/BLL/ProjectData/TeamGroupService.cs
+++ b/SGGL/BLL/ProjectData/TeamGroupService.cs
@@ -127,6 +127,20 @@ namespace BLL
orderby x.TeamGroupCode select x).ToList();
}
+ ///
+ /// 根据项目ID获取班组下拉选择项
+ ///
+ ///
+ ///
+ ///
+ 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 表下拉框
///
/// 表下拉框
@@ -146,6 +160,25 @@ namespace BLL
}
#endregion
+ #region 表下拉框
+ ///
+ /// 表下拉框
+ ///
+ /// 下拉框名字
+ /// 是否显示请选择
+ 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 表下拉框
///
/// 表下拉框
diff --git a/SGGL/BLL/SysManage/UserService.cs b/SGGL/BLL/SysManage/UserService.cs
index 8e8f2ca..936086d 100644
--- a/SGGL/BLL/SysManage/UserService.cs
+++ b/SGGL/BLL/SysManage/UserService.cs
@@ -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 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;
}
}
-
+
///
/// ĿźͽɫIdȡûѡ
///
///
- public static List GetUserListByProjectIdUnitIdRoleId(string projectId,string unitId, string roleIds)
+ public static List 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
}
}
+ ///
+ /// û
+ ///
+ ///
+ /// Ŀid
+ /// Ƿʾѡ
+ 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);
+ }
+ }
+
///
/// յλѯû
///
@@ -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
{
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Base.aspx b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Base.aspx
index 349fb4d..748e3e6 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Base.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Base.aspx
@@ -51,6 +51,9 @@
+
+
@@ -60,12 +63,24 @@
-
-
+
+
+
+
+
+
+
+
+
+
@@ -100,6 +115,9 @@
+
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Base.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Base.aspx.cs
index e490aeb..c9fd669 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Base.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Base.aspx.cs
@@ -29,9 +29,7 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
///
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 listStr = new List();
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, "查看 - ")));
+ }
}
///
@@ -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
+
+ ///
+ /// 把状态转换代号为文字形式
+ ///
+ ///
+ ///
+ 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 "";
+ }
+ //
+ //获取办理人姓名
+ //
+ //
+ //
+ 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 "";
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Base.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Base.aspx.designer.cs
index e6c8102..9f55fb6 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Base.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Base.aspx.designer.cs
@@ -120,6 +120,24 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
///
protected global::System.Web.UI.WebControls.Label lblPageIndex;
+ ///
+ /// labState 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label labState;
+
+ ///
+ /// lbAuditMan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lbAuditMan;
+
///
/// ToolbarText1 控件。
///
@@ -183,6 +201,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
///
protected global::FineUIPro.MenuButton btnMenuModify;
+ ///
+ /// btnMenuView 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuView;
+
///
/// btnMenuDel 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseDataIn.aspx.cs
index 59903e8..bd1ddd7 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseDataIn.aspx.cs
@@ -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
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseEdit.aspx b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseEdit.aspx
index edb5be9..8451373 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseEdit.aspx
@@ -33,8 +33,70 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseEdit.aspx.cs
index 78286d3..4c10479 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseEdit.aspx.cs
@@ -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;
}
}
+
+ ///
+ /// 办理类型
+ ///
+ 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
+ ///
+ /// 待办事项的下拉框的处理
+ ///
+ public void HandleType()
+ {
+ drpHandleType.Items.Clear();
+ BaseService.Init(drpHandleType, State, false);
+ string res = null;
+ List list = new List();
+ list.Add(Const.Base_ReCompile);
+ var count = drpHandleType.Items.Count;
+ List listitem = new List();
+ 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();
+ }
+ }
+
+ ///
+ /// 办理人员的自动筛选
+ ///
+ 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
+
+ ///
+ /// 把状态转换代号为文字形式
+ ///
+ ///
+ ///
+ 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 "";
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseEdit.aspx.designer.cs
index d8bedb9..5cf2666 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseEdit.aspx.designer.cs
@@ -103,13 +103,103 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
protected global::FineUIPro.NumberBox txtAmount;
///
- /// txtWorkTeam 控件。
+ /// drpWorkTeam 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox txtWorkTeam;
+ protected global::FineUIPro.DropDownList drpWorkTeam;
+
+ ///
+ /// ContentPanel5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel ContentPanel5;
+
+ ///
+ /// Form5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form5;
+
+ ///
+ /// rblIsAgree 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblIsAgree;
+
+ ///
+ /// drpHandleType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpHandleType;
+
+ ///
+ /// drpHandleMan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpHandleMan;
+
+ ///
+ /// plApprove1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow plApprove1;
+
+ ///
+ /// txtOpinions 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtOpinions;
+
+ ///
+ /// plApprove2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow plApprove2;
+
+ ///
+ /// gvApprove 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid gvApprove;
+
+ ///
+ /// lbtype 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lbtype;
///
/// Toolbar1 控件。
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseView.aspx b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseView.aspx
new file mode 100644
index 0000000..0ac8f8b
--- /dev/null
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseView.aspx
@@ -0,0 +1,74 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BaseView.aspx.cs" Inherits="FineUIPro.Web.CQMS.QuantityManagement.BaseView" %>
+
+
+
+
+
+
+ 编辑工程量基础表
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseView.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseView.aspx.cs
new file mode 100644
index 0000000..65efb64
--- /dev/null
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseView.aspx.cs
@@ -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 定义变量
+ ///
+ /// 主键
+ ///
+ public string BaseId
+ {
+ get
+ {
+ return (string)ViewState["BaseId"];
+ }
+ set
+ {
+ ViewState["BaseId"] = value;
+ }
+ }
+
+ ///
+ /// 办理类型
+ ///
+ public string State
+ {
+ get
+ {
+ return (string)ViewState["State"];
+ }
+ set
+ {
+ ViewState["State"] = value;
+ }
+ }
+ #endregion
+
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ 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 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ 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
+
+ ///
+ /// 把状态转换代号为文字形式
+ ///
+ ///
+ ///
+ 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 "";
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseView.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseView.aspx.designer.cs
new file mode 100644
index 0000000..ebe83ca
--- /dev/null
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/BaseView.aspx.designer.cs
@@ -0,0 +1,150 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.CQMS.QuantityManagement {
+
+
+ public partial class BaseView {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// drpDrawingNo 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpDrawingNo;
+
+ ///
+ /// txtWorkSection 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtWorkSection;
+
+ ///
+ /// txtDrawingName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtDrawingName;
+
+ ///
+ /// txtPart 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtPart;
+
+ ///
+ /// txtProjectContent 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProjectContent;
+
+ ///
+ /// txtUnit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtUnit;
+
+ ///
+ /// txtAmount 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtAmount;
+
+ ///
+ /// drpWorkTeam 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpWorkTeam;
+
+ ///
+ /// plApprove2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow plApprove2;
+
+ ///
+ /// gvApprove 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid gvApprove;
+
+ ///
+ /// lbtype 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lbtype;
+
+ ///
+ /// WindowAtt 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window WindowAtt;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Change.aspx b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Change.aspx
index 0c8edc9..9ba6616 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Change.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/Change.aspx
@@ -6,6 +6,43 @@
变更登记
+
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 listStr = new List();
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
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/ChangeEdit.aspx b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/ChangeEdit.aspx
index d4aed53..3427439 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/ChangeEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/ChangeEdit.aspx
@@ -14,29 +14,38 @@
-
-
+
+
-
-
+
+
+
-
+
+ LabelAlign="right" LabelWidth="140px">
-
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/ChangeEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/ChangeEdit.aspx.cs
index 43dfd8a..96e7f49 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/ChangeEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/ChangeEdit.aspx.cs
@@ -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
///
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))
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/ChangeEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/ChangeEdit.aspx.designer.cs
index 819b02b..19b7f64 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/ChangeEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/ChangeEdit.aspx.designer.cs
@@ -67,13 +67,13 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
protected global::FineUIPro.TextBox txtChangeName;
///
- /// txtMajor 控件。
+ /// drpMajor 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox txtMajor;
+ protected global::FineUIPro.DropDownList drpMajor;
///
/// txtAcceptDate 控件。
@@ -85,13 +85,22 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
protected global::FineUIPro.DatePicker txtAcceptDate;
///
- /// txtCompletionStatus 控件。
+ /// cbCompletionStatus 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox txtCompletionStatus;
+ protected global::FineUIPro.CheckBox cbCompletionStatus;
+
+ ///
+ /// cbCompletionStatus2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.CheckBox cbCompletionStatus2;
///
/// txtDutyPerson 控件。
@@ -111,6 +120,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
///
protected global::FineUIPro.TextBox txtRemark;
+ ///
+ /// drpDrawingNo 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpDrawingNo;
+
///
/// Panel2 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInput.aspx b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInput.aspx
index f6e31dd..e945ae9 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInput.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInput.aspx
@@ -15,7 +15,7 @@
@@ -60,10 +60,10 @@
-
-
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 listStr = new List();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputEdit.aspx b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputEdit.aspx
index 16591a1..dff4802 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputEdit.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputEdit.aspx
@@ -15,7 +15,7 @@
-
+
@@ -23,20 +23,21 @@
-
+
-
+
-
-
+
+
+
@@ -47,12 +48,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputEdit.aspx.cs
index 0af5155..36e8776 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputEdit.aspx.cs
@@ -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 附件上传
+ ///
+ /// 附件上传
+ ///
+ ///
+ ///
+ 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
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputEdit.aspx.designer.cs
index a2aba5c..519fe96 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputEdit.aspx.designer.cs
@@ -103,13 +103,13 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
protected global::FineUIPro.NumberBox txtAmount;
///
- /// txtWorkTeam 控件。
+ /// drpWorkTeam 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox txtWorkTeam;
+ protected global::FineUIPro.DropDownList drpWorkTeam;
///
/// txtDate 控件。
@@ -129,6 +129,33 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
///
protected global::FineUIPro.NumberBox txtDayAmount;
+ ///
+ /// Panel2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel2;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label1;
+
+ ///
+ /// btnAttach 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnAttach;
+
///
/// Toolbar1 控件。
///
@@ -147,6 +174,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
///
protected global::FineUIPro.HiddenField hdAttachUrl;
+ ///
+ /// hdDayInputId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdDayInputId;
+
///
/// btnSave 控件。
///
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx
index b689fc1..b854c41 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx
@@ -14,19 +14,27 @@
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
-
-
-
+
+
+
+
+
+
+
+
+
@@ -56,7 +64,7 @@
-
-
-
-
+
+
+
@@ -95,7 +103,7 @@
+
+