添加项目文件。

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,24 @@
using HHWMS.Web.Models;
using WalkingTec.Mvvm.Core;
namespace HHWMS.Web
{
public partial class InventoryBatchVM : BaseBatchVM<Inventory, Inventory_BatchEdit>
{
public InventoryBatchVM()
{
ListVM = new InventoryListVM();
LinkedVM = new Inventory_BatchEdit();
}
}
/// <summary>
/// Class to define batch edit fields
/// </summary>
public class Inventory_BatchEdit : BaseVM
{
protected override void InitVM()
{
}
}
}
@@ -0,0 +1,80 @@
using System.ComponentModel.DataAnnotations;
using HHWMS.Web.Models;
using WalkingTec.Mvvm.Core;
namespace HHWMS.Web
{
public partial class InventoryTemplateVM : BaseTemplateVM
{
[Display(Name = "Task.ZoneCode")]
public ExcelPropety ZoneCode_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.ZoneCode);
[Display(Name = "Task.ContainerCode")]
public ExcelPropety ContainerCode_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.ContainerCode);
[Display(Name = "Container.LocationCode")]
public ExcelPropety LocaionCode_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.LocaionCode);
[Display(Name = "Inventory.MaterialCode")]
public ExcelPropety MaterialCode_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.MaterialCode);
[Display(Name = "Inventory.MaterialType")]
public ExcelPropety MaterialType_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.MaterialType);
[Display(Name = "Inventory.MaterialName")]
public ExcelPropety MaterialName_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.MaterialName);
[Display(Name = "Inventory.MaterialSpec")]
public ExcelPropety MaterialSpec_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.MaterialSpec);
[Display(Name = "Inventory.MaterialUnit")]
public ExcelPropety MaterialUnit_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.MaterialUnit);
[Display(Name = "Inventory.Batch")]
public ExcelPropety Batch_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.Batch);
[Display(Name = "Inventory.Lot")]
public ExcelPropety Lot_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.Lot);
[Display(Name = "Inventory.ManufactureDate")]
public ExcelPropety ManufactureDate_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.ManufactureDate);
[Display(Name = "Inventory.ExpirationDate")]
public ExcelPropety ExpirationDate_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.ExpirationDate);
[Display(Name = "Inventory.CompanyCode")]
public ExcelPropety CompanyCode_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.CompanyCode);
[Display(Name = "Inventory.SupplierCode")]
public ExcelPropety SupplierCode_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.SupplierCode);
[Display(Name = "Inventory.TaskQty")]
public ExcelPropety TaskQty_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.TaskQty);
[Display(Name = "Inventory.Qty")]
public ExcelPropety Qty_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.Qty);
[Display(Name = "Inventory.SourceCode")]
public ExcelPropety SourceCode_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.SourceCode);
[Display(Name = "Inventory.ReceiptCode")]
public ExcelPropety ReceiptCode_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.ReceiptCode);
[Display(Name = "Inventory.ReceiptDetailId")]
public ExcelPropety ReceiptDetailId_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.ReceiptDetailId);
[Display(Name = "Inventory.Status")]
public ExcelPropety Status_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.Status);
[Display(Name = "Inventory.TaskStatus")]
public ExcelPropety TaskStatus_Excel = ExcelPropety.CreateProperty<Inventory>(x => x.TaskStatus);
protected override void InitVM()
{
}
}
public class InventoryImportVM : BaseImportVM<InventoryTemplateVM, Inventory>
{
}
}
@@ -0,0 +1,101 @@
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 InventoryListVM : BasePagedListVM<Inventory_View, InventorySearcher>
{
protected override List<GridAction> InitGridAction()
{
return new List<GridAction>
{
this.MakeStandardAction("Inventory", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"inventory", dialogWidth: 800),
this.MakeStandardAction("Inventory", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "inventory", dialogWidth: 800),
this.MakeStandardAction("Inventory", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "inventory", dialogWidth: 800),
this.MakeStandardAction("Inventory", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "inventory", dialogWidth: 800),
this.MakeStandardAction("Inventory", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "inventory", dialogWidth: 800),
this.MakeStandardAction("Inventory", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "inventory", dialogWidth: 800),
this.MakeStandardAction("Inventory", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "inventory", dialogWidth: 800),
this.MakeStandardAction("Inventory", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "inventory"),
};
}
protected override IEnumerable<IGridColumn<Inventory_View>> InitGridHeader()
{
return new List<GridColumn<Inventory_View>>{
this.MakeGridHeader(x => x.ZoneCode),
this.MakeGridHeader(x => x.ContainerCode),
this.MakeGridHeader(x => x.LocaionCode),
this.MakeGridHeader(x => x.MaterialCode),
this.MakeGridHeader(x => x.MaterialType),
this.MakeGridHeader(x => x.MaterialName),
this.MakeGridHeader(x => x.MaterialSpec),
this.MakeGridHeader(x => x.MaterialUnit),
this.MakeGridHeader(x => x.Batch),
this.MakeGridHeader(x => x.Lot),
this.MakeGridHeader(x => x.ManufactureDate),
this.MakeGridHeader(x => x.ExpirationDate),
this.MakeGridHeader(x => x.CompanyCode),
this.MakeGridHeader(x => x.SupplierCode),
this.MakeGridHeader(x => x.TaskQty),
this.MakeGridHeader(x => x.Qty),
this.MakeGridHeader(x => x.SourceCode),
this.MakeGridHeader(x => x.ReceiptCode),
this.MakeGridHeader(x => x.ReceiptDetailId),
this.MakeGridHeader(x => x.Status),
this.MakeGridHeader(x => x.TaskStatus),
this.MakeGridHeaderAction(width: 200)
};
}
public override IOrderedQueryable<Inventory_View> GetSearchQuery()
{
var query = DC.Set<Inventory>()
.CheckContain(Searcher.ZoneCode, x => x.ZoneCode)
.CheckContain(Searcher.MaterialCode, x => x.MaterialCode)
.CheckContain(Searcher.MaterialType, x => x.MaterialType)
.CheckContain(Searcher.MaterialName, x => x.MaterialName)
.CheckContain(Searcher.MaterialSpec, x => x.MaterialSpec)
.CheckContain(Searcher.MaterialUnit, x => x.MaterialUnit)
.CheckContain(Searcher.Batch, x => x.Batch)
.CheckContain(Searcher.Lot, x => x.Lot)
.CheckContain(Searcher.SourceCode, x => x.SourceCode)
.CheckContain(Searcher.ReceiptCode, x => x.ReceiptCode)
.CheckContain(Searcher.Status, x => x.Status)
.Select(x => new Inventory_View
{
ID = x.ID,
ZoneCode = x.ZoneCode,
ContainerCode = x.ContainerCode,
LocaionCode = x.LocaionCode,
MaterialCode = x.MaterialCode,
MaterialType = x.MaterialType,
MaterialName = x.MaterialName,
MaterialSpec = x.MaterialSpec,
MaterialUnit = x.MaterialUnit,
Batch = x.Batch,
Lot = x.Lot,
ManufactureDate = x.ManufactureDate,
ExpirationDate = x.ExpirationDate,
CompanyCode = x.CompanyCode,
SupplierCode = x.SupplierCode,
TaskQty = x.TaskQty,
Qty = x.Qty,
SourceCode = x.SourceCode,
ReceiptCode = x.ReceiptCode,
ReceiptDetailId = x.ReceiptDetailId,
Status = x.Status,
TaskStatus = x.TaskStatus,
})
.OrderBy(x => x.ID);
return query;
}
}
public class Inventory_View : Inventory
{
}
}
@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HHWMS.Web;
namespace HHWMS.Web
{
public partial class InventorySearcher : BaseSearcher
{
[Display(Name = "Task.ZoneCode")]
public String ZoneCode { get; set; }
[Display(Name = "Inventory.MaterialCode")]
public String MaterialCode { get; set; }
[Display(Name = "Inventory.MaterialType")]
public String MaterialType { get; set; }
[Display(Name = "Inventory.MaterialName")]
public String MaterialName { get; set; }
[Display(Name = "Inventory.MaterialSpec")]
public String MaterialSpec { get; set; }
[Display(Name = "Inventory.MaterialUnit")]
public String MaterialUnit { get; set; }
[Display(Name = "Inventory.Batch")]
public String Batch { get; set; }
[Display(Name = "Inventory.Lot")]
public String Lot { get; set; }
[Display(Name = "Inventory.SourceCode")]
public String SourceCode { get; set; }
[Display(Name = "Inventory.ReceiptCode")]
public String ReceiptCode { get; set; }
[Display(Name = "Inventory.Status")]
public String Status { get; set; }
protected override void InitVM()
{
}
}
}
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HHWMS.Web;
using HHWMS.Web.Models;
namespace HHWMS.Web
{
public partial class InventoryVM : BaseCRUDVM<Inventory>
{
public InventoryVM()
{
}
protected override void InitVM()
{
}
public override void DoAdd()
{
base.DoAdd();
}
public override void DoEdit(bool updateAllFields = false)
{
base.DoEdit(updateAllFields);
}
public override void DoDelete()
{
base.DoDelete();
}
}
}