所有erp单据视图
This commit is contained in:
1 parent
f327041e9a
commit
e2dead6c3f
13 files changed
+864
-77
No files matched your search
@@ -17,11 +17,8 @@ namespace HHWMS.Web.Controllers;
|
||||
[ActionDescription("生产工单领料")]
|
||||
public class XWMSMFMController : BaseController
|
||||
{
|
||||
private readonly IUnitWork _unitWork;
|
||||
|
||||
public XWMSMFMController(IUnitWork unitWork)
|
||||
public XWMSMFMController()
|
||||
{
|
||||
_unitWork = unitWork;
|
||||
}
|
||||
|
||||
#region Search
|
||||
@@ -85,6 +82,7 @@ public class XWMSMFMController : BaseController
|
||||
RETEXTCOE_0 = x.Field<decimal>("RETEXTCOE_0"),
|
||||
RETQTY_0 = x.Field<decimal>("RETQTY_0"),
|
||||
USEQTY_0 = x.Field<decimal>("USEQTY_0"),
|
||||
THISQTYSTU = "",
|
||||
WMD_USEQTY_0 = x.Field<decimal>("WMD_USEQTY_0"),
|
||||
}
|
||||
).ToList();
|
||||
@@ -92,4 +90,45 @@ public class XWMSMFMController : BaseController
|
||||
}
|
||||
|
||||
#endregion Search
|
||||
|
||||
[HttpPost]
|
||||
[FixConnection(CsName = "hangyong")]
|
||||
public ActionResult Create(List<XWMSMFM> data)
|
||||
{
|
||||
var _unitwork = new UnitWork(Wtm);
|
||||
|
||||
var shipment = new ShipmentHeader2();
|
||||
shipment.Code = _unitwork.GetSerialNumber("SCC");
|
||||
shipment.Type = "SCC";
|
||||
shipment.FirstStatus = 0;
|
||||
shipment.UserDef1 = data.FirstOrDefault().MFGFCY_0;
|
||||
|
||||
_unitwork.Add(shipment);
|
||||
|
||||
var detailList = new List<ShipmentDetail2>();
|
||||
foreach (var item in data)
|
||||
{
|
||||
var detail = new ShipmentDetail2();
|
||||
detail.ZoneCode = "L";
|
||||
detail.ShipmentId = shipment.ID;
|
||||
detail.ShipmentCode = shipment.Code;
|
||||
detail.SourceCode = item.MFGNUM_0;
|
||||
detail.SourceLine = item.MFGLIN_0.ToString();
|
||||
detail.MaterialCode = item.ITMREF_0;
|
||||
detail.MaterialName = item.ITMDES1_0;
|
||||
detail.Lot = item.ITMDES2_0;
|
||||
detail.Qty = item.THISQTYSTU;
|
||||
detail.Unit = item.BOMSEQ_0.ToString();
|
||||
//detail.PurchasQty = item.THISQTYUOM;
|
||||
//detail.PurchasUnits = item.UOM_0;
|
||||
//detail.InventoryStatus = item.STA_0;
|
||||
//detail.Batch = _unitwork.GetSerialNumber("HYB", 5).Remove(3, 2);
|
||||
detail.Status = 0;
|
||||
detail.CreateTime = DateTime.Now;
|
||||
detailList.Add(detail);
|
||||
}
|
||||
_unitwork.BatchAdd(detailList.ToArray());
|
||||
|
||||
return JsonMore(null);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user