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