其他入库修改
This commit is contained in:
@@ -93,11 +93,41 @@ namespace NX.ERP.U8.Store
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
public bool UpdateVocher(Model.Request.OtherStoreInOut storeIn)
|
||||
|
||||
|
||||
public string SaveVoucher(Model.Request.OtherStoreInOut storeIn)
|
||||
{
|
||||
var voucherParameter = this.LoadVoucher($"id='{storeIn.Id}'");
|
||||
if (voucherParameter.DomHead.selectSingleNode("//rs:data").childNodes.length == 0)
|
||||
{
|
||||
return this.AddVocher(storeIn);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.UpdateVocher(storeIn, voucherParameter))
|
||||
{
|
||||
return storeIn.Id.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("保存错误");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public bool UpdateVocher(Model.Request.OtherStoreInOut storeIn, VoucherParameter voucherParameter = null)
|
||||
{
|
||||
|
||||
|
||||
VoucherParameter voucherParameter = this.LoadVoucher($"id='{storeIn.Id}'");
|
||||
if (voucherParameter == null)
|
||||
{
|
||||
voucherParameter = this.LoadVoucher($"id='{storeIn.Id}'");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -112,7 +142,7 @@ namespace NX.ERP.U8.Store
|
||||
bodyXml = domBody.createElement("z:row");
|
||||
bodyXml.setAttribute("cinvcode", detail.InvCode);
|
||||
bodyXml.setAttribute("iquantity", detail.Quantity);
|
||||
|
||||
|
||||
|
||||
bodyXml.setAttribute("cbatch", "");
|
||||
|
||||
@@ -129,12 +159,12 @@ namespace NX.ERP.U8.Store
|
||||
bodyXml.setAttribute("citemcode", "");
|
||||
bodyXml.setAttribute("cbmemo", "");
|
||||
bodyXml.setAttribute("editprop", "A");
|
||||
|
||||
|
||||
bodyXml.setAttribute("irowno", domBody.selectSingleNode("//rs:data").childNodes.length + 1);
|
||||
domBody.selectSingleNode("//rs:data").appendChild(bodyXml);
|
||||
|
||||
}
|
||||
|
||||
|
||||
var str = voucherParameter.DomBody.xml;
|
||||
Console.WriteLine(str);
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user