Compare commits
5
Commits
iot
..
209e88a905
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
209e88a905 | ||
|
|
12e16e0c6c | ||
|
|
502342b15f | ||
|
|
4f2ba2a3ee | ||
|
|
ebdd40c518 |
No files matched your search
@@ -1,7 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using HHWMS.Web.Models;
|
using HHWMS.Web.Models;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
using WalkingTec.Mvvm.Core;
|
using WalkingTec.Mvvm.Core;
|
||||||
|
|
||||||
namespace HHWMS.Web
|
namespace HHWMS.Web
|
||||||
@@ -32,15 +34,46 @@ namespace HHWMS.Web
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public IActionResult RequestIn(WcsRequest request)
|
public IActionResult RequestIn(WcsRequest request)
|
||||||
{
|
{
|
||||||
var inv = new List<Inventory>();
|
//var inv = new List<Inventory>();
|
||||||
for (int i = 0; i < 10; i++)
|
//for (int i = 0; i < 10; i++)
|
||||||
inv.Add(new Inventory
|
// inv.Add(new Inventory
|
||||||
{
|
// {
|
||||||
ContainerCode = "test" + i
|
// ContainerCode = "test" + i
|
||||||
});
|
// });
|
||||||
//_unitwork.BatchAdd<Inventory>(inv);
|
//_unitwork.BatchAdd<Inventory>(inv);
|
||||||
_unitwork.DeleteById<Inventory>(1441);
|
//_unitwork.DeleteById<Inventory>(1441);
|
||||||
//_unitwork.BatchUpdate<Inventory>(x => x.ID > 1030, x=>new Inventory { Batch = "test"});
|
//_unitwork.BatchUpdate<Inventory>(x => x.ID > 1030, x=>new Inventory { Batch = "test"});
|
||||||
|
|
||||||
|
// 测试 删除数据 保存到历史表 主子表数据
|
||||||
|
/*var receipt = _unitwork.Find<ReceiptHeader>(x => x.ID == 3)
|
||||||
|
.FirstOrDefault();
|
||||||
|
|
||||||
|
var details = _unitwork.Find<ReceiptDetail>(x => x.HeaderId == 3)
|
||||||
|
.ToArray();
|
||||||
|
var his = _mapper.Map<ReceiptHeaderHistory>(receipt);
|
||||||
|
var his2 = _mapper.Map<ReceiptDetail[], IEnumerable<ReceiptDetailHistory>>(details);
|
||||||
|
_unitwork.Add(his);
|
||||||
|
_unitwork.BatchAdd(his2);*/
|
||||||
|
|
||||||
|
/*var receipt = _unitwork.Find<ShipmentHeader>(x => x.ID == 3)
|
||||||
|
.FirstOrDefault();
|
||||||
|
|
||||||
|
var details = _unitwork.Find<ShipmentDetail>(x => x.HeaderId == 3)
|
||||||
|
.ToArray();
|
||||||
|
var his = _mapper.Map<ShipmentHeaderHistory>(receipt);
|
||||||
|
var his2 = _mapper.Map<ShipmentDetail[], IEnumerable<ShipmentDetailHistory>>(details);
|
||||||
|
_unitwork.Add(his);
|
||||||
|
_unitwork.BatchAdd(his2);*/
|
||||||
|
|
||||||
|
var receipt = _unitwork.Find<TaskHeader>(x => 1==1)
|
||||||
|
.FirstOrDefault();
|
||||||
|
|
||||||
|
var details = _unitwork.Find<TaskDetail>(x => x.HeaderId == receipt.ID)
|
||||||
|
.ToArray();
|
||||||
|
var his = _mapper.Map<TaskHeaderHistory>(receipt);
|
||||||
|
var his2 = _mapper.Map<TaskDetail[], IEnumerable<TaskDetailHistory>>(details);
|
||||||
|
_unitwork.Add(his);
|
||||||
|
_unitwork.BatchAdd(his2);
|
||||||
return ApiResult();
|
return ApiResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,228 @@
|
|||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System;
|
||||||
|
using WalkingTec.Mvvm.Core;
|
||||||
|
using WalkingTec.Mvvm.Mvc;
|
||||||
|
using WalkingTec.Mvvm.Core.Extensions;
|
||||||
|
using HHWMS.Web;
|
||||||
|
|
||||||
|
namespace HHWMS.Web.Controllers
|
||||||
|
{
|
||||||
|
[Area("configs")]
|
||||||
|
[ActionDescription("打印模板配置")]
|
||||||
|
public partial class PrintConfigController : BaseController
|
||||||
|
{
|
||||||
|
private readonly IUnitWork _unitWork;
|
||||||
|
|
||||||
|
public PrintConfigController(IUnitWork unitWork)
|
||||||
|
{
|
||||||
|
_unitWork = unitWork;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Search
|
||||||
|
[ActionDescription("Sys.Search")]
|
||||||
|
public ActionResult Index()
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<PrintConfigListVM>();
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ActionDescription("Sys.Search")]
|
||||||
|
[HttpPost]
|
||||||
|
public string Search(PrintConfigSearcher searcher)
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<PrintConfigListVM>(passInit: true);
|
||||||
|
if (ModelState.IsValid)
|
||||||
|
{
|
||||||
|
vm.Searcher = searcher;
|
||||||
|
return vm.GetJson(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return vm.GetError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Create
|
||||||
|
[ActionDescription("Sys.Create")]
|
||||||
|
public ActionResult Create()
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<PrintConfigVM>();
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[ActionDescription("Sys.Create")]
|
||||||
|
public ActionResult Create(PrintConfigVM vm)
|
||||||
|
{
|
||||||
|
if (!ModelState.IsValid)
|
||||||
|
{
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vm.DoAdd();
|
||||||
|
if (!ModelState.IsValid)
|
||||||
|
{
|
||||||
|
vm.DoReInit();
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return FFResult().CloseDialog().RefreshGrid();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Edit
|
||||||
|
[ActionDescription("Sys.Edit")]
|
||||||
|
public ActionResult Edit(string id)
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<PrintConfigVM>(id);
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ActionDescription("Sys.Edit")]
|
||||||
|
[HttpPost]
|
||||||
|
[ValidateFormItemOnly]
|
||||||
|
public ActionResult Edit(PrintConfigVM vm)
|
||||||
|
{
|
||||||
|
if (!ModelState.IsValid)
|
||||||
|
{
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vm.DoEdit();
|
||||||
|
if (!ModelState.IsValid)
|
||||||
|
{
|
||||||
|
vm.DoReInit();
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return FFResult().CloseDialog().RefreshGridRow(vm.Entity.ID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Delete
|
||||||
|
[ActionDescription("Sys.Delete")]
|
||||||
|
public ActionResult Delete(string id)
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<PrintConfigVM>(id);
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ActionDescription("Sys.Delete")]
|
||||||
|
[HttpPost]
|
||||||
|
public ActionResult Delete(string id, IFormCollection nouse)
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<PrintConfigVM>(id);
|
||||||
|
vm.DoDelete();
|
||||||
|
if (!ModelState.IsValid)
|
||||||
|
{
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return FFResult().CloseDialog().RefreshGrid();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Details
|
||||||
|
[ActionDescription("Sys.Details")]
|
||||||
|
public ActionResult Details(string id)
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<PrintConfigVM>(id);
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region BatchEdit
|
||||||
|
[HttpPost]
|
||||||
|
[ActionDescription("Sys.BatchEdit")]
|
||||||
|
public ActionResult BatchEdit(string[] IDs)
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<PrintConfigBatchVM>(Ids: IDs);
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[ActionDescription("Sys.BatchEdit")]
|
||||||
|
public ActionResult DoBatchEdit(PrintConfigBatchVM vm, IFormCollection nouse)
|
||||||
|
{
|
||||||
|
if (!ModelState.IsValid || !vm.DoBatchEdit())
|
||||||
|
{
|
||||||
|
return PartialView("BatchEdit",vm);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchEditSuccess", vm.Ids.Length]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region BatchDelete
|
||||||
|
[HttpPost]
|
||||||
|
[ActionDescription("Sys.BatchDelete")]
|
||||||
|
public ActionResult BatchDelete(string[] IDs)
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<PrintConfigBatchVM>(Ids: IDs);
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[ActionDescription("Sys.BatchDelete")]
|
||||||
|
public ActionResult DoBatchDelete(PrintConfigBatchVM vm, IFormCollection nouse)
|
||||||
|
{
|
||||||
|
if (!ModelState.IsValid || !vm.DoBatchDelete())
|
||||||
|
{
|
||||||
|
return PartialView("BatchDelete",vm);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchDeleteSuccess", vm.Ids.Length]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Import
|
||||||
|
[ActionDescription("Sys.Import")]
|
||||||
|
public ActionResult Import()
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<PrintConfigImportVM>();
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[ActionDescription("Sys.Import")]
|
||||||
|
public ActionResult Import(PrintConfigImportVM vm, IFormCollection nouse)
|
||||||
|
{
|
||||||
|
if (vm.ErrorListVM.EntityList.Count > 0 || !vm.BatchSaveData())
|
||||||
|
{
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.ImportSuccess", vm.EntityList.Count.ToString()]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Export
|
||||||
|
[ActionDescription("Sys.Export")]
|
||||||
|
[HttpPost]
|
||||||
|
public IActionResult ExportExcel(PrintConfigListVM vm)
|
||||||
|
{
|
||||||
|
return vm.GetExportData();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 PrintConfigBatchVM : BaseBatchVM<PrintConfig, PrintConfig_BatchEdit>
|
||||||
|
{
|
||||||
|
public PrintConfigBatchVM()
|
||||||
|
{
|
||||||
|
ListVM = new PrintConfigListVM();
|
||||||
|
LinkedVM = new PrintConfig_BatchEdit();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Class to define batch edit fields
|
||||||
|
/// </summary>
|
||||||
|
public class PrintConfig_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
|
||||||
|
{
|
||||||
|
public partial class PrintConfigTemplateVM : BaseTemplateVM
|
||||||
|
{
|
||||||
|
[Display(Name = "PrintConfig.Name")]
|
||||||
|
public ExcelPropety Name_Excel = ExcelPropety.CreateProperty<PrintConfig>(x => x.Name);
|
||||||
|
[Display(Name = "PrintConfig.Template")]
|
||||||
|
public ExcelPropety Template_Excel = ExcelPropety.CreateProperty<PrintConfig>(x => x.Template);
|
||||||
|
[Display(Name = "PrintConfig.TestData")]
|
||||||
|
public ExcelPropety TestData_Excel = ExcelPropety.CreateProperty<PrintConfig>(x => x.TestData);
|
||||||
|
|
||||||
|
protected override void InitVM()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class PrintConfigImportVM : BaseImportVM<PrintConfigTemplateVM, PrintConfig>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
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 PrintConfigListVM : BasePagedListVM<PrintConfig_View, PrintConfigSearcher>
|
||||||
|
{
|
||||||
|
protected override List<GridAction> InitGridAction()
|
||||||
|
{
|
||||||
|
return new List<GridAction>
|
||||||
|
{
|
||||||
|
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"configs", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "configs", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "configs", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "configs", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "configs", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "configs", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "configs", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("PrintConfig", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "configs"),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected override IEnumerable<IGridColumn<PrintConfig_View>> InitGridHeader()
|
||||||
|
{
|
||||||
|
return new List<GridColumn<PrintConfig_View>>{
|
||||||
|
this.MakeGridHeader(x => x.Name),
|
||||||
|
this.MakeGridHeader(x => x.Template),
|
||||||
|
this.MakeGridHeader(x => x.TestData),
|
||||||
|
this.MakeGridHeaderAction(width: 200)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IOrderedQueryable<PrintConfig_View> GetSearchQuery()
|
||||||
|
{
|
||||||
|
var query = DC.Set<PrintConfig>()
|
||||||
|
.CheckContain(Searcher.Name, x=>x.Name)
|
||||||
|
.Select(x => new PrintConfig_View
|
||||||
|
{
|
||||||
|
ID = x.ID,
|
||||||
|
Name = x.Name,
|
||||||
|
Template = x.Template,
|
||||||
|
TestData = x.TestData,
|
||||||
|
})
|
||||||
|
.OrderBy(x => x.ID);
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class PrintConfig_View : PrintConfig{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
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 PrintConfigSearcher : BaseSearcher
|
||||||
|
{
|
||||||
|
[Display(Name = "PrintConfig.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
|
||||||
|
{
|
||||||
|
public partial class PrintConfigVM : BaseCRUDVM<PrintConfig>
|
||||||
|
{
|
||||||
|
|
||||||
|
public PrintConfigVM()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
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,12 @@
|
|||||||
|
@model HHWMS.Web.PrintConfigBatchVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:quote>@Localizer["Sys.BatchDeleteConfirm"]</wt:quote>
|
||||||
|
<wt:hidden field="Ids" />
|
||||||
|
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
@model HHWMS.Web.PrintConfigBatchVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<div style="margin-bottom:10px">@Localizer["Sys.BatchEditConfirm"] </div>
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
|
</wt:row>
|
||||||
|
<wt:hidden field="Ids" />
|
||||||
|
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton />
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
@model HHWMS.Web.PrintConfigVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
|
<wt:textbox field="Entity.Name" />
|
||||||
|
<wt:textbox field="Entity.Template" />
|
||||||
|
<wt:textbox field="Entity.TestData" />
|
||||||
|
</wt:row>
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton />
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
@model HHWMS.Web.PrintConfigVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:quote>@Localizer["Sys.DeleteConfirm"]</wt:quote>
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
|
<wt:display field="Entity.Name" />
|
||||||
|
<wt:display field="Entity.Template" />
|
||||||
|
<wt:display field="Entity.TestData" />
|
||||||
|
</wt:row>
|
||||||
|
<wt:hidden field="Entity.ID" />
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
@model HHWMS.Web.PrintConfigVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
|
<wt:display field="Entity.Name" />
|
||||||
|
<wt:display field="Entity.Template" />
|
||||||
|
<wt:display field="Entity.TestData" />
|
||||||
|
</wt:row>
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
@model HHWMS.Web.PrintConfigVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
|
<wt:textbox field="Entity.Name" />
|
||||||
|
<wt:textbox field="Entity.Template" />
|
||||||
|
<wt:textbox field="Entity.TestData" />
|
||||||
|
</wt:row>
|
||||||
|
<wt:hidden field="Entity.ID" />
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton />
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
@model HHWMS.Web.PrintConfigImportVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:downloadTemplateButton vm="@Model" />
|
||||||
|
</wt:row>
|
||||||
|
<wt:upload field="UploadFileId" label-text="@Model.Localizer["Sys.UploadTemplate"]" upload-type="ExcelFile" />
|
||||||
|
<wt:grid vm="ErrorListVM" use-local-data="true" hidden-checkbox="true" hidden-grid-index="true" hidden-panel="true" height="300"/>
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton />
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
@model HHWMS.Web.PrintConfigListVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:searchpanel vm="@Model" reset-btn="true">
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
||||||
|
<wt:textbox field="Searcher.Name" />
|
||||||
|
</wt:row>
|
||||||
|
</wt:searchpanel>
|
||||||
|
<wt:grid vm="@Model" url="/configs/PrintConfig/Search"/>
|
||||||
@@ -55,7 +55,6 @@ namespace HHWMS.Web
|
|||||||
var data = ZoneCodes.FirstOrDefault(x => x.Value.ToString() == a.ZoneCode);
|
var data = ZoneCodes.FirstOrDefault(x => x.Value.ToString() == a.ZoneCode);
|
||||||
return data?.Text ?? a.ZoneCode;
|
return data?.Text ?? a.ZoneCode;
|
||||||
}),
|
}),
|
||||||
this.MakeGridHeader(x => x.UniqueCode).SetWidth(230),
|
|
||||||
this.MakeGridHeader(x => x.ContainerCode).SetHide(),
|
this.MakeGridHeader(x => x.ContainerCode).SetHide(),
|
||||||
this.MakeGridHeader(x => x.LocationCode),
|
this.MakeGridHeader(x => x.LocationCode),
|
||||||
this.MakeGridHeader(x => x.MaterialCode),
|
this.MakeGridHeader(x => x.MaterialCode),
|
||||||
@@ -88,7 +87,6 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
return new List<GridColumn<Inventory_View>>{
|
return new List<GridColumn<Inventory_View>>{
|
||||||
//this.MakeGridHeader(x => x.ZoneCode),
|
//this.MakeGridHeader(x => x.ZoneCode),
|
||||||
this.MakeGridHeader(x => x.UniqueCode).SetWidth(230),
|
|
||||||
//this.MakeGridHeader(x => x.ContainerCode),
|
//this.MakeGridHeader(x => x.ContainerCode),
|
||||||
//this.MakeGridHeader(x => x.LocationCode),
|
//this.MakeGridHeader(x => x.LocationCode),
|
||||||
this.MakeGridHeader(x => x.MaterialCode),
|
this.MakeGridHeader(x => x.MaterialCode),
|
||||||
@@ -111,7 +109,6 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
var query = DC.Set<Inventory>()
|
var query = DC.Set<Inventory>()
|
||||||
.CheckContain(Searcher.ZoneCode, x => x.ZoneCode)
|
.CheckContain(Searcher.ZoneCode, x => x.ZoneCode)
|
||||||
.CheckContain(Searcher.UniqueCode, x => x.UniqueCode)
|
|
||||||
.CheckContain(Searcher.LocationCode, x => x.LocationCode)
|
.CheckContain(Searcher.LocationCode, x => x.LocationCode)
|
||||||
.CheckContain(Searcher.MaterialCode, x => x.MaterialCode)
|
.CheckContain(Searcher.MaterialCode, x => x.MaterialCode)
|
||||||
.CheckContain(Searcher.MaterialType, x => x.MaterialType)
|
.CheckContain(Searcher.MaterialType, x => x.MaterialType)
|
||||||
@@ -127,7 +124,6 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
ID = x.ID,
|
ID = x.ID,
|
||||||
ZoneCode = x.ZoneCode,
|
ZoneCode = x.ZoneCode,
|
||||||
UniqueCode = x.UniqueCode,
|
|
||||||
ContainerCode = x.ContainerCode,
|
ContainerCode = x.ContainerCode,
|
||||||
LocationCode = x.LocationCode,
|
LocationCode = x.LocationCode,
|
||||||
MaterialCode = x.MaterialCode,
|
MaterialCode = x.MaterialCode,
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ namespace HHWMS.Web.Controllers
|
|||||||
public ActionResult Create2(int id)
|
public ActionResult Create2(int id)
|
||||||
{
|
{
|
||||||
var vm = Wtm.CreateVM<ReceiptDetailVM>(passInit: true);
|
var vm = Wtm.CreateVM<ReceiptDetailVM>(passInit: true);
|
||||||
vm.Entity.ReceiptHeaderId = id;
|
vm.Entity.HeaderId = id;
|
||||||
vm.Entity.ReceiptHeader = new ReceiptHeader();
|
vm.Entity.ReceiptHeader = new ReceiptHeader();
|
||||||
//vm.Entity.ReceiptHeader.Code = vm.DC.Set<ReceiptHeader>().Find(id).Code;
|
//vm.Entity.ReceiptHeader.Code = vm.DC.Set<ReceiptHeader>().Find(id).Code;
|
||||||
return PartialView(vm);
|
return PartialView(vm);
|
||||||
@@ -118,114 +118,6 @@ namespace HHWMS.Web.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ActionDescription("Sys.Create")]
|
|
||||||
public ActionResult CreateDetails(int id)
|
|
||||||
{
|
|
||||||
var vm = Wtm.CreateVM<ReceiptDetailVM>(passInit: true);
|
|
||||||
vm.Entity.ReceiptHeaderId = id;
|
|
||||||
vm.Entity.ReceiptHeader = new ReceiptHeader();
|
|
||||||
//vm.Entity.ReceiptHeader.Code = vm.DC.Set<ReceiptHeader>().Find(id).Code;
|
|
||||||
return PartialView(vm);
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost]
|
|
||||||
[ActionDescription("Sys.Create")]
|
|
||||||
public ActionResult CreateDetails(ReceiptDetailVM vm)
|
|
||||||
{
|
|
||||||
var header = _unitwork.FindSingle<ReceiptHeader>(x => x.ID == vm.Entity.ReceiptHeaderId);
|
|
||||||
if(header.FirstStatus != ReceiptStatusEnum.新建)
|
|
||||||
{
|
|
||||||
return FFResult().Alert("主单据不是新建状态,不能新建明细!");
|
|
||||||
}
|
|
||||||
var plList = vm.Entity.MaterialCode.Split("\n");
|
|
||||||
var slList = vm.Entity.Lot.Split("\n");
|
|
||||||
var detailList = new List<ReceiptDetail>();
|
|
||||||
foreach(var item in plList)
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(item))
|
|
||||||
{
|
|
||||||
detailList.Add(new ReceiptDetail
|
|
||||||
{
|
|
||||||
UniqueCode = item,
|
|
||||||
Status = 0,
|
|
||||||
ZoneCode = ZoneCodeEnum.盘料库,
|
|
||||||
ReceiptHeaderId = vm.Entity.ReceiptHeaderId
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var item in slList)
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(item))
|
|
||||||
{
|
|
||||||
detailList.Add(new ReceiptDetail
|
|
||||||
{
|
|
||||||
UniqueCode = item,
|
|
||||||
ZoneCode = ZoneCodeEnum.散料库,
|
|
||||||
Status = 0,
|
|
||||||
ReceiptHeaderId = vm.Entity.ReceiptHeaderId
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var uniqueGroup = detailList.GroupBy(x => x.UniqueCode);
|
|
||||||
|
|
||||||
if (uniqueGroup.Any(x => x.Count() > 1))
|
|
||||||
{
|
|
||||||
var codeList = uniqueGroup.Where(x => x.Count() > 1)
|
|
||||||
.Select(x => x.Key)
|
|
||||||
.ToList();
|
|
||||||
return FFResult().Alert($"新增明细中,存在重复的唯一码!{String.Join(", ", codeList.ToArray())}");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 判断唯一码是否已在库内
|
|
||||||
var reDetailList = _unitwork.Find<ReceiptDetail>(x => x.Status == ReceiptStatusEnum.新建)
|
|
||||||
.Select(x => new { x.UniqueCode, x.ReceiptHeader.Code })
|
|
||||||
.ToList();
|
|
||||||
var reDel = reDetailList.Select(x => x.UniqueCode)
|
|
||||||
.Intersect(detailList.Select(x => x.UniqueCode));
|
|
||||||
if (reDel.Count() > 0)
|
|
||||||
{
|
|
||||||
var tt= reDetailList.Where(x => reDel.Contains(x.UniqueCode))
|
|
||||||
.ToList();
|
|
||||||
var returnStr = "";
|
|
||||||
foreach (var item in tt)
|
|
||||||
{
|
|
||||||
returnStr += $"单号:{item.Code};唯一码:{item.UniqueCode};";
|
|
||||||
}
|
|
||||||
return FFResult().Alert($"新增明细中,存在已添加的唯一码!{returnStr}");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 判断唯一码是否已在库内
|
|
||||||
var invList = _unitwork.Find<Inventory>(x => 1 == 1)
|
|
||||||
.Select(x => x.UniqueCode)
|
|
||||||
.ToList();
|
|
||||||
if(invList.Intersect(detailList.Select(x => x.UniqueCode)).Count() > 0)
|
|
||||||
{
|
|
||||||
return FFResult().Alert("新增明细中,存在已在库内的唯一码!");
|
|
||||||
}
|
|
||||||
// 补充物料明细
|
|
||||||
foreach (var item in detailList)
|
|
||||||
{
|
|
||||||
var materialqr = _unitwork.FindSingle<MaterialQr>(x => x.UniqueCode.Equals(item.UniqueCode));
|
|
||||||
if(materialqr == null)
|
|
||||||
{
|
|
||||||
return FFResult().Alert("新增明细中,存在不是WMS生成的唯一码!");
|
|
||||||
}
|
|
||||||
var material = _unitwork.FindSingle<Material>(x => x.QRCode.Equals(materialqr.QRCode));
|
|
||||||
item.MaterialCode = material.MaterialCode;
|
|
||||||
item.MaterialName = material.MaterialName;
|
|
||||||
item.MaterialSpec = material.MaterialSpec;
|
|
||||||
item.MaterialType = material.MaterialType;
|
|
||||||
item.MaterialUnit = material.MaterialUnit;
|
|
||||||
item.Batch = material.Batch;
|
|
||||||
item.Qty = material.Qty;
|
|
||||||
item.SupplierCode = material.SupplierCode;
|
|
||||||
item.CreateBy = Wtm.LoginUserInfo.ITCode;
|
|
||||||
item.CreateTime = DateTime.Now;
|
|
||||||
}
|
|
||||||
_unitwork.BatchAdd(detailList.ToArray());
|
|
||||||
return FFResult().CloseDialog().RefreshGrid(index: 1);
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Edit
|
#region Edit
|
||||||
|
|||||||
@@ -234,47 +234,5 @@ namespace HHWMS.Web.Controllers
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 点数
|
|
||||||
[ActionDescription("ReceiptHeader.Count")]
|
|
||||||
public ActionResult Count(string id)
|
|
||||||
{
|
|
||||||
var vm = Wtm.CreateVM<ReceiptHeaderVM>(id);
|
|
||||||
return PartialView(vm);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查所有新建的明细,已开始收货明细不允许点数
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="id"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public ActionResult SelectReceiptDetailsByCode(int id)
|
|
||||||
{
|
|
||||||
var data = _unitwork.Find<ReceiptHeader>(x => x.ID == id)
|
|
||||||
.Include(x => x.ReceiptDetails).ToList();
|
|
||||||
return JsonMore(data.FirstOrDefault().ReceiptDetails.Where(x => x.Status == ReceiptStatusEnum.新建));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 修改明细的数量
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="code"></param>
|
|
||||||
/// <param name="uniqueCode"></param>
|
|
||||||
/// <param name="qty"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public ActionResult CountCommit(string code, string uniqueCode, int qty)
|
|
||||||
{
|
|
||||||
var receiptDetail = _unitwork.FindSingle<ReceiptDetail>(x => x.UniqueCode.Equals(uniqueCode));
|
|
||||||
if (receiptDetail != null)
|
|
||||||
{
|
|
||||||
receiptDetail.Qty = qty;
|
|
||||||
receiptDetail.UpdateTime = DateTime.Now;
|
|
||||||
receiptDetail.UpdateBy = Wtm.LoginUserInfo.ITCode;
|
|
||||||
_unitwork.Update(receiptDetail);
|
|
||||||
return JsonMore(null);
|
|
||||||
}
|
|
||||||
return JsonMore(null, 500, $"未找到唯一码{uniqueCode}的单据!");
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -12,7 +12,7 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
public partial class ReceiptDetailHistoryTemplateVM : BaseTemplateVM
|
public partial class ReceiptDetailHistoryTemplateVM : BaseTemplateVM
|
||||||
{
|
{
|
||||||
public ExcelPropety ReceiptHeaderHistory_Excel = ExcelPropety.CreateProperty<ReceiptDetailHistory>(x => x.ReceiptHeaderHistoryId);
|
public ExcelPropety ReceiptHeaderHistory_Excel = ExcelPropety.CreateProperty<ReceiptDetailHistory>(x => x.HeaderId);
|
||||||
[Display(Name = "Task.ZoneCode")]
|
[Display(Name = "Task.ZoneCode")]
|
||||||
public ExcelPropety ZoneCode_Excel = ExcelPropety.CreateProperty<ReceiptDetailHistory>(x => x.ZoneCode);
|
public ExcelPropety ZoneCode_Excel = ExcelPropety.CreateProperty<ReceiptDetailHistory>(x => x.ZoneCode);
|
||||||
[Display(Name = "Inventory.MaterialCode")]
|
[Display(Name = "Inventory.MaterialCode")]
|
||||||
|
|||||||
+2
-2
@@ -56,7 +56,7 @@ namespace HHWMS.Web
|
|||||||
public override IOrderedQueryable<ReceiptDetailHistory_View> GetSearchQuery()
|
public override IOrderedQueryable<ReceiptDetailHistory_View> GetSearchQuery()
|
||||||
{
|
{
|
||||||
var query = DC.Set<ReceiptDetailHistory>()
|
var query = DC.Set<ReceiptDetailHistory>()
|
||||||
.CheckEqual(Searcher.ReceiptHeaderHistoryId, x=>x.ReceiptHeaderHistoryId)
|
.CheckEqual(Searcher.HeaderId, x=>x.HeaderId)
|
||||||
.CheckContain(Searcher.ZoneCode, x=>x.ZoneCode)
|
.CheckContain(Searcher.ZoneCode, x=>x.ZoneCode)
|
||||||
.CheckContain(Searcher.MaterialCode, x=>x.MaterialCode)
|
.CheckContain(Searcher.MaterialCode, x=>x.MaterialCode)
|
||||||
.CheckContain(Searcher.MaterialType, x=>x.MaterialType)
|
.CheckContain(Searcher.MaterialType, x=>x.MaterialType)
|
||||||
@@ -71,7 +71,7 @@ namespace HHWMS.Web
|
|||||||
.Select(x => new ReceiptDetailHistory_View
|
.Select(x => new ReceiptDetailHistory_View
|
||||||
{
|
{
|
||||||
ID = x.ID,
|
ID = x.ID,
|
||||||
Code_view = x.ReceiptHeaderHistory.Code,
|
HeaderId = x.HeaderId,
|
||||||
ZoneCode = x.ZoneCode,
|
ZoneCode = x.ZoneCode,
|
||||||
MaterialCode = x.MaterialCode,
|
MaterialCode = x.MaterialCode,
|
||||||
MaterialType = x.MaterialType,
|
MaterialType = x.MaterialType,
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
public List<ComboSelectListItem> AllReceiptHeaderHistorys { get; set; }
|
public List<ComboSelectListItem> AllReceiptHeaderHistorys { get; set; }
|
||||||
[Display(Name = "Inventory.ReceiptCode")]
|
[Display(Name = "Inventory.ReceiptCode")]
|
||||||
public int? ReceiptHeaderHistoryId { get; set; }
|
public int? HeaderId { get; set; }
|
||||||
[Display(Name = "Task.ZoneCode")]
|
[Display(Name = "Task.ZoneCode")]
|
||||||
public String ZoneCode { get; set; }
|
public String ZoneCode { get; set; }
|
||||||
[Display(Name = "Inventory.MaterialCode")]
|
[Display(Name = "Inventory.MaterialCode")]
|
||||||
|
|||||||
+1
-2
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -16,7 +16,6 @@ namespace HHWMS.Web
|
|||||||
|
|
||||||
public ReceiptDetailHistoryVM()
|
public ReceiptDetailHistoryVM()
|
||||||
{
|
{
|
||||||
SetInclude(x => x.ReceiptHeaderHistory);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void InitVM()
|
protected override void InitVM()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
public partial class ReceiptDetailTemplateVM : BaseTemplateVM
|
public partial class ReceiptDetailTemplateVM : BaseTemplateVM
|
||||||
{
|
{
|
||||||
public ExcelPropety ReceiptHeader_Excel = ExcelPropety.CreateProperty<ReceiptDetail>(x => x.ReceiptHeaderId);
|
public ExcelPropety ReceiptHeader_Excel = ExcelPropety.CreateProperty<ReceiptDetail>(x => x.HeaderId);
|
||||||
|
|
||||||
[Display(Name = "Task.ZoneCode")]
|
[Display(Name = "Task.ZoneCode")]
|
||||||
public ExcelPropety ZoneCode_Excel = ExcelPropety.CreateProperty<ReceiptDetail>(x => x.ZoneCode);
|
public ExcelPropety ZoneCode_Excel = ExcelPropety.CreateProperty<ReceiptDetail>(x => x.ZoneCode);
|
||||||
|
|||||||
@@ -52,9 +52,8 @@ namespace HHWMS.Web
|
|||||||
public override IOrderedQueryable<ReceiptDetail_View> GetSearchQuery()
|
public override IOrderedQueryable<ReceiptDetail_View> GetSearchQuery()
|
||||||
{
|
{
|
||||||
var query = DC.Set<ReceiptDetail>()
|
var query = DC.Set<ReceiptDetail>()
|
||||||
.CheckEqual(Searcher.ReceiptHeaderId, x => x.ReceiptHeaderId)
|
.CheckEqual(Searcher.HeaderId, x => x.HeaderId)
|
||||||
.CheckContain(Searcher.ZoneCode, x => x.ZoneCode)
|
.CheckContain(Searcher.ZoneCode, x => x.ZoneCode)
|
||||||
.CheckContain(Searcher.UniqueCode, x => x.UniqueCode)
|
|
||||||
.CheckContain(Searcher.MaterialCode, x => x.MaterialCode)
|
.CheckContain(Searcher.MaterialCode, x => x.MaterialCode)
|
||||||
.CheckContain(Searcher.MaterialType, x => x.MaterialType)
|
.CheckContain(Searcher.MaterialType, x => x.MaterialType)
|
||||||
.CheckContain(Searcher.MaterialName, x => x.MaterialName)
|
.CheckContain(Searcher.MaterialName, x => x.MaterialName)
|
||||||
@@ -69,7 +68,6 @@ namespace HHWMS.Web
|
|||||||
ID = x.ID,
|
ID = x.ID,
|
||||||
Code_view = x.ReceiptHeader.Code,
|
Code_view = x.ReceiptHeader.Code,
|
||||||
ZoneCode = x.ZoneCode,
|
ZoneCode = x.ZoneCode,
|
||||||
UniqueCode = x.UniqueCode,
|
|
||||||
MaterialCode = x.MaterialCode,
|
MaterialCode = x.MaterialCode,
|
||||||
MaterialType = x.MaterialType,
|
MaterialType = x.MaterialType,
|
||||||
MaterialName = x.MaterialName,
|
MaterialName = x.MaterialName,
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ namespace HHWMS.Web
|
|||||||
var result = new List<GridColumn<ReceiptDetail_View>>{
|
var result = new List<GridColumn<ReceiptDetail_View>>{
|
||||||
//this.MakeGridHeader(x => x.Code_view),
|
//this.MakeGridHeader(x => x.Code_view),
|
||||||
//this.MakeGridHeader(x => x.ZoneCode),
|
//this.MakeGridHeader(x => x.ZoneCode),
|
||||||
this.MakeGridHeader(x => x.UniqueCode).SetWidth(230),
|
|
||||||
this.MakeGridHeader(x => x.MaterialCode),
|
this.MakeGridHeader(x => x.MaterialCode),
|
||||||
//this.MakeGridHeader(x => x.MaterialType),
|
//this.MakeGridHeader(x => x.MaterialType),
|
||||||
this.MakeGridHeader(x => x.MaterialName),
|
this.MakeGridHeader(x => x.MaterialName),
|
||||||
@@ -60,13 +59,12 @@ namespace HHWMS.Web
|
|||||||
public override IOrderedQueryable<ReceiptDetail_View> GetSearchQuery()
|
public override IOrderedQueryable<ReceiptDetail_View> GetSearchQuery()
|
||||||
{
|
{
|
||||||
var query = DC.Set<ReceiptDetail>()
|
var query = DC.Set<ReceiptDetail>()
|
||||||
.Where(x => x.ReceiptHeaderId == Searcher.ReceiptHeaderId)
|
.Where(x => x.HeaderId == Searcher.HeaderId)
|
||||||
.Select(x => new ReceiptDetail_View
|
.Select(x => new ReceiptDetail_View
|
||||||
{
|
{
|
||||||
ID = x.ID,
|
ID = x.ID,
|
||||||
Code_view = x.ReceiptHeader.Code,
|
Code_view = x.ReceiptHeader.Code,
|
||||||
ZoneCode = x.ZoneCode,
|
ZoneCode = x.ZoneCode,
|
||||||
UniqueCode = x.UniqueCode,
|
|
||||||
MaterialCode = x.MaterialCode,
|
MaterialCode = x.MaterialCode,
|
||||||
MaterialType = x.MaterialType,
|
MaterialType = x.MaterialType,
|
||||||
MaterialName = x.MaterialName,
|
MaterialName = x.MaterialName,
|
||||||
|
|||||||
@@ -11,14 +11,11 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
public List<ComboSelectListItem> AllReceiptHeaders { get; set; }
|
public List<ComboSelectListItem> AllReceiptHeaders { get; set; }
|
||||||
[Display(Name = "Inventory.ReceiptCode")]
|
[Display(Name = "Inventory.ReceiptCode")]
|
||||||
public int? ReceiptHeaderId { get; set; }
|
public int? HeaderId { get; set; }
|
||||||
|
|
||||||
[Display(Name = "Task.ZoneCode")]
|
[Display(Name = "Task.ZoneCode")]
|
||||||
public String ZoneCode { get; set; }
|
public String ZoneCode { get; set; }
|
||||||
|
|
||||||
[Display(Name = "Inventory.UniqueCode")]
|
|
||||||
public String UniqueCode { get; set; }
|
|
||||||
|
|
||||||
[Display(Name = "Inventory.MaterialCode")]
|
[Display(Name = "Inventory.MaterialCode")]
|
||||||
public String MaterialCode { get; set; }
|
public String MaterialCode { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace HHWMS.Web
|
|||||||
protected override void InitVM()
|
protected override void InitVM()
|
||||||
{
|
{
|
||||||
Details.CopyContext(this);
|
Details.CopyContext(this);
|
||||||
Details.Searcher.ReceiptHeaderId = Entity.ID;
|
Details.Searcher.HeaderId = Entity.ID;
|
||||||
|
|
||||||
var CurrentCulture = Wtm.CurrentCulture;
|
var CurrentCulture = Wtm.CurrentCulture;
|
||||||
var dictDatas = DC.Set<SysDictData>().ToList();
|
var dictDatas = DC.Set<SysDictData>().ToList();
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@model HHWMS.Web.ReceiptDetailVM
|
@model HHWMS.Web.ReceiptDetailVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:combobox field="Entity.ReceiptHeaderId" items="AllReceiptHeaders"/>
|
<wt:combobox field="Entity.HeaderId" items="AllReceiptHeaders" />
|
||||||
<wt:textbox field="Entity.ZoneCode" />
|
<wt:textbox field="Entity.ZoneCode" />
|
||||||
<wt:textbox field="Entity.MaterialCode" />
|
<wt:textbox field="Entity.MaterialCode" />
|
||||||
<wt:textbox field="Entity.MaterialType" />
|
<wt:textbox field="Entity.MaterialType" />
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<wt:textbox field="Entity.InventoryStatus" />
|
<wt:textbox field="Entity.InventoryStatus" />
|
||||||
<wt:combobox field="Entity.Status" />
|
<wt:combobox field="Entity.Status" />
|
||||||
</wt:row>
|
</wt:row>
|
||||||
<wt:hidden field="Entity.ReceiptHeaderId" />
|
<wt:hidden field="Entity.HeaderId" />
|
||||||
<wt:row align="AlignEnum.Right">
|
<wt:row align="AlignEnum.Right">
|
||||||
<wt:submitbutton />
|
<wt:submitbutton />
|
||||||
<wt:closebutton />
|
<wt:closebutton />
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<wt:textarea field="Entity.MaterialCode" label-text="盘料"/>
|
<wt:textarea field="Entity.MaterialCode" label-text="盘料"/>
|
||||||
<wt:textarea field="Entity.Lot" label-text="散料" />
|
<wt:textarea field="Entity.Lot" label-text="散料" />
|
||||||
</wt:row>
|
</wt:row>
|
||||||
<wt:hidden field="Entity.ReceiptHeaderId" />
|
<wt:hidden field="Entity.HeaderId" />
|
||||||
<wt:row align="AlignEnum.Right">
|
<wt:row align="AlignEnum.Right">
|
||||||
<wt:submitbutton />
|
<wt:submitbutton />
|
||||||
<wt:closebutton />
|
<wt:closebutton />
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@model HHWMS.Web.ReceiptDetailVM
|
@model HHWMS.Web.ReceiptDetailVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:combobox field="Entity.ReceiptHeaderId" items="AllReceiptHeaders"/>
|
<wt:combobox field="Entity.HeaderId" items="AllReceiptHeaders" />
|
||||||
<wt:textbox field="Entity.ZoneCode" />
|
<wt:textbox field="Entity.ZoneCode" />
|
||||||
<wt:textbox field="Entity.MaterialCode" />
|
<wt:textbox field="Entity.MaterialCode" />
|
||||||
<wt:textbox field="Entity.MaterialType" />
|
<wt:textbox field="Entity.MaterialType" />
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@model HHWMS.Web.ReceiptDetailListVM
|
@model HHWMS.Web.ReceiptDetailListVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:searchpanel vm="@Model" reset-btn="true">
|
<wt:searchpanel vm="@Model" reset-btn="true">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
||||||
<wt:combobox field="Searcher.ReceiptHeaderId" items="Searcher.AllReceiptHeaders" empty-text="@Localizer["Sys.All"]" />
|
<wt:combobox field="Searcher.HeaderId" items="Searcher.AllReceiptHeaders" empty-text="@Localizer["Sys.All"]" />
|
||||||
<wt:textbox field="Searcher.ZoneCode" />
|
<wt:textbox field="Searcher.ZoneCode" />
|
||||||
<wt:textbox field="Searcher.MaterialCode" />
|
<wt:textbox field="Searcher.MaterialCode" />
|
||||||
<wt:textbox field="Searcher.MaterialType" />
|
<wt:textbox field="Searcher.MaterialType" />
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@model HHWMS.Web.ReceiptDetailHistoryVM
|
@model HHWMS.Web.ReceiptDetailHistoryVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:combobox field="Entity.ReceiptHeaderHistoryId" items="AllReceiptHeaderHistorys"/>
|
<wt:combobox field="Entity.HeaderId" items="AllReceiptHeaderHistorys"/>
|
||||||
<wt:textbox field="Entity.ZoneCode" />
|
<wt:textbox field="Entity.ZoneCode" />
|
||||||
<wt:textbox field="Entity.MaterialCode" />
|
<wt:textbox field="Entity.MaterialCode" />
|
||||||
<wt:textbox field="Entity.MaterialType" />
|
<wt:textbox field="Entity.MaterialType" />
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
@model HHWMS.Web.ReceiptDetailHistoryVM
|
@model HHWMS.Web.ReceiptDetailHistoryVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:quote>@Localizer["Sys.DeleteConfirm"]</wt:quote>
|
<wt:quote>@Localizer["Sys.DeleteConfirm"]</wt:quote>
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:display field="Entity.ReceiptHeaderHistory.Code" />
|
<wt:display field="Entity.ID" />
|
||||||
<wt:display field="Entity.ZoneCode" />
|
<wt:display field="Entity.ZoneCode" />
|
||||||
<wt:display field="Entity.MaterialCode" />
|
<wt:display field="Entity.MaterialCode" />
|
||||||
<wt:display field="Entity.MaterialType" />
|
<wt:display field="Entity.MaterialType" />
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@model HHWMS.Web.ReceiptDetailHistoryVM
|
@model HHWMS.Web.ReceiptDetailHistoryVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:display field="Entity.ReceiptHeaderHistory.Code" />
|
<wt:display field="Entity.HeaderId" />
|
||||||
<wt:display field="Entity.ZoneCode" />
|
<wt:display field="Entity.ZoneCode" />
|
||||||
<wt:display field="Entity.MaterialCode" />
|
<wt:display field="Entity.MaterialCode" />
|
||||||
<wt:display field="Entity.MaterialType" />
|
<wt:display field="Entity.MaterialType" />
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@model HHWMS.Web.ReceiptDetailHistoryVM
|
@model HHWMS.Web.ReceiptDetailHistoryVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:combobox field="Entity.ReceiptHeaderHistoryId" items="AllReceiptHeaderHistorys"/>
|
<wt:combobox field="Entity.HeaderId" items="AllReceiptHeaderHistorys" />
|
||||||
<wt:textbox field="Entity.ZoneCode" />
|
<wt:textbox field="Entity.ZoneCode" />
|
||||||
<wt:textbox field="Entity.MaterialCode" />
|
<wt:textbox field="Entity.MaterialCode" />
|
||||||
<wt:textbox field="Entity.MaterialType" />
|
<wt:textbox field="Entity.MaterialType" />
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@model HHWMS.Web.ReceiptDetailHistoryListVM
|
@model HHWMS.Web.ReceiptDetailHistoryListVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:searchpanel vm="@Model" reset-btn="true">
|
<wt:searchpanel vm="@Model" reset-btn="true">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
||||||
<wt:combobox field="Searcher.ReceiptHeaderHistoryId" items="Searcher.AllReceiptHeaderHistorys" empty-text="@Localizer["Sys.All"]" />
|
<wt:combobox field="Searcher.HeaderId" items="Searcher.AllReceiptHeaderHistorys" empty-text="@Localizer["Sys.All"]" />
|
||||||
<wt:textbox field="Searcher.ZoneCode" />
|
<wt:textbox field="Searcher.ZoneCode" />
|
||||||
<wt:textbox field="Searcher.MaterialCode" />
|
<wt:textbox field="Searcher.MaterialCode" />
|
||||||
<wt:textbox field="Searcher.MaterialType" />
|
<wt:textbox field="Searcher.MaterialType" />
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
var headerId = 0;
|
var headerId = 0;
|
||||||
function details(id) {
|
function details(id) {
|
||||||
headerId = id;
|
headerId = id;
|
||||||
layui.table.reload('ReceiptDetail', { where: { "Searcher.ReceiptHeaderId": id } });
|
layui.table.reload('ReceiptDetail', { where: { "Searcher.HeaderId": id } });
|
||||||
}
|
}
|
||||||
|
|
||||||
function CreateDetail() {
|
function CreateDetail() {
|
||||||
|
|||||||
@@ -66,32 +66,6 @@ namespace HHWMS.Web.Controllers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(vm.Entity.UniqueCode))
|
|
||||||
{
|
|
||||||
return FFResult().Alert($"唯一码不能为空!");
|
|
||||||
}
|
|
||||||
var header = _unitwork.FindSingle<ShipmentHeader>(x => x.ID == vm.Entity.ShipmentHeaderId);
|
|
||||||
if (header != null && header.FirstStatus != ShipStatusEnum.新建)
|
|
||||||
{
|
|
||||||
return FFResult().Alert($"非新建状态的出库单,无法新建明细!");
|
|
||||||
}
|
|
||||||
var inv = _unitwork.FindSingle<Inventory>(x => x.UniqueCode == vm.Entity.UniqueCode
|
|
||||||
&& x.TaskStatus != InventoryTaskStatus.任务中);
|
|
||||||
if(inv == null)
|
|
||||||
{
|
|
||||||
return FFResult().Alert($"{vm.Entity.UniqueCode}不存在或已有任务,检查后重新添加!");
|
|
||||||
}
|
|
||||||
if(_unitwork.IsExit<ShipmentDetail>(x => x.UniqueCode == vm.Entity.UniqueCode))
|
|
||||||
{
|
|
||||||
return FFResult().Alert($"{vm.Entity.UniqueCode}已在出库单内,请勿重复添加!");
|
|
||||||
}
|
|
||||||
vm.Entity.MaterialCode = inv.MaterialCode;
|
|
||||||
vm.Entity.MaterialName = inv.MaterialName;
|
|
||||||
vm.Entity.MaterialSpec = inv.MaterialSpec;
|
|
||||||
vm.Entity.MaterialUnit = inv.MaterialUnit;
|
|
||||||
vm.Entity.MaterialType = inv.MaterialType;
|
|
||||||
vm.Entity.Batch = inv.Batch;
|
|
||||||
vm.Entity.Qty = inv.Qty;
|
|
||||||
vm.Entity.Status = ShipStatusEnum.新建;
|
vm.Entity.Status = ShipStatusEnum.新建;
|
||||||
vm.DoAdd();
|
vm.DoAdd();
|
||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
|
|||||||
@@ -232,81 +232,6 @@ namespace HHWMS.Web.Controllers
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 库位分析
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="id"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[ActionDescription("ShipmentHeader.Analyse")]
|
|
||||||
public ActionResult Analyse(string id)
|
|
||||||
{
|
|
||||||
var vm = Wtm.CreateVM<ShipmentHeaderVM>(id);
|
|
||||||
return PartialView(vm);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 返回分析数据
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="id"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[ActionDescription("ShipmentHeader.Analyse")]
|
|
||||||
[HttpPost]
|
|
||||||
public ActionResult AnalyseData(int id)
|
|
||||||
{
|
|
||||||
var data = _unitwork.Find<ShipmentHeader>(x => x.ID == id)
|
|
||||||
.Include(x => x.ShipmentDetails).ToList();
|
|
||||||
var details = data.FirstOrDefault().ShipmentDetails.Where(x => x.Status < ShipStatusEnum.分配完成);
|
|
||||||
foreach (var item in details)
|
|
||||||
{
|
|
||||||
var invQty = _unitwork.FindSingle<Inventory>(x =>
|
|
||||||
x.UniqueCode.Equals(item.UniqueCode)
|
|
||||||
&& x.TaskStatus == InventoryTaskStatus.无任务);
|
|
||||||
item.InventoryStatus = invQty != null ? "满足" : "不足";
|
|
||||||
}
|
|
||||||
return JsonMore(details);
|
|
||||||
}
|
|
||||||
|
|
||||||
[ActionDescription("ShipmentHeader.ShelfInv")]
|
|
||||||
public ActionResult ShelfInv(string id)
|
|
||||||
{
|
|
||||||
var vm = Wtm.CreateVM<ShipmentHeaderVM>(id);
|
|
||||||
return PartialView(vm);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 货架库存
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="id"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[ActionDescription("ShipmentHeader.ShelfInv")]
|
|
||||||
public ActionResult ShelfInvData(int id)
|
|
||||||
{
|
|
||||||
var data = _unitwork.Find<ShipmentHeader>(x => x.ID == id)
|
|
||||||
.Include(x => x.ShipmentDetails)
|
|
||||||
.FirstOrDefault();
|
|
||||||
var details = data.ShipmentDetails.Where(x => x.Status < ShipStatusEnum.分配完成)
|
|
||||||
.Select(x => x.UniqueCode)
|
|
||||||
.ToList();
|
|
||||||
|
|
||||||
var invList = _unitwork.Find<Inventory>(x => x.ZoneCode.Equals(ZoneCodeEnum.货架库)
|
|
||||||
&& x.TaskStatus.Equals(InventoryTaskStatus.无任务)
|
|
||||||
&& details.Contains(x.UniqueCode))
|
|
||||||
.ToList();
|
|
||||||
//var details = data.ShipmentDetails.Where(x => invList.Contains(x.UniqueCode));
|
|
||||||
return JsonMore(invList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取库存数据
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="uniqueCode"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public ActionResult GetInvData(string uniqueCode)
|
|
||||||
{
|
|
||||||
var data = _unitwork.Find<Inventory>(x => x.UniqueCode == uniqueCode).ToList();
|
|
||||||
return JsonMore(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 启动出库
|
/// 启动出库
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -12,7 +12,7 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
public partial class ShipmentDetailHistoryTemplateVM : BaseTemplateVM
|
public partial class ShipmentDetailHistoryTemplateVM : BaseTemplateVM
|
||||||
{
|
{
|
||||||
public ExcelPropety ShipmentHeaderHistory_Excel = ExcelPropety.CreateProperty<ShipmentDetailHistory>(x => x.ShipmentHeaderHistoryId);
|
public ExcelPropety ShipmentHeaderHistory_Excel = ExcelPropety.CreateProperty<ShipmentDetailHistory>(x => x.HeaderId);
|
||||||
[Display(Name = "Task.ZoneCode")]
|
[Display(Name = "Task.ZoneCode")]
|
||||||
public ExcelPropety ZoneCode_Excel = ExcelPropety.CreateProperty<ShipmentDetailHistory>(x => x.ZoneCode);
|
public ExcelPropety ZoneCode_Excel = ExcelPropety.CreateProperty<ShipmentDetailHistory>(x => x.ZoneCode);
|
||||||
[Display(Name = "Inventory.MaterialCode")]
|
[Display(Name = "Inventory.MaterialCode")]
|
||||||
|
|||||||
+4
-6
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -32,7 +32,7 @@ namespace HHWMS.Web
|
|||||||
protected override IEnumerable<IGridColumn<ShipmentDetailHistory_View>> InitGridHeader()
|
protected override IEnumerable<IGridColumn<ShipmentDetailHistory_View>> InitGridHeader()
|
||||||
{
|
{
|
||||||
return new List<GridColumn<ShipmentDetailHistory_View>>{
|
return new List<GridColumn<ShipmentDetailHistory_View>>{
|
||||||
this.MakeGridHeader(x => x.Code_view),
|
this.MakeGridHeader(x => x.HeaderId),
|
||||||
this.MakeGridHeader(x => x.ZoneCode),
|
this.MakeGridHeader(x => x.ZoneCode),
|
||||||
this.MakeGridHeader(x => x.MaterialCode),
|
this.MakeGridHeader(x => x.MaterialCode),
|
||||||
this.MakeGridHeader(x => x.MaterialType),
|
this.MakeGridHeader(x => x.MaterialType),
|
||||||
@@ -57,7 +57,7 @@ namespace HHWMS.Web
|
|||||||
public override IOrderedQueryable<ShipmentDetailHistory_View> GetSearchQuery()
|
public override IOrderedQueryable<ShipmentDetailHistory_View> GetSearchQuery()
|
||||||
{
|
{
|
||||||
var query = DC.Set<ShipmentDetailHistory>()
|
var query = DC.Set<ShipmentDetailHistory>()
|
||||||
.CheckEqual(Searcher.ShipmentHeaderHistoryId, x=>x.ShipmentHeaderHistoryId)
|
.CheckEqual(Searcher.ShipmentHeaderHistoryId, x=>x.HeaderId)
|
||||||
.CheckContain(Searcher.ZoneCode, x=>x.ZoneCode)
|
.CheckContain(Searcher.ZoneCode, x=>x.ZoneCode)
|
||||||
.CheckContain(Searcher.MaterialCode, x=>x.MaterialCode)
|
.CheckContain(Searcher.MaterialCode, x=>x.MaterialCode)
|
||||||
.CheckContain(Searcher.MaterialType, x=>x.MaterialType)
|
.CheckContain(Searcher.MaterialType, x=>x.MaterialType)
|
||||||
@@ -72,7 +72,7 @@ namespace HHWMS.Web
|
|||||||
.Select(x => new ShipmentDetailHistory_View
|
.Select(x => new ShipmentDetailHistory_View
|
||||||
{
|
{
|
||||||
ID = x.ID,
|
ID = x.ID,
|
||||||
Code_view = x.ShipmentHeaderHistory.Code,
|
HeaderId = x.HeaderId,
|
||||||
ZoneCode = x.ZoneCode,
|
ZoneCode = x.ZoneCode,
|
||||||
MaterialCode = x.MaterialCode,
|
MaterialCode = x.MaterialCode,
|
||||||
MaterialType = x.MaterialType,
|
MaterialType = x.MaterialType,
|
||||||
@@ -98,8 +98,6 @@ namespace HHWMS.Web
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class ShipmentDetailHistory_View : ShipmentDetailHistory{
|
public class ShipmentDetailHistory_View : ShipmentDetailHistory{
|
||||||
[Display(Name = "Inventory.ShipCode")]
|
|
||||||
public String Code_view { get; set; }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-2
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -16,7 +16,6 @@ namespace HHWMS.Web
|
|||||||
|
|
||||||
public ShipmentDetailHistoryVM()
|
public ShipmentDetailHistoryVM()
|
||||||
{
|
{
|
||||||
SetInclude(x => x.ShipmentHeaderHistory);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void InitVM()
|
protected override void InitVM()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
public partial class ShipmentDetailTemplateVM : BaseTemplateVM
|
public partial class ShipmentDetailTemplateVM : BaseTemplateVM
|
||||||
{
|
{
|
||||||
public ExcelPropety ShipmentHeader_Excel = ExcelPropety.CreateProperty<ShipmentDetail>(x => x.ShipmentHeaderId);
|
public ExcelPropety ShipmentHeader_Excel = ExcelPropety.CreateProperty<ShipmentDetail>(x => x.HeaderId);
|
||||||
|
|
||||||
[Display(Name = "Task.ZoneCode")]
|
[Display(Name = "Task.ZoneCode")]
|
||||||
public ExcelPropety ZoneCode_Excel = ExcelPropety.CreateProperty<ShipmentDetail>(x => x.ZoneCode);
|
public ExcelPropety ZoneCode_Excel = ExcelPropety.CreateProperty<ShipmentDetail>(x => x.ZoneCode);
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ namespace HHWMS.Web
|
|||||||
if (SearcherMode == ListVMSearchModeEnum.MasterDetail)
|
if (SearcherMode == ListVMSearchModeEnum.MasterDetail)
|
||||||
{
|
{
|
||||||
return new List<GridColumn<ShipmentDetail_View>>{
|
return new List<GridColumn<ShipmentDetail_View>>{
|
||||||
this.MakeGridHeader(x => x.UniqueCode).SetWidth(220),
|
|
||||||
this.MakeGridHeader(x => x.MaterialCode),
|
this.MakeGridHeader(x => x.MaterialCode),
|
||||||
this.MakeGridHeader(x => x.Batch),
|
this.MakeGridHeader(x => x.Batch),
|
||||||
this.MakeGridHeader(x => x.Qty),
|
this.MakeGridHeader(x => x.Qty),
|
||||||
@@ -51,7 +50,6 @@ namespace HHWMS.Web
|
|||||||
else if (SearcherMode == ListVMSearchModeEnum.Custom1)
|
else if (SearcherMode == ListVMSearchModeEnum.Custom1)
|
||||||
{
|
{
|
||||||
return new List<GridColumn<ShipmentDetail_View>>{
|
return new List<GridColumn<ShipmentDetail_View>>{
|
||||||
this.MakeGridHeader(x => x.UniqueCode).SetWidth(220),
|
|
||||||
this.MakeGridHeader(x => x.MaterialCode),
|
this.MakeGridHeader(x => x.MaterialCode),
|
||||||
this.MakeGridHeader(x => x.Batch),
|
this.MakeGridHeader(x => x.Batch),
|
||||||
this.MakeGridHeader(x => x.Qty),
|
this.MakeGridHeader(x => x.Qty),
|
||||||
@@ -87,31 +85,24 @@ namespace HHWMS.Web
|
|||||||
InitVM();
|
InitVM();
|
||||||
if (SearcherMode == ListVMSearchModeEnum.Custom1) {
|
if (SearcherMode == ListVMSearchModeEnum.Custom1) {
|
||||||
var tt = DC.Set<ShipmentDetail>()
|
var tt = DC.Set<ShipmentDetail>()
|
||||||
.CheckEqual(Searcher.ShipmentHeaderId, x => x.ShipmentHeaderId)
|
.CheckEqual(Searcher.HeaderId, x => x.HeaderId)
|
||||||
.Select(x => new ShipmentDetail_View
|
.Select(x => new ShipmentDetail_View
|
||||||
{
|
{
|
||||||
ID = x.ID,
|
ID = x.ID,
|
||||||
UniqueCode = x.UniqueCode,
|
|
||||||
MaterialCode = x.MaterialCode,
|
MaterialCode = x.MaterialCode,
|
||||||
Batch = x.Batch,
|
Batch = x.Batch,
|
||||||
Qty = x.Qty,
|
Qty = x.Qty,
|
||||||
InventoryStatus = x.InventoryStatus,
|
InventoryStatus = x.InventoryStatus,
|
||||||
Status = x.Status
|
Status = x.Status
|
||||||
}).ToList();
|
}).ToList();
|
||||||
foreach(var item in tt.Where(x => x.Status < ShipStatusEnum.分配完成))
|
|
||||||
{
|
|
||||||
var invQty = _unitWork.Find<Inventory>(x => x.UniqueCode.Equals(item.UniqueCode))
|
|
||||||
.Sum(x => x.Qty);
|
|
||||||
item.InventoryStatus = invQty >= (item.Qty - item.DividedQty) ? "true" : "false";
|
|
||||||
}
|
|
||||||
return (IOrderedQueryable<ShipmentDetail_View>)tt.OrderBy(x => x.ID);
|
return (IOrderedQueryable<ShipmentDetail_View>)tt.OrderBy(x => x.ID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var query = DC.Set<ShipmentDetail>()
|
var query = DC.Set<ShipmentDetail>()
|
||||||
.CheckEqual(Searcher.ShipmentHeaderId, x => x.ShipmentHeaderId)
|
.CheckEqual(Searcher.HeaderId, x => x.HeaderId)
|
||||||
.CheckContain(Searcher.ZoneCode, x => x.ZoneCode)
|
.CheckContain(Searcher.ZoneCode, x => x.ZoneCode)
|
||||||
.CheckContain(Searcher.UniqueCode, x => x.UniqueCode)
|
|
||||||
.CheckContain(Searcher.MaterialCode, x => x.MaterialCode)
|
.CheckContain(Searcher.MaterialCode, x => x.MaterialCode)
|
||||||
.CheckContain(Searcher.MaterialType, x => x.MaterialType)
|
.CheckContain(Searcher.MaterialType, x => x.MaterialType)
|
||||||
.CheckContain(Searcher.MaterialName, x => x.MaterialName)
|
.CheckContain(Searcher.MaterialName, x => x.MaterialName)
|
||||||
@@ -125,7 +116,6 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
ID = x.ID,
|
ID = x.ID,
|
||||||
Code_view = x.ShipmentHeader.Code,
|
Code_view = x.ShipmentHeader.Code,
|
||||||
UniqueCode = x.UniqueCode,
|
|
||||||
ZoneCode = x.ZoneCode,
|
ZoneCode = x.ZoneCode,
|
||||||
MaterialCode = x.MaterialCode,
|
MaterialCode = x.MaterialCode,
|
||||||
MaterialType = x.MaterialType,
|
MaterialType = x.MaterialType,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace HHWMS.Web
|
|||||||
public List<ComboSelectListItem> AllShipmentHeaders { get; set; }
|
public List<ComboSelectListItem> AllShipmentHeaders { get; set; }
|
||||||
|
|
||||||
[Display(Name = "Inventory.ShipCode")]
|
[Display(Name = "Inventory.ShipCode")]
|
||||||
public int? ShipmentHeaderId { get; set; }
|
public int? HeaderId { get; set; }
|
||||||
|
|
||||||
[Display(Name = "Task.ZoneCode")]
|
[Display(Name = "Task.ZoneCode")]
|
||||||
public String ZoneCode { get; set; }
|
public String ZoneCode { get; set; }
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace HHWMS.Web
|
|||||||
protected override void InitVM()
|
protected override void InitVM()
|
||||||
{
|
{
|
||||||
Details.CopyContext(this);
|
Details.CopyContext(this);
|
||||||
Details.Searcher.ShipmentHeaderId = Entity.ID;
|
Details.Searcher.HeaderId = Entity.ID;
|
||||||
|
|
||||||
var CurrentCulture = Wtm.CurrentCulture;
|
var CurrentCulture = Wtm.CurrentCulture;
|
||||||
var dictDatas = DC.Set<SysDictData>().ToList();
|
var dictDatas = DC.Set<SysDictData>().ToList();
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:combobox field="Entity.ShipmentHeaderId" items="AllShipmentHeaders"/>
|
<wt:combobox field="Entity.HeaderId" items="AllShipmentHeaders" />
|
||||||
<wt:textbox field="Entity.UniqueCode" />
|
|
||||||
@* <wt:textbox field="Entity.ZoneCode" />
|
@* <wt:textbox field="Entity.ZoneCode" />
|
||||||
<wt:textbox field="Entity.MaterialCode" />
|
<wt:textbox field="Entity.MaterialCode" />
|
||||||
<wt:textbox field="Entity.MaterialType" />
|
<wt:textbox field="Entity.MaterialType" />
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@model HHWMS.Web.ShipmentDetailVM
|
@model HHWMS.Web.ShipmentDetailVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:combobox field="Entity.ShipmentHeaderId" items="AllShipmentHeaders"/>
|
<wt:combobox field="Entity.HeaderId" items="AllShipmentHeaders" />
|
||||||
<wt:textbox field="Entity.ZoneCode" />
|
<wt:textbox field="Entity.ZoneCode" />
|
||||||
<wt:textbox field="Entity.MaterialCode" />
|
<wt:textbox field="Entity.MaterialCode" />
|
||||||
<wt:textbox field="Entity.MaterialType" />
|
<wt:textbox field="Entity.MaterialType" />
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<wt:searchpanel vm="@Model" reset-btn="true">
|
<wt:searchpanel vm="@Model" reset-btn="true">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
||||||
<wt:combobox field="Searcher.ShipmentHeaderId" items="Searcher.AllShipmentHeaders" empty-text="@Localizer["Sys.All"]" />
|
<wt:combobox field="Searcher.HeaderId" items="Searcher.AllShipmentHeaders" empty-text="@Localizer["Sys.All"]" />
|
||||||
<wt:textbox field="Searcher.ZoneCode" />
|
<wt:textbox field="Searcher.ZoneCode" />
|
||||||
<wt:textbox field="Searcher.MaterialCode" />
|
<wt:textbox field="Searcher.MaterialCode" />
|
||||||
<wt:textbox field="Searcher.MaterialType" />
|
<wt:textbox field="Searcher.MaterialType" />
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@model HHWMS.Web.ShipmentDetailHistoryVM
|
@model HHWMS.Web.ShipmentDetailHistoryVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:combobox field="Entity.ShipmentHeaderHistoryId" items="AllShipmentHeaderHistorys"/>
|
<wt:combobox field="Entity.HeaderId" items="AllShipmentHeaderHistorys" />
|
||||||
<wt:textbox field="Entity.ZoneCode" />
|
<wt:textbox field="Entity.ZoneCode" />
|
||||||
<wt:textbox field="Entity.MaterialCode" />
|
<wt:textbox field="Entity.MaterialCode" />
|
||||||
<wt:textbox field="Entity.MaterialType" />
|
<wt:textbox field="Entity.MaterialType" />
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
@model HHWMS.Web.ShipmentDetailHistoryVM
|
@model HHWMS.Web.ShipmentDetailHistoryVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:quote>@Localizer["Sys.DeleteConfirm"]</wt:quote>
|
<wt:quote>@Localizer["Sys.DeleteConfirm"]</wt:quote>
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:display field="Entity.ShipmentHeaderHistory.Code" />
|
<wt:display field="Entity.HeaderId" />
|
||||||
<wt:display field="Entity.ZoneCode" />
|
<wt:display field="Entity.ZoneCode" />
|
||||||
<wt:display field="Entity.MaterialCode" />
|
<wt:display field="Entity.MaterialCode" />
|
||||||
<wt:display field="Entity.MaterialType" />
|
<wt:display field="Entity.MaterialType" />
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@model HHWMS.Web.ShipmentDetailHistoryVM
|
@model HHWMS.Web.ShipmentDetailHistoryVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:display field="Entity.ShipmentHeaderHistory.Code" />
|
<wt:display field="Entity.HeaderId" />
|
||||||
<wt:display field="Entity.ZoneCode" />
|
<wt:display field="Entity.ZoneCode" />
|
||||||
<wt:display field="Entity.MaterialCode" />
|
<wt:display field="Entity.MaterialCode" />
|
||||||
<wt:display field="Entity.MaterialType" />
|
<wt:display field="Entity.MaterialType" />
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@model HHWMS.Web.ShipmentDetailHistoryVM
|
@model HHWMS.Web.ShipmentDetailHistoryVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:combobox field="Entity.ShipmentHeaderHistoryId" items="AllShipmentHeaderHistorys"/>
|
<wt:combobox field="Entity.HeaderId" items="AllShipmentHeaderHistorys" />
|
||||||
<wt:textbox field="Entity.ZoneCode" />
|
<wt:textbox field="Entity.ZoneCode" />
|
||||||
<wt:textbox field="Entity.MaterialCode" />
|
<wt:textbox field="Entity.MaterialCode" />
|
||||||
<wt:textbox field="Entity.MaterialType" />
|
<wt:textbox field="Entity.MaterialType" />
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using HHWMS.Web.Models;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Quartz;
|
|
||||||
using WalkingTec.Mvvm.Core;
|
|
||||||
using WalkingTec.Mvvm.Core.Support.Quartz;
|
|
||||||
|
|
||||||
namespace HHWMS.Web
|
|
||||||
{
|
|
||||||
//[QuartzRepeat(10,10, true, 30)]
|
|
||||||
[PersistJobDataAfterExecution]
|
|
||||||
[DisallowConcurrentExecution]
|
|
||||||
public class SendWcsJob : WtmJob
|
|
||||||
{
|
|
||||||
public override Task Execute(IJobExecutionContext context)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var _unitwork = new UnitWork(Wtm);
|
|
||||||
|
|
||||||
#region 更新时间
|
|
||||||
|
|
||||||
var job = _unitwork.FindSingle<SysJob>(x => x.JobName == context.JobDetail.Key.Name);
|
|
||||||
if (job != null)
|
|
||||||
{
|
|
||||||
job.LastFireTime = TimeZoneInfo.ConvertTimeFromUtc(context.FireTimeUtc.DateTime, TimeZoneInfo.Local);
|
|
||||||
// 只执行一次 没有下次执行时间
|
|
||||||
if (context.NextFireTimeUtc != null)
|
|
||||||
{
|
|
||||||
job.NextFireTime = TimeZoneInfo.ConvertTimeFromUtc(context.NextFireTimeUtc.Value.DateTime, TimeZoneInfo.Local);
|
|
||||||
}
|
|
||||||
_unitwork.Update<SysJob>(job);
|
|
||||||
}
|
|
||||||
Wtm.DoLog("任务下发", ActionLogTypesEnum.Job, "SendWcsJob");
|
|
||||||
#endregion 更新时间
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
return Task.CompletedTask;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using HHWMS.Web.Models;
|
|
||||||
using Quartz;
|
|
||||||
using WalkingTec.Mvvm.Core;
|
|
||||||
using WalkingTec.Mvvm.Core.Support.Quartz;
|
|
||||||
|
|
||||||
namespace HHWMS.Web
|
|
||||||
{
|
|
||||||
//[QuartzRepeat(10,10, true, 30)]
|
|
||||||
//出库单据分解,为每个出库物料创建出库明细,状态为新建,通过唯一码绑定任务与库存
|
|
||||||
[PersistJobDataAfterExecution]
|
|
||||||
[DisallowConcurrentExecution]
|
|
||||||
public class SendWmsJob : WtmJob
|
|
||||||
{
|
|
||||||
public override Task Execute(IJobExecutionContext context)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var _unitwork = new UnitWork(Wtm);
|
|
||||||
|
|
||||||
#region 更新时间
|
|
||||||
|
|
||||||
var job = _unitwork.FindSingle<SysJob>(x => x.JobName == context.JobDetail.Key.Name);
|
|
||||||
if (job != null)
|
|
||||||
{
|
|
||||||
job.LastFireTime = TimeZoneInfo.ConvertTimeFromUtc(context.FireTimeUtc.DateTime, TimeZoneInfo.Local);
|
|
||||||
// 只执行一次 没有下次执行时间
|
|
||||||
if (context.NextFireTimeUtc != null)
|
|
||||||
{
|
|
||||||
job.NextFireTime = TimeZoneInfo.ConvertTimeFromUtc(context.NextFireTimeUtc.Value.DateTime, TimeZoneInfo.Local);
|
|
||||||
}
|
|
||||||
_unitwork.Update<SysJob>(job);
|
|
||||||
}
|
|
||||||
Wtm.DoLog("出库分解", ActionLogTypesEnum.Job, "SendWmsJob");
|
|
||||||
|
|
||||||
#endregion 更新时间
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
return Task.CompletedTask;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -42,7 +42,9 @@ namespace HHWMS.Web
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
catch { }
|
catch(Exception ex) {
|
||||||
|
Wtm.DoLog("测试", ActionLogTypesEnum.Job, "TestJob", request:"error", result:ex.Message);
|
||||||
|
}
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -12,7 +12,7 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
public partial class TaskDetailHistoryTemplateVM : BaseTemplateVM
|
public partial class TaskDetailHistoryTemplateVM : BaseTemplateVM
|
||||||
{
|
{
|
||||||
public ExcelPropety TaskHeader_Excel = ExcelPropety.CreateProperty<TaskDetailHistory>(x => x.TaskHeaderId);
|
public ExcelPropety TaskHeader_Excel = ExcelPropety.CreateProperty<TaskDetailHistory>(x => x.HeaderId);
|
||||||
[Display(Name = "Inventory.ReceiptCode")]
|
[Display(Name = "Inventory.ReceiptCode")]
|
||||||
public ExcelPropety OrderCode_Excel = ExcelPropety.CreateProperty<TaskDetailHistory>(x => x.OrderCode);
|
public ExcelPropety OrderCode_Excel = ExcelPropety.CreateProperty<TaskDetailHistory>(x => x.OrderCode);
|
||||||
[Display(Name = "Inventory.ReceiptDetailId")]
|
[Display(Name = "Inventory.ReceiptDetailId")]
|
||||||
|
|||||||
+4
-6
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -32,7 +32,7 @@ namespace HHWMS.Web
|
|||||||
protected override IEnumerable<IGridColumn<TaskDetailHistory_View>> InitGridHeader()
|
protected override IEnumerable<IGridColumn<TaskDetailHistory_View>> InitGridHeader()
|
||||||
{
|
{
|
||||||
return new List<GridColumn<TaskDetailHistory_View>>{
|
return new List<GridColumn<TaskDetailHistory_View>>{
|
||||||
this.MakeGridHeader(x => x.TaskNo_view),
|
this.MakeGridHeader(x => x.HeaderId),
|
||||||
this.MakeGridHeader(x => x.OrderCode),
|
this.MakeGridHeader(x => x.OrderCode),
|
||||||
this.MakeGridHeader(x => x.OrderDetailId),
|
this.MakeGridHeader(x => x.OrderDetailId),
|
||||||
this.MakeGridHeader(x => x.MaterialCode),
|
this.MakeGridHeader(x => x.MaterialCode),
|
||||||
@@ -52,7 +52,7 @@ namespace HHWMS.Web
|
|||||||
public override IOrderedQueryable<TaskDetailHistory_View> GetSearchQuery()
|
public override IOrderedQueryable<TaskDetailHistory_View> GetSearchQuery()
|
||||||
{
|
{
|
||||||
var query = DC.Set<TaskDetailHistory>()
|
var query = DC.Set<TaskDetailHistory>()
|
||||||
.CheckEqual(Searcher.TaskHeaderId, x=>x.TaskHeaderId)
|
.CheckEqual(Searcher.TaskHeaderId, x=>x.HeaderId)
|
||||||
.CheckContain(Searcher.MaterialCode, x=>x.MaterialCode)
|
.CheckContain(Searcher.MaterialCode, x=>x.MaterialCode)
|
||||||
.CheckContain(Searcher.MaterialName, x=>x.MaterialName)
|
.CheckContain(Searcher.MaterialName, x=>x.MaterialName)
|
||||||
.CheckContain(Searcher.MaterialSpec, x=>x.MaterialSpec)
|
.CheckContain(Searcher.MaterialSpec, x=>x.MaterialSpec)
|
||||||
@@ -63,7 +63,7 @@ namespace HHWMS.Web
|
|||||||
.Select(x => new TaskDetailHistory_View
|
.Select(x => new TaskDetailHistory_View
|
||||||
{
|
{
|
||||||
ID = x.ID,
|
ID = x.ID,
|
||||||
TaskNo_view = x.TaskHeader.TaskNo,
|
HeaderId = x.HeaderId,
|
||||||
OrderCode = x.OrderCode,
|
OrderCode = x.OrderCode,
|
||||||
OrderDetailId = x.OrderDetailId,
|
OrderDetailId = x.OrderDetailId,
|
||||||
MaterialCode = x.MaterialCode,
|
MaterialCode = x.MaterialCode,
|
||||||
@@ -84,8 +84,6 @@ namespace HHWMS.Web
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class TaskDetailHistory_View : TaskDetailHistory{
|
public class TaskDetailHistory_View : TaskDetailHistory{
|
||||||
[Display(Name = "Task.TaskNo")]
|
|
||||||
public String TaskNo_view { get; set; }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -16,7 +16,6 @@ namespace HHWMS.Web
|
|||||||
|
|
||||||
public TaskDetailHistoryVM()
|
public TaskDetailHistoryVM()
|
||||||
{
|
{
|
||||||
SetInclude(x => x.TaskHeader);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void InitVM()
|
protected override void InitVM()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -12,13 +12,11 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
public partial class TaskDetailTemplateVM : BaseTemplateVM
|
public partial class TaskDetailTemplateVM : BaseTemplateVM
|
||||||
{
|
{
|
||||||
public ExcelPropety TaskHeader_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.TaskHeaderId);
|
public ExcelPropety TaskHeader_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.HeaderId);
|
||||||
[Display(Name = "Inventory.ReceiptCode")]
|
[Display(Name = "Inventory.ReceiptCode")]
|
||||||
public ExcelPropety OrderCode_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.OrderCode);
|
public ExcelPropety OrderCode_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.OrderCode);
|
||||||
[Display(Name = "Inventory.ReceiptDetailId")]
|
[Display(Name = "Inventory.ReceiptDetailId")]
|
||||||
public ExcelPropety OrderDetailId_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.OrderDetailId);
|
public ExcelPropety OrderDetailId_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.OrderDetailId);
|
||||||
[Display(Name = "Inventory.UniqueCode")]
|
|
||||||
public ExcelPropety UniqueCode_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.UniqueCode);
|
|
||||||
[Display(Name = "Inventory.MaterialCode")]
|
[Display(Name = "Inventory.MaterialCode")]
|
||||||
public ExcelPropety MaterialCode_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.MaterialCode);
|
public ExcelPropety MaterialCode_Excel = ExcelPropety.CreateProperty<TaskDetail>(x => x.MaterialCode);
|
||||||
[Display(Name = "Inventory.MaterialName")]
|
[Display(Name = "Inventory.MaterialName")]
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ namespace HHWMS.Web
|
|||||||
this.MakeGridHeader(x => x.TaskNo_view),
|
this.MakeGridHeader(x => x.TaskNo_view),
|
||||||
this.MakeGridHeader(x => x.OrderCode).SetHide(),
|
this.MakeGridHeader(x => x.OrderCode).SetHide(),
|
||||||
this.MakeGridHeader(x => x.OrderDetailId).SetHide(),
|
this.MakeGridHeader(x => x.OrderDetailId).SetHide(),
|
||||||
this.MakeGridHeader(x => x.UniqueCode),
|
|
||||||
this.MakeGridHeader(x => x.MaterialCode),
|
this.MakeGridHeader(x => x.MaterialCode),
|
||||||
this.MakeGridHeader(x => x.MaterialName).SetHide(),
|
this.MakeGridHeader(x => x.MaterialName).SetHide(),
|
||||||
this.MakeGridHeader(x => x.MaterialSpec).SetHide(),
|
this.MakeGridHeader(x => x.MaterialSpec).SetHide(),
|
||||||
@@ -55,7 +54,6 @@ namespace HHWMS.Web
|
|||||||
public override IOrderedQueryable<TaskDetail_View> GetSearchQuery()
|
public override IOrderedQueryable<TaskDetail_View> GetSearchQuery()
|
||||||
{
|
{
|
||||||
var query = DC.Set<TaskDetail>()
|
var query = DC.Set<TaskDetail>()
|
||||||
.CheckContain(Searcher.UniqueCode, x=>x.UniqueCode)
|
|
||||||
.CheckContain(Searcher.MaterialCode, x=>x.MaterialCode)
|
.CheckContain(Searcher.MaterialCode, x=>x.MaterialCode)
|
||||||
.CheckContain(Searcher.FromLocation, x=>x.FromLocation)
|
.CheckContain(Searcher.FromLocation, x=>x.FromLocation)
|
||||||
.CheckContain(Searcher.ToLocation, x=>x.ToLocation)
|
.CheckContain(Searcher.ToLocation, x=>x.ToLocation)
|
||||||
@@ -65,7 +63,6 @@ namespace HHWMS.Web
|
|||||||
TaskNo_view = x.TaskHeader.TaskNo,
|
TaskNo_view = x.TaskHeader.TaskNo,
|
||||||
OrderCode = x.OrderCode,
|
OrderCode = x.OrderCode,
|
||||||
OrderDetailId = x.OrderDetailId,
|
OrderDetailId = x.OrderDetailId,
|
||||||
UniqueCode = x.UniqueCode,
|
|
||||||
MaterialCode = x.MaterialCode,
|
MaterialCode = x.MaterialCode,
|
||||||
MaterialName = x.MaterialName,
|
MaterialName = x.MaterialName,
|
||||||
MaterialSpec = x.MaterialSpec,
|
MaterialSpec = x.MaterialSpec,
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ namespace HHWMS.Web
|
|||||||
this.MakeGridHeader(x => x.TaskNo_view),
|
this.MakeGridHeader(x => x.TaskNo_view),
|
||||||
this.MakeGridHeader(x => x.OrderCode).SetHide(),
|
this.MakeGridHeader(x => x.OrderCode).SetHide(),
|
||||||
this.MakeGridHeader(x => x.OrderDetailId).SetHide(),
|
this.MakeGridHeader(x => x.OrderDetailId).SetHide(),
|
||||||
this.MakeGridHeader(x => x.UniqueCode),
|
|
||||||
this.MakeGridHeader(x => x.MaterialCode),
|
this.MakeGridHeader(x => x.MaterialCode),
|
||||||
this.MakeGridHeader(x => x.MaterialName).SetHide(),
|
this.MakeGridHeader(x => x.MaterialName).SetHide(),
|
||||||
this.MakeGridHeader(x => x.MaterialSpec).SetHide(),
|
this.MakeGridHeader(x => x.MaterialSpec).SetHide(),
|
||||||
@@ -47,14 +46,13 @@ namespace HHWMS.Web
|
|||||||
public override IOrderedQueryable<TaskDetail_View> GetSearchQuery()
|
public override IOrderedQueryable<TaskDetail_View> GetSearchQuery()
|
||||||
{
|
{
|
||||||
var query = DC.Set<TaskDetail>()
|
var query = DC.Set<TaskDetail>()
|
||||||
.Where(x => x.TaskHeaderId == Searcher.TaskHeaderId)
|
.Where(x => x.HeaderId == Searcher.HeaderId)
|
||||||
.Select(x => new TaskDetail_View
|
.Select(x => new TaskDetail_View
|
||||||
{
|
{
|
||||||
ID = x.ID,
|
ID = x.ID,
|
||||||
TaskNo_view = $"{x.TaskHeader.TaskNo}-{x.FromLocation}",
|
TaskNo_view = $"{x.TaskHeader.TaskNo}-{x.FromLocation}",
|
||||||
OrderCode = x.OrderCode,
|
OrderCode = x.OrderCode,
|
||||||
OrderDetailId = x.OrderDetailId,
|
OrderDetailId = x.OrderDetailId,
|
||||||
UniqueCode = x.UniqueCode,
|
|
||||||
MaterialCode = x.MaterialCode,
|
MaterialCode = x.MaterialCode,
|
||||||
MaterialName = x.MaterialName,
|
MaterialName = x.MaterialName,
|
||||||
MaterialSpec = x.MaterialSpec,
|
MaterialSpec = x.MaterialSpec,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace HHWMS.Web
|
|||||||
public String UniqueCode { get; set; }
|
public String UniqueCode { get; set; }
|
||||||
|
|
||||||
[Display(Name = "Task.TaskNo")]
|
[Display(Name = "Task.TaskNo")]
|
||||||
public int? TaskHeaderId { get; set; }
|
public int? HeaderId { get; set; }
|
||||||
|
|
||||||
[Display(Name = "Inventory.MaterialCode")]
|
[Display(Name = "Inventory.MaterialCode")]
|
||||||
public String MaterialCode { get; set; }
|
public String MaterialCode { get; set; }
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
@model HHWMS.Web.TaskDetailVM
|
@model HHWMS.Web.TaskDetailVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:combobox field="Entity.TaskHeaderId" items="AllTaskHeaders"/>
|
<wt:combobox field="Entity.HeaderId" items="AllTaskHeaders" />
|
||||||
<wt:textbox field="Entity.OrderCode" />
|
<wt:textbox field="Entity.OrderCode" />
|
||||||
<wt:textbox field="Entity.OrderDetailId" />
|
<wt:textbox field="Entity.OrderDetailId" />
|
||||||
<wt:textbox field="Entity.UniqueCode" />
|
|
||||||
<wt:textbox field="Entity.MaterialCode" />
|
<wt:textbox field="Entity.MaterialCode" />
|
||||||
<wt:textbox field="Entity.MaterialName" />
|
<wt:textbox field="Entity.MaterialName" />
|
||||||
<wt:textbox field="Entity.MaterialSpec" />
|
<wt:textbox field="Entity.MaterialSpec" />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@model HHWMS.Web.TaskDetailVM
|
@model HHWMS.Web.TaskDetailVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
@@ -7,7 +7,6 @@
|
|||||||
<wt:display field="Entity.TaskHeader.TaskNo" />
|
<wt:display field="Entity.TaskHeader.TaskNo" />
|
||||||
<wt:display field="Entity.OrderCode" />
|
<wt:display field="Entity.OrderCode" />
|
||||||
<wt:display field="Entity.OrderDetailId" />
|
<wt:display field="Entity.OrderDetailId" />
|
||||||
<wt:display field="Entity.UniqueCode" />
|
|
||||||
<wt:display field="Entity.MaterialCode" />
|
<wt:display field="Entity.MaterialCode" />
|
||||||
<wt:display field="Entity.MaterialName" />
|
<wt:display field="Entity.MaterialName" />
|
||||||
<wt:display field="Entity.MaterialSpec" />
|
<wt:display field="Entity.MaterialSpec" />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@model HHWMS.Web.TaskDetailVM
|
@model HHWMS.Web.TaskDetailVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
@@ -6,7 +6,6 @@
|
|||||||
<wt:display field="Entity.TaskHeader.TaskNo" />
|
<wt:display field="Entity.TaskHeader.TaskNo" />
|
||||||
<wt:display field="Entity.OrderCode" />
|
<wt:display field="Entity.OrderCode" />
|
||||||
<wt:display field="Entity.OrderDetailId" />
|
<wt:display field="Entity.OrderDetailId" />
|
||||||
<wt:display field="Entity.UniqueCode" />
|
|
||||||
<wt:display field="Entity.MaterialCode" />
|
<wt:display field="Entity.MaterialCode" />
|
||||||
<wt:display field="Entity.MaterialName" />
|
<wt:display field="Entity.MaterialName" />
|
||||||
<wt:display field="Entity.MaterialSpec" />
|
<wt:display field="Entity.MaterialSpec" />
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
@model HHWMS.Web.TaskDetailVM
|
@model HHWMS.Web.TaskDetailVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:combobox field="Entity.TaskHeaderId" items="AllTaskHeaders"/>
|
<wt:combobox field="Entity.HeaderId" items="AllTaskHeaders" />
|
||||||
<wt:textbox field="Entity.OrderCode" />
|
<wt:textbox field="Entity.OrderCode" />
|
||||||
<wt:textbox field="Entity.OrderDetailId" />
|
<wt:textbox field="Entity.OrderDetailId" />
|
||||||
<wt:textbox field="Entity.UniqueCode" />
|
|
||||||
<wt:textbox field="Entity.MaterialCode" />
|
<wt:textbox field="Entity.MaterialCode" />
|
||||||
<wt:textbox field="Entity.MaterialName" />
|
<wt:textbox field="Entity.MaterialName" />
|
||||||
<wt:textbox field="Entity.MaterialSpec" />
|
<wt:textbox field="Entity.MaterialSpec" />
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@model HHWMS.Web.TaskDetailHistoryVM
|
@model HHWMS.Web.TaskDetailHistoryVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:combobox field="Entity.TaskHeaderId" items="AllTaskHeaders"/>
|
<wt:combobox field="Entity.HeaderId" items="AllTaskHeaders" />
|
||||||
<wt:textbox field="Entity.OrderCode" />
|
<wt:textbox field="Entity.OrderCode" />
|
||||||
<wt:textbox field="Entity.OrderDetailId" />
|
<wt:textbox field="Entity.OrderDetailId" />
|
||||||
<wt:textbox field="Entity.MaterialCode" />
|
<wt:textbox field="Entity.MaterialCode" />
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
@model HHWMS.Web.TaskDetailHistoryVM
|
@model HHWMS.Web.TaskDetailHistoryVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:quote>@Localizer["Sys.DeleteConfirm"]</wt:quote>
|
<wt:quote>@Localizer["Sys.DeleteConfirm"]</wt:quote>
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:display field="Entity.TaskHeader.TaskNo" />
|
<wt:display field="Entity.HeaderId" />
|
||||||
<wt:display field="Entity.OrderCode" />
|
<wt:display field="Entity.OrderCode" />
|
||||||
<wt:display field="Entity.OrderDetailId" />
|
<wt:display field="Entity.OrderDetailId" />
|
||||||
<wt:display field="Entity.MaterialCode" />
|
<wt:display field="Entity.MaterialCode" />
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@model HHWMS.Web.TaskDetailHistoryVM
|
@model HHWMS.Web.TaskDetailHistoryVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:display field="Entity.TaskHeader.TaskNo" />
|
<wt:display field="Entity.HeaderId" />
|
||||||
<wt:display field="Entity.OrderCode" />
|
<wt:display field="Entity.OrderCode" />
|
||||||
<wt:display field="Entity.OrderDetailId" />
|
<wt:display field="Entity.OrderDetailId" />
|
||||||
<wt:display field="Entity.MaterialCode" />
|
<wt:display field="Entity.MaterialCode" />
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@model HHWMS.Web.TaskDetailHistoryVM
|
@model HHWMS.Web.TaskDetailHistoryVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
<wt:combobox field="Entity.TaskHeaderId" items="AllTaskHeaders"/>
|
<wt:combobox field="Entity.HeaderId" items="AllTaskHeaders" />
|
||||||
<wt:textbox field="Entity.OrderCode" />
|
<wt:textbox field="Entity.OrderCode" />
|
||||||
<wt:textbox field="Entity.OrderDetailId" />
|
<wt:textbox field="Entity.OrderDetailId" />
|
||||||
<wt:textbox field="Entity.MaterialCode" />
|
<wt:textbox field="Entity.MaterialCode" />
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
// WTM默认页面 Wtm buidin page
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using HHWMS.Web;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using WalkingTec.Mvvm.Core;
|
||||||
|
using WalkingTec.Mvvm.Core.Extensions;
|
||||||
|
|
||||||
|
namespace WalkingTec.Mvvm.Mvc.Admin.Controllers
|
||||||
|
{
|
||||||
|
[Area("_Admin")]
|
||||||
|
[ActionDescription("MenuKey.InterfaceLog")]
|
||||||
|
public class InterfaceLogController : BaseController
|
||||||
|
{
|
||||||
|
[ActionDescription("Sys.Search")]
|
||||||
|
public IActionResult Index()
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<InterfaceLogListVM>();
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ActionDescription("Sys.Search")]
|
||||||
|
[HttpPost]
|
||||||
|
public string Search(InterfaceLogSearcher searcher)
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<InterfaceLogListVM>(passInit:true);
|
||||||
|
if (ModelState.IsValid)
|
||||||
|
{
|
||||||
|
vm.Searcher = searcher;
|
||||||
|
return vm.GetJson(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return vm.GetError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[ActionDescription("Sys.Details")]
|
||||||
|
public IActionResult Details(string id)
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<InterfaceLogVM>(id);
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ActionDescription("Sys.Export")]
|
||||||
|
[HttpPost]
|
||||||
|
public IActionResult ExportExcel(InterfaceLogListVM vm)
|
||||||
|
{
|
||||||
|
return vm.GetExportData();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[ActionDescription("Sys.BatchDelete")]
|
||||||
|
public ActionResult BatchDelete(string[] IDs)
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<InterfaceLogBatchVM>(Ids: IDs);
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[ActionDescription("Sys.BatchDelete")]
|
||||||
|
public ActionResult DoBatchDelete(InterfaceLogBatchVM vm, IFormCollection nouse)
|
||||||
|
{
|
||||||
|
if (!ModelState.IsValid || !vm.DoBatchDelete())
|
||||||
|
{
|
||||||
|
return PartialView("BatchDelete", vm);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchDeleteSuccess", vm.Ids.Length]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using HHWMS.Web;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using WalkingTec.Mvvm.Core;
|
||||||
|
using WalkingTec.Mvvm.Core.Extensions;
|
||||||
|
|
||||||
|
namespace WalkingTec.Mvvm.Mvc.Admin.Controllers
|
||||||
|
{
|
||||||
|
[Area("_Admin")]
|
||||||
|
[ActionDescription("MenuKey.JobLog")]
|
||||||
|
public class JobLogController : BaseController
|
||||||
|
{
|
||||||
|
[ActionDescription("Sys.Search")]
|
||||||
|
public IActionResult Index()
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<JobLogListVM>();
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ActionDescription("Sys.Search")]
|
||||||
|
[HttpPost]
|
||||||
|
public string Search(JobLogSearcher searcher)
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<JobLogListVM>(passInit:true);
|
||||||
|
if (ModelState.IsValid)
|
||||||
|
{
|
||||||
|
vm.Searcher = searcher;
|
||||||
|
return vm.GetJson(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return vm.GetError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[ActionDescription("Sys.Details")]
|
||||||
|
public IActionResult Details(string id)
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<JobLogVM>(id);
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ActionDescription("Sys.Export")]
|
||||||
|
[HttpPost]
|
||||||
|
public IActionResult ExportExcel(JobLogListVM vm)
|
||||||
|
{
|
||||||
|
return vm.GetExportData();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[ActionDescription("Sys.BatchDelete")]
|
||||||
|
public ActionResult BatchDelete(string[] IDs)
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<JobLogBatchVM>(Ids: IDs);
|
||||||
|
return PartialView(vm);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[ActionDescription("Sys.BatchDelete")]
|
||||||
|
public ActionResult DoBatchDelete(JobLogBatchVM vm, IFormCollection nouse)
|
||||||
|
{
|
||||||
|
if (!ModelState.IsValid || !vm.DoBatchDelete())
|
||||||
|
{
|
||||||
|
return PartialView("BatchDelete", vm);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return FFResult().CloseDialog().RefreshGrid().Alert(Localizer["Sys.BatchDeleteSuccess", vm.Ids.Length]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
namespace HHWMS.Web
|
||||||
|
{
|
||||||
|
public partial class InterfaceLogBatchVM : BaseBatchVM<InterfaceLog, InterfaceLog_BatchEdit>
|
||||||
|
{
|
||||||
|
public InterfaceLogBatchVM()
|
||||||
|
{
|
||||||
|
ListVM = new InterfaceLogListVM();
|
||||||
|
LinkedVM = new InterfaceLog_BatchEdit();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Class to define batch edit fields
|
||||||
|
/// </summary>
|
||||||
|
public class InterfaceLog_BatchEdit : BaseVM
|
||||||
|
{
|
||||||
|
|
||||||
|
protected override void InitVM()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
namespace HHWMS.Web
|
||||||
|
{
|
||||||
|
public partial class InterfaceLogTemplateVM : BaseTemplateVM
|
||||||
|
{
|
||||||
|
|
||||||
|
protected override void InitVM()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class InterfaceLogImportVM : BaseImportVM<InterfaceLogTemplateVM, InterfaceLog>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
namespace HHWMS.Web
|
||||||
|
{
|
||||||
|
public partial class InterfaceLogListVM : BasePagedListVM<InterfaceLog_View, InterfaceLogSearcher>
|
||||||
|
{
|
||||||
|
protected override List<GridAction> InitGridAction()
|
||||||
|
{
|
||||||
|
return new List<GridAction>
|
||||||
|
{
|
||||||
|
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"_Admin", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "_Admin", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "_Admin", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "_Admin", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "_Admin", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "_Admin", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "_Admin", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("InterfaceLog", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "_Admin"),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected override IEnumerable<IGridColumn<InterfaceLog_View>> InitGridHeader()
|
||||||
|
{
|
||||||
|
return new List<GridColumn<InterfaceLog_View>>{
|
||||||
|
this.MakeGridHeader(x => x.ModuleName),
|
||||||
|
this.MakeGridHeader(x => x.ActionName),
|
||||||
|
this.MakeGridHeader(x => x.ITCode),
|
||||||
|
this.MakeGridHeader(x => x.ActionUrl),
|
||||||
|
this.MakeGridHeader(x => x.ActionTime),
|
||||||
|
this.MakeGridHeader(x => x.Duration),
|
||||||
|
this.MakeGridHeader(x => x.Remark),
|
||||||
|
this.MakeGridHeader(x => x.IP),
|
||||||
|
this.MakeGridHeader(x => x.LogType),
|
||||||
|
this.MakeGridHeader(x => x.TenantCode),
|
||||||
|
this.MakeGridHeader(x => x.Request),
|
||||||
|
this.MakeGridHeader(x => x.Result),
|
||||||
|
this.MakeGridHeaderAction(width: 200)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IOrderedQueryable<InterfaceLog_View> GetSearchQuery()
|
||||||
|
{
|
||||||
|
var query = DC.Set<InterfaceLog>()
|
||||||
|
.CheckContain(Searcher.ModuleName, x=>x.ModuleName)
|
||||||
|
.CheckContain(Searcher.ActionName, x=>x.ActionName)
|
||||||
|
.CheckContain(Searcher.ITCode, x=>x.ITCode)
|
||||||
|
.CheckContain(Searcher.ActionUrl, x=>x.ActionUrl)
|
||||||
|
.CheckBetween(Searcher.ActionTime?.GetStartTime(), Searcher.ActionTime?.GetEndTime(), x => x.ActionTime, includeMax: false)
|
||||||
|
.CheckContain(Searcher.IP, x=>x.IP)
|
||||||
|
.CheckEqual(Searcher.LogType, x=>x.LogType)
|
||||||
|
.CheckContain(Searcher.Request, x=>x.Request)
|
||||||
|
.CheckContain(Searcher.Result, x=>x.Result)
|
||||||
|
.Select(x => new InterfaceLog_View
|
||||||
|
{
|
||||||
|
ID = x.ID,
|
||||||
|
ModuleName = x.ModuleName,
|
||||||
|
ActionName = x.ActionName,
|
||||||
|
ITCode = x.ITCode,
|
||||||
|
ActionUrl = x.ActionUrl,
|
||||||
|
ActionTime = x.ActionTime,
|
||||||
|
Duration = x.Duration,
|
||||||
|
Remark = x.Remark,
|
||||||
|
IP = x.IP,
|
||||||
|
LogType = x.LogType,
|
||||||
|
TenantCode = x.TenantCode,
|
||||||
|
Request = x.Request,
|
||||||
|
Result = x.Result,
|
||||||
|
})
|
||||||
|
.OrderBy(x => x.ID);
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class InterfaceLog_View : InterfaceLog
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
namespace HHWMS.Web
|
||||||
|
{
|
||||||
|
public partial class InterfaceLogSearcher : BaseSearcher
|
||||||
|
{
|
||||||
|
[Display(Name = "_Admin.Module")]
|
||||||
|
public String ModuleName { get; set; }
|
||||||
|
[Display(Name = "_Admin.Action")]
|
||||||
|
public String ActionName { get; set; }
|
||||||
|
[Display(Name = "_Admin.Account")]
|
||||||
|
public String ITCode { get; set; }
|
||||||
|
[Display(Name = "Url")]
|
||||||
|
public String ActionUrl { get; set; }
|
||||||
|
[Display(Name = "_Admin.ActionTime")]
|
||||||
|
public DateRange ActionTime { get; set; }
|
||||||
|
[Display(Name = "IP")]
|
||||||
|
public String IP { get; set; }
|
||||||
|
[Display(Name = "_Admin.LogType")]
|
||||||
|
public ActionLogTypesEnum? LogType { get; set; }
|
||||||
|
[Display(Name = "_Admin.Request")]
|
||||||
|
public String Request { get; set; }
|
||||||
|
[Display(Name = "_Admin.Response")]
|
||||||
|
public String Result { get; set; }
|
||||||
|
|
||||||
|
protected override void InitVM()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
namespace HHWMS.Web
|
||||||
|
{
|
||||||
|
public partial class InterfaceLogVM : BaseCRUDVM<InterfaceLog>
|
||||||
|
{
|
||||||
|
|
||||||
|
public InterfaceLogVM()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
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,34 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
namespace HHWMS.Web
|
||||||
|
{
|
||||||
|
public partial class JobLogBatchVM : BaseBatchVM<JobLog, JobLog_BatchEdit>
|
||||||
|
{
|
||||||
|
public JobLogBatchVM()
|
||||||
|
{
|
||||||
|
ListVM = new JobLogListVM();
|
||||||
|
LinkedVM = new JobLog_BatchEdit();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Class to define batch edit fields
|
||||||
|
/// </summary>
|
||||||
|
public class JobLog_BatchEdit : BaseVM
|
||||||
|
{
|
||||||
|
|
||||||
|
protected override void InitVM()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
namespace HHWMS.Web
|
||||||
|
{
|
||||||
|
public partial class JobLogTemplateVM : BaseTemplateVM
|
||||||
|
{
|
||||||
|
protected override void InitVM()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class JobLogImportVM : BaseImportVM<JobLogTemplateVM, JobLog>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
namespace HHWMS.Web
|
||||||
|
{
|
||||||
|
public partial class JobLogListVM : BasePagedListVM<JobLog_View, JobLogSearcher>
|
||||||
|
{
|
||||||
|
protected override List<GridAction> InitGridAction()
|
||||||
|
{
|
||||||
|
return new List<GridAction>
|
||||||
|
{
|
||||||
|
this.MakeStandardAction("JobLog", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"_Admin", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("JobLog", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "_Admin", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("JobLog", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "_Admin", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("JobLog", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "_Admin", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("JobLog", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "_Admin", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("JobLog", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "_Admin", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("JobLog", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "_Admin", dialogWidth: 800),
|
||||||
|
this.MakeStandardAction("JobLog", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "_Admin"),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected override IEnumerable<IGridColumn<JobLog_View>> InitGridHeader()
|
||||||
|
{
|
||||||
|
return new List<GridColumn<JobLog_View>>{
|
||||||
|
this.MakeGridHeader(x => x.ModuleName),
|
||||||
|
this.MakeGridHeader(x => x.ActionName),
|
||||||
|
this.MakeGridHeader(x => x.ITCode),
|
||||||
|
this.MakeGridHeader(x => x.ActionUrl),
|
||||||
|
this.MakeGridHeader(x => x.ActionTime),
|
||||||
|
this.MakeGridHeader(x => x.Duration),
|
||||||
|
this.MakeGridHeader(x => x.Remark),
|
||||||
|
this.MakeGridHeader(x => x.IP),
|
||||||
|
this.MakeGridHeader(x => x.LogType),
|
||||||
|
this.MakeGridHeader(x => x.TenantCode),
|
||||||
|
this.MakeGridHeader(x => x.Request),
|
||||||
|
this.MakeGridHeader(x => x.Result),
|
||||||
|
this.MakeGridHeaderAction(width: 200)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IOrderedQueryable<JobLog_View> GetSearchQuery()
|
||||||
|
{
|
||||||
|
var query = DC.Set<JobLog>()
|
||||||
|
.CheckContain(Searcher.ModuleName, x=>x.ModuleName)
|
||||||
|
.CheckContain(Searcher.ActionName, x=>x.ActionName)
|
||||||
|
.CheckContain(Searcher.ITCode, x=>x.ITCode)
|
||||||
|
.CheckContain(Searcher.ActionUrl, x=>x.ActionUrl)
|
||||||
|
.CheckBetween(Searcher.ActionTime?.GetStartTime(), Searcher.ActionTime?.GetEndTime(), x => x.ActionTime, includeMax: false)
|
||||||
|
.Select(x => new JobLog_View
|
||||||
|
{
|
||||||
|
ID = x.ID,
|
||||||
|
ModuleName = x.ModuleName,
|
||||||
|
ActionName = x.ActionName,
|
||||||
|
ITCode = x.ITCode,
|
||||||
|
ActionUrl = x.ActionUrl,
|
||||||
|
ActionTime = x.ActionTime,
|
||||||
|
Duration = x.Duration,
|
||||||
|
Remark = x.Remark,
|
||||||
|
IP = x.IP,
|
||||||
|
LogType = x.LogType,
|
||||||
|
TenantCode = x.TenantCode,
|
||||||
|
Request = x.Request,
|
||||||
|
Result = x.Result,
|
||||||
|
})
|
||||||
|
.OrderBy(x => x.ID);
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class JobLog_View : JobLog
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
namespace HHWMS.Web
|
||||||
|
{
|
||||||
|
public partial class JobLogSearcher : BaseSearcher
|
||||||
|
{
|
||||||
|
[Display(Name = "_Admin.Module")]
|
||||||
|
public String ModuleName { get; set; }
|
||||||
|
[Display(Name = "_Admin.Action")]
|
||||||
|
public String ActionName { get; set; }
|
||||||
|
[Display(Name = "_Admin.Account")]
|
||||||
|
public String ITCode { get; set; }
|
||||||
|
[Display(Name = "Url")]
|
||||||
|
public String ActionUrl { get; set; }
|
||||||
|
[Display(Name = "_Admin.ActionTime")]
|
||||||
|
public DateRange ActionTime { get; set; }
|
||||||
|
|
||||||
|
protected override void InitVM()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
namespace HHWMS.Web
|
||||||
|
{
|
||||||
|
public partial class JobLogVM : BaseCRUDVM<JobLog>
|
||||||
|
{
|
||||||
|
|
||||||
|
public JobLogVM()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
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,12 @@
|
|||||||
|
@model HHWMS.Web.InterfaceLogBatchVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:quote>@Localizer["Sys.BatchDeleteConfirm"]</wt:quote>
|
||||||
|
<wt:hidden field="Ids" />
|
||||||
|
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
@model HHWMS.Web.InterfaceLogBatchVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<div style="margin-bottom:10px">@Localizer["Sys.BatchEditConfirm"] </div>
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
|
</wt:row>
|
||||||
|
<wt:hidden field="Ids" />
|
||||||
|
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton />
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
@model HHWMS.Web.InterfaceLogVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
|
</wt:row>
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton />
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
@model HHWMS.Web.InterfaceLogVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:quote>@Localizer["Sys.DeleteConfirm"]</wt:quote>
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
|
</wt:row>
|
||||||
|
<wt:hidden field="Entity.ID" />
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
@model HHWMS.Web.InterfaceLogVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
|
</wt:row>
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
@model HHWMS.Web.InterfaceLogVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
|
</wt:row>
|
||||||
|
<wt:hidden field="Entity.ID" />
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton />
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
@model HHWMS.Web.InterfaceLogImportVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:downloadTemplateButton vm="@Model" />
|
||||||
|
</wt:row>
|
||||||
|
<wt:upload field="UploadFileId" label-text="@Model.Localizer["Sys.UploadTemplate"]" upload-type="ExcelFile" />
|
||||||
|
<wt:grid vm="ErrorListVM" use-local-data="true" hidden-checkbox="true" hidden-grid-index="true" hidden-panel="true" height="300"/>
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton />
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
@model HHWMS.Web.InterfaceLogListVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:searchpanel vm="@Model" reset-btn="true">
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
||||||
|
<wt:textbox field="Searcher.ModuleName" />
|
||||||
|
<wt:textbox field="Searcher.ActionName" />
|
||||||
|
<wt:textbox field="Searcher.ITCode" />
|
||||||
|
<wt:textbox field="Searcher.ActionUrl" />
|
||||||
|
<wt:datetime field="Searcher.ActionTime" range="true" />
|
||||||
|
<wt:textbox field="Searcher.IP" />
|
||||||
|
<wt:combobox field="Searcher.LogType" empty-text="@Localizer["Sys.All"]" />
|
||||||
|
<wt:textbox field="Searcher.Request" />
|
||||||
|
<wt:textbox field="Searcher.Result" />
|
||||||
|
</wt:row>
|
||||||
|
</wt:searchpanel>
|
||||||
|
<wt:grid vm="@Model" url="/_Admin/InterfaceLog/Search"/>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
@model HHWMS.Web.JobLogBatchVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:quote>@Localizer["Sys.BatchDeleteConfirm"]</wt:quote>
|
||||||
|
<wt:hidden field="Ids" />
|
||||||
|
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
@model HHWMS.Web.JobLogBatchVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<div style="margin-bottom:10px">@Localizer["Sys.BatchEditConfirm"] </div>
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
|
</wt:row>
|
||||||
|
<wt:hidden field="Ids" />
|
||||||
|
<wt:grid vm="ListVM" use-local-data="true" height="300" hidden-checkbox="true" hidden-panel="true"/>
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton />
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
@model HHWMS.Web.JobLogVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
|
</wt:row>
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton />
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
@model HHWMS.Web.JobLogVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:quote>@Localizer["Sys.DeleteConfirm"]</wt:quote>
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
|
</wt:row>
|
||||||
|
<wt:hidden field="Entity.ID" />
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton theme=" ButtonThemeEnum.Warm" text="@Localizer["Sys.Delete"]"/>
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
@model HHWMS.Web.JobLogVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
|
</wt:row>
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
@model HHWMS.Web.JobLogVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
|
</wt:row>
|
||||||
|
<wt:hidden field="Entity.ID" />
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton />
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
@model HHWMS.Web.JobLogImportVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:form vm="@Model">
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:downloadTemplateButton vm="@Model" />
|
||||||
|
</wt:row>
|
||||||
|
<wt:upload field="UploadFileId" label-text="@Model.Localizer["Sys.UploadTemplate"]" upload-type="ExcelFile" />
|
||||||
|
<wt:grid vm="ErrorListVM" use-local-data="true" hidden-checkbox="true" hidden-grid-index="true" hidden-panel="true" height="300"/>
|
||||||
|
<wt:row align="AlignEnum.Right">
|
||||||
|
<wt:submitbutton />
|
||||||
|
<wt:closebutton />
|
||||||
|
</wt:row>
|
||||||
|
</wt:form>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
@model HHWMS.Web.JobLogListVM
|
||||||
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
|
<wt:searchpanel vm="@Model" reset-btn="true">
|
||||||
|
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
||||||
|
<wt:textbox field="Searcher.ModuleName" />
|
||||||
|
<wt:textbox field="Searcher.ActionName" />
|
||||||
|
<wt:textbox field="Searcher.ITCode" />
|
||||||
|
<wt:textbox field="Searcher.ActionUrl" />
|
||||||
|
<wt:datetime field="Searcher.ActionTime" range="true" />
|
||||||
|
</wt:row>
|
||||||
|
</wt:searchpanel>
|
||||||
|
<wt:grid vm="@Model" url="/_Admin/JobLog/Search"/>
|
||||||
Loaded 100 of 125 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user