Merge branch 'master' of http://47.104.102.122:3000/lpf/SGGL_SeDin_New
This commit is contained in:
+1
-1
@@ -405,7 +405,7 @@
|
|||||||
<Compile Include="HJGL\PointTrust\PointBatchDetailService.cs" />
|
<Compile Include="HJGL\PointTrust\PointBatchDetailService.cs" />
|
||||||
<Compile Include="HJGL\PointTrust\PointBatchService.cs" />
|
<Compile Include="HJGL\PointTrust\PointBatchService.cs" />
|
||||||
<Compile Include="HJGL\PreDesign\HJGL_MaterialService.cs" />
|
<Compile Include="HJGL\PreDesign\HJGL_MaterialService.cs" />
|
||||||
<Compile Include="HJGL\PreDesign\PackagingmanagedetailService.cs" />
|
<Compile Include="HJGL\PreDesign\HJGLPackagingmanagedetailService.cs" />
|
||||||
<Compile Include="HJGL\PreDesign\PackagingManageService .cs" />
|
<Compile Include="HJGL\PreDesign\PackagingManageService .cs" />
|
||||||
<Compile Include="HJGL\PreDesign\ProductionSchedulingPlanService.cs" />
|
<Compile Include="HJGL\PreDesign\ProductionSchedulingPlanService.cs" />
|
||||||
<Compile Include="HJGL\PreDesign\TrainNumberManageService.cs" />
|
<Compile Include="HJGL\PreDesign\TrainNumberManageService.cs" />
|
||||||
|
|||||||
+55
-20
@@ -1,4 +1,5 @@
|
|||||||
using FineUIPro;
|
using FineUIPro;
|
||||||
|
using Model;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -9,11 +10,8 @@ using System.Text;
|
|||||||
namespace BLL
|
namespace BLL
|
||||||
{
|
{
|
||||||
|
|
||||||
public static class PackagingmanagedetailService
|
public static class HJGLPackagingmanagedetailService
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region 获取列表
|
#region 获取列表
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 记录数
|
/// 记录数
|
||||||
@@ -122,31 +120,70 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
return Funs.DB.HJGL_PackagingManageDetail.FirstOrDefault(x => x.Id == Id);
|
return Funs.DB.HJGL_PackagingManageDetail.FirstOrDefault(x => x.Id == Id);
|
||||||
}
|
}
|
||||||
public static IEnumerable GetPackagingData(string PackagingManageId)
|
public static IEnumerable<Model.PipelinePrefabricatedComponentsItem> GetPackagingData(string PackagingManageId)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(PackagingManageId))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
var pack = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId);
|
||||||
|
if (pack == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
var result = new List<Model.PipelinePrefabricatedComponentsItem>();
|
||||||
|
if (pack.TypeInt == (int)HJGL_PackagingmanageService.TypeInt.预制散件)
|
||||||
{
|
{
|
||||||
var q = from detail in Funs.DB.HJGL_PackagingManageDetail
|
var q = from detail in Funs.DB.HJGL_PackagingManageDetail
|
||||||
join lib in Funs.DB.HJGL_MaterialCodeLib on detail.MaterialCode equals lib.MaterialCode into libJoin
|
join lib in Funs.DB.HJGL_MaterialCodeLib on detail.MaterialCode equals lib.MaterialCode into libJoin
|
||||||
from libItem in libJoin.DefaultIfEmpty()
|
from libItem in libJoin.DefaultIfEmpty()
|
||||||
join line in Funs.DB.HJGL_Pipeline on detail.PipelineId equals line.PipelineId into lineJoin
|
join line in Funs.DB.HJGL_Pipeline on detail.PipelineId equals line.PipelineId into lineJoin
|
||||||
from lineItem in lineJoin.DefaultIfEmpty()
|
from lineItem in lineJoin.DefaultIfEmpty()
|
||||||
where detail.PackagingManageId == PackagingManageId
|
where detail.PackagingManageId == PackagingManageId /*&& (detail.PipelineId != null || detail.PipelineId != "") && (detail.PipelineComponentId == null || detail.PipelineComponentId == "")*/
|
||||||
select new
|
select new PipelinePrefabricatedComponentsItem
|
||||||
{
|
{
|
||||||
detail.Id,
|
Id = detail.Id,
|
||||||
libItem.MaterialCode,
|
MaterialCode = libItem.MaterialCode,
|
||||||
libItem.MaterialName,
|
MaterialName = libItem.MaterialName,
|
||||||
libItem.MaterialUnit,
|
MaterialUnit = libItem.MaterialUnit,
|
||||||
libItem.MaterialSpec,
|
MaterialSpec = libItem.MaterialSpec,
|
||||||
libItem.MaterialMade,
|
MaterialMade = libItem.MaterialMade,
|
||||||
libItem.MaterialDef,
|
MaterialDef = libItem.MaterialDef,
|
||||||
detail.Number,
|
Number = detail.Number,
|
||||||
lineItem.PipelineId,
|
PipelineId = lineItem.PipelineId,
|
||||||
lineItem.PipelineCode,
|
PipelineCode = lineItem.PipelineCode,
|
||||||
|
UnitWorkId=lineItem.UnitWorkId,
|
||||||
|
|
||||||
};
|
};
|
||||||
return q;
|
result= q.ToList();
|
||||||
}
|
}
|
||||||
|
else if(pack.TypeInt == (int)HJGL_PackagingmanageService.TypeInt.其他材料)
|
||||||
|
{
|
||||||
|
var q = from detail in Funs.DB.HJGL_PackagingManageDetail
|
||||||
|
join lib in Funs.DB.HJGL_MaterialCodeLib on detail.MaterialCode equals lib.MaterialCode into libJoin
|
||||||
|
from libItem in libJoin.DefaultIfEmpty()
|
||||||
|
join line in Funs.DB.HJGL_Pipeline on detail.PipelineId equals line.PipelineId into lineJoin
|
||||||
|
from lineItem in lineJoin.DefaultIfEmpty()
|
||||||
|
where detail.PackagingManageId == PackagingManageId /*&& (detail.PipelineId == null || detail.PipelineId == "")*/
|
||||||
|
select new PipelinePrefabricatedComponentsItem
|
||||||
|
{
|
||||||
|
Id = detail.Id,
|
||||||
|
MaterialCode = libItem.MaterialCode,
|
||||||
|
MaterialName = libItem.MaterialName,
|
||||||
|
MaterialUnit = libItem.MaterialUnit,
|
||||||
|
MaterialSpec = libItem.MaterialSpec,
|
||||||
|
MaterialMade = libItem.MaterialMade,
|
||||||
|
MaterialDef = libItem.MaterialDef,
|
||||||
|
Number = detail.Number,
|
||||||
|
PipelineId = lineItem.PipelineId,
|
||||||
|
PipelineCode = lineItem.PipelineCode,
|
||||||
|
|
||||||
|
};
|
||||||
|
result = q.ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
public static void Add(Model.HJGL_PackagingManageDetail newtable)
|
public static void Add(Model.HJGL_PackagingManageDetail newtable)
|
||||||
{
|
{
|
||||||
@@ -165,8 +202,6 @@ namespace BLL
|
|||||||
Funs.DB.HJGL_PackagingManageDetail.InsertOnSubmit(table);
|
Funs.DB.HJGL_PackagingManageDetail.InsertOnSubmit(table);
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void Update(Model.HJGL_PackagingManageDetail newtable)
|
public static void Update(Model.HJGL_PackagingManageDetail newtable)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -8,11 +8,11 @@ using System.Data.SqlClient;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
|
|
||||||
namespace BLL
|
namespace BLL
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 包装管理服务类
|
||||||
|
/// </summary>
|
||||||
public static class HJGL_PackagingmanageService
|
public static class HJGL_PackagingmanageService
|
||||||
{
|
{
|
||||||
public class PackagingManageItem
|
public class PackagingManageItem
|
||||||
@@ -28,6 +28,8 @@ namespace BLL
|
|||||||
public string ContactPhone { get; set; }
|
public string ContactPhone { get; set; }
|
||||||
public string StackingPosition { get; set; }
|
public string StackingPosition { get; set; }
|
||||||
public int? State { get; set; }
|
public int? State { get; set; }
|
||||||
|
public int? TypeInt { get; set; }
|
||||||
|
public string TypeString { get; set; }
|
||||||
|
|
||||||
public string ReceiveMan { get; set; }
|
public string ReceiveMan { get; set; }
|
||||||
public string ReceiveDate { get; set; }
|
public string ReceiveDate { get; set; }
|
||||||
@@ -36,22 +38,23 @@ namespace BLL
|
|||||||
public string Code { get; set; }
|
public string Code { get; set; }
|
||||||
public string TrainNumber { get; set; }
|
public string TrainNumber { get; set; }
|
||||||
public string TrainNumberOld { get; set; }
|
public string TrainNumberOld { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 未到场
|
/// 未到场
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int state_0 = 0;
|
public static int state_0 = 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 已发货
|
/// 已发货
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int state_1 = 1;
|
public static int state_1 = 1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 已到场
|
/// 已到场
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int state_2 = 2;
|
public static int state_2 = 2;
|
||||||
|
|
||||||
public static ListItem[] GetState()
|
public static ListItem[] GetState()
|
||||||
{
|
{
|
||||||
ListItem[] list = new ListItem[3];
|
ListItem[] list = new ListItem[3];
|
||||||
@@ -67,12 +70,19 @@ namespace BLL
|
|||||||
预制散件 = 20,
|
预制散件 = 20,
|
||||||
其他材料 = 30,
|
其他材料 = 30,
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Dictionary<string, int> TypeIntMap = new Dictionary<string, int>
|
public static Dictionary<string, int> TypeIntMap = new Dictionary<string, int>
|
||||||
{
|
{
|
||||||
{ "预制组件" ,(int)TypeInt.预制组件},
|
{ "预制组件" ,(int)TypeInt.预制组件},
|
||||||
{ "预制散件" ,(int)TypeInt.预制散件},
|
{ "预制散件" ,(int)TypeInt.预制散件},
|
||||||
{ "其他材料" ,(int)TypeInt.其他材料},
|
{ "其他材料" ,(int)TypeInt.其他材料},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static string GetTypeString(int? TypeInt)
|
||||||
|
{
|
||||||
|
return TypeIntMap.FirstOrDefault(c => c.Value == TypeInt).Key;
|
||||||
|
}
|
||||||
|
|
||||||
public static Model.HJGL_PackagingManage GetHJGL_PackagingManageById(string PackagingManageId)
|
public static Model.HJGL_PackagingManage GetHJGL_PackagingManageById(string PackagingManageId)
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
@@ -80,6 +90,7 @@ namespace BLL
|
|||||||
return db.HJGL_PackagingManage.FirstOrDefault(x => x.PackagingManageId == PackagingManageId);
|
return db.HJGL_PackagingManage.FirstOrDefault(x => x.PackagingManageId == PackagingManageId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetMinPlanStartDate(string PackagingManageId)
|
public static string GetMinPlanStartDate(string PackagingManageId)
|
||||||
{
|
{
|
||||||
string PlanStartDate = "";
|
string PlanStartDate = "";
|
||||||
@@ -95,11 +106,11 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
return PlanStartDate;
|
return PlanStartDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static (List<PackagingManageItem> Data, int Total) GetPackagingManageList(string projectId, string PackagingCode, int pageIndex = 0, int pageSize = 20)
|
public static (List<PackagingManageItem> Data, int Total) GetPackagingManageList(string projectId, string PackagingCode, int pageIndex = 0, int pageSize = 20)
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
|
|
||||||
var baseQuery = (from x in db.HJGL_PackagingManage
|
var baseQuery = (from x in db.HJGL_PackagingManage
|
||||||
join n in db.Base_Project on x.ProjectId equals n.ProjectId
|
join n in db.Base_Project on x.ProjectId equals n.ProjectId
|
||||||
join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt
|
join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt
|
||||||
@@ -120,13 +131,14 @@ namespace BLL
|
|||||||
LicensePlateNumber = train.LicensePlateNumber,
|
LicensePlateNumber = train.LicensePlateNumber,
|
||||||
StackingPosition = x.StackingPosition,
|
StackingPosition = x.StackingPosition,
|
||||||
State = x.State,
|
State = x.State,
|
||||||
|
TypeInt = x.TypeInt,
|
||||||
|
TypeString = GetTypeString(x.TypeInt),
|
||||||
ReceiveMan = t.PersonName,
|
ReceiveMan = t.PersonName,
|
||||||
ReceiveDate = x.ReceiveDate.HasValue ? string.Format("{0:g}", x.ReceiveDate) : "",
|
ReceiveDate = x.ReceiveDate.HasValue ? string.Format("{0:g}", x.ReceiveDate) : "",
|
||||||
PlanStartDate = GetMinPlanStartDate(x.PackagingManageId),
|
PlanStartDate = GetMinPlanStartDate(x.PackagingManageId),
|
||||||
TrainNumberOld = x.TrainNumber,
|
TrainNumberOld = x.TrainNumber,
|
||||||
TrainNumber = train.TrainNumber,
|
TrainNumber = train.TrainNumber,
|
||||||
Code = x.PackagingCode.Substring(0, x.PackagingCode.LastIndexOf("-")).Substring(x.PackagingCode.Substring(0, x.PackagingCode.LastIndexOf("-")).LastIndexOf("-") + 1),
|
Code = x.PackagingCode.Substring(0, x.PackagingCode.LastIndexOf("-")).Substring(x.PackagingCode.Substring(0, x.PackagingCode.LastIndexOf("-")).LastIndexOf("-") + 1),
|
||||||
|
|
||||||
}).Distinct();
|
}).Distinct();
|
||||||
|
|
||||||
var pagedData = baseQuery
|
var pagedData = baseQuery
|
||||||
@@ -138,9 +150,9 @@ namespace BLL
|
|||||||
// 获取总记录数(延迟计数优化)
|
// 获取总记录数(延迟计数优化)
|
||||||
var totalCount = baseQuery.Count();
|
var totalCount = baseQuery.Count();
|
||||||
return (pagedData, totalCount);
|
return (pagedData, totalCount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 形成出库单
|
/// 形成出库单
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -153,8 +165,8 @@ namespace BLL
|
|||||||
model.State = state_1;
|
model.State = state_1;
|
||||||
UpdateHJGL_PackagingManage(model);
|
UpdateHJGL_PackagingManage(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据主键获取装箱明细
|
/// 根据主键获取装箱明细
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -179,7 +191,6 @@ namespace BLL
|
|||||||
tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
}
|
}
|
||||||
return tb;
|
return tb;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -195,13 +206,36 @@ namespace BLL
|
|||||||
select x.PackagingCode).Distinct().ToList();
|
select x.PackagingCode).Distinct().ToList();
|
||||||
return q;
|
return q;
|
||||||
}
|
}
|
||||||
|
public static List<Model.HJGL_PackagingManage> GetPackagingManage(string trainNumberId)
|
||||||
|
{
|
||||||
|
Model.SGGLDB db = Funs.DB;
|
||||||
|
var q = (from x in db.HJGL_PackagingManage
|
||||||
|
where x.TrainNumberId==trainNumberId
|
||||||
|
select x).Distinct().ToList();
|
||||||
|
return q;
|
||||||
|
}
|
||||||
|
public static string GetNewPackagingCode(string projectid)
|
||||||
|
{
|
||||||
|
string code = ProjectService.GetProjectCodeByProjectId(projectid) + "-" + string.Format("{0:yyyyMMdd}", DateTime.Now) + "-";
|
||||||
|
|
||||||
|
var q = GetPackagingManageList(projectid, code);
|
||||||
|
if (q.Total > 0)
|
||||||
|
{
|
||||||
|
code = code + (q.Total + 1).ToString().PadLeft(3, '0');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
code = code + "001";
|
||||||
|
}
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 新增实体
|
/// 新增实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="newtable"></param>
|
/// <param name="newtable"></param>
|
||||||
public static void AddHJGL_PackagingManage(Model.HJGL_PackagingManage newtable)
|
public static void AddHJGL_PackagingManage(Model.HJGL_PackagingManage newtable)
|
||||||
{
|
{
|
||||||
|
|
||||||
Model.HJGL_PackagingManage table = new Model.HJGL_PackagingManage
|
Model.HJGL_PackagingManage table = new Model.HJGL_PackagingManage
|
||||||
{
|
{
|
||||||
PackagingManageId = newtable.PackagingManageId,
|
PackagingManageId = newtable.PackagingManageId,
|
||||||
@@ -224,7 +258,6 @@ namespace BLL
|
|||||||
db1.SubmitChanges();
|
db1.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void UpdateHJGL_PackagingManage(Model.HJGL_PackagingManage newtable)
|
public static void UpdateHJGL_PackagingManage(Model.HJGL_PackagingManage newtable)
|
||||||
{
|
{
|
||||||
var db1 = Funs.DB;
|
var db1 = Funs.DB;
|
||||||
@@ -247,8 +280,8 @@ namespace BLL
|
|||||||
table.TypeInt = newtable.TypeInt;
|
table.TypeInt = newtable.TypeInt;
|
||||||
db1.SubmitChanges();
|
db1.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DeleteHJGL_PackagingManageById(string PackagingManageId)
|
public static void DeleteHJGL_PackagingManageById(string PackagingManageId)
|
||||||
{
|
{
|
||||||
var db1 = Funs.DB;
|
var db1 = Funs.DB;
|
||||||
@@ -258,10 +291,8 @@ namespace BLL
|
|||||||
db1.HJGL_PackagingManage.DeleteOnSubmit(table);
|
db1.HJGL_PackagingManage.DeleteOnSubmit(table);
|
||||||
db1.SubmitChanges();
|
db1.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 管线下拉框
|
/// 管线下拉框
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -278,6 +309,5 @@ namespace BLL
|
|||||||
Funs.FineUIPleaseSelect(dropName);
|
Funs.FineUIPleaseSelect(dropName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -85,6 +85,95 @@ namespace BLL
|
|||||||
return Funs.DB.HJGL_Pipeline_Component.FirstOrDefault(e => e.PipeLineMatId == pipeLineMatId);
|
return Funs.DB.HJGL_Pipeline_Component.FirstOrDefault(e => e.PipeLineMatId == pipeLineMatId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取预制散件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="unitworkId">单位工程Id</param>
|
||||||
|
/// <param name="pipelineId">管线Id</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static IEnumerable<PipelinePrefabricatedComponentsItem> GetPipelinePrefabricatedComponent(string unitworkId, string pipelineId)
|
||||||
|
{
|
||||||
|
var query = from pipe in Funs.DB.HJGL_PipeLineMat
|
||||||
|
join lib in Funs.DB.HJGL_MaterialCodeLib on pipe.MaterialCode equals lib.MaterialCode into libJoin
|
||||||
|
from libItem in libJoin.DefaultIfEmpty()
|
||||||
|
join line in Funs.DB.HJGL_Pipeline on pipe.PipelineId equals line.PipelineId into lineJoin
|
||||||
|
from lineItem in lineJoin.DefaultIfEmpty()
|
||||||
|
where lineItem != null && lineItem.UnitWorkId == unitworkId && lineItem.PipeArea == "1"
|
||||||
|
&& (pipe.PrefabricatedComponents == null || pipe.PrefabricatedComponents == "")
|
||||||
|
select new PipelinePrefabricatedComponentsItem
|
||||||
|
{
|
||||||
|
Id = pipe.PipeLineMatId,
|
||||||
|
MaterialCode = libItem.MaterialCode,
|
||||||
|
MaterialName = libItem.MaterialName,
|
||||||
|
MaterialUnit = libItem.MaterialUnit,
|
||||||
|
MaterialSpec = libItem.MaterialSpec,
|
||||||
|
MaterialMade = libItem.MaterialMade,
|
||||||
|
MaterialDef = libItem.MaterialDef,
|
||||||
|
Number = pipe.Number,
|
||||||
|
PrefabricatedComponents = pipe.PrefabricatedComponents,
|
||||||
|
PipelineId = lineItem.PipelineId,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(pipelineId))
|
||||||
|
{
|
||||||
|
query = query.Where(x => x.PipelineId == pipelineId);
|
||||||
|
}
|
||||||
|
|
||||||
|
query = query.OrderBy(x => x.PrefabricatedComponents);
|
||||||
|
|
||||||
|
|
||||||
|
return query.ToList();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 获取预制散件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pipelineId">管线Id</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static IEnumerable<PipelinePrefabricatedComponentsItem> GetPipelinePrefabricatedComponent(string pipelineId)
|
||||||
|
{
|
||||||
|
var query = from pipe in Funs.DB.HJGL_PipeLineMat
|
||||||
|
join lib in Funs.DB.HJGL_MaterialCodeLib on pipe.MaterialCode equals lib.MaterialCode into libJoin
|
||||||
|
from libItem in libJoin.DefaultIfEmpty()
|
||||||
|
join line in Funs.DB.HJGL_Pipeline on pipe.PipelineId equals line.PipelineId into lineJoin
|
||||||
|
from lineItem in lineJoin.DefaultIfEmpty()
|
||||||
|
where lineItem != null && lineItem.PipeArea == "1"
|
||||||
|
&& (pipe.PrefabricatedComponents == null || pipe.PrefabricatedComponents == "")
|
||||||
|
select new PipelinePrefabricatedComponentsItem
|
||||||
|
{
|
||||||
|
Id = pipe.PipeLineMatId,
|
||||||
|
MaterialCode = libItem.MaterialCode,
|
||||||
|
MaterialName = libItem.MaterialName,
|
||||||
|
MaterialUnit = libItem.MaterialUnit,
|
||||||
|
MaterialSpec = libItem.MaterialSpec,
|
||||||
|
MaterialMade = libItem.MaterialMade,
|
||||||
|
MaterialDef = libItem.MaterialDef,
|
||||||
|
Number = pipe.Number,
|
||||||
|
PrefabricatedComponents = pipe.PrefabricatedComponents,
|
||||||
|
PipelineId = lineItem.PipelineId,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(pipelineId))
|
||||||
|
{
|
||||||
|
query = query.Where(x => x.PipelineId == pipelineId);
|
||||||
|
}
|
||||||
|
|
||||||
|
query = query.OrderBy(x => x.PrefabricatedComponents);
|
||||||
|
|
||||||
|
var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail
|
||||||
|
where x.PipelineId == pipelineId
|
||||||
|
&& (x.PipelineComponentId == null || x.PipelineComponentId == "")
|
||||||
|
select x).ToList();
|
||||||
|
var queryList = query.ToList();
|
||||||
|
// 优化 Linq 过滤条件
|
||||||
|
var result = (from x in queryList
|
||||||
|
join y in inoutplandetail on x.MaterialCode equals y.MaterialCode into yy
|
||||||
|
from y in yy.DefaultIfEmpty()
|
||||||
|
where y == null
|
||||||
|
select x).ToList();
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取打印实体
|
/// 获取打印实体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -92,8 +181,7 @@ namespace BLL
|
|||||||
/// <param name="PipelineId"></param>
|
/// <param name="PipelineId"></param>
|
||||||
/// <param name="IsCheckPrint"></param>
|
/// <param name="IsCheckPrint"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IEnumerable<PipelineComponentPrintDto> GetPrintModelByPipelineComponentIds(
|
public static IEnumerable<PipelineComponentPrintDto> GetPrintModelByPipelineComponentIds(string[] PipelineComponentId, string[] PipelineId, bool IsCheckPrint)
|
||||||
string[] PipelineComponentId, string[] PipelineId, bool IsCheckPrint)
|
|
||||||
{
|
{
|
||||||
var db = Funs.DB;
|
var db = Funs.DB;
|
||||||
var query =
|
var query =
|
||||||
@@ -154,9 +242,6 @@ namespace BLL
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 判断管线组件Code是否存在
|
/// 判断管线组件Code是否存在
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -226,7 +311,7 @@ namespace BLL
|
|||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加作业管线
|
/// 添加管线预制组件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pipeline"></param>
|
/// <param name="pipeline"></param>
|
||||||
public static void AddPipelineComponent(Model.HJGL_Pipeline_Component pipeline)
|
public static void AddPipelineComponent(Model.HJGL_Pipeline_Component pipeline)
|
||||||
@@ -258,7 +343,7 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改作业管线
|
/// 修改管线预制组件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pipeline"></param>
|
/// <param name="pipeline"></param>
|
||||||
public static void UpdatePipelineComponent(Model.HJGL_Pipeline_Component pipeline)
|
public static void UpdatePipelineComponent(Model.HJGL_Pipeline_Component pipeline)
|
||||||
@@ -289,7 +374,7 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改出库状态
|
/// 修改组件出库状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pipelineComponentId"></param>
|
/// <param name="pipelineComponentId"></param>
|
||||||
/// <param name="BoxNumber"></param>
|
/// <param name="BoxNumber"></param>
|
||||||
@@ -306,7 +391,7 @@ namespace BLL
|
|||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改打印状态
|
/// 修改组件打印状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="PipelineComponentId"></param>
|
/// <param name="PipelineComponentId"></param>
|
||||||
public static void UpdateIsPrint(string[] PipelineComponentId)
|
public static void UpdateIsPrint(string[] PipelineComponentId)
|
||||||
@@ -324,7 +409,7 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改生产状态
|
/// 修改组件生产状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pipelineComponentId"></param>
|
/// <param name="pipelineComponentId"></param>
|
||||||
/// <param name="BoxNumber"></param>
|
/// <param name="BoxNumber"></param>
|
||||||
@@ -358,7 +443,7 @@ namespace BLL
|
|||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据作业管线Id删除一个作业管线信息
|
/// 根据管线组件Id删除一个管线组件信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pipelineId"></param>
|
/// <param name="pipelineId"></param>
|
||||||
public static void DeletePipelineComponent(string pipelineComponentId)
|
public static void DeletePipelineComponent(string pipelineComponentId)
|
||||||
@@ -372,7 +457,7 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据管线材料id删除对应组件
|
/// 根据管线组件id删除对应组件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pipeLineMatId"></param>
|
/// <param name="pipeLineMatId"></param>
|
||||||
public static void DeletePipelineComponentByMatId(string pipeLineMatId)
|
public static void DeletePipelineComponentByMatId(string pipeLineMatId)
|
||||||
@@ -387,7 +472,7 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据管线id删除组件
|
/// 根据管线组件id删除组件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pipelineId"></param>
|
/// <param name="pipelineId"></param>
|
||||||
public static void DeletePipelineComponentBypipelineId(string pipelineId)
|
public static void DeletePipelineComponentBypipelineId(string pipelineId)
|
||||||
@@ -473,25 +558,4 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PipelineComponentPrintDto
|
|
||||||
|
|
||||||
{
|
|
||||||
public string PipelineComponentId { get; set; }
|
|
||||||
public string PipelineComponentCode { get; set; }
|
|
||||||
public string BoxNumber { get; set; }
|
|
||||||
public string UnitWorkName { get; set; }
|
|
||||||
public string PipelineId { get; set; }
|
|
||||||
public string PreUnit { get; set; }
|
|
||||||
public string AssembleUnit { get; set; }
|
|
||||||
public string PrefabricatedComponents { get; set; }
|
|
||||||
public string QRCode { get; set; }
|
|
||||||
public int? State { get; set; }
|
|
||||||
public string PlanStartDate { get; set; }
|
|
||||||
public string PipelineCode { get; set; }
|
|
||||||
public string FlowingSection { get; set; }
|
|
||||||
public string QRCode2 { get; set; }
|
|
||||||
public string MaterialCode { get; set; }
|
|
||||||
public bool? IsPrint { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,16 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineId == pipelineId);
|
return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineId == pipelineId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据流水段获取管线信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="flowingSection"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.HJGL_Pipeline GetPipelineByFlowingSection(string flowingSection)
|
||||||
|
{
|
||||||
|
return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.FlowingSection == flowingSection);
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据管线id获取管线状态
|
/// 根据管线id获取管线状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1561,6 +1561,7 @@
|
|||||||
<Content Include="HJGL\PreDesign\ProductionSchedulingPlan.aspx" />
|
<Content Include="HJGL\PreDesign\ProductionSchedulingPlan.aspx" />
|
||||||
<Content Include="HJGL\PreDesign\TrainNumberManager.aspx" />
|
<Content Include="HJGL\PreDesign\TrainNumberManager.aspx" />
|
||||||
<Content Include="HJGL\PreDesign\TrainNumberManageEdit.aspx" />
|
<Content Include="HJGL\PreDesign\TrainNumberManageEdit.aspx" />
|
||||||
|
<Content Include="HJGL\PreDesign\TrainNumberManagerView.aspx" />
|
||||||
<Content Include="HJGL\PreDesign\YardPlanning.aspx" />
|
<Content Include="HJGL\PreDesign\YardPlanning.aspx" />
|
||||||
<Content Include="HJGL\PreDesign\PipelingDivide.aspx" />
|
<Content Include="HJGL\PreDesign\PipelingDivide.aspx" />
|
||||||
<Content Include="HJGL\PreDesign\PipelingDivideChart.aspx" />
|
<Content Include="HJGL\PreDesign\PipelingDivideChart.aspx" />
|
||||||
@@ -10606,6 +10607,13 @@
|
|||||||
<Compile Include="HJGL\PreDesign\TrainNumberManageEdit.aspx.designer.cs">
|
<Compile Include="HJGL\PreDesign\TrainNumberManageEdit.aspx.designer.cs">
|
||||||
<DependentUpon>TrainNumberManageEdit.aspx</DependentUpon>
|
<DependentUpon>TrainNumberManageEdit.aspx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="HJGL\PreDesign\TrainNumberManagerView.aspx.cs">
|
||||||
|
<DependentUpon>TrainNumberManagerView.aspx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="HJGL\PreDesign\TrainNumberManagerView.aspx.designer.cs">
|
||||||
|
<DependentUpon>TrainNumberManagerView.aspx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="HJGL\PreDesign\YardPlanning.aspx.cs">
|
<Compile Include="HJGL\PreDesign\YardPlanning.aspx.cs">
|
||||||
<DependentUpon>YardPlanning.aspx</DependentUpon>
|
<DependentUpon>YardPlanning.aspx</DependentUpon>
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
|||||||
@@ -48,53 +48,19 @@
|
|||||||
<Toolbars>
|
<Toolbars>
|
||||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
|
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
|
||||||
<Items>
|
<Items>
|
||||||
|
<f:TextBox ID="txtPipelineCode2" runat="server" Label="管线号"
|
||||||
|
EmptyText="输入查询条件"
|
||||||
|
Width="240px" LabelWidth="100px" LabelAlign="Right">
|
||||||
|
</f:TextBox>
|
||||||
<f:TextBox ID="txtPipelineComponentCode" runat="server" Label="组件编号"
|
<f:TextBox ID="txtPipelineComponentCode" runat="server" Label="组件编号"
|
||||||
EmptyText="输入查询条件"
|
EmptyText="输入查询条件"
|
||||||
Width="240px" LabelWidth="100px" LabelAlign="Right">
|
Width="240px" LabelWidth="100px" LabelAlign="Right">
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
<f:DropDownList ID="drpState" Label="组件状态" runat="server"
|
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||||
ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px">
|
|
||||||
</f:DropDownList>
|
|
||||||
<f:DropDownList ID="drpProductionState" Label="生产状态" runat="server"
|
|
||||||
ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px">
|
|
||||||
</f:DropDownList>
|
|
||||||
<f:DropDownList ID="drpWeldingDailyCode" Label="日报编号" runat="server" AutoSelectFirstItem="true"
|
|
||||||
ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px">
|
|
||||||
</f:DropDownList>
|
|
||||||
<f:DropDownList ID="drpFlowingSection" Label="流水段" AutoPostBack="true"
|
|
||||||
runat="server" LabelWidth="80px"
|
|
||||||
Width="180px" LabelAlign="Left">
|
|
||||||
</f:DropDownList>
|
|
||||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
|
||||||
</f:ToolbarFill>
|
</f:ToolbarFill>
|
||||||
<f:Button ID="btnNew" Text="新增" Icon="Add" runat="server" OnClick="btnNew_Click" Hidden="true">
|
|
||||||
</f:Button>
|
|
||||||
<f:Button ID="btnSearch" Icon="SystemSearch" Text="查询"
|
<f:Button ID="btnSearch" Icon="SystemSearch" Text="查询"
|
||||||
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
|
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:Button ID="btnDelete" OnClick="btnDelete_Click" EnablePostBack="true"
|
|
||||||
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server"
|
|
||||||
Text="删除" Icon="Delete">
|
|
||||||
</f:Button>
|
|
||||||
</Items>
|
|
||||||
</f:Toolbar>
|
|
||||||
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
|
|
||||||
<Items>
|
|
||||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
|
||||||
</f:ToolbarFill>
|
|
||||||
<f:Button ID="btnRectification" Text="整改" ToolTip="整改" Icon="Accept" runat="server" OnClick="btnRectification_Click">
|
|
||||||
</f:Button>
|
|
||||||
<f:Button ID="btnAccept" Text="验收" ToolTip="验收" Icon="Accept" runat="server" OnClick="btnAccept_Click">
|
|
||||||
</f:Button>
|
|
||||||
<f:Button ID="btnImportQRCode" Text="导入二维码信息" ToolTip="导入二维码信息" Icon="PackageIn" runat="server" OnClick="btnImportQRCode_Click">
|
|
||||||
</f:Button>
|
|
||||||
<f:Button ID="btnBatchAdd" Text="批量增加" Icon="TableAdd" Hidden="true"
|
|
||||||
runat="server" OnClick="btnBatchAdd_Click">
|
|
||||||
</f:Button>
|
|
||||||
<f:Button ID="btnSinglePreview" ToolTip="管道预制加工图" Icon="PageRed" Text="管道预制加工图"
|
|
||||||
EnablePostBack="true" OnClick="btnSinglePreview_Click" runat="server">
|
|
||||||
</f:Button>
|
|
||||||
<f:Button ID="btnPrint" runat="server" Icon="Printer" EnableAjax="false" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
|
|
||||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出"
|
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出"
|
||||||
Icon="TableGo" EnableAjax="false" EnablePostBack="true">
|
Icon="TableGo" EnableAjax="false" EnablePostBack="true">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
@@ -103,69 +69,41 @@
|
|||||||
</Toolbars>
|
</Toolbars>
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="组件信息" ForceFit="false"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="组件信息" ForceFit="false"
|
||||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineComponentId" AllowCellEditing="true"
|
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineCode" AllowCellEditing="true"
|
||||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineComponentId"
|
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineCode"
|
||||||
AllowSorting="true" SortField="PipelineComponentCode" SortDirection="ASC" OnSort="Grid1_Sort" OnRowCommand="Grid1_RowCommand"
|
AllowSorting="true" SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange" EnableCheckBoxSelect="true"
|
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange">
|
||||||
EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
|
|
||||||
<Columns>
|
<Columns>
|
||||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
|
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
|
||||||
Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||||
<f:WindowField ColumnID="PipelineComponentCode" HeaderTextAlign="Center" TextAlign="Left"
|
<f:RenderField Width="220px" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode"
|
||||||
Width="180px" WindowID="Window1" HeaderText="组件编号" DataTextField="PipelineComponentCode"
|
FieldType="String" HeaderText="管线号" HeaderTextAlign="Center"
|
||||||
DataIFrameUrlFields="PipelineComponentId" DataIFrameUrlFormatString="PrePipelineEdit.aspx?PipelineComponentId={0}"
|
TextAlign="Left" Locked="true">
|
||||||
Title="组件编号" DataToolTipField="PipelineComponentCode" SortField="PipelineComponentCode"
|
</f:RenderField>
|
||||||
Locked="true">
|
<f:RenderField Width="220px" ColumnID="PipelineComponentCode" DataField="PipelineComponentCode" SortField="PipelineComponentCode"
|
||||||
</f:WindowField>
|
FieldType="String" HeaderText="组件编号" HeaderTextAlign="Center"
|
||||||
<%--<f:RenderField HeaderText="预制单位" ColumnID="PreUnit"
|
TextAlign="Left" Locked="true">
|
||||||
DataField="PreUnit" SortField="PreUnit" FieldType="String" HeaderTextAlign="Center"
|
</f:RenderField>
|
||||||
TextAlign="Left" Width="240px">
|
<f:RenderField Width="320px" ColumnID="matdef" DataField="matdef"
|
||||||
</f:RenderField>--%>
|
FieldType="String" HeaderText="预制散件材料描述" HeaderTextAlign="Center"
|
||||||
<f:RenderField Width="200px" ColumnID="BoxNumber" DataField="BoxNumber" SortField="BoxNumber"
|
|
||||||
FieldType="String" HeaderText="物流箱号" HeaderTextAlign="Center"
|
|
||||||
TextAlign="Left">
|
TextAlign="Left">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:TemplateField ColumnID="tfState" Width="200px" HeaderText="组件状态" HeaderTextAlign="Center"
|
<f:RenderField Width="80px" ColumnID="Number" DataField="Number"
|
||||||
TextAlign="Left">
|
FieldType="String" HeaderText="数量" HeaderTextAlign="Center"
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Label ID="lbstate" runat="server" Text='<%# ConvertState(Eval("State"))%>'></asp:Label>
|
|
||||||
</ItemTemplate>
|
|
||||||
</f:TemplateField>
|
|
||||||
<f:TemplateField ColumnID="tfProductionState" Width="200px" HeaderText="生产状态" HeaderTextAlign="Center"
|
|
||||||
TextAlign="Left">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Label ID="lbProductionState" runat="server" Text='<%# ConvertProductionState(Eval("ProductionState"))%>'></asp:Label>
|
|
||||||
</ItemTemplate>
|
|
||||||
</f:TemplateField>
|
|
||||||
<f:RenderCheckField Width="100px" ColumnID="IsPrint" DataField="IsPrint" HeaderText="是否已打印" EnableColumnEdit="False" />
|
|
||||||
<f:RenderField Width="200px" ColumnID="FlowingSection" DataField="FlowingSection" SortField="FlowingSection"
|
|
||||||
FieldType="String" HeaderText="流水段"
|
|
||||||
HeaderTextAlign="Center"
|
|
||||||
TextAlign="Left">
|
TextAlign="Left">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<%-- <f:TemplateField ColumnID="tfImageUrl1" Width="180px" HeaderText="组件二维码" HeaderTextAlign="Center"
|
<f:RenderField Width="150px" ColumnID="PackagingCode" DataField="PackagingCode"
|
||||||
TextAlign="Left">
|
FieldType="String" HeaderText="所在包装编号" HeaderTextAlign="Center"
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Label ID="lbImageUrl" runat="server" Text='<%# ConvertImageUrlByImage(Eval("QRCode"),Eval("PipelineComponentId")) %>'></asp:Label>
|
|
||||||
</ItemTemplate>
|
|
||||||
</f:TemplateField>--%>
|
|
||||||
<f:LinkButtonField Width="100px" TextAlign="Center" CommandName="PreviewQRCode" Text="二维码" EnableAjax="false" />
|
|
||||||
<f:RenderField Width="200px" ColumnID="DrawingName" DataField="DrawingName" SortField="DrawingName"
|
|
||||||
FieldType="String" HeaderText="预制图纸名称" HeaderTextAlign="Center"
|
|
||||||
TextAlign="Left">
|
TextAlign="Left">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="120px" ColumnID="PersonName" DataField="PersonName" FieldType="String"
|
<f:RenderField Width="110px" ColumnID="TrainNumber" DataField="TrainNumber"
|
||||||
HeaderText="验收人" HeaderTextAlign="Center" TextAlign="Center">
|
FieldType="String" HeaderText="车次" HeaderTextAlign="Center"
|
||||||
</f:RenderField>
|
TextAlign="Left">
|
||||||
<f:RenderField Width="120px" ColumnID="ReceiveDate" DataField="ReceiveDate" FieldType="String"
|
</f:RenderField>
|
||||||
HeaderText="验收时间" HeaderTextAlign="Center" TextAlign="Center">
|
<f:RenderField Width="150px" ColumnID="FlowingSection" DataField="FlowingSection"
|
||||||
</f:RenderField>
|
FieldType="String" HeaderText="流水段" HeaderTextAlign="Center"
|
||||||
<f:RenderField Width="200px" ColumnID="Remark" DataField="Remark" SortField="Remark"
|
|
||||||
FieldType="String" HeaderText="备注" HeaderTextAlign="Center"
|
|
||||||
TextAlign="Left">
|
TextAlign="Left">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:LinkButtonField Width="120px" TextAlign="Center" CommandName="cmd_print" Text="预览打印" />
|
|
||||||
|
|
||||||
</Columns>
|
</Columns>
|
||||||
<PageItems>
|
<PageItems>
|
||||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||||
@@ -186,22 +124,6 @@
|
|||||||
</f:Panel>
|
</f:Panel>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
<f:Window ID="Window1" Title="预制管线组件" Hidden="true" EnableIFrame="true"
|
|
||||||
EnableMaximize="true" Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close"
|
|
||||||
IsModal="true" Width="600px" Height="420px">
|
|
||||||
</f:Window>
|
|
||||||
<f:Window ID="Window2" Title="打印" Hidden="true" EnableIFrame="true"
|
|
||||||
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
|
|
||||||
IsModal="true" Width="1010px" Height="660px">
|
|
||||||
</f:Window>
|
|
||||||
<f:Window ID="Window3" Title="附件上传" Hidden="true" EnableIFrame="true"
|
|
||||||
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
|
|
||||||
IsModal="true" Width="1010px" Height="660px">
|
|
||||||
</f:Window>
|
|
||||||
<f:Window ID="Window4" Title="管道预制加工图" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
|
||||||
Target="Parent" EnableResize="true" runat="server" IsModal="false" EnableDrag="false" AutoScroll="true"
|
|
||||||
Width="800px" Height="600px">
|
|
||||||
</f:Window>
|
|
||||||
</form>
|
</form>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
using BLL;
|
using BLL;
|
||||||
using MiniExcelLibs;
|
using MiniExcelLibs;
|
||||||
using Model;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Drawing;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Web;
|
|
||||||
|
|
||||||
namespace FineUIPro.Web.HJGL.PreDesign
|
namespace FineUIPro.Web.HJGL.PreDesign
|
||||||
{
|
{
|
||||||
@@ -24,17 +20,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
{
|
{
|
||||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||||
this.InitTreeMenu();//加载树
|
this.InitTreeMenu();//加载树
|
||||||
HJGL_PipelineComponentService.InitMainItemDownList(drpState, true);
|
|
||||||
HJGL_PipelineComponentService.InitMainItemDownProductionStateList(drpProductionState, true);
|
|
||||||
|
|
||||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
|
||||||
select x.FlowingSection).Distinct().ToList();
|
|
||||||
this.drpFlowingSection.DataTextField = "Value";
|
|
||||||
this.drpFlowingSection.DataValueField = "Value";
|
|
||||||
this.drpFlowingSection.DataSource = pipeline;
|
|
||||||
this.drpFlowingSection.DataBind();
|
|
||||||
Funs.FineUIPleaseSelect(drpFlowingSection);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,11 +106,12 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
{
|
{
|
||||||
foreach (var q in unitWork2)
|
foreach (var q in unitWork2)
|
||||||
{
|
{
|
||||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == "1" && x.PipelineCode.Contains(txtPipelineCode.Text.Trim()) select x).Count();
|
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == "1" && x.PipelineCode.Contains(txtPipelineCode.Text.Trim()) select x.FlowingSection).Distinct().Count();
|
||||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||||
TreeNode tn2 = new TreeNode();
|
TreeNode tn2 = new TreeNode();
|
||||||
tn2.NodeID = q.UnitWorkId;
|
tn2.NodeID = q.UnitWorkId;
|
||||||
tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
//tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||||
|
tn2.Text = q.UnitWorkName;
|
||||||
if (q.UnitWorkId == this.hdUnitWorkId.Text)
|
if (q.UnitWorkId == this.hdUnitWorkId.Text)
|
||||||
{
|
{
|
||||||
tn2.Expanded = true;
|
tn2.Expanded = true;
|
||||||
@@ -153,43 +139,43 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
|
|
||||||
private void BindNodes(TreeNode node)
|
private void BindNodes(TreeNode node)
|
||||||
{
|
{
|
||||||
List<Model.HJGL_Pipeline> pipeline = new List<Model.HJGL_Pipeline>();
|
List<string> flowingSection = new List<string>();
|
||||||
var pipelines = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.PipeArea == "1" select x;
|
//List<Model.HJGL_Pipeline> pipeline = new List<Model.HJGL_Pipeline>();
|
||||||
pipeline = (from x in pipelines
|
var list = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.PipeArea == "1" && x.UnitWorkId == node.NodeID && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x.FlowingSection).ToList();
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
flowingSection = list.Where(x => !string.IsNullOrWhiteSpace(x) == true).Distinct().OrderBy(x => x).ToList();
|
||||||
orderby x.PipelineCode
|
//int pageindex = int.Parse(node.CommandName.Split('|')[0]);
|
||||||
select x).ToList();
|
//int pageCount = int.Parse(node.CommandName.Split('|')[1]);
|
||||||
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
|
//if (pageindex <= pageCount)
|
||||||
int pageCount = int.Parse(node.CommandName.Split('|')[1]);
|
//{
|
||||||
if (pageindex <= pageCount)
|
// flowingSection = flowingSection.Skip(pageSize * (pageindex - 1)).Take(pageSize).ToList();
|
||||||
|
foreach (var item in flowingSection)
|
||||||
{
|
{
|
||||||
pipeline = pipeline.Skip(pageSize * (pageindex - 1)).Take(pageSize).ToList();
|
//var comCount = (from x in Funs.DB.HJGL_Pipeline_Component where x.PipelineId == item.PipelineId select x).Count();
|
||||||
foreach (var item in pipeline)
|
|
||||||
{
|
|
||||||
var comCount = (from x in Funs.DB.HJGL_Pipeline_Component where x.PipelineId == item.PipelineId select x).Count();
|
|
||||||
TreeNode newNode = new TreeNode();
|
TreeNode newNode = new TreeNode();
|
||||||
newNode.Text = item.PipelineCode + "【" + comCount.ToString() + " " + "组件" + "】";
|
//newNode.Text = item.PipelineCode + "【" + comCount.ToString() + " " + "组件" + "】";
|
||||||
newNode.ToolTip = "管线号【组件数】";
|
newNode.Text = item;
|
||||||
newNode.CommandName = "管线";
|
newNode.ToolTip = "流水段";
|
||||||
newNode.NodeID = item.PipelineId;
|
newNode.CommandName = "流水段";
|
||||||
newNode.EnableClickEvent = true;
|
|
||||||
node.Nodes.Add(newNode);
|
|
||||||
}
|
|
||||||
if (pageindex < pageCount)
|
|
||||||
{
|
|
||||||
TreeNode newNode = new TreeNode();
|
|
||||||
newNode.Text = "加载";
|
|
||||||
newNode.NodeID = SQLHelper.GetNewID();
|
newNode.NodeID = SQLHelper.GetNewID();
|
||||||
newNode.CommandName = "加载";
|
|
||||||
newNode.Icon = Icon.ArrowDown;
|
|
||||||
newNode.EnableClickEvent = true;
|
newNode.EnableClickEvent = true;
|
||||||
node.Nodes.Add(newNode);
|
node.Nodes.Add(newNode);
|
||||||
}
|
}
|
||||||
|
// if (pageindex < pageCount)
|
||||||
|
// {
|
||||||
|
// TreeNode newNode = new TreeNode();
|
||||||
|
// newNode.Text = "加载";
|
||||||
|
// newNode.NodeID = "加载";
|
||||||
|
// //newNode.NodeID = SQLHelper.GetNewID();
|
||||||
|
// newNode.CommandName = "加载";
|
||||||
|
// newNode.Icon = Icon.ArrowDown;
|
||||||
|
// newNode.EnableClickEvent = true;
|
||||||
|
// node.Nodes.Add(newNode);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Node.Nodes[0].NodeID == "加载流水段...")
|
if (e.Node.Nodes[0].NodeID == "加载流水段...")
|
||||||
@@ -197,8 +183,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
e.Node.Nodes.Clear();
|
e.Node.Nodes.Clear();
|
||||||
BindNodes(e.Node);
|
BindNodes(e.Node);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 点击TreeView
|
#region 点击TreeView
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 点击TreeView
|
/// 点击TreeView
|
||||||
@@ -207,30 +193,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.CommandName.Split('|').Length == 2)
|
if (e.CommandName == "流水段")
|
||||||
{
|
{
|
||||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID;
|
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByFlowingSection(this.tvControlItem.SelectedNode.Text);
|
||||||
|
|
||||||
WeldingDailyService.InitDownListByUnitWortId(drpWeldingDailyCode, true, this.tvControlItem.SelectedNodeID);
|
|
||||||
|
|
||||||
}
|
|
||||||
else if (e.CommandName == "管线")
|
|
||||||
{
|
|
||||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
|
||||||
this.hdUnitWorkId.Text = string.Empty;
|
this.hdUnitWorkId.Text = string.Empty;
|
||||||
if (pipeline != null)
|
if (pipeline != null)
|
||||||
{
|
{
|
||||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (e.CommandName == "加载")
|
|
||||||
{
|
|
||||||
string CommandName = e.Node.ParentNode.CommandName;
|
|
||||||
e.Node.ParentNode.CommandName = (int.Parse(CommandName.Split('|')[0]) + 1) + "|" + int.Parse(CommandName.Split('|')[1]);
|
|
||||||
TreeNode treeNode = e.Node.ParentNode;
|
|
||||||
treeNode.Nodes.Remove(e.Node);
|
|
||||||
BindNodes(e.Node.ParentNode);
|
|
||||||
}
|
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@@ -240,67 +211,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
/// 数据绑定
|
/// 数据绑定
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void BindGrid()
|
private void BindGrid()
|
||||||
|
|
||||||
{
|
{
|
||||||
if (tvControlItem.SelectedNode == null) return;
|
if (tvControlItem.SelectedNode == null) return;
|
||||||
string strSql = @" SELECT distinct com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,com.Remark,
|
DataTable tb = BindData();
|
||||||
com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,com.IsPrint,
|
|
||||||
com.QRCode,com.State,com.ProductionState,pipe.PlanStartDate,pipe.FlowingSection,com.DrawingName,com.ReceiveDate,
|
|
||||||
person.PersonName
|
|
||||||
FROM HJGL_Pipeline_Component com
|
|
||||||
LEFT JOIN HJGL_Pipeline pipe ON pipe.PipelineId =com.PipelineId
|
|
||||||
LEFT JOIN dbo.Base_Unit punit ON punit.UnitId=com.PreUnit
|
|
||||||
LEFT JOIN dbo.Base_Unit aunit ON aunit.UnitId=com.AssembleUnit
|
|
||||||
LEFT JOIN Person_Persons person on com.ReceiveMan=person.PersonId
|
|
||||||
LEFT JOIN HJGL_WeldJoint joint on joint.PipelineId =com.PipelineId
|
|
||||||
WHERE 1=1 ";
|
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
|
||||||
|
|
||||||
|
|
||||||
if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2)
|
|
||||||
{
|
|
||||||
strSql += " and pipe.UnitWorkId =@UnitWorkId";
|
|
||||||
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
|
||||||
|
|
||||||
}
|
|
||||||
else if (tvControlItem.SelectedNode.CommandName == "管线")
|
|
||||||
{
|
|
||||||
strSql += " and com.PipelineId = @PipelineId ";
|
|
||||||
listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (drpWeldingDailyCode.SelectedValue != Const._Null && !string.IsNullOrEmpty(drpWeldingDailyCode.SelectedValue))
|
|
||||||
{
|
|
||||||
strSql += " and joint.WeldingDailyId = @WeldingDailyId ";
|
|
||||||
listStr.Add(new SqlParameter("@WeldingDailyId", drpWeldingDailyCode.SelectedValue));
|
|
||||||
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(txtPipelineComponentCode.Text))
|
|
||||||
{
|
|
||||||
strSql += " AND com.PipelineComponentCode like @PipelineComponentCode";
|
|
||||||
listStr.Add(new SqlParameter("@PipelineComponentCode", "%" + this.txtPipelineComponentCode.Text.Trim() + "%"));
|
|
||||||
|
|
||||||
}
|
|
||||||
if (drpState.SelectedValue != Const._Null)
|
|
||||||
{
|
|
||||||
strSql += " AND com.State =@State";
|
|
||||||
listStr.Add(new SqlParameter("@State", drpState.SelectedValue));
|
|
||||||
|
|
||||||
}
|
|
||||||
if (drpProductionState.SelectedValue != Const._Null)
|
|
||||||
{
|
|
||||||
strSql += " AND com.ProductionState =@ProductionState";
|
|
||||||
listStr.Add(new SqlParameter("@ProductionState", drpProductionState.SelectedValue.ToString()));
|
|
||||||
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
|
|
||||||
{
|
|
||||||
strSql += " AND pipe.FlowingSection =@FlowingSection";
|
|
||||||
listStr.Add(new SqlParameter("@FlowingSection", drpFlowingSection.SelectedValue.ToString()));
|
|
||||||
}
|
|
||||||
SqlParameter[] parameter = listStr.ToArray();
|
|
||||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
|
||||||
GridDataTable = tb;
|
GridDataTable = tb;
|
||||||
// 2.获取当前分页数据
|
// 2.获取当前分页数据
|
||||||
Grid1.RecordCount = tb.Rows.Count;
|
Grid1.RecordCount = tb.Rows.Count;
|
||||||
@@ -308,6 +221,78 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
Grid1.DataSource = table;
|
Grid1.DataSource = table;
|
||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询数据
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
private DataTable BindData()
|
||||||
|
{
|
||||||
|
string strSql = @"WITH cte as (select pipeline.PipelineCode as PipelineCode,
|
||||||
|
comonent.PipelineComponentCode as PipelineComponentCode,
|
||||||
|
'' as matdef,
|
||||||
|
packdetail.Number as Number,
|
||||||
|
pack.PackagingCode as PackagingCode,
|
||||||
|
trainnumber.TrainNumber as TrainNumber,
|
||||||
|
pipeline.FlowingSection as FlowingSection,
|
||||||
|
pipeline.UnitWorkId as UnitWorkId
|
||||||
|
from HJGL_Pipeline pipeline
|
||||||
|
left join HJGL_PackagingManageDetail packdetail on pipeline.PipelineId = packdetail.PipelineId
|
||||||
|
left join HJGL_Pipeline_Component comonent
|
||||||
|
on packdetail.PipelineComponentId = comonent.PipelineComponentId
|
||||||
|
left join HJGL_PackagingManage pack on packdetail.PackagingManageId = pack.PackagingManageId
|
||||||
|
left join HJGL_TrainNumberManage trainnumber on pack.TrainNumberId = TrainNumber.Id
|
||||||
|
where (packdetail.PipelineComponentId is not null or packdetail.PipelineComponentId != '')
|
||||||
|
union all
|
||||||
|
select pipeline.PipelineCode as PipelineCode,
|
||||||
|
packdetail.MaterialCode as PipelineComponentCode,
|
||||||
|
matlib.MaterialDef as matdef,
|
||||||
|
packdetail.Number as Number,
|
||||||
|
pack.PackagingCode as PackagingCode,
|
||||||
|
trainnumber.TrainNumber as TrainNumber,
|
||||||
|
pipeline.FlowingSection as FlowingSection,
|
||||||
|
pipeline.UnitWorkId as UnitWorkId
|
||||||
|
from HJGL_Pipeline pipeline
|
||||||
|
left join HJGL_PackagingManageDetail packdetail on pipeline.PipelineId = packdetail.PipelineId
|
||||||
|
left join HJGL_MaterialCodeLib matlib on packdetail.MaterialCode = matlib.MaterialCode
|
||||||
|
left join HJGL_PackagingManage pack on packdetail.PackagingManageId = pack.PackagingManageId
|
||||||
|
left join HJGL_TrainNumberManage trainnumber on pack.TrainNumberId = TrainNumber.Id
|
||||||
|
where (packdetail.PipelineComponentId is null or packdetail.PipelineComponentId = ''))
|
||||||
|
SELECT * FROM cte WHERE 1=1 ";
|
||||||
|
|
||||||
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
|
if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2)
|
||||||
|
{
|
||||||
|
strSql += " and cte.UnitWorkId =@UnitWorkId";
|
||||||
|
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||||
|
}
|
||||||
|
else if (tvControlItem.SelectedNode.CommandName == "流水段")
|
||||||
|
{
|
||||||
|
strSql += " and cte.FlowingSection = @FlowingSection ";
|
||||||
|
listStr.Add(new SqlParameter("@FlowingSection", this.tvControlItem.SelectedNode.Text));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(txtPipelineCode2.Text))
|
||||||
|
{
|
||||||
|
strSql += " AND cte.PipelineCode like @PipelineCode";
|
||||||
|
listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode2.Text.Trim() + "%"));
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(txtPipelineComponentCode.Text))
|
||||||
|
{
|
||||||
|
strSql += " AND cte.PipelineComponentCode like @PipelineComponentCode";
|
||||||
|
listStr.Add(new SqlParameter("@PipelineComponentCode", "%" + this.txtPipelineComponentCode.Text.Trim() + "%"));
|
||||||
|
}
|
||||||
|
//if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
|
||||||
|
//{
|
||||||
|
// strSql += " AND cte.FlowingSection =@FlowingSection";
|
||||||
|
// listStr.Add(new SqlParameter("@FlowingSection", drpFlowingSection.SelectedValue.ToString()));
|
||||||
|
//}
|
||||||
|
strSql += " ORDER BY PipelineCode,PipelineComponentCode ";
|
||||||
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
|
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
|
return tb;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 分页排序
|
#region 分页排序
|
||||||
@@ -347,166 +332,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
BindGrid();
|
BindGrid();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 管线组件信息 维护事件
|
#region 查询事件
|
||||||
/// <summary>
|
|
||||||
/// Grid双击事件
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
|
||||||
{
|
|
||||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_PrePipelineMenuId, BLL.Const.BtnModify))
|
|
||||||
{
|
|
||||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PrePipelineEdit.aspx?PipelineComponentId={0}", Grid1.SelectedRowID, "编辑 - ")));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
protected void btnPrint_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (Print(Grid1.SelectedRowIDArray))
|
|
||||||
{
|
|
||||||
|
|
||||||
HJGL_PipelineComponentService.UpdateIsPrint(Grid1.SelectedRowIDArray); //打印后修改打印状态
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private bool Print(string[] PipelineComponentId)
|
|
||||||
{
|
|
||||||
BLL.FastReportService.ResetData();
|
|
||||||
|
|
||||||
var result = HJGL_PipelineComponentService.GetPrintModelByPipelineComponentIds(PipelineComponentId, null, false);
|
|
||||||
var tb = LINQToDataTable(result);
|
|
||||||
if (tb != null && tb.Rows.Count > 0)
|
|
||||||
{
|
|
||||||
tb.TableName = "Table1";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ShowNotify("请查看组件是否上传二维码!", MessageBoxIcon.Question);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
BLL.FastReportService.AddFastreportTable(tb);
|
|
||||||
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)));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 增加焊口信息
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
protected void btnNew_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_PrePipelineMenuId, Const.BtnAdd))
|
|
||||||
{
|
|
||||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
|
||||||
if (pipeline != null)
|
|
||||||
{
|
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PrePipelineEdit.aspx?PipelineId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ShowNotify("请选择管线!", MessageBoxIcon.Warning);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 批量增加焊口信息
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
protected void btnBatchAdd_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_PrePipelineMenuId, Const.BtnAdd))
|
|
||||||
{
|
|
||||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
|
||||||
if (pipeline != null)
|
|
||||||
{
|
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PrePipelineBatchEdit.aspx?PipelineId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ShowNotify("请选择管线!", MessageBoxIcon.Warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除按钮
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
protected void btnDelete_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_PrePipelineMenuId, Const.BtnDelete))
|
|
||||||
{
|
|
||||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
|
||||||
{
|
|
||||||
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
|
||||||
{
|
|
||||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
|
||||||
BLL.HJGL_PipelineComponentService.DeletePipelineComponent(rowID);
|
|
||||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
|
||||||
|
|
||||||
}
|
|
||||||
//this.InitTreeMenu();//加载树
|
|
||||||
this.BindGrid();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
|
||||||
{
|
|
||||||
if (e.CommandName == "PreviewQRCode")
|
|
||||||
{
|
|
||||||
var ID = e.RowID;
|
|
||||||
var q = HJGL_PipelineComponentService.GetPipelineComponentById(ID);
|
|
||||||
string path = "";
|
|
||||||
if (!string.IsNullOrEmpty(q.QRCode))
|
|
||||||
{
|
|
||||||
path = BLL.CreateQRCodeService.CreateCode_Simple(q.QRCode, ID);
|
|
||||||
if (!string.IsNullOrEmpty(path))
|
|
||||||
{
|
|
||||||
string filepath = Funs.SGGLUrl + path.Replace("\\", "//");
|
|
||||||
|
|
||||||
ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script type='text/javascript'>window.open('" + filepath + "');</script>");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
protected void btnSearch_Click(object sender, EventArgs e)
|
protected void btnSearch_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
BindGrid();
|
BindGrid();
|
||||||
@@ -514,17 +344,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 关闭弹出窗口及刷新页面
|
#region 刷新页面
|
||||||
/// <summary>
|
|
||||||
/// 关闭弹出窗口
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
|
||||||
{
|
|
||||||
//this.InitTreeMenu();//加载树
|
|
||||||
this.BindGrid();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询
|
/// 查询
|
||||||
@@ -538,40 +358,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
protected void btnTreeFind_Click1(object sender, EventArgs e)
|
protected void btnTreeFind_Click1(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.InitTreeMenu();
|
this.InitTreeMenu();
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 搜索
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
public string ConvertImageUrlByImage(object str, object id)
|
|
||||||
{
|
|
||||||
string path = string.Empty;
|
|
||||||
if (!string.IsNullOrEmpty(str.ToString()))
|
|
||||||
{
|
|
||||||
path = BLL.CreateQRCodeService.CreateCode_Simple(str.ToString(), id.ToString());
|
|
||||||
path = HttpUtility.HtmlDecode(BLL.UploadAttachmentService.ShowImage("../../", path));
|
|
||||||
|
|
||||||
}
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
public string ConvertState(object state)
|
|
||||||
{
|
|
||||||
string StateName = string.Empty;
|
|
||||||
if (state != null)
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(state.ToString()))
|
|
||||||
{
|
|
||||||
string txt = HJGL_PipelineComponentService.GetState().FirstOrDefault(x => x.Value == state.ToString()).Text;
|
|
||||||
return txt;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return StateName;
|
|
||||||
}
|
|
||||||
public string ConvertProductionState(object state)
|
public string ConvertProductionState(object state)
|
||||||
{
|
{
|
||||||
string StateName = string.Empty;
|
string StateName = string.Empty;
|
||||||
@@ -579,96 +368,18 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(state.ToString()))
|
if (!string.IsNullOrEmpty(state.ToString()))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
string txt = HJGL_PipelineComponentService.GetProductionState().FirstOrDefault(x => x.Value == state.ToString()).Text;
|
string txt = HJGL_PipelineComponentService.GetProductionState().FirstOrDefault(x => x.Value == state.ToString()).Text;
|
||||||
|
|
||||||
return txt;
|
return txt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return StateName;
|
return StateName;
|
||||||
}
|
}
|
||||||
protected void btnImportQRCode_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("PrePipelineQRCodeIn.aspx?", "导入 - ")));
|
|
||||||
|
|
||||||
}
|
|
||||||
protected void btnSinglePreview_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
//string httpUrl = @"FileUpload\HJGL_DataImport\095e9691-99c2-4f70-8e67-e70c8fa6be9c\2022-06\管道焊接工作记录.pdf";
|
|
||||||
//var newurl = Funs.SGGLUrl + httpUrl.Replace(Funs.RootPath, "");
|
|
||||||
var id = Grid1.SelectedRowID;
|
|
||||||
if (string.IsNullOrEmpty(id))
|
|
||||||
{
|
|
||||||
ShowNotify("请选择相对应的管道预制加工图", MessageBoxIcon.Warning);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var SingleName = (from x in Funs.DB.HJGL_Pipeline_Component where x.PipelineComponentId == id select (x.DrawingName)).FirstOrDefault();
|
|
||||||
var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, "3", this.CurrUser.LoginProjectId);
|
|
||||||
if (filemodel != null)
|
|
||||||
{
|
|
||||||
string httpUrl = filemodel.FilePath;
|
|
||||||
PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("~/AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -")));
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ShowNotify("请上传相关管道预制加工图", MessageBoxIcon.Warning);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void btnAccept_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (Grid1.SelectedRowIDArray.Length > 0)
|
|
||||||
{
|
|
||||||
|
|
||||||
foreach (var item in Grid1.SelectedRowIDArray)
|
|
||||||
{
|
|
||||||
var model = HJGL_PipelineComponentService.GetPipelineComponentById(item);
|
|
||||||
if (model.ProductionState == 2)
|
|
||||||
{
|
|
||||||
BLL.APIPipelineComponentService.GetComponentConfirmArrival(PipelineComponentId: item, this.CurrUser.PersonId, ""); ;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ShowNotify("操作成功", MessageBoxIcon.Success);
|
|
||||||
BindGrid();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ShowNotify("请选择需要验收的数据", MessageBoxIcon.Warning);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
protected void btnRectification_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (Grid1.SelectedRowIDArray.Length > 0)
|
|
||||||
{
|
|
||||||
|
|
||||||
foreach (var item in Grid1.SelectedRowIDArray)
|
|
||||||
{
|
|
||||||
var model = HJGL_PipelineComponentService.GetPipelineComponentById(item);
|
|
||||||
if (model.State == HJGL_PipelineComponentService.StatePenRec)
|
|
||||||
{
|
|
||||||
model.State = HJGL_PipelineComponentService.StateRec;
|
|
||||||
HJGL_PipelineComponentService.UpdatePipelineComponent(model);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ShowNotify("操作成功", MessageBoxIcon.Success);
|
|
||||||
BindGrid();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ShowNotify("请选择需要整改的数据", MessageBoxIcon.Warning);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 导出
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
protected void btnOut_Click(object sender, EventArgs e)
|
protected void btnOut_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (GridDataTable != null)
|
if (GridDataTable != null)
|
||||||
@@ -676,21 +387,20 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
var q = (from x in GridDataTable.AsEnumerable()
|
var q = (from x in GridDataTable.AsEnumerable()
|
||||||
select new
|
select new
|
||||||
{
|
{
|
||||||
|
管线号 = x.Field<string>("PipelineCode"),
|
||||||
组件编号 = x.Field<string>("PipelineComponentCode"),
|
组件编号 = x.Field<string>("PipelineComponentCode"),
|
||||||
物流箱号 = x.Field<string>("BoxNumber"),
|
预制散件材料描述 = !string.IsNullOrWhiteSpace(x.Field<string>("matdef")) ? x.Field<string>("matdef") : "-",
|
||||||
组件状态 = ConvertState(x.Field<object>("State")),
|
数量 = x.Field<string>("Number"),
|
||||||
生产状态 = ConvertProductionState(x.Field<object>("ProductionState")),
|
所在包装编号 = x.Field<string>("PackagingCode"),
|
||||||
管线计划安装日期 = x.Field<DateTime?>("PlanStartDate"),
|
车次 = x.Field<string>("TrainNumber"),
|
||||||
预制图纸名称 = x.Field<string>("DrawingName"),
|
流水段 = x.Field<string>("FlowingSection")
|
||||||
验收人 = x.Field<string>("PersonName"),
|
|
||||||
验收时间 = x.Field<DateTime?>("ReceiveDate"),
|
|
||||||
});
|
});
|
||||||
string path = Funs.RootPath + @"File\Excel\Temp\PrePipeline.xlsx";
|
string path = Funs.RootPath + @"File\Excel\Temp\PrePipelineInstallList.xlsx";
|
||||||
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
|
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HHmm}", DateTime.Now) + ".xlsx");
|
||||||
|
|
||||||
MiniExcel.SaveAs(path, q);
|
MiniExcel.SaveAs(path, q);
|
||||||
|
|
||||||
string fileName = "组件信息.xlsx";
|
string fileName = $"安装清单({(string.Format("{0:yyyy-MM-dd-HHmm}", DateTime.Now))}).xlsx";
|
||||||
FileInfo info = new FileInfo(path);
|
FileInfo info = new FileInfo(path);
|
||||||
long fileSize = info.Length;
|
long fileSize = info.Length;
|
||||||
System.Web.HttpContext.Current.Response.Clear();
|
System.Web.HttpContext.Current.Response.Clear();
|
||||||
@@ -702,9 +412,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
System.Web.HttpContext.Current.Response.Close();
|
System.Web.HttpContext.Current.Response.Close();
|
||||||
File.Delete(path);
|
File.Delete(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+11
-182
@@ -113,6 +113,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Toolbar Toolbar3;
|
protected global::FineUIPro.Toolbar Toolbar3;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtPipelineCode2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtPipelineCode2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtPipelineComponentCode 控件。
|
/// txtPipelineComponentCode 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -122,87 +131,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtPipelineComponentCode;
|
protected global::FineUIPro.TextBox txtPipelineComponentCode;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// drpState 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.DropDownList drpState;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// drpProductionState 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.DropDownList drpProductionState;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// drpWeldingDailyCode 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.DropDownList drpWeldingDailyCode;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// drpFlowingSection 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.DropDownList drpFlowingSection;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// ToolbarFill1 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnNew 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Button btnNew;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnSearch 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Button btnSearch;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnDelete 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Button btnDelete;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Toolbar4 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Toolbar Toolbar4;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarFill2 控件。
|
/// ToolbarFill2 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -213,58 +141,13 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnRectification 控件。
|
/// btnSearch 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnRectification;
|
protected global::FineUIPro.Button btnSearch;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnAccept 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Button btnAccept;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnImportQRCode 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Button btnImportQRCode;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnBatchAdd 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Button btnBatchAdd;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnSinglePreview 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Button btnSinglePreview;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnPrint 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Button btnPrint;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnOut 控件。
|
/// btnOut 控件。
|
||||||
@@ -284,24 +167,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Grid Grid1;
|
protected global::FineUIPro.Grid Grid1;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// lbstate 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::System.Web.UI.WebControls.Label lbstate;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// lbProductionState 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::System.Web.UI.WebControls.Label lbProductionState;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarSeparator1 控件。
|
/// ToolbarSeparator1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -328,41 +193,5 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Window1 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Window Window1;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Window2 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Window Window2;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Window3 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Window Window3;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Window4 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Window Window4;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,9 @@
|
|||||||
<f:RenderField Width="120px" ColumnID="PackagingCode" DataField="PackagingCode"
|
<f:RenderField Width="120px" ColumnID="PackagingCode" DataField="PackagingCode"
|
||||||
FieldType="String" HeaderText="包装编号" HeaderTextAlign="Center" TextAlign="Center">
|
FieldType="String" HeaderText="包装编号" HeaderTextAlign="Center" TextAlign="Center">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="120px" ColumnID="TypeString" DataField="TypeString"
|
||||||
|
FieldType="String" HeaderText="包装编号" HeaderTextAlign="Center" TextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
<%--<f:RenderField Width="120px" ColumnID="PlanStartDate" DataField="PlanStartDate" FieldType="String"
|
<%--<f:RenderField Width="120px" ColumnID="PlanStartDate" DataField="PlanStartDate" FieldType="String"
|
||||||
HeaderText="最早安装时间" HeaderTextAlign="Center" TextAlign="Center">
|
HeaderText="最早安装时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||||
</f:RenderField>--%>
|
</f:RenderField>--%>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using BLL;
|
using BLL;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -34,17 +35,16 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
drpTypeInt.DataBind();
|
drpTypeInt.DataBind();
|
||||||
|
|
||||||
|
|
||||||
BindGrid();
|
|
||||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||||
if (!string.IsNullOrEmpty(PackagingManageId))
|
if (!string.IsNullOrEmpty(PackagingManageId))
|
||||||
{
|
{
|
||||||
var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId);
|
var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId);
|
||||||
|
drpTypeInt.Enabled = false;
|
||||||
txtPackagingCode.Text = model.PackagingCode;
|
txtPackagingCode.Text = model.PackagingCode;
|
||||||
dropPipelineComponentCode.Values = model.PipelineComponentId?.Split(',');
|
dropPipelineComponentCode.Values = model.PipelineComponentId?.Split(',');
|
||||||
txtStackingPosition.Text = model.StackingPosition;
|
txtStackingPosition.Text = model.StackingPosition;
|
||||||
drpTrainNumber.SelectedValue = model.TrainNumberId;
|
drpTrainNumber.SelectedValue = model.TrainNumberId;
|
||||||
drpTypeInt.SelectedValue = model.TypeInt.ToString();
|
drpTypeInt.SelectedValue = model.TypeInt.ToString();
|
||||||
BindGrid2(this.PackagingManageId);
|
|
||||||
if (model.State== HJGL_PackagingmanageService.state_0)
|
if (model.State== HJGL_PackagingmanageService.state_0)
|
||||||
{
|
{
|
||||||
btnSave.Hidden = false;
|
btnSave.Hidden = false;
|
||||||
@@ -52,9 +52,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
drpTypeInt.Enabled = true;
|
||||||
btnSave.Hidden = false;
|
btnSave.Hidden = false;
|
||||||
txtPackagingCode.Text = ProjectService.GetProjectCodeByProjectId(this.CurrUser.LoginProjectId)+"-"+ string.Format("{0:yyyyMMdd}", DateTime.Now)+"-";
|
txtPackagingCode.Text = HJGL_PackagingmanageService.GetNewPackagingCode(this.CurrUser.LoginProjectId);
|
||||||
|
|
||||||
}
|
}
|
||||||
drpTypeInt_SelectedIndexChanged(null, null);
|
drpTypeInt_SelectedIndexChanged(null, null);
|
||||||
}
|
}
|
||||||
@@ -70,26 +70,10 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
|
|
||||||
private void BindGrid2(string PackagingManageId)
|
private void BindGrid2(string PackagingManageId)
|
||||||
{
|
{
|
||||||
Grid2.DataSource = PackagingmanagedetailService.GetPackagingData(PackagingManageId);
|
Grid2.DataSource = HJGLPackagingmanagedetailService.GetPackagingData(PackagingManageId);
|
||||||
Grid2.DataBind();
|
Grid2.DataBind();
|
||||||
}
|
}
|
||||||
|
|
||||||
//protected void drpPipelineComponentCode_SelectedIndexChanged(object sender, EventArgs e)
|
|
||||||
//{
|
|
||||||
// if (!string .IsNullOrEmpty(drpPipelineComponentCode.SelectedValue))
|
|
||||||
// {
|
|
||||||
// var model_Component = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(drpPipelineComponentCode.SelectedValue);
|
|
||||||
// var model_pipe=BLL.PipelineService.GetPipelineByPipelineId(model_Component.PipelineId);
|
|
||||||
// txtPlanStartDate.Text= model_Component.PlanStartDate.ToString();
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// txtPlanStartDate.Text =String.Empty;
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
protected void btnSave_Click(object sender, EventArgs e)
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Save();
|
Save();
|
||||||
@@ -112,7 +96,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
//table.ContactPhone = txtContactPhone.Text;
|
//table.ContactPhone = txtContactPhone.Text;
|
||||||
table.TrainNumberId = drpTrainNumber.SelectedValue;
|
table.TrainNumberId = drpTrainNumber.SelectedValue;
|
||||||
table.TypeInt = int.Parse(drpTypeInt.SelectedValue);
|
table.TypeInt = int.Parse(drpTypeInt.SelectedValue);
|
||||||
if (drpTypeInt.SelectedValue == HJGL_PackagingmanageService.TypeInt.预制组件.ToString())
|
if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.预制组件).ToString())
|
||||||
{
|
{
|
||||||
table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values);
|
table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values);
|
||||||
|
|
||||||
@@ -134,7 +118,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
//table.ContactPhone =txtContactPhone.Text;
|
//table.ContactPhone =txtContactPhone.Text;
|
||||||
table.TrainNumberId = drpTrainNumber.SelectedValue;
|
table.TrainNumberId = drpTrainNumber.SelectedValue;
|
||||||
table.TypeInt = int.Parse(drpTypeInt.SelectedValue);
|
table.TypeInt = int.Parse(drpTypeInt.SelectedValue);
|
||||||
if (drpTypeInt.SelectedValue == HJGL_PackagingmanageService.TypeInt.预制组件.ToString())
|
if (drpTypeInt.SelectedValue ==((int)HJGL_PackagingmanageService.TypeInt.预制组件).ToString())
|
||||||
{
|
{
|
||||||
table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values);
|
table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values);
|
||||||
|
|
||||||
@@ -142,6 +126,29 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
}
|
}
|
||||||
BLL.HJGL_PackagingmanageService.UpdateHJGL_PackagingManage(table);
|
BLL.HJGL_PackagingmanageService.UpdateHJGL_PackagingManage(table);
|
||||||
}
|
}
|
||||||
|
SaveDetail();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SaveDetail()
|
||||||
|
{
|
||||||
|
|
||||||
|
//根据列表中的明细项添加
|
||||||
|
List<Model.PipelinePrefabricatedComponentsItem> detailLists = new List<Model.PipelinePrefabricatedComponentsItem>();
|
||||||
|
JArray teamGroupData = Grid2.GetMergedData();
|
||||||
|
foreach (JObject teamGroupRow in teamGroupData)
|
||||||
|
{
|
||||||
|
JObject values = teamGroupRow.Value<JObject>("values");
|
||||||
|
int rowIndex = teamGroupRow.Value<int>("index");
|
||||||
|
string id = teamGroupRow.Value<string>("id");
|
||||||
|
|
||||||
|
var mdoel = HJGLPackagingmanagedetailService.GetModelById(id);
|
||||||
|
if (mdoel != null)
|
||||||
|
{
|
||||||
|
mdoel.Number = values.Value<decimal>("Number");
|
||||||
|
}
|
||||||
|
HJGLPackagingmanagedetailService.Update(mdoel);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void btnFind_Click1(object sender, EventArgs e)
|
protected void btnFind_Click1(object sender, EventArgs e)
|
||||||
@@ -175,16 +182,25 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
{
|
{
|
||||||
dropPipelineComponentCode.Hidden=false;
|
dropPipelineComponentCode.Hidden=false;
|
||||||
Grid2.Hidden=true;
|
Grid2.Hidden=true;
|
||||||
|
BindGrid();
|
||||||
}
|
}
|
||||||
else if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.预制散件).ToString())
|
else if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.预制散件).ToString())
|
||||||
{
|
{
|
||||||
dropPipelineComponentCode.Hidden = true;
|
dropPipelineComponentCode.Hidden = true;
|
||||||
Grid2.Hidden = false;
|
Grid2.Hidden = false;
|
||||||
|
btnSelect.Hidden = false;
|
||||||
|
btnSelectStock.Hidden = true;
|
||||||
|
BindGrid2(this.PackagingManageId);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.其他材料).ToString())
|
else if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.其他材料).ToString())
|
||||||
{
|
{
|
||||||
dropPipelineComponentCode.Hidden = true;
|
dropPipelineComponentCode.Hidden = true;
|
||||||
Grid2.Hidden = false;
|
Grid2.Hidden = false;
|
||||||
|
btnSelect.Hidden = true;
|
||||||
|
btnSelectStock.Hidden = false;
|
||||||
|
BindGrid2(this.PackagingManageId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -193,7 +209,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
if (e.CommandName == "delete")
|
if (e.CommandName == "delete")
|
||||||
{
|
{
|
||||||
string id = e.RowID;
|
string id = e.RowID;
|
||||||
PackagingmanagedetailService.DeleteById(id);
|
HJGLPackagingmanagedetailService.DeleteById(id);
|
||||||
BindGrid2(this.PackagingManageId);
|
BindGrid2(this.PackagingManageId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,8 +65,8 @@
|
|||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title=""
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title=""
|
||||||
EnableCollapse="true" KeepCurrentSelection="true" runat="server" BoxFlex="1" DisableUnselectableRows="true"
|
EnableCollapse="true" KeepCurrentSelection="true" runat="server" BoxFlex="1" DisableUnselectableRows="true"
|
||||||
DataKeyNames="PipeLineMatId" EnableColumnLines="true"
|
DataKeyNames="Id" EnableColumnLines="true"
|
||||||
DataIDField="PipeLineMatId" EnableTextSelection="True" AllowSorting="true" SortField="MaterialCode"
|
DataIDField="Id" EnableTextSelection="True" AllowSorting="true" SortField="MaterialCode"
|
||||||
SortDirection="ASC" AllowPaging="false" IsDatabasePaging="true"
|
SortDirection="ASC" AllowPaging="false" IsDatabasePaging="true"
|
||||||
PageSize="1000" EnableCheckBoxSelect="true">
|
PageSize="1000" EnableCheckBoxSelect="true">
|
||||||
<Toolbars>
|
<Toolbars>
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
using BLL;
|
using BLL;
|
||||||
using FastReport.DevComponents.DotNetBar;
|
using FastReport.DevComponents.DotNetBar;
|
||||||
using FineUIPro.Web.HJGL.WeldingManage;
|
using FineUIPro.Web.HJGL.WeldingManage;
|
||||||
|
using Model;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
@@ -289,48 +291,19 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
|
|
||||||
private void BindGrid(string pipelineId, string unitworkid)
|
private void BindGrid(string pipelineId, string unitworkid)
|
||||||
{
|
{
|
||||||
var query = from pipe in Funs.DB.HJGL_PipeLineMat
|
var Prelist = HJGL_PipelineComponentService.GetPipelinePrefabricatedComponent(unitworkid, pipelineId);
|
||||||
join lib in Funs.DB.HJGL_MaterialCodeLib on pipe.MaterialCode equals lib.MaterialCode into libJoin
|
|
||||||
from libItem in libJoin.DefaultIfEmpty()
|
|
||||||
join line in Funs.DB.HJGL_Pipeline on pipe.PipelineId equals line.PipelineId into lineJoin
|
|
||||||
from lineItem in lineJoin.DefaultIfEmpty()
|
|
||||||
where lineItem != null && lineItem.UnitWorkId == unitworkid && lineItem.PipeArea == "1"
|
|
||||||
&& (pipe.PrefabricatedComponents == null || pipe.PrefabricatedComponents == "")
|
|
||||||
select new
|
|
||||||
{
|
|
||||||
pipe.PipeLineMatId,
|
|
||||||
libItem.MaterialCode,
|
|
||||||
libItem.MaterialName,
|
|
||||||
libItem.MaterialUnit,
|
|
||||||
libItem.MaterialSpec,
|
|
||||||
libItem.MaterialMade,
|
|
||||||
libItem.MaterialDef,
|
|
||||||
pipe.Number,
|
|
||||||
pipe.PrefabricatedComponents,
|
|
||||||
lineItem.PipelineId,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(pipelineId))
|
|
||||||
{
|
|
||||||
query = query.Where(x => x.PipelineId == pipelineId);
|
|
||||||
}
|
|
||||||
|
|
||||||
query = query.OrderBy(x => x.PrefabricatedComponents);
|
|
||||||
|
|
||||||
var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail
|
var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail
|
||||||
//where x.InOutPlanMasterId == Id && x.PipelineId == this.tvControlItem.SelectedNodeID
|
|
||||||
where x.PipelineId == pipelineId
|
where x.PipelineId == pipelineId
|
||||||
&& (x.PipelineComponentId == null || x.PipelineComponentId == "")
|
&& (x.PipelineComponentId == null || x.PipelineComponentId == "")
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
var queryList=query.ToList();
|
var queryList = Prelist;
|
||||||
// 优化 Linq 过滤条件
|
// 优化 Linq 过滤条件,过滤已经进入包装的预制散件
|
||||||
var result = (from x in queryList
|
var result = (from x in queryList
|
||||||
join y in inoutplandetail on x.MaterialCode equals y.MaterialCode into yy
|
join y in inoutplandetail on x.MaterialCode equals y.MaterialCode into yy
|
||||||
from y in yy.DefaultIfEmpty()
|
from y in yy.DefaultIfEmpty()
|
||||||
where y == null
|
where y == null
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
|
|
||||||
// 2.获取当前分页数据
|
|
||||||
Grid1.DataSource = result;
|
Grid1.DataSource = result;
|
||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
}
|
}
|
||||||
@@ -388,7 +361,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
CreateTime = DateTime.Now,
|
CreateTime = DateTime.Now,
|
||||||
CreateUser = this.CurrUser.PersonId,
|
CreateUser = this.CurrUser.PersonId,
|
||||||
};
|
};
|
||||||
PackagingmanagedetailService.Add(model);
|
HJGLPackagingmanagedetailService.Add(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,9 +78,9 @@
|
|||||||
<f:RenderField Width="150px" ColumnID="MaterialUnit" DataField="MaterialUnit" SortField="MaterialUnit"
|
<f:RenderField Width="150px" ColumnID="MaterialUnit" DataField="MaterialUnit" SortField="MaterialUnit"
|
||||||
FieldType="String" HeaderText="单位" TextAlign="Left" HeaderTextAlign="Center">
|
FieldType="String" HeaderText="单位" TextAlign="Left" HeaderTextAlign="Center">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="150px" ColumnID="StockNum" DataField="StockNum" SortField="StockNum"
|
<%--<f:RenderField Width="150px" ColumnID="StockNum" DataField="StockNum" SortField="StockNum"
|
||||||
FieldType="String" HeaderText="库存数量" TextAlign="Left" HeaderTextAlign="Center">
|
FieldType="String" HeaderText="库存数量" TextAlign="Left" HeaderTextAlign="Center">
|
||||||
</f:RenderField>
|
</f:RenderField>--%>
|
||||||
|
|
||||||
</Columns>
|
</Columns>
|
||||||
<%-- <Listeners>
|
<%-- <Listeners>
|
||||||
|
|||||||
@@ -1,31 +1,33 @@
|
|||||||
using BLL;
|
using BLL;
|
||||||
|
using Model;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
|
||||||
|
|
||||||
namespace FineUIPro.Web.HJGL.PreDesign
|
namespace FineUIPro.Web.HJGL.PreDesign
|
||||||
{
|
{
|
||||||
public partial class PackagingManageSelectStock : PageBase
|
public partial class PackagingManageSelectStock : PageBase
|
||||||
{
|
{
|
||||||
public string Id
|
public string PackagingManageId
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return (string)ViewState["Id"];
|
return (string)ViewState["PackagingManageId"];
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
ViewState["Id"] = value;
|
ViewState["PackagingManageId"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
Id = Request.QueryString["Id"];
|
PackagingManageId = Request.QueryString["PackagingManageId"];
|
||||||
// 绑定表格
|
// 绑定表格
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
}
|
}
|
||||||
@@ -37,32 +39,24 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void BindGrid()
|
private void BindGrid()
|
||||||
{
|
{
|
||||||
|
|
||||||
var inoutplanmaster = TwInOutplanmasterService.GetById(Id);
|
|
||||||
if (inoutplanmaster == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Model.Tw_MaterialStockOutput table = new Model.Tw_MaterialStockOutput();
|
Model.Tw_MaterialStockOutput table = new Model.Tw_MaterialStockOutput();
|
||||||
table.PipeLineMatCode = txtMatCode.Text.Trim();
|
table.PipeLineMatCode = txtMatCode.Text.Trim();
|
||||||
table.WarehouseCode = inoutplanmaster.WarehouseCode;
|
table.WarehouseCode = "工厂预制";
|
||||||
table.ProjectId = this.CurrUser.LoginProjectId;
|
table.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
if (inoutplanmaster.Category == (int)TwConst.Category.管段)
|
var tb = BLL.TwMaterialstockService.GetTw_MaterialStockByModle(table);
|
||||||
{
|
|
||||||
table.MaterialUnit = "米";
|
|
||||||
|
|
||||||
}
|
var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail
|
||||||
else if (inoutplanmaster.Category == (int)TwConst.Category.管件)
|
where x.PackagingManageId == PackagingManageId
|
||||||
{
|
select x).ToList();
|
||||||
table.MaterialUnit = "个";
|
var queryList = tb;
|
||||||
|
// 优化 Linq 过滤条件,过滤已经进入包装的预制散件
|
||||||
}
|
var result = (from x in queryList
|
||||||
|
join y in inoutplandetail on x.PipeLineMatCode equals y.MaterialCode into yy
|
||||||
var tb = BLL.TwMaterialstockService.GetListData(table, Grid1);
|
from y in yy.DefaultIfEmpty()
|
||||||
Grid1.RecordCount = TwMaterialstockService.Count;
|
where y == null
|
||||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
select x).ToList();
|
||||||
Grid1.DataSource = tb;
|
Grid1.RecordCount = result.Count;
|
||||||
|
Grid1.DataSource = result;
|
||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@@ -91,27 +85,20 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
foreach (var id in List_Id)
|
foreach (var id in List_Id)
|
||||||
{
|
{
|
||||||
var StockModel = TwMaterialstockService.GetTw_MaterialStockById(id);
|
var StockModel = TwMaterialstockService.GetTw_MaterialStockById(id);
|
||||||
var querydetail = new Model.Tw_InOutDetailOutput()
|
var model = new Model.HJGL_PackagingManageDetail()
|
||||||
{
|
{
|
||||||
InOutPlanMasterId = Id,
|
Id = SQLHelper.GetNewID(),
|
||||||
|
PackagingManageId = this.PackagingManageId,
|
||||||
MaterialCode = StockModel.PipeLineMatCode,
|
MaterialCode = StockModel.PipeLineMatCode,
|
||||||
|
Number = 0,
|
||||||
|
CreateTime = DateTime.Now,
|
||||||
|
CreateUser = this.CurrUser.PersonId,
|
||||||
};
|
};
|
||||||
var detail = TwInOutplandetailService.GetByModle(querydetail).FirstOrDefault();
|
HJGLPackagingmanagedetailService.Add(model);
|
||||||
if (detail == null)
|
|
||||||
{
|
|
||||||
var tw_InOutPlanDetail = new Model.Tw_InOutPlanDetail
|
|
||||||
{
|
|
||||||
Id = Guid.NewGuid().ToString(),
|
|
||||||
InOutPlanMasterId = Id,
|
|
||||||
MaterialCode = StockModel.PipeLineMatCode,
|
|
||||||
PlanNum = 0,
|
|
||||||
};
|
|
||||||
TwInOutplandetailService.Add(tw_InOutPlanDetail);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region GV 数据操作
|
#region GV 数据操作
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
using BLL;
|
using BLL;
|
||||||
|
using Model;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using AspNet = System.Web.UI.WebControls;
|
using AspNet = System.Web.UI.WebControls;
|
||||||
namespace FineUIPro.Web.HJGL.PreDesign
|
namespace FineUIPro.Web.HJGL.PreDesign
|
||||||
@@ -43,7 +45,10 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void BindGrid()
|
private void BindGrid()
|
||||||
{
|
{
|
||||||
|
var pack = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId);
|
||||||
|
if (pack == null) return;
|
||||||
|
if (pack.TypeInt == (int)HJGL_PackagingmanageService.TypeInt.预制组件)
|
||||||
|
{
|
||||||
DataTable tb = BLL.HJGL_PackagingmanageService.GetPackagingDetailById(PackagingManageId);
|
DataTable tb = BLL.HJGL_PackagingmanageService.GetPackagingDetailById(PackagingManageId);
|
||||||
|
|
||||||
Grid1.RecordCount = tb.Rows.Count;
|
Grid1.RecordCount = tb.Rows.Count;
|
||||||
@@ -51,6 +56,25 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
var table = this.GetPagedDataTable(Grid1, tb);
|
var table = this.GetPagedDataTable(Grid1, tb);
|
||||||
Grid1.DataSource = table;
|
Grid1.DataSource = table;
|
||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var result = HJGLPackagingmanagedetailService.GetPackagingData(PackagingManageId).ToList();
|
||||||
|
var detailList = from x in result
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
PipelineComponentId = x.Id,
|
||||||
|
PipelineComponentCode = x.MaterialCode,
|
||||||
|
num = x.Number,
|
||||||
|
CU = x.MaterialUnit,
|
||||||
|
UnitWorkName = x.UnitWorkId == null ? "" : UnitWorkService.GetNameById(x.UnitWorkId)
|
||||||
|
};
|
||||||
|
Grid1.RecordCount = detailList.Count();
|
||||||
|
Grid1.DataSource = detailList;
|
||||||
|
Grid1.DataBind();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head runat="server">
|
<head runat="server">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<title>车次管理表</title>
|
<title>车次管理表</title>
|
||||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@@ -13,14 +13,13 @@
|
|||||||
white-space: normal;
|
white-space: normal;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
.f-grid-row.yellow
|
|
||||||
{
|
.f-grid-row.yellow {
|
||||||
background-color: YellowGreen;
|
background-color: YellowGreen;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.f-grid-row.red
|
.f-grid-row.red {
|
||||||
{
|
|
||||||
background-color: Yellow;
|
background-color: Yellow;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -36,7 +35,7 @@
|
|||||||
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="Id"
|
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="Id"
|
||||||
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true"
|
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true"
|
||||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
|
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" OnRowCommand="Grid1_RowCommand">
|
||||||
<Toolbars>
|
<Toolbars>
|
||||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||||
<Items>
|
<Items>
|
||||||
@@ -58,26 +57,28 @@
|
|||||||
</f:TemplateField>
|
</f:TemplateField>
|
||||||
|
|
||||||
<f:RenderField Width="150px" ColumnID="TrainNumber" DataField="TrainNumber" SortField="TrainNumber"
|
<f:RenderField Width="150px" ColumnID="TrainNumber" DataField="TrainNumber" SortField="TrainNumber"
|
||||||
FieldType="String" HeaderText="车次" TextAlign="Left" HeaderTextAlign="Center" >
|
FieldType="String" HeaderText="车次" TextAlign="Left" HeaderTextAlign="Center">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="150px" ColumnID="DriverName" DataField="DriverName" SortField="DriverName"
|
<f:RenderField Width="150px" ColumnID="DriverName" DataField="DriverName" SortField="DriverName"
|
||||||
FieldType="String" HeaderText="驾驶员姓名" TextAlign="Left" HeaderTextAlign="Center" >
|
FieldType="String" HeaderText="驾驶员姓名" TextAlign="Left" HeaderTextAlign="Center">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="150px" ColumnID="DriverPhone" DataField="DriverPhone" SortField="DriverPhone"
|
<f:RenderField Width="150px" ColumnID="DriverPhone" DataField="DriverPhone" SortField="DriverPhone"
|
||||||
FieldType="String" HeaderText="驾驶员电话" TextAlign="Left" HeaderTextAlign="Center" >
|
FieldType="String" HeaderText="驾驶员电话" TextAlign="Left" HeaderTextAlign="Center">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="150px" ColumnID="LicensePlateNumber" DataField="LicensePlateNumber" SortField="LicensePlateNumber"
|
<f:RenderField Width="150px" ColumnID="LicensePlateNumber" DataField="LicensePlateNumber" SortField="LicensePlateNumber"
|
||||||
FieldType="String" HeaderText="车牌号" TextAlign="Left" HeaderTextAlign="Center" >
|
FieldType="String" HeaderText="车牌号" TextAlign="Left" HeaderTextAlign="Center">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="150px" ColumnID="ContactName" DataField="ContactName" SortField="ContactName"
|
<f:RenderField Width="150px" ColumnID="ContactName" DataField="ContactName" SortField="ContactName"
|
||||||
FieldType="String" HeaderText="联系人姓名" TextAlign="Left" HeaderTextAlign="Center" >
|
FieldType="String" HeaderText="联系人姓名" TextAlign="Left" HeaderTextAlign="Center">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="150px" ColumnID="ContactPhone" DataField="ContactPhone" SortField="ContactPhone"
|
<f:RenderField Width="150px" ColumnID="ContactPhone" DataField="ContactPhone" SortField="ContactPhone"
|
||||||
FieldType="String" HeaderText="联系人电话" TextAlign="Left" HeaderTextAlign="Center" >
|
FieldType="String" HeaderText="联系人电话" TextAlign="Left" HeaderTextAlign="Center">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="150px" ColumnID="Remark" DataField="Remark" SortField="Remark"
|
<f:RenderField Width="150px" ColumnID="Remark" DataField="Remark" SortField="Remark"
|
||||||
FieldType="String" HeaderText="备注" TextAlign="Left" HeaderTextAlign="Center" >
|
FieldType="String" HeaderText="备注" TextAlign="Left" HeaderTextAlign="Center">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
<f:LinkButtonField Width="120px" TextAlign="Center" CommandName="TrainDetail" Text="车次明细" />
|
||||||
|
|
||||||
|
|
||||||
</Columns>
|
</Columns>
|
||||||
<Listeners>
|
<Listeners>
|
||||||
@@ -105,9 +106,13 @@
|
|||||||
Title="编辑" EnableIFrame="true" Height="650px"
|
Title="编辑" EnableIFrame="true" Height="650px"
|
||||||
Width="1200px">
|
Width="1200px">
|
||||||
</f:Window>
|
</f:Window>
|
||||||
|
<f:Window ID="Window2" Title="车次明细" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
|
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||||
|
Width="900px" Height="660px">
|
||||||
|
</f:Window>
|
||||||
<f:Menu ID="Menu1" runat="server">
|
<f:Menu ID="Menu1" runat="server">
|
||||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnEdit_Click" EnablePostBack="true"
|
<f:MenuButton ID="btnMenuEdit" OnClick="btnEdit_Click" EnablePostBack="true"
|
||||||
Hidden="true" runat="server" Text="编辑" Icon="TableEdit" >
|
Hidden="true" runat="server" Text="编辑" Icon="TableEdit">
|
||||||
</f:MenuButton>
|
</f:MenuButton>
|
||||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnDelete_Click" EnablePostBack="true" Icon="Delete"
|
<f:MenuButton ID="btnMenuDelete" OnClick="btnDelete_Click" EnablePostBack="true" Icon="Delete"
|
||||||
Hidden="true" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除">
|
Hidden="true" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除">
|
||||||
|
|||||||
@@ -244,5 +244,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.CommandName == "TrainDetail")
|
||||||
|
{
|
||||||
|
string id = Grid1.SelectedRowID;
|
||||||
|
string url = "TrainNumberManagerView.aspx?TrainNumberId={0}";
|
||||||
|
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format(url, id, "操作 - ")));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,6 +122,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Window Window1;
|
protected global::FineUIPro.Window Window1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Window2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Window Window2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Menu1 控件。
|
/// Menu1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainNumberManagerView.aspx.cs" Inherits="FineUIPro.Web.HJGL.PreDesign.TrainNumberManagerView" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head runat="server">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||||
|
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||||
|
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||||
|
<Items>
|
||||||
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="明细" EnableCollapse="true" ForceFit="true"
|
||||||
|
runat="server" BoxFlex="1" DataKeyNames="PackagingManageId" AllowCellEditing="true"
|
||||||
|
ClicksToEdit="2" DataIDField="PackagingManageId" AllowSorting="true" SortField="PackagingCode"
|
||||||
|
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" EnableColumnLines="true"
|
||||||
|
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" AllowFilters="true" OnFilterChange="Grid1_FilterChange"
|
||||||
|
EnableTextSelection="True" EnableRowDoubleClickEvent="true" >
|
||||||
|
<Columns>
|
||||||
|
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center"
|
||||||
|
TextAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</f:TemplateField>
|
||||||
|
<f:RenderField Width="160px" ColumnID="PackagingCode" DataField="PackagingCode"
|
||||||
|
FieldType="String" HeaderText="包装编号" HeaderTextAlign="Center" TextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
|
</Columns>
|
||||||
|
|
||||||
|
<PageItems>
|
||||||
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||||
|
</f:ToolbarSeparator>
|
||||||
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||||
|
</f:ToolbarText>
|
||||||
|
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||||
|
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||||
|
<f:ListItem Text="10" Value="10" />
|
||||||
|
<f:ListItem Text="15" Value="15" />
|
||||||
|
<f:ListItem Text="20" Value="20" />
|
||||||
|
<f:ListItem Text="25" Value="25" />
|
||||||
|
</f:DropDownList>
|
||||||
|
</PageItems>
|
||||||
|
</f:Grid>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
</form>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
using BLL;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.HJGL.PreDesign
|
||||||
|
{
|
||||||
|
public partial class TrainNumberManagerView : PageBase
|
||||||
|
{
|
||||||
|
public string TrainNumberId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (string)ViewState["TrainNumberId"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["TrainNumberId"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#region 加载页面
|
||||||
|
/// <summary>
|
||||||
|
/// 加载页面
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
TrainNumberId = Request.Params["TrainNumberId"];
|
||||||
|
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
|
// 绑定表格
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定数据
|
||||||
|
/// </summary>
|
||||||
|
private void BindGrid()
|
||||||
|
{
|
||||||
|
|
||||||
|
var result = HJGL_PackagingmanageService.GetPackagingManage(TrainNumberId);
|
||||||
|
Grid1.RecordCount = result.Count();
|
||||||
|
Grid1.DataSource = result;
|
||||||
|
Grid1.DataBind();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 表头过滤
|
||||||
|
protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 页索引改变事件
|
||||||
|
/// <summary>
|
||||||
|
/// 页索引改变事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||||
|
{
|
||||||
|
Grid1.PageIndex = e.NewPageIndex;
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 排序
|
||||||
|
/// <summary>
|
||||||
|
/// 排序
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||||
|
{
|
||||||
|
Grid1.SortDirection = e.SortDirection;
|
||||||
|
Grid1.SortField = e.SortField;
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 分页选择下拉改变事件
|
||||||
|
/// <summary>
|
||||||
|
/// 分页选择下拉改变事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||||
|
// 重新生成代码,则所做更改将丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUIPro.Web.HJGL.PreDesign
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public partial class TrainNumberManagerView
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Panel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel Panel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Grid1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Grid Grid1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblNumber 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Label lblNumber;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarSeparator1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ToolbarText1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ddlPageSize 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
public class PipelineComponentPrintDto
|
||||||
|
{
|
||||||
|
public string PipelineComponentId { get; set; }
|
||||||
|
public string PipelineComponentCode { get; set; }
|
||||||
|
public string BoxNumber { get; set; }
|
||||||
|
public string UnitWorkName { get; set; }
|
||||||
|
public string PipelineId { get; set; }
|
||||||
|
public string PreUnit { get; set; }
|
||||||
|
public string AssembleUnit { get; set; }
|
||||||
|
public string PrefabricatedComponents { get; set; }
|
||||||
|
public string QRCode { get; set; }
|
||||||
|
public int? State { get; set; }
|
||||||
|
public string PlanStartDate { get; set; }
|
||||||
|
public string PipelineCode { get; set; }
|
||||||
|
public string FlowingSection { get; set; }
|
||||||
|
public string QRCode2 { get; set; }
|
||||||
|
public string MaterialCode { get; set; }
|
||||||
|
public bool? IsPrint { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 管线预制散件
|
||||||
|
/// </summary>
|
||||||
|
public class PipelinePrefabricatedComponentsItem
|
||||||
|
{
|
||||||
|
public string Id { get; set; }
|
||||||
|
public string MaterialCode { get; set; }
|
||||||
|
public string MaterialName { get; set; }
|
||||||
|
public string MaterialUnit { get; set; }
|
||||||
|
public string MaterialSpec { get; set; }
|
||||||
|
public string MaterialMade { get; set; }
|
||||||
|
public string MaterialDef { get; set; }
|
||||||
|
public decimal? Number { get; set; }
|
||||||
|
public string PrefabricatedComponents { get; set; }
|
||||||
|
public string PipelineId { get; set; }
|
||||||
|
public string PipelineCode { get; set; }
|
||||||
|
public string UnitWorkId { get; set; }
|
||||||
|
public string ProjectId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -225,7 +225,9 @@
|
|||||||
<Compile Include="HJGL\3DParameter.cs" />
|
<Compile Include="HJGL\3DParameter.cs" />
|
||||||
<Compile Include="HJGL\MaterialStockItem.cs" />
|
<Compile Include="HJGL\MaterialStockItem.cs" />
|
||||||
<Compile Include="APIItem\HJGL\PackagingManageItem.cs" />
|
<Compile Include="APIItem\HJGL\PackagingManageItem.cs" />
|
||||||
|
<Compile Include="HJGL\PipelineComponentPrintDto.cs" />
|
||||||
<Compile Include="HJGL\PipeLineIdCodeItem.cs" />
|
<Compile Include="HJGL\PipeLineIdCodeItem.cs" />
|
||||||
|
<Compile Include="HJGL\PipelinePrefabricatedComponentsItem.cs" />
|
||||||
<Compile Include="HJGL\Pipeline_ComponentQRCodeItem.cs" />
|
<Compile Include="HJGL\Pipeline_ComponentQRCodeItem.cs" />
|
||||||
<Compile Include="HJGL\PointBatch.cs" />
|
<Compile Include="HJGL\PointBatch.cs" />
|
||||||
<Compile Include="HJGL\PointBatchItem.cs" />
|
<Compile Include="HJGL\PointBatchItem.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user