入库单新建
This commit is contained in:
1 parent
e2dead6c3f
commit
663769f80e
50 files changed
+2164
-94
No files matched your search
@@ -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{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user