领料带数量
This commit is contained in:
@@ -217,6 +217,9 @@ namespace DOAN.Model.BZFM.Dto
|
|||||||
|
|
||||||
public string InboundNo { get; set; }
|
public string InboundNo { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "领料数量不能为空")]
|
||||||
|
public decimal Quantity { get; set; }
|
||||||
|
|
||||||
[Required(ErrorMessage = "成品工单号不能为空")]
|
[Required(ErrorMessage = "成品工单号不能为空")]
|
||||||
public string WorkorderRow { get; set; }
|
public string WorkorderRow { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -395,7 +395,11 @@ namespace DOAN.Service.BZFM
|
|||||||
}
|
}
|
||||||
if (inboundInfo.Remarks == "已撤销")
|
if (inboundInfo.Remarks == "已撤销")
|
||||||
{
|
{
|
||||||
return "该记录已撤销,无法领料";
|
return "该记录已撤销,无法领料!";
|
||||||
|
}
|
||||||
|
if(parm.Quantity > inboundInfo.Quantity)
|
||||||
|
{
|
||||||
|
return "领料数量超过记录最大值!";
|
||||||
}
|
}
|
||||||
var workorderInfo = Context.Queryable<ProWorkorder>()
|
var workorderInfo = Context.Queryable<ProWorkorder>()
|
||||||
.Where(it => it.Workorder == inboundInfo.Workorder)
|
.Where(it => it.Workorder == inboundInfo.Workorder)
|
||||||
@@ -406,7 +410,7 @@ namespace DOAN.Service.BZFM
|
|||||||
}
|
}
|
||||||
Context.Ado.BeginTran();
|
Context.Ado.BeginTran();
|
||||||
inboundInfo.WorkorderRaw = parm.WorkorderRow;
|
inboundInfo.WorkorderRaw = parm.WorkorderRow;
|
||||||
inboundInfo.Remarks += "[已领料]";
|
inboundInfo.Remarks += $"[已领料{parm.Quantity}]";
|
||||||
Context.Updateable(inboundInfo).ExecuteCommand();
|
Context.Updateable(inboundInfo).ExecuteCommand();
|
||||||
// 填写出库单
|
// 填写出库单
|
||||||
//做出库红单
|
//做出库红单
|
||||||
@@ -423,9 +427,9 @@ namespace DOAN.Service.BZFM
|
|||||||
// 产成品工单号
|
// 产成品工单号
|
||||||
WorkorderRaw = parm.WorkorderRow,
|
WorkorderRaw = parm.WorkorderRow,
|
||||||
Operator = parm.Operator,
|
Operator = parm.Operator,
|
||||||
Quantity = inboundInfo.Quantity,
|
Quantity = parm.Quantity,
|
||||||
TransactionType = "领料出库",
|
TransactionType = "领料出库",
|
||||||
Remarks = $"领料出库,产成品领料出库,原材料工单{inboundInfo.Workorder},产成品工单{parm.WorkorderRow}",
|
Remarks = $"领料出库,产成品领料出库,原入库单号{inboundInfo.InboundNo},原工单{inboundInfo.Workorder}",
|
||||||
};
|
};
|
||||||
MmInventoryService mmInventoryService = new MmInventoryService();
|
MmInventoryService mmInventoryService = new MmInventoryService();
|
||||||
string result = mmInventoryService.CreateOutboundReceipt(revokeRecepitDto);
|
string result = mmInventoryService.CreateOutboundReceipt(revokeRecepitDto);
|
||||||
|
|||||||
Reference in New Issue
Block a user