修改任务明细为子任务
This commit is contained in:
1 parent
820d9d065b
commit
f8ee359644
19 files changed
+142
-64
No files matched your search
@@ -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