出库页面配置中文
手动入库(无单据入库,打印入库)
This commit is contained in:
1 parent
cce238c833
commit
9d6c5639b5
9 files changed
+164
-4
No files matched your search
@@ -94,7 +94,72 @@ namespace HHWMS.Web.Controllers
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshGrid(index:0);
|
||||
return FFResult().CloseDialog().RefreshPage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Create")]
|
||||
public ActionResult Create2()
|
||||
{
|
||||
var vm = Wtm.CreateVM<ReceiptDetail2VM>();
|
||||
return PartialView(vm);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ActionDescription("Sys.Create")]
|
||||
[FixConnection(CsName = "hangyong")]
|
||||
public ActionResult Create2(ReceiptDetail2VM vm)
|
||||
{
|
||||
if (string.IsNullOrEmpty(vm.Entity.MaterialCode))
|
||||
{
|
||||
return FFResult().Alert("物料必选!");
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(vm.Entity.Batch))
|
||||
{
|
||||
return FFResult().Alert("批次信息不能为空!");
|
||||
}
|
||||
var warehouseId = Wtm.LoginUserInfo.Groups.FirstOrDefault().GroupCode;
|
||||
var dc = Wtm.CreateDC(cskey: "hangyong");
|
||||
Wtm.DC = dc;
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
var _unit = new UnitWork(Wtm);
|
||||
var header = new ReceiptHeader2
|
||||
{
|
||||
WarehouseId = int.Parse(warehouseId),
|
||||
Code = _unitwork.GetSerialNumber("SDR"),
|
||||
Type = "SDR",
|
||||
FirstStatus = 0,
|
||||
LastStatus = 0,
|
||||
TotalLines = 1,
|
||||
TotalQty = 0,
|
||||
};
|
||||
_unit.Add(header);
|
||||
|
||||
vm.Entity.WarehouseId = header.WarehouseId;
|
||||
vm.Entity.ReceiptId = header.ID;
|
||||
vm.Entity.ReceiptCode = header?.Code;
|
||||
vm.Entity.Status = 0;
|
||||
var mater = dc.Set<Material2>()
|
||||
.FirstOrDefault(x => x.ID == int.Parse(vm.Entity.MaterialCode));
|
||||
vm.Entity.MaterialCode = mater?.Code;
|
||||
vm.Entity.Lot = mater?.Specification;
|
||||
vm.Entity.Unit = mater?.MasterUnit;
|
||||
vm.DoAdd();
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
vm.DoReInit();
|
||||
return PartialView(vm);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FFResult().CloseDialog().RefreshPage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user