其他入库单

This commit is contained in:
admin
2021-01-13 09:02:37 +08:00
parent e80d9390cd
commit 2f91ac58c8
5 changed files with 27 additions and 39 deletions

View File

@@ -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()

View File

@@ -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)
{ {

View File

@@ -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
@@ -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)
{ {

View File

@@ -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
@@ -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)
{ {

View File

@@ -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,7 +231,7 @@ 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;
@@ -239,39 +240,25 @@ namespace NX.ERP.U8
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
{
}
} }