20250723 修改工厂预制管理
This commit is contained in:
@@ -308,16 +308,21 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
}
|
||||
protected void btnOutPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
string Id = this.Grid1.SelectedRowID;
|
||||
var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(Id);
|
||||
var PipelineComponent = model.PipelineComponentId.Split(',');
|
||||
foreach (var item in PipelineComponent)
|
||||
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
|
||||
{
|
||||
HJGL_PipelineComponentService.UpdateOutState(item, model.PackagingCode);
|
||||
string Id = this.Grid1.SelectedRowID;
|
||||
var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(Id);
|
||||
if (model != null)
|
||||
{
|
||||
var PipelineComponent = model.PipelineComponentId.Split(',');
|
||||
foreach (var item in PipelineComponent)
|
||||
{
|
||||
HJGL_PipelineComponentService.UpdateOutState(item, model.PackagingCode);
|
||||
}
|
||||
HJGL_PackagingmanageService.PutOutOrder(Id);
|
||||
Pring(Id);
|
||||
}
|
||||
}
|
||||
HJGL_PackagingmanageService.PutOutOrder(Id);
|
||||
Pring(Id);
|
||||
|
||||
}
|
||||
private void Pring(string Id)
|
||||
{
|
||||
@@ -329,38 +334,41 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
return;
|
||||
}
|
||||
DataTable tb = BLL.HJGL_PackagingmanageService.GetPackagingDetailById(Id);
|
||||
var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(Id);
|
||||
|
||||
var dtTable = tb.AsEnumerable().OrderBy(o => o["PlanStartDate"]).CopyToDataTable();
|
||||
string PlanStartDate = "";
|
||||
if (dtTable.Rows != null && dtTable.Rows.Count > 0)
|
||||
if (tb.Rows.Count > 0)
|
||||
{
|
||||
PlanStartDate = dtTable.Rows[0]["PlanStartDate"].ToString();
|
||||
}
|
||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||
keyValuePairs.Add("ProjectName", ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId));
|
||||
keyValuePairs.Add("PackagingCode", model.PackagingCode);
|
||||
keyValuePairs.Add("PlanStartDate", PlanStartDate);
|
||||
keyValuePairs.Add("StackingPosition", model.StackingPosition);
|
||||
keyValuePairs.Add("ContactName", model.ContactName + "| " + model.ContactPhone);
|
||||
keyValuePairs.Add("ID", "PackagingManage$" + model.PackagingManageId);
|
||||
DataRow dataRow = tb.NewRow();
|
||||
dataRow["num"] = "合计:" + tb.Rows.Count;
|
||||
tb.Rows.Add(dataRow);
|
||||
if (tb != null)
|
||||
{
|
||||
tb.TableName = "Data";
|
||||
}
|
||||
BLL.FastReportService.AddFastreportTable(tb);
|
||||
BLL.FastReportService.AddFastreportParameter(keyValuePairs);
|
||||
string initTemplatePath = "";
|
||||
string rootPath = Server.MapPath("~/");
|
||||
initTemplatePath = "File\\Fastreport\\装箱单.frx";
|
||||
var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(Id);
|
||||
|
||||
if (File.Exists(rootPath + initTemplatePath))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||
var dtTable = tb.AsEnumerable().OrderBy(o => o["PlanStartDate"]).CopyToDataTable();
|
||||
string PlanStartDate = "";
|
||||
if (dtTable.Rows != null && dtTable.Rows.Count > 0)
|
||||
{
|
||||
PlanStartDate = dtTable.Rows[0]["PlanStartDate"].ToString();
|
||||
}
|
||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||
keyValuePairs.Add("ProjectName", ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId));
|
||||
keyValuePairs.Add("PackagingCode", model.PackagingCode);
|
||||
keyValuePairs.Add("PlanStartDate", PlanStartDate);
|
||||
keyValuePairs.Add("StackingPosition", model.StackingPosition);
|
||||
keyValuePairs.Add("ContactName", model.ContactName + "| " + model.ContactPhone);
|
||||
keyValuePairs.Add("ID", "PackagingManage$" + model.PackagingManageId);
|
||||
DataRow dataRow = tb.NewRow();
|
||||
dataRow["num"] = "合计:" + tb.Rows.Count;
|
||||
tb.Rows.Add(dataRow);
|
||||
if (tb != null)
|
||||
{
|
||||
tb.TableName = "Data";
|
||||
}
|
||||
BLL.FastReportService.AddFastreportTable(tb);
|
||||
BLL.FastReportService.AddFastreportParameter(keyValuePairs);
|
||||
string initTemplatePath = "";
|
||||
string rootPath = Server.MapPath("~/");
|
||||
initTemplatePath = "File\\Fastreport\\装箱单.frx";
|
||||
|
||||
if (File.Exists(rootPath + initTemplatePath))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user