添加客户管理
修改入库页面 修改 库存 物料 工序等页面
This commit is contained in:
1 parent
2435176f77
commit
c2b039ea47
41 files changed
+977
-160
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.configs.ViewModels.CustomerVMs
|
||||
{
|
||||
public partial class CustomerBatchVM : BaseBatchVM<Customer, Customer_BatchEdit>
|
||||
{
|
||||
public CustomerBatchVM()
|
||||
{
|
||||
ListVM = new CustomerListVM();
|
||||
LinkedVM = new Customer_BatchEdit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class to define batch edit fields
|
||||
/// </summary>
|
||||
public class Customer_BatchEdit : BaseVM
|
||||
{
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
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.configs.ViewModels.CustomerVMs
|
||||
{
|
||||
public partial class CustomerTemplateVM : BaseTemplateVM
|
||||
{
|
||||
[Display(Name = "Location.ZoneCode")]
|
||||
public ExcelPropety Code_Excel = ExcelPropety.CreateProperty<Customer>(x => x.Code);
|
||||
[Display(Name = "Location.ZoneName")]
|
||||
public ExcelPropety Type_Excel = ExcelPropety.CreateProperty<Customer>(x => x.Type);
|
||||
[Display(Name = "Customer.ZoneName")]
|
||||
public ExcelPropety Name_Excel = ExcelPropety.CreateProperty<Customer>(x => x.Name);
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class CustomerImportVM : BaseImportVM<CustomerTemplateVM, Customer>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
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.configs.ViewModels.CustomerVMs
|
||||
{
|
||||
public partial class CustomerListVM : BasePagedListVM<Customer_View, CustomerSearcher>
|
||||
{
|
||||
protected override List<GridAction> InitGridAction()
|
||||
{
|
||||
return new List<GridAction>
|
||||
{
|
||||
this.MakeStandardAction("Customer", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("Customer", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("Customer", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("Customer", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("Customer", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("Customer", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("Customer", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "configs", dialogWidth: 800),
|
||||
this.MakeStandardAction("Customer", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "configs"),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
protected override IEnumerable<IGridColumn<Customer_View>> InitGridHeader()
|
||||
{
|
||||
return new List<GridColumn<Customer_View>>{
|
||||
this.MakeGridHeader(x => x.Code),
|
||||
this.MakeGridHeader(x => x.Type),
|
||||
this.MakeGridHeader(x => x.Name),
|
||||
this.MakeGridHeaderAction(width: 200)
|
||||
};
|
||||
}
|
||||
|
||||
public override IOrderedQueryable<Customer_View> GetSearchQuery()
|
||||
{
|
||||
var query = DC.Set<Customer>()
|
||||
.CheckContain(Searcher.Code, x=>x.Code)
|
||||
.CheckContain(Searcher.Type, x=>x.Type)
|
||||
.CheckContain(Searcher.Name, x=>x.Name)
|
||||
.Select(x => new Customer_View
|
||||
{
|
||||
ID = x.ID,
|
||||
Code = x.Code,
|
||||
Type = x.Type,
|
||||
Name = x.Name,
|
||||
})
|
||||
.OrderBy(x => x.ID);
|
||||
return query;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class Customer_View : Customer{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
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.configs.ViewModels.CustomerVMs
|
||||
{
|
||||
public partial class CustomerSearcher : BaseSearcher
|
||||
{
|
||||
[Display(Name = "Customer.Code")]
|
||||
public String Code { get; set; }
|
||||
[Display(Name = "Customer.Type")]
|
||||
public String Type { get; set; }
|
||||
[Display(Name = "Customer.Name")]
|
||||
public String Name { get; set; }
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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.configs.ViewModels.CustomerVMs
|
||||
{
|
||||
public partial class CustomerVM : BaseCRUDVM<Customer>
|
||||
{
|
||||
|
||||
public CustomerVM()
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -429,7 +429,6 @@ namespace HHWMS.Web
|
||||
string code = moveloc.Data.Code;
|
||||
var movelocation = _unitWork.FindSingle<Location>(x => x.Code == code);
|
||||
|
||||
|
||||
// 生成outter移库任务
|
||||
var outterTask = new TaskHeader()
|
||||
{
|
||||
@@ -466,18 +465,16 @@ namespace HHWMS.Web
|
||||
}
|
||||
|
||||
// 下发任务到wcs
|
||||
// 成品库下发WCS入库,目的仓位给固定WareCell
|
||||
var postData = new
|
||||
{
|
||||
TaskNo = task.TaskNo,
|
||||
PalletNo = task.ContainerCode,
|
||||
FromLocation = task.FromLocation,
|
||||
ToLocation = task.ToLocation
|
||||
ToLocation = (task.TaskType == TaskTypeEnum.入库 && task.ZoneId != 1027) ? "WareCell" : task.ToLocation
|
||||
};
|
||||
task.Status = TaskStatusEnum.已下发;
|
||||
task.UpdateTime = DateTime.Now;
|
||||
task.UpdateBy = "WMS";
|
||||
_unitWork.Add(task);
|
||||
/*try
|
||||
|
||||
try
|
||||
{
|
||||
var domain = task.ZoneId == 1027 ? "WCSXB" : "WCSCP";
|
||||
var res = Wtm.CallAPI<ApiJsonResult<dynamic>>(domain, "TaskAssign", HttpMethodEnum.POST, postData)
|
||||
@@ -500,7 +497,7 @@ namespace HHWMS.Web
|
||||
{
|
||||
task.ErrorMsg = ex.Message;
|
||||
return ResponseResult<dynamic>.Error("任务下发失败!");
|
||||
}*/
|
||||
}
|
||||
|
||||
return ResponseResult<dynamic>.Success();
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@ namespace HHWMS.Web
|
||||
public ExcelPropety ProcessName_Excel = ExcelPropety.CreateProperty<MaterialProcess>(x => x.ProcessName);
|
||||
[Display(Name = "MaterialProcess.ProcessCode")]
|
||||
public ExcelPropety ProcessCode_Excel = ExcelPropety.CreateProperty<MaterialProcess>(x => x.ProcessCode);
|
||||
[Display(Name = "MaterialProcess.Weight")]
|
||||
public ExcelPropety Weight_Excel = ExcelPropety.CreateProperty<MaterialProcess>(x => x.Weight);
|
||||
[Display(Name = "MaterialProcess.Description")]
|
||||
public ExcelPropety Description_Excel = ExcelPropety.CreateProperty<MaterialProcess>(x => x.Description);
|
||||
[Display(Name = "MaterialProcess.IsActive")]
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace HHWMS.Web
|
||||
this.MakeGridHeader(x => x.ProcessOrder),
|
||||
this.MakeGridHeader(x => x.ProcessName),
|
||||
this.MakeGridHeader(x => x.ProcessCode),
|
||||
this.MakeGridHeader(x => x.Weight),
|
||||
this.MakeGridHeader(x => x.Description),
|
||||
this.MakeGridHeader(x => x.IsActive),
|
||||
this.MakeGridHeaderAction(width: 200)
|
||||
@@ -49,7 +50,9 @@ namespace HHWMS.Web
|
||||
.CheckEqual(Searcher.ProcessOrder, x=>x.ProcessOrder)
|
||||
.CheckContain(Searcher.ProcessName, x=>x.ProcessName)
|
||||
.CheckContain(Searcher.ProcessCode, x=>x.ProcessCode)
|
||||
.CheckEqual(Searcher.Weight, x=>x.Weight)
|
||||
.CheckContain(Searcher.Description, x=>x.Description)
|
||||
.CheckEqual(Searcher.IsActive, x=>x.IsActive)
|
||||
.Select(x => new MaterialProcess_View
|
||||
{
|
||||
ID = x.ID,
|
||||
@@ -57,6 +60,7 @@ namespace HHWMS.Web
|
||||
ProcessOrder = x.ProcessOrder,
|
||||
ProcessName = x.ProcessName,
|
||||
ProcessCode = x.ProcessCode,
|
||||
Weight = x.Weight,
|
||||
Description = x.Description,
|
||||
IsActive = x.IsActive,
|
||||
})
|
||||
|
||||
@@ -20,8 +20,12 @@ namespace HHWMS.Web
|
||||
public String ProcessName { get; set; }
|
||||
[Display(Name = "MaterialProcess.ProcessCode")]
|
||||
public String ProcessCode { get; set; }
|
||||
[Display(Name = "MaterialProcess.Weight")]
|
||||
public Int32? Weight { get; set; }
|
||||
[Display(Name = "MaterialProcess.Description")]
|
||||
public String Description { get; set; }
|
||||
[Display(Name = "MaterialProcess.IsActive")]
|
||||
public Boolean? IsActive { get; set; }
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user