任务明细 出库明细 库存分析 启动出库
This commit is contained in:
1 parent
eef6df7099
commit
f5423e78fe
28 files changed
+500
-77
No files matched your search
@@ -4,7 +4,7 @@
|
|||||||
<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.Code" />
|
<wt:display field="Entity.Code" />
|
||||||
<wt:display field="Entity.Type" />
|
@* <wt:display field="Entity.Type" />
|
||||||
<wt:display field="Entity.Status" />
|
<wt:display field="Entity.Status" />
|
||||||
<wt:display field="Entity.Row" />
|
<wt:display field="Entity.Row" />
|
||||||
<wt:display field="Entity.Line" />
|
<wt:display field="Entity.Line" />
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<wt:display field="Entity.Length" />
|
<wt:display field="Entity.Length" />
|
||||||
<wt:display field="Entity.Width" />
|
<wt:display field="Entity.Width" />
|
||||||
<wt:display field="Entity.Height" />
|
<wt:display field="Entity.Height" />
|
||||||
<wt:display field="Entity.ContiguousCode" />
|
<wt:display field="Entity.ContiguousCode" /> *@
|
||||||
</wt:row>
|
</wt:row>
|
||||||
|
|
||||||
<wt:grid vm="@Model.Inventorys" height="300" hidden-checkbox="true" hidden-grid-index="true" use-local-data="true" hidden-panel="true"/>
|
<wt:grid vm="@Model.Inventorys" height="300" hidden-checkbox="true" hidden-grid-index="true" use-local-data="true" hidden-panel="true"/>
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
||||||
<wt:combobox field="Searcher.ZoneCode" items="ZoneCodes" />
|
<wt:combobox field="Searcher.ZoneCode" items="ZoneCodes" />
|
||||||
<wt:textbox field="Searcher.Code" />
|
<wt:textbox field="Searcher.Code" />
|
||||||
<wt:combobox field="Searcher.Type" items="Types" />
|
@* <wt:combobox field="Searcher.Type" items="Types" />
|
||||||
<wt:combobox field="Searcher.Status" items="LocationStatus" />
|
<wt:combobox field="Searcher.Status" items="LocationStatus" />
|
||||||
<wt:textbox field="Searcher.Row" />
|
<wt:textbox field="Searcher.Row" />
|
||||||
<wt:textbox field="Searcher.Line" />
|
<wt:textbox field="Searcher.Line" />
|
||||||
<wt:textbox field="Searcher.Layer" />
|
<wt:textbox field="Searcher.Layer" />
|
||||||
<wt:textbox field="Searcher.RoadWay" />
|
<wt:textbox field="Searcher.RoadWay" />
|
||||||
<wt:textbox field="Searcher.ContainerCode" />
|
<wt:textbox field="Searcher.ContainerCode" />
|
||||||
<wt:combobox field="Searcher.IsStop" empty-text="@Localizer["Sys.All"]" />
|
<wt:combobox field="Searcher.IsStop" empty-text="@Localizer["Sys.All"]" /> *@
|
||||||
@*<wt:textbox field="Searcher.ContiguousCode" />*@
|
@*<wt:textbox field="Searcher.ContiguousCode" />*@
|
||||||
</wt:row>
|
</wt:row>
|
||||||
</wt:searchpanel>
|
</wt:searchpanel>
|
||||||
|
|||||||
@@ -8,6 +8,15 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
public partial class InventoryListVM : BasePagedListVM<Inventory_View, InventorySearcher>
|
public partial class InventoryListVM : BasePagedListVM<Inventory_View, InventorySearcher>
|
||||||
{
|
{
|
||||||
|
public List<ComboSelectListItem> ZoneCodes { get; set; }
|
||||||
|
public List<ComboSelectListItem> InventoryTaskStatus { get; set; }
|
||||||
|
|
||||||
|
protected override void InitVM()
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<InventoryVM>();
|
||||||
|
ZoneCodes = vm.ZoneCodes;
|
||||||
|
InventoryTaskStatus = vm.InventoryTaskStatus;
|
||||||
|
}
|
||||||
protected override List<GridAction> InitGridAction()
|
protected override List<GridAction> InitGridAction()
|
||||||
{
|
{
|
||||||
if (SearcherMode != ListVMSearchModeEnum.MasterDetail)
|
if (SearcherMode != ListVMSearchModeEnum.MasterDetail)
|
||||||
@@ -35,10 +44,16 @@ namespace HHWMS.Web
|
|||||||
|
|
||||||
protected override IEnumerable<IGridColumn<Inventory_View>> InitGridHeader()
|
protected override IEnumerable<IGridColumn<Inventory_View>> InitGridHeader()
|
||||||
{
|
{
|
||||||
|
InitVM();
|
||||||
if (SearcherMode != ListVMSearchModeEnum.MasterDetail)
|
if (SearcherMode != ListVMSearchModeEnum.MasterDetail)
|
||||||
{
|
{
|
||||||
return new List<GridColumn<Inventory_View>>{
|
return new List<GridColumn<Inventory_View>>{
|
||||||
this.MakeGridHeader(x => x.ZoneCode),
|
this.MakeGridHeader(x => x.ZoneCode)
|
||||||
|
.SetFormat((a, b) =>
|
||||||
|
{
|
||||||
|
var data = ZoneCodes.FirstOrDefault(x => x.Value.ToString() == a.ZoneCode);
|
||||||
|
return data?.Text ?? a.ZoneCode;
|
||||||
|
}),
|
||||||
this.MakeGridHeader(x => x.UniqueCode).SetWidth(230),
|
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),
|
||||||
@@ -59,7 +74,12 @@ namespace HHWMS.Web
|
|||||||
//this.MakeGridHeader(x => x.ReceiptCode),
|
//this.MakeGridHeader(x => x.ReceiptCode),
|
||||||
//this.MakeGridHeader(x => x.ReceiptDetailId),
|
//this.MakeGridHeader(x => x.ReceiptDetailId),
|
||||||
//this.MakeGridHeader(x => x.Status),
|
//this.MakeGridHeader(x => x.Status),
|
||||||
this.MakeGridHeader(x => x.TaskStatus),
|
this.MakeGridHeader(x => x.TaskStatus)
|
||||||
|
.SetFormat((a, b) =>
|
||||||
|
{
|
||||||
|
var data = InventoryTaskStatus.FirstOrDefault(x => x.Value.ToString() == a.TaskStatus);
|
||||||
|
return data?.Text ?? a.TaskStatus;
|
||||||
|
}),
|
||||||
this.MakeGridHeaderAction(width: 200)
|
this.MakeGridHeaderAction(width: 200)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -71,17 +91,17 @@ namespace HHWMS.Web
|
|||||||
//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),
|
||||||
this.MakeGridHeader(x => x.MaterialType),
|
//this.MakeGridHeader(x => x.MaterialType),
|
||||||
this.MakeGridHeader(x => x.MaterialName),
|
//this.MakeGridHeader(x => x.MaterialName),
|
||||||
this.MakeGridHeader(x => x.MaterialSpec),
|
//this.MakeGridHeader(x => x.MaterialSpec),
|
||||||
this.MakeGridHeader(x => x.MaterialUnit),
|
//this.MakeGridHeader(x => x.MaterialUnit),
|
||||||
this.MakeGridHeader(x => x.Batch),
|
this.MakeGridHeader(x => x.Batch),
|
||||||
this.MakeGridHeader(x => x.SupplierCode),
|
//this.MakeGridHeader(x => x.SupplierCode),
|
||||||
this.MakeGridHeader(x => x.TaskQty),
|
//this.MakeGridHeader(x => x.TaskQty),
|
||||||
this.MakeGridHeader(x => x.Qty),
|
this.MakeGridHeader(x => x.Qty),
|
||||||
this.MakeGridHeader(x => x.Status),
|
//this.MakeGridHeader(x => x.Status),
|
||||||
this.MakeGridHeader(x => x.TaskStatus),
|
this.MakeGridHeader(x => x.TaskStatus),
|
||||||
this.MakeGridHeaderAction(width: 50)
|
//this.MakeGridHeaderAction(width: 50)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
public partial class InventoryVM : BaseCRUDVM<Inventory>
|
public partial class InventoryVM : BaseCRUDVM<Inventory>
|
||||||
{
|
{
|
||||||
|
public List<ComboSelectListItem> ZoneCodes { get; set; }
|
||||||
|
public List<ComboSelectListItem> InventoryTaskStatus { get; set; }
|
||||||
|
|
||||||
public InventoryVM()
|
public InventoryVM()
|
||||||
{
|
{
|
||||||
@@ -19,6 +21,19 @@ namespace HHWMS.Web
|
|||||||
|
|
||||||
protected override void InitVM()
|
protected override void InitVM()
|
||||||
{
|
{
|
||||||
|
var CurrentCulture = Wtm.CurrentCulture;
|
||||||
|
var dictDatas = DC.Set<SysDictData>().ToList();
|
||||||
|
ZoneCodes = dictDatas.Where(x => x.DictType == "ZoneCode").Select(x => new ComboSelectListItem
|
||||||
|
{
|
||||||
|
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
|
||||||
|
Value = x.DictValue
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
InventoryTaskStatus = dictDatas.Where(x => x.DictType == "InventoryTaskStatus").Select(x => new ComboSelectListItem
|
||||||
|
{
|
||||||
|
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
|
||||||
|
Value = x.DictValue
|
||||||
|
}).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DoAdd()
|
public override void DoAdd()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@model HHWMS.Web.InventoryVM
|
@model HHWMS.Web.InventoryVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:form vm="@Model">
|
<wt:form vm="@Model">
|
||||||
|
|||||||
@@ -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:textbox field="Searcher.ZoneCode" />
|
<wt:combobox field="Searcher.ZoneCode" items="ZoneCodes" />
|
||||||
<wt:textbox field="Searcher.UniqueCode" />
|
<wt:textbox field="Searcher.UniqueCode" />
|
||||||
@*<wt:textbox field="Searcher.MaterialCode" />
|
@*<wt:textbox field="Searcher.MaterialCode" />
|
||||||
<wt:textbox field="Searcher.MaterialType" />
|
<wt:textbox field="Searcher.MaterialType" />
|
||||||
|
|||||||
@@ -241,9 +241,9 @@ namespace HHWMS.Web.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="code"></param>
|
/// <param name="code"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public ActionResult SelectReceiptDetailsByCode(string code)
|
public ActionResult SelectReceiptDetailsByCode(int id)
|
||||||
{
|
{
|
||||||
var data = _unitwork.Find<ReceiptHeader>(x => x.Code == code)
|
var data = _unitwork.Find<ReceiptHeader>(x => x.ID == id)
|
||||||
.Include(x => x.ReceiptDetails).ToList();
|
.Include(x => x.ReceiptDetails).ToList();
|
||||||
return JsonMore(data.FirstOrDefault().ReceiptDetails.Where(x => x.Status == ReceiptStatusEnum.新建));
|
return JsonMore(data.FirstOrDefault().ReceiptDetails.Where(x => x.Status == ReceiptStatusEnum.新建));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,16 +34,16 @@ namespace HHWMS.Web
|
|||||||
//this.MakeGridHeader(x => x.ZoneCode),
|
//this.MakeGridHeader(x => x.ZoneCode),
|
||||||
this.MakeGridHeader(x => x.UniqueCode).SetWidth(230),
|
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),
|
||||||
this.MakeGridHeader(x => x.MaterialSpec),
|
//this.MakeGridHeader(x => x.MaterialSpec),
|
||||||
this.MakeGridHeader(x => x.MaterialUnit),
|
//this.MakeGridHeader(x => x.MaterialUnit),
|
||||||
this.MakeGridHeader(x => x.Batch),
|
this.MakeGridHeader(x => x.Batch),
|
||||||
this.MakeGridHeader(x => x.Lot).SetHide(),
|
//this.MakeGridHeader(x => x.Lot).SetHide(),
|
||||||
//this.MakeGridHeader(x => x.ManufactureDate),
|
//this.MakeGridHeader(x => x.ManufactureDate),
|
||||||
//this.MakeGridHeader(x => x.ExpirationDate),
|
//this.MakeGridHeader(x => x.ExpirationDate),
|
||||||
//this.MakeGridHeader(x => x.CompanyCode),
|
//this.MakeGridHeader(x => x.CompanyCode),
|
||||||
this.MakeGridHeader(x => x.SupplierCode),
|
//this.MakeGridHeader(x => x.SupplierCode),
|
||||||
this.MakeGridHeader(x => x.CompletedQty),
|
this.MakeGridHeader(x => x.CompletedQty),
|
||||||
this.MakeGridHeader(x => x.Qty),
|
this.MakeGridHeader(x => x.Qty),
|
||||||
//this.MakeGridHeader(x => x.InventoryStatus),
|
//this.MakeGridHeader(x => x.InventoryStatus),
|
||||||
|
|||||||
@@ -8,11 +8,14 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
public partial class ReceiptHeaderListVM : BasePagedListVM<ReceiptHeader_View, ReceiptHeaderSearcher>
|
public partial class ReceiptHeaderListVM : BasePagedListVM<ReceiptHeader_View, ReceiptHeaderSearcher>
|
||||||
{
|
{
|
||||||
public ReceiptDetailListVM2 Details { get; set; } = new ReceiptDetailListVM2();
|
public ReceiptDetailListVM2 ReceiptDetails { get; set; } = new ReceiptDetailListVM2();
|
||||||
|
public List<ComboSelectListItem> ReceiptTypes { get; set; }
|
||||||
|
|
||||||
protected override void InitVM()
|
protected override void InitVM()
|
||||||
{
|
{
|
||||||
Details.CopyContext(this);
|
ReceiptDetails.CopyContext(this);
|
||||||
|
var vm = Wtm.CreateVM<ReceiptHeaderVM>();
|
||||||
|
ReceiptTypes = vm.ReceiptTypes;
|
||||||
}
|
}
|
||||||
protected override List<GridAction> InitGridAction()
|
protected override List<GridAction> InitGridAction()
|
||||||
{
|
{
|
||||||
@@ -34,6 +37,7 @@ namespace HHWMS.Web
|
|||||||
|
|
||||||
protected override IEnumerable<IGridColumn<ReceiptHeader_View>> InitGridHeader()
|
protected override IEnumerable<IGridColumn<ReceiptHeader_View>> InitGridHeader()
|
||||||
{
|
{
|
||||||
|
InitVM();
|
||||||
return new List<GridColumn<ReceiptHeader_View>>{
|
return new List<GridColumn<ReceiptHeader_View>>{
|
||||||
//this.MakeGridHeader(x => x.SourceCode),
|
//this.MakeGridHeader(x => x.SourceCode),
|
||||||
this.MakeGridHeader(x => x.Code).SetFormat((a,b) =>
|
this.MakeGridHeader(x => x.Code).SetFormat((a,b) =>
|
||||||
@@ -41,7 +45,12 @@ namespace HHWMS.Web
|
|||||||
string rv = UIService.MakeScriptButton(ButtonTypesEnum.Link,a.Code,$"details('{a.ID}')");
|
string rv = UIService.MakeScriptButton(ButtonTypesEnum.Link,a.Code,$"details('{a.ID}')");
|
||||||
return rv;
|
return rv;
|
||||||
}),
|
}),
|
||||||
this.MakeGridHeader(x => x.BillType),
|
this.MakeGridHeader(x => x.BillType)
|
||||||
|
.SetFormat((a, b) =>
|
||||||
|
{
|
||||||
|
var data = ReceiptTypes.FirstOrDefault(x => x.Value.ToString() == a.BillType);
|
||||||
|
return data?.Text ?? a.BillType;
|
||||||
|
}),
|
||||||
//this.MakeGridHeader(x => x.CompanyCode),
|
//this.MakeGridHeader(x => x.CompanyCode),
|
||||||
//this.MakeGridHeader(x => x.SupplierCode),
|
//this.MakeGridHeader(x => x.SupplierCode),
|
||||||
//this.MakeGridHeader(x => x.TotalQty),
|
//this.MakeGridHeader(x => x.TotalQty),
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ namespace HHWMS.Web
|
|||||||
public partial class ReceiptHeaderVM : BaseCRUDVM<ReceiptHeader>
|
public partial class ReceiptHeaderVM : BaseCRUDVM<ReceiptHeader>
|
||||||
{
|
{
|
||||||
public ReceiptDetailListVM2 Details = new ReceiptDetailListVM2();
|
public ReceiptDetailListVM2 Details = new ReceiptDetailListVM2();
|
||||||
|
public List<ComboSelectListItem> ReceiptTypes { get; set; }
|
||||||
public ReceiptHeaderVM()
|
public ReceiptHeaderVM()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -17,6 +18,14 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
Details.CopyContext(this);
|
Details.CopyContext(this);
|
||||||
Details.Searcher.ReceiptHeaderId = Entity.ID;
|
Details.Searcher.ReceiptHeaderId = Entity.ID;
|
||||||
|
|
||||||
|
var CurrentCulture = Wtm.CurrentCulture;
|
||||||
|
var dictDatas = DC.Set<SysDictData>().ToList();
|
||||||
|
ReceiptTypes = dictDatas.Where(x => x.DictType == "ReceiptType").Select(x => new ComboSelectListItem
|
||||||
|
{
|
||||||
|
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
|
||||||
|
Value = x.DictValue
|
||||||
|
}).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DoAdd()
|
public override void DoAdd()
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
<script>
|
<script>
|
||||||
var str = "";
|
var str = "";
|
||||||
@{
|
@{
|
||||||
<text>str = @Model.Entity.Code; </text>
|
<text>str = @Model.Entity.ID; </text>
|
||||||
}
|
}
|
||||||
|
|
||||||
var app = new Vue({
|
var app = new Vue({
|
||||||
@@ -64,13 +64,13 @@ var app = new Vue({
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
type: "post",
|
type: "post",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
data:{ code: str },
|
data:{ id: str },
|
||||||
url: "/receipt/ReceiptHeader/SelectReceiptDetailsByCode",
|
url: "/receipt/ReceiptHeader/SelectReceiptDetailsByCode",
|
||||||
success: function (json) {
|
success: function (json) {
|
||||||
app.tableData = json.Data;
|
app.tableData = json.Data;
|
||||||
},
|
},
|
||||||
error: function (json) {
|
error: function (json) {
|
||||||
alert("加载失败");
|
console.log("加载失败");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||||
@* <wt:textbox field="Entity.SourceCode" /> *@
|
@* <wt:textbox field="Entity.SourceCode" /> *@
|
||||||
<wt:textbox field="Entity.Code" />
|
<wt:textbox field="Entity.Code" />
|
||||||
<wt:textbox field="Entity.BillType" />
|
<wt:combobox field="Entity.BillType" items="ReceiptTypes"/>
|
||||||
@* <wt:textbox field="Entity.CompanyCode" />
|
@* <wt:textbox field="Entity.CompanyCode" />
|
||||||
<wt:textbox field="Entity.SupplierCode" />
|
<wt:textbox field="Entity.SupplierCode" />
|
||||||
<wt:textbox field="Entity.TotalQty" />
|
<wt:textbox field="Entity.TotalQty" />
|
||||||
<wt:textbox field="Entity.TotalLines" />
|
<wt:textbox field="Entity.TotalLines" />
|
||||||
<wt:combobox field="Entity.FirstStatus" />
|
<wt:combobox field="Entity.FirstStatus" />
|
||||||
<wt:combobox field="Entity.LastStatus" /> *@
|
<wt:combobox field="Entity.LastStatus" /> *@
|
||||||
<wt:datetime field="Entity.AppointmentTime" />
|
<wt:datetime field="Entity.AppointmentTime" type="DateTime" />
|
||||||
<wt:textbox field="Entity.Remark" />
|
<wt:textbox field="Entity.Remark" />
|
||||||
</wt:row>
|
</wt:row>
|
||||||
<wt:row align="AlignEnum.Right">
|
<wt:row align="AlignEnum.Right">
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
||||||
@* <wt:textbox field="Searcher.SourceCode" /> *@
|
@* <wt:textbox field="Searcher.SourceCode" /> *@
|
||||||
<wt:textbox field="Searcher.Code" />
|
<wt:textbox field="Searcher.Code" />
|
||||||
<wt:textbox field="Searcher.BillType" />
|
<wt:combobox field="Searcher.BillType" items="ReceiptTypes"/>
|
||||||
@* <wt:combobox field="Searcher.FirstStatus" empty-text="@Localizer["Sys.All"]" /> *@
|
@* <wt:combobox field="Searcher.FirstStatus" empty-text="@Localizer["Sys.All"]" /> *@
|
||||||
@* <wt:combobox field="Searcher.LastStatus" empty-text="@Localizer["Sys.All"]" /> *@
|
@* <wt:combobox field="Searcher.LastStatus" empty-text="@Localizer["Sys.All"]" /> *@
|
||||||
</wt:row>
|
</wt:row>
|
||||||
</wt:searchpanel>
|
</wt:searchpanel>
|
||||||
<wt:grid vm="@Model" id="header" url="/receipt/ReceiptHeader/Search" limit="7" />
|
<wt:grid vm="@Model" id="header" url="/receipt/ReceiptHeader/Search" limit="7" />
|
||||||
<wt:grid vm="@Model.Details" id="detail" url="/receipt/ReceiptDetail/Search2" height="400" />
|
<wt:grid vm="@Model.ReceiptDetails" id="detail" url="/receipt/ReceiptDetail/Search2" height="400" />
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var headerId = 0;
|
var headerId = 0;
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ using WalkingTec.Mvvm.Mvc;
|
|||||||
using WalkingTec.Mvvm.Core.Extensions;
|
using WalkingTec.Mvvm.Core.Extensions;
|
||||||
using HHWMS.Web;
|
using HHWMS.Web;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using HHWMS.Web.Models;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace HHWMS.Web.Controllers
|
namespace HHWMS.Web.Controllers
|
||||||
{
|
{
|
||||||
@@ -139,6 +142,7 @@ namespace HHWMS.Web.Controllers
|
|||||||
public ActionResult Details(string id)
|
public ActionResult Details(string id)
|
||||||
{
|
{
|
||||||
var vm = Wtm.CreateVM<ShipmentHeaderVM>(id);
|
var vm = Wtm.CreateVM<ShipmentHeaderVM>(id);
|
||||||
|
vm.Details.SearcherMode = ListVMSearchModeEnum.MasterDetail;
|
||||||
return PartialView(vm);
|
return PartialView(vm);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@@ -223,5 +227,65 @@ 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.Find<Inventory>(x => x.UniqueCode.Equals(item.UniqueCode))
|
||||||
|
.Sum(x => x.Qty);
|
||||||
|
item.InventoryStatus = invQty >= (item.Qty - item.DividedQty) ? "满足" : "不足";
|
||||||
|
}
|
||||||
|
return JsonMore(details);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ActionResult StartOut(int id)
|
||||||
|
{
|
||||||
|
var data = _unitwork.FindById<ShipmentHeader>(id);
|
||||||
|
if (data != null)
|
||||||
|
{
|
||||||
|
data.FirstStatus = ShipStatusEnum.分配中;
|
||||||
|
_unitwork.Update(data);
|
||||||
|
}
|
||||||
|
return FFResult().RefreshGrid().Message("启动成功!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,9 +10,20 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
public partial class ShipmentDetailListVM : BasePagedListVM<ShipmentDetail_View, ShipmentDetailSearcher>
|
public partial class ShipmentDetailListVM : BasePagedListVM<ShipmentDetail_View, ShipmentDetailSearcher>
|
||||||
{
|
{
|
||||||
|
private IUnitWork _unitWork { get; set; }
|
||||||
|
protected override void InitVM()
|
||||||
|
{
|
||||||
|
_unitWork = new UnitWork(Wtm);
|
||||||
|
}
|
||||||
protected override List<GridAction> InitGridAction()
|
protected override List<GridAction> InitGridAction()
|
||||||
{
|
{
|
||||||
return new List<GridAction>
|
if (SearcherMode == ListVMSearchModeEnum.MasterDetail
|
||||||
|
|| SearcherMode == ListVMSearchModeEnum.Custom1)
|
||||||
|
{
|
||||||
|
return new List<GridAction>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return new List<GridAction>
|
||||||
{
|
{
|
||||||
this.MakeStandardAction("ShipmentDetail", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"shipment", dialogWidth: 800),
|
this.MakeStandardAction("ShipmentDetail", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"shipment", dialogWidth: 800),
|
||||||
this.MakeStandardAction("ShipmentDetail", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "shipment", dialogWidth: 800),
|
this.MakeStandardAction("ShipmentDetail", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "shipment", dialogWidth: 800),
|
||||||
@@ -27,7 +38,28 @@ namespace HHWMS.Web
|
|||||||
|
|
||||||
protected override IEnumerable<IGridColumn<ShipmentDetail_View>> InitGridHeader()
|
protected override IEnumerable<IGridColumn<ShipmentDetail_View>> InitGridHeader()
|
||||||
{
|
{
|
||||||
return new List<GridColumn<ShipmentDetail_View>>{
|
if (SearcherMode == ListVMSearchModeEnum.MasterDetail)
|
||||||
|
{
|
||||||
|
return new List<GridColumn<ShipmentDetail_View>>{
|
||||||
|
this.MakeGridHeader(x => x.UniqueCode).SetWidth(220),
|
||||||
|
this.MakeGridHeader(x => x.MaterialCode),
|
||||||
|
this.MakeGridHeader(x => x.Batch),
|
||||||
|
this.MakeGridHeader(x => x.Qty),
|
||||||
|
this.MakeGridHeader(x => x.Status)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else if (SearcherMode == ListVMSearchModeEnum.Custom1)
|
||||||
|
{
|
||||||
|
return new List<GridColumn<ShipmentDetail_View>>{
|
||||||
|
this.MakeGridHeader(x => x.UniqueCode).SetWidth(220),
|
||||||
|
this.MakeGridHeader(x => x.MaterialCode),
|
||||||
|
this.MakeGridHeader(x => x.Batch),
|
||||||
|
this.MakeGridHeader(x => x.Qty),
|
||||||
|
this.MakeGridHeader(x => x.InventoryStatus)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return new List<GridColumn<ShipmentDetail_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.MaterialCode),
|
this.MakeGridHeader(x => x.MaterialCode),
|
||||||
@@ -52,7 +84,31 @@ namespace HHWMS.Web
|
|||||||
|
|
||||||
public override IOrderedQueryable<ShipmentDetail_View> GetSearchQuery()
|
public override IOrderedQueryable<ShipmentDetail_View> GetSearchQuery()
|
||||||
{
|
{
|
||||||
var query = DC.Set<ShipmentDetail>()
|
InitVM();
|
||||||
|
if (SearcherMode == ListVMSearchModeEnum.Custom1) {
|
||||||
|
var tt = DC.Set<ShipmentDetail>()
|
||||||
|
.CheckEqual(Searcher.ShipmentHeaderId, x => x.ShipmentHeaderId)
|
||||||
|
.Select(x => new ShipmentDetail_View
|
||||||
|
{
|
||||||
|
ID = x.ID,
|
||||||
|
UniqueCode = x.UniqueCode,
|
||||||
|
MaterialCode = x.MaterialCode,
|
||||||
|
Batch = x.Batch,
|
||||||
|
Qty = x.Qty,
|
||||||
|
InventoryStatus = x.InventoryStatus,
|
||||||
|
Status = x.Status
|
||||||
|
}).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);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var query = DC.Set<ShipmentDetail>()
|
||||||
.CheckEqual(Searcher.ShipmentHeaderId, x => x.ShipmentHeaderId)
|
.CheckEqual(Searcher.ShipmentHeaderId, x => x.ShipmentHeaderId)
|
||||||
.CheckContain(Searcher.ZoneCode, x => x.ZoneCode)
|
.CheckContain(Searcher.ZoneCode, x => x.ZoneCode)
|
||||||
.CheckContain(Searcher.MaterialCode, x => x.MaterialCode)
|
.CheckContain(Searcher.MaterialCode, x => x.MaterialCode)
|
||||||
@@ -68,6 +124,7 @@ 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,
|
||||||
@@ -87,7 +144,8 @@ namespace HHWMS.Web
|
|||||||
Status = x.Status,
|
Status = x.Status,
|
||||||
})
|
})
|
||||||
.OrderBy(x => x.ID);
|
.OrderBy(x => x.ID);
|
||||||
return query;
|
return query;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,20 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
public partial class ShipmentHeaderListVM : BasePagedListVM<ShipmentHeader_View, ShipmentHeaderSearcher>
|
public partial class ShipmentHeaderListVM : BasePagedListVM<ShipmentHeader_View, ShipmentHeaderSearcher>
|
||||||
{
|
{
|
||||||
|
public List<ComboSelectListItem> ShipTypes { get; set; }
|
||||||
|
|
||||||
|
protected override void InitVM()
|
||||||
|
{
|
||||||
|
var vm = Wtm.CreateVM<ShipmentHeaderVM>();
|
||||||
|
ShipTypes = vm.ShipTypes;
|
||||||
|
}
|
||||||
protected override List<GridAction> InitGridAction()
|
protected override List<GridAction> InitGridAction()
|
||||||
{
|
{
|
||||||
return new List<GridAction>
|
return new List<GridAction>
|
||||||
{
|
{
|
||||||
|
this.MakeAction("ShipmentHeader","StartOut",Localizer["ShipmentHeader.StartOut"],"",GridActionParameterTypesEnum.SingleId,"shipment"),
|
||||||
|
this.MakeAction("ShipmentHeader","Analyse",Localizer["ShipmentHeader.Analyse"],Localizer["ShipmentHeader.Analyse"],GridActionParameterTypesEnum.SingleId,"shipment")
|
||||||
|
.SetShowInRow().SetHideOnToolBar().SetButtonClass("layui-btn-Warm").SetSize(1200,800),
|
||||||
this.MakeStandardAction("ShipmentHeader", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"shipment", dialogWidth: 800),
|
this.MakeStandardAction("ShipmentHeader", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"shipment", dialogWidth: 800),
|
||||||
this.MakeStandardAction("ShipmentHeader", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "shipment", dialogWidth: 800),
|
this.MakeStandardAction("ShipmentHeader", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "shipment", dialogWidth: 800),
|
||||||
this.MakeStandardAction("ShipmentHeader", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "shipment", dialogWidth: 800),
|
this.MakeStandardAction("ShipmentHeader", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "shipment", dialogWidth: 800),
|
||||||
@@ -25,18 +35,24 @@ namespace HHWMS.Web
|
|||||||
|
|
||||||
protected override IEnumerable<IGridColumn<ShipmentHeader_View>> InitGridHeader()
|
protected override IEnumerable<IGridColumn<ShipmentHeader_View>> InitGridHeader()
|
||||||
{
|
{
|
||||||
|
InitVM();
|
||||||
return new List<GridColumn<ShipmentHeader_View>>{
|
return new List<GridColumn<ShipmentHeader_View>>{
|
||||||
this.MakeGridHeader(x => x.SourceCode),
|
//this.MakeGridHeader(x => x.SourceCode),
|
||||||
this.MakeGridHeader(x => x.Code),
|
this.MakeGridHeader(x => x.Code),
|
||||||
this.MakeGridHeader(x => x.BillType),
|
this.MakeGridHeader(x => x.BillType)
|
||||||
this.MakeGridHeader(x => x.CompanyCode),
|
.SetFormat((a, b) =>
|
||||||
this.MakeGridHeader(x => x.SupplierCode),
|
{
|
||||||
this.MakeGridHeader(x => x.TotalQty),
|
var data = ShipTypes.FirstOrDefault(x => x.Value.ToString() == a.BillType);
|
||||||
this.MakeGridHeader(x => x.TotalLines),
|
return data?.Text ?? a.BillType;
|
||||||
|
}),
|
||||||
|
//this.MakeGridHeader(x => x.CompanyCode),
|
||||||
|
//this.MakeGridHeader(x => x.SupplierCode),
|
||||||
|
//this.MakeGridHeader(x => x.TotalQty),
|
||||||
|
//this.MakeGridHeader(x => x.TotalLines),
|
||||||
this.MakeGridHeader(x => x.FirstStatus),
|
this.MakeGridHeader(x => x.FirstStatus),
|
||||||
this.MakeGridHeader(x => x.LastStatus),
|
//this.MakeGridHeader(x => x.LastStatus),
|
||||||
this.MakeGridHeader(x => x.Remark),
|
this.MakeGridHeader(x => x.Remark),
|
||||||
this.MakeGridHeaderAction(width: 200)
|
this.MakeGridHeaderAction(width: 300)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,13 +12,24 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
public partial class ShipmentHeaderVM : BaseCRUDVM<ShipmentHeader>
|
public partial class ShipmentHeaderVM : BaseCRUDVM<ShipmentHeader>
|
||||||
{
|
{
|
||||||
|
public ShipmentDetailListVM Details = new ShipmentDetailListVM();
|
||||||
|
public List<ComboSelectListItem> ShipTypes { get; set; }
|
||||||
public ShipmentHeaderVM()
|
public ShipmentHeaderVM()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void InitVM()
|
protected override void InitVM()
|
||||||
{
|
{
|
||||||
|
Details.CopyContext(this);
|
||||||
|
Details.Searcher.ShipmentHeaderId = Entity.ID;
|
||||||
|
|
||||||
|
var CurrentCulture = Wtm.CurrentCulture;
|
||||||
|
var dictDatas = DC.Set<SysDictData>().ToList();
|
||||||
|
ShipTypes = dictDatas.Where(x => x.DictType == "ShipType").Select(x => new ComboSelectListItem
|
||||||
|
{
|
||||||
|
Text = CurrentCulture == "zh" ? x.DictLabel : x.DictLabelUs,
|
||||||
|
Value = x.DictValue
|
||||||
|
}).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DoAdd()
|
public override void DoAdd()
|
||||||
|
|||||||
@@ -0,0 +1,96 @@
|
|||||||
|
@model HHWMS.Web.ShipmentHeaderVM
|
||||||
|
|
||||||
|
<el-row id="analyse" :gutter="20">
|
||||||
|
<el-card class="box-card">
|
||||||
|
<el-table :data="tableData" max-height="600" border
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column label="唯一码" width="220" align="center" prop="UniqueCode"></el-table-column>
|
||||||
|
<el-table-column label="编码" align="center" prop="MaterialCode"></el-table-column>
|
||||||
|
<el-table-column label="批次" align="center" prop="Batch"></el-table-column>
|
||||||
|
<el-table-column label="数量" align="center" prop="Qty"></el-table-column>
|
||||||
|
<el-table-column label="物料状态" align="center" prop="InventoryStatus">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button :type="scope.row.InventoryStatus === '不足' ? 'danger' : 'success'">
|
||||||
|
{{scope.row.InventoryStatus}}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column fixed="right"
|
||||||
|
align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button @@click="handleClick(scope.row)" type="primary" icon="el-icon-search"></el-button>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-divider></el-divider>
|
||||||
|
</el-card>
|
||||||
|
<el-dialog title="库存明细" :visible.sync="dialogTableVisible">
|
||||||
|
<el-table :data="invData">
|
||||||
|
<el-table-column label="唯一码" width="220" align="center" prop="UniqueCode"></el-table-column>
|
||||||
|
<el-table-column label="编码" align="center" prop="MaterialCode"></el-table-column>
|
||||||
|
<el-table-column label="批次" align="center" prop="Batch"></el-table-column>
|
||||||
|
<el-table-column label="数量" align="center" prop="Qty"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-dialog>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var str = "";
|
||||||
|
@{
|
||||||
|
<text>str = @Model.Entity.ID; </text>
|
||||||
|
}
|
||||||
|
|
||||||
|
var app = new Vue({
|
||||||
|
el: "#analyse",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogTableVisible: false,
|
||||||
|
tableData: [],
|
||||||
|
invData: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted: function () {
|
||||||
|
// 获取所有单据明细
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
dataType: "json",
|
||||||
|
data: { id: str },
|
||||||
|
url: "/shipment/ShipmentHeader/AnalyseData",
|
||||||
|
success: function (json) {
|
||||||
|
app.tableData = json.Data;
|
||||||
|
},
|
||||||
|
error: function (json) {
|
||||||
|
console.log("加载失败");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询库存
|
||||||
|
handleClick(data) {
|
||||||
|
var _this = this;
|
||||||
|
var uniqueCode = data.UniqueCode;
|
||||||
|
// 查询库存
|
||||||
|
if (data.InventoryStatus != "不足") {
|
||||||
|
_this.dialogTableVisible = true;
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
dataType: "json",
|
||||||
|
data: { uniqueCode: uniqueCode },
|
||||||
|
url: "/shipment/ShipmentHeader/GetInvData",
|
||||||
|
success: function (json) {
|
||||||
|
_this.invData = json.Data;
|
||||||
|
},
|
||||||
|
error: function (json) {
|
||||||
|
_this.$message({
|
||||||
|
message: json.Message,
|
||||||
|
type: 'warning'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -1,19 +1,21 @@
|
|||||||
@model HHWMS.Web.ShipmentHeaderVM
|
@model HHWMS.Web.ShipmentHeaderVM
|
||||||
@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.SourceCode" />
|
@* <wt:display field="Entity.SourceCode" /> *@
|
||||||
<wt:display field="Entity.Code" />
|
<wt:display field="Entity.Code" />
|
||||||
<wt:display field="Entity.BillType" />
|
<wt:display field="Entity.BillType" />
|
||||||
<wt:display field="Entity.CompanyCode" />
|
@* <wt:display field="Entity.CompanyCode" />
|
||||||
<wt:display field="Entity.SupplierCode" />
|
<wt:display field="Entity.SupplierCode" />
|
||||||
<wt:display field="Entity.TotalQty" />
|
<wt:display field="Entity.TotalQty" />
|
||||||
<wt:display field="Entity.TotalLines" />
|
<wt:display field="Entity.TotalLines" />
|
||||||
<wt:display field="Entity.FirstStatus" />
|
<wt:display field="Entity.FirstStatus" />
|
||||||
<wt:display field="Entity.LastStatus" />
|
<wt:display field="Entity.LastStatus" />
|
||||||
<wt:display field="Entity.Remark" />
|
<wt:display field="Entity.Remark" /> *@
|
||||||
</wt:row>
|
</wt:row>
|
||||||
|
<wt:grid vm="@Model.Details" height="300" hidden-checkbox="true" hidden-grid-index="true" use-local-data="true" hidden-panel="true" />
|
||||||
|
|
||||||
<wt:row align="AlignEnum.Right">
|
<wt:row align="AlignEnum.Right">
|
||||||
<wt:closebutton />
|
<wt:closebutton />
|
||||||
</wt:row>
|
</wt:row>
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
<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:textbox field="Searcher.SourceCode" />
|
@* <wt:textbox field="Searcher.SourceCode" /> *@
|
||||||
<wt:textbox field="Searcher.Code" />
|
<wt:textbox field="Searcher.Code" />
|
||||||
<wt:textbox field="Searcher.BillType" />
|
<wt:combobox field="Searcher.BillType" items="ShipTypes" />
|
||||||
<wt:combobox field="Searcher.FirstStatus" empty-text="@Localizer["Sys.All"]" />
|
<wt:combobox field="Searcher.FirstStatus" empty-text="@Localizer["Sys.All"]" />
|
||||||
<wt:combobox field="Searcher.LastStatus" empty-text="@Localizer["Sys.All"]" />
|
@* <wt:combobox field="Searcher.LastStatus" empty-text="@Localizer["Sys.All"]" /> *@
|
||||||
</wt:row>
|
</wt:row>
|
||||||
</wt:searchpanel>
|
</wt:searchpanel>
|
||||||
<wt:grid vm="@Model" url="/shipment/ShipmentHeader/Search"/>
|
<wt:grid vm="@Model" url="/shipment/ShipmentHeader/Search"/>
|
||||||
@@ -6,6 +6,8 @@ using WalkingTec.Mvvm.Mvc;
|
|||||||
using WalkingTec.Mvvm.Core.Extensions;
|
using WalkingTec.Mvvm.Core.Extensions;
|
||||||
using HHWMS.Web;
|
using HHWMS.Web;
|
||||||
using HHWMS.Web.Models;
|
using HHWMS.Web.Models;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace HHWMS.Web.Controllers
|
namespace HHWMS.Web.Controllers
|
||||||
{
|
{
|
||||||
@@ -44,6 +46,15 @@ namespace HHWMS.Web.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ActionDescription("Sys.Search")]
|
||||||
|
[HttpPost]
|
||||||
|
public string Search2(TaskDetailListVM2 vm)
|
||||||
|
{
|
||||||
|
vm.Searcher.Page = vm.FC.GetValue<int>("Page");
|
||||||
|
vm.Searcher.Limit = vm.FC.GetValue<int>("Limit");
|
||||||
|
return vm.GetJson(false);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Create
|
#region Create
|
||||||
@@ -160,7 +171,7 @@ namespace HHWMS.Web.Controllers
|
|||||||
{
|
{
|
||||||
if (!ModelState.IsValid || !vm.DoBatchEdit())
|
if (!ModelState.IsValid || !vm.DoBatchEdit())
|
||||||
{
|
{
|
||||||
return PartialView("BatchEdit",vm);
|
return PartialView("BatchEdit", vm);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -184,7 +195,7 @@ namespace HHWMS.Web.Controllers
|
|||||||
{
|
{
|
||||||
if (!ModelState.IsValid || !vm.DoBatchDelete())
|
if (!ModelState.IsValid || !vm.DoBatchDelete())
|
||||||
{
|
{
|
||||||
return PartialView("BatchDelete",vm);
|
return PartialView("BatchDelete", vm);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -194,7 +205,7 @@ namespace HHWMS.Web.Controllers
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Import
|
#region Import
|
||||||
[ActionDescription("Sys.Import")]
|
[ActionDescription("Sys.Import")]
|
||||||
public ActionResult Import()
|
public ActionResult Import()
|
||||||
{
|
{
|
||||||
var vm = Wtm.CreateVM<TaskDetailImportVM>();
|
var vm = Wtm.CreateVM<TaskDetailImportVM>();
|
||||||
@@ -229,22 +240,30 @@ namespace HHWMS.Web.Controllers
|
|||||||
[ActionDescription("TaskHeader.Cancel")]
|
[ActionDescription("TaskHeader.Cancel")]
|
||||||
public ActionResult Cancel(string id)
|
public ActionResult Cancel(string id)
|
||||||
{
|
{
|
||||||
var task = _unitwork.FindById<TaskDetail>(int.Parse(id));
|
var task = _unitwork.Find<TaskDetail>(x => x.ID == int.Parse(id))
|
||||||
// 判断任务 是否能取消
|
.Include(x => x.TaskHeader).FirstOrDefault();
|
||||||
if (task.Status < TaskStatusEnum.已下发)
|
|
||||||
{
|
|
||||||
return FFResult().Alert($"此任务未下发,无需取消!");
|
|
||||||
}
|
|
||||||
if (task != null)
|
if (task != null)
|
||||||
{
|
{
|
||||||
|
// 判断任务 是否能取消
|
||||||
|
if (task.Status < TaskStatusEnum.已下发)
|
||||||
|
{
|
||||||
|
return FFResult().Alert($"此任务未下发,无需取消!");
|
||||||
|
}
|
||||||
|
else if (task.Status == TaskStatusEnum.完成)
|
||||||
|
{
|
||||||
|
return FFResult().Alert($"此任务已完成,无需取消!");
|
||||||
|
}
|
||||||
|
|
||||||
var taskInfo = new TaskInfo
|
var taskInfo = new TaskInfo
|
||||||
{
|
{
|
||||||
TaskId = $"{task.TaskHeader.TaskNo}-{task.FromLocation}",
|
TaskId = $"{task.TaskHeader.TaskNo}-{task.FromLocation}",
|
||||||
TaskType = 99,
|
TaskType = 99,
|
||||||
};
|
};
|
||||||
var res = Wtm.CallAPI<ApiJsonResult<dynamic>>("WCS", "TaskAssign", HttpMethodEnum.POST, taskInfo).Result.Data;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var res = Wtm.CallAPI<ApiJsonResult<dynamic>>("WCS", "TaskAssign", HttpMethodEnum.POST, taskInfo).Result.Data;
|
||||||
|
|
||||||
if ((bool)res?.Success)
|
if ((bool)res?.Success)
|
||||||
{
|
{
|
||||||
// 删除任务,处理数据
|
// 删除任务,处理数据
|
||||||
|
|||||||
@@ -309,9 +309,9 @@ namespace HHWMS.Web.Controllers
|
|||||||
taskInfo.EndPos = end;
|
taskInfo.EndPos = end;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* var res = Wtm.CallAPI<ApiJsonResult<dynamic>>("WCS", "TaskAssign", HttpMethodEnum.POST, taskInfo).Result.Data;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var res = Wtm.CallAPI<ApiJsonResult<dynamic>>("WCS", "TaskAssign", HttpMethodEnum.POST, taskInfo).Result.Data;
|
||||||
if ((bool)res?.Success)
|
if ((bool)res?.Success)
|
||||||
{
|
{
|
||||||
// 删除已回传MES的任务
|
// 删除已回传MES的任务
|
||||||
@@ -321,7 +321,7 @@ namespace HHWMS.Web.Controllers
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
return FFResult().Alert($"操作失败,{ex.Message}");
|
return FFResult().Alert($"操作失败,{ex.Message}");
|
||||||
}*/
|
}
|
||||||
return FFResult().RefreshGrid();
|
return FFResult().RefreshGrid();
|
||||||
}
|
}
|
||||||
#endregion 任务下发
|
#endregion 任务下发
|
||||||
@@ -331,9 +331,10 @@ namespace HHWMS.Web.Controllers
|
|||||||
public ActionResult Cancel(string id)
|
public ActionResult Cancel(string id)
|
||||||
{
|
{
|
||||||
var task = _unitwork.FindById<TaskHeader>(int.Parse(id));
|
var task = _unitwork.FindById<TaskHeader>(int.Parse(id));
|
||||||
|
|
||||||
if (task != null) {
|
if (task != null)
|
||||||
if(task.Status < TaskStatusEnum.已下发)
|
{
|
||||||
|
if (task.Status > TaskStatusEnum.已下发)
|
||||||
{
|
{
|
||||||
return FFResult().Alert($"此任务未下发,无需取消!");
|
return FFResult().Alert($"此任务未下发,无需取消!");
|
||||||
}
|
}
|
||||||
@@ -347,9 +348,9 @@ namespace HHWMS.Web.Controllers
|
|||||||
TaskId = task.TaskNo,
|
TaskId = task.TaskNo,
|
||||||
TaskType = 99,
|
TaskType = 99,
|
||||||
};
|
};
|
||||||
var res = Wtm.CallAPI<ApiJsonResult<dynamic>>("WCS", "TaskAssign", HttpMethodEnum.POST, taskInfo).Result.Data;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var res = Wtm.CallAPI<ApiJsonResult<dynamic>>("WCS", "TaskAssign", HttpMethodEnum.POST, taskInfo).Result.Data;
|
||||||
if ((bool)res?.Success)
|
if ((bool)res?.Success)
|
||||||
{
|
{
|
||||||
// 删除任务,处理数据
|
// 删除任务,处理数据
|
||||||
|
|||||||
@@ -0,0 +1,76 @@
|
|||||||
|
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 TaskDetailListVM2 : BasePagedListVM<TaskDetail_View, TaskDetailSearcher>
|
||||||
|
{
|
||||||
|
protected override List<GridAction> InitGridAction()
|
||||||
|
{
|
||||||
|
return new List<GridAction>
|
||||||
|
{
|
||||||
|
this.MakeAction("TaskDetail","Cancel",Localizer["TaskHeader.Cancel"],Localizer["TaskHeader.Cancel"],GridActionParameterTypesEnum.SingleId,"taskManage"),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected override IEnumerable<IGridColumn<TaskDetail_View>> InitGridHeader()
|
||||||
|
{
|
||||||
|
return new List<GridColumn<TaskDetail_View>>{
|
||||||
|
this.MakeGridHeader(x => x.TaskNo_view),
|
||||||
|
this.MakeGridHeader(x => x.OrderCode).SetHide(),
|
||||||
|
this.MakeGridHeader(x => x.OrderDetailId).SetHide(),
|
||||||
|
this.MakeGridHeader(x => x.UniqueCode),
|
||||||
|
this.MakeGridHeader(x => x.MaterialCode),
|
||||||
|
this.MakeGridHeader(x => x.MaterialName).SetHide(),
|
||||||
|
this.MakeGridHeader(x => x.MaterialSpec).SetHide(),
|
||||||
|
this.MakeGridHeader(x => x.MaterialUnit).SetHide(),
|
||||||
|
this.MakeGridHeader(x => x.Batch).SetHide(),
|
||||||
|
this.MakeGridHeader(x => x.Lot).SetHide(),
|
||||||
|
this.MakeGridHeader(x => x.ContainerCode),
|
||||||
|
this.MakeGridHeader(x => x.Qty),
|
||||||
|
this.MakeGridHeader(x => x.InventoryId).SetHide(),
|
||||||
|
this.MakeGridHeader(x => x.FromLocation),
|
||||||
|
this.MakeGridHeader(x => x.ToLocation),
|
||||||
|
this.MakeGridHeader(x => x.Status),
|
||||||
|
this.MakeGridHeaderAction(width: 200)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IOrderedQueryable<TaskDetail_View> GetSearchQuery()
|
||||||
|
{
|
||||||
|
var query = DC.Set<TaskDetail>()
|
||||||
|
.Where(x => x.TaskHeaderId == Searcher.TaskHeaderId)
|
||||||
|
.Select(x => new TaskDetail_View
|
||||||
|
{
|
||||||
|
ID = x.ID,
|
||||||
|
TaskNo_view = $"{x.TaskHeader.TaskNo}-{x.FromLocation}",
|
||||||
|
OrderCode = x.OrderCode,
|
||||||
|
OrderDetailId = x.OrderDetailId,
|
||||||
|
UniqueCode = x.UniqueCode,
|
||||||
|
MaterialCode = x.MaterialCode,
|
||||||
|
MaterialName = x.MaterialName,
|
||||||
|
MaterialSpec = x.MaterialSpec,
|
||||||
|
MaterialUnit = x.MaterialUnit,
|
||||||
|
Batch = x.Batch,
|
||||||
|
Lot = x.Lot,
|
||||||
|
ContainerCode = x.ContainerCode,
|
||||||
|
Qty = x.Qty,
|
||||||
|
InventoryId = x.InventoryId,
|
||||||
|
FromLocation = x.FromLocation,
|
||||||
|
ToLocation = x.ToLocation,
|
||||||
|
Status = x.Status,
|
||||||
|
})
|
||||||
|
.OrderBy(x => x.ID);
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
@@ -14,6 +14,10 @@ namespace HHWMS.Web
|
|||||||
{
|
{
|
||||||
[Display(Name = "Inventory.UniqueCode")]
|
[Display(Name = "Inventory.UniqueCode")]
|
||||||
public String UniqueCode { get; set; }
|
public String UniqueCode { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "Task.TaskNo")]
|
||||||
|
public int? TaskHeaderId { get; set; }
|
||||||
|
|
||||||
[Display(Name = "Inventory.MaterialCode")]
|
[Display(Name = "Inventory.MaterialCode")]
|
||||||
public String MaterialCode { get; set; }
|
public String MaterialCode { get; set; }
|
||||||
[Display(Name = "Task.FromLocation")]
|
[Display(Name = "Task.FromLocation")]
|
||||||
|
|||||||
@@ -13,11 +13,14 @@ namespace HHWMS.Web
|
|||||||
public partial class TaskHeaderListVM : BasePagedListVM<TaskHeader_View, TaskHeaderSearcher>
|
public partial class TaskHeaderListVM : BasePagedListVM<TaskHeader_View, TaskHeaderSearcher>
|
||||||
{
|
{
|
||||||
public List<ComboSelectListItem> ZoneCodes { get; set; }
|
public List<ComboSelectListItem> ZoneCodes { get; set; }
|
||||||
|
public TaskDetailListVM2 TaskDetails { get; set; } = new TaskDetailListVM2();
|
||||||
|
|
||||||
protected override void InitVM()
|
protected override void InitVM()
|
||||||
{
|
{
|
||||||
var vm = Wtm.CreateVM<TaskHeaderVM>();
|
var vm = Wtm.CreateVM<TaskHeaderVM>();
|
||||||
ZoneCodes = vm.ZoneCodes;
|
ZoneCodes = vm.ZoneCodes;
|
||||||
|
|
||||||
|
TaskDetails.CopyContext(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override List<GridAction> InitGridAction()
|
protected override List<GridAction> InitGridAction()
|
||||||
@@ -49,7 +52,12 @@ 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.TaskNo),
|
this.MakeGridHeader(x => x.TaskNo)
|
||||||
|
.SetFormat((a,b) =>
|
||||||
|
{
|
||||||
|
string rv = UIService.MakeScriptButton(ButtonTypesEnum.Link,a.TaskNo,$"details('{a.ID}')");
|
||||||
|
return rv;
|
||||||
|
}),
|
||||||
this.MakeGridHeader(x => x.TaskType),
|
this.MakeGridHeader(x => x.TaskType),
|
||||||
this.MakeGridHeader(x => x.FromLocation),
|
this.MakeGridHeader(x => x.FromLocation),
|
||||||
this.MakeGridHeader(x => x.ToLocation),
|
this.MakeGridHeader(x => x.ToLocation),
|
||||||
@@ -89,7 +97,7 @@ namespace HHWMS.Web
|
|||||||
Status = x.Status,
|
Status = x.Status,
|
||||||
ErrorMsg = x.ErrorMsg,
|
ErrorMsg = x.ErrorMsg,
|
||||||
})
|
})
|
||||||
.OrderBy(x => x.ID);
|
.OrderByDescending(x => x.ID);
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@model HHWMS.Web.TaskHeaderListVM
|
@model HHWMS.Web.TaskHeaderListVM
|
||||||
@inject IStringLocalizer<Program> Localizer;
|
@inject IStringLocalizer<Program> Localizer;
|
||||||
|
|
||||||
<wt:searchpanel vm="@Model" reset-btn="true">
|
<wt:searchpanel vm="@Model" reset-btn="true" grid-id="header">
|
||||||
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
||||||
<wt:combobox field="Searcher.ZoneCode" items="ZoneCodes" />
|
<wt:combobox field="Searcher.ZoneCode" items="ZoneCodes" />
|
||||||
<wt:textbox field="Searcher.TaskNo" />
|
<wt:textbox field="Searcher.TaskNo" />
|
||||||
@@ -13,4 +13,13 @@
|
|||||||
<wt:combobox field="Searcher.Status" empty-text="@Localizer["Sys.All"]" />
|
<wt:combobox field="Searcher.Status" empty-text="@Localizer["Sys.All"]" />
|
||||||
</wt:row>
|
</wt:row>
|
||||||
</wt:searchpanel>
|
</wt:searchpanel>
|
||||||
<wt:grid vm="@Model" url="/taskManage/TaskHeader/Search"/>
|
<wt:grid vm="@Model" id="header" url="/taskManage/TaskHeader/Search" limit="7" />
|
||||||
|
<wt:grid vm="@Model.TaskDetails" id="detail" url="/taskManage/TaskDetail/Search2" height="400" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var headerId = 0;
|
||||||
|
function details(id) {
|
||||||
|
headerId = id;
|
||||||
|
layui.table.reload('detail', { where: { "Searcher.TaskHeaderId": id } });
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -1365,4 +1365,10 @@
|
|||||||
<data name="ReceiptHeader.Count" xml:space="preserve">
|
<data name="ReceiptHeader.Count" xml:space="preserve">
|
||||||
<value>点数</value>
|
<value>点数</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ShipmentHeader.Analyse" xml:space="preserve">
|
||||||
|
<value>库位分析</value>
|
||||||
|
</data>
|
||||||
|
<data name="ShipmentHeader.StartOut" xml:space="preserve">
|
||||||
|
<value>启动出库</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
],
|
],
|
||||||
"CookiePre": "HHWMS", //cookie前缀
|
"CookiePre": "HHWMS", //cookie前缀
|
||||||
"IsQuickDebug": true, //是否启用debug模式
|
"IsQuickDebug": true, //是否启用debug模式
|
||||||
"EnableTenant": false, //是否启动多租户
|
"EnableTenant": false, //是否启动多租户
|
||||||
"SyncDb": true, //是否自动同步数据库
|
"SyncDb": true, //是否自动同步数据库
|
||||||
"EncryptKey": "", //加密密钥
|
"EncryptKey": "", //加密密钥
|
||||||
"PageMode": "Tab", //页面显示模式,Single或者Tab
|
"PageMode": "Single", //页面显示模式,Single或者Tab
|
||||||
"TabMode": "Simple", //Tab页显示方式,Default或者Simple
|
"TabMode": "Simple", //Tab页显示方式,Default或者Simple
|
||||||
"IsFilePublic": true,
|
"IsFilePublic": true,
|
||||||
"ErrorHandler": "/_Framework/Error",
|
"ErrorHandler": "/_Framework/Error",
|
||||||
|
|||||||
Reference in new issue
Block a user