添加工序配置
修改入库页面,任务完成,库存页面等
This commit is contained in:
1 parent
c2b039ea47
commit
5a04ca9d59
41 files changed
+1151
-84
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 ProcessConfigBatchVM : BaseBatchVM<ProcessConfig, ProcessConfig_BatchEdit>
|
||||
{
|
||||
public ProcessConfigBatchVM()
|
||||
{
|
||||
ListVM = new ProcessConfigListVM();
|
||||
LinkedVM = new ProcessConfig_BatchEdit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class to define batch edit fields
|
||||
/// </summary>
|
||||
public class ProcessConfig_BatchEdit : BaseVM
|
||||
{
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
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 ProcessConfigTemplateVM : BaseTemplateVM
|
||||
{
|
||||
[Display(Name = "Process.Code")]
|
||||
public ExcelPropety Code_Excel = ExcelPropety.CreateProperty<ProcessConfig>(x => x.Code);
|
||||
[Display(Name = "Process.Name")]
|
||||
public ExcelPropety Name_Excel = ExcelPropety.CreateProperty<ProcessConfig>(x => x.Name);
|
||||
[Display(Name = "Process.Zone")]
|
||||
public ExcelPropety Zone_Excel = ExcelPropety.CreateProperty<ProcessConfig>(x => x.Zone);
|
||||
[Display(Name = "Process.Port")]
|
||||
public ExcelPropety Port_Excel = ExcelPropety.CreateProperty<ProcessConfig>(x => x.Port);
|
||||
[Display(Name = "Sys.spare")]
|
||||
public ExcelPropety Spare1_Excel = ExcelPropety.CreateProperty<ProcessConfig>(x => x.Spare1);
|
||||
[Display(Name = "Sys.spare")]
|
||||
public ExcelPropety Spare2_Excel = ExcelPropety.CreateProperty<ProcessConfig>(x => x.Spare2);
|
||||
[Display(Name = "Sys.spare")]
|
||||
public ExcelPropety Spare3_Excel = ExcelPropety.CreateProperty<ProcessConfig>(x => x.Spare3);
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class ProcessConfigImportVM : BaseImportVM<ProcessConfigTemplateVM, ProcessConfig>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
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 ProcessConfigListVM : BasePagedListVM<ProcessConfig_View, ProcessConfigSearcher>
|
||||
{
|
||||
public List<ComboSelectListItem> AllZones { get; set; }
|
||||
public List<ComboSelectListItem> AllOutPorts { get; set; }
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
var vm = Wtm.CreateVM<ProcessConfigVM>();
|
||||
AllZones = vm.AllZones;
|
||||
AllOutPorts = vm.AllOutPorts;
|
||||
}
|
||||
|
||||
protected override List<GridAction> InitGridAction()
|
||||
{
|
||||
return new List<GridAction>
|
||||
{
|
||||
this.MakeStandardAction("ProcessConfig", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("ProcessConfig", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("ProcessConfig", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("ProcessConfig", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("ProcessConfig", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("ProcessConfig", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("ProcessConfig", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("ProcessConfig", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "configs"),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
protected override IEnumerable<IGridColumn<ProcessConfig_View>> InitGridHeader()
|
||||
{
|
||||
InitVM();
|
||||
return new List<GridColumn<ProcessConfig_View>>{
|
||||
this.MakeGridHeader(x => x.Code),
|
||||
this.MakeGridHeader(x => x.Name),
|
||||
this.MakeGridHeader(x => x.Zone)
|
||||
.SetFormat((a, b) =>
|
||||
{
|
||||
var data = AllZones.FirstOrDefault(x => x.Value.ToString() == a.Zone);
|
||||
return data?.Text ?? a.Zone;
|
||||
}),
|
||||
this.MakeGridHeader(x => x.Port)
|
||||
.SetFormat((a, b) =>
|
||||
{
|
||||
var data = AllOutPorts.FirstOrDefault(x => x.Value.ToString() == a.Port);
|
||||
return data?.Text ?? a.Port;
|
||||
}),
|
||||
this.MakeGridHeader(x => x.Spare1).SetHide(),
|
||||
this.MakeGridHeader(x => x.Spare2).SetHide(),
|
||||
this.MakeGridHeader(x => x.Spare3).SetHide(),
|
||||
this.MakeGridHeaderAction(width: 200)
|
||||
};
|
||||
}
|
||||
|
||||
public override IOrderedQueryable<ProcessConfig_View> GetSearchQuery()
|
||||
{
|
||||
var query = DC.Set<ProcessConfig>()
|
||||
.CheckContain(Searcher.Code, x=>x.Code)
|
||||
.CheckContain(Searcher.Name, x=>x.Name)
|
||||
.CheckContain(Searcher.Zone, x=>x.Zone)
|
||||
.CheckContain(Searcher.Port, x=>x.Port)
|
||||
.CheckContain(Searcher.Spare1, x=>x.Spare1)
|
||||
.CheckContain(Searcher.Spare2, x=>x.Spare2)
|
||||
.CheckContain(Searcher.Spare3, x=>x.Spare3)
|
||||
.Select(x => new ProcessConfig_View
|
||||
{
|
||||
ID = x.ID,
|
||||
Code = x.Code,
|
||||
Name = x.Name,
|
||||
Zone = x.Zone,
|
||||
Port = x.Port,
|
||||
Spare1 = x.Spare1,
|
||||
Spare2 = x.Spare2,
|
||||
Spare3 = x.Spare3,
|
||||
})
|
||||
.OrderBy(x => x.ID);
|
||||
return query;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class ProcessConfig_View : ProcessConfig{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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 ProcessConfigSearcher : BaseSearcher
|
||||
{
|
||||
[Display(Name = "Process.Code")]
|
||||
public String Code { get; set; }
|
||||
[Display(Name = "Process.Name")]
|
||||
public String Name { get; set; }
|
||||
[Display(Name = "Process.Zone")]
|
||||
public String Zone { get; set; }
|
||||
[Display(Name = "Process.Port")]
|
||||
public String Port { get; set; }
|
||||
[Display(Name = "Sys.Spare")]
|
||||
public String Spare1 { get; set; }
|
||||
[Display(Name = "Sys.Spare")]
|
||||
public String Spare2 { get; set; }
|
||||
[Display(Name = "Sys.Spare")]
|
||||
public String Spare3 { get; set; }
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
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 ProcessConfigVM : BaseCRUDVM<ProcessConfig>
|
||||
{
|
||||
|
||||
public List<ComboSelectListItem> AllZones { get; set; }
|
||||
public List<ComboSelectListItem> AllOutPorts { get; set; }
|
||||
|
||||
public ProcessConfigVM()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
var vm = Wtm.CreateVM<InventoryVM>();
|
||||
AllZones = new List<ComboSelectListItem>
|
||||
{
|
||||
new ComboSelectListItem { Text = "区域1", Value = "Zone1" },
|
||||
new ComboSelectListItem { Text = "区域2", Value = "Zone2" },
|
||||
new ComboSelectListItem { Text = "区域3", Value = "Zone3" },
|
||||
};
|
||||
AllOutPorts = vm.AllOutPorts;
|
||||
}
|
||||
|
||||
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