添加客户管理

修改入库页面
修改 库存 物料 工序等页面
This commit is contained in:
zhougf committed 2025-07-25 04:35:31 +08:00
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();
}
}
}