feat(hjgl): 完善焊接任务与质量管理流程
This commit is contained in:
@@ -97,10 +97,16 @@ namespace FineUIPro.Web.CLGL
|
||||
CreateUser = CurrUser.PersonId
|
||||
};
|
||||
|
||||
AntiCorrosionCheckId = APIPreWeldInspectionService.SaveAntiCorrosionCheck(item);
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
try
|
||||
{
|
||||
AntiCorrosionCheckId = APIPreWeldInspectionService.SaveAntiCorrosionCheck(item);
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
catch (ArgumentException ex)
|
||||
{
|
||||
ShowNotify(ex.Message, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<Items>
|
||||
<f:TextBox ID="txtTrustCode" runat="server" Label="委托单编号" Width="260px" LabelWidth="100px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtOutputMasterCode" runat="server" Label="出库单编号" Width="260px" LabelWidth="100px" LabelAlign="Right">
|
||||
<f:TextBox ID="txtWeldTaskCode" runat="server" Label="任务单编号" Width="260px" LabelWidth="100px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
@@ -85,8 +85,8 @@
|
||||
<f:RenderField Width="260px" ColumnID="TrustCode" DataField="TrustCode" SortField="TrustCode"
|
||||
FieldType="String" HeaderText="委托单编号" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="220px" ColumnID="OutputMasterCode" DataField="OutputMasterCode" SortField="OutputMasterCode"
|
||||
FieldType="String" HeaderText="出库单编号" TextAlign="Left" HeaderTextAlign="Center">
|
||||
<f:RenderField Width="220px" ColumnID="WeldTaskCode" DataField="WeldTaskCode" SortField="WeldTaskCode"
|
||||
FieldType="String" HeaderText="任务单编号" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" ColumnID="DemandDate" DataField="DemandDate" SortField="DemandDate" Renderer="Date"
|
||||
RendererArgument="yyyy-MM-dd" FieldType="Date" HeaderText="需求时间" TextAlign="Left" HeaderTextAlign="Center">
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace FineUIPro.Web.CLGL
|
||||
ProjectId = this.CurrUser.LoginProjectId,
|
||||
UnitWorkId = tvControlItem.SelectedNodeID,
|
||||
TrustCode = txtTrustCode.Text.Trim(),
|
||||
OutputMasterCode = txtOutputMasterCode.Text.Trim()
|
||||
WeldTaskCode = txtWeldTaskCode.Text.Trim()
|
||||
};
|
||||
Grid1.DataSource = TwAntiCorrosionTrustService.GetListData(filter, Grid1);
|
||||
Grid1.RecordCount = TwAntiCorrosionTrustService.Count;
|
||||
|
||||
+2
-2
@@ -123,13 +123,13 @@ namespace FineUIPro.Web.CLGL
|
||||
protected global::FineUIPro.TextBox txtTrustCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtOutputMasterCode 控件。
|
||||
/// txtWeldTaskCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtOutputMasterCode;
|
||||
protected global::FineUIPro.TextBox txtWeldTaskCode;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
<f:TextBox ID="txtTrustCode" Label="委托单编号" runat="server" Readonly="true"
|
||||
Required="true" ShowRedStar="true" LabelWidth="140px">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpOutputMaster" Label="出库单编号" runat="server"
|
||||
Required="true" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="drpOutputMaster_SelectedIndexChanged"
|
||||
<f:DropDownList ID="drpWeldTask" Label="焊接任务单" runat="server"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="drpWeldTask_SelectedIndexChanged"
|
||||
LabelWidth="120px">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="txtDemandDate" Label="需求时间" runat="server" LabelWidth="120px">
|
||||
@@ -81,6 +81,13 @@
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField HeaderText="Id" ColumnID="Id" DataField="Id" FieldType="String" Hidden="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="排序" ColumnID="SortIndex" DataField="SortIndex"
|
||||
FieldType="Int" HeaderTextAlign="Center" TextAlign="Center" Width="70px">
|
||||
<Editor>
|
||||
<f:NumberBox ID="numSortIndexEditor" runat="server" NoDecimal="true" MinValue="1">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="材料主编码" ColumnID="MaterialCode" DataField="MaterialCode"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="160px">
|
||||
</f:RenderField>
|
||||
@@ -102,6 +109,15 @@
|
||||
<f:RenderField HeaderText="数量" ColumnID="Quantity" DataField="Quantity"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Right" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊后防腐" ColumnID="IsPostWeld" DataField="IsPostWeld"
|
||||
FieldType="Boolean" HeaderTextAlign="Center" TextAlign="Center" Width="95px">
|
||||
<Editor>
|
||||
<f:DropDownList ID="drpIsPostWeldEditor" runat="server">
|
||||
<f:ListItem Text="否" Value="false" />
|
||||
<f:ListItem Text="是" Value="true" />
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="涂漆代码" ColumnID="PaintCode" DataField="PaintCode"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="110px">
|
||||
<Editor>
|
||||
|
||||
@@ -22,6 +22,12 @@ namespace FineUIPro.Web.CLGL
|
||||
set { ViewState["UnitWorkId"] = value; }
|
||||
}
|
||||
|
||||
public string HotProessTrustId
|
||||
{
|
||||
get { return (string)ViewState["HotProessTrustId"]; }
|
||||
set { ViewState["HotProessTrustId"] = value; }
|
||||
}
|
||||
|
||||
public string PaintCodeJson
|
||||
{
|
||||
get
|
||||
@@ -54,7 +60,8 @@ namespace FineUIPro.Web.CLGL
|
||||
txtDemandDate.Text = string.Format("{0:yyyy-MM-dd}", trust.DemandDate);
|
||||
txtCompleteDate.Text = string.Format("{0:yyyy-MM-dd}", trust.CompleteDate);
|
||||
txtRemark.Text = trust.Remark;
|
||||
InitOutputMasterDropDown(trust.OutputMasterId);
|
||||
HotProessTrustId = trust.HotProessTrustId;
|
||||
InitWeldTaskDropDown(trust.WeldTaskCode);
|
||||
BindGrid(TwAntiCorrosionTrustService.GetDetailList(TrustId));
|
||||
}
|
||||
else
|
||||
@@ -66,30 +73,28 @@ namespace FineUIPro.Web.CLGL
|
||||
txtUnitWorkName.Text = unitWork.UnitWorkName;
|
||||
}
|
||||
txtTrustCode.Text = TwAntiCorrosionTrustService.GenerateTrustCode(UnitWorkId);
|
||||
InitOutputMasterDropDown(null);
|
||||
InitWeldTaskDropDown(Request.Params["TaskCode"]);
|
||||
BindGrid(new List<AntiCorrosionTrustDetailOutput>());
|
||||
if (!string.IsNullOrEmpty(Request.Params["TaskCode"]))
|
||||
{
|
||||
drpWeldTask.SelectedValue = Request.Params["TaskCode"];
|
||||
BindGrid(TwAntiCorrosionTrustService.GetDetailsByTaskCode(this.CurrUser.LoginProjectId, Request.Params["TaskCode"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void InitOutputMasterDropDown(string selectedOutputMasterId)
|
||||
private void InitWeldTaskDropDown(string selectedTaskCode)
|
||||
{
|
||||
drpOutputMaster.DataTextField = "CusBillCode";
|
||||
drpOutputMaster.DataValueField = "Id";
|
||||
var list = TwAntiCorrosionTrustService.GetAvailableOutputMasters(this.CurrUser.LoginProjectId, UnitWorkId, TrustId);
|
||||
if (!string.IsNullOrEmpty(selectedOutputMasterId) && list.All(x => x.Id != selectedOutputMasterId))
|
||||
drpWeldTask.DataTextField = "Text";
|
||||
drpWeldTask.DataValueField = "TaskCode";
|
||||
var list = TwAntiCorrosionTrustService.GetAvailableWeldTasks(this.CurrUser.LoginProjectId, UnitWorkId, TrustId)
|
||||
.Select(x => new { x.TaskCode, Text = x.TaskCode + "(" + x.TeamGroupName + ")" }).ToList();
|
||||
drpWeldTask.DataSource = list;
|
||||
drpWeldTask.DataBind();
|
||||
Funs.FineUIPleaseSelect(drpWeldTask);
|
||||
if (!string.IsNullOrEmpty(selectedTaskCode))
|
||||
{
|
||||
var current = TwAntiCorrosionTrustService.GetOutputMasterById(selectedOutputMasterId);
|
||||
if (current != null)
|
||||
{
|
||||
list.Insert(0, current);
|
||||
}
|
||||
}
|
||||
drpOutputMaster.DataSource = list;
|
||||
drpOutputMaster.DataBind();
|
||||
Funs.FineUIPleaseSelect(drpOutputMaster);
|
||||
if (!string.IsNullOrEmpty(selectedOutputMasterId))
|
||||
{
|
||||
drpOutputMaster.SelectedValue = selectedOutputMasterId;
|
||||
drpWeldTask.SelectedValue = selectedTaskCode;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,11 +113,11 @@ namespace FineUIPro.Web.CLGL
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
protected void drpOutputMaster_SelectedIndexChanged(object sender, EventArgs e)
|
||||
protected void drpWeldTask_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (drpOutputMaster.SelectedValue != Const._Null)
|
||||
if (drpWeldTask.SelectedValue != Const._Null)
|
||||
{
|
||||
BindGrid(TwAntiCorrosionTrustService.GetDetailsByOutputMasterId(drpOutputMaster.SelectedValue));
|
||||
BindGrid(TwAntiCorrosionTrustService.GetDetailsByTaskCode(this.CurrUser.LoginProjectId, drpWeldTask.SelectedValue));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -122,7 +127,7 @@ namespace FineUIPro.Web.CLGL
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
var trust = SaveTrust();
|
||||
var trust = SaveTrust(false);
|
||||
if (trust == null)
|
||||
{
|
||||
return;
|
||||
@@ -134,7 +139,7 @@ namespace FineUIPro.Web.CLGL
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
var trust = SaveTrust();
|
||||
var trust = SaveTrust(true);
|
||||
if (trust == null)
|
||||
{
|
||||
return;
|
||||
@@ -144,16 +149,17 @@ namespace FineUIPro.Web.CLGL
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
private AntiCorrosionTrustOutput SaveTrust()
|
||||
private AntiCorrosionTrustOutput SaveTrust(bool splitOnSubmit)
|
||||
{
|
||||
if (!CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.Tw_AntiCorrosionTrustMenuId, Const.BtnSave))
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return null;
|
||||
}
|
||||
if (drpOutputMaster.SelectedValue == Const._Null)
|
||||
if (string.IsNullOrEmpty(TrustId) && string.IsNullOrEmpty(HotProessTrustId)
|
||||
&& drpWeldTask.SelectedValue == Const._Null)
|
||||
{
|
||||
ShowNotify("请选择出库单编号!", MessageBoxIcon.Warning);
|
||||
ShowNotify("请选择焊接任务单!", MessageBoxIcon.Warning);
|
||||
return null;
|
||||
}
|
||||
if (TwAntiCorrosionTrustService.IsExistTrustCode(txtTrustCode.Text.Trim(), TrustId, this.CurrUser.LoginProjectId))
|
||||
@@ -170,7 +176,8 @@ namespace FineUIPro.Web.CLGL
|
||||
ConstructionPart = txtConstructionPart.Text.Trim(),
|
||||
ConstructionProfessional = txtConstructionProfessional.Text.Trim(),
|
||||
TrustCode = txtTrustCode.Text.Trim(),
|
||||
OutputMasterId = drpOutputMaster.SelectedValue,
|
||||
WeldTaskCode = drpWeldTask.SelectedValue == Const._Null ? null : drpWeldTask.SelectedValue,
|
||||
HotProessTrustId = HotProessTrustId,
|
||||
DemandDate = Funs.GetNewDateTime(txtDemandDate.Text.Trim()),
|
||||
CompleteDate = Funs.GetNewDateTime(txtCompleteDate.Text.Trim()),
|
||||
CreateMan = this.CurrUser.PersonId,
|
||||
@@ -184,8 +191,16 @@ namespace FineUIPro.Web.CLGL
|
||||
return null;
|
||||
}
|
||||
|
||||
TwAntiCorrosionTrustService.Save(trust, details);
|
||||
return trust;
|
||||
try
|
||||
{
|
||||
TwAntiCorrosionTrustService.Save(trust, details, splitOnSubmit);
|
||||
return trust;
|
||||
}
|
||||
catch (ArgumentException ex)
|
||||
{
|
||||
ShowNotify(ex.Message, MessageBoxIcon.Warning);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private List<AntiCorrosionTrustDetailOutput> CollectGridDetailInfo()
|
||||
@@ -200,10 +215,11 @@ namespace FineUIPro.Web.CLGL
|
||||
result.Add(new AntiCorrosionTrustDetailOutput
|
||||
{
|
||||
Id = values.Value<string>("Id"),
|
||||
SortIndex = sortIndex,
|
||||
SortIndex = values.Value<int?>("SortIndex") ?? sortIndex,
|
||||
MaterialCode = values.Value<string>("MaterialCode"),
|
||||
Quantity = GetDecimal(values.Value<string>("Quantity")),
|
||||
PaintCode = values.Value<string>("PaintCode"),
|
||||
IsPostWeld = values.Value<bool?>("IsPostWeld") ?? false,
|
||||
Remark = values.Value<string>("Remark")
|
||||
});
|
||||
}
|
||||
|
||||
+12
-2
@@ -132,13 +132,13 @@ namespace FineUIPro.Web.CLGL
|
||||
protected global::FineUIPro.TextBox txtTrustCode;
|
||||
|
||||
/// <summary>
|
||||
/// drpOutputMaster 控件。
|
||||
/// drpWeldTask 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpOutputMaster;
|
||||
protected global::FineUIPro.DropDownList drpWeldTask;
|
||||
|
||||
/// <summary>
|
||||
/// txtDemandDate 控件。
|
||||
@@ -194,6 +194,16 @@ namespace FineUIPro.Web.CLGL
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpPaintCodeEditor;
|
||||
|
||||
/// <summary>
|
||||
/// drpIsPostWeldEditor 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.DropDownList drpIsPostWeldEditor;
|
||||
|
||||
/// <summary>
|
||||
/// numSortIndexEditor 控件。
|
||||
/// </summary>
|
||||
protected global::FineUIPro.NumberBox numSortIndexEditor;
|
||||
|
||||
/// <summary>
|
||||
/// txtDetailRemarkEditor 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user