diff --git a/NX.ERP.Model/NX.ERP.Model.csproj b/NX.ERP.Model/NX.ERP.Model.csproj
index efb09d0..c18bb5e 100644
--- a/NX.ERP.Model/NX.ERP.Model.csproj
+++ b/NX.ERP.Model/NX.ERP.Model.csproj
@@ -64,6 +64,10 @@
+
+
+
+
diff --git a/NX.ERP.Model/Request/ProductStoreIn.cs b/NX.ERP.Model/Request/ProductStoreIn.cs
new file mode 100644
index 0000000..2f42b9e
--- /dev/null
+++ b/NX.ERP.Model/Request/ProductStoreIn.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace NX.ERP.Model.Request
+{
+ public class ProductStoreIn
+ {
+ public DateTime Date { get; set; }
+ public string Source { get; set; }
+ public string SourceCode { get; set; }
+ public string WhCode { get; set; }
+ public IList Details { get; set; } = new List();
+ }
+}
diff --git a/NX.ERP.Model/Request/ProductStoreInDetail.cs b/NX.ERP.Model/Request/ProductStoreInDetail.cs
new file mode 100644
index 0000000..9bec114
--- /dev/null
+++ b/NX.ERP.Model/Request/ProductStoreInDetail.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace NX.ERP.Model.Request
+{
+ public class ProductStoreInDetail
+ {
+ public string InvCode { get; set; }
+ public int Quantity { get; set; }
+ public string Batch { get; set; }
+ public string Position { get; set; }
+ public int SourceDetailId { get; set; }
+ }
+}
diff --git a/NX.ERP.Model/Request/SaleStoreOut.cs b/NX.ERP.Model/Request/SaleStoreOut.cs
new file mode 100644
index 0000000..118a8ac
--- /dev/null
+++ b/NX.ERP.Model/Request/SaleStoreOut.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace NX.ERP.Model.Request
+{
+ public class SaleStoreOut
+ {
+ public string Code { get; set; }
+ public string Source { get; set; }
+ public string SourceCode { get; set; }
+ public DateTime Date { get; set; }
+ public string WhCode { get; set; }
+ public IList Details { get; set; } = new List();
+ }
+}
diff --git a/NX.ERP.Model/Request/SaleStoreOutDetail.cs b/NX.ERP.Model/Request/SaleStoreOutDetail.cs
new file mode 100644
index 0000000..b8d73a3
--- /dev/null
+++ b/NX.ERP.Model/Request/SaleStoreOutDetail.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace NX.ERP.Model.Request
+{
+ public class SaleStoreOutDetail
+ {
+ public string InvCode { get; set; }
+ public double Quantity { get; set; }
+ public string Position { get; set; }
+ public int SourceDetailId { get; set; }
+ }
+
+}
diff --git a/NX.ERP.U8.App/App.config b/NX.ERP.U8.App/App.config
index 46377e3..b4276b0 100644
--- a/NX.ERP.U8.App/App.config
+++ b/NX.ERP.U8.App/App.config
@@ -5,6 +5,7 @@
+
diff --git a/NX.ERP.U8.App/Bom/ufinterface.cs b/NX.ERP.U8.App/Bom/ufinterface.cs
index bac80cf..ff56344 100644
--- a/NX.ERP.U8.App/Bom/ufinterface.cs
+++ b/NX.ERP.U8.App/Bom/ufinterface.cs
@@ -11,7 +11,7 @@ namespace U8AppMain.Bom
//sender="003" receiver="u8" roottag="Bom" docid="971742630" proc="add" codeexchanged="N" exportneedexch="N" paginate="0" display="物料清单" family="生产制造" timestamp="0x000000000027B6E6"
[System.Xml.Serialization.XmlAttribute]
- public string sender { get; set; } = "003";
+ public string sender { get; set; } = System.Configuration.ConfigurationManager.AppSettings["eai_sender"];
[System.Xml.Serialization.XmlAttribute]
public string receiver { get; set; } = "u8";
[System.Xml.Serialization.XmlAttribute]
diff --git a/NX.ERP.U8.App/FrmMain.Designer.cs b/NX.ERP.U8.App/FrmMain.Designer.cs
index 5e16c30..280858e 100644
--- a/NX.ERP.U8.App/FrmMain.Designer.cs
+++ b/NX.ERP.U8.App/FrmMain.Designer.cs
@@ -37,6 +37,8 @@ namespace U8AppMain
this.材料出库单ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.其他入库ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.其他出库ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.销售出库ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.成品入库ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.导入ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ImportBom = new System.Windows.Forms.ToolStripMenuItem();
this.BtnPurchaseImport = new System.Windows.Forms.ToolStripMenuItem();
@@ -46,9 +48,8 @@ namespace U8AppMain
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
- this.销售出库ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.成品入库ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
@@ -96,6 +97,7 @@ namespace U8AppMain
this.登录ToolStripMenuItem.Name = "登录ToolStripMenuItem";
this.登录ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.登录ToolStripMenuItem.Text = "登录";
+ this.登录ToolStripMenuItem.Visible = false;
this.登录ToolStripMenuItem.Click += new System.EventHandler(this.登录ToolStripMenuItem_Click);
//
// toolStripMenuItem2
@@ -103,6 +105,7 @@ namespace U8AppMain
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 22);
this.toolStripMenuItem2.Text = "采购入库单";
+ this.toolStripMenuItem2.Visible = false;
this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
//
// 材料出库单ToolStripMenuItem
@@ -110,6 +113,7 @@ namespace U8AppMain
this.材料出库单ToolStripMenuItem.Name = "材料出库单ToolStripMenuItem";
this.材料出库单ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.材料出库单ToolStripMenuItem.Text = "材料出库单";
+ this.材料出库单ToolStripMenuItem.Visible = false;
this.材料出库单ToolStripMenuItem.Click += new System.EventHandler(this.材料出库单ToolStripMenuItem_Click);
//
// 其他入库ToolStripMenuItem
@@ -117,6 +121,7 @@ namespace U8AppMain
this.其他入库ToolStripMenuItem.Name = "其他入库ToolStripMenuItem";
this.其他入库ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.其他入库ToolStripMenuItem.Text = "其他入库";
+ this.其他入库ToolStripMenuItem.Visible = false;
this.其他入库ToolStripMenuItem.Click += new System.EventHandler(this.其他入库ToolStripMenuItem_Click);
//
// 其他出库ToolStripMenuItem
@@ -124,8 +129,25 @@ namespace U8AppMain
this.其他出库ToolStripMenuItem.Name = "其他出库ToolStripMenuItem";
this.其他出库ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.其他出库ToolStripMenuItem.Text = "其他出库";
+ this.其他出库ToolStripMenuItem.Visible = false;
this.其他出库ToolStripMenuItem.Click += new System.EventHandler(this.其他出库ToolStripMenuItem_Click);
//
+ // 销售出库ToolStripMenuItem
+ //
+ this.销售出库ToolStripMenuItem.Name = "销售出库ToolStripMenuItem";
+ this.销售出库ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.销售出库ToolStripMenuItem.Text = "销售出库";
+ this.销售出库ToolStripMenuItem.Visible = false;
+ this.销售出库ToolStripMenuItem.Click += new System.EventHandler(this.销售出库ToolStripMenuItem_Click);
+ //
+ // 成品入库ToolStripMenuItem
+ //
+ this.成品入库ToolStripMenuItem.Name = "成品入库ToolStripMenuItem";
+ this.成品入库ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.成品入库ToolStripMenuItem.Text = " 成品入库";
+ this.成品入库ToolStripMenuItem.Visible = false;
+ this.成品入库ToolStripMenuItem.Click += new System.EventHandler(this.成品入库ToolStripMenuItem_Click);
+ //
// 导入ToolStripMenuItem
//
this.导入ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -139,21 +161,21 @@ namespace U8AppMain
// ImportBom
//
this.ImportBom.Name = "ImportBom";
- this.ImportBom.Size = new System.Drawing.Size(113, 22);
+ this.ImportBom.Size = new System.Drawing.Size(180, 22);
this.ImportBom.Text = "BOM";
this.ImportBom.Click += new System.EventHandler(this.ImportBom_Click);
//
// BtnPurchaseImport
//
this.BtnPurchaseImport.Name = "BtnPurchaseImport";
- this.BtnPurchaseImport.Size = new System.Drawing.Size(113, 22);
+ this.BtnPurchaseImport.Size = new System.Drawing.Size(180, 22);
this.BtnPurchaseImport.Text = "请购单";
this.BtnPurchaseImport.Click += new System.EventHandler(this.BtnPurchaseImport_Click);
//
// 领料单ToolStripMenuItem
//
this.领料单ToolStripMenuItem.Name = "领料单ToolStripMenuItem";
- this.领料单ToolStripMenuItem.Size = new System.Drawing.Size(113, 22);
+ this.领料单ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.领料单ToolStripMenuItem.Text = "领料单";
this.领料单ToolStripMenuItem.Click += new System.EventHandler(this.领料单ToolStripMenuItem_Click);
//
@@ -168,8 +190,9 @@ namespace U8AppMain
// 打印ToolStripMenuItem1
//
this.打印ToolStripMenuItem1.Name = "打印ToolStripMenuItem1";
- this.打印ToolStripMenuItem1.Size = new System.Drawing.Size(100, 22);
+ this.打印ToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
this.打印ToolStripMenuItem1.Text = "打印";
+ this.打印ToolStripMenuItem1.Visible = false;
this.打印ToolStripMenuItem1.Click += new System.EventHandler(this.打印ToolStripMenuItem1_Click);
//
// splitContainer1
@@ -224,20 +247,6 @@ namespace U8AppMain
this.richTextBox1.Text = "";
this.richTextBox1.TextChanged += new System.EventHandler(this.richTextBox1_TextChanged);
//
- // 销售出库ToolStripMenuItem
- //
- this.销售出库ToolStripMenuItem.Name = "销售出库ToolStripMenuItem";
- this.销售出库ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
- this.销售出库ToolStripMenuItem.Text = "销售出库";
- this.销售出库ToolStripMenuItem.Click += new System.EventHandler(this.销售出库ToolStripMenuItem_Click);
- //
- // 成品入库ToolStripMenuItem
- //
- this.成品入库ToolStripMenuItem.Name = "成品入库ToolStripMenuItem";
- this.成品入库ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
- this.成品入库ToolStripMenuItem.Text = " 成品入库";
- this.成品入库ToolStripMenuItem.Click += new System.EventHandler(this.成品入库ToolStripMenuItem_Click);
- //
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
@@ -254,6 +263,7 @@ namespace U8AppMain
this.menuStrip1.PerformLayout();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
diff --git a/NX.ERP.U8.App/FrmMain.cs b/NX.ERP.U8.App/FrmMain.cs
index db421b2..e37b416 100644
--- a/NX.ERP.U8.App/FrmMain.cs
+++ b/NX.ERP.U8.App/FrmMain.cs
@@ -398,22 +398,21 @@ namespace U8AppMain
private void 销售出库ToolStripMenuItem_Click(object sender, EventArgs e)
{
var dal = new NX.ERP.U8.Store.SaleOutDAL();
- dal.AddVoucher(new NX.ERP.Model.Store.SaleStoreOut()
+ dal.AddVoucher(new NX.ERP.Model.Request.SaleStoreOut()
{
Code = "222",
Source = "发货单",
SourceCode = "XSFH210100009",
WhCode = "1",
Date = DateTime.Now,
- Details = new List()
+ Details = new List()
{
- new NX.ERP.Model.Store.SaleStoreOutDetail()
+ new NX.ERP.Model.Request.SaleStoreOutDetail()
{
InvCode="902112",
Position="",
Quantity=1,
SourceDetailId=2921
-
}
}
@@ -423,14 +422,14 @@ namespace U8AppMain
private void 成品入库ToolStripMenuItem_Click(object sender, EventArgs e)
{
var dal = new NX.ERP.U8.Store.ProductInDAL();
- dal.AddVoucher(new NX.ERP.Model.Store.ProductStoreIn()
+ dal.AddVoucher(new NX.ERP.Model.Request.ProductStoreIn()
{
Source = "生产订单",
SourceCode = "SCDD200900013",
Date = DateTime.Today,
WhCode = "1",
- Details = new List() {
- new NX.ERP.Model.Store.ProductStoreInDetail()
+ Details = new List() {
+ new NX.ERP.Model.Request.ProductStoreInDetail()
{
Batch="",
InvCode="904005",
diff --git a/NX.ERP.U8.App/FrmMain.resx b/NX.ERP.U8.App/FrmMain.resx
index 3e14bf8..d5494e3 100644
--- a/NX.ERP.U8.App/FrmMain.resx
+++ b/NX.ERP.U8.App/FrmMain.resx
@@ -112,12 +112,12 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
17, 17
\ No newline at end of file
diff --git a/NX.ERP.U8.App/NX.ERP.U8.App.csproj b/NX.ERP.U8.App/NX.ERP.U8.App.csproj
index 66688ab..3e78426 100644
--- a/NX.ERP.U8.App/NX.ERP.U8.App.csproj
+++ b/NX.ERP.U8.App/NX.ERP.U8.App.csproj
@@ -14,6 +14,21 @@
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ false
+ true
x86
@@ -143,5 +158,12 @@
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
\ No newline at end of file
diff --git a/NX.ERP.U8.App/Purchase/ufinterface.cs b/NX.ERP.U8.App/Purchase/ufinterface.cs
index 36682fe..143624f 100644
--- a/NX.ERP.U8.App/Purchase/ufinterface.cs
+++ b/NX.ERP.U8.App/Purchase/ufinterface.cs
@@ -17,11 +17,11 @@ namespace U8AppMain.Purchase
[System.Xml.Serialization.XmlAttribute]
public string billtype { get; set; } = "";
[System.Xml.Serialization.XmlAttribute]
- public string docid { get; set; } = "123";
+ public string docid { get; set; } = System.Configuration.ConfigurationManager.AppSettings["eai_sender"];
[System.Xml.Serialization.XmlAttribute]
public string receiver { get; set; } = "u8";
[System.Xml.Serialization.XmlAttribute]
- public string sender { get; set; } = "003";
+ public string sender { get; set; } = "003";//TODO
[System.Xml.Serialization.XmlAttribute]
public string proc { get; set; } = "add";
diff --git a/NX.ERP.U8.App/Voucher/VoucherDAL.cs b/NX.ERP.U8.App/Voucher/VoucherDAL.cs
index aeb52f2..9ed4f34 100644
--- a/NX.ERP.U8.App/Voucher/VoucherDAL.cs
+++ b/NX.ERP.U8.App/Voucher/VoucherDAL.cs
@@ -37,6 +37,9 @@ namespace U8AppMain.Voucher
public bool Add(Vouch vouch)
{
+ string accid = NX.ERP.U8.U8LoginContext.Instance.cAcc_id;
+
+
var conn = new SqlConnection(this._connStr);
conn.Open();
var trans = conn.BeginTransaction();
@@ -45,7 +48,7 @@ namespace U8AppMain.Voucher
//获取ID
var idEnity = new IdEnity
{
- cAcc_Id = "003",
+ cAcc_Id = accid,//TODO
cVouchType = "mv",
iAmount = vouch.Vouchs.Count()
};
diff --git a/NX.ERP.U8/Store/ProductInDAL.cs b/NX.ERP.U8/Store/ProductInDAL.cs
index 2f6fd85..04b7324 100644
--- a/NX.ERP.U8/Store/ProductInDAL.cs
+++ b/NX.ERP.U8/Store/ProductInDAL.cs
@@ -1,5 +1,5 @@
using MSXML2;
-using NX.ERP.Model.Store;
+using NX.ERP.Model.Request;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -36,12 +36,12 @@ namespace NX.ERP.U8.Store
headXml.setAttribute("ccode", "11");
headXml.setAttribute("ddate", storeIn.Date);
headXml.setAttribute("cmaker", "");
-
+
headXml.setAttribute("vt_id", "63");
headXml.setAttribute("editprop", "A");
headXml.setAttribute("cdepcode", "");
headXml.setAttribute("cpersoncode", "");
- headXml.setAttribute("crdcode", "");
+ headXml.setAttribute("crdcode", "102");
if (storeIn.Source == "生产订单")
{
diff --git a/NX.ERP.U8/Store/SaleOutDAL.cs b/NX.ERP.U8/Store/SaleOutDAL.cs
index 17531cc..2da183e 100644
--- a/NX.ERP.U8/Store/SaleOutDAL.cs
+++ b/NX.ERP.U8/Store/SaleOutDAL.cs
@@ -1,5 +1,5 @@
using MSXML2;
-using NX.ERP.Model.Store;
+using NX.ERP.Model.Request;
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/NX.ERP.WebAPi/Controllers/Store/ProductStoreInController.cs b/NX.ERP.WebAPi/Controllers/Store/ProductStoreInController.cs
new file mode 100644
index 0000000..159d477
--- /dev/null
+++ b/NX.ERP.WebAPi/Controllers/Store/ProductStoreInController.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Http;
+
+namespace NX.ERP.WebAPi.Controllers.Store
+{
+ public class ProductStoreInController: ApiController
+ {
+ [Route("api/ProductStoreIn/Add")]
+ [HttpPost]
+ public object AddVoucher([FromBody] Model.Request.ProductStoreIn storeIn)
+ {
+ var dal = new NX.ERP.U8.Store.ProductInDAL();
+ return new { Id = dal.AddVoucher(storeIn) };
+ }
+ }
+}
\ No newline at end of file
diff --git a/NX.ERP.WebAPi/Controllers/Store/SaleStoreOutController.cs b/NX.ERP.WebAPi/Controllers/Store/SaleStoreOutController.cs
new file mode 100644
index 0000000..073f7da
--- /dev/null
+++ b/NX.ERP.WebAPi/Controllers/Store/SaleStoreOutController.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Http;
+
+namespace NX.ERP.WebAPi.Controllers.Store
+{
+ public class SaleStoreOutController : ApiController
+ {
+ [Route("api/SaleStoreOut/Add")]
+ [HttpPost]
+ public object AddVoucher([FromBody] Model.Request.SaleStoreOut storeIn)
+ {
+ var dal = new NX.ERP.U8.Store.SaleOutDAL();
+ return new { Id = dal.AddVoucher(storeIn) };
+ }
+ }
+}
\ No newline at end of file
diff --git a/NX.ERP.WebAPi/NX.ERP.WebAPi.csproj b/NX.ERP.WebAPi/NX.ERP.WebAPi.csproj
index 120433a..86a5b0b 100644
--- a/NX.ERP.WebAPi/NX.ERP.WebAPi.csproj
+++ b/NX.ERP.WebAPi/NX.ERP.WebAPi.csproj
@@ -161,7 +161,9 @@
+
+