任务添加zoneid

添加物料打印
添加物料工序
添加库存出库
修改状态返回接口
wcs请求添加 重量和入口
This commit is contained in:
zhougf committed 2025-07-09 01:11:10 +08:00
1 parent 42c26b2800
commit b12ed2d5e5
54 files changed
+1442 -393

No files matched your search

@@ -269,7 +269,8 @@ namespace HHWMS.Web.Controllers
RowFlag = (vm.RoadwayType == 1 || vm.RoadwayType == 2 ? RowFlagEnum.Outer : (row == 1 || row == 4 ? RowFlagEnum.Inner : RowFlagEnum.Outer)),
ContiguousCode = vm.RoadwayType == 4 ? $"{vm.Entity.Type}{vm.Entity.RoadWay.ToString().PadLeft(2, '0')}-{(row % 2 == 0?row-1:row+1) .ToString().PadLeft(2, '0')}-{line.ToString().PadLeft(2, '0')}-{layer.ToString().PadLeft(2, '0')}" : null,
IsStop = false,
Status = LocationStatusEnum.Empty,
Status = LocationStatusEnum.未锁,
ContainerStatus = LocationStatus.空仓位,
Length = vm.Entity.Length,
Width = vm.Entity.Width,
Height = vm.Entity.Height
@@ -224,5 +224,12 @@ namespace HHWMS.Web.Controllers
}
#endregion
[HttpGet]
public IActionResult GetUniqueCode()
{
var sn = _unitWork.GetSerialNumber("M", 6);
return Json(sn);
}
}
}
@@ -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 MaterialProcessController : BaseController
{
private readonly IUnitWork _unitWork;
public MaterialProcessController(IUnitWork unitWork)
{
_unitWork = unitWork;
}
#region Search
[ActionDescription("Sys.Search")]
public ActionResult Index()
{
var vm = Wtm.CreateVM<MaterialProcessListVM>();
return PartialView(vm);
}
[ActionDescription("Sys.Search")]
[HttpPost]
public string Search(MaterialProcessSearcher searcher)
{
var vm = Wtm.CreateVM<MaterialProcessListVM>(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<MaterialProcessVM>();
return PartialView(vm);
}
[HttpPost]
[ActionDescription("Sys.Create")]
public ActionResult Create(MaterialProcessVM 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<MaterialProcessVM>(id);
return PartialView(vm);
}
[ActionDescription("Sys.Edit")]
[HttpPost]
[ValidateFormItemOnly]
public ActionResult Edit(MaterialProcessVM 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<MaterialProcessVM>(id);
return PartialView(vm);
}
[ActionDescription("Sys.Delete")]
[HttpPost]
public ActionResult Delete(string id, IFormCollection nouse)
{
var vm = Wtm.CreateVM<MaterialProcessVM>(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<MaterialProcessVM>(id);
return PartialView(vm);
}
#endregion
#region BatchEdit
[HttpPost]
[ActionDescription("Sys.BatchEdit")]
public ActionResult BatchEdit(string[] IDs)
{
var vm = Wtm.CreateVM<MaterialProcessBatchVM>(Ids: IDs);
return PartialView(vm);
}
[HttpPost]
[ActionDescription("Sys.BatchEdit")]
public ActionResult DoBatchEdit(MaterialProcessBatchVM 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<MaterialProcessBatchVM>(Ids: IDs);
return PartialView(vm);
}
[HttpPost]
[ActionDescription("Sys.BatchDelete")]
public ActionResult DoBatchDelete(MaterialProcessBatchVM 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<MaterialProcessImportVM>();
return PartialView(vm);
}
[HttpPost]
[ActionDescription("Sys.Import")]
public ActionResult Import(MaterialProcessImportVM 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(MaterialProcessListVM vm)
{
return vm.GetExportData();
}
#endregion
}
}
@@ -14,7 +14,7 @@ namespace HHWMS.Web
public partial class LocationVM : BaseCRUDVM<Location>
{
public List<ComboSelectListItem> AllLocationZones { get; set; }
[Display(Name = "Location.BeginLine", Description = "起始列")]
public short BeginLine { get; set; }
@@ -24,6 +24,7 @@ namespace HHWMS.Web
[Display(Name = "Location.RoadwayType", Description = "巷道类型")]
[Required(ErrorMessage = "Validate.{0}required")]
public short RoadwayType { get; set; }
public List<ComboSelectListItem> RoadwayTypes { get; set; }
@@ -35,7 +36,7 @@ namespace HHWMS.Web
protected override void InitVM()
{
AllLocationZones = DC.Set<LocationZone>().GetSelectListItems(Wtm, y => y.Name);
var currentCulture = Wtm.CurrentCulture;
var dictData = DC.Set<SysDictData>().ToList();
RoadwayTypes = dictData.Where(x => x.DictType == "RoadwayType").Select(x => new ComboSelectListItem
@@ -43,13 +44,12 @@ namespace HHWMS.Web
Text = currentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
Value = x.DictValue
}).ToList();
}
#region base
public override void DoAdd()
{
{
base.DoAdd();
}
@@ -62,18 +62,20 @@ namespace HHWMS.Web
{
base.DoDelete();
}
#endregion base
/// <summary>
/// 查找单伸位巷道的空仓位
/// </summary>
private string GetEmptyLocationBySingle(int? roadway)
{
var locations = DC.Set<Location>()
.Where(l => l.RoadWay == roadway
.Where(l => l.RoadWay == roadway
&& !l.IsStop
&& l.Status == LocationStatusEnum.Empty
&& l.RowFlag == 0) // 单伸位只查找外仓位
&& l.Status == LocationStatusEnum.未锁
&& l.ContainerStatus == LocationStatus.空仓位
&& l.RowFlag == 0) // 单伸位只查找外仓位
.OrderBy(l => l.Layer)
.ThenBy(l => l.Line)
.AsNoTracking()
@@ -85,7 +87,7 @@ namespace HHWMS.Web
/// <summary>
/// 查找双伸位巷道的空仓位
/// </summary>
private string GetEmptyLocationByDouble(int roadway,LocationTypeEnum locationType, decimal? height = 0)
private string GetEmptyLocationByDouble(int roadway, LocationTypeEnum locationType, decimal? height = 0)
{
// 一次性获取所需的所有数据,避免多次查询数据库
var locationPairs = DC.Set<Location>()
@@ -93,11 +95,12 @@ namespace HHWMS.Web
&& l.Type == locationType
&& !l.IsStop
&& l.Height >= height)
.Select(l => new
.Select(l => new
{
l.Code,
l.ContiguousCode,
l.Status,
l.ContainerStatus,
l.RowFlag,
l.Height,
l.Layer,
@@ -108,10 +111,12 @@ namespace HHWMS.Web
// 1. 优先查找里外仓位都为空的里仓位
var emptyInnerLocation = locationPairs.Values
.Where(l => l.RowFlag == RowFlagEnum.Inner
&& l.Status == LocationStatusEnum.Empty
&& locationPairs.TryGetValue(l.ContiguousCode, out var outer)
&& outer.Status == LocationStatusEnum.Empty)
.Where(l => l.RowFlag == RowFlagEnum.Inner
&& l.Status == LocationStatusEnum.未锁
&& l.ContainerStatus == LocationStatus.空仓位
&& locationPairs.TryGetValue(l.ContiguousCode, out var outer)
&& outer.Status == LocationStatusEnum.未锁
&& outer.ContainerStatus == LocationStatus.空仓位)
.OrderBy(l => l.Height)
.ThenBy(l => l.Layer)
.ThenBy(l => l.Line)
@@ -124,10 +129,12 @@ namespace HHWMS.Web
// 2. 查找里仓位有货,外仓位为空的外仓位
var availableOuterLocation = locationPairs.Values
.Where(l => l.RowFlag == 0
&& l.Status == LocationStatusEnum.Empty
&& locationPairs.TryGetValue(l.ContiguousCode, out var inner)
&& inner.Status == LocationStatusEnum.Some)
.Where(l => l.RowFlag == 0
&& l.Status == LocationStatusEnum.未锁
&& l.ContainerStatus == LocationStatus.空仓位
&& locationPairs.TryGetValue(l.ContiguousCode, out var inner)
&& inner.Status == LocationStatusEnum.未锁
&& inner.ContainerStatus == LocationStatus.有货)
.OrderBy(l => l.Height)
.ThenBy(l => l.Layer)
.ThenBy(l => l.Line)
@@ -161,7 +168,8 @@ namespace HHWMS.Web
locationCode = GetEmptyLocationBySingle(request.RoadWay.Value);
break;
case 4: // 双伸位
locationCode = GetEmptyLocationByDouble(request.RoadWay.Value, request.LocationType, request.Height);
locationCode =
GetEmptyLocationByDouble(request.RoadWay.Value, request.LocationType, request.Height);
break;
default:
return ResponseResult<dynamic>.Error("未知的巷道类型");
@@ -175,6 +183,40 @@ namespace HHWMS.Web
return ResponseResult<dynamic>.Success(new { LocationCode = locationCode });
}
/// <summary>
/// 线边库查找空仓位
/// </summary>
public string GetEmptyLocationFromXb(int beginLine, int endLine)
{
var location = DC.Set<Location>()
.Where(l => l.Type == LocationTypeEnum.X
&& !l.IsStop
&& l.Status == LocationStatusEnum.未锁
&& l.ContainerStatus == LocationStatus.空仓位
&& l.RowFlag == 0
&& (l.Line >= beginLine && l.Line <= endLine)) // 单伸位只查找外仓位
.OrderBy(l => l.Layer)
.ThenBy(l => l.Line)
.AsNoTracking()
.FirstOrDefault();
// 没查找合适的就找靠近的此区域的
if (location == null)
{
location = DC.Set<Location>()
.Where(l => l.Type == LocationTypeEnum.X
&& !l.IsStop
&& l.Status == LocationStatusEnum.未锁
&& l.ContainerStatus == LocationStatus.空仓位
&& l.RowFlag == 0) // 单伸位只查找外仓位
.OrderBy(l => Math.Abs(l.Line - (endLine - beginLine) / 2))
.ThenBy(l => l.Layer)
.AsNoTracking()
.FirstOrDefault();
}
return location?.Code;
}
/// <summary>
/// 根据巷道名称获取巷道类型
/// </summary>
@@ -204,10 +246,10 @@ namespace HHWMS.Web
// 获取所有巷道配置
var roadwayConfigs = DC.Set<SysDictData>()
.Where(x => x.DictType == "RoadwayConfig")
.Select(x => new
{
Roadway = x.DictLabel,
Type = x.DictValue
.Select(x => new
{
Roadway = x.DictLabel,
Type = x.DictValue
})
.ToDictionary(x => x.Roadway, x => x.Type);
@@ -223,6 +265,7 @@ namespace HHWMS.Web
l.Code,
l.ContiguousCode,
l.Status,
l.ContainerStatus,
l.RowFlag,
l.Layer,
l.Line,
@@ -250,7 +293,9 @@ namespace HHWMS.Web
{
case "2": // 单伸位
var singleLocations = roadwayLocations
.Where(l => l.RowFlag == 0 && l.Status == LocationStatusEnum.Empty)
.Where(l => l.RowFlag == 0
&& l.Status == LocationStatusEnum.未锁
&& l.ContainerStatus == LocationStatus.空仓位)
.OrderBy(l => l.Layer)
.ThenBy(l => l.Line)
.Select(l => new
@@ -267,10 +312,12 @@ namespace HHWMS.Web
case "4": // 双伸位
// 1. 查找里外都为空的里仓位
var emptyInnerLocations = roadwayLocations
.Where(l => l.RowFlag == RowFlagEnum.Inner
&& l.Status == LocationStatusEnum.Empty
&& allLocations.TryGetValue(l.ContiguousCode, out var outer)
&& outer.Status == LocationStatusEnum.Empty)
.Where(l => l.RowFlag == RowFlagEnum.Inner
&& l.Status == LocationStatusEnum.未锁
&& l.ContainerStatus == LocationStatus.空仓位
&& allLocations.TryGetValue(l.ContiguousCode, out var outer)
&& outer.Status == LocationStatusEnum.未锁
&& outer.ContainerStatus == LocationStatus.空仓位)
.OrderBy(l => l.Layer)
.ThenBy(l => l.Line)
.Select(l => new
@@ -285,10 +332,12 @@ namespace HHWMS.Web
// 2. 查找里仓位有货,外仓位为空的外仓位
var availableOuterLocations = roadwayLocations
.Where(l => l.RowFlag == 0
&& l.Status == LocationStatusEnum.Empty
&& allLocations.TryGetValue(l.ContiguousCode, out var inner)
&& inner.Status == LocationStatusEnum.Some)
.Where(l => l.RowFlag == 0
&& l.Status == LocationStatusEnum.未锁
&& l.ContainerStatus == LocationStatus.空仓位
&& allLocations.TryGetValue(l.ContiguousCode, out var inner)
&& inner.Status == LocationStatusEnum.未锁
&& inner.ContainerStatus == LocationStatus.有货)
.OrderBy(l => l.Layer)
.ThenBy(l => l.Line)
.Select(l => new
@@ -309,8 +358,8 @@ namespace HHWMS.Web
return ResponseResult<dynamic>.Error("未找到可用的空仓位");
}
return ResponseResult<dynamic>.Success(new
{
return ResponseResult<dynamic>.Success(new
{
Locations = availableLocations,
Total = availableLocations.Count
});
@@ -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 MaterialProcessBatchVM : BaseBatchVM<MaterialProcess, MaterialProcess_BatchEdit>
{
public MaterialProcessBatchVM()
{
ListVM = new MaterialProcessListVM();
LinkedVM = new MaterialProcess_BatchEdit();
}
}
/// <summary>
/// Class to define batch edit fields
/// </summary>
public class MaterialProcess_BatchEdit : BaseVM
{
protected override void InitVM()
{
}
}
}
@@ -0,0 +1,39 @@
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 MaterialProcessTemplateVM : BaseTemplateVM
{
[Display(Name = "MaterialProcess.MaterialCode")]
public ExcelPropety MaterialCode_Excel = ExcelPropety.CreateProperty<MaterialProcess>(x => x.MaterialCode);
[Display(Name = "MaterialProcess.ProcessOrder")]
public ExcelPropety ProcessOrder_Excel = ExcelPropety.CreateProperty<MaterialProcess>(x => x.ProcessOrder);
[Display(Name = "MaterialProcess.ProcessName")]
public ExcelPropety ProcessName_Excel = ExcelPropety.CreateProperty<MaterialProcess>(x => x.ProcessName);
[Display(Name = "MaterialProcess.ProcessCode")]
public ExcelPropety ProcessCode_Excel = ExcelPropety.CreateProperty<MaterialProcess>(x => x.ProcessCode);
[Display(Name = "MaterialProcess.Description")]
public ExcelPropety Description_Excel = ExcelPropety.CreateProperty<MaterialProcess>(x => x.Description);
[Display(Name = "MaterialProcess.IsActive")]
public ExcelPropety IsActive_Excel = ExcelPropety.CreateProperty<MaterialProcess>(x => x.IsActive);
protected override void InitVM()
{
}
}
public class MaterialProcessImportVM : BaseImportVM<MaterialProcessTemplateVM, MaterialProcess>
{
}
}
@@ -0,0 +1,72 @@
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 MaterialProcessListVM : BasePagedListVM<MaterialProcess_View, MaterialProcessSearcher>
{
protected override List<GridAction> InitGridAction()
{
return new List<GridAction>
{
this.MakeStandardAction("MaterialProcess", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"configs", dialogWidth: 800),
this.MakeStandardAction("MaterialProcess", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "configs", dialogWidth: 800),
this.MakeStandardAction("MaterialProcess", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "configs", dialogWidth: 800),
this.MakeStandardAction("MaterialProcess", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "configs", dialogWidth: 800),
this.MakeStandardAction("MaterialProcess", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "configs", dialogWidth: 800),
this.MakeStandardAction("MaterialProcess", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "configs", dialogWidth: 800),
this.MakeStandardAction("MaterialProcess", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "configs", dialogWidth: 800),
this.MakeStandardAction("MaterialProcess", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "configs"),
};
}
protected override IEnumerable<IGridColumn<MaterialProcess_View>> InitGridHeader()
{
return new List<GridColumn<MaterialProcess_View>>{
this.MakeGridHeader(x => x.MaterialCode),
this.MakeGridHeader(x => x.ProcessOrder),
this.MakeGridHeader(x => x.ProcessName),
this.MakeGridHeader(x => x.ProcessCode),
this.MakeGridHeader(x => x.Description),
this.MakeGridHeader(x => x.IsActive),
this.MakeGridHeaderAction(width: 200)
};
}
public override IOrderedQueryable<MaterialProcess_View> GetSearchQuery()
{
var query = DC.Set<MaterialProcess>()
.CheckContain(Searcher.MaterialCode, x=>x.MaterialCode)
.CheckEqual(Searcher.ProcessOrder, x=>x.ProcessOrder)
.CheckContain(Searcher.ProcessName, x=>x.ProcessName)
.CheckContain(Searcher.ProcessCode, x=>x.ProcessCode)
.CheckContain(Searcher.Description, x=>x.Description)
.Select(x => new MaterialProcess_View
{
ID = x.ID,
MaterialCode = x.MaterialCode,
ProcessOrder = x.ProcessOrder,
ProcessName = x.ProcessName,
ProcessCode = x.ProcessCode,
Description = x.Description,
IsActive = x.IsActive,
})
.OrderBy(x => x.ID);
return query;
}
}
public class MaterialProcess_View : MaterialProcess{
}
}
@@ -0,0 +1,31 @@
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 MaterialProcessSearcher : BaseSearcher
{
[Display(Name = "MaterialProcess.MaterialCode")]
public String MaterialCode { get; set; }
[Display(Name = "MaterialProcess.ProcessOrder")]
public Int32? ProcessOrder { get; set; }
[Display(Name = "MaterialProcess.ProcessName")]
public String ProcessName { get; set; }
[Display(Name = "MaterialProcess.ProcessCode")]
public String ProcessCode { get; set; }
[Display(Name = "MaterialProcess.Description")]
public String Description { 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 MaterialProcessVM : BaseCRUDVM<MaterialProcess>
{
public MaterialProcessVM()
{
}
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();
}
}
}
@@ -25,6 +25,8 @@ namespace HHWMS.Web
this.MakeStandardAction("Material", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "configs", dialogWidth: 800),
this.MakeStandardAction("Material", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "configs", dialogWidth: 800),
this.MakeStandardAction("Material", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "configs"),
this.MakeAction("Material","Print",Localizer["Sys.Print"],"",GridActionParameterTypesEnum.MultiIds,"configs")
.SetShowDialog(false).SetOnClickScript("print"),
};
}
@@ -12,3 +12,27 @@
</wt:row>
</wt:searchpanel>
<wt:grid vm="@Model" url="/configs/Material/Search"/>
<script>
let template =
{"panels":[{"index":0,"height":60,"width":100,"paperHeader":43.5,"paperFooter":170.07874015748033,"printElements":[{"options":{"left":22.5,"top":30,"height":22.5,"width":139.5,"title":"编码","field":"MaterialCode","testData":"code","textContentVerticalAlign":"middle"},"printElementType":{"type":"text"}},{"options":{"left":22.5,"top":73.5,"height":22.5,"width":138,"title":"图号","field":"MaterialType","testData":"tuhao","textContentVerticalAlign":"middle"},"printElementType":{"type":"text"}},{"options":{"left":22.5,"top":117,"height":22.5,"width":138,"title":"名称","field":"MaterialName","testData":"name","textContentVerticalAlign":"middle"},"printElementType":{"type":"text"}},{"options":{"left":189,"top":52.5,"height":63,"width":75,"field":"MaterialCode","testData":"code","textType":"qrcode"},"printElementType":{"type":"text"}}],"paperNumberLeft":253.5,"paperNumberTop":148.5,"paperNumberDisabled":true}]}
let printData = [];
function print(ids, datas) {
datas.forEach(function (value, index, arr) {
printData.push({
MaterialCode: value.MaterialCode,
MaterialType: value.MaterialType,
MaterialName: value.MaterialName,
})
});
hiprint.init();
var hiprintTemplate = new hiprint.PrintTemplate({
template: template
});
hiprintTemplate.print(printData);
printData = [];
}
</script>
@@ -0,0 +1,12 @@
@model HHWMS.Web.MaterialProcessBatchVM
@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.MaterialProcessBatchVM
@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,17 @@
@model HHWMS.Web.MaterialProcessVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:row items-per-row="ItemsPerRowEnum.Two">
<wt:textbox field="Entity.MaterialCode" />
<wt:textbox field="Entity.ProcessOrder" />
<wt:textbox field="Entity.ProcessName" />
<wt:textbox field="Entity.ProcessCode" />
<wt:textbox field="Entity.Description" />
<wt:switch field="Entity.IsActive" />
</wt:row>
<wt:row align="AlignEnum.Right">
<wt:submitbutton />
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,19 @@
@model HHWMS.Web.MaterialProcessVM
@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.MaterialCode" />
<wt:display field="Entity.ProcessOrder" />
<wt:display field="Entity.ProcessName" />
<wt:display field="Entity.ProcessCode" />
<wt:display field="Entity.Description" />
<wt:display field="Entity.IsActive" />
</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,16 @@
@model HHWMS.Web.MaterialProcessVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:row items-per-row="ItemsPerRowEnum.Two">
<wt:display field="Entity.MaterialCode" />
<wt:display field="Entity.ProcessOrder" />
<wt:display field="Entity.ProcessName" />
<wt:display field="Entity.ProcessCode" />
<wt:display field="Entity.Description" />
<wt:display field="Entity.IsActive" />
</wt:row>
<wt:row align="AlignEnum.Right">
<wt:closebutton />
</wt:row>
</wt:form>
@@ -0,0 +1,18 @@
@model HHWMS.Web.MaterialProcessVM
@inject IStringLocalizer<Program> Localizer;
<wt:form vm="@Model">
<wt:row items-per-row="ItemsPerRowEnum.Two">
<wt:textbox field="Entity.MaterialCode" />
<wt:textbox field="Entity.ProcessOrder" />
<wt:textbox field="Entity.ProcessName" />
<wt:textbox field="Entity.ProcessCode" />
<wt:textbox field="Entity.Description" />
<wt:switch field="Entity.IsActive" />
</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.MaterialProcessImportVM
@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.MaterialProcessListVM
@inject IStringLocalizer<Program> Localizer;
<wt:searchpanel vm="@Model" reset-btn="true">
<wt:row items-per-row="ItemsPerRowEnum.Three">
<wt:textbox field="Searcher.MaterialCode" />
<wt:textbox field="Searcher.ProcessOrder" />
<wt:textbox field="Searcher.ProcessName" />
<wt:textbox field="Searcher.ProcessCode" />
<wt:textbox field="Searcher.Description" />
</wt:row>
</wt:searchpanel>
<wt:grid vm="@Model" url="/configs/MaterialProcess/Search"/>