20250318 质量优化

This commit is contained in:
2025-03-18 21:54:11 +08:00
parent 5fa3744594
commit 94b3b15b35
12 changed files with 435 additions and 95 deletions
@@ -28,7 +28,7 @@
<f:FormRow ColumnWidths="50% 25% 25%">
<Items>
<f:TextBox ID="txtInspectionName" runat="server" Label="名称" MaxLength="300" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:TextBox ID="txtSpecifications" runat="server" Label="规格" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:TextBox ID="txtSpecifications" runat="server" Label="规格" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:DropDownList ID="drpEquipmentOrMatail" runat="server" Label="设备/材料" LabelAlign="Right" ShowRedStar="true" LabelWidth="120px">
<f:ListItem Value="设备" Text="设备" />
<f:ListItem Value="材料" Text="材料" />
@@ -38,7 +38,7 @@
<f:FormRow ColumnWidths="50% 25% 25%">
<Items>
<f:TextBox ID="txtSupplier" runat="server" Label="供货厂商" MaxLength="300" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:NumberBox ID="txtCounts" Label="本次数量" runat="server" NoDecimal="false" DecimalPrecision="3" NoNegative="true" LabelAlign="Right" LabelWidth="120px">
<f:NumberBox ID="txtCounts" Label="本次数量" runat="server" NoDecimal="false" DecimalPrecision="3" NoNegative="true" LabelAlign="Right" LabelWidth="120px">
</f:NumberBox>
<f:TextBox ID="txtUnit" runat="server" Label="单位" MaxLength="50" LabelAlign="Right" LabelWidth="70px"></f:TextBox>
</Items>
@@ -74,7 +74,7 @@
<f:Panel ID="Panel2" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
<Items>
<f:Label ID="Label1" runat="server" Label="上传附件"
LabelWidth="120px" LabelAlign="Right">
LabelWidth="150px" LabelAlign="Right">
</f:Label>
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click">
</f:Button>
@@ -109,9 +109,7 @@
</Items>
</f:FormRow>
--%>
--%>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
@@ -121,7 +119,7 @@
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click" Hidden="true">
</f:Button>
<%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
<%--<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Text="提交" ToolTip="提交" OnClick="btnSubmit_Click" ValidateForms="SimpleForm1">
</f:Button>--%>
</Items>
</f:Toolbar>
@@ -1,5 +1,6 @@
using BLL;
using BLL.CQMS.Comprehensive;
using FineUIPro.Web.Comprehensive;
using System;
using System.Linq;
@@ -46,7 +47,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var inspectionEquipment = BLL.InspectionEquipmentService.GetInspectionEquipmentById(this.InspectionEquipmentId);
if (inspectionEquipment != null)
{
this.InspectionEquipmentId = inspectionEquipment.InspectionEquipmentId;
this.InspectionEquipmentId = inspectionEquipment.InspectionEquipmentId;
this.hdAttachUrl.Text = this.InspectionEquipmentId;
if (!string.IsNullOrEmpty(inspectionEquipment.UnitId))
{
this.drpUnitId.SelectedValue = inspectionEquipment.UnitId;
@@ -287,7 +289,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
if (string.IsNullOrEmpty(this.InspectionEquipmentId))
{ newInspectionEquipment.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson));
{
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
{
newInspectionEquipment.InspectionEquipmentId = this.hdAttachUrl.Text;
}
else
{
newInspectionEquipment.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson));
this.hdAttachUrl.Text = newInspectionEquipment.InspectionEquipmentId;
}
newInspectionEquipment.CompileMan = this.CurrUser.UserId;
newInspectionEquipment.CompileDate = DateTime.Now;
newInspectionEquipment.Status = BLL.Const.Comprehensive_Compile;
@@ -502,18 +513,18 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="e"></param>
protected void btnAttach_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.InspectionEquipmentId)) //新增记录
if (string.IsNullOrEmpty(this.hdAttachUrl.Text)) //新增记录
{
this.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment));
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment));
}
//var oldInspectionEquipment = Funs.DB.Comprehensive_InspectionEquipment.Where(u => u.InspectionEquipmentId == this.InspectionEquipmentId).FirstOrDefault();
//if (oldInspectionEquipment.Status == BLL.Const.Comprehensive_Complete)
//Model.Comprehensive_InspectionPerson inspectionPerson = BLL.InspectionPersonService.GetInspectionPersonById(this.InspectionPersonId);
//if (inspectionPerson.Status == BLL.Const.Comprehensive_Complete)
//{
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/InspectionEquipment&menuId={1}", this.InspectionEquipmentId, BLL.Const.InspectionEquipmentMenuId)));
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/inspectionPerson&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionPersonMenuId)));
//}
//else
//{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/InspectionEquipment&menuId={1}", this.InspectionEquipmentId, BLL.Const.InspectionEquipmentMenuId)));
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/InspectionEquipment&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionEquipmentMenuId)));
//}
}
#endregion
@@ -22,7 +22,7 @@
<Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="sdrpUnitId" runat="server" Label="报验单位" LabelAlign="Right">
<f:DropDownList ID="sdrpUnitId" runat="server" Label="接收单位" LabelAlign="Right">
</f:DropDownList>
<f:DropDownList ID="drpProfessionalId" runat="server" Label="专业" LabelAlign="Right" LabelWidth="60px"></f:DropDownList>
<f:TextBox runat="server" ID="txtNCRCode" Label="NCR单号" LabelAlign="Right"></f:TextBox>
@@ -41,8 +41,8 @@ namespace FineUIPro.Web.Comprehensive
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (sdrpUnitId.SelectedValue != BLL.Const._Null)
{
strSql += " AND C.SendUnit=@UnitId";
listStr.Add(new SqlParameter("@UnitId", sdrpUnitId.SelectedValue));
strSql += " AND C.ReceiveUnit like @UnitId";
listStr.Add(new SqlParameter("@UnitId", "%" + sdrpUnitId.SelectedValue + "%"));
}
if (this.drpProfessionalId.SelectedValue != BLL.Const._Null)
{
@@ -348,7 +348,7 @@ namespace FineUIPro.Web.Comprehensive
select x);
if (sdrpUnitId.SelectedValue != BLL.Const._Null)
{
lists = lists.Where(x => x.SendUnit == sdrpUnitId.SelectedValue);
lists = lists.Where(x => x.ReceiveUnit.Contains(sdrpUnitId.SelectedValue));
}
if (this.drpProfessionalId.SelectedValue != BLL.Const._Null)
{
@@ -49,6 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
if (specialEquipment != null)
{
this.SpecialEquipmentId = specialEquipment.SpecialEquipmentId;
this.hdAttachUrl.Text = this.SpecialEquipmentId;
if (!string.IsNullOrEmpty(specialEquipment.UnitId))
{
this.drpUnit.SelectedValue = specialEquipment.UnitId;