其他入库单
This commit is contained in:
@@ -298,7 +298,7 @@ namespace U8AppMain
|
|||||||
private void toolStripMenuItem2_Click(object sender, EventArgs e)
|
private void toolStripMenuItem2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var a = new NX.ERP.U8.Store.PuStoreInDAL();
|
var a = new NX.ERP.U8.Store.PuStoreInDAL();
|
||||||
a.AddPuStoreIn(new NX.ERP.Model.Store.PuStoreIn()
|
var id= a.AddPuStoreIn(new NX.ERP.Model.Store.PuStoreIn()
|
||||||
{
|
{
|
||||||
Code = "0001",
|
Code = "0001",
|
||||||
//PersonCode = "wx065",
|
//PersonCode = "wx065",
|
||||||
@@ -321,7 +321,8 @@ namespace U8AppMain
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}); ; ;
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void 材料出库单ToolStripMenuItem_Click(object sender, EventArgs e)
|
private void 材料出库单ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
@@ -364,7 +365,7 @@ namespace U8AppMain
|
|||||||
{
|
{
|
||||||
Date=DateTime.Today,
|
Date=DateTime.Today,
|
||||||
Code="111",
|
Code="111",
|
||||||
|
WhCode="2",
|
||||||
details = new List<NX.ERP.Model.Store.OtherStoreInDetail>()
|
details = new List<NX.ERP.Model.Store.OtherStoreInDetail>()
|
||||||
{
|
{
|
||||||
new NX.ERP.Model.Store.OtherStoreInDetail()
|
new NX.ERP.Model.Store.OtherStoreInDetail()
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace NX.ERP.U8.Store
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void AddMaterielStoreOut(MaterielStoreOut storeOut)
|
public string AddMaterielStoreOut(MaterielStoreOut storeOut)
|
||||||
{
|
{
|
||||||
VoucherParameter voucherParameter = new VoucherParameter
|
VoucherParameter voucherParameter = new VoucherParameter
|
||||||
{
|
{
|
||||||
@@ -118,7 +118,7 @@ namespace NX.ERP.U8.Store
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
U8LoginContext.Instance.AddRdVoucher("U8API/MaterialOut/Add", voucherParameter);
|
return U8LoginContext.Instance.AddRdVoucher("U8API/MaterialOut/Add", voucherParameter);
|
||||||
}
|
}
|
||||||
catch (Exception err)
|
catch (Exception err)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace NX.ERP.U8.Store
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void AddVocher(Model.Store.OtherStoreIn storeIn)
|
public string AddVocher(Model.Store.OtherStoreIn storeIn)
|
||||||
{
|
{
|
||||||
|
|
||||||
VoucherParameter voucherParameter = new VoucherParameter
|
VoucherParameter voucherParameter = new VoucherParameter
|
||||||
@@ -37,7 +37,7 @@ namespace NX.ERP.U8.Store
|
|||||||
headXml.setAttribute("brdflag", 1);
|
headXml.setAttribute("brdflag", 1);
|
||||||
headXml.setAttribute("ccode", storeIn.Code);
|
headXml.setAttribute("ccode", storeIn.Code);
|
||||||
headXml.setAttribute("ddate", storeIn.Date);
|
headXml.setAttribute("ddate", storeIn.Date);
|
||||||
headXml.setAttribute("cmaker","/");
|
headXml.setAttribute("cmaker", "/");
|
||||||
headXml.setAttribute("cvouchtype", this.VoucherID);
|
headXml.setAttribute("cvouchtype", this.VoucherID);
|
||||||
headXml.setAttribute("vt_id", "");
|
headXml.setAttribute("vt_id", "");
|
||||||
headXml.setAttribute("editprop", "A");
|
headXml.setAttribute("editprop", "A");
|
||||||
@@ -45,7 +45,7 @@ namespace NX.ERP.U8.Store
|
|||||||
headXml.setAttribute("cpersoncode", "");
|
headXml.setAttribute("cpersoncode", "");
|
||||||
headXml.setAttribute("crdcode", "");
|
headXml.setAttribute("crdcode", "");
|
||||||
|
|
||||||
headXml.setAttribute("csource","库存");
|
headXml.setAttribute("csource", "库存");
|
||||||
headXml.setAttribute("cwhcode", storeIn.WhCode);
|
headXml.setAttribute("cwhcode", storeIn.WhCode);
|
||||||
headXml.setAttribute("cbustype", "其他入库");
|
headXml.setAttribute("cbustype", "其他入库");
|
||||||
headXml.setAttribute("cmemo", "");
|
headXml.setAttribute("cmemo", "");
|
||||||
@@ -61,12 +61,12 @@ namespace NX.ERP.U8.Store
|
|||||||
bodyXml = domBody.createElement("z:row");
|
bodyXml = domBody.createElement("z:row");
|
||||||
bodyXml.setAttribute("cinvcode", detail.InvCode);
|
bodyXml.setAttribute("cinvcode", detail.InvCode);
|
||||||
bodyXml.setAttribute("iquantity", detail.Quantity);
|
bodyXml.setAttribute("iquantity", detail.Quantity);
|
||||||
bodyXml.setAttribute("irowno",n+1);
|
bodyXml.setAttribute("irowno", n + 1);
|
||||||
|
|
||||||
bodyXml.setAttribute("cbatch", "");
|
bodyXml.setAttribute("cbatch", "");
|
||||||
|
|
||||||
bodyXml.setAttribute("cposition", detail.Position);
|
bodyXml.setAttribute("cposition", detail.Position);
|
||||||
bodyXml.setAttribute("cvmivencode","");
|
bodyXml.setAttribute("cvmivencode", "");
|
||||||
bodyXml.setAttribute("dmadedate", "");
|
bodyXml.setAttribute("dmadedate", "");
|
||||||
bodyXml.setAttribute("dvdate", "");
|
bodyXml.setAttribute("dvdate", "");
|
||||||
bodyXml.setAttribute("iexpiratdatecalcu", "");
|
bodyXml.setAttribute("iexpiratdatecalcu", "");
|
||||||
@@ -86,7 +86,7 @@ namespace NX.ERP.U8.Store
|
|||||||
Console.WriteLine(str);
|
Console.WriteLine(str);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
U8LoginContext.Instance.AddRdVoucher("U8API/PuStoreIn/Add", voucherParameter);
|
return U8LoginContext.Instance.AddRdVoucher("U8API/PuStoreIn/Add", voucherParameter);
|
||||||
}
|
}
|
||||||
catch (Exception err)
|
catch (Exception err)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace NX.ERP.U8.Store
|
|||||||
/// 保存一个采购到货单
|
/// 保存一个采购到货单
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="puStoreIn"></param>
|
/// <param name="puStoreIn"></param>
|
||||||
public void AddPuStoreIn(Model.Store.PuStoreIn puStoreIn)
|
public string AddPuStoreIn(Model.Store.PuStoreIn puStoreIn)
|
||||||
{
|
{
|
||||||
|
|
||||||
VoucherParameter voucherParameter = new VoucherParameter
|
VoucherParameter voucherParameter = new VoucherParameter
|
||||||
@@ -63,7 +63,7 @@ namespace NX.ERP.U8.Store
|
|||||||
headXml.setAttribute("darvdate", Arrival.Date);
|
headXml.setAttribute("darvdate", Arrival.Date);
|
||||||
headXml.setAttribute("itaxrate", Arrival.TaxRate);
|
headXml.setAttribute("itaxrate", Arrival.TaxRate);
|
||||||
headXml.setAttribute("cptcode", Arrival.PTCode);
|
headXml.setAttribute("cptcode", Arrival.PTCode);
|
||||||
|
|
||||||
IXMLDOMElement bodyXml;
|
IXMLDOMElement bodyXml;
|
||||||
for (var n = 0; n < puStoreIn.PuStoreInDetails.Count; n++)
|
for (var n = 0; n < puStoreIn.PuStoreInDetails.Count; n++)
|
||||||
{
|
{
|
||||||
@@ -110,7 +110,7 @@ namespace NX.ERP.U8.Store
|
|||||||
Console.WriteLine(str);
|
Console.WriteLine(str);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
U8LoginContext.Instance.AddRdVoucher("U8API/PuStoreIn/Add", voucherParameter);
|
return U8LoginContext.Instance.AddRdVoucher("U8API/PuStoreIn/Add", voucherParameter);
|
||||||
}
|
}
|
||||||
catch (Exception err)
|
catch (Exception err)
|
||||||
{
|
{
|
||||||
@@ -122,6 +122,6 @@ namespace NX.ERP.U8.Store
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,8 +175,9 @@ namespace NX.ERP.U8
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void AddRdVoucher(string URL, VoucherParameter para)
|
public string AddRdVoucher(string URL, VoucherParameter para)
|
||||||
{
|
{
|
||||||
|
string VoucherId;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
U8EnvContext u8EnvContext = new U8EnvContext();
|
U8EnvContext u8EnvContext = new U8EnvContext();
|
||||||
@@ -230,48 +231,34 @@ namespace NX.ERP.U8
|
|||||||
para.ReturnValue = false;
|
para.ReturnValue = false;
|
||||||
|
|
||||||
u8ApiBroker.Release();
|
u8ApiBroker.Release();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
para.ReturnValue = Convert.ToBoolean(u8ApiBroker.GetReturnValue());
|
para.ReturnValue = Convert.ToBoolean(u8ApiBroker.GetReturnValue());
|
||||||
para.DOMMsg = u8ApiBroker.GetResult("domMsg") as DOMDocument;
|
para.DOMMsg = u8ApiBroker.GetResult("domMsg") as DOMDocument;
|
||||||
|
|
||||||
para.ErrMsg = u8ApiBroker.GetResult("errMsg") as string;
|
para.ErrMsg = u8ApiBroker.GetResult("errMsg") as string;
|
||||||
if (para.ReturnValue)
|
if (para.ReturnValue)
|
||||||
{
|
{
|
||||||
para.VoucherId = u8ApiBroker.GetResult("VouchId") as string;
|
para.VoucherId = u8ApiBroker.GetResult("VouchId") as string;
|
||||||
if (para.VoucherType.Equals("12"))
|
VoucherId = para.VoucherId;
|
||||||
{
|
|
||||||
//para.VoucherCode = base.Util.GetTransVoucherCode(para.VoucherId);
|
|
||||||
}
|
|
||||||
else if (para.VoucherType.Equals("18"))
|
|
||||||
{
|
|
||||||
//para.VoucherCode = base.Util.GetCheckVoucherCode(para.VoucherId);
|
|
||||||
}
|
|
||||||
else if (para.VoucherType.Equals("19"))
|
|
||||||
{
|
|
||||||
// para.VoucherCode = base.Util.GetAdjustVoucherCode(para.VoucherId);
|
|
||||||
//if (base.Util.dbHelper.U8ExcuteNoneQuery("Update AdjustPVouchs Set cVouchCode = '" + para.VoucherCode + "' Where id = " + para.VoucherId) == 0)
|
|
||||||
//{
|
|
||||||
// para.ErrMsg = "更新货位调整单子表单号失败!";
|
|
||||||
// para.ReturnValue = false;
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//para.VoucherCode = base.Util.GetSTVoucherCode(para.VoucherId, para.VoucherType);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new Exception(para.ErrMsg);
|
throw new Exception(para.ErrMsg);
|
||||||
}
|
}
|
||||||
u8ApiBroker.Release();
|
u8ApiBroker.Release();
|
||||||
|
return VoucherId;
|
||||||
}
|
}
|
||||||
catch (Exception ex3)
|
catch (Exception ex3)
|
||||||
{
|
{
|
||||||
|
|
||||||
throw ex3;
|
throw ex3;
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user