修改任务明细为子任务
This commit is contained in:
1 parent
820d9d065b
commit
f8ee359644
19 files changed
+142
-64
No files matched your search
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
|
||||
@@ -17,6 +17,8 @@ namespace HHWMS.Web
|
||||
public ExcelPropety OrderCode_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.OrderCode);
|
||||
[Display(Name = "Inventory.ReceiptDetailId")]
|
||||
public ExcelPropety OrderDetailId_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.OrderDetailId);
|
||||
[Display(Name = "Inventory.UniqueCode")]
|
||||
public ExcelPropety UniqueCode_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.UniqueCode);
|
||||
[Display(Name = "Inventory.MaterialCode")]
|
||||
public ExcelPropety MaterialCode_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.MaterialCode);
|
||||
[Display(Name = "Inventory.MaterialName")]
|
||||
@@ -35,6 +37,10 @@ namespace HHWMS.Web
|
||||
public ExcelPropety Qty_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.Qty);
|
||||
[Display(Name = "TaskDetail.InventoryId")]
|
||||
public ExcelPropety InventoryId_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.InventoryId);
|
||||
[Display(Name = "Task.FromLocation")]
|
||||
public ExcelPropety FromLocation_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.FromLocation);
|
||||
[Display(Name = "Task.ToLocation")]
|
||||
public ExcelPropety ToLocation_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.ToLocation);
|
||||
[Display(Name = "TaskDetail.Status")]
|
||||
public ExcelPropety Status_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.Status);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
@@ -33,17 +33,20 @@ namespace HHWMS.Web
|
||||
{
|
||||
return new List<GridColumn<TaskDetail_View>>{
|
||||
this.MakeGridHeader(x => x.TaskNo_view),
|
||||
this.MakeGridHeader(x => x.OrderCode),
|
||||
this.MakeGridHeader(x => x.OrderDetailId),
|
||||
this.MakeGridHeader(x => x.OrderCode).SetHide(),
|
||||
this.MakeGridHeader(x => x.OrderDetailId).SetHide(),
|
||||
this.MakeGridHeader(x => x.UniqueCode),
|
||||
this.MakeGridHeader(x => x.MaterialCode),
|
||||
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.MaterialName).SetHide(),
|
||||
this.MakeGridHeader(x => x.MaterialSpec).SetHide(),
|
||||
this.MakeGridHeader(x => x.MaterialUnit).SetHide(),
|
||||
this.MakeGridHeader(x => x.Batch).SetHide(),
|
||||
this.MakeGridHeader(x => x.Lot).SetHide(),
|
||||
this.MakeGridHeader(x => x.ContainerCode),
|
||||
this.MakeGridHeader(x => x.Qty),
|
||||
this.MakeGridHeader(x => x.InventoryId),
|
||||
this.MakeGridHeader(x => x.InventoryId).SetHide(),
|
||||
this.MakeGridHeader(x => x.FromLocation),
|
||||
this.MakeGridHeader(x => x.ToLocation),
|
||||
this.MakeGridHeader(x => x.Status),
|
||||
this.MakeGridHeaderAction(width: 200)
|
||||
};
|
||||
@@ -52,19 +55,17 @@ namespace HHWMS.Web
|
||||
public override IOrderedQueryable<TaskDetail_View> GetSearchQuery()
|
||||
{
|
||||
var query = DC.Set<TaskDetail>()
|
||||
.CheckEqual(Searcher.TaskHeaderId, x=>x.TaskHeaderId)
|
||||
.CheckContain(Searcher.UniqueCode, x=>x.UniqueCode)
|
||||
.CheckContain(Searcher.MaterialCode, x=>x.MaterialCode)
|
||||
.CheckContain(Searcher.MaterialName, x=>x.MaterialName)
|
||||
.CheckContain(Searcher.MaterialSpec, x=>x.MaterialSpec)
|
||||
.CheckContain(Searcher.Batch, x=>x.Batch)
|
||||
.CheckContain(Searcher.ContainerCode, x=>x.ContainerCode)
|
||||
.CheckEqual(Searcher.Status, x=>x.Status)
|
||||
.CheckContain(Searcher.FromLocation, x=>x.FromLocation)
|
||||
.CheckContain(Searcher.ToLocation, x=>x.ToLocation)
|
||||
.Select(x => new TaskDetail_View
|
||||
{
|
||||
ID = x.ID,
|
||||
TaskNo_view = x.TaskHeader.TaskNo,
|
||||
OrderCode = x.OrderCode,
|
||||
OrderDetailId = x.OrderDetailId,
|
||||
UniqueCode = x.UniqueCode,
|
||||
MaterialCode = x.MaterialCode,
|
||||
MaterialName = x.MaterialName,
|
||||
MaterialSpec = x.MaterialSpec,
|
||||
@@ -74,6 +75,8 @@ namespace HHWMS.Web
|
||||
ContainerCode = x.ContainerCode,
|
||||
Qty = x.Qty,
|
||||
InventoryId = x.InventoryId,
|
||||
FromLocation = x.FromLocation,
|
||||
ToLocation = x.ToLocation,
|
||||
Status = x.Status,
|
||||
})
|
||||
.OrderBy(x => x.ID);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
@@ -12,25 +12,17 @@ namespace HHWMS.Web
|
||||
{
|
||||
public partial class TaskDetailSearcher : BaseSearcher
|
||||
{
|
||||
public List<ComboSelectListItem> AllTaskHeaders { get; set; }
|
||||
[Display(Name = "Task.TaskNo")]
|
||||
public int? TaskHeaderId { get; set; }
|
||||
[Display(Name = "Inventory.UniqueCode")]
|
||||
public String UniqueCode { get; set; }
|
||||
[Display(Name = "Inventory.MaterialCode")]
|
||||
public String MaterialCode { get; set; }
|
||||
[Display(Name = "Inventory.MaterialName")]
|
||||
public String MaterialName { get; set; }
|
||||
[Display(Name = "Inventory.MaterialSpec")]
|
||||
public String MaterialSpec { get; set; }
|
||||
[Display(Name = "Inventory.Batch")]
|
||||
public String Batch { get; set; }
|
||||
[Display(Name = "Task.ContainerCode")]
|
||||
public String ContainerCode { get; set; }
|
||||
[Display(Name = "TaskDetail.Status")]
|
||||
public TaskStatusEnum? Status { get; set; }
|
||||
[Display(Name = "Task.FromLocation")]
|
||||
public String FromLocation { get; set; }
|
||||
[Display(Name = "Task.ToLocation")]
|
||||
public String ToLocation { get; set; }
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
AllTaskHeaders = DC.Set<TaskHeader>().GetSelectListItems(Wtm, y => y.TaskNo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,11 +8,18 @@ using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using HHWMS.Web.Models;
|
||||
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class TaskHeaderListVM : BasePagedListVM<TaskHeader_View, TaskHeaderSearcher>
|
||||
{
|
||||
public List<ComboSelectListItem> ZoneCodes { get; set; }
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
var vm = Wtm.CreateVM<TaskHeaderVM>();
|
||||
ZoneCodes = vm.ZoneCodes;
|
||||
}
|
||||
|
||||
protected override List<GridAction> InitGridAction()
|
||||
{
|
||||
return new List<GridAction>
|
||||
@@ -33,8 +40,14 @@ namespace HHWMS.Web
|
||||
|
||||
protected override IEnumerable<IGridColumn<TaskHeader_View>> InitGridHeader()
|
||||
{
|
||||
InitVM();
|
||||
return new List<GridColumn<TaskHeader_View>>{
|
||||
this.MakeGridHeader(x => x.ZoneCode),
|
||||
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.TaskNo),
|
||||
this.MakeGridHeader(x => x.TaskType),
|
||||
this.MakeGridHeader(x => x.FromLocation),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
@@ -12,6 +12,8 @@ namespace HHWMS.Web
|
||||
{
|
||||
public partial class TaskHeaderVM : BaseCRUDVM<TaskHeader>
|
||||
{
|
||||
public List<ComboSelectListItem> ZoneCodes { get; set; }
|
||||
private IUnitWork _unitWork { get; set; }
|
||||
|
||||
public TaskHeaderVM()
|
||||
{
|
||||
@@ -19,6 +21,8 @@ namespace HHWMS.Web
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
var vm = Wtm.CreateVM<LocationVM>();
|
||||
ZoneCodes = vm.ZoneCodes;
|
||||
}
|
||||
|
||||
public override void DoAdd()
|
||||
|
||||
Reference in new issue
Block a user