任务明细 出库明细 库存分析 启动出库
This commit is contained in:
1 parent
eef6df7099
commit
f5423e78fe
28 files changed
+500
-77
No files matched your search
@@ -241,9 +241,9 @@ namespace HHWMS.Web.Controllers
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <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();
|
||||
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.UniqueCode).SetWidth(230),
|
||||
this.MakeGridHeader(x => x.MaterialCode),
|
||||
this.MakeGridHeader(x => x.MaterialType),
|
||||
this.MakeGridHeader(x => x.MaterialName),
|
||||
this.MakeGridHeader(x => x.MaterialSpec),
|
||||
this.MakeGridHeader(x => x.MaterialUnit),
|
||||
//this.MakeGridHeader(x => x.MaterialType),
|
||||
//this.MakeGridHeader(x => x.MaterialName),
|
||||
//this.MakeGridHeader(x => x.MaterialSpec),
|
||||
//this.MakeGridHeader(x => x.MaterialUnit),
|
||||
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.ExpirationDate),
|
||||
//this.MakeGridHeader(x => x.CompanyCode),
|
||||
this.MakeGridHeader(x => x.SupplierCode),
|
||||
//this.MakeGridHeader(x => x.SupplierCode),
|
||||
this.MakeGridHeader(x => x.CompletedQty),
|
||||
this.MakeGridHeader(x => x.Qty),
|
||||
//this.MakeGridHeader(x => x.InventoryStatus),
|
||||
|
||||
@@ -8,11 +8,14 @@ namespace HHWMS.Web
|
||||
{
|
||||
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()
|
||||
{
|
||||
Details.CopyContext(this);
|
||||
ReceiptDetails.CopyContext(this);
|
||||
var vm = Wtm.CreateVM<ReceiptHeaderVM>();
|
||||
ReceiptTypes = vm.ReceiptTypes;
|
||||
}
|
||||
protected override List<GridAction> InitGridAction()
|
||||
{
|
||||
@@ -34,6 +37,7 @@ namespace HHWMS.Web
|
||||
|
||||
protected override IEnumerable<IGridColumn<ReceiptHeader_View>> InitGridHeader()
|
||||
{
|
||||
InitVM();
|
||||
return new List<GridColumn<ReceiptHeader_View>>{
|
||||
//this.MakeGridHeader(x => x.SourceCode),
|
||||
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}')");
|
||||
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.SupplierCode),
|
||||
//this.MakeGridHeader(x => x.TotalQty),
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace HHWMS.Web
|
||||
public partial class ReceiptHeaderVM : BaseCRUDVM<ReceiptHeader>
|
||||
{
|
||||
public ReceiptDetailListVM2 Details = new ReceiptDetailListVM2();
|
||||
public List<ComboSelectListItem> ReceiptTypes { get; set; }
|
||||
public ReceiptHeaderVM()
|
||||
{
|
||||
}
|
||||
@@ -17,6 +18,14 @@ namespace HHWMS.Web
|
||||
{
|
||||
Details.CopyContext(this);
|
||||
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()
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<script>
|
||||
var str = "";
|
||||
@{
|
||||
<text>str = @Model.Entity.Code; </text>
|
||||
<text>str = @Model.Entity.ID; </text>
|
||||
}
|
||||
|
||||
var app = new Vue({
|
||||
@@ -64,13 +64,13 @@ var app = new Vue({
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data:{ code: str },
|
||||
data:{ id: str },
|
||||
url: "/receipt/ReceiptHeader/SelectReceiptDetailsByCode",
|
||||
success: function (json) {
|
||||
app.tableData = json.Data;
|
||||
},
|
||||
error: function (json) {
|
||||
alert("加载失败");
|
||||
console.log("加载失败");
|
||||
}
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
@* <wt:textbox field="Entity.SourceCode" /> *@
|
||||
<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.SupplierCode" />
|
||||
<wt:textbox field="Entity.TotalQty" />
|
||||
<wt:textbox field="Entity.TotalLines" />
|
||||
<wt:combobox field="Entity.FirstStatus" />
|
||||
<wt:combobox field="Entity.LastStatus" /> *@
|
||||
<wt:datetime field="Entity.AppointmentTime" />
|
||||
<wt:datetime field="Entity.AppointmentTime" type="DateTime" />
|
||||
<wt:textbox field="Entity.Remark" />
|
||||
</wt:row>
|
||||
<wt:row align="AlignEnum.Right">
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
||||
@* <wt:textbox field="Searcher.SourceCode" /> *@
|
||||
<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.LastStatus" empty-text="@Localizer["Sys.All"]" /> *@
|
||||
</wt:row>
|
||||
</wt:searchpanel>
|
||||
<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>
|
||||
var headerId = 0;
|
||||
|
||||
Reference in new issue
Block a user