Browse Source

NA发运校验,ASN调整功能提交

STD_NA
金浩 2 days ago
parent
commit
5702d99e05
  1. 2
      PDAForm/PDAForm/Bill/AsnBill/frmAsnBill.cs
  2. 7
      Stone.WinForm/Stone.WinBiz/BasicData/F_Base.cs
  3. 1
      Stone.WinForm/Stone.WinBiz/Stone.WinBiz.csproj
  4. 3
      Stone.WinForm/Stone.WinForm/frmMain.cs
  5. 7
      Stone.WinForm/Stone.WinModule/BasicData/F_Factory.cs
  6. 31
      Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs
  7. 15
      Stone.WinForm/Stone.WinModule/Stone.WinModule.csproj

2
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("托盘号不能为空!");

7
Stone.WinForm/Stone.WinBiz/BasicData/F_Base.cs

@ -127,8 +127,11 @@ namespace Stone.WinBiz.BasicData
/// <param name="drData"></param>
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)
{

1
Stone.WinForm/Stone.WinBiz/Stone.WinBiz.csproj

@ -83,6 +83,7 @@
<Compile Include="BasicData\F_ErrLog.cs" />
<Compile Include="BasicData\F_JIS_Limits_List.cs" />
<Compile Include="BasicData\F_ErrTypeLevel.cs" />
<Compile Include="BasicData\F_BillNO.cs" />
<Compile Include="BasicData\F_PartPO.cs" />
<Compile Include="BasicData\F_PartOutQty.cs" />
<Compile Include="BasicData\F_Product.cs" />

3
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);
}

7
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;
}
}

31
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);
}

15
Stone.WinForm/Stone.WinModule/Stone.WinModule.csproj

@ -166,6 +166,18 @@
<Compile Include="BasicData\frmErrLog.Designer.cs">
<DependentUpon>frmErrLog.cs</DependentUpon>
</Compile>
<Compile Include="BasicData\frmBillNO.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="BasicData\frmBillNO.Designer.cs">
<DependentUpon>frmBillNO.cs</DependentUpon>
</Compile>
<Compile Include="BasicData\frmBillNODetail.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="BasicData\frmBillNODetail.Designer.cs">
<DependentUpon>frmBillNODetail.cs</DependentUpon>
</Compile>
<Compile Include="BasicData\frmPartPODetail.cs">
<SubType>Form</SubType>
</Compile>
@ -700,6 +712,9 @@
<EmbeddedResource Include="BasicData\frmErrLog.resx">
<DependentUpon>frmErrLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="BasicData\frmBillNODetail.resx">
<DependentUpon>frmBillNODetail.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="BasicData\frmPartPODetail.resx">
<DependentUpon>frmPartPODetail.cs</DependentUpon>
</EmbeddedResource>

Loading…
Cancel
Save