This commit is contained in:
2026-05-30 11:36:22 +08:00
parent 7b944d66c5
commit e714396c85
12 changed files with 136 additions and 130 deletions
@@ -81,26 +81,15 @@ namespace FineUIPro.Web.HJGL.JoinMarking
if (!string.IsNullOrEmpty(WeldJointId))
{
Model.HJGL_WeldJoint joint = dic[WeldJointId];
Model.WPQ_WPQList list = BLL.WPQListServiceService.GetWPQById(joint.WPQId);
this.txtWpqId.Text = joint.WPQId;
if (joint != null)
{
this.PipelineId = joint.PipelineId;
if (list != null)
{
this.txtWPQCode.Text = list.WPQCode;
this.txtWpqId.Text = list.WPQId;
}
if (Request.Params["Type"] == "add") //插入焊口
{
var baseWeldJoints = BLL.WeldJointService.GetBaseWeldJointsByWeldJointId(WeldJointId);
this.txtWeldJointCode.Text = joint.WeldJointCode + "Z-" + (baseWeldJoints.Count + 1).ToString();
}
else
{
this.txtWeldJointCode.Text = joint.WeldJointCode;
}
this.txtWeldJointCode.Text = joint.WeldJointCode;
if (!string.IsNullOrEmpty(joint.Material1Id))
{
this.drpMaterial1.SelectedValue = joint.Material1Id;
@@ -166,14 +155,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
drpJointAttribute.SelectedValue = joint.JointAttribute;
}
//if (!string.IsNullOrEmpty(joint.Components1Id))
//{
// drpComponent1.SelectedValue = joint.Components1Id;
//}
//if (!string.IsNullOrEmpty(joint.Components2Id))
//{
// drpComponent2.SelectedValue = joint.Components2Id;
//}
this.txtPreTemperature.Text = joint.PreTemperature;
this.txtSpecification.Text = joint.Specification;
txtRemark.Text = joint.Remark;
@@ -181,35 +163,12 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{
drpIsHotProess.SelectedValue = joint.IsHotProess.Value.ToString();
}
//if (!string.IsNullOrEmpty(joint.DesignIsHotProess.ToString()))
//{
// drpDesignIsHotProess.SelectedValue = joint.DesignIsHotProess.Value.ToString();
//}
}
}
else
{
if (!string.IsNullOrEmpty(Request.Params["PipelineId"]))
{
this.PipelineId = Request.Params["PipelineId"];
}
}
Model.View_HJGL_Pipeline pipeline = BLL.PipelineService.GetViewPipelineByPipelineId(this.PipelineId);
if (!string.IsNullOrEmpty(isTwoJoint))
{
//string perfix = txtPipelineCode.Text + "/Z-";
string perfix = pipeline.PipelineCode + "/";
this.txtWeldJointCode.Text = perfix;
// txtWeldJointCode.Text = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_WeldJoint", "WeldJointCode", this.CurrUser.LoginProjectId, perfix);
// txtWeldJointCode.Text = txtWeldJointCode.Text.Replace(perfix, "");
}
}
}
@@ -234,8 +193,6 @@ namespace FineUIPro.Web.HJGL.JoinMarking
return;
}
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.PipelineId);
//PageContext.RegisterStartupScript(Window1.GetSaveStateReference(txtWpqId.ClientID, txtWPQCode.ClientID, drpWeldingRod.ClientID, drpWeldingWire.ClientID, drpWeldingMethodId.ClientID, drpGrooveType.ClientID, txtPreTemperature.ClientID, drpMaterial1.ClientID,drpMaterial2.ClientID,txtIsHotProess.ClientID)
// + Window1.GetShowReference(String.Format("SelectWPS.aspx?Material1={0}&Material2={1}&Dia={2}&Thickness={3}&UnitId={4}&WeldingMethod={5}&WeldType={6}", this.drpMaterial1.SelectedValue, this.drpMaterial2.SelectedValue, this.txtDia.Text, this.txtThickness.Text,pipeline.UnitId,this.drpWeldingMethodId.SelectedText,this.drpWeldTypeCode.SelectedText, "维护 - ")));
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(txtWpqId.ClientID, txtWPQCode.ClientID, drpWeldingRod.ClientID, drpWeldingWire.ClientID, drpWeldingMethodId.ClientID, hdWeldingMethodId.ClientID, drpGrooveType.ClientID, hdGrooveType.ClientID, txtPreTemperature.ClientID, txtIsHotProess.ClientID)
+ Window1.GetShowReference(String.Format("SelectWPS.aspx?Material1={0}&Material2={1}&Dia={2}&Thickness={3}&UnitId={4}&WeldingMethod={5}&WeldType={6}", this.drpMaterial1.SelectedValue, this.drpMaterial2.SelectedValue, this.txtDia.Text, this.txtThickness.Text, pipeline.UnitId, this.drpWeldingMethodId.SelectedText, this.drpWeldTypeCode.SelectedText, "维护 - ")));
}
@@ -249,23 +206,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{
string weldJointCode = string.Empty;
int joint = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
if (joint != 0)
{
if (joint < 10)
{
weldJointCode = "0" + Convert.ToString(joint);
}
else
{
weldJointCode = Convert.ToString(joint);
}
}
else
{
weldJointCode = this.txtWeldJointCode.Text;
}
if (BLL.WeldJointService.IsExistWeldJointCode(weldJointCode, this.PipelineId, WeldJointId))
{
@@ -282,7 +223,6 @@ namespace FineUIPro.Web.HJGL.JoinMarking
/// </summary>
private void SaveData(bool isClosed)
{
// if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.hdWeldingMethodId.Text) || string.IsNullOrEmpty(this.txtWpqId.Text.Trim()))
if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("页面必填项不能为空", MessageBoxIcon.Warning);
@@ -294,24 +234,10 @@ namespace FineUIPro.Web.HJGL.JoinMarking
joint.PipelineId = this.PipelineId;
joint.ProjectId = this.CurrUser.LoginProjectId;
//if (!this.txtWeldJointCode.Text.Contains("G"))
//{
int jointCode = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
if (jointCode != 0)
{
if (jointCode < 10)
{
joint.WeldJointCode = "0" + Convert.ToString(jointCode);
}
else
{
joint.WeldJointCode = Convert.ToString(jointCode);
}
}
else
{
joint.WeldJointCode = this.txtWeldJointCode.Text;
}
joint.WeldJointCode = this.txtWeldJointCode.Text;
//}
//else
//{