diff --git a/HHWMS.Web/Areas/XWMS/Controllers/Inventory2Controller.cs b/HHWMS.Web/Areas/XWMS/Controllers/Inventory2Controller.cs new file mode 100644 index 0000000..f2b2115 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Controllers/Inventory2Controller.cs @@ -0,0 +1,231 @@ +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; + +namespace HHWMS.Web.Controllers +{ + [Area("xwms")] + [ActionDescription("库存")] + public partial class Inventory2Controller : BaseController + { + private readonly IUnitWork _unitwork; + + public Inventory2Controller(IUnitWork unitwork) + { + _unitwork = unitwork; + } + + #region Search + [ActionDescription("Sys.Search")] + public ActionResult Index() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [ActionDescription("Sys.Search")] + [HttpPost] + [FixConnection(CsName = "hangyong")] + public string Search(Inventory2Searcher searcher) + { + var dc = Wtm.CreateDC(cskey: "hangyong"); + Wtm.DC = dc; + var vm = Wtm.CreateVM(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(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Create")] + public ActionResult Create(Inventory2VM 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(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Edit")] + [HttpPost] + [ValidateFormItemOnly] + public ActionResult Edit(Inventory2VM 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(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Delete")] + [HttpPost] + public ActionResult Delete(string id, IFormCollection nouse) + { + var vm = Wtm.CreateVM(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(id); + return PartialView(vm); + } + #endregion + + #region BatchEdit + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult BatchEdit(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult DoBatchEdit(Inventory2BatchVM 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(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult DoBatchDelete(Inventory2BatchVM 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(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Import")] + public ActionResult Import(Inventory2ImportVM 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(Inventory2ListVM vm) + { + return vm.GetExportData(); + } + #endregion + + } +} diff --git a/HHWMS.Web/Areas/XWMS/Controllers/ShipmentDetail2Controller.cs b/HHWMS.Web/Areas/XWMS/Controllers/ShipmentDetail2Controller.cs new file mode 100644 index 0000000..8e2883e --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Controllers/ShipmentDetail2Controller.cs @@ -0,0 +1,247 @@ +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; + +namespace HHWMS.Web.Controllers +{ + [Area("xwms")] + [ActionDescription("出库明细")] + public partial class ShipmentDetail2Controller : BaseController + { + private readonly IUnitWork _unitwork; + + public ShipmentDetail2Controller(IUnitWork unitwork) + { + _unitwork = unitwork; + } + + #region Search + [ActionDescription("Sys.Search")] + public ActionResult Index() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [ActionDescription("Sys.Search")] + [HttpPost] + [FixConnection(CsName = "hangyong")] + public string Search(ShipmentDetail2Searcher searcher) + { + var dc = Wtm.CreateDC(cskey: "hangyong"); + Wtm.DC = dc; + var vm = Wtm.CreateVM(passInit: true); + if (ModelState.IsValid) + { + vm.Searcher = searcher; + return vm.GetJson(false); + } + else + { + return vm.GetError(); + } + } + + [ActionDescription("Sys.Search")] + [HttpPost] + [FixConnection(CsName = "hangyong")] + public string Search2(ShipmentDetail2ListVM vm) + { + var dc = Wtm.CreateDC(cskey: "hangyong"); + Wtm.DC = dc; + vm.Searcher.Page = vm.FC.GetValue("Page"); + vm.Searcher.Limit = vm.FC.GetValue("Limit"); + return vm.GetJson(false); + } + + #endregion + + #region Create + [ActionDescription("Sys.Create")] + public ActionResult Create(int id) + { + var vm = Wtm.CreateVM(); + vm.Entity.ShipmentId = id; + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Create")] + [FixConnection(CsName = "hangyong")] + public ActionResult Create(ShipmentDetail2VM vm) + { + var dc = Wtm.CreateDC(cskey: "hangyong"); + Wtm.DC = dc; + if (!ModelState.IsValid) + { + return PartialView(vm); + } + else + { + vm.DoAdd(); + if (!ModelState.IsValid) + { + vm.DoReInit(); + return PartialView(vm); + } + else + { + return FFResult().CloseDialog().RefreshGrid(index: 1); + } + } + } + #endregion + + #region Edit + [ActionDescription("Sys.Edit")] + public ActionResult Edit(string id) + { + var vm = Wtm.CreateVM(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Edit")] + [HttpPost] + [ValidateFormItemOnly] + public ActionResult Edit(ShipmentDetail2VM 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(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Delete")] + [HttpPost] + public ActionResult Delete(string id, IFormCollection nouse) + { + var vm = Wtm.CreateVM(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(id); + return PartialView(vm); + } + #endregion + + #region BatchEdit + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult BatchEdit(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult DoBatchEdit(ShipmentDetail2BatchVM 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(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult DoBatchDelete(ShipmentDetail2BatchVM 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(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Import")] + public ActionResult Import(ShipmentDetail2ImportVM 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(ShipmentDetail2ListVM vm) + { + return vm.GetExportData(); + } + #endregion + + } +} diff --git a/HHWMS.Web/Areas/XWMS/Controllers/ShipmentHeader2Controller.cs b/HHWMS.Web/Areas/XWMS/Controllers/ShipmentHeader2Controller.cs new file mode 100644 index 0000000..4a5f48a --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Controllers/ShipmentHeader2Controller.cs @@ -0,0 +1,276 @@ +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.Linq; +using System.Data; +using HHWMS.Web.Models; +using System.Collections.Generic; + +namespace HHWMS.Web.Controllers +{ + [Area("xwms")] + [ActionDescription("出库单")] + public partial class ShipmentHeader2Controller : BaseController + { + + public ShipmentHeader2Controller() + { + } + + #region Search + [ActionDescription("Sys.Search")] + public ActionResult Index() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [ActionDescription("Sys.Search")] + [HttpPost] + [FixConnection(CsName = "hangyong")] + public string Search(ShipmentHeader2Searcher searcher) + { + var dc = Wtm.CreateDC(cskey: "hangyong"); + Wtm.DC = dc; + var vm = Wtm.CreateVM(passInit: true); + if (ModelState.IsValid) + { + var warehouseId = Wtm.LoginUserInfo.Groups.FirstOrDefault().GroupCode; + searcher.WarehouseId = int.Parse(warehouseId); + vm.Searcher = searcher; + return vm.GetJson(false); + } + else + { + return vm.GetError(); + } + } + + #endregion + + #region Create + [ActionDescription("Sys.Create")] + public ActionResult Create() + { + var vm = Wtm.CreateVM(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Create")] + [FixConnection(CsName = "hangyong")] + public ActionResult Create(ShipmentHeader2VM vm) + { + var dc = Wtm.CreateDC(cskey: "hangyong"); + Wtm.DC = dc; + 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(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Edit")] + [HttpPost] + [ValidateFormItemOnly] + public ActionResult Edit(ShipmentHeader2VM 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(id); + return PartialView(vm); + } + + [ActionDescription("Sys.Delete")] + [HttpPost] + public ActionResult Delete(string id, IFormCollection nouse) + { + var vm = Wtm.CreateVM(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(id); + return PartialView(vm); + } + #endregion + + #region BatchEdit + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult BatchEdit(string[] IDs) + { + var vm = Wtm.CreateVM(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchEdit")] + public ActionResult DoBatchEdit(ShipmentHeader2BatchVM 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(Ids: IDs); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.BatchDelete")] + public ActionResult DoBatchDelete(ShipmentHeader2BatchVM 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(); + return PartialView(vm); + } + + [HttpPost] + [ActionDescription("Sys.Import")] + public ActionResult Import(ShipmentHeader2ImportVM 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(ShipmentHeader2ListVM vm) + { + return vm.GetExportData(); + } + #endregion + + [ActionDescription("Sys.CreateOut")] + public ActionResult CreateOut() + { + return PartialView("CreateOut"); + } + [ActionDescription("Sys.SearchInv")] + [FixConnection(CsName = "hangyong")] + public ActionResult CreateOutBill(string tran, List data) + { + return JsonMore(null); + } + + [ActionDescription("Sys.SearchInv")] + [FixConnection(CsName = "hangyong")] + public ActionResult SearchInv(string materialCode, string materialName, string batch, string lot) + { + var warehouseId = Wtm.LoginUserInfo.Groups.FirstOrDefault().GroupCode; + var _unitwork = new UnitWork(Wtm); + var list = _unitwork.Find(x => + x.WarehouseId == int.Parse(warehouseId) + && x.MaterialCode.Contains(materialCode) + && x.MaterialName.Contains(materialName) + && x.Batch.Contains(batch) + && x.Lot.Contains(lot) + ).Select(x => new + { + x.LocationCode, + x.MaterialCode, + x.MaterialName, + x.Batch, + x.Lot, + x.ContainerCode, + x.SupplierName, + x.Qty, + ThisQty = x.Qty + }).ToList(); + return JsonMore(list); + } + } +} diff --git a/HHWMS.Web/Areas/XWMS/ViewModels/Inventory2VMs/Inventory2BatchVM.cs b/HHWMS.Web/Areas/XWMS/ViewModels/Inventory2VMs/Inventory2BatchVM.cs new file mode 100644 index 0000000..6be54b6 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/ViewModels/Inventory2VMs/Inventory2BatchVM.cs @@ -0,0 +1,35 @@ +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.Models; + + +namespace HHWMS.Web +{ + public partial class Inventory2BatchVM : BaseBatchVM + { + public Inventory2BatchVM() + { + ListVM = new Inventory2ListVM(); + LinkedVM = new Inventory2_BatchEdit(); + } + + } + + /// + /// Class to define batch edit fields + /// + public class Inventory2_BatchEdit : BaseVM + { + + protected override void InitVM() + { + } + + } + +} diff --git a/HHWMS.Web/Areas/XWMS/ViewModels/Inventory2VMs/Inventory2ImportVM.cs b/HHWMS.Web/Areas/XWMS/ViewModels/Inventory2VMs/Inventory2ImportVM.cs new file mode 100644 index 0000000..77b195a --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/ViewModels/Inventory2VMs/Inventory2ImportVM.cs @@ -0,0 +1,69 @@ +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.Models; + + +namespace HHWMS.Web +{ + public partial class Inventory2TemplateVM : BaseTemplateVM + { + public ExcelPropety WarehouseId_Excel = ExcelPropety.CreateProperty(x => x.WarehouseId); + public ExcelPropety WarehouseCode_Excel = ExcelPropety.CreateProperty(x => x.WarehouseCode); + public ExcelPropety ZoneCode_Excel = ExcelPropety.CreateProperty(x => x.ZoneCode); + public ExcelPropety LocationId_Excel = ExcelPropety.CreateProperty(x => x.LocationId); + public ExcelPropety LocationCode_Excel = ExcelPropety.CreateProperty(x => x.LocationCode); + public ExcelPropety ContainerCode_Excel = ExcelPropety.CreateProperty(x => x.ContainerCode); + public ExcelPropety Roadway_Excel = ExcelPropety.CreateProperty(x => x.Roadway); + public ExcelPropety SourceCode_Excel = ExcelPropety.CreateProperty(x => x.SourceCode); + public ExcelPropety SourceLine_Excel = ExcelPropety.CreateProperty(x => x.SourceLine); + public ExcelPropety CompanyId_Excel = ExcelPropety.CreateProperty(x => x.CompanyId); + public ExcelPropety CompanyCode_Excel = ExcelPropety.CreateProperty(x => x.CompanyCode); + public ExcelPropety MaterialId_Excel = ExcelPropety.CreateProperty(x => x.MaterialId); + public ExcelPropety MaterialCode_Excel = ExcelPropety.CreateProperty(x => x.MaterialCode); + public ExcelPropety MaterialName_Excel = ExcelPropety.CreateProperty(x => x.MaterialName); + public ExcelPropety ReceiptId_Excel = ExcelPropety.CreateProperty(x => x.ReceiptId); + public ExcelPropety ReceiptCode_Excel = ExcelPropety.CreateProperty(x => x.ReceiptCode); + public ExcelPropety ReceiptDetailId_Excel = ExcelPropety.CreateProperty(x => x.ReceiptDetailId); + public ExcelPropety Batch_Excel = ExcelPropety.CreateProperty(x => x.Batch); + public ExcelPropety Lot_Excel = ExcelPropety.CreateProperty(x => x.Lot); + public ExcelPropety Sn_Excel = ExcelPropety.CreateProperty(x => x.Sn); + public ExcelPropety Project_Excel = ExcelPropety.CreateProperty(x => x.Project); + public ExcelPropety ManufactureDate_Excel = ExcelPropety.CreateProperty(x => x.ManufactureDate); + public ExcelPropety ExpirationDate_Excel = ExcelPropety.CreateProperty(x => x.ExpirationDate); + public ExcelPropety Status_Excel = ExcelPropety.CreateProperty(x => x.Status); + public ExcelPropety ContainerStatus_Excel = ExcelPropety.CreateProperty(x => x.ContainerStatus); + public ExcelPropety Qty_Excel = ExcelPropety.CreateProperty(x => x.Qty); + public ExcelPropety Frozen_Excel = ExcelPropety.CreateProperty(x => x.Frozen); + public ExcelPropety TaskQty_Excel = ExcelPropety.CreateProperty(x => x.TaskQty); + public ExcelPropety CostPrice_Excel = ExcelPropety.CreateProperty(x => x.CostPrice); + public ExcelPropety ListPrice_Excel = ExcelPropety.CreateProperty(x => x.ListPrice); + public ExcelPropety NetPrice_Excel = ExcelPropety.CreateProperty(x => x.NetPrice); + public ExcelPropety UserDef1_Excel = ExcelPropety.CreateProperty(x => x.UserDef1); + public ExcelPropety UserDef2_Excel = ExcelPropety.CreateProperty(x => x.UserDef2); + public ExcelPropety UserDef3_Excel = ExcelPropety.CreateProperty(x => x.UserDef3); + public ExcelPropety Deleted_Excel = ExcelPropety.CreateProperty(x => x.Deleted); + public ExcelPropety TaskStatus_Excel = ExcelPropety.CreateProperty(x => x.TaskStatus); + public ExcelPropety SupplierName_Excel = ExcelPropety.CreateProperty(x => x.SupplierName); + public ExcelPropety SupplierCode_Excel = ExcelPropety.CreateProperty(x => x.SupplierCode); + public ExcelPropety QrCode_Excel = ExcelPropety.CreateProperty(x => x.QrCode); + public ExcelPropety TaskNo_Excel = ExcelPropety.CreateProperty(x => x.TaskNo); + public ExcelPropety Unit_Excel = ExcelPropety.CreateProperty(x => x.Unit); + public ExcelPropety MaterialQty_Excel = ExcelPropety.CreateProperty(x => x.MaterialQty); + + protected override void InitVM() + { + } + + } + + public class Inventory2ImportVM : BaseImportVM + { + + } + +} diff --git a/HHWMS.Web/Areas/XWMS/ViewModels/Inventory2VMs/Inventory2ListVM.cs b/HHWMS.Web/Areas/XWMS/ViewModels/Inventory2VMs/Inventory2ListVM.cs new file mode 100644 index 0000000..a3b7d91 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/ViewModels/Inventory2VMs/Inventory2ListVM.cs @@ -0,0 +1,181 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations; +using HHWMS.Web.Models; + + +namespace HHWMS.Web +{ + public partial class Inventory2ListVM : BasePagedListVM + { + protected override List InitGridAction() + { + return new List + { + this.MakeStandardAction("Inventory2", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"xwms", dialogWidth: 800), + this.MakeStandardAction("Inventory2", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "xwms", dialogWidth: 800), + this.MakeStandardAction("Inventory2", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "xwms", dialogWidth: 800), + this.MakeStandardAction("Inventory2", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "xwms", dialogWidth: 800), + this.MakeStandardAction("Inventory2", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "xwms", dialogWidth: 800), + this.MakeStandardAction("Inventory2", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "xwms", dialogWidth: 800), + this.MakeStandardAction("Inventory2", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "xwms", dialogWidth: 800), + this.MakeStandardAction("Inventory2", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "xwms"), + }; + } + + + protected override IEnumerable> InitGridHeader() + { + return new List>{ + this.MakeGridHeader(x => x.WarehouseId), + this.MakeGridHeader(x => x.WarehouseCode), + this.MakeGridHeader(x => x.ZoneCode), + this.MakeGridHeader(x => x.LocationId), + this.MakeGridHeader(x => x.LocationCode), + this.MakeGridHeader(x => x.ContainerCode), + this.MakeGridHeader(x => x.Roadway), + this.MakeGridHeader(x => x.SourceCode), + this.MakeGridHeader(x => x.SourceLine), + this.MakeGridHeader(x => x.CompanyId), + this.MakeGridHeader(x => x.CompanyCode), + this.MakeGridHeader(x => x.MaterialId), + this.MakeGridHeader(x => x.MaterialCode), + this.MakeGridHeader(x => x.MaterialName), + this.MakeGridHeader(x => x.ReceiptId), + this.MakeGridHeader(x => x.ReceiptCode), + this.MakeGridHeader(x => x.ReceiptDetailId), + this.MakeGridHeader(x => x.Batch), + this.MakeGridHeader(x => x.Lot), + this.MakeGridHeader(x => x.Sn), + this.MakeGridHeader(x => x.Project), + this.MakeGridHeader(x => x.ManufactureDate), + this.MakeGridHeader(x => x.ExpirationDate), + this.MakeGridHeader(x => x.Status), + this.MakeGridHeader(x => x.ContainerStatus), + this.MakeGridHeader(x => x.Qty), + this.MakeGridHeader(x => x.Frozen), + this.MakeGridHeader(x => x.TaskQty), + this.MakeGridHeader(x => x.CostPrice), + this.MakeGridHeader(x => x.ListPrice), + this.MakeGridHeader(x => x.NetPrice), + this.MakeGridHeader(x => x.UserDef1), + this.MakeGridHeader(x => x.UserDef2), + this.MakeGridHeader(x => x.UserDef3), + this.MakeGridHeader(x => x.Deleted), + this.MakeGridHeader(x => x.TaskStatus), + this.MakeGridHeader(x => x.SupplierName), + this.MakeGridHeader(x => x.SupplierCode), + this.MakeGridHeader(x => x.QrCode), + this.MakeGridHeader(x => x.TaskNo), + this.MakeGridHeader(x => x.Unit), + this.MakeGridHeader(x => x.MaterialQty), + this.MakeGridHeaderAction(width: 200) + }; + } + + public override IOrderedQueryable GetSearchQuery() + { + var query = DC.Set() + .CheckEqual(Searcher.WarehouseId, x=>x.WarehouseId) + .CheckContain(Searcher.WarehouseCode, x=>x.WarehouseCode) + .CheckContain(Searcher.ZoneCode, x=>x.ZoneCode) + .CheckEqual(Searcher.LocationId, x=>x.LocationId) + .CheckContain(Searcher.LocationCode, x=>x.LocationCode) + .CheckContain(Searcher.ContainerCode, x=>x.ContainerCode) + .CheckEqual(Searcher.Roadway, x=>x.Roadway) + .CheckContain(Searcher.SourceCode, x=>x.SourceCode) + .CheckContain(Searcher.SourceLine, x=>x.SourceLine) + .CheckEqual(Searcher.CompanyId, x=>x.CompanyId) + .CheckContain(Searcher.CompanyCode, x=>x.CompanyCode) + .CheckEqual(Searcher.MaterialId, x=>x.MaterialId) + .CheckContain(Searcher.MaterialCode, x=>x.MaterialCode) + .CheckContain(Searcher.MaterialName, x=>x.MaterialName) + .CheckEqual(Searcher.ReceiptId, x=>x.ReceiptId) + .CheckContain(Searcher.ReceiptCode, x=>x.ReceiptCode) + .CheckEqual(Searcher.ReceiptDetailId, x=>x.ReceiptDetailId) + .CheckContain(Searcher.Batch, x=>x.Batch) + .CheckContain(Searcher.Lot, x=>x.Lot) + .CheckContain(Searcher.Sn, x=>x.Sn) + .CheckContain(Searcher.Project, x=>x.Project) + .CheckBetween(Searcher.ManufactureDate?.GetStartTime(), Searcher.ManufactureDate?.GetEndTime(), x => x.ManufactureDate, includeMax: false) + .CheckBetween(Searcher.ExpirationDate?.GetStartTime(), Searcher.ExpirationDate?.GetEndTime(), x => x.ExpirationDate, includeMax: false) + .CheckContain(Searcher.Status, x=>x.Status) + .CheckContain(Searcher.ContainerStatus, x=>x.ContainerStatus) + .CheckEqual(Searcher.Qty, x=>x.Qty) + .CheckEqual(Searcher.Frozen, x=>x.Frozen) + .CheckEqual(Searcher.TaskQty, x=>x.TaskQty) + .CheckEqual(Searcher.CostPrice, x=>x.CostPrice) + .CheckEqual(Searcher.ListPrice, x=>x.ListPrice) + .CheckEqual(Searcher.NetPrice, x=>x.NetPrice) + .CheckContain(Searcher.UserDef1, x=>x.UserDef1) + .CheckContain(Searcher.UserDef2, x=>x.UserDef2) + .CheckContain(Searcher.UserDef3, x=>x.UserDef3) + .CheckEqual(Searcher.Deleted, x=>x.Deleted) + .CheckContain(Searcher.TaskStatus, x=>x.TaskStatus) + .CheckContain(Searcher.SupplierName, x=>x.SupplierName) + .CheckContain(Searcher.SupplierCode, x=>x.SupplierCode) + .CheckContain(Searcher.QrCode, x=>x.QrCode) + .CheckContain(Searcher.TaskNo, x=>x.TaskNo) + .CheckContain(Searcher.Unit, x=>x.Unit) + .CheckEqual(Searcher.MaterialQty, x=>x.MaterialQty) + .Select(x => new Inventory2_View + { + ID = x.ID, + WarehouseId = x.WarehouseId, + WarehouseCode = x.WarehouseCode, + ZoneCode = x.ZoneCode, + LocationId = x.LocationId, + LocationCode = x.LocationCode, + ContainerCode = x.ContainerCode, + Roadway = x.Roadway, + SourceCode = x.SourceCode, + SourceLine = x.SourceLine, + CompanyId = x.CompanyId, + CompanyCode = x.CompanyCode, + MaterialId = x.MaterialId, + MaterialCode = x.MaterialCode, + MaterialName = x.MaterialName, + ReceiptId = x.ReceiptId, + ReceiptCode = x.ReceiptCode, + ReceiptDetailId = x.ReceiptDetailId, + Batch = x.Batch, + Lot = x.Lot, + Sn = x.Sn, + Project = x.Project, + ManufactureDate = x.ManufactureDate, + ExpirationDate = x.ExpirationDate, + Status = x.Status, + ContainerStatus = x.ContainerStatus, + Qty = x.Qty, + Frozen = x.Frozen, + TaskQty = x.TaskQty, + CostPrice = x.CostPrice, + ListPrice = x.ListPrice, + NetPrice = x.NetPrice, + UserDef1 = x.UserDef1, + UserDef2 = x.UserDef2, + UserDef3 = x.UserDef3, + Deleted = x.Deleted, + TaskStatus = x.TaskStatus, + SupplierName = x.SupplierName, + SupplierCode = x.SupplierCode, + QrCode = x.QrCode, + TaskNo = x.TaskNo, + Unit = x.Unit, + MaterialQty = x.MaterialQty, + }) + .OrderBy(x => x.ID); + return query; + } + + } + + public class Inventory2_View : Inventory2{ + + } +} diff --git a/HHWMS.Web/Areas/XWMS/ViewModels/Inventory2VMs/Inventory2Searcher.cs b/HHWMS.Web/Areas/XWMS/ViewModels/Inventory2VMs/Inventory2Searcher.cs new file mode 100644 index 0000000..511963a --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/ViewModels/Inventory2VMs/Inventory2Searcher.cs @@ -0,0 +1,63 @@ +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.Models; + + +namespace HHWMS.Web +{ + public partial class Inventory2Searcher : BaseSearcher + { + public Int32? WarehouseId { get; set; } + public String WarehouseCode { get; set; } + public String ZoneCode { get; set; } + public Int32? LocationId { get; set; } + public String LocationCode { get; set; } + public String ContainerCode { get; set; } + public Int32? Roadway { get; set; } + public String SourceCode { get; set; } + public String SourceLine { get; set; } + public Int32? CompanyId { get; set; } + public String CompanyCode { get; set; } + public Int32? MaterialId { get; set; } + public String MaterialCode { get; set; } + public String MaterialName { get; set; } + public Int32? ReceiptId { get; set; } + public String ReceiptCode { get; set; } + public Int32? ReceiptDetailId { get; set; } + public String Batch { get; set; } + public String Lot { get; set; } + public String Sn { get; set; } + public String Project { get; set; } + public DateRange ManufactureDate { get; set; } + public DateRange ExpirationDate { get; set; } + public String Status { get; set; } + public String ContainerStatus { get; set; } + public Decimal? Qty { get; set; } + public Int32? Frozen { get; set; } + public Decimal? TaskQty { get; set; } + public Decimal? CostPrice { get; set; } + public Decimal? ListPrice { get; set; } + public Decimal? NetPrice { get; set; } + public String UserDef1 { get; set; } + public String UserDef2 { get; set; } + public String UserDef3 { get; set; } + public Boolean? Deleted { get; set; } + public String TaskStatus { get; set; } + public String SupplierName { get; set; } + public String SupplierCode { get; set; } + public String QrCode { get; set; } + public String TaskNo { get; set; } + public String Unit { get; set; } + public Decimal? MaterialQty { get; set; } + + protected override void InitVM() + { + } + + } +} diff --git a/HHWMS.Web/Areas/XWMS/ViewModels/Inventory2VMs/Inventory2VM.cs b/HHWMS.Web/Areas/XWMS/ViewModels/Inventory2VMs/Inventory2VM.cs new file mode 100644 index 0000000..6b14113 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/ViewModels/Inventory2VMs/Inventory2VM.cs @@ -0,0 +1,40 @@ +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.Models; + + +namespace HHWMS.Web +{ + public partial class Inventory2VM : BaseCRUDVM + { + public Inventory2ListVM InventoryList { get; set; } + + public Inventory2VM() + { + } + + 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(); + } + } +} diff --git a/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentDetail2VMs/ShipmentDetail2BatchVM.cs b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentDetail2VMs/ShipmentDetail2BatchVM.cs new file mode 100644 index 0000000..c4c0d91 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentDetail2VMs/ShipmentDetail2BatchVM.cs @@ -0,0 +1,35 @@ +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.Models; + + +namespace HHWMS.Web +{ + public partial class ShipmentDetail2BatchVM : BaseBatchVM + { + public ShipmentDetail2BatchVM() + { + ListVM = new ShipmentDetail2ListVM(); + LinkedVM = new ShipmentDetail2_BatchEdit(); + } + + } + + /// + /// Class to define batch edit fields + /// + public class ShipmentDetail2_BatchEdit : BaseVM + { + + protected override void InitVM() + { + } + + } + +} diff --git a/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentDetail2VMs/ShipmentDetail2ImportVM.cs b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentDetail2VMs/ShipmentDetail2ImportVM.cs new file mode 100644 index 0000000..10787cb --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentDetail2VMs/ShipmentDetail2ImportVM.cs @@ -0,0 +1,65 @@ +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.Models; + + +namespace HHWMS.Web +{ + public partial class ShipmentDetail2TemplateVM : BaseTemplateVM + { + public ExcelPropety WarehouseId_Excel = ExcelPropety.CreateProperty(x => x.WarehouseId); + public ExcelPropety WarehouseCode_Excel = ExcelPropety.CreateProperty(x => x.WarehouseCode); + public ExcelPropety ZoneCode_Excel = ExcelPropety.CreateProperty(x => x.ZoneCode); + public ExcelPropety CompanyId_Excel = ExcelPropety.CreateProperty(x => x.CompanyId); + public ExcelPropety CompanyCode_Excel = ExcelPropety.CreateProperty(x => x.CompanyCode); + public ExcelPropety SourceCode_Excel = ExcelPropety.CreateProperty(x => x.SourceCode); + public ExcelPropety SupplierCode_Excel = ExcelPropety.CreateProperty(x => x.SupplierCode); + public ExcelPropety SupplierName_Excel = ExcelPropety.CreateProperty(x => x.SupplierName); + public ExcelPropety CPoCode_Excel = ExcelPropety.CreateProperty(x => x.CPoCode); + public ExcelPropety MoCode_Excel = ExcelPropety.CreateProperty(x => x.MoCode); + public ExcelPropety SourceLine_Excel = ExcelPropety.CreateProperty(x => x.SourceLine); + public ExcelPropety ShipmentId_Excel = ExcelPropety.CreateProperty(x => x.ShipmentId); + public ExcelPropety ShipmentCode_Excel = ExcelPropety.CreateProperty(x => x.ShipmentCode); + public ExcelPropety MaterialId_Excel = ExcelPropety.CreateProperty(x => x.MaterialId); + public ExcelPropety MaterialCode_Excel = ExcelPropety.CreateProperty(x => x.MaterialCode); + public ExcelPropety MaterialName_Excel = ExcelPropety.CreateProperty(x => x.MaterialName); + public ExcelPropety Batch_Excel = ExcelPropety.CreateProperty(x => x.Batch); + public ExcelPropety Lot_Excel = ExcelPropety.CreateProperty(x => x.Lot); + public ExcelPropety Sn_Excel = ExcelPropety.CreateProperty(x => x.Sn); + public ExcelPropety Project_Excel = ExcelPropety.CreateProperty(x => x.Project); + public ExcelPropety ManufactureDate_Excel = ExcelPropety.CreateProperty(x => x.ManufactureDate); + public ExcelPropety ExpirationDate_Excel = ExcelPropety.CreateProperty(x => x.ExpirationDate); + public ExcelPropety AgingDate_Excel = ExcelPropety.CreateProperty(x => x.AgingDate); + public ExcelPropety InventoryStatus_Excel = ExcelPropety.CreateProperty(x => x.InventoryStatus); + public ExcelPropety Qty_Excel = ExcelPropety.CreateProperty(x => x.Qty); + public ExcelPropety QtyCompleted_Excel = ExcelPropety.CreateProperty(x => x.QtyCompleted); + public ExcelPropety Unit_Excel = ExcelPropety.CreateProperty(x => x.Unit); + public ExcelPropety Price_Excel = ExcelPropety.CreateProperty(x => x.Price); + public ExcelPropety Status_Excel = ExcelPropety.CreateProperty(x => x.Status); + public ExcelPropety Deleted_Excel = ExcelPropety.CreateProperty(x => x.Deleted); + public ExcelPropety AutoId_Excel = ExcelPropety.CreateProperty(x => x.AutoId); + public ExcelPropety UserDef1_Excel = ExcelPropety.CreateProperty(x => x.UserDef1); + public ExcelPropety UserDef2_Excel = ExcelPropety.CreateProperty(x => x.UserDef2); + public ExcelPropety UserDef3_Excel = ExcelPropety.CreateProperty(x => x.UserDef3); + public ExcelPropety QtyDivided_Excel = ExcelPropety.CreateProperty(x => x.QtyDivided); + public ExcelPropety RequireAddr_Excel = ExcelPropety.CreateProperty(x => x.RequireAddr); + public ExcelPropety PurchasQty_Excel = ExcelPropety.CreateProperty(x => x.PurchasQty); + public ExcelPropety PurchasUnits_Excel = ExcelPropety.CreateProperty(x => x.PurchasUnits); + + protected override void InitVM() + { + } + + } + + public class ShipmentDetail2ImportVM : BaseImportVM + { + + } + +} diff --git a/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentDetail2VMs/ShipmentDetail2ListVM.cs b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentDetail2VMs/ShipmentDetail2ListVM.cs new file mode 100644 index 0000000..da581a1 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentDetail2VMs/ShipmentDetail2ListVM.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations; +using HHWMS.Web.Models; + + +namespace HHWMS.Web +{ + public partial class ShipmentDetail2ListVM : BasePagedListVM + { + protected override List InitGridAction() + { + return new List + { + //this.MakeStandardAction("ShipmentDetail2", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"xwms", dialogWidth: 800), + //this.MakeStandardAction("ShipmentDetail2", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "xwms", dialogWidth: 800), + //this.MakeStandardAction("ShipmentDetail2", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "xwms", dialogWidth: 800), + //this.MakeStandardAction("ShipmentDetail2", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "xwms", dialogWidth: 800), + //this.MakeStandardAction("ShipmentDetail2", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "xwms", dialogWidth: 800), + //this.MakeStandardAction("ShipmentDetail2", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "xwms", dialogWidth: 800), + //this.MakeStandardAction("ShipmentDetail2", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "xwms", dialogWidth: 800), + //this.MakeStandardAction("ShipmentDetail2", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "xwms"), + }; + } + + + protected override IEnumerable> InitGridHeader() + { + return new List>{ + this.MakeGridHeader(x => x.ShipmentCode).SetWidth(150), + this.MakeGridHeader(x => x.SourceCode).SetWidth(150), + this.MakeGridHeader(x => x.SourceLine), + this.MakeGridHeader(x => x.SupplierCode).SetHide(), + this.MakeGridHeader(x => x.SupplierName).SetWidth(150), + this.MakeGridHeader(x => x.MaterialCode).SetWidth(150), + this.MakeGridHeader(x => x.MaterialName).SetWidth(150), + this.MakeGridHeader(x => x.Batch).SetWidth(150), + this.MakeGridHeader(x => x.Lot), + this.MakeGridHeader(x => x.Project), + this.MakeGridHeader(x => x.InventoryStatus), + this.MakeGridHeader(x => x.Qty), + this.MakeGridHeader(x => x.Unit), + this.MakeGridHeader(x => x.Price), + this.MakeGridHeader(x => x.Status), + this.MakeGridHeader(x => x.UserDef1).SetHide(), + this.MakeGridHeader(x => x.UserDef2).SetHide(), + this.MakeGridHeader(x => x.UserDef3).SetHide(), + this.MakeGridHeader(x => x.PurchasQty).SetHide(), + this.MakeGridHeader(x => x.PurchasUnits).SetHide(), + this.MakeGridHeaderAction(width: 200) + }; + } + + public override IOrderedQueryable GetSearchQuery() + { + var query = DC.Set() + .Where(x => x.ShipmentId == Searcher.ShipmentId) + .Select(x => new ShipmentDetail2_View + { + ID = x.ID, + WarehouseId = x.WarehouseId, + WarehouseCode = x.WarehouseCode, + ZoneCode = x.ZoneCode, + CompanyId = x.CompanyId, + CompanyCode = x.CompanyCode, + SourceCode = x.SourceCode, + SupplierCode = x.SupplierCode, + SupplierName = x.SupplierName, + CPoCode = x.CPoCode, + MoCode = x.MoCode, + SourceLine = x.SourceLine, + ShipmentId = x.ShipmentId, + ShipmentCode = x.ShipmentCode, + MaterialId = x.MaterialId, + MaterialCode = x.MaterialCode, + MaterialName = x.MaterialName, + Batch = x.Batch, + Lot = x.Lot, + Sn = x.Sn, + Project = x.Project, + ManufactureDate = x.ManufactureDate, + ExpirationDate = x.ExpirationDate, + AgingDate = x.AgingDate, + InventoryStatus = x.InventoryStatus, + Qty = x.Qty, + QtyCompleted = x.QtyCompleted, + Unit = x.Unit, + Price = x.Price, + Status = x.Status, + Deleted = x.Deleted, + AutoId = x.AutoId, + UserDef1 = x.UserDef1, + UserDef2 = x.UserDef2, + UserDef3 = x.UserDef3, + QtyDivided = x.QtyDivided, + RequireAddr = x.RequireAddr, + PurchasQty = x.PurchasQty, + PurchasUnits = x.PurchasUnits, + }) + .OrderBy(x => x.ID); + return query; + } + + } + + public class ShipmentDetail2_View : ShipmentDetail2{ + + } +} diff --git a/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentDetail2VMs/ShipmentDetail2Searcher.cs b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentDetail2VMs/ShipmentDetail2Searcher.cs new file mode 100644 index 0000000..5eec33c --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentDetail2VMs/ShipmentDetail2Searcher.cs @@ -0,0 +1,59 @@ +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.Models; + + +namespace HHWMS.Web +{ + public partial class ShipmentDetail2Searcher : BaseSearcher + { + public Int32? WarehouseId { get; set; } + public String WarehouseCode { get; set; } + public String ZoneCode { get; set; } + public Int32? CompanyId { get; set; } + public String CompanyCode { get; set; } + public String SourceCode { get; set; } + public String SupplierCode { get; set; } + public String SupplierName { get; set; } + public String CPoCode { get; set; } + public String MoCode { get; set; } + public String SourceLine { get; set; } + public Int32? ShipmentId { get; set; } + public String ShipmentCode { get; set; } + public Int32? MaterialId { get; set; } + public String MaterialCode { get; set; } + public String MaterialName { get; set; } + public String Batch { get; set; } + public String Lot { get; set; } + public String Sn { get; set; } + public String Project { get; set; } + public DateRange ManufactureDate { get; set; } + public DateRange ExpirationDate { get; set; } + public DateRange AgingDate { get; set; } + public String InventoryStatus { get; set; } + public Decimal? Qty { get; set; } + public Decimal? QtyCompleted { get; set; } + public String Unit { get; set; } + public Decimal? Price { get; set; } + public Int32? Status { get; set; } + public Boolean? Deleted { get; set; } + public Int32? AutoId { get; set; } + public String UserDef1 { get; set; } + public String UserDef2 { get; set; } + public String UserDef3 { get; set; } + public Decimal? QtyDivided { get; set; } + public String RequireAddr { get; set; } + public Decimal? PurchasQty { get; set; } + public String PurchasUnits { get; set; } + + protected override void InitVM() + { + } + + } +} diff --git a/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentDetail2VMs/ShipmentDetail2VM.cs b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentDetail2VMs/ShipmentDetail2VM.cs new file mode 100644 index 0000000..51cd3f7 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentDetail2VMs/ShipmentDetail2VM.cs @@ -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.Models; + + +namespace HHWMS.Web +{ + public partial class ShipmentDetail2VM : BaseCRUDVM + { + + public ShipmentDetail2VM() + { + } + + 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(); + } + } +} diff --git a/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentHeader2VMs/ShipmentHeader2BatchVM.cs b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentHeader2VMs/ShipmentHeader2BatchVM.cs new file mode 100644 index 0000000..9a36d6d --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentHeader2VMs/ShipmentHeader2BatchVM.cs @@ -0,0 +1,35 @@ +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.Models; + + +namespace HHWMS.Web +{ + public partial class ShipmentHeader2BatchVM : BaseBatchVM + { + public ShipmentHeader2BatchVM() + { + ListVM = new ShipmentHeader2ListVM(); + LinkedVM = new ShipmentHeader2_BatchEdit(); + } + + } + + /// + /// Class to define batch edit fields + /// + public class ShipmentHeader2_BatchEdit : BaseVM + { + + protected override void InitVM() + { + } + + } + +} diff --git a/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentHeader2VMs/ShipmentHeader2ImportVM.cs b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentHeader2VMs/ShipmentHeader2ImportVM.cs new file mode 100644 index 0000000..b7a5620 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentHeader2VMs/ShipmentHeader2ImportVM.cs @@ -0,0 +1,53 @@ +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.Models; + + +namespace HHWMS.Web +{ + public partial class ShipmentHeader2TemplateVM : BaseTemplateVM + { + public ExcelPropety WarehouseId_Excel = ExcelPropety.CreateProperty(x => x.WarehouseId); + public ExcelPropety WarehouseCode_Excel = ExcelPropety.CreateProperty(x => x.WarehouseCode); + public ExcelPropety Code_Excel = ExcelPropety.CreateProperty(x => x.Code); + public ExcelPropety CompanyId_Excel = ExcelPropety.CreateProperty(x => x.CompanyId); + public ExcelPropety CompanyCode_Excel = ExcelPropety.CreateProperty(x => x.CompanyCode); + public ExcelPropety SourceCode_Excel = ExcelPropety.CreateProperty(x => x.SourceCode); + public ExcelPropety SourcePlatform_Excel = ExcelPropety.CreateProperty(x => x.SourcePlatform); + public ExcelPropety Type_Excel = ExcelPropety.CreateProperty(x => x.Type); + public ExcelPropety ShipTo_Excel = ExcelPropety.CreateProperty(x => x.ShipTo); + public ExcelPropety Priority_Excel = ExcelPropety.CreateProperty(x => x.Priority); + public ExcelPropety Station_Excel = ExcelPropety.CreateProperty(x => x.Station); + public ExcelPropety TotalQty_Excel = ExcelPropety.CreateProperty(x => x.TotalQty); + public ExcelPropety TotalLines_Excel = ExcelPropety.CreateProperty(x => x.TotalLines); + public ExcelPropety Remark_Excel = ExcelPropety.CreateProperty(x => x.Remark); + public ExcelPropety Uploadremark_Excel = ExcelPropety.CreateProperty(x => x.Uploadremark); + public ExcelPropety UploadTime_Excel = ExcelPropety.CreateProperty(x => x.UploadTime); + public ExcelPropety AppointmentTime_Excel = ExcelPropety.CreateProperty(x => x.AppointmentTime); + public ExcelPropety FirstStatus_Excel = ExcelPropety.CreateProperty(x => x.FirstStatus); + public ExcelPropety LastStatus_Excel = ExcelPropety.CreateProperty(x => x.LastStatus); + public ExcelPropety UploadStatus_Excel = ExcelPropety.CreateProperty(x => x.UploadStatus); + public ExcelPropety Enable_Excel = ExcelPropety.CreateProperty(x => x.Enable); + public ExcelPropety Deleted_Excel = ExcelPropety.CreateProperty(x => x.Deleted); + public ExcelPropety UserDef1_Excel = ExcelPropety.CreateProperty(x => x.UserDef1); + public ExcelPropety UserDef2_Excel = ExcelPropety.CreateProperty(x => x.UserDef2); + public ExcelPropety UserDef3_Excel = ExcelPropety.CreateProperty(x => x.UserDef3); + public ExcelPropety UserDef4_Excel = ExcelPropety.CreateProperty(x => x.UserDef4); + + protected override void InitVM() + { + } + + } + + public class ShipmentHeader2ImportVM : BaseImportVM + { + + } + +} diff --git a/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentHeader2VMs/ShipmentHeader2ListVM.cs b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentHeader2VMs/ShipmentHeader2ListVM.cs new file mode 100644 index 0000000..4469283 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentHeader2VMs/ShipmentHeader2ListVM.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using WalkingTec.Mvvm.Core; +using WalkingTec.Mvvm.Core.Extensions; +using Microsoft.EntityFrameworkCore; +using System.ComponentModel.DataAnnotations; +using HHWMS.Web.Models; + + +namespace HHWMS.Web +{ + public partial class ShipmentHeader2ListVM : BasePagedListVM + { + public ShipmentDetail2ListVM ShipmentDetails { get; set; } = new ShipmentDetail2ListVM(); + + protected override void InitVM() + { + ShipmentDetails.CopyContext(this); + } + protected override List InitGridAction() + { + return new List + { + this.MakeStandardAction("ShipmentHeader2", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"xwms", dialogWidth: 800), + this.MakeStandardAction("ShipmentHeader2", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "xwms", dialogWidth: 800), + this.MakeStandardAction("ShipmentHeader2", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "xwms", dialogWidth: 800), + this.MakeStandardAction("ShipmentHeader2", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "xwms", dialogWidth: 800), + this.MakeStandardAction("ShipmentHeader2", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "xwms", dialogWidth: 800), + this.MakeStandardAction("ShipmentHeader2", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "xwms", dialogWidth: 800), + this.MakeStandardAction("ShipmentHeader2", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "xwms", dialogWidth: 800), + this.MakeStandardAction("ShipmentHeader2", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "xwms"), + this.MakeAction("ShipmentHeader2","CreateOut",Localizer["Sys.Out"],Localizer["Sys.Out"],GridActionParameterTypesEnum.NoId,"xwms") + .SetMax(), + + }; + } + + + protected override IEnumerable> InitGridHeader() + { + InitVM(); + return new List>{ + this.MakeGridHeader(x => x.Code) + .SetFormat((a,b) => + { + string rv = UIService.MakeScriptButton(ButtonTypesEnum.Link,a.Code,$"details('{a.ID}')"); + return rv; + }).SetWidth(150), + this.MakeGridHeader(x => x.SourceCode), + this.MakeGridHeader(x => x.Type), + this.MakeGridHeader(x => x.ShipTo), + this.MakeGridHeader(x => x.TotalQty), + this.MakeGridHeader(x => x.TotalLines), + this.MakeGridHeader(x => x.Remark), + this.MakeGridHeader(x => x.Uploadremark).SetHide(), + this.MakeGridHeader(x => x.UploadTime).SetHide(), + this.MakeGridHeader(x => x.FirstStatus).SetHide(), + this.MakeGridHeader(x => x.LastStatus).SetHide(), + this.MakeGridHeader(x => x.UploadStatus).SetHide(), + this.MakeGridHeader(x => x.UserDef1).SetHide(), + this.MakeGridHeader(x => x.UserDef2).SetHide(), + this.MakeGridHeader(x => x.UserDef3).SetHide(), + this.MakeGridHeader(x => x.UserDef4).SetHide(), + this.MakeGridHeaderAction(width: 200) + }; + } + + public override IOrderedQueryable GetSearchQuery() + { + var query = DC.Set() + .CheckEqual(Searcher.WarehouseId, x => x.WarehouseId) + .CheckContain(Searcher.Code, x=>x.Code) + .CheckContain(Searcher.SourceCode, x=>x.SourceCode) + .CheckContain(Searcher.Type, x=>x.Type) + .CheckContain(Searcher.ShipTo, x=>x.ShipTo) + .CheckEqual(Searcher.FirstStatus, x=>x.FirstStatus) + .CheckEqual(Searcher.LastStatus, x=>x.LastStatus) + .CheckEqual(Searcher.UploadStatus, x=>x.UploadStatus) + .CheckContain(Searcher.UserDef1, x=>x.UserDef1) + .CheckContain(Searcher.UserDef2, x=>x.UserDef2) + .CheckContain(Searcher.UserDef3, x=>x.UserDef3) + .CheckContain(Searcher.UserDef4, x=>x.UserDef4) + .Select(x => new ShipmentHeader2_View + { + ID = x.ID, + WarehouseId = x.WarehouseId, + WarehouseCode = x.WarehouseCode, + Code = x.Code, + CompanyId = x.CompanyId, + CompanyCode = x.CompanyCode, + SourceCode = x.SourceCode, + SourcePlatform = x.SourcePlatform, + Type = x.Type, + ShipTo = x.ShipTo, + Priority = x.Priority, + Station = x.Station, + TotalQty = x.TotalQty, + TotalLines = x.TotalLines, + Remark = x.Remark, + Uploadremark = x.Uploadremark, + UploadTime = x.UploadTime, + AppointmentTime = x.AppointmentTime, + FirstStatus = x.FirstStatus, + LastStatus = x.LastStatus, + UploadStatus = x.UploadStatus, + Enable = x.Enable, + Deleted = x.Deleted, + UserDef1 = x.UserDef1, + UserDef2 = x.UserDef2, + UserDef3 = x.UserDef3, + UserDef4 = x.UserDef4, + }) + .OrderBy(x => x.ID); + return query; + } + + } + + public class ShipmentHeader2_View : ShipmentHeader2{ + + } +} diff --git a/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentHeader2VMs/ShipmentHeader2Searcher.cs b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentHeader2VMs/ShipmentHeader2Searcher.cs new file mode 100644 index 0000000..2f3c69b --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentHeader2VMs/ShipmentHeader2Searcher.cs @@ -0,0 +1,47 @@ +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.Models; + + +namespace HHWMS.Web +{ + public partial class ShipmentHeader2Searcher : BaseSearcher + { + public Int32? WarehouseId { get; set; } + public String WarehouseCode { get; set; } + public String Code { get; set; } + public Int32? CompanyId { get; set; } + public String CompanyCode { get; set; } + public String SourceCode { get; set; } + public String SourcePlatform { get; set; } + public String Type { get; set; } + public String ShipTo { get; set; } + public Int32? Priority { get; set; } + public String Station { get; set; } + public Decimal? TotalQty { get; set; } + public Int32? TotalLines { get; set; } + public String Remark { get; set; } + public String Uploadremark { get; set; } + public DateRange UploadTime { get; set; } + public DateRange AppointmentTime { get; set; } + public Int32? FirstStatus { get; set; } + public Int32? LastStatus { get; set; } + public Int32? UploadStatus { get; set; } + public Boolean? Enable { get; set; } + public Boolean? Deleted { get; set; } + public String UserDef1 { get; set; } + public String UserDef2 { get; set; } + public String UserDef3 { get; set; } + public String UserDef4 { get; set; } + + protected override void InitVM() + { + } + + } +} diff --git a/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentHeader2VMs/ShipmentHeader2VM.cs b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentHeader2VMs/ShipmentHeader2VM.cs new file mode 100644 index 0000000..650b0f0 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/ViewModels/ShipmentHeader2VMs/ShipmentHeader2VM.cs @@ -0,0 +1,38 @@ +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.Models; + + +namespace HHWMS.Web +{ + public partial class ShipmentHeader2VM : BaseCRUDVM + { + public ShipmentHeader2VM() + { + } + + 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(); + } + } +} diff --git a/HHWMS.Web/Areas/XWMS/Views/Inventory2/BatchDelete.cshtml b/HHWMS.Web/Areas/XWMS/Views/Inventory2/BatchDelete.cshtml new file mode 100644 index 0000000..eaae49f --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/Inventory2/BatchDelete.cshtml @@ -0,0 +1,12 @@ +@model HHWMS.Web.Inventory2BatchVM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.BatchDeleteConfirm"] + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/Inventory2/BatchEdit.cshtml b/HHWMS.Web/Areas/XWMS/Views/Inventory2/BatchEdit.cshtml new file mode 100644 index 0000000..edce09d --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/Inventory2/BatchEdit.cshtml @@ -0,0 +1,14 @@ +@model HHWMS.Web.Inventory2BatchVM +@inject IStringLocalizer Localizer; + + +
@Localizer["Sys.BatchEditConfirm"]
+ + + + + + + + +
diff --git a/HHWMS.Web/Areas/XWMS/Views/Inventory2/Create.cshtml b/HHWMS.Web/Areas/XWMS/Views/Inventory2/Create.cshtml new file mode 100644 index 0000000..09e8027 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/Inventory2/Create.cshtml @@ -0,0 +1,53 @@ +@model HHWMS.Web.Inventory2VM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/Inventory2/Delete.cshtml b/HHWMS.Web/Areas/XWMS/Views/Inventory2/Delete.cshtml new file mode 100644 index 0000000..372786d --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/Inventory2/Delete.cshtml @@ -0,0 +1,55 @@ +@model HHWMS.Web.Inventory2VM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.DeleteConfirm"] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/Inventory2/Details.cshtml b/HHWMS.Web/Areas/XWMS/Views/Inventory2/Details.cshtml new file mode 100644 index 0000000..7f2fa2d --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/Inventory2/Details.cshtml @@ -0,0 +1,52 @@ +@model HHWMS.Web.Inventory2VM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/Inventory2/Edit.cshtml b/HHWMS.Web/Areas/XWMS/Views/Inventory2/Edit.cshtml new file mode 100644 index 0000000..2cc15e4 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/Inventory2/Edit.cshtml @@ -0,0 +1,54 @@ +@model HHWMS.Web.Inventory2VM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/Inventory2/Import.cshtml b/HHWMS.Web/Areas/XWMS/Views/Inventory2/Import.cshtml new file mode 100644 index 0000000..d531076 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/Inventory2/Import.cshtml @@ -0,0 +1,14 @@ +@model HHWMS.Web.Inventory2ImportVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/Inventory2/Index.cshtml b/HHWMS.Web/Areas/XWMS/Views/Inventory2/Index.cshtml new file mode 100644 index 0000000..5d4e961 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/Inventory2/Index.cshtml @@ -0,0 +1,50 @@ +@model HHWMS.Web.Inventory2ListVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/BatchDelete.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/BatchDelete.cshtml new file mode 100644 index 0000000..2e53b22 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/BatchDelete.cshtml @@ -0,0 +1,12 @@ +@model HHWMS.Web.ShipmentDetail2BatchVM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.BatchDeleteConfirm"] + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/BatchEdit.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/BatchEdit.cshtml new file mode 100644 index 0000000..b321b92 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/BatchEdit.cshtml @@ -0,0 +1,14 @@ +@model HHWMS.Web.ShipmentDetail2BatchVM +@inject IStringLocalizer Localizer; + + +
@Localizer["Sys.BatchEditConfirm"]
+ + + + + + + + +
diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Create.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Create.cshtml new file mode 100644 index 0000000..8a01e90 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Create.cshtml @@ -0,0 +1,49 @@ +@model HHWMS.Web.ShipmentDetail2VM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Delete.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Delete.cshtml new file mode 100644 index 0000000..94a4892 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Delete.cshtml @@ -0,0 +1,51 @@ +@model HHWMS.Web.ShipmentDetail2VM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.DeleteConfirm"] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Details.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Details.cshtml new file mode 100644 index 0000000..9aecbd6 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Details.cshtml @@ -0,0 +1,48 @@ +@model HHWMS.Web.ShipmentDetail2VM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Edit.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Edit.cshtml new file mode 100644 index 0000000..5517f71 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Edit.cshtml @@ -0,0 +1,50 @@ +@model HHWMS.Web.ShipmentDetail2VM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Import.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Import.cshtml new file mode 100644 index 0000000..ee9d390 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Import.cshtml @@ -0,0 +1,14 @@ +@model HHWMS.Web.ShipmentDetail2ImportVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Index.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Index.cshtml new file mode 100644 index 0000000..cff29e5 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentDetail2/Index.cshtml @@ -0,0 +1,46 @@ +@model HHWMS.Web.ShipmentDetail2ListVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/BatchDelete.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/BatchDelete.cshtml new file mode 100644 index 0000000..b86beeb --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/BatchDelete.cshtml @@ -0,0 +1,12 @@ +@model HHWMS.Web.ShipmentHeader2BatchVM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.BatchDeleteConfirm"] + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/BatchEdit.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/BatchEdit.cshtml new file mode 100644 index 0000000..fce6b3f --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/BatchEdit.cshtml @@ -0,0 +1,14 @@ +@model HHWMS.Web.ShipmentHeader2BatchVM +@inject IStringLocalizer Localizer; + + +
@Localizer["Sys.BatchEditConfirm"]
+ + + + + + + + +
diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Create.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Create.cshtml new file mode 100644 index 0000000..a635005 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Create.cshtml @@ -0,0 +1,37 @@ +@model HHWMS.Web.ShipmentHeader2VM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/CreateMove.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/CreateMove.cshtml new file mode 100644 index 0000000..5d4e961 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/CreateMove.cshtml @@ -0,0 +1,50 @@ +@model HHWMS.Web.Inventory2ListVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/CreateOut.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/CreateOut.cshtml new file mode 100644 index 0000000..946ae57 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/CreateOut.cshtml @@ -0,0 +1,334 @@ + + + + + + + + + + + + + + + + + + + + + + + + 创建单据 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
{{scope.row.ThisQty}}
+
+
+ @* +
+ + + + +
{{foodLabel(scope.row.UserDef1)}}
+
+
+ *@ +
+ + + +
+ + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Delete.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Delete.cshtml new file mode 100644 index 0000000..b6aaf27 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Delete.cshtml @@ -0,0 +1,39 @@ +@model HHWMS.Web.ShipmentHeader2VM +@inject IStringLocalizer Localizer; + + + @Localizer["Sys.DeleteConfirm"] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Details.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Details.cshtml new file mode 100644 index 0000000..b842c72 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Details.cshtml @@ -0,0 +1,36 @@ +@model HHWMS.Web.ShipmentHeader2VM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Edit.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Edit.cshtml new file mode 100644 index 0000000..29241af --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Edit.cshtml @@ -0,0 +1,38 @@ +@model HHWMS.Web.ShipmentHeader2VM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Import.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Import.cshtml new file mode 100644 index 0000000..7f8fe31 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Import.cshtml @@ -0,0 +1,14 @@ +@model HHWMS.Web.ShipmentHeader2ImportVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + diff --git a/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Index.cshtml b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Index.cshtml new file mode 100644 index 0000000..af90aa9 --- /dev/null +++ b/HHWMS.Web/Areas/XWMS/Views/ShipmentHeader2/Index.cshtml @@ -0,0 +1,31 @@ +@model HHWMS.Web.ShipmentHeader2ListVM +@inject IStringLocalizer Localizer; + + + + + + + + + + + + diff --git a/HHWMS.Web/DataContext.cs b/HHWMS.Web/DataContext.cs index de5da67..d10973a 100644 --- a/HHWMS.Web/DataContext.cs +++ b/HHWMS.Web/DataContext.cs @@ -63,6 +63,7 @@ namespace HHWMS.Web public DbSet Suppliers { get; set; } public DbSet Material2s { get; set; } + public DbSet Inventory2s { get; set; } public override async Task DataInit(object allModules, bool IsSpa) { var state = await base.DataInit(allModules, IsSpa); diff --git a/HHWMS.Web/Models/XWMS/Inventory.cs b/HHWMS.Web/Models/XWMS/Inventory.cs new file mode 100644 index 0000000..8735349 --- /dev/null +++ b/HHWMS.Web/Models/XWMS/Inventory.cs @@ -0,0 +1,233 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using WalkingTec.Mvvm.Core; + +namespace HHWMS.Web.Models +{ + /// + /// 供应商 + /// + [Table("inventory")] + public partial class Inventory2 : BasePoco + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public new int ID { get; set; } + /// + /// 仓库Id + /// + [Column("warehouseId")] + public int? WarehouseId { get; set; } + /// + /// 仓库编码 + /// + [Column("warehouseCode")] + public string WarehouseCode { get; set; } + /// + /// 库区编码 + /// + [Column("zoneCode")] + public string ZoneCode { get; set; } + /// + /// 库位id + /// + [Column("locationId")] + public int? LocationId { get; set; } + /// + /// 库位编号 + /// + [Column("locationCode")] + public string LocationCode { get; set; } + /// + /// 容器编码 + /// + [Column("containerCode")] + public string ContainerCode { get; set; } + /// + /// 巷道 + /// + [Column("roadway")] + public int? Roadway { get; set; } + /// + /// 上游系统单号 + /// + [Column("sourceCode")] + public string SourceCode { get; set; } + /// + /// 上游系统行号 + /// + [Column("sourceLine")] + public string SourceLine { get; set; } + /// + /// 公司id + /// + [Column("companyId")] + public int? CompanyId { get; set; } + /// + /// 公司编码 + /// + [Column("companyCode")] + public string CompanyCode { get; set; } + /// + /// 物料Id + /// + [Column("materialId")] + public int? MaterialId { get; set; } + /// + /// 物料编码 + /// + [Column("materialCode")] + public string MaterialCode { get; set; } + /// + /// 物料名称 + /// + [Column("materialname")] + public string MaterialName { get; set; } + /// + /// 入库单id + /// + [Column("receiptId")] + public int? ReceiptId { get; set; } + /// + /// 入库单编码 + /// + [Column("receiptCode")] + public string ReceiptCode { get; set; } + /// + /// 入库单明细id + /// + [Column("receiptDetailId")] + public int? ReceiptDetailId { get; set; } + /// + /// 批次 + /// + [Column("batch")] + public string Batch { get; set; } + /// + /// 批号:规格 -- 卷料:厚度 + /// + [Column("lot")] + public string Lot { get; set; } + /// + /// SN序号:铁损值 + /// + [Column("sn")] + public string Sn { get; set; } + /// + /// 项目号(铁芯库:柱片类型) + /// + [Column("project")] + public string Project { get; set; } + /// + /// 生产日期 + /// + [Column("manufactureDate")] + public System.DateTime? ManufactureDate { get; set; } + /// + /// 失效日期 + /// + [Column("expirationDate")] + public System.DateTime? ExpirationDate { get; set; } + /// + /// 物料类型:0:存货编码;1:批次;2:序列号 + /// + [Column("status")] + public string Status { get; set; } + /// + /// 容器状态 + /// + [Column("containerStatus")] + public string ContainerStatus { get; set; } + /// + /// 数量 + /// + [Column("qty")] + public decimal? Qty { get; set; } + [NotMapped] + public decimal? ThisQty { get; set; } + /// + /// 数量 + /// + [Column("frozen")] + public int? Frozen { get; set; } + /// + /// 执行预定数量 + /// + [Column("taskQty")] + public decimal? TaskQty { get; set; } + /// + /// 成本 + /// + [Column("costPrice")] + public decimal? CostPrice { get; set; } + /// + /// 标价 + /// + [Column("listPrice")] + public decimal? ListPrice { get; set; } + /// + /// 净价 + /// + [Column("netPrice")] + public decimal? NetPrice { get; set; } + /// + /// 自定义字段1(卷料库:宽)(铁芯库:生产订单) + /// + [Column("userDef1")] + public string UserDef1 { get; set; } + /// + /// 自定义字段2(卷料库:外径)(铁芯库:横剪/纵剪) + /// + [Column("userDef2")] + public string UserDef2 { get; set; } + /// + /// 自定义字段3(卷料库:库存位置) + /// + [Column("userDef3")] + public string UserDef3 { get; set; } + /// + /// + /// + [Column("deleted")] + + public bool? Deleted { get; set; } + /// + /// 任务状态 + /// + [Column("taskStatus")] + public string TaskStatus { get; set; } + + /// + /// 供应商名称 + /// + [Column("supplierName")] + public string SupplierName { get; set; } + + /// + /// 供应商编号//厂商 + /// + [Column("supplierCode")] + public string SupplierCode { get; set; } + /// + /// 二维码 + /// + [Column("qrcode")] + public string QrCode { get; set; } + /// + /// 任务编号 + /// + [Column("taskno")] + public string TaskNo { get; set; } + /// + /// 单位 + /// + [Column("unit")] + public string Unit { get; set; } + /// + /// 托盘内物料数量 + /// + [Column("materialqty")] + public decimal? MaterialQty { get; set; } + } +}