入库单新建
This commit is contained in:
1 parent
e2dead6c3f
commit
663769f80e
50 files changed
+2164
-94
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 Material2BatchVM : BaseBatchVM<Material2, Material2_BatchEdit>
|
||||
{
|
||||
public Material2BatchVM()
|
||||
{
|
||||
ListVM = new Material2ListVM();
|
||||
LinkedVM = new Material2_BatchEdit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class to define batch edit fields
|
||||
/// </summary>
|
||||
public class Material2_BatchEdit : BaseVM
|
||||
{
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
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 Material2TemplateVM : BaseTemplateVM
|
||||
{
|
||||
public ExcelPropety WarehouseId_Excel = ExcelPropety.CreateProperty<Material2>(x => x.WarehouseId);
|
||||
public ExcelPropety WarehouseCode_Excel = ExcelPropety.CreateProperty<Material2>(x => x.WarehouseCode);
|
||||
public ExcelPropety CompanyId_Excel = ExcelPropety.CreateProperty<Material2>(x => x.CompanyId);
|
||||
public ExcelPropety CompanyCode_Excel = ExcelPropety.CreateProperty<Material2>(x => x.CompanyCode);
|
||||
public ExcelPropety Code_Excel = ExcelPropety.CreateProperty<Material2>(x => x.Code);
|
||||
public ExcelPropety Type_Excel = ExcelPropety.CreateProperty<Material2>(x => x.Type);
|
||||
public ExcelPropety Name_Excel = ExcelPropety.CreateProperty<Material2>(x => x.Name);
|
||||
public ExcelPropety Barcode_Excel = ExcelPropety.CreateProperty<Material2>(x => x.Barcode);
|
||||
public ExcelPropety Barcode2_Excel = ExcelPropety.CreateProperty<Material2>(x => x.Barcode2);
|
||||
public ExcelPropety Barcode3_Excel = ExcelPropety.CreateProperty<Material2>(x => x.Barcode3);
|
||||
public ExcelPropety Barcode4_Excel = ExcelPropety.CreateProperty<Material2>(x => x.Barcode4);
|
||||
public ExcelPropety ClassA_Excel = ExcelPropety.CreateProperty<Material2>(x => x.ClassA);
|
||||
public ExcelPropety ClassB_Excel = ExcelPropety.CreateProperty<Material2>(x => x.ClassB);
|
||||
public ExcelPropety ClassC_Excel = ExcelPropety.CreateProperty<Material2>(x => x.ClassC);
|
||||
public ExcelPropety Specification_Excel = ExcelPropety.CreateProperty<Material2>(x => x.Specification);
|
||||
public ExcelPropety Brand_Excel = ExcelPropety.CreateProperty<Material2>(x => x.Brand);
|
||||
public ExcelPropety Size_Excel = ExcelPropety.CreateProperty<Material2>(x => x.Size);
|
||||
public ExcelPropety Color_Excel = ExcelPropety.CreateProperty<Material2>(x => x.Color);
|
||||
public ExcelPropety PlaceOfOrigin_Excel = ExcelPropety.CreateProperty<Material2>(x => x.PlaceOfOrigin);
|
||||
public ExcelPropety DaysToExpire_Excel = ExcelPropety.CreateProperty<Material2>(x => x.DaysToExpire);
|
||||
public ExcelPropety ExpiringDays_Excel = ExcelPropety.CreateProperty<Material2>(x => x.ExpiringDays);
|
||||
public ExcelPropety MinShelfLifeDays_Excel = ExcelPropety.CreateProperty<Material2>(x => x.MinShelfLifeDays);
|
||||
public ExcelPropety CostPrice_Excel = ExcelPropety.CreateProperty<Material2>(x => x.CostPrice);
|
||||
public ExcelPropety ListPrice_Excel = ExcelPropety.CreateProperty<Material2>(x => x.ListPrice);
|
||||
public ExcelPropety NetPrice_Excel = ExcelPropety.CreateProperty<Material2>(x => x.NetPrice);
|
||||
public ExcelPropety MasterUnit_Excel = ExcelPropety.CreateProperty<Material2>(x => x.MasterUnit);
|
||||
public ExcelPropety AssistUnit_Excel = ExcelPropety.CreateProperty<Material2>(x => x.AssistUnit);
|
||||
public ExcelPropety ConvertRate_Excel = ExcelPropety.CreateProperty<Material2>(x => x.ConvertRate);
|
||||
public ExcelPropety ManufactureDate_Excel = ExcelPropety.CreateProperty<Material2>(x => x.ManufactureDate);
|
||||
public ExcelPropety ReceiptDate_Excel = ExcelPropety.CreateProperty<Material2>(x => x.ReceiptDate);
|
||||
public ExcelPropety Enable_Excel = ExcelPropety.CreateProperty<Material2>(x => x.Enable);
|
||||
public ExcelPropety Deleted_Excel = ExcelPropety.CreateProperty<Material2>(x => x.Deleted);
|
||||
public ExcelPropety UserDef1_Excel = ExcelPropety.CreateProperty<Material2>(x => x.UserDef1);
|
||||
public ExcelPropety UserDef2_Excel = ExcelPropety.CreateProperty<Material2>(x => x.UserDef2);
|
||||
public ExcelPropety UserDef3_Excel = ExcelPropety.CreateProperty<Material2>(x => x.UserDef3);
|
||||
public ExcelPropety UserDef4_Excel = ExcelPropety.CreateProperty<Material2>(x => x.UserDef4);
|
||||
public ExcelPropety UserDef5_Excel = ExcelPropety.CreateProperty<Material2>(x => x.UserDef5);
|
||||
public ExcelPropety UserDef6_Excel = ExcelPropety.CreateProperty<Material2>(x => x.UserDef6);
|
||||
public ExcelPropety UserDef7_Excel = ExcelPropety.CreateProperty<Material2>(x => x.UserDef7);
|
||||
public ExcelPropety UserDef8_Excel = ExcelPropety.CreateProperty<Material2>(x => x.UserDef8);
|
||||
public ExcelPropety ZoneCode_Excel = ExcelPropety.CreateProperty<Material2>(x => x.ZoneCode);
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class Material2ImportVM : BaseImportVM<Material2TemplateVM, Material2>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
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 Material2ListVM : BasePagedListVM<Material2_View, Material2Searcher>
|
||||
{
|
||||
protected override List<GridAction> InitGridAction()
|
||||
{
|
||||
return new List<GridAction>
|
||||
{
|
||||
this.MakeStandardAction("Material2", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("Material2", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("Material2", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("Material2", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("Material2", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("Material2", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("Material2", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("Material2", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "xwms"),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
protected override IEnumerable<IGridColumn<Material2_View>> InitGridHeader()
|
||||
{
|
||||
return new List<GridColumn<Material2_View>>{
|
||||
this.MakeGridHeader(x => x.Code),
|
||||
this.MakeGridHeader(x => x.Type),
|
||||
this.MakeGridHeader(x => x.Name),
|
||||
this.MakeGridHeader(x => x.MasterUnit),
|
||||
this.MakeGridHeader(x => x.AssistUnit),
|
||||
this.MakeGridHeader(x => x.WarehouseId),
|
||||
this.MakeGridHeader(x => x.WarehouseCode),
|
||||
this.MakeGridHeader(x => x.CompanyId),
|
||||
this.MakeGridHeader(x => x.CompanyCode),
|
||||
this.MakeGridHeader(x => x.Barcode),
|
||||
this.MakeGridHeaderAction(width: 200)
|
||||
};
|
||||
}
|
||||
|
||||
public override IOrderedQueryable<Material2_View> GetSearchQuery()
|
||||
{
|
||||
var dc2 = Wtm.CreateDC(cskey: "hangyong");
|
||||
var query = dc2.Set<Material2>()
|
||||
.CheckContain(Searcher.Code, x => x.Code)
|
||||
.CheckContain(Searcher.Name, x => x.Name)
|
||||
.CheckContain(Searcher.Type, x => x.Type)
|
||||
.Select(x => new Material2_View
|
||||
{
|
||||
ID = x.ID,
|
||||
WarehouseId = x.WarehouseId,
|
||||
WarehouseCode = x.WarehouseCode,
|
||||
CompanyId = x.CompanyId,
|
||||
CompanyCode = x.CompanyCode,
|
||||
Code = x.Code,
|
||||
Type = x.Type,
|
||||
Name = x.Name,
|
||||
Barcode = x.Barcode,
|
||||
Barcode2 = x.Barcode2,
|
||||
Barcode3 = x.Barcode3,
|
||||
Barcode4 = x.Barcode4,
|
||||
ClassA = x.ClassA,
|
||||
ClassB = x.ClassB,
|
||||
ClassC = x.ClassC,
|
||||
Specification = x.Specification,
|
||||
Brand = x.Brand,
|
||||
Size = x.Size,
|
||||
Color = x.Color,
|
||||
PlaceOfOrigin = x.PlaceOfOrigin,
|
||||
DaysToExpire = x.DaysToExpire,
|
||||
ExpiringDays = x.ExpiringDays,
|
||||
MinShelfLifeDays = x.MinShelfLifeDays,
|
||||
CostPrice = x.CostPrice,
|
||||
ListPrice = x.ListPrice,
|
||||
NetPrice = x.NetPrice,
|
||||
MasterUnit = x.MasterUnit,
|
||||
AssistUnit = x.AssistUnit,
|
||||
ConvertRate = x.ConvertRate,
|
||||
ManufactureDate = x.ManufactureDate,
|
||||
ReceiptDate = x.ReceiptDate,
|
||||
Enable = x.Enable,
|
||||
Deleted = x.Deleted,
|
||||
UserDef1 = x.UserDef1,
|
||||
UserDef2 = x.UserDef2,
|
||||
UserDef3 = x.UserDef3,
|
||||
UserDef4 = x.UserDef4,
|
||||
UserDef5 = x.UserDef5,
|
||||
UserDef6 = x.UserDef6,
|
||||
UserDef7 = x.UserDef7,
|
||||
UserDef8 = x.UserDef8,
|
||||
ZoneCode = x.ZoneCode,
|
||||
})
|
||||
.OrderBy(x => x.ID);
|
||||
return query;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class Material2_View : Material2{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
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 Material2Searcher : BaseSearcher
|
||||
{
|
||||
public Int32? WarehouseId { get; set; }
|
||||
public String WarehouseCode { get; set; }
|
||||
public Int32? CompanyId { get; set; }
|
||||
public String CompanyCode { get; set; }
|
||||
public String Code { get; set; }
|
||||
public String Type { get; set; }
|
||||
public String Name { get; set; }
|
||||
public String Barcode { get; set; }
|
||||
public String Barcode2 { get; set; }
|
||||
public String Barcode3 { get; set; }
|
||||
public String Barcode4 { get; set; }
|
||||
public String ClassA { get; set; }
|
||||
public String ClassB { get; set; }
|
||||
public String ClassC { get; set; }
|
||||
public String Specification { get; set; }
|
||||
public String Brand { get; set; }
|
||||
public String Size { get; set; }
|
||||
public String Color { get; set; }
|
||||
public String PlaceOfOrigin { get; set; }
|
||||
public Int32? DaysToExpire { get; set; }
|
||||
public Int32? ExpiringDays { get; set; }
|
||||
public Int32? MinShelfLifeDays { get; set; }
|
||||
public Decimal? CostPrice { get; set; }
|
||||
public Decimal? ListPrice { get; set; }
|
||||
public Decimal? NetPrice { get; set; }
|
||||
public String MasterUnit { get; set; }
|
||||
public String AssistUnit { get; set; }
|
||||
public Single? ConvertRate { get; set; }
|
||||
public Boolean? ManufactureDate { get; set; }
|
||||
public Boolean? ReceiptDate { get; set; }
|
||||
public Boolean? Enable { get; set; }
|
||||
public Boolean? Deleted { get; set; }
|
||||
public String UserDef1 { get; set; }
|
||||
public String UserDef2 { get; set; }
|
||||
public String UserDef3 { get; set; }
|
||||
public String UserDef4 { get; set; }
|
||||
public String UserDef5 { get; set; }
|
||||
public String UserDef6 { get; set; }
|
||||
public String UserDef7 { get; set; }
|
||||
public String UserDef8 { get; set; }
|
||||
public String ZoneCode { 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
|
||||
{
|
||||
public partial class Material2VM : BaseCRUDVM<Material2>
|
||||
{
|
||||
|
||||
public Material2VM()
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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 ReceiptDetail2BatchVM : BaseBatchVM<ReceiptDetail2, ReceiptDetail2_BatchEdit>
|
||||
{
|
||||
public ReceiptDetail2BatchVM()
|
||||
{
|
||||
ListVM = new ReceiptDetail2ListVM();
|
||||
LinkedVM = new ReceiptDetail2_BatchEdit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class to define batch edit fields
|
||||
/// </summary>
|
||||
public class ReceiptDetail2_BatchEdit : BaseVM
|
||||
{
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
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 ReceiptDetail2TemplateVM : BaseTemplateVM
|
||||
{
|
||||
public ExcelPropety WarehouseId_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.WarehouseId);
|
||||
public ExcelPropety WarehouseCode_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.WarehouseCode);
|
||||
public ExcelPropety ZoneCode_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.ZoneCode);
|
||||
public ExcelPropety CompanyId_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.CompanyId);
|
||||
public ExcelPropety CompanyCode_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.CompanyCode);
|
||||
public ExcelPropety SourceCode_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.SourceCode);
|
||||
public ExcelPropety SupplierCode_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.SupplierCode);
|
||||
public ExcelPropety SupplierName_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.SupplierName);
|
||||
public ExcelPropety CPoCode_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.CPoCode);
|
||||
public ExcelPropety MoCode_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.MoCode);
|
||||
public ExcelPropety SourceLine_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.SourceLine);
|
||||
public ExcelPropety ReceiptId_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.ReceiptId);
|
||||
public ExcelPropety ReceiptCode_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.ReceiptCode);
|
||||
public ExcelPropety MaterialId_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.MaterialId);
|
||||
public ExcelPropety MaterialCode_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.MaterialCode);
|
||||
public ExcelPropety MaterialName_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.MaterialName);
|
||||
public ExcelPropety Batch_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.Batch);
|
||||
public ExcelPropety Lot_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.Lot);
|
||||
public ExcelPropety Sn_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.Sn);
|
||||
public ExcelPropety Project_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.Project);
|
||||
public ExcelPropety ManufactureDate_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.ManufactureDate);
|
||||
public ExcelPropety ExpirationDate_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.ExpirationDate);
|
||||
public ExcelPropety InventoryStatus_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.InventoryStatus);
|
||||
public ExcelPropety Qty_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.Qty);
|
||||
public ExcelPropety QtyCompleted_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.QtyCompleted);
|
||||
public ExcelPropety Unit_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.Unit);
|
||||
public ExcelPropety PurchasQty_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.PurchasQty);
|
||||
public ExcelPropety PurchasUnits_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.PurchasUnits);
|
||||
public ExcelPropety Coefficient_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.Coefficient);
|
||||
public ExcelPropety Price_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.Price);
|
||||
public ExcelPropety Status_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.Status);
|
||||
public ExcelPropety Deleted_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.Deleted);
|
||||
public ExcelPropety AutoId_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.AutoId);
|
||||
public ExcelPropety UserDef1_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.UserDef1);
|
||||
public ExcelPropety UserDef2_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.UserDef2);
|
||||
public ExcelPropety UserDef3_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.UserDef3);
|
||||
public ExcelPropety Station_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.Station);
|
||||
public ExcelPropety QtyDivided_Excel = ExcelPropety.CreateProperty<ReceiptDetail2>(x => x.QtyDivided);
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class ReceiptDetail2ImportVM : BaseImportVM<ReceiptDetail2TemplateVM, ReceiptDetail2>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
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 ReceiptDetail2ListVM : BasePagedListVM<ReceiptDetail2_View, ReceiptDetail2Searcher>
|
||||
{
|
||||
public List<ComboSelectListItem> InventoryStatus { get; set; }
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
var vm = Wtm.CreateVM<ReceiptDetail2VM>();
|
||||
InventoryStatus = vm.InventoryStatus;
|
||||
}
|
||||
protected override List<GridAction> InitGridAction()
|
||||
{
|
||||
return new List<GridAction>
|
||||
{
|
||||
this.MakeAction("ReceiptDetail2","Create",Localizer["Sys.Create"],Localizer["Sys.Create"],GridActionParameterTypesEnum.NoId,"xwms").SetOnClickScript("CreateDetail"),
|
||||
this.MakeStandardAction("ReceiptDetail2", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("ReceiptDetail2", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("ReceiptDetail2", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("ReceiptDetail2", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("ReceiptDetail2", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("ReceiptDetail2", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("ReceiptDetail2", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "xwms"),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
protected override IEnumerable<IGridColumn<ReceiptDetail2_View>> InitGridHeader()
|
||||
{
|
||||
InitVM();
|
||||
return new List<GridColumn<ReceiptDetail2_View>>{
|
||||
this.MakeGridHeader(x => x.ReceiptCode).SetWidth(150),
|
||||
this.MakeGridHeader(x => x.SourceLine),
|
||||
this.MakeGridHeader(x => x.MaterialCode).SetWidth(150),
|
||||
this.MakeGridHeader(x => x.MaterialName).SetWidth(150),
|
||||
this.MakeGridHeader(x => x.Lot),
|
||||
this.MakeGridHeader(x => x.Batch).SetWidth(150),
|
||||
this.MakeGridHeader(x => x.InventoryStatus),
|
||||
this.MakeGridHeader(x => x.Qty)
|
||||
.SetFormat((a,b) =>
|
||||
{
|
||||
return a.Qty.ToString().TrimEnd('0').TrimEnd('.');
|
||||
}),
|
||||
|
||||
this.MakeGridHeader(x => x.Unit),
|
||||
this.MakeGridHeader(x => x.QtyCompleted)
|
||||
.SetFormat((a,b) =>
|
||||
{
|
||||
return a.QtyCompleted.ToString().TrimEnd('0').TrimEnd('.');
|
||||
}),
|
||||
this.MakeGridHeader(x => x.Status),
|
||||
this.MakeGridHeaderAction(width: 200)
|
||||
};
|
||||
}
|
||||
|
||||
public override IOrderedQueryable<ReceiptDetail2_View> GetSearchQuery()
|
||||
{
|
||||
var query = DC.Set<ReceiptDetail2>()
|
||||
.Where(x => x.ReceiptId == Searcher.ReceiptId)
|
||||
.Select(x => new ReceiptDetail2_View
|
||||
{
|
||||
ID = x.ID,
|
||||
WarehouseId = x.WarehouseId,
|
||||
WarehouseCode = x.WarehouseCode,
|
||||
ZoneCode = x.ZoneCode,
|
||||
CompanyId = x.CompanyId,
|
||||
CompanyCode = x.CompanyCode,
|
||||
SourceCode = x.SourceCode,
|
||||
SupplierCode = x.SupplierCode,
|
||||
SupplierName = x.SupplierName,
|
||||
CPoCode = x.CPoCode,
|
||||
MoCode = x.MoCode,
|
||||
SourceLine = x.SourceLine,
|
||||
ReceiptId = x.ReceiptId,
|
||||
ReceiptCode = x.ReceiptCode,
|
||||
MaterialId = x.MaterialId,
|
||||
MaterialCode = x.MaterialCode,
|
||||
MaterialName = x.MaterialName,
|
||||
Batch = x.Batch,
|
||||
Lot = x.Lot,
|
||||
Sn = x.Sn,
|
||||
Project = x.Project,
|
||||
ManufactureDate = x.ManufactureDate,
|
||||
ExpirationDate = x.ExpirationDate,
|
||||
InventoryStatus = x.InventoryStatus,
|
||||
Qty = x.Qty,
|
||||
QtyCompleted = x.QtyCompleted,
|
||||
Unit = x.Unit,
|
||||
PurchasQty = x.PurchasQty,
|
||||
PurchasUnits = x.PurchasUnits,
|
||||
Coefficient = x.Coefficient,
|
||||
Price = x.Price,
|
||||
Status = x.Status,
|
||||
Deleted = x.Deleted,
|
||||
AutoId = x.AutoId,
|
||||
UserDef1 = x.UserDef1,
|
||||
UserDef2 = x.UserDef2,
|
||||
UserDef3 = x.UserDef3,
|
||||
Station = x.Station,
|
||||
QtyDivided = x.QtyDivided,
|
||||
})
|
||||
.OrderBy(x => x.ID);
|
||||
return query;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class ReceiptDetail2_View : ReceiptDetail2{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
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 ReceiptDetail2Searcher : BaseSearcher
|
||||
{
|
||||
public Int32? WarehouseId { get; set; }
|
||||
public String WarehouseCode { get; set; }
|
||||
public String ZoneCode { get; set; }
|
||||
public Int32? CompanyId { get; set; }
|
||||
public String CompanyCode { get; set; }
|
||||
public String SourceCode { get; set; }
|
||||
public String SupplierCode { get; set; }
|
||||
public String SupplierName { get; set; }
|
||||
public String CPoCode { get; set; }
|
||||
public String MoCode { get; set; }
|
||||
public String SourceLine { get; set; }
|
||||
public Int32? ReceiptId { get; set; }
|
||||
public String ReceiptCode { get; set; }
|
||||
public Int32? MaterialId { get; set; }
|
||||
public String MaterialCode { get; set; }
|
||||
public String MaterialName { get; set; }
|
||||
public String Batch { get; set; }
|
||||
public String Lot { get; set; }
|
||||
public String Sn { get; set; }
|
||||
public String Project { get; set; }
|
||||
public DateRange ManufactureDate { get; set; }
|
||||
public DateRange ExpirationDate { get; set; }
|
||||
public String InventoryStatus { get; set; }
|
||||
public Decimal? Qty { get; set; }
|
||||
public Decimal? QtyCompleted { get; set; }
|
||||
public String Unit { get; set; }
|
||||
public Decimal? PurchasQty { get; set; }
|
||||
public String PurchasUnits { get; set; }
|
||||
public Decimal? Coefficient { get; set; }
|
||||
public Decimal? Price { get; set; }
|
||||
public Int32? Status { get; set; }
|
||||
public Boolean? Deleted { get; set; }
|
||||
public Int32? AutoId { get; set; }
|
||||
public String UserDef1 { get; set; }
|
||||
public String UserDef2 { get; set; }
|
||||
public String UserDef3 { get; set; }
|
||||
public String Station { get; set; }
|
||||
public Decimal? QtyDivided { get; set; }
|
||||
protected override void InitVM()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class ReceiptDetail2VM : BaseCRUDVM<ReceiptDetail2>
|
||||
{
|
||||
public Material2ListVM MaterialList { get; set; }
|
||||
public List<ComboSelectListItem> InventoryStatus { get; set; }
|
||||
public ReceiptDetail2VM()
|
||||
{
|
||||
//MaterialList = new Material2ListVM();
|
||||
}
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
var CurrentCulture = Wtm.CurrentCulture;
|
||||
var dc = Wtm.CreateDC(cskey: "default");
|
||||
var dictDatas = dc.Set<SysDictData>().ToList();
|
||||
InventoryStatus = dictDatas.Where(x => x.DictType == "InventoryStatus")
|
||||
.ToList()
|
||||
.ToListItems(x => CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs, x => x.DictValue);
|
||||
}
|
||||
|
||||
public override void DoAdd()
|
||||
{
|
||||
base.DoAdd();
|
||||
}
|
||||
|
||||
public override void DoEdit(bool updateAllFields = false)
|
||||
{
|
||||
base.DoEdit(updateAllFields);
|
||||
}
|
||||
|
||||
public override void DoDelete()
|
||||
{
|
||||
base.DoDelete();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
@@ -13,11 +13,18 @@ namespace HHWMS.Web.xwms.ViewModels.ReceiptHeader2VMs
|
||||
{
|
||||
public partial class ReceiptHeader2ListVM : BasePagedListVM<ReceiptHeader2_View, ReceiptHeader2Searcher>
|
||||
{
|
||||
public ReceiptDetail2ListVM ReceiptDetails { get; set; } = new ReceiptDetail2ListVM();
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
ReceiptDetails.CopyContext(this);
|
||||
}
|
||||
|
||||
protected override List<GridAction> InitGridAction()
|
||||
{
|
||||
return new List<GridAction>
|
||||
{
|
||||
this.MakeStandardAction("ReceiptHeader2", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("ReceiptHeader2", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"xwms", dialogWidth: 800,600),
|
||||
this.MakeStandardAction("ReceiptHeader2", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("ReceiptHeader2", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "xwms", dialogWidth: 800),
|
||||
this.MakeStandardAction("ReceiptHeader2", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "xwms", dialogWidth: 800),
|
||||
@@ -31,32 +38,33 @@ namespace HHWMS.Web.xwms.ViewModels.ReceiptHeader2VMs
|
||||
|
||||
protected override IEnumerable<IGridColumn<ReceiptHeader2_View>> InitGridHeader()
|
||||
{
|
||||
InitVM();
|
||||
return new List<GridColumn<ReceiptHeader2_View>>{
|
||||
this.MakeGridHeader(x => x.Code),
|
||||
this.MakeGridHeader(x => x.CompanyId),
|
||||
this.MakeGridHeader(x => x.CompanyCode),
|
||||
this.MakeGridHeader(x => x.Code).SetFormat((a,b) =>
|
||||
{
|
||||
string rv = UIService.MakeScriptButton(ButtonTypesEnum.Link,a.Code,$"details('{a.ID}')");
|
||||
return rv;
|
||||
}).SetWidth(150),
|
||||
this.MakeGridHeader(x => x.Type),
|
||||
this.MakeGridHeader(x => x.SourceCode),
|
||||
this.MakeGridHeader(x => x.SourcePlatform),
|
||||
this.MakeGridHeader(x => x.SupplierId),
|
||||
this.MakeGridHeader(x => x.SupplierCode),
|
||||
this.MakeGridHeader(x => x.SupplierName),
|
||||
this.MakeGridHeader(x => x.TotalQty),
|
||||
this.MakeGridHeader(x => x.SourceCode).SetWidth(150),
|
||||
this.MakeGridHeader(x => x.SupplierCode).SetHide(),
|
||||
this.MakeGridHeader(x => x.SupplierName).SetWidth(200),
|
||||
this.MakeGridHeader(x => x.TotalQty)
|
||||
.SetFormat((a,b) =>
|
||||
{
|
||||
return a.TotalQty.ToString().TrimEnd('0').TrimEnd('.');
|
||||
}),
|
||||
this.MakeGridHeader(x => x.TotalLines),
|
||||
this.MakeGridHeader(x => x.FreeScan),
|
||||
this.MakeGridHeader(x => x.Remark),
|
||||
this.MakeGridHeader(x => x.Remark).SetHide(),
|
||||
this.MakeGridHeader(x => x.UploadStatus),
|
||||
this.MakeGridHeader(x => x.Uploadremark),
|
||||
this.MakeGridHeader(x => x.UploadTime),
|
||||
this.MakeGridHeader(x => x.AppointmentTime),
|
||||
this.MakeGridHeader(x => x.UploadTime).SetHide(),
|
||||
this.MakeGridHeader(x => x.AppointmentTime).SetHide(),
|
||||
this.MakeGridHeader(x => x.FirstStatus),
|
||||
this.MakeGridHeader(x => x.LastStatus),
|
||||
this.MakeGridHeader(x => x.Enable),
|
||||
this.MakeGridHeader(x => x.Deleted),
|
||||
this.MakeGridHeader(x => x.Scanid),
|
||||
this.MakeGridHeader(x => x.UserDef1),
|
||||
this.MakeGridHeader(x => x.UserDef2),
|
||||
this.MakeGridHeader(x => x.UserDef3),
|
||||
this.MakeGridHeader(x => x.UserDef1).SetHide(),
|
||||
this.MakeGridHeader(x => x.UserDef2).SetHide(),
|
||||
this.MakeGridHeader(x => x.UserDef3).SetHide(),
|
||||
this.MakeGridHeader(x => x.Station),
|
||||
this.MakeGridHeaderAction(width: 200)
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
@@ -12,13 +12,41 @@ namespace HHWMS.Web.xwms.ViewModels.ReceiptHeader2VMs
|
||||
{
|
||||
public partial class ReceiptHeader2VM : BaseCRUDVM<ReceiptHeader2>
|
||||
{
|
||||
|
||||
public List<ComboSelectListItem> ReceiptTypes { get; set; }
|
||||
public List<ComboSelectListItem> Trs { get; set; }
|
||||
public List<ComboSelectListItem> Addresses { get; set; }
|
||||
public List<ComboSelectListItem> SupplyNames { get; set; }
|
||||
public ReceiptHeader2VM()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
var CurrentCulture = Wtm.CurrentCulture;
|
||||
var dictDatas = DC.Set<SysDictData>().ToList();
|
||||
ReceiptTypes = dictDatas.Where(x => x.DictType == "ReceiptType2").Select(x => new ComboSelectListItem
|
||||
{
|
||||
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
|
||||
Value = x.DictValue
|
||||
}).ToList();
|
||||
Trs = dictDatas.Where(x => x.DictType == "Trs").Select(x => new ComboSelectListItem
|
||||
{
|
||||
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
|
||||
Value = x.DictValue
|
||||
}).ToList();
|
||||
Addresses = dictDatas.Where(x => x.DictType == "Addresses").Select(x => new ComboSelectListItem
|
||||
{
|
||||
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
|
||||
Value = x.DictValue
|
||||
}).ToList();
|
||||
|
||||
var dc2 = Wtm.CreateDC(cskey: "hangyong");
|
||||
SupplyNames = dc2.Set<Supplier>().Select(x => new ComboSelectListItem
|
||||
{
|
||||
Text = x.Name,
|
||||
Value = x.Code
|
||||
}).ToList();
|
||||
|
||||
}
|
||||
|
||||
public override void DoAdd()
|
||||
|
||||
Reference in new issue
Block a user