2023-02-17 焊接任务单修改

This commit is contained in:
2023-02-17 15:30:04 +08:00
parent 5f6569d82e
commit 86b9931597
8 changed files with 393 additions and 147 deletions
@@ -1,4 +1,5 @@
using BLL;
using Model;
using System;
using System.Collections.Generic;
using System.Data;
@@ -257,6 +258,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
EnableClickEvent = true,
};
var pipeline= PointBatchService.GetPointBatchById(item.PointBatchId);
string startdate = string.Format("{0:yyyy-MM-dd}", pipeline.StartDate);
string PipeArea = "";
if (!string.IsNullOrEmpty(pipeline.PipelineId))
{
@@ -273,19 +275,19 @@ namespace FineUIPro.Web.HJGL.PointTrust
string code = "DK-" + item.PointBatchCode.Substring(item.PointBatchCode.Length - 4)+ PipeArea;
if (!item.EndDate.HasValue) ////批 没有关闭 粉色
{
newNode.Text = "<font color='#FA58D0'>" + code + "</font>";
newNode.Text = "<font color='#FA58D0'>" + code +"【"+startdate + "】"+"</font>";
newNode.ToolTip = "批尚未关闭";
}
// 当天批
else if (string.Format("{0:yyyy-MM-dd}", item.StartDate) == string.Format("{0:yyyy-MM-dd}", System.DateTime.Now)
|| string.Format("{0:yyyy-MM-dd}", item.EndDate) == string.Format("{0:yyyy-MM-dd}", System.DateTime.Now))
{
newNode.Text = "<font color='#EE0000'>" + code + "</font>";
newNode.Text = "<font color='#EE0000'>" + code + "【" + startdate + "】" + "</font>";
newNode.ToolTip = "当天批";
}
else
{
newNode.Text = code;
newNode.Text = code+ "【" + startdate + "】";
}
e.Node.Nodes.Add(newNode);
@@ -449,6 +451,11 @@ namespace FineUIPro.Web.HJGL.PointTrust
{
listStr.Add(new SqlParameter("@PointBatchId", this.PointBatchId));
}
if (!string.IsNullOrEmpty(txtpipelinecode.Text.Trim()))
{
strSql += " and PipelineCode like @PipelineCode ";
listStr.Add(new SqlParameter("@PipelineCode", "%"+ txtpipelinecode.Text.Trim() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@@ -483,6 +490,10 @@ namespace FineUIPro.Web.HJGL.PointTrust
{
this.BindGrid();
}
protected void btnQuery_Click(object sender, EventArgs e)
{
this.BindGrid();
}
#endregion
#region
@@ -624,7 +635,31 @@ namespace FineUIPro.Web.HJGL.PointTrust
}
protected void btnManual_Click(object sender, EventArgs e)
{
var batch = BLL.PointBatchService.GetPointBatchById(this.PointBatchId);
if (!batch.EndDate.HasValue)
{
if (!string.IsNullOrEmpty(Grid1.SelectedRowID) )
{
PointBatchDetailService.UpdatePointBatchDetail(Grid1.SelectedRowID, "1", System.DateTime.Now);
this.BindGrid();
Alert.ShowInTop("已成功点口!", MessageBoxIcon.Success);
}
else
{
Alert.ShowInTop("请选择点口!", MessageBoxIcon.Warning);
}
}
else
{
Alert.ShowInTop("批已关闭,不能点口!", MessageBoxIcon.Success);
}
}
/// <summary>
/// 手动点口关闭
/// </summary>