This commit is contained in:
2025-09-18 10:21:25 +08:00
22 changed files with 554 additions and 263 deletions
@@ -933,7 +933,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
}
}
numberIndex = 1;
int? num1 = 0, num2 = 0;
int? num1 = 0, num2 = 0, num3 = 0, num4 = 0;
foreach (var item in pqrList)
{
//创建行
@@ -942,10 +942,14 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width, "", "", "unit"));
row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity3.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
row.Cells.Add(CreateCell(item.Quantity4.ToString(), doc, table.FirstRow.Cells[5].CellFormat.Width));
row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[6].CellFormat.Width));
table.Rows.Insert(numberIndex, row);
num1 += item.Quantity1;
num2 += item.Quantity2;
num3 += item.Quantity3;
num4 += item.Quantity4;
numberIndex += 1;
}
//自动设置表格样式
@@ -957,7 +961,9 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width, "", "", "unit"));
rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width));
rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width));
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width));
rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width));
rowhj.Cells.Add(CreateCell(num4.ToString(), doc, table.FirstRow.Cells[5].CellFormat.Width));
rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[6].CellFormat.Width));
table.Rows.Insert(numberIndex, rowhj);
//自动设置表格样式
@@ -709,21 +709,36 @@
</Editor>
</f:RenderField>
<f:RenderField Width="130px" ColumnID="Quantity1" DataField="Quantity1"
FieldType="int" HeaderTextAlign="Center" TextAlign="Left" HeaderText="PQR批准批次">
<f:RenderField Width="140px" ColumnID="Quantity1" DataField="Quantity1"
FieldType="int" HeaderTextAlign="Center" TextAlign="Left" HeaderText="本月PQR批准批次">
<Editor>
<f:NumberBox ID="TextBox7" runat="server" NoDecimal="true" NoNegative="true">
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="130px" ColumnID="Quantity2" DataField="Quantity2"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="WPS批准数量">
<f:RenderField Width="140px" ColumnID="Quantity2" DataField="Quantity2"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="累计PQR批准批次">
<Editor>
<f:NumberBox ID="TextBox8" runat="server" NoDecimal="true" NoNegative="true">
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="140px" ColumnID="Quantity3" DataField="Quantity3"
FieldType="int" HeaderTextAlign="Center" TextAlign="Left" HeaderText="本月WPS批准数量">
<Editor>
<f:NumberBox ID="NumberBox1" runat="server" NoDecimal="true" NoNegative="true">
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="140px" ColumnID="Quantity4" DataField="Quantity4"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="累计WPS批准数量">
<Editor>
<f:NumberBox ID="NumberBox2" runat="server" NoDecimal="true" NoNegative="true">
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="250px" ColumnID="Remarks" DataField="Remarks"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="备注">
@@ -1097,6 +1097,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{ "UnitOrMajor",""},
{ "Quantity1", "" },
{ "Quantity2","" },
{ "Quantity3", "" },
{ "Quantity4","" },
{ "Remarks", "" },
{ "Delete9", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", GetDeleteScriptGrid9(), IconHelper.GetResolvedIconUrl(Icon.Delete)) }
};
@@ -1128,19 +1130,23 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
void OutPutSummaryGrid9()
{
DataTable source = ObjectToTable(Grid9.DataSource);
int Quantity1Total = 0, Quantity2Total = 0;
int Quantity1Total = 0, Quantity2Total = 0, Quantity3Total = 0, Quantity4Total = 0;
if (source != null)
{
foreach (DataRow row in source.Rows)
{
Quantity1Total += Convert.ToInt32(row["Quantity1"]);
Quantity2Total += Convert.ToInt32(row["Quantity2"]);
Quantity3Total += Convert.ToInt32(row["Quantity3"]);
Quantity4Total += Convert.ToInt32(row["Quantity4"]);
}
JObject summary = new JObject();
summary.Add("UnitOrMajor", "合计");
summary.Add("Quantity1", Quantity1Total.ToString());
summary.Add("Quantity2", Quantity2Total.ToString());
summary.Add("Quantity3", Quantity3Total.ToString());
summary.Add("Quantity4", Quantity4Total.ToString());
Grid9.SummaryData = summary;
}
@@ -3232,6 +3238,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
UnitOrMajor = values.Value<string>("UnitOrMajor"),
Quantity1 = Funs.GetNewIntOrZero(values.Value<string>("Quantity1")),
Quantity2 = Funs.GetNewIntOrZero(values.Value<string>("Quantity2")),
Quantity3 = Funs.GetNewIntOrZero(values.Value<string>("Quantity3")),
Quantity4 = Funs.GetNewIntOrZero(values.Value<string>("Quantity4")),
Remarks = values.Value<string>("Remarks"),
};
//if (Grid9.Rows[rowIndex].DataKeys.Length > 0)
File diff suppressed because it is too large Load Diff
@@ -129,7 +129,7 @@
<Items>
<f:DropDownList ID="drpProjectType" Label="项目类型" runat="server">
</f:DropDownList>
<f:DropDownList ID="drpProjectState" runat="server" Label="项目状态" LabelAlign="Right" >
<f:DropDownList ID="drpProjectState" runat="server" Label="项目状态" LabelAlign="Right">
<f:ListItem Text="在建" Value="1" Selected="true" />
<f:ListItem Text="停工" Value="2" />
<f:ListItem Text="竣工" Value="3" />
@@ -255,24 +255,24 @@
<Rows>
<f:FormRow>
<Items>
<f:DropDownList ID="drpProjectManager" runat="server" Label="项目经理"
EnableEdit="true" Required="true" ShowRedStar="true">
<f:DropDownList ID="drpProjectSupervisor" runat="server" Label="项目主管" EnableEdit="true" Required="true" ShowRedStar="true">
</f:DropDownList>
<f:DropDownList ID="drpConstructionManager" runat="server" Label="施工经理" LabelWidth="150px" EnableEdit="true">
<f:DropDownList ID="drpProjectManager" runat="server" Label="项目经理" EnableEdit="true" Required="true" ShowRedStar="true">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpQAManager" runat="server" Label="质量经理"
EnableEdit="true" Required="true" ShowRedStar="true">
<f:DropDownList ID="drpHSSEManager" runat="server" Label="安全经理" EnableEdit="true" Required="true" ShowRedStar="true">
</f:DropDownList>
<f:DropDownList ID="drpHSSEManager" runat="server" Label="安全经理" LabelWidth="150px" EnableEdit="true">
<f:DropDownList ID="drpQAManager" runat="server" Label="质量经理" EnableEdit="true" Required="true" ShowRedStar="true">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpConstructionManager" runat="server" Label="施工经理" EnableEdit="true">
</f:DropDownList>
<f:DropDownList ID="drpDriveManager" runat="server" Label="开车经理" EnableEdit="true">
</f:DropDownList>
</Items>
@@ -57,6 +57,8 @@ namespace FineUIPro.Web.ProjectData
{
this.ProjectId = this.CurrUser.LoginProjectId;
}
///项目主管
UserService.InitUserDropDownList(this.drpProjectSupervisor, string.Empty, true);
///项目经理
UserService.InitUserDropDownList(this.drpProjectManager, string.Empty, true);
///施工经理
@@ -123,6 +125,12 @@ namespace FineUIPro.Web.ProjectData
var getPUser = Funs.DB.Project_ProjectUser.Where(x => x.ProjectId == this.ProjectId);
if (getPUser.Count() > 0)
{
///项目主管
var s = getPUser.FirstOrDefault(x => x.RoleId.Contains(BLL.Const.ProjectSupervisor));
if (s != null)
{
this.drpProjectSupervisor.SelectedValue = s.UserId;
}
///项目经理
var m = getPUser.FirstOrDefault(x => x.RoleId.Contains(BLL.Const.ProjectManager));
if (m != null)
@@ -490,7 +498,8 @@ namespace FineUIPro.Web.ProjectData
/// </summary>
/// <param name="projectId"></param>
private void SetProjectManager(string projectId)
{
{
string newProjectSupervisor = this.drpProjectSupervisor.SelectedValue;
string newProjectManager = this.drpProjectManager.SelectedValue;
string newConstructionManager = this.drpConstructionManager.SelectedValue;
string newHSSEManager = this.drpHSSEManager.SelectedValue;
@@ -499,6 +508,48 @@ namespace FineUIPro.Web.ProjectData
var project = BLL.ProjectService.GetProjectByProjectId(projectId);
if (project != null)
{
#region
string OldProjectSupervisor = string.Empty; ////项目主管
var s = Funs.DB.Project_ProjectUser.FirstOrDefault(x => x.ProjectId == projectId && x.RoleId.Contains(BLL.Const.ProjectSupervisor));
if (s != null)
{
OldProjectSupervisor = s.UserId;
}
////此人不在项目中
if (!string.IsNullOrEmpty(newProjectSupervisor) && newProjectSupervisor != Const._Null && newProjectSupervisor != OldProjectSupervisor)
{
BLL.ProjectUserService.DeleteProjectUserByProjectIdUserId(projectId, newProjectSupervisor);
BLL.ProjectUserService.DeleteProjectUserByProjectIdUserId(projectId, OldProjectSupervisor);
var user = BLL.UserService.GetUserByUserId(newProjectSupervisor);
if (user != null && !string.IsNullOrEmpty(user.UnitId))
{
var punit = BLL.ProjectUnitService.GetProjectUnitByUnitIdProjectId(projectId, user.UnitId);
if (punit == null) ///项目单位为空时要增加项目单位
{
Model.Project_ProjectUnit newProjectUnit = new Project_ProjectUnit
{
ProjectId = projectId,
UnitId = user.UnitId,
InTime = System.DateTime.Now
};
BLL.ProjectUnitService.AddProjectUnit(newProjectUnit);
}
Model.Project_ProjectUser newProjectUser = new Model.Project_ProjectUser
{
ProjectId = projectId,
UserId = newProjectSupervisor,
UnitId = user.UnitId,
RoleId = BLL.Const.ProjectSupervisor,
IsPost = true
};
BLL.ProjectUserService.AddProjectUser(newProjectUser);
}
}
#endregion
#region
string OldProjectManager = string.Empty; ////项目经理
@@ -500,6 +500,15 @@ namespace FineUIPro.Web.ProjectData
/// </remarks>
protected global::FineUIPro.Form Form3;
/// <summary>
/// drpProjectSupervisor 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProjectSupervisor;
/// <summary>
/// drpProjectManager 控件。
/// </summary>
@@ -510,13 +519,13 @@ namespace FineUIPro.Web.ProjectData
protected global::FineUIPro.DropDownList drpProjectManager;
/// <summary>
/// drpConstructionManager 控件。
/// drpHSSEManager 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpConstructionManager;
protected global::FineUIPro.DropDownList drpHSSEManager;
/// <summary>
/// drpQAManager 控件。
@@ -528,13 +537,13 @@ namespace FineUIPro.Web.ProjectData
protected global::FineUIPro.DropDownList drpQAManager;
/// <summary>
/// drpHSSEManager 控件。
/// drpConstructionManager 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpHSSEManager;
protected global::FineUIPro.DropDownList drpConstructionManager;
/// <summary>
/// drpDriveManager 控件。
+1 -1
View File
@@ -47,7 +47,7 @@
<f:Button ID="btnImport" ToolTip="导入" Icon="ApplicationAdd" Hidden="true" runat="server"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnUpdata" Text="推送督查人员" Icon="PageSave" runat="server" ConfirmText="确定推送?"
<f:Button ID="btnUpdata" Text="推送集团检查负责人" Icon="PageSave" runat="server" ConfirmText="确定推送?"
ToolTip="推送" ValidateForms="SimpleForm1" OnClick="btnPush_Click" MarginRight="10px">
</f:Button>
</Items>
@@ -84,7 +84,7 @@
<items>
<f:DropDownList ID="drpCertificate" runat="server" Label="特岗证书" LabelAlign="Right" LabelWidth="90px" EnableEdit="true" EnableCheckBoxSelect="True" EnableMultiSelect="True" EmptyText="--请选择--" AutoSelectFirstItem="false" >
</f:DropDownList>
<f:CheckBox runat="server" Label="是否督查人员" LabelAlign="Right" ID="cbIsInspectionBrigade" LabelWidth="100px" />
<f:CheckBox runat="server" Label="是否是集团检查整改负责人" LabelAlign="Right" ID="cbIsInspectionBrigade" LabelWidth="200px" />
</items>
</f:FormRow>
</Rows>