添加项目文件。

This commit is contained in:
zgf committed 2023-07-25 19:20:18 +08:00
1 parent 05e131ca4e
commit 514d6f5255
1162 files changed
+81255

No files matched your search

@@ -0,0 +1,293 @@
using System.Collections.Generic;
using System.Linq;
using HHWMS.Web.Models;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using WalkingTec.Mvvm.Mvc;
namespace HHWMS.Web.Controllers
{
[Area("configs")]
//[ActionDescription("容器管理")]
[ActionDescription("MenuKey.ActionLog")]
public partial class ContainerController : BaseController
{
private readonly IUnitWork _unitwork;
public ContainerController(IUnitWork unitwork)
{
_unitwork = unitwork;
}
#region Search
[ActionDescription("Sys.Search")]
public ActionResult Index()
{
var vm = Wtm.CreateVM<ContainerListVM>();
return PartialView(vm);
}
[ActionDescription("Sys.Search")]
[HttpPost]
public string Search(ContainerSearcher searcher)
{
var vm = Wtm.CreateVM<ContainerListVM>(passInit: true);
if (ModelState.IsValid)
{
vm.Searcher = searcher;
return vm.GetJson(false);
}
else
{
return vm.GetError();
}
}
#endregion Search
#region Create
[ActionDescription("Sys.Create")]
public ActionResult Create()
{
var vm = Wtm.CreateVM<ContainerVM>();
return PartialView(vm);
}
[HttpPost]
[ActionDescription("Sys.Create")]
public ActionResult Create(ContainerVM vm)
{
if (!ModelState.IsValid)
{
return PartialView(vm);
}
else
{
vm.DoAdd();
if (!ModelState.IsValid)
{
vm.DoReInit();
return PartialView(vm);
}
else
{
return FFResult().CloseDialog().RefreshGrid();
}
}
}
#endregion Create
#region Edit
[ActionDescription("Sys.Edit")]
public ActionResult Edit(string id)
{
var vm = Wtm.CreateVM<ContainerVM>(id);
return PartialView(vm);
}
[ActionDescription("Sys.Edit")]
[HttpPost]
[ValidateFormItemOnly]
public ActionResult Edit(ContainerVM vm)
{
if (!ModelState.IsValid)
{
return PartialView(vm);
}
else
{
vm.DoEdit();
if (!ModelState.IsValid)
{
vm.DoReInit();
return PartialView(vm);
}
else
{
return FFResult().CloseDialog().RefreshGridRow(vm.Entity.ID);
}
}
}
#endregion Edit
#region Delete
[ActionDescription("Sys.Delete")]
public ActionResult Delete(string id)
{
var vm = Wtm.CreateVM<ContainerVM>(id);
return PartialView(vm);
}
[ActionDescription("Sys.Delete")]
[HttpPost]
public ActionResult Delete(string id, IFormCollection nouse)
{
var vm = Wtm.CreateVM<ContainerVM>(id);
vm.DoDelete();
if (!ModelState.IsValid)
{
return PartialView(vm);
}
else
{
return FFResult().CloseDialog().RefreshGrid();
}
}
#endregion Delete
#region Details
[ActionDescription("Sys.Details")]
public ActionResult Details(string id)
{
var vm = Wtm.CreateVM<ContainerVM>(id);
return PartialView(vm);
}
#endregion Details
#region BatchEdit
[HttpPost]
[ActionDescription("Sys.BatchEdit")]
public ActionResult BatchEdit(string[] IDs)
{
var vm = Wtm.CreateVM<ContainerBatchVM>(Ids: IDs);
return PartialView(vm);
}
[HttpPost]
[ActionDescription("Sys.BatchEdit")]
public ActionResult DoBatchEdit(ContainerBatchVM vm, IFormCollection nouse)
{
if (!ModelState.IsValid || !vm.DoBatchEdit())
{
return PartialView("BatchEdit", vm);
}
else
{
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchEditSuccess", vm.Ids.Length]);
}
}
#endregion BatchEdit
#region BatchDelete
[HttpPost]
[ActionDescription("Sys.BatchDelete")]
public ActionResult BatchDelete(string[] IDs)
{
var vm = Wtm.CreateVM<ContainerBatchVM>(Ids: IDs);
return PartialView(vm);
}
[HttpPost]
[ActionDescription("Sys.BatchDelete")]
public ActionResult DoBatchDelete(ContainerBatchVM vm, IFormCollection nouse)
{
if (!ModelState.IsValid || !vm.DoBatchDelete())
{
return PartialView("BatchDelete", vm);
}
else
{
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchDeleteSuccess", vm.Ids.Length]);
}
}
#endregion BatchDelete
#region Import
[ActionDescription("Sys.Import")]
public ActionResult Import()
{
var vm = Wtm.CreateVM<ContainerImportVM>();
return PartialView(vm);
}
[HttpPost]
[ActionDescription("Sys.Import")]
public ActionResult Import(ContainerImportVM vm, IFormCollection nouse)
{
if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData())
{
return PartialView(vm);
}
else
{
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.ImportSuccess", vm.EntityList.Count.ToString()]);
}
}
#endregion Import
#region Export
[ActionDescription("Sys.Export")]
[HttpPost]
public IActionResult ExportExcel(ContainerListVM vm)
{
return vm.GetExportData();
}
#endregion Export
[ActionDescription("Container.AddContainer")]
public ActionResult AddContainer()
{
var vm = Wtm.CreateVM<ContainerVM>();
return PartialView(vm);
}
[HttpPost]
[ActionDescription("Container.AddContainer")]
public ActionResult AddContainer(ContainerVM vm)
{
if (!ModelState.IsValid)
{
return PartialView(vm);
}
else
{
var containerList = new List<Container>();
if (vm.Num <= 0 || string.IsNullOrEmpty(vm.Entity.Type))
{
vm.MSD.AddModelError(vm.Entity.BatchError, "数量和类型必填,且数量要大于0!");
return PartialView(vm);
}
var maxContainer = _unitwork.Find<Container>(x => x.Type == vm.Entity.Type).ToList().MaxBy(x => x.Code);
int maxNum = 1;
if (maxContainer != null)
int.TryParse(maxContainer?.Code.Substring(1, 4), out maxNum);
// 查询已有的最大托盘值 在此基础上累加
for (int i = 0; i < vm.Num; i++)
{
maxNum++;
containerList.Add(new Container
{
Code = $"{vm.Entity.Type}{maxNum.ToString().PadLeft(4, '0')}",
Type = vm.Entity.Type,
IsLock = ContainerLockEnum.未锁,
Status = ContainerStatus.空,
Length = vm.Entity.Length,
Width = vm.Entity.Width,
Height = vm.Entity.Height
});
}
_unitwork.BatchAdd<Container>(containerList.ToArray());
return FFResult().CloseDialog().RefreshGrid();
}
}
}
}
@@ -0,0 +1,286 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Mvc;
using WalkingTec.Mvvm.Core.Extensions;
using HHWMS.Web;
using System.Collections.Generic;
using HHWMS.Web.Models;
namespace HHWMS.Web.Controllers
{
[Area("configs")]
[ActionDescription("库位管理")]
public partial class LocationController : BaseController
{
private readonly IUnitWork _unitwork;
public LocationController(IUnitWork unitWork)
{
_unitwork = unitWork;
}
#region Search
[ActionDescription("Sys.Search")]
public ActionResult Index()
{
var vm = Wtm.CreateVM<LocationListVM>();
return PartialView(vm);
}
[ActionDescription("Sys.Search")]
[HttpPost]
public string Search(LocationSearcher searcher)
{
var vm = Wtm.CreateVM<LocationListVM>(passInit: true);
if (ModelState.IsValid)
{
vm.Searcher = searcher;
return vm.GetJson(false);
}
else
{
return vm.GetError();
}
}
#endregion
#region Create
[ActionDescription("Sys.Create")]
public ActionResult Create()
{
var vm = Wtm.CreateVM<LocationVM>();
return PartialView(vm);
}
[HttpPost]
[ActionDescription("Sys.Create")]
public ActionResult Create(LocationVM vm)
{
if (!ModelState.IsValid)
{
return PartialView(vm);
}
else
{
vm.DoAdd();
if (!ModelState.IsValid)
{
vm.DoReInit();
return PartialView(vm);
}
else
{
return FFResult().CloseDialog().RefreshGrid();
}
}
}
#endregion
#region Edit
[ActionDescription("Sys.Edit")]
public ActionResult Edit(string id)
{
var vm = Wtm.CreateVM<LocationVM>(id);
return PartialView(vm);
}
[ActionDescription("Sys.Edit")]
[HttpPost]
[ValidateFormItemOnly]
public ActionResult Edit(LocationVM vm)
{
if (!ModelState.IsValid)
{
return PartialView(vm);
}
else
{
vm.DoEdit();
if (!ModelState.IsValid)
{
vm.DoReInit();
return PartialView(vm);
}
else
{
return FFResult().CloseDialog().RefreshGridRow(vm.Entity.ID);
}
}
}
#endregion
#region Delete
[ActionDescription("Sys.Delete")]
public ActionResult Delete(string id)
{
var vm = Wtm.CreateVM<LocationVM>(id);
return PartialView(vm);
}
[ActionDescription("Sys.Delete")]
[HttpPost]
public ActionResult Delete(string id, IFormCollection nouse)
{
var vm = Wtm.CreateVM<LocationVM>(id);
vm.DoDelete();
if (!ModelState.IsValid)
{
return PartialView(vm);
}
else
{
return FFResult().CloseDialog().RefreshGrid();
}
}
#endregion
#region Details
[ActionDescription("Sys.Details")]
public ActionResult Details(string id)
{
var vm = Wtm.CreateVM<LocationVM>(id);
return PartialView(vm);
}
#endregion
#region BatchEdit
[HttpPost]
[ActionDescription("Sys.BatchEdit")]
public ActionResult BatchEdit(string[] IDs)
{
var vm = Wtm.CreateVM<LocationBatchVM>(Ids: IDs);
return PartialView(vm);
}
[HttpPost]
[ActionDescription("Sys.BatchEdit")]
public ActionResult DoBatchEdit(LocationBatchVM vm, IFormCollection nouse)
{
if (!ModelState.IsValid || !vm.DoBatchEdit())
{
return PartialView("BatchEdit",vm);
}
else
{
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchEditSuccess", vm.Ids.Length]);
}
}
#endregion
#region BatchDelete
[HttpPost]
[ActionDescription("Sys.BatchDelete")]
public ActionResult BatchDelete(string[] IDs)
{
var vm = Wtm.CreateVM<LocationBatchVM>(Ids: IDs);
return PartialView(vm);
}
[HttpPost]
[ActionDescription("Sys.BatchDelete")]
public ActionResult DoBatchDelete(LocationBatchVM vm, IFormCollection nouse)
{
if (!ModelState.IsValid || !vm.DoBatchDelete())
{
return PartialView("BatchDelete",vm);
}
else
{
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchDeleteSuccess", vm.Ids.Length]);
}
}
#endregion
#region Import
[ActionDescription("Sys.Import")]
public ActionResult Import()
{
var vm = Wtm.CreateVM<LocationImportVM>();
return PartialView(vm);
}
[HttpPost]
[ActionDescription("Sys.Import")]
public ActionResult Import(LocationImportVM vm, IFormCollection nouse)
{
if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData())
{
return PartialView(vm);
}
else
{
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.ImportSuccess", vm.EntityList.Count.ToString()]);
}
}
#endregion
#region Export
[ActionDescription("Sys.Export")]
[HttpPost]
public IActionResult ExportExcel(LocationListVM vm)
{
return vm.GetExportData();
}
#endregion
#region 新增库位
[ActionDescription("Location.AddLocation")]
public ActionResult AddLocation()
{
var vm = Wtm.CreateVM<LocationVM>();
return PartialView(vm);
}
[HttpPost]
[ActionDescription("Location.AddLocation")]
public ActionResult AddLocation(LocationVM vm)
{
if (!ModelState.IsValid)
{
return PartialView(vm);
}
else
{
if (vm.BeginLine <= 0 || vm.BeginLayer <= 0 || vm.Entity.Line <= 0|| vm.Entity.Layer <= 0)
{
vm.MSD.AddModelError(vm.Entity.BatchError, "列和层 要大于0");
return PartialView(vm);
}
var locationList = new List<Location>();
for(short row = 1; row <= vm.RoadwayType; row++)
{
for(short line = vm.BeginLine; line <= vm.Entity.Line; line++)
{
for(short layer = vm.BeginLayer; layer <=vm.Entity.Layer; layer++)
{
locationList.Add(new Location
{
Code = $"{vm.Entity.Type}{vm.Entity.RoadWay.ToString().PadLeft(2, '0')}-{row.ToString().PadLeft(2, '0')}-{line.ToString().PadLeft(2, '0')}-{layer.ToString().PadLeft(2, '0')}",
ZoneCode = vm.Entity.ZoneCode,
Type = vm.Entity.Type,
RoadWay = vm.Entity.RoadWay,
Row = row,
Line = line,
Layer = layer,
RowFlag = (short?)(row == 1 || row == 4 ? 1 : 0),
ContiguousCode = vm.RoadwayType == 4 ? $"{vm.Entity.Type}{vm.Entity.RoadWay.ToString().PadLeft(2, '0')}-{(row % 2 == 0?row-1:row+1) .ToString().PadLeft(2, '0')}-{line.ToString().PadLeft(2, '0')}-{layer.ToString().PadLeft(2, '0')}" : null,
IsStop = false,
Status = LocationStatus.空仓位,
Length = vm.Entity.Length,
Width = vm.Entity.Width,
Height = vm.Entity.Height
});
}
}
}
_unitwork.BatchAdd(locationList.ToArray());
return FFResult().CloseDialog().RefreshGrid();
}
}
#endregion 新增库位
}
}
@@ -0,0 +1,24 @@
using HHWMS.Web.Models;
using WalkingTec.Mvvm.Core;
namespace HHWMS.Web
{
public partial class ContainerBatchVM : BaseBatchVM<Container, Container_BatchEdit>
{
public ContainerBatchVM()
{
ListVM = new ContainerListVM();
LinkedVM = new Container_BatchEdit();
}
}
/// <summary>
/// Class to define batch edit fields
/// </summary>
public class Container_BatchEdit : BaseVM
{
protected override void InitVM()
{
}
}
}
@@ -0,0 +1,41 @@
using System.ComponentModel.DataAnnotations;
using HHWMS.Web.Models;
using WalkingTec.Mvvm.Core;
namespace HHWMS.Web
{
public partial class ContainerTemplateVM : BaseTemplateVM
{
[Display(Name = "Container.Code")]
public ExcelPropety Code_Excel = ExcelPropety.CreateProperty<Container>(x => x.Code);
[Display(Name = "Container.Type")]
public ExcelPropety Type_Excel = ExcelPropety.CreateProperty<Container>(x => x.Type);
[Display(Name = "Container.IsLock")]
public ExcelPropety IsLock_Excel = ExcelPropety.CreateProperty<Container>(x => x.IsLock);
[Display(Name = "Container.Status")]
public ExcelPropety Status_Excel = ExcelPropety.CreateProperty<Container>(x => x.Status);
[Display(Name = "Container.LocationCode")]
public ExcelPropety LocationCode_Excel = ExcelPropety.CreateProperty<Container>(x => x.LocationCode);
[Display(Name = "System.Length")]
public ExcelPropety Length_Excel = ExcelPropety.CreateProperty<Container>(x => x.Length);
[Display(Name = "System.Width")]
public ExcelPropety Width_Excel = ExcelPropety.CreateProperty<Container>(x => x.Width);
[Display(Name = "System.Height")]
public ExcelPropety Height_Excel = ExcelPropety.CreateProperty<Container>(x => x.Height);
protected override void InitVM()
{
}
}
public class ContainerImportVM : BaseImportVM<ContainerTemplateVM, Container>
{
}
}
@@ -0,0 +1,94 @@
using System.Collections.Generic;
using System.Linq;
using HHWMS.Web.Models;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
namespace HHWMS.Web
{
public partial class ContainerListVM : BasePagedListVM<Container_View, ContainerSearcher>
{
public List<ComboSelectListItem> ContainerType { get; set; }
public List<ComboSelectListItem> ContainerStatus { get; set; }
protected override void InitVM()
{
var vm = Wtm.CreateVM<ContainerVM>();
ContainerType = vm.ContainerType;
ContainerStatus = vm.ContainerStatus;
}
protected override List<GridAction> InitGridAction()
{
return new List<GridAction>
{
this.MakeStandardAction("Container", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"configs", dialogWidth: 800),
this.MakeStandardAction("Container", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "configs", dialogWidth: 800),
this.MakeStandardAction("Container", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "configs", dialogWidth: 800),
this.MakeStandardAction("Container", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "configs", dialogWidth: 800),
this.MakeStandardAction("Container", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "configs", dialogWidth: 800),
this.MakeStandardAction("Container", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "configs", dialogWidth: 800),
this.MakeStandardAction("Container", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "configs", dialogWidth: 800),
this.MakeStandardAction("Container", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "configs"),
this.MakeAction("Container","AddContainer",Localizer["Container.AddContainer"],Localizer["Container.AddContainer"],GridActionParameterTypesEnum.NoId,"configs"),
};
}
protected override IEnumerable<IGridColumn<Container_View>> InitGridHeader()
{
InitVM();
return new List<GridColumn<Container_View>>{
this.MakeGridHeader(x => x.Code),
this.MakeGridHeader(x => x.Type)
.SetFormat((a, b) =>
{
var data = ContainerType.FirstOrDefault(x => x.Value.ToString() == a.Type);
return data?.Text ?? a.Type;
}),
this.MakeGridHeader(x => x.IsLock),
this.MakeGridHeader(x => x.Status)
.SetFormat((a, b) =>
{
var data = ContainerStatus.FirstOrDefault(x => x.Value.ToString() == a.Status);
return data?.Text ?? a.Status;
}),
this.MakeGridHeader(x => x.LocationCode),
this.MakeGridHeader(x => x.Length),
this.MakeGridHeader(x => x.Width),
this.MakeGridHeader(x => x.Height),
this.MakeGridHeaderAction(width: 200)
};
}
public override IOrderedQueryable<Container_View> GetSearchQuery()
{
var query = DC.Set<Container>()
.CheckContain(Searcher.Code, x => x.Code)
.CheckContain(Searcher.Type, x => x.Type)
.CheckEqual(Searcher.IsLock, x => x.IsLock)
.CheckContain(Searcher.Status, x => x.Status)
.CheckContain(Searcher.LocationCode, x => x.LocationCode)
.CheckEqual(Searcher.Length, x => x.Length)
.CheckEqual(Searcher.Width, x => x.Width)
.CheckEqual(Searcher.Height, x => x.Height)
.Select(x => new Container_View
{
ID = x.ID,
Code = x.Code,
Type = x.Type,
IsLock = x.IsLock,
Status = x.Status,
LocationCode = x.LocationCode,
Length = x.Length,
Width = x.Width,
Height = x.Height,
})
.OrderBy(x => x.ID);
return query;
}
}
public class Container_View : Container
{
}
}
@@ -0,0 +1,38 @@
using System;
using System.ComponentModel.DataAnnotations;
using HHWMS.Web.Models;
using WalkingTec.Mvvm.Core;
namespace HHWMS.Web
{
public partial class ContainerSearcher : BaseSearcher
{
[Display(Name = "Container.Code")]
public String Code { get; set; }
[Display(Name = "Container.Type")]
public String Type { get; set; }
[Display(Name = "Container.IsLock")]
public ContainerLockEnum? IsLock { get; set; }
[Display(Name = "Container.Status")]
public String Status { get; set; }
[Display(Name = "Container.LocationCode")]
public String LocationCode { get; set; }
[Display(Name = "System.Length")]
public Decimal? Length { get; set; }
[Display(Name = "System.Width")]
public Decimal? Width { get; set; }
[Display(Name = "System.Height")]
public Decimal? Height { get; set; }
protected override void InitVM()
{
}
}
}
@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using HHWMS.Web.Models;
using WalkingTec.Mvvm.Core;
namespace HHWMS.Web
{
public partial class ContainerVM : BaseCRUDVM<Container>
{
[Display(Name = "Container.Num", Description = "数量")]
public Int32 Num { get; set; }
public List<ComboSelectListItem> ContainerType { get; set; }
public List<ComboSelectListItem> ContainerStatus { get; set; }
public ContainerVM()
{
}
protected override void InitVM()
{
var CurrentCulture = Wtm.CurrentCulture;
var dictDatas = DC.Set<SysDictData>().ToList();
ContainerType = dictDatas.Where(x => x.DictType == "ContainerType").Select(x => new ComboSelectListItem
{
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
Value = x.DictValue
}).ToList();
ContainerStatus = dictDatas.Where(x => x.DictType == "ContainerStatus").Select(x => new ComboSelectListItem
{
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
Value = x.DictValue
}).ToList();
}
public override void DoAdd()
{
base.DoAdd();
}
public override void DoEdit(bool updateAllFields = false)
{
base.DoEdit(updateAllFields);
}
public override void DoDelete()
{
base.DoDelete();
}
}
}
@@ -0,0 +1,24 @@
using HHWMS.Web.Models;
using WalkingTec.Mvvm.Core;
namespace HHWMS.Web
{
public partial class LocationBatchVM : BaseBatchVM<Location, Location_BatchEdit>
{
public LocationBatchVM()
{
ListVM = new LocationListVM();
LinkedVM = new Location_BatchEdit();
}
}
/// <summary>
/// Class to define batch edit fields
/// </summary>
public class Location_BatchEdit : BaseVM
{
protected override void InitVM()
{
}
}
}
@@ -0,0 +1,59 @@
using System.ComponentModel.DataAnnotations;
using HHWMS.Web.Models;
using WalkingTec.Mvvm.Core;
namespace HHWMS.Web
{
public partial class LocationTemplateVM : BaseTemplateVM
{
[Display(Name = "Location.Code")]
public ExcelPropety Code_Excel = ExcelPropety.CreateProperty<Location>(x => x.Code);
[Display(Name = "Location.Type")]
public ExcelPropety Type_Excel = ExcelPropety.CreateProperty<Location>(x => x.Type);
[Display(Name = "Location.Status")]
public ExcelPropety Status_Excel = ExcelPropety.CreateProperty<Location>(x => x.Status);
[Display(Name = "Location.Row")]
public ExcelPropety Row_Excel = ExcelPropety.CreateProperty<Location>(x => x.Row);
[Display(Name = "Location.Line")]
public ExcelPropety Line_Excel = ExcelPropety.CreateProperty<Location>(x => x.Line);
[Display(Name = "Location.Layer")]
public ExcelPropety Layer_Excel = ExcelPropety.CreateProperty<Location>(x => x.Layer);
[Display(Name = "Location.RoadWay")]
public ExcelPropety RoadWay_Excel = ExcelPropety.CreateProperty<Location>(x => x.RoadWay);
[Display(Name = "Location.ContainerCode")]
public ExcelPropety ContainerCode_Excel = ExcelPropety.CreateProperty<Location>(x => x.ContainerCode);
[Display(Name = "Location.ZoneCode")]
public ExcelPropety ZoneCode_Excel = ExcelPropety.CreateProperty<Location>(x => x.ZoneCode);
[Display(Name = "Location.IsStop")]
public ExcelPropety IsStop_Excel = ExcelPropety.CreateProperty<Location>(x => x.IsStop);
[Display(Name = "System.Length")]
public ExcelPropety Length_Excel = ExcelPropety.CreateProperty<Location>(x => x.Length);
[Display(Name = "System.Width")]
public ExcelPropety Width_Excel = ExcelPropety.CreateProperty<Location>(x => x.Width);
[Display(Name = "System.Height")]
public ExcelPropety Height_Excel = ExcelPropety.CreateProperty<Location>(x => x.Height);
[Display(Name = "Location.ContiguousCode")]
public ExcelPropety ContiguousCode_Excel = ExcelPropety.CreateProperty<Location>(x => x.ContiguousCode);
protected override void InitVM()
{
}
}
public class LocationImportVM : BaseImportVM<LocationTemplateVM, Location>
{
}
}
@@ -0,0 +1,116 @@
using System.Collections.Generic;
using System.Linq;
using HHWMS.Web.Models;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
namespace HHWMS.Web
{
public partial class LocationListVM : BasePagedListVM<Location_View, LocationSearcher>
{
public List<ComboSelectListItem> ZoneCodes { get; set; }
public List<ComboSelectListItem> Types { get; set; }
public List<ComboSelectListItem> LocationStatus { get; set; }
protected override void InitVM()
{
var vm = Wtm.CreateVM<LocationVM>();
ZoneCodes = vm.ZoneCodes;
Types = vm.Types;
LocationStatus = vm.LocationStatus;
}
protected override List<GridAction> InitGridAction()
{
return new List<GridAction>
{
this.MakeStandardAction("Location", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"configs", dialogWidth: 800),
this.MakeStandardAction("Location", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "configs", dialogWidth: 800),
this.MakeStandardAction("Location", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "configs", dialogWidth: 800),
this.MakeStandardAction("Location", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "configs", dialogWidth: 800),
this.MakeStandardAction("Location", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "configs", dialogWidth: 800),
this.MakeStandardAction("Location", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "configs", dialogWidth: 800),
this.MakeStandardAction("Location", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "configs", dialogWidth: 800),
this.MakeStandardAction("Location", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "configs"),
this.MakeAction("Location","AddLocation",Localizer["Location.AddLocation"],Localizer["Location.AddLocation"],GridActionParameterTypesEnum.NoId,"configs"),
};
}
protected override IEnumerable<IGridColumn<Location_View>> InitGridHeader()
{
InitVM();
return new List<GridColumn<Location_View>>{
this.MakeGridHeader(x => x.ZoneCode)
.SetFormat((a, b) =>
{
var data = ZoneCodes.FirstOrDefault(x => x.Value.ToString() == a.ZoneCode);
return data?.Text ?? a.ZoneCode;
}),
this.MakeGridHeader(x => x.Code, 120),
this.MakeGridHeader(x => x.Type)
.SetFormat((a, b) =>
{
var data = Types.FirstOrDefault(x => x.Value.ToString() == a.Type);
return data?.Text ?? a.Type;
}),
this.MakeGridHeader(x => x.Status)
.SetFormat((a, b) =>
{
var data = LocationStatus.FirstOrDefault(x => x.Value.ToString() == a.Status);
return data?.Text ?? a.Status;
}),
this.MakeGridHeader(x => x.Row),
this.MakeGridHeader(x => x.Line),
this.MakeGridHeader(x => x.Layer),
this.MakeGridHeader(x => x.RoadWay),
this.MakeGridHeader(x => x.ContainerCode),
this.MakeGridHeader(x => x.IsStop),
this.MakeGridHeader(x => x.Length),
this.MakeGridHeader(x => x.Width),
this.MakeGridHeader(x => x.Height),
this.MakeGridHeader(x => x.ContiguousCode),
this.MakeGridHeaderAction(width: 200)
};
}
public override IOrderedQueryable<Location_View> GetSearchQuery()
{
var query = DC.Set<Location>()
.CheckContain(Searcher.Code, x => x.Code)
.CheckContain(Searcher.Type, x => x.Type)
.CheckContain(Searcher.Status, x => x.Status)
.CheckEqual(Searcher.Row, x => x.Row)
.CheckEqual(Searcher.Line, x => x.Line)
.CheckEqual(Searcher.Layer, x => x.Layer)
.CheckEqual(Searcher.RoadWay, x => x.RoadWay)
.CheckContain(Searcher.ContainerCode, x => x.ContainerCode)
.CheckContain(Searcher.ZoneCode, x => x.ZoneCode)
.CheckEqual(Searcher.IsStop, x => x.IsStop)
.CheckContain(Searcher.ContiguousCode, x => x.ContiguousCode)
.Select(x => new Location_View
{
ID = x.ID,
Code = x.Code,
Type = x.Type,
Status = x.Status,
Row = x.Row,
Line = x.Line,
Layer = x.Layer,
RoadWay = x.RoadWay,
ContainerCode = x.ContainerCode,
ZoneCode = x.ZoneCode,
IsStop = x.IsStop,
Length = x.Length,
Width = x.Width,
Height = x.Height,
ContiguousCode = x.ContiguousCode,
})
.OrderBy(x => x.ID);
return query;
}
}
public class Location_View : Location
{
}
}
@@ -0,0 +1,46 @@
using System;
using System.ComponentModel.DataAnnotations;
using WalkingTec.Mvvm.Core;
namespace HHWMS.Web
{
public partial class LocationSearcher : BaseSearcher
{
[Display(Name = "Location.Code")]
public String Code { get; set; }
[Display(Name = "Location.Type")]
public String Type { get; set; }
[Display(Name = "Location.Status")]
public String Status { get; set; }
[Display(Name = "Location.Row")]
public Int16? Row { get; set; }
[Display(Name = "Location.Line")]
public Int16? Line { get; set; }
[Display(Name = "Location.Layer")]
public Int16? Layer { get; set; }
[Display(Name = "Location.RoadWay")]
public Int16? RoadWay { get; set; }
[Display(Name = "Location.ContainerCode")]
public String ContainerCode { get; set; }
[Display(Name = "Location.ZoneCode")]
public String ZoneCode { get; set; }
[Display(Name = "Location.IsStop")]
public Boolean? IsStop { get; set; }
[Display(Name = "Location.ContiguousCode")]
public String ContiguousCode { get; set; }
protected override void InitVM()
{
}
}
}
@@ -0,0 +1,197 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using HHWMS.Web.Models;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
namespace HHWMS.Web
{
public partial class LocationVM : BaseCRUDVM<Location>
{
[Display(Name = "Location.BeginLine", Description = "起始列")]
[Required(ErrorMessage = "Validate.{0}required")]
public short BeginLine { get; set; }
[Display(Name = "Location.BeginLayer", Description = "起始层")]
[Required(ErrorMessage = "Validate.{0}required")]
public short BeginLayer { get; set; }
[Display(Name = "Location.RoadwayType", Description = "巷道类型")]
[Required(ErrorMessage = "Validate.{0}required")]
public short RoadwayType { get; set; }
private IUnitWork _unitWork { get; set; }
public List<ComboSelectListItem> RoadwayTypes { get; set; }
public List<ComboSelectListItem> ZoneCodes { get; set; }
public List<ComboSelectListItem> Types { get; set; }
public List<ComboSelectListItem> LocationStatus { get; set; }
public LocationVM()
{
}
protected override void InitVM()
{
_unitWork = new UnitWork(Wtm);
var CurrentCulture = Wtm.CurrentCulture;
var dictDatas = DC.Set<SysDictData>().ToList();
RoadwayTypes = dictDatas.Where(x => x.DictType == "RoadwayType").Select(x => new ComboSelectListItem
{
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
Value = x.DictValue
}).ToList();
ZoneCodes = dictDatas.Where(x => x.DictType == "ZoneCode").Select(x => new ComboSelectListItem
{
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
Value = x.DictValue
}).ToList();
Types = dictDatas.Where(x => x.DictType == "LocationType").Select(x => new ComboSelectListItem
{
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
Value = x.DictValue
}).ToList();
LocationStatus = dictDatas.Where(x => x.DictType == "LocationStatus").Select(x => new ComboSelectListItem
{
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
Value = x.DictValue
}).ToList();
}
public override void DoAdd()
{
base.DoAdd();
}
public override void DoEdit(bool updateAllFields = false)
{
base.DoEdit(updateAllFields);
}
public override void DoDelete()
{
base.DoDelete();
}
/// <summary>
/// 查找库位
/// </summary>
/// <returns></returns>
public ResponseResult<dynamic> GetLocation(WcsRequest request)
{
var res = ResponseResult<dynamic>.Success(new {LocationCode = "test"});
return res;
//return GetOutEmptyLocation(request);
/*if (request.RoadWay == null)
{
// 根据条件查询巷道 (巷道均分,根据托盘类型分)
request.RoadWay = SelectRoadWay(request);
if(SelectRoadWay(request) == 0)
{
return ResponseResult<dynamic>.Error("未找到可用巷道!");
}
}
else
{
// 查询该巷道类型 调用不同的方法
return GetLocationByOne(request);
}
return "";*/
}
/// <summary>
/// 单伸位 查找仓位
/// </summary>
/// <returns></returns>
public string GetLocationByOne(WcsRequest request)
{
// 根据托盘类型/传入的长宽高 查找库位
var locationList = _unitWork.Find<Location>(x => x.RoadWay == request.RoadWay);
locationList = locationList.WhereIf(request.Length > 0, x => x.Length == request.Length)
.WhereIf(request.Width > 0, x => x.Width == request.Width)
.WhereIf(request.Height > 0, x => x.Height >= request.Height)
.OrderBy(x => x.Height);
var location = locationList.OrderBy(x => x.Layer)
.ThenBy(x => x.Line)
.FirstOrDefault();
return location?.Code;
}
/// <summary>
/// 双伸位 查找仓位
/// </summary>
/// <returns></returns>
public string GetLocationByTwo(WcsRequest request)
{
// 根据托盘类型 查找库位 todo
return "";
}
/// <summary>
/// 双伸位,获取里仓位有货,外仓位无货的仓位
/// </summary>
/// <returns></returns>
public string GetOutEmptyLocation(WcsRequest request)
{
int roadWay = (int)request.RoadWay;
var locationList = _unitWork.Find<Location>(x => x.RoadWay == roadWay)
.Join(_unitWork.Find<Location>(x => x.RoadWay == roadWay),
a => a.ContiguousCode, g => g.Code,
(a, g) => new
{
a.Code,
a.Status,
a.RowFlag,
a.Layer,
a.Line,
ContiguousCode = g.Code,
Status1 = g.Status
}).ToList();
var location = locationList.Where(x => x.RowFlag == 0 && x.Status == "empty" && x.Status1 == "some")
.OrderBy(x => x.Layer)
.ThenBy(x => x.Line)
.FirstOrDefault()?.Code;
return location;
}
/// <summary>
/// 双伸位,获取里外仓位都为空的仓位
/// </summary>
/// <param name="request"></param>
/// <param name="rowFlag">0 返回外仓位,1返回里仓位</param>
/// <returns></returns>
public string GetAllEmptyLocation(WcsRequest request, int rowFlag)
{
int roadWay = (int)request.RoadWay;
var locationList = _unitWork.Find<Location>(x => x.RoadWay == roadWay)
.Join(_unitWork.Find<Location>(x => x.RoadWay == roadWay),
a => a.ContiguousCode, g => g.Code,
(a, g) => new
{
a.Code,
a.Status,
a.RowFlag,
a.Layer,
a.Line,
ContiguousCode = g.Code,
Status1 = g.Status
}).ToList();
var location = locationList.Where(x => x.RowFlag == rowFlag && x.Status == "empty" && x.Status1 == "empty")
.OrderBy(x => x.Layer)
.ThenBy(x => x.Line)
.FirstOrDefault()?.Code;
return location;
}
/// <summary>
/// 根据传入条件,查找可利用巷道
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public int SelectRoadWay(WcsRequest request)
{
return 1;
}
}
}
@@ -0,0 +1,16 @@
@model HHWMS.Web.ContainerVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:row items-per-row="ItemsPerRowEnum.Two">
<wt:textbox field="Entity.Type" />
<wt:textbox field="Num" />
<wt:textbox field="Entity.Length" />
<wt:textbox field="Entity.Width" />
<wt:textbox field="Entity.Height" />
</wt:row>
<wt:row align="AlignEnum.Right">
<wt:submitbutton />
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,12 @@
@model HHWMS.Web.ContainerBatchVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:quote>@Localizer["Sys.BatchDeleteConfirm"]</wt:quote>
<wt:hidden field="Ids" />
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
<wt:row align="AlignEnum.Right">
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,14 @@
@model HHWMS.Web.ContainerBatchVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<div style="margin-bottom:10px">@Localizer["Sys.BatchEditConfirm"] </div>
<wt:row items-per-row="ItemsPerRowEnum.Two">
</wt:row>
<wt:hidden field="Ids" />
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
<wt:row align="AlignEnum.Right">
<wt:submitbutton />
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,19 @@
@model HHWMS.Web.ContainerVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:row items-per-row="ItemsPerRowEnum.Two">
<wt:textbox field="Entity.Code" />
<wt:combobox field="Entity.Type" items="ContainerType" />
<wt:combobox field="Entity.IsLock" />
<wt:combobox field="Entity.Status" items="ContainerStatus" />
<wt:textbox field="Entity.LocationCode" />
<wt:textbox field="Entity.Length" />
<wt:textbox field="Entity.Width" />
<wt:textbox field="Entity.Height" />
</wt:row>
<wt:row align="AlignEnum.Right">
<wt:submitbutton />
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,21 @@
@model HHWMS.Web.ContainerVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:quote>@Localizer["Sys.DeleteConfirm"]</wt:quote>
<wt:row items-per-row="ItemsPerRowEnum.Two">
<wt:display field="Entity.Code" />
<wt:display field="Entity.Type" />
<wt:display field="Entity.IsLock" />
<wt:display field="Entity.Status" />
<wt:display field="Entity.LocationCode" />
<wt:display field="Entity.Length" />
<wt:display field="Entity.Width" />
<wt:display field="Entity.Height" />
</wt:row>
<wt:hidden field="Entity.ID" />
<wt:row align="AlignEnum.Right">
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,18 @@
@model HHWMS.Web.ContainerVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:row items-per-row="ItemsPerRowEnum.Two">
<wt:display field="Entity.Code" />
<wt:display field="Entity.Type" />
<wt:display field="Entity.IsLock" />
<wt:display field="Entity.Status" />
<wt:display field="Entity.LocationCode" />
<wt:display field="Entity.Length" />
<wt:display field="Entity.Width" />
<wt:display field="Entity.Height" />
</wt:row>
<wt:row align="AlignEnum.Right">
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,20 @@
@model HHWMS.Web.ContainerVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:row items-per-row="ItemsPerRowEnum.Two">
<wt:textbox field="Entity.Code" />
<wt:combobox field="Entity.Type" items="ContainerType" />
<wt:combobox field="Entity.IsLock" />
<wt:combobox field="Entity.Status" items="ContainerStatus" />
<wt:textbox field="Entity.LocationCode" />
<wt:textbox field="Entity.Length" />
<wt:textbox field="Entity.Width" />
<wt:textbox field="Entity.Height" />
</wt:row>
<wt:hidden field="Entity.ID" />
<wt:row align="AlignEnum.Right">
<wt:submitbutton />
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,14 @@
@model HHWMS.Web.ContainerImportVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:row align="AlignEnum.Right">
<wt:downloadTemplateButton vm="@Model" />
</wt:row>
<wt:upload field="UploadFileId" label-text="@Model.Localizer["Sys.UploadTemplate"]" upload-type="ExcelFile" />
<wt:grid vm="ErrorListVM" use-local-data="true" hidden-checkbox="true" hidden-grid-index="true" hidden-panel="true" height="300"/>
<wt:row align="AlignEnum.Right">
<wt:submitbutton />
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,16 @@
@model HHWMS.Web.ContainerListVM
@inject IStringLocalizer<Program> Localizer;
<wt:searchpanel vm="@Model" reset-btn="true">
<wt:row items-per-row="ItemsPerRowEnum.Three">
<wt:textbox field="Searcher.Code" />
<wt:combobox field="Searcher.Type" items="ContainerType" />
<wt:combobox field="Searcher.IsLock" />
<wt:combobox field="Searcher.Status" items="ContainerStatus" />
<wt:textbox field="Searcher.LocationCode" />
<wt:textbox field="Searcher.Length" />
<wt:textbox field="Searcher.Width" />
<wt:textbox field="Searcher.Height" />
</wt:row>
</wt:searchpanel>
<wt:grid vm="@Model" url="/configs/Container/Search"/>
@@ -0,0 +1,22 @@
@model HHWMS.Web.LocationVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:row items-per-row="ItemsPerRowEnum.Two">
<wt:combobox field="Entity.ZoneCode" items="ZoneCodes" />
<wt:combobox field="RoadwayType" items="RoadwayTypes" />
<wt:combobox field="Entity.Type" items="Types" />
<wt:textbox field="BeginLine" />
<wt:textbox field="Entity.Line" label-text=@Localizer["Location.EndLine"] />
<wt:textbox field="BeginLayer" />
<wt:textbox field="Entity.Layer" label-text=@Localizer["Location.EndLayer"] />
<wt:textbox field="Entity.RoadWay" />
<wt:textbox field="Entity.Length" />
<wt:textbox field="Entity.Width" />
<wt:textbox field="Entity.Height" />
</wt:row>
<wt:row align="AlignEnum.Right">
<wt:submitbutton />
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,12 @@
@model HHWMS.Web.LocationBatchVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:quote>@Localizer["Sys.BatchDeleteConfirm"]</wt:quote>
<wt:hidden field="Ids" />
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
<wt:row align="AlignEnum.Right">
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,14 @@
@model HHWMS.Web.LocationBatchVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<div style="margin-bottom:10px">@Localizer["Sys.BatchEditConfirm"] </div>
<wt:row items-per-row="ItemsPerRowEnum.Two">
</wt:row>
<wt:hidden field="Ids" />
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
<wt:row align="AlignEnum.Right">
<wt:submitbutton />
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,25 @@
@model HHWMS.Web.LocationVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:row items-per-row="ItemsPerRowEnum.Two">
<wt:textbox field="Entity.Code" />
<wt:textbox field="Entity.Type" />
<wt:textbox field="Entity.Status" />
<wt:textbox field="Entity.Row" />
<wt:textbox field="Entity.Line" />
<wt:textbox field="Entity.Layer" />
<wt:textbox field="Entity.RoadWay" />
<wt:textbox field="Entity.ContainerCode" />
<wt:textbox field="Entity.ZoneCode" />
<wt:switch field="Entity.IsStop" />
<wt:textbox field="Entity.Length" />
<wt:textbox field="Entity.Width" />
<wt:textbox field="Entity.Height" />
<wt:textbox field="Entity.ContiguousCode" />
</wt:row>
<wt:row align="AlignEnum.Right">
<wt:submitbutton />
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,27 @@
@model HHWMS.Web.LocationVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:quote>@Localizer["Sys.DeleteConfirm"]</wt:quote>
<wt:row items-per-row="ItemsPerRowEnum.Two">
<wt:display field="Entity.Code" />
<wt:display field="Entity.Type" />
<wt:display field="Entity.Status" />
<wt:display field="Entity.Row" />
<wt:display field="Entity.Line" />
<wt:display field="Entity.Layer" />
<wt:display field="Entity.RoadWay" />
<wt:display field="Entity.ContainerCode" />
<wt:display field="Entity.ZoneCode" />
<wt:display field="Entity.IsStop" />
<wt:display field="Entity.Length" />
<wt:display field="Entity.Width" />
<wt:display field="Entity.Height" />
<wt:display field="Entity.ContiguousCode" />
</wt:row>
<wt:hidden field="Entity.ID" />
<wt:row align="AlignEnum.Right">
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,24 @@
@model HHWMS.Web.LocationVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:row items-per-row="ItemsPerRowEnum.Two">
<wt:display field="Entity.Code" />
<wt:display field="Entity.Type" />
<wt:display field="Entity.Status" />
<wt:display field="Entity.Row" />
<wt:display field="Entity.Line" />
<wt:display field="Entity.Layer" />
<wt:display field="Entity.RoadWay" />
<wt:display field="Entity.ContainerCode" />
<wt:display field="Entity.ZoneCode" />
<wt:display field="Entity.IsStop" />
<wt:display field="Entity.Length" />
<wt:display field="Entity.Width" />
<wt:display field="Entity.Height" />
<wt:display field="Entity.ContiguousCode" />
</wt:row>
<wt:row align="AlignEnum.Right">
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,26 @@
@model HHWMS.Web.LocationVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:row items-per-row="ItemsPerRowEnum.Two">
<wt:textbox field="Entity.Code" />
<wt:combobox field="Entity.Type" items="Types" />
<wt:combobox field="Entity.Status" items="LocationStatus" />
<wt:textbox field="Entity.Row" />
<wt:textbox field="Entity.Line" />
<wt:textbox field="Entity.Layer" />
<wt:textbox field="Entity.RoadWay" />
<wt:textbox field="Entity.ContainerCode" />
<wt:combobox field="Entity.ZoneCode" items="ZoneCodes"/>
<wt:switch field="Entity.IsStop" />
<wt:textbox field="Entity.Length" />
<wt:textbox field="Entity.Width" />
<wt:textbox field="Entity.Height" />
<wt:textbox field="Entity.ContiguousCode" />
</wt:row>
<wt:hidden field="Entity.ID" />
<wt:row align="AlignEnum.Right">
<wt:submitbutton />
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,14 @@
@model HHWMS.Web.LocationImportVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:row align="AlignEnum.Right">
<wt:downloadTemplateButton vm="@Model" />
</wt:row>
<wt:upload field="UploadFileId" label-text="@Model.Localizer["Sys.UploadTemplate"]" upload-type="ExcelFile" />
<wt:grid vm="ErrorListVM" use-local-data="true" hidden-checkbox="true" hidden-grid-index="true" hidden-panel="true" height="300"/>
<wt:row align="AlignEnum.Right">
<wt:submitbutton />
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,19 @@
@model HHWMS.Web.LocationListVM
@inject IStringLocalizer<Program> Localizer;
<wt:searchpanel vm="@Model" reset-btn="true">
<wt:row items-per-row="ItemsPerRowEnum.Three">
<wt:textbox field="Searcher.Code" />
<wt:combobox field="Searcher.Type" items="Types" />
<wt:combobox field="Searcher.Status" items="LocationStatus" />
<wt:textbox field="Searcher.Row" />
<wt:textbox field="Searcher.Line" />
<wt:textbox field="Searcher.Layer" />
<wt:textbox field="Searcher.RoadWay" />
<wt:textbox field="Searcher.ContainerCode" />
<wt:combobox field="Searcher.ZoneCode" items="ZoneCodes" />
<wt:combobox field="Searcher.IsStop" empty-text="@Localizer["Sys.All"]" />
<wt:textbox field="Searcher.ContiguousCode" />
</wt:row>
</wt:searchpanel>
<wt:grid vm="@Model" url="/configs/Location/Search"/>