diff --git a/PDAForm/PDAForm/Bill/AsnBill/frmAsnBill.cs b/PDAForm/PDAForm/Bill/AsnBill/frmAsnBill.cs
index 66d5a83..b9c2337 100644
--- a/PDAForm/PDAForm/Bill/AsnBill/frmAsnBill.cs
+++ b/PDAForm/PDAForm/Bill/AsnBill/frmAsnBill.cs
@@ -72,7 +72,7 @@ namespace PDAForm.Bill.AsnBill
{
if (m_base == null) throw new Exception("请先扫ASN编号!");
- string BarCode = this.txtBarCode.Text.Trim();
+ string BarCode = this.txtBarCode.Text.Trim().Split('#')[0];
if (BarCode.Length < 0)
{
MyMessageBox.ShowErrorMessage("托盘号不能为空!");
diff --git a/Stone.WinForm/Stone.WinBiz/BasicData/F_Base.cs b/Stone.WinForm/Stone.WinBiz/BasicData/F_Base.cs
index e756086..c0414b1 100644
--- a/Stone.WinForm/Stone.WinBiz/BasicData/F_Base.cs
+++ b/Stone.WinForm/Stone.WinBiz/BasicData/F_Base.cs
@@ -127,8 +127,11 @@ namespace Stone.WinBiz.BasicData
///
public virtual void Checking(DataRow drData, bool isNew)
{
- if (drData["Code"].ToString().Trim() == "")
- throw new Exception("代码不能为空!");
+ if (drData.Table.Columns.Contains("Code"))
+ {
+ if (drData["Code"].ToString().Trim() == "")
+ throw new Exception("代码不能为空!");
+ }
if (isNew)
{
diff --git a/Stone.WinForm/Stone.WinBiz/Stone.WinBiz.csproj b/Stone.WinForm/Stone.WinBiz/Stone.WinBiz.csproj
index 7158040..cfe299a 100644
--- a/Stone.WinForm/Stone.WinBiz/Stone.WinBiz.csproj
+++ b/Stone.WinForm/Stone.WinBiz/Stone.WinBiz.csproj
@@ -83,6 +83,7 @@
+
diff --git a/Stone.WinForm/Stone.WinForm/frmMain.cs b/Stone.WinForm/Stone.WinForm/frmMain.cs
index e30725e..ce4070e 100644
--- a/Stone.WinForm/Stone.WinForm/frmMain.cs
+++ b/Stone.WinForm/Stone.WinForm/frmMain.cs
@@ -177,7 +177,8 @@ namespace Stone.WinForm
if (e.Node.Text == "ASN单流水管理")
{
- Stone.WinModule.BasicData.frmASNManager frm = new WinModule.BasicData.frmASNManager();
+ Stone.WinModule.BasicData.frmBillNO frm = new WinModule.BasicData.frmBillNO();
+ frm.m_Base = new WinBiz.BasicData.F_BillNO();
frm.Text = "ASN单流水管理";
ShowWindow(frm);
}
diff --git a/Stone.WinForm/Stone.WinModule/BasicData/F_Factory.cs b/Stone.WinForm/Stone.WinModule/BasicData/F_Factory.cs
index 9ac536e..46b1c1f 100644
--- a/Stone.WinForm/Stone.WinModule/BasicData/F_Factory.cs
+++ b/Stone.WinForm/Stone.WinModule/BasicData/F_Factory.cs
@@ -109,6 +109,13 @@ namespace Stone.WinModule.BasicData
frm.m_Base = f_base;
return frm;
}
+
+ if (f_base.type == "BillNO")
+ {
+ frmBillNODetail frm = new frmBillNODetail();
+ frm.m_Base = f_base;
+ return frm;
+ }
return null;
}
}
diff --git a/Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs b/Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs
index a01b661..734e5bc 100644
--- a/Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs
+++ b/Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs
@@ -481,9 +481,23 @@ namespace Stone.WinModule.Standard
{
if (!MyMessageBox.ShowQuestion($"【{AsnNumber}】已创建,是否要重新生成?")) return;
}
- string partCode = this.dgrdView.SelectedRows[0].Cells["PartNumber"].Value.ToString();
+ string LabelDate = this.dgrdView.SelectedRows[0].Cells["LabelDate"].Value.ToString();
+ //对ASN进行赋值
+ Entity_t_JIS_VDA t_jis_vda = new Entity_t_JIS_VDA();
+ var strsql = $"select distinct PartType from t_PartPONumber where Code in (select PartNumber from t_JIS_VDA where LabelDate = '{LabelDate}')";
+ var db = new LocalDBService();
+ var dsPartType = db.Exec_DataSet(strsql);
+ for (int i = 0; i < dsPartType.Tables[0].Rows.Count; i++)
+ {
+ //背板是SJB00001和侧翼是SJC00002
+ var partType = dsPartType.Tables[0].Rows[i]["PartType"].ToString();
+ var asnNum = GetVDA_AsnLiushui(db, partType, 5);
+ t_jis_vda.Edit(
+ $"[AsnNumber]='{asnNum}'",
+ $"LabelDate = '{LabelDate}' and [PartNumber] in (select Code from t_PartPONumber where PartType = '{partType}')");
+ }
Search("");
btnSerach_Click(sender, null);
@@ -944,7 +958,7 @@ namespace Stone.WinModule.Standard
//导入的列数
var coloumnCount = dsData.Tables[0].Columns.Count;
//零件号所在的行 从0开始
- var partRowIndex = 6;
+ var partRowIndex = 7;
//零件号所在的列数 从0 开始
var partIndex = 2;
//校验零件号是否有订单信息
@@ -997,7 +1011,7 @@ namespace Stone.WinModule.Standard
drInput["fileType"] = "SY88";
drInput["LabelDate"] = dt.ToString("yyyy-MM-dd") + " " + DPTime + ":00";
drInput["Date"] = dt;
- drInput["AsnNumber"] = asnNum;
+ drInput["AsnNumber"] = "";
drInput["PartNumber"] = dr[partIndex];
drInput["Qty"] = planQty;
//todo 从基础数据表获取PO
@@ -1027,20 +1041,11 @@ namespace Stone.WinModule.Standard
}
}
}
- //对ASN进行赋值
- foreach (var partType in lstPartType)
- {
- //背板是SJB00001和侧翼是SJC00002
- var asnNum = GetVDA_AsnLiushui(db, partType, 5);
- t_Input.Edit(
- $"[AsnNumber]='{asnNum}'",
- $"[PartNumber] in (select Code from t_PartPONumber where PartType = '{partType}'");
- }
}
private string GetVDA_AsnLiushui(LocalDBService db, string type, int len)
{
- string value = db.Exec_Object("exec p_GetBillNo 'ASN流水号_"+type).ToString();
+ string value = db.Exec_Object("exec p_GetBillNo 'ASN流水号_"+type+ "'").ToString();
return type + MyStrings.PadLeftString(value, '0', len);
}
diff --git a/Stone.WinForm/Stone.WinModule/Stone.WinModule.csproj b/Stone.WinForm/Stone.WinModule/Stone.WinModule.csproj
index 20c44b8..123f177 100644
--- a/Stone.WinForm/Stone.WinModule/Stone.WinModule.csproj
+++ b/Stone.WinForm/Stone.WinModule/Stone.WinModule.csproj
@@ -166,6 +166,18 @@
frmErrLog.cs
+
+ Form
+
+
+ frmBillNO.cs
+
+
+ Form
+
+
+ frmBillNODetail.cs
+
Form
@@ -700,6 +712,9 @@
frmErrLog.cs
+
+ frmBillNODetail.cs
+
frmPartPODetail.cs