添加项目文件。
This commit is contained in:
1 parent
05e131ca4e
commit
514d6f5255
1162 files changed
+81255
No files matched your search
@@ -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 TaskDetailBatchVM : BaseBatchVM<TaskDetail, TaskDetail_BatchEdit>
|
||||
{
|
||||
public TaskDetailBatchVM()
|
||||
{
|
||||
ListVM = new TaskDetailListVM();
|
||||
LinkedVM = new TaskDetail_BatchEdit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class to define batch edit fields
|
||||
/// </summary>
|
||||
public class TaskDetail_BatchEdit : BaseVM
|
||||
{
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
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 TaskDetailTemplateVM : BaseTemplateVM
|
||||
{
|
||||
public ExcelPropety TaskHeader_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.TaskHeaderId);
|
||||
[Display(Name = "Inventory.ReceiptCode")]
|
||||
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.MaterialCode")]
|
||||
public ExcelPropety MaterialCode_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.MaterialCode);
|
||||
[Display(Name = "Inventory.MaterialName")]
|
||||
public ExcelPropety MaterialName_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.MaterialName);
|
||||
[Display(Name = "Inventory.MaterialSpec")]
|
||||
public ExcelPropety MaterialSpec_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.MaterialSpec);
|
||||
[Display(Name = "Inventory.MaterialUnit")]
|
||||
public ExcelPropety MaterialUnit_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.MaterialUnit);
|
||||
[Display(Name = "Inventory.Batch")]
|
||||
public ExcelPropety Batch_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.Batch);
|
||||
[Display(Name = "Inventory.Lot")]
|
||||
public ExcelPropety Lot_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.Lot);
|
||||
[Display(Name = "Task.ContainerCode")]
|
||||
public ExcelPropety ContainerCode_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.ContainerCode);
|
||||
[Display(Name = "Inventory.Qty")]
|
||||
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 = "TaskDetail.Status")]
|
||||
public ExcelPropety Status_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.Status);
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
TaskHeader_Excel.DataType = ColumnDataType.ComboBox;
|
||||
TaskHeader_Excel.ListItems = DC.Set<TaskHeader>().GetSelectListItems(Wtm, y => y.TaskNo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class TaskDetailImportVM : BaseImportVM<TaskDetailTemplateVM, TaskDetail>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
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 TaskDetailListVM : BasePagedListVM<TaskDetail_View, TaskDetailSearcher>
|
||||
{
|
||||
protected override List<GridAction> InitGridAction()
|
||||
{
|
||||
return new List<GridAction>
|
||||
{
|
||||
this.MakeStandardAction("TaskDetail", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"taskManage", dialogWidth: 800),
|
||||
this.MakeStandardAction("TaskDetail", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "taskManage", dialogWidth: 800),
|
||||
this.MakeStandardAction("TaskDetail", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "taskManage", dialogWidth: 800),
|
||||
this.MakeStandardAction("TaskDetail", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "taskManage", dialogWidth: 800),
|
||||
this.MakeStandardAction("TaskDetail", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "taskManage", dialogWidth: 800),
|
||||
this.MakeStandardAction("TaskDetail", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "taskManage", dialogWidth: 800),
|
||||
this.MakeStandardAction("TaskDetail", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "taskManage", dialogWidth: 800),
|
||||
this.MakeStandardAction("TaskDetail", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "taskManage"),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
protected override IEnumerable<IGridColumn<TaskDetail_View>> InitGridHeader()
|
||||
{
|
||||
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.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.ContainerCode),
|
||||
this.MakeGridHeader(x => x.Qty),
|
||||
this.MakeGridHeader(x => x.InventoryId),
|
||||
this.MakeGridHeader(x => x.Status),
|
||||
this.MakeGridHeaderAction(width: 200)
|
||||
};
|
||||
}
|
||||
|
||||
public override IOrderedQueryable<TaskDetail_View> GetSearchQuery()
|
||||
{
|
||||
var query = DC.Set<TaskDetail>()
|
||||
.CheckEqual(Searcher.TaskHeaderId, x=>x.TaskHeaderId)
|
||||
.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)
|
||||
.Select(x => new TaskDetail_View
|
||||
{
|
||||
ID = x.ID,
|
||||
TaskNo_view = x.TaskHeader.TaskNo,
|
||||
OrderCode = x.OrderCode,
|
||||
OrderDetailId = x.OrderDetailId,
|
||||
MaterialCode = x.MaterialCode,
|
||||
MaterialName = x.MaterialName,
|
||||
MaterialSpec = x.MaterialSpec,
|
||||
MaterialUnit = x.MaterialUnit,
|
||||
Batch = x.Batch,
|
||||
Lot = x.Lot,
|
||||
ContainerCode = x.ContainerCode,
|
||||
Qty = x.Qty,
|
||||
InventoryId = x.InventoryId,
|
||||
Status = x.Status,
|
||||
})
|
||||
.OrderBy(x => x.ID);
|
||||
return query;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class TaskDetail_View : TaskDetail{
|
||||
[Display(Name = "Task.TaskNo")]
|
||||
public String TaskNo_view { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
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 TaskDetailSearcher : BaseSearcher
|
||||
{
|
||||
public List<ComboSelectListItem> AllTaskHeaders { get; set; }
|
||||
[Display(Name = "Task.TaskNo")]
|
||||
public int? TaskHeaderId { 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; }
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
AllTaskHeaders = DC.Set<TaskHeader>().GetSelectListItems(Wtm, y => y.TaskNo);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
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 TaskDetailVM : BaseCRUDVM<TaskDetail>
|
||||
{
|
||||
public List<ComboSelectListItem> AllTaskHeaders { get; set; }
|
||||
|
||||
public TaskDetailVM()
|
||||
{
|
||||
SetInclude(x => x.TaskHeader);
|
||||
}
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
AllTaskHeaders = DC.Set<TaskHeader>().GetSelectListItems(Wtm, y => y.TaskNo);
|
||||
}
|
||||
|
||||
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