Browse Source

NA提交

STD_NA
金浩 1 week ago
parent
commit
09d9ee9b99
  1. 20
      PDAForm/PDAForm/Bill/AsnBill/frmAsnBill.cs
  2. 2
      PDAForm/PDAForm/frmMain.Designer.cs
  3. 60
      Stone.WinForm/Stone.WinBiz/BasicData/F_BillNO.cs
  4. 24
      Stone.WinForm/Stone.WinBiz/BasicData/F_Product.cs
  5. 36
      Stone.WinForm/Stone.WinModule/BasicData/frmBillNO.Designer.cs
  6. 26
      Stone.WinForm/Stone.WinModule/BasicData/frmBillNO.cs
  7. 117
      Stone.WinForm/Stone.WinModule/BasicData/frmBillNODetail.Designer.cs
  8. 59
      Stone.WinForm/Stone.WinModule/BasicData/frmBillNODetail.cs
  9. 123
      Stone.WinForm/Stone.WinModule/BasicData/frmBillNODetail.resx
  10. 55
      Stone.WinForm/Stone.WinModule/BasicData/frmPartPODetail.Designer.cs
  11. 112
      Stone.WinForm/Stone.WinModule/BasicData/frmProductDetail.Designer.cs
  12. 12
      Stone.WinForm/Stone.WinModule/BasicData/frmProductDetail.cs
  13. 2
      Stone.WinForm/Stone.WinModule/Standard/frmASNScan.cs
  14. 60
      Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs

20
PDAForm/PDAForm/Bill/AsnBill/frmAsnBill.cs

@ -39,7 +39,16 @@ namespace PDAForm.Bill.AsnBill
this.txtBillNo.Enabled = false;
this.Update();
m_base = new F_AsnBill();
m_base.BillNo = this.txtBillNo.Text.Trim();
string asnNum = this.txtBillNo.Text.Trim().Split('#')[0];
if (txtBillNo.Text.Trim().Length < 0)
{
MyMessageBox.ShowErrorMessage("ASN号不能为空!");
this.txtBillNo.Focus();
this.txtBillNo.SelectAll();
return;
}
m_base.BillNo = asnNum;
m_base.BillNew(this.dgShow);
DataRow[] drs = m_base.dsBill.Tables[0].Select("[AsnNumber]='" + m_base.BillNo + "'");
if (drs.Length == 0)
@ -72,14 +81,7 @@ namespace PDAForm.Bill.AsnBill
{
if (m_base == null) throw new Exception("请先扫ASN编号!");
string BarCode = this.txtBarCode.Text.Trim().Split('#')[0];
if (BarCode.Length < 0)
{
MyMessageBox.ShowErrorMessage("托盘号不能为空!");
this.txtBarCode.Focus();
this.txtBarCode.SelectAll();
return;
}
string BarCode = this.txtBarCode.Text.Trim();
//托盘格式样例 5B602C2-04&00000044&02 零件号+分隔符+8位箱流水号+两位的数量
var barList = BarCode.Split('&');
var partCode = barList[0];

2
PDAForm/PDAForm/frmMain.Designer.cs

@ -437,7 +437,7 @@
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmMain";
this.Text = "沈阳金杯李尔STD系统";
this.Text = "沈阳金杯李尔NA发运校验系统";
this.Load += new System.EventHandler(this.frmMain_Load);
this.panel1.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);

60
Stone.WinForm/Stone.WinBiz/BasicData/F_BillNO.cs

@ -0,0 +1,60 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data;
using Stone.Entity;
using Gm_WMS.DataAccess.DataService;
using Stone.Common;
namespace Stone.WinBiz.BasicData
{
public class F_BillNO : F_Base
{
public F_BillNO()
{
this.type = "BillNO";
this.name = "基础资料_ASN单流水管理";
this.entity = new Entity_t_BillNo();
}
public override void GetView(DataGridView dgv)
{
base.GetView(dgv);
dgv.Columns["type"].HeaderText = "配置项";
dgv.Columns["value"].HeaderText = "值";
}
public override void Checking(DataRow drData, bool isNew)
{
Entity_t_BillNo product = new Entity_t_BillNo();
if (product.GetData("", "type='" + drData["type"].ToString() + "'", "id asc").Tables[0].Rows.Count < 1)
{
//这NM的是个魔鬼~!
throw new Exception(drData["type"].ToString()+"不存在");
}
base.Checking(drData, isNew);
}
public override void InputData(DataSet dsData, LocalDBService db)
{
Entity_t_BillNo t_Input = new Entity_t_BillNo(db);
DataRow drInput = null;
foreach (DataRow drData in dsData.Tables[0].Rows)
{
drInput = t_Input.Table.NewRow();
drInput["type"] = drData["配置项"].ToString().Trim();
drInput["value"] = drData["值"].ToString().Trim();
t_Input.Add(drInput);
}
}
}
}

24
Stone.WinForm/Stone.WinBiz/BasicData/F_Product.cs

@ -45,11 +45,11 @@ namespace Stone.WinBiz.BasicData
base.Checking(drData, isNew);
if ((new F_CarModel()).GetData("Code='" + drData["CarModelCode"].ToString() + "'") == null)
throw new Exception("车型代码 " + drData["CarModelCode"].ToString() + " 不存在!");
if ((new F_Color()).GetData("Code='" + drData["ColorCode"].ToString() + "'") == null)
throw new Exception("颜色代码 " + drData["ColorCode"].ToString() + " 不存在!");
// if ((new F_CarModel()).GetData("Code='" + drData["CarModelCode"].ToString() + "'") == null)
// throw new Exception("车型代码 " + drData["CarModelCode"].ToString() + " 不存在!");
//
// if ((new F_Color()).GetData("Code='" + drData["ColorCode"].ToString() + "'") == null)
// throw new Exception("颜色代码 " + drData["ColorCode"].ToString() + " 不存在!");
if (MyStrings.GetLength(drData["Name"].ToString()) > 255) throw new Exception("名称不能超过255个字符!");
@ -73,8 +73,8 @@ namespace Stone.WinBiz.BasicData
drInput["Deploy"] = drData["配置"].ToString().Trim();
drInput["BarCode"] = drData["条码号"].ToString();
drInput["PackNumer"] = drData["装箱数量"].ToString();
drInput["IsStandard"] = drData["是否STD件"].ToString();
drInput["State"] = drData["启用"].ToString();
// drInput["IsStandard"] = drData["是否STD件"].ToString();
// drInput["State"] = drData["启用"].ToString();
if (drInput["Code"].ToString().Trim() == "")
throw new Exception("代码不能为空!");
@ -84,11 +84,11 @@ namespace Stone.WinBiz.BasicData
throw new Exception("代码 " + drInput["Code"].ToString() + " 已经存在!");
if ((new Entity_t_CarModel(db)).GetData("", "Code='" + drInput["CarModelCode"].ToString() + "'", "id asc").Tables[0].Rows.Count == 0)
throw new Exception("车型代码 " + drInput["CarModelCode"].ToString() + " 不存在!");
if ((new Entity_t_Color(db)).GetData("", "Code='" + drInput["ColorCode"].ToString() + "'", "id asc").Tables[0].Rows.Count == 0)
throw new Exception("颜色代码 " + drInput["ColorCode"].ToString() + " 不存在!");
// if ((new Entity_t_CarModel(db)).GetData("", "Code='" + drInput["CarModelCode"].ToString() + "'", "id asc").Tables[0].Rows.Count == 0)
// throw new Exception("车型代码 " + drInput["CarModelCode"].ToString() + " 不存在!");
//
// if ((new Entity_t_Color(db)).GetData("", "Code='" + drInput["ColorCode"].ToString() + "'", "id asc").Tables[0].Rows.Count == 0)
// throw new Exception("颜色代码 " + drInput["ColorCode"].ToString() + " 不存在!");
if (MyStrings.GetLength(drInput["Name"].ToString()) > 255) throw new Exception("名称不能超过255个字符!");

36
Stone.WinForm/Stone.WinModule/BasicData/frmBillNO.Designer.cs

@ -0,0 +1,36 @@
namespace Stone.WinModule.BasicData
{
partial class frmBillNO
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
}
#endregion
}
}

26
Stone.WinForm/Stone.WinModule/BasicData/frmBillNO.cs

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Stone.WinModule.BasicData
{
public partial class frmBillNO : Stone.WinModule.BasicData.frmBaseMain
{
public frmBillNO()
{
InitializeComponent();
}
public override void Search(string code)
{
base.Search(code);
strWhere += " or [Type] like '%" + code + "%'";
}
}
}

117
Stone.WinForm/Stone.WinModule/BasicData/frmBillNODetail.Designer.cs

@ -0,0 +1,117 @@
namespace Stone.WinModule.BasicData
{
partial class frmBillNODetail
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.tbPONumber = new System.Windows.Forms.TextBox();
this.txtCode = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
this.SuspendLayout();
//
// btnAddNewLine
//
this.btnAddNewLine.Location = new System.Drawing.Point(52, 113);
this.btnAddNewLine.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(265, 113);
this.btnClose.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(177, 113);
this.btnOK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
//
// tbPONumber
//
this.tbPONumber.Location = new System.Drawing.Point(113, 71);
this.tbPONumber.MaxLength = 100;
this.tbPONumber.Name = "tbPONumber";
this.tbPONumber.Size = new System.Drawing.Size(222, 21);
this.tbPONumber.TabIndex = 1;
//
// txtCode
//
this.txtCode.Location = new System.Drawing.Point(113, 40);
this.txtCode.MaxLength = 10;
this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(222, 21);
this.txtCode.TabIndex = 0;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(47, 74);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 109;
this.label2.Text = "值:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(23, 44);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 108;
this.label1.Text = "配置项:";
//
// frmBillNODetail
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.ClientSize = new System.Drawing.Size(381, 173);
this.Controls.Add(this.tbPONumber);
this.Controls.Add(this.txtCode);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "frmBillNODetail";
this.Load += new System.EventHandler(this.frmColorDetail_Load);
this.Controls.SetChildIndex(this.btnOK, 0);
this.Controls.SetChildIndex(this.btnClose, 0);
this.Controls.SetChildIndex(this.btnAddNewLine, 0);
this.Controls.SetChildIndex(this.label1, 0);
this.Controls.SetChildIndex(this.label2, 0);
this.Controls.SetChildIndex(this.txtCode, 0);
this.Controls.SetChildIndex(this.tbPONumber, 0);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox tbPONumber;
private System.Windows.Forms.TextBox txtCode;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ColorDialog colorDialog1;
}
}

59
Stone.WinForm/Stone.WinModule/BasicData/frmBillNODetail.cs

@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Stone.Common;
namespace Stone.WinModule.BasicData
{
public partial class frmBillNODetail : Stone.WinModule.BasicData.frmBaseMainDetail
{
public frmBillNODetail()
{
InitializeComponent();
}
private void frmColorDetail_Load(object sender, EventArgs e)
{
}
public override bool GetData()
{
if (!MyValidator.IsEmpty(this.txtCode, "")) return false;
if (!MyValidator.IsEmpty(this.tbPONumber, "")) return false;
base.GetData();
drData["type"] = MyStrings.GetString(this.txtCode.Text.Trim());
drData["value"] = MyStrings.GetString(this.tbPONumber.Text.Trim());
return true;
}
public override bool SetData()
{
if (type == 2)
{
this.txtCode.ReadOnly = true;
}
if (base.SetData())
{
this.txtCode.Text = drData["type"].ToString();
this.tbPONumber.Text = drData["value"].ToString();
}
return false;
}
public override void Clear()
{
base.Clear();
this.txtCode.Text = "";
this.tbPONumber.Text = "";
this.txtCode.Focus();
}
}
}

123
Stone.WinForm/Stone.WinModule/BasicData/frmBillNODetail.resx

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="colorDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

55
Stone.WinForm/Stone.WinModule/BasicData/frmPartPODetail.Designer.cs

@ -40,91 +40,86 @@
//
// btnAddNewLine
//
this.btnAddNewLine.Location = new System.Drawing.Point(62, 255);
this.btnAddNewLine.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.btnAddNewLine.Location = new System.Drawing.Point(41, 170);
this.btnAddNewLine.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(381, 255);
this.btnClose.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.btnClose.Location = new System.Drawing.Point(254, 170);
this.btnClose.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(249, 255);
this.btnOK.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.btnOK.Location = new System.Drawing.Point(166, 170);
this.btnOK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
//
// tbPONumber
//
this.tbPONumber.Location = new System.Drawing.Point(170, 106);
this.tbPONumber.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tbPONumber.Location = new System.Drawing.Point(113, 71);
this.tbPONumber.MaxLength = 100;
this.tbPONumber.Name = "tbPONumber";
this.tbPONumber.Size = new System.Drawing.Size(331, 28);
this.tbPONumber.Size = new System.Drawing.Size(222, 21);
this.tbPONumber.TabIndex = 1;
//
// txtCode
//
this.txtCode.Location = new System.Drawing.Point(170, 60);
this.txtCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.txtCode.Location = new System.Drawing.Point(113, 40);
this.txtCode.MaxLength = 10;
this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(331, 28);
this.txtCode.Size = new System.Drawing.Size(222, 21);
this.txtCode.TabIndex = 0;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(34, 111);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Location = new System.Drawing.Point(23, 74);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(80, 18);
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 109;
this.label2.Text = "订单号:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(34, 66);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Location = new System.Drawing.Point(23, 44);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 18);
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 108;
this.label1.Text = "物料号:";
//
// txtIsCheck
//
this.txtIsCheck.AutoSize = true;
this.txtIsCheck.Location = new System.Drawing.Point(381, 221);
this.txtIsCheck.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.txtIsCheck.Checked = true;
this.txtIsCheck.CheckState = System.Windows.Forms.CheckState.Checked;
this.txtIsCheck.Location = new System.Drawing.Point(254, 147);
this.txtIsCheck.Name = "txtIsCheck";
this.txtIsCheck.Size = new System.Drawing.Size(142, 22);
this.txtIsCheck.Size = new System.Drawing.Size(96, 16);
this.txtIsCheck.TabIndex = 110;
this.txtIsCheck.Text = "是否发运校验";
this.txtIsCheck.UseVisualStyleBackColor = true;
//
// tbPartType
//
this.tbPartType.Location = new System.Drawing.Point(170, 156);
this.tbPartType.Margin = new System.Windows.Forms.Padding(4);
this.tbPartType.Location = new System.Drawing.Point(113, 104);
this.tbPartType.MaxLength = 100;
this.tbPartType.Name = "tbPartType";
this.tbPartType.Size = new System.Drawing.Size(331, 28);
this.tbPartType.Size = new System.Drawing.Size(222, 21);
this.tbPartType.TabIndex = 111;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(34, 161);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Location = new System.Drawing.Point(23, 107);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(98, 18);
this.label3.Size = new System.Drawing.Size(65, 12);
this.label3.TabIndex = 112;
this.label3.Text = "零件类型:";
//
// frmPartPODetail
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.ClientSize = new System.Drawing.Size(572, 323);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.ClientSize = new System.Drawing.Size(381, 215);
this.Controls.Add(this.tbPartType);
this.Controls.Add(this.label3);
this.Controls.Add(this.txtIsCheck);
@ -132,7 +127,7 @@
this.Controls.Add(this.txtCode);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "frmPartPODetail";
this.Load += new System.EventHandler(this.frmColorDetail_Load);
this.Controls.SetChildIndex(this.btnOK, 0);

112
Stone.WinForm/Stone.WinModule/BasicData/frmProductDetail.Designer.cs

@ -51,201 +51,187 @@
//
// btnAddNewLine
//
this.btnAddNewLine.Location = new System.Drawing.Point(276, 496);
this.btnAddNewLine.Margin = new System.Windows.Forms.Padding(6);
this.btnAddNewLine.Location = new System.Drawing.Point(184, 331);
this.btnAddNewLine.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnAddNewLine.Click += new System.EventHandler(this.btnAddNewLine_Click);
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(616, 496);
this.btnClose.Margin = new System.Windows.Forms.Padding(6);
this.btnClose.Location = new System.Drawing.Point(411, 331);
this.btnClose.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(486, 496);
this.btnOK.Margin = new System.Windows.Forms.Padding(6);
this.btnOK.Location = new System.Drawing.Point(324, 331);
this.btnOK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// txtDeploy
//
this.txtDeploy.Location = new System.Drawing.Point(160, 276);
this.txtDeploy.Margin = new System.Windows.Forms.Padding(4);
this.txtDeploy.Location = new System.Drawing.Point(107, 184);
this.txtDeploy.MaxLength = 50;
this.txtDeploy.Name = "txtDeploy";
this.txtDeploy.Size = new System.Drawing.Size(576, 28);
this.txtDeploy.Size = new System.Drawing.Size(385, 21);
this.txtDeploy.TabIndex = 5;
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(94, 282);
this.label21.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label21.Location = new System.Drawing.Point(63, 188);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(62, 18);
this.label21.Size = new System.Drawing.Size(41, 12);
this.label21.TabIndex = 186;
this.label21.Text = "配置:";
//
// txtCarModelCode
//
this.txtCarModelCode.Location = new System.Drawing.Point(160, 189);
this.txtCarModelCode.Margin = new System.Windows.Forms.Padding(6);
this.txtCarModelCode.Location = new System.Drawing.Point(107, 126);
this.txtCarModelCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.txtCarModelCode.Name = "txtCarModelCode";
this.txtCarModelCode.ReadOnly = false;
this.txtCarModelCode.Size = new System.Drawing.Size(578, 28);
this.txtCarModelCode.Size = new System.Drawing.Size(385, 21);
this.txtCarModelCode.TabIndex = 3;
this.txtCarModelCode.OnSelectClick += new System.EventHandler(this.txtCarModelCode_OnSelectClick);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(94, 238);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Location = new System.Drawing.Point(63, 159);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(62, 18);
this.label6.Size = new System.Drawing.Size(41, 12);
this.label6.TabIndex = 185;
this.label6.Text = "颜色:";
//
// txtColorCode
//
this.txtColorCode.Location = new System.Drawing.Point(160, 232);
this.txtColorCode.Margin = new System.Windows.Forms.Padding(6);
this.txtColorCode.Location = new System.Drawing.Point(107, 155);
this.txtColorCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.txtColorCode.Name = "txtColorCode";
this.txtColorCode.ReadOnly = false;
this.txtColorCode.Size = new System.Drawing.Size(578, 28);
this.txtColorCode.Size = new System.Drawing.Size(385, 21);
this.txtColorCode.TabIndex = 4;
this.txtColorCode.OnSelectClick += new System.EventHandler(this.txtColorCode_OnSelectClick);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(94, 195);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Location = new System.Drawing.Point(63, 130);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(62, 18);
this.label4.Size = new System.Drawing.Size(41, 12);
this.label4.TabIndex = 183;
this.label4.Text = "车型:";
//
// txtModel
//
this.txtModel.Location = new System.Drawing.Point(160, 146);
this.txtModel.Margin = new System.Windows.Forms.Padding(4);
this.txtModel.Location = new System.Drawing.Point(107, 97);
this.txtModel.MaxLength = 50;
this.txtModel.Name = "txtModel";
this.txtModel.Size = new System.Drawing.Size(576, 28);
this.txtModel.Size = new System.Drawing.Size(385, 21);
this.txtModel.TabIndex = 2;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(58, 152);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Location = new System.Drawing.Point(39, 101);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(98, 18);
this.label3.Size = new System.Drawing.Size(65, 12);
this.label3.TabIndex = 182;
this.label3.Text = "规格型号:";
//
// txtName
//
this.txtName.Location = new System.Drawing.Point(160, 102);
this.txtName.Margin = new System.Windows.Forms.Padding(4);
this.txtName.Location = new System.Drawing.Point(107, 68);
this.txtName.MaxLength = 100;
this.txtName.Name = "txtName";
this.txtName.Size = new System.Drawing.Size(576, 28);
this.txtName.Size = new System.Drawing.Size(385, 21);
this.txtName.TabIndex = 1;
//
// txtCode
//
this.txtCode.Location = new System.Drawing.Point(160, 58);
this.txtCode.Margin = new System.Windows.Forms.Padding(4);
this.txtCode.Location = new System.Drawing.Point(107, 39);
this.txtCode.MaxLength = 20;
this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(576, 28);
this.txtCode.Size = new System.Drawing.Size(385, 21);
this.txtCode.TabIndex = 0;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(58, 108);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Location = new System.Drawing.Point(39, 72);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(98, 18);
this.label2.Size = new System.Drawing.Size(65, 12);
this.label2.TabIndex = 181;
this.label2.Text = "存货名称:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(58, 64);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Location = new System.Drawing.Point(39, 43);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(98, 18);
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 180;
this.label1.Text = "存货代码:";
//
// txtBarCode
//
this.txtBarCode.Location = new System.Drawing.Point(160, 320);
this.txtBarCode.Margin = new System.Windows.Forms.Padding(4);
this.txtBarCode.Location = new System.Drawing.Point(107, 213);
this.txtBarCode.MaxLength = 50;
this.txtBarCode.Name = "txtBarCode";
this.txtBarCode.Size = new System.Drawing.Size(576, 28);
this.txtBarCode.Size = new System.Drawing.Size(385, 21);
this.txtBarCode.TabIndex = 6;
//
// label31
//
this.label31.AutoSize = true;
this.label31.Location = new System.Drawing.Point(76, 326);
this.label31.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label31.Location = new System.Drawing.Point(51, 217);
this.label31.Name = "label31";
this.label31.Size = new System.Drawing.Size(80, 18);
this.label31.Size = new System.Drawing.Size(53, 12);
this.label31.TabIndex = 204;
this.label31.Text = "条码号:";
//
// txtIsStandard
//
this.txtIsStandard.AutoSize = true;
this.txtIsStandard.Location = new System.Drawing.Point(466, 365);
this.txtIsStandard.Margin = new System.Windows.Forms.Padding(4);
this.txtIsStandard.Location = new System.Drawing.Point(311, 243);
this.txtIsStandard.Name = "txtIsStandard";
this.txtIsStandard.Size = new System.Drawing.Size(115, 22);
this.txtIsStandard.Size = new System.Drawing.Size(78, 16);
this.txtIsStandard.TabIndex = 14;
this.txtIsStandard.Text = "是否STD件";
this.txtIsStandard.UseVisualStyleBackColor = true;
this.txtIsStandard.Visible = false;
//
// txtPackNumer
//
this.txtPackNumer.Location = new System.Drawing.Point(160, 363);
this.txtPackNumer.Margin = new System.Windows.Forms.Padding(4);
this.txtPackNumer.Location = new System.Drawing.Point(107, 242);
this.txtPackNumer.MaxLength = 5;
this.txtPackNumer.Name = "txtPackNumer";
this.txtPackNumer.Size = new System.Drawing.Size(269, 28);
this.txtPackNumer.Size = new System.Drawing.Size(181, 21);
this.txtPackNumer.TabIndex = 13;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(58, 369);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Location = new System.Drawing.Point(39, 246);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(98, 18);
this.label5.Size = new System.Drawing.Size(65, 12);
this.label5.TabIndex = 216;
this.label5.Text = "装箱数量:";
//
// cbState
//
this.cbState.AutoSize = true;
this.cbState.Location = new System.Drawing.Point(599, 365);
this.cbState.Margin = new System.Windows.Forms.Padding(4);
this.cbState.Location = new System.Drawing.Point(399, 243);
this.cbState.Name = "cbState";
this.cbState.Size = new System.Drawing.Size(70, 22);
this.cbState.Size = new System.Drawing.Size(48, 16);
this.cbState.TabIndex = 217;
this.cbState.Text = "启用";
this.cbState.UseVisualStyleBackColor = true;
this.cbState.Visible = false;
//
// frmProductDetail
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.ClientSize = new System.Drawing.Size(801, 620);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.ClientSize = new System.Drawing.Size(534, 413);
this.Controls.Add(this.cbState);
this.Controls.Add(this.txtPackNumer);
this.Controls.Add(this.label5);
@ -264,7 +250,7 @@
this.Controls.Add(this.txtCode);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Margin = new System.Windows.Forms.Padding(6);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "frmProductDetail";
this.Load += new System.EventHandler(this.frmColorDetail_Load);
this.Controls.SetChildIndex(this.btnOK, 0);

12
Stone.WinForm/Stone.WinModule/BasicData/frmProductDetail.cs

@ -30,12 +30,12 @@ namespace Stone.WinModule.BasicData
if (!MyValidator.IsEmpty(this.txtCode, "")) return false;
if (!MyValidator.IsEmpty(this.txtName, "")) return false;
if (!MyValidator.IsEmpty(this.txtCarModelCode, "")) return false;
if (!MyValidator.IsEmpty(this.txtColorCode, "")) return false;
if (!MyValidator.IsEmpty(this.txtPackNumer, "")) return false;
if (!MyValidator.IsNumeric(this.txtPackNumer, "")) return false;
//
// if (!MyValidator.IsEmpty(this.txtCarModelCode, "")) return false;
// if (!MyValidator.IsEmpty(this.txtColorCode, "")) return false;
//
// if (!MyValidator.IsEmpty(this.txtPackNumer, "")) return false;
// if (!MyValidator.IsNumeric(this.txtPackNumer, "")) return false;
base.GetData();

2
Stone.WinForm/Stone.WinModule/Standard/frmASNScan.cs

@ -29,7 +29,7 @@ namespace Stone.WinModule.Standard
{
try
{
string asnNumber = this.txtAsnNumber.Text.Trim();
string asnNumber = this.txtAsnNumber.Text.Trim().Split('#')[0];
Entity_t_JIS_VDA t_jis_vda = new Entity_t_JIS_VDA();
DataSet dsAsn = t_jis_vda.GetData("", "[AsnNumber]='" + asnNumber + "'", "ID asc");
if (dsAsn.Tables[0].Rows.Count == 0) throw new Exception("扫描的ASN无效!");

60
Stone.WinForm/Stone.WinModule/Standard/frmJISVDAASN.cs

@ -102,11 +102,11 @@ namespace Stone.WinModule.Standard
// btnPrintRe.Click += new EventHandler(btnPrintRe_Click);
// this.toolStrip1.Items.Insert(0, btnPrintRe);
//
// ToolStripButton btnPrint = new ToolStripButton("打印ASN");
// btnPrint.Image = this.imageList1.Images[0];
// btnPrint.TextImageRelation = TextImageRelation.ImageAboveText;
// btnPrint.Click += new EventHandler(btnPrint_Click);
// this.toolStrip1.Items.Insert(0, btnPrint);
ToolStripButton btnPrint = new ToolStripButton("打印ASN");
btnPrint.Image = this.imageList1.Images[0];
btnPrint.TextImageRelation = TextImageRelation.ImageAboveText;
btnPrint.Click += new EventHandler(btnPrint_Click);
this.toolStrip1.Items.Insert(0, btnPrint);
// ToolStripButton btnPrintVDARight = new ToolStripButton("补打02标签");
// btnPrintVDARight.Image = this.imageList1.Images[0];
@ -231,7 +231,35 @@ namespace Stone.WinModule.Standard
// throw new Exception(AsnNumber + " 未打印");
if (dsData.Tables[0].Select("[IsPackingVerification]=False").Length > 0)
throw new Exception(AsnNumber + " 未完成装箱校验");
{
//取未校验的
var needCheck = dsData.Tables[0].Select("IsPackingVerification = 0");
//允许设置零件号不进行校验,判断未校验的零件是否在清单中
Entity_t_PartPO t_partpo = new Entity_t_PartPO();
DataSet dsPartPO = t_partpo.GetData("", "1 = 1", "ID asc");
if (dsPartPO.Tables[0].Rows.Count == 0)
{
throw new Exception("ASN中有未进行装箱校验的明细,禁止操作发货!");
}
var dtpartPO = dsPartPO.Tables[0];
foreach (var row in needCheck)
{
var partCode = row["PartNumber"].ToString();
var partRow = dtpartPO.Select("Code = '" + partCode + "'");
if (partRow.Length != 1)
{
throw new Exception("系统未定义唯一的零件号 " + partCode + " !");
}
else
{
if (bool.Parse(partRow[0]["IsCheck"].ToString()))
{
throw new Exception("零件号 " + partCode + " 未通过装箱校验,禁止操作发货!");
}
}
}
}
if (dsData.Tables[0].Select("[IsShipingVerification]=False").Length > 0)
throw new Exception(AsnNumber + " 未完成发运操作");
@ -579,6 +607,8 @@ namespace Stone.WinModule.Standard
string AsnNumber = this.dgrdView.SelectedRows[0].Cells["AsnNumber"].Value.ToString();
if(string.IsNullOrEmpty(AsnNumber)) throw new Exception("ASN未创建,不能进行打印操作!");
if (!MyMessageBox.ShowQuestion($"是否要打印 {AsnNumber} ?")) return;
db = new Gm_WMS.DataAccess.DataService.LocalDBService();
@ -591,11 +621,11 @@ namespace Stone.WinModule.Standard
if (dsData.Tables[0].Rows.Count == 0)
throw new Exception($"{AsnNumber} 不存在");
if (dsData.Tables[0].Select("[IsPackingVerification]=False").Length > 0)
throw new Exception(AsnNumber + " 所属VDA未完成装箱校验");
if (dsData.Tables[0].Select("[IsPrintASN]=True").Length == dsData.Tables[0].Rows.Count)
throw new Exception(AsnNumber + " 已经打印过了");
// if (dsData.Tables[0].Select("[IsPackingVerification]=False").Length > 0)
// throw new Exception(AsnNumber + " 所属VDA未完成装箱校验");
//
// if (dsData.Tables[0].Select("[IsPrintASN]=True").Length == dsData.Tables[0].Rows.Count)
// throw new Exception(AsnNumber + " 已经打印过了");
// if (dsData.Tables[0].Select("[IsShipingVerification]=False").Length > 0)
// {
@ -1179,6 +1209,14 @@ namespace Stone.WinModule.Standard
if (strLabelDate.Length > 0)
{
strLabelDate = strLabelDate.Substring(0, strLabelDate.Length - 1);
//校验是否已经有扫码记录,有扫码记录时禁止覆盖
sql = $"select * from t_JIS_VDA where IsPackingVerification = 1 and LabelDate in (" + strLabelDate + ")";
var veriDt = db.Exec_DataSet(sql);
if (veriDt.Tables[0].Rows.Count > 0)
{
throw new Exception("导入的文件中存在已进行校验的发运信息,请核对后调整导入数据!");
}
sql = $"delete from t_JIS_VDA where LabelDate in (" + strLabelDate + ")";
db.Exec_NonQuery(sql);
}

Loading…
Cancel
Save