提交代码

This commit is contained in:
2023-11-28 10:59:50 +08:00
parent de0a1d28d3
commit db46ed8cd1
18 changed files with 402 additions and 191 deletions
@@ -116,7 +116,7 @@
</f:RegionPanel>
<f:Window ID="Window1" Title="导入" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true"
Width="800px" Height="460px" OnClose="Window1_Close">
Width="1000px" Height="460px" OnClose="Window1_Close">
</f:Window>
</form>
<script type="text/javascript">
@@ -17,7 +17,7 @@
<Items>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="数据导入" ValidateForms="SimpleForm1"
OnClick="btnAudit_Click" >
OnClick="btnAudit_Click">
</f:Button>
<f:Button ID="btnSave" ToolTip="保存" Icon="SystemSaveNew" runat="server" Text=""
OnClick="btnSave_Click">
@@ -44,7 +44,7 @@
PageSize="200" Hidden="true">
<Columns>
<f:RenderField Width="200px" ColumnID="PackageContent" DataField="PackageContent" FieldType="String"
<f:RenderField Width="100px" ColumnID="PackageContent" DataField="PackageContent" FieldType="String"
HeaderText="第2级" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField HeaderText="定制" ColumnID="SuperWorkPack" DataField="SuperWorkPack" SortField="SuperWorkPack"
@@ -54,6 +54,24 @@
</f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField Width="80px" ColumnID="Unit" DataField="Unit" FieldType="String"
HeaderText="单位" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="PlanProjectQuantity" DataField="PlanProjectQuantity" FieldType="Double"
HeaderText="概算工程量" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="DrawProjectQuantity" DataField="DrawProjectQuantity" FieldType="Double"
HeaderText="图纸工程量" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="RealProjectQuantity" DataField="RealProjectQuantity" FieldType="Double"
HeaderText="实际工程量" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="PlanStartDate" DataField="PlanStartDate" FieldType="Date"
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="计划开始时间" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="PlanEndDate" DataField="PlanEndDate" FieldType="Date"
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="计划完成时间" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
@@ -200,6 +200,11 @@ namespace FineUIPro.Web.CQMS.WBS
string result = string.Empty;
string col0 = pds.Rows[i][0].ToString().Trim();
string col1 = pds.Rows[i][1].ToString().Trim();
string col3 = pds.Rows[i][3].ToString().Trim();
string col4 = pds.Rows[i][4].ToString().Trim();
string col5 = pds.Rows[i][5].ToString().Trim();
string col6 = pds.Rows[i][6].ToString().Trim();
string col7 = pds.Rows[i][7].ToString().Trim();
if (!string.IsNullOrEmpty(col0))
{
if (string.IsNullOrEmpty(col0))
@@ -234,6 +239,66 @@ namespace FineUIPro.Web.CQMS.WBS
result += "第" + (i + 2).ToString() + "行," + "定制输入值有误!" + "|";
}
if (!string.IsNullOrEmpty(col3))
{
try
{
newWorkPackage.PlanProjectQuantity = Convert.ToDecimal(col3);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "概算工程量输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col4))
{
try
{
newWorkPackage.DrawProjectQuantity = Convert.ToDecimal(col4);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "图纸工程量输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col5))
{
try
{
newWorkPackage.RealProjectQuantity = Convert.ToDecimal(col5);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "实际工程量输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col6))
{
try
{
newWorkPackage.PlanStartDate = Convert.ToDateTime(col6);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "计划开始时间输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col7))
{
try
{
newWorkPackage.PlanEndDate = Convert.ToDateTime(col7);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "计划完成时间输入值有误!" + "|";
}
}
ViewWorkPackages.Add(newWorkPackage);
}
if (!string.IsNullOrEmpty(result))
@@ -387,6 +452,12 @@ namespace FineUIPro.Web.CQMS.WBS
string result = string.Empty;
string col0 = pds.Rows[i][0].ToString().Trim();
string col1 = pds.Rows[i][1].ToString().Trim();
string col2 = pds.Rows[i][2].ToString().Trim();
string col3 = pds.Rows[i][3].ToString().Trim();
string col4 = pds.Rows[i][4].ToString().Trim();
string col5 = pds.Rows[i][5].ToString().Trim();
string col6 = pds.Rows[i][6].ToString().Trim();
string col7 = pds.Rows[i][7].ToString().Trim();
if (!string.IsNullOrEmpty(col0))
{
if (string.IsNullOrEmpty(col0))
@@ -421,6 +492,68 @@ namespace FineUIPro.Web.CQMS.WBS
result += "第" + (i + 2).ToString() + "行," + "定制输入值有误!" + "|";
}
newWorkPackage.Unit = col2;
if (!string.IsNullOrEmpty(col3))
{
try
{
newWorkPackage.PlanProjectQuantity = Convert.ToDecimal(col3);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "概算工程量输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col4))
{
try
{
newWorkPackage.DrawProjectQuantity = Convert.ToDecimal(col4);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "图纸工程量输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col5))
{
try
{
newWorkPackage.RealProjectQuantity = Convert.ToDecimal(col5);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "实际工程量输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col6))
{
try
{
newWorkPackage.PlanStartDate = Convert.ToDateTime(col6);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "计划开始时间输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col7))
{
try
{
newWorkPackage.PlanEndDate = Convert.ToDateTime(col7);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "计划完成时间输入值有误!" + "|";
}
}
ViewWorkPackages.Add(newWorkPackage);
if (!string.IsNullOrEmpty(result))
{
@@ -470,6 +603,12 @@ namespace FineUIPro.Web.CQMS.WBS
Model.WBS_WorkPackage oldWorkPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(workPackageId);
string workPackageCode2 = this.Grid1.Rows[i].DataKeys[1].ToString();
string txtName = values.Value<string>("SuperWorkPack");
string Unit = values.Value<string>("Unit");
string PlanProjectQuantity = values.Value<string>("PlanProjectQuantity");
string DrawProjectQuantity = values.Value<string>("DrawProjectQuantity");
string RealProjectQuantity = values.Value<string>("RealProjectQuantity");
string PlanStartDate = values.Value<string>("PlanStartDate");
string PlanEndDate = values.Value<string>("PlanEndDate");
Model.WBS_WorkPackageProject workPackageProject = BLL.WorkPackageProjectService.GetWorkPackageProjectByWorkPackageCode(workPackageCode2, this.CurrUser.LoginProjectId);
if (oldWorkPackage == null) //新增内容
{
@@ -522,6 +661,12 @@ namespace FineUIPro.Web.CQMS.WBS
newWorkPackage.ProjectType = workPackageProject.ProjectType;
newWorkPackage.InitWorkPackageCode = workPackageProject.WorkPackageCode;
newWorkPackage.IsApprove = true;
newWorkPackage.Unit = Unit;
newWorkPackage.PlanProjectQuantity = Funs.GetNewDecimal(PlanProjectQuantity);
newWorkPackage.DrawProjectQuantity = Funs.GetNewDecimal(DrawProjectQuantity);
newWorkPackage.RealProjectQuantity = Funs.GetNewDecimal(RealProjectQuantity);
newWorkPackage.PlanStartDate = Funs.GetNewDateTime(PlanStartDate);
newWorkPackage.PlanEndDate = Funs.GetNewDateTime(PlanEndDate);
BLL.WorkPackageService.AddWorkPackage(newWorkPackage);
num++;
}