添加项目文件。
This commit is contained in:
1 parent
05e131ca4e
commit
514d6f5255
1162 files changed
+81255
No files matched your search
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user