Browse Source

“分割品车间称重计数”客户端

master
yibo 4 years ago
parent
commit
aebccffcab
15 changed files with 573 additions and 168 deletions
  1. +6
    -0
      ButcherFactory.BO/BaseInfo/ClientGoodsSet.cs
  2. +17
    -0
      ButcherFactory.BO/BaseInfo/GoodsIdentify.cs
  3. +2
    -0
      ButcherFactory.BO/Bill/SegmentProduction.cs
  4. +1
    -0
      ButcherFactory.BO/ButcherFactory.BO.csproj
  5. +15
    -1
      ButcherFactory.BO/LocalBL/SegmentProductionBL.cs
  6. +18
    -0
      ButcherFactory.BO/Rpcs/BaseInfoSyncRpc.cs
  7. +9
    -0
      ButcherFactory.Form/ButcherFactory.Form.csproj
  8. +57
    -41
      ButcherFactory.Form/Controls/UserControl1.Designer.cs
  9. +119
    -119
      ButcherFactory.Form/Controls/UserControl1.resx
  10. +123
    -0
      ButcherFactory.Form/SegmentProductionAuto_/IdentifySelectionDialog.Designer.cs
  11. +51
    -0
      ButcherFactory.Form/SegmentProductionAuto_/IdentifySelectionDialog.cs
  12. +120
    -0
      ButcherFactory.Form/SegmentProductionAuto_/IdentifySelectionDialog.resx
  13. +31
    -4
      ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs
  14. +1
    -0
      ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs
  15. +3
    -3
      ButcherFactory.Form/SegmentProduction_/SegmentSumCodePrint.cs

+ 6
- 0
ButcherFactory.BO/BaseInfo/ClientGoodsSet.cs View File

@ -67,5 +67,11 @@ namespace ButcherFactory.BO
[NonDmoProperty]
public bool Selected { get; set; }
[NonDmoProperty]
public IEnumerable<GoodsIdentify> Identify { get; set; }
[NonDmoProperty]
public GoodsIdentify SelectedIdentify { get; set; }
}
}

+ 17
- 0
ButcherFactory.BO/BaseInfo/GoodsIdentify.cs View File

@ -0,0 +1,17 @@
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.BO
{
[MapToTable("Butcher_GoodsIdentify")]
public class GoodsIdentify
{
public long Goods_ID { get; set; }
public string Identify { get; set; }
public string Remark { get; set; }
}
}

+ 2
- 0
ButcherFactory.BO/Bill/SegmentProduction.cs View File

@ -92,6 +92,8 @@ namespace ButcherFactory.BO
public string ShotPrintName { get; set; }
public decimal? StatisticNumber { get; set; }
public string Identify { get; set; }
public string IdentifyRemark { get; set; }
}
[MapToTable("Butcher_SegmentLog")]


+ 1
- 0
ButcherFactory.BO/ButcherFactory.BO.csproj View File

@ -58,6 +58,7 @@
<ItemGroup>
<Compile Include="BaseInfo\ClientGoodsSet.cs" />
<Compile Include="BaseInfo\Goods.cs" />
<Compile Include="BaseInfo\GoodsIdentify.cs" />
<Compile Include="BaseInfo\Store.cs" />
<Compile Include="Base\BaseInfo.cs" />
<Compile Include="BaseInfo\ProductBatch.cs" />


+ 15
- 1
ButcherFactory.BO/LocalBL/SegmentProductionBL.cs View File

@ -39,7 +39,8 @@ namespace ButcherFactory.BO.LocalBL
query.Columns.Add(DQSelectColumn.Field("TotalCode_Code"));
query.Columns.Add(DQSelectColumn.Field("CreateTime"));
query.Columns.Add(DQSelectColumn.Field("GoodsType"));
query.Columns.Add(DQSelectColumn.Field("NoTotalCode"));
query.Columns.Add(DQSelectColumn.Field("NoTotalCode"));
query.Columns.Add(DQSelectColumn.Field("Identify"));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("InStored", false), DQCondition.EQ("Delete", false), DQCondition.EQ("Submited", submited)));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true));
if (submited)
@ -74,6 +75,7 @@ namespace ButcherFactory.BO.LocalBL
entity.CreateTime = (DateTime)reader[15];
entity.GoodsType = (short?)reader[16];
entity.NoTotalCode = (bool)reader[17];
entity.Identify = (string)reader[18];
list.Add(entity);
}
}
@ -525,6 +527,8 @@ namespace ButcherFactory.BO.LocalBL
query.Columns.Add(DQSelectColumn.Field("StatisticNumber"));
query.Columns.Add(DQSelectColumn.Field("TotalCode_Code"));
query.Columns.Add(DQSelectColumn.Field("NoTotalCode"));
query.Columns.Add(DQSelectColumn.Field("Identify"));
query.Columns.Add(DQSelectColumn.Field("IdentifyRemark"));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Submited", true), DQCondition.EQ("Sync", false), DQCondition.EQ("Delete", false)));
query.Where.Conditions.Add(DQCondition.LessThan("CreateTime", DateTime.Now.AddMinutes(-1)));
query.Range = SelectRange.Top(10);
@ -551,6 +555,8 @@ namespace ButcherFactory.BO.LocalBL
obj.StatisticNumber = (decimal?)reader[12];
obj.TotalCode_Code = (string)reader[13];
obj.NoTotalCode = (bool)reader[14];
obj.Identify = (string)reader[15];
obj.IdentifyRemark = (string)reader[16];
upload.Add(obj);
}
}
@ -665,6 +671,12 @@ namespace ButcherFactory.BO.LocalBL
query.Where.Conditions.Add(DQCondition.EQ("Action", type));
return query.EExecuteList().Cast<SegmentLog>();
}
public static List<GoodsIdentify> GetGoodsIdentify()
{
var query = new DmoQuery(typeof(GoodsIdentify));
return query.EExecuteList().Cast<GoodsIdentify>().ToList();
}
}
class SegmentProductionMin
@ -687,6 +699,8 @@ namespace ButcherFactory.BO.LocalBL
public decimal? StatisticNumber { get; set; }
public string TotalCode_Code { get; set; }
public bool NoTotalCode { get; set; }
public string Identify { get; set; }
public string IdentifyRemark { get; set; }
}
class TaskTemp


+ 18
- 0
ButcherFactory.BO/Rpcs/BaseInfoSyncRpc.cs View File

@ -112,6 +112,24 @@ namespace ButcherFactory.BO.Rpcs
return true;
}
public static bool SyncGoodsIdentify(out List<GoodsIdentify> list) {
using (var session = DmoSession.New())
{
var json = RpcFacade.Call<string>(baseInfoRpcPath + "SyncGoodsIdentify");
list = JsonConvert.DeserializeObject<List<GoodsIdentify>>(json);
var sql = "truncate table [Butcher_GoodsIdentify]";
session.ExecuteSqlNonQuery(sql);
foreach (var item in list)
{
session.Insert(item);
}
session.Commit();
}
return true;
}
static void DeleteClientSet(long id, IDmoSession session)
{
var detail = new DQDeleteDom(typeof(ClientGoodsSet_Detail));


+ 9
- 0
ButcherFactory.Form/ButcherFactory.Form.csproj View File

@ -229,6 +229,12 @@
<Compile Include="SegmentPickUp_\SegmentPickUpForm.Designer.cs">
<DependentUpon>SegmentPickUpForm.cs</DependentUpon>
</Compile>
<Compile Include="SegmentProductionAuto_\IdentifySelectionDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SegmentProductionAuto_\IdentifySelectionDialog.Designer.cs">
<DependentUpon>IdentifySelectionDialog.cs</DependentUpon>
</Compile>
<Compile Include="SegmentProductionAuto_\WeightDetails.cs" />
<Compile Include="SegmentProductionAuto_\LogForm.cs">
<SubType>Form</SubType>
@ -418,6 +424,9 @@
<EmbeddedResource Include="SegmentPickUp_\SegmentPickUpForm.resx">
<DependentUpon>SegmentPickUpForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SegmentProductionAuto_\IdentifySelectionDialog.resx">
<DependentUpon>IdentifySelectionDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SegmentProductionAuto_\LogForm.resx">
<DependentUpon>LogForm.cs</DependentUpon>
</EmbeddedResource>


+ 57
- 41
ButcherFactory.Form/Controls/UserControl1.Designer.cs View File

@ -28,50 +28,66 @@
/// </summary>
private void InitializeComponent()
{
this.Label = new ButcherFactory.Controls.CircleButton();
this.Button = new ButcherFactory.Controls.ColorButton();
this.SuspendLayout();
//
// Label
//
this.Label.BackColor = System.Drawing.Color.DeepSkyBlue;
this.Label.Font = new System.Drawing.Font("黑体", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Label.ForeColor = System.Drawing.Color.White;
this.Label.Location = new System.Drawing.Point(111, 0);
this.Label.MaxCount = 1;
this.Label.MinCount = 0;
this.Label.Name = "Label";
this.Label.Size = new System.Drawing.Size(64, 56);
this.Label.TabIndex = 1;
this.Label.Text = "1-0";
this.Label.UseVisualStyleBackColor = false;
//
// Button
//
this.Button.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245)))));
this.Button.ForeColor = System.Drawing.Color.White;
this.Button.Location = new System.Drawing.Point(0, 0);
this.Button.Name = "Button";
this.Button.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107)))));
this.Button.Size = new System.Drawing.Size(140, 90);
this.Button.TabIndex = 2;
this.Button.UseVisualStyleBackColor = false;
//
// ButtonTag
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.Label);
this.Controls.Add(this.Button);
this.Name = "ButtonTag";
this.Size = new System.Drawing.Size(178, 90);
this.ResumeLayout(false);
this.Label = new ButcherFactory.Controls.CircleButton();
this.Button = new ButcherFactory.Controls.ColorButton();
this.identityButton = new ButcherFactory.Controls.ColorButton();
this.SuspendLayout();
//
// Label
//
this.Label.BackColor = System.Drawing.Color.DeepSkyBlue;
this.Label.Font = new System.Drawing.Font("黑体", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Label.ForeColor = System.Drawing.Color.White;
this.Label.Location = new System.Drawing.Point(111, 0);
this.Label.MaxCount = 1;
this.Label.MinCount = 0;
this.Label.Name = "Label";
this.Label.Size = new System.Drawing.Size(64, 56);
this.Label.TabIndex = 1;
this.Label.Text = "1-0";
this.Label.UseVisualStyleBackColor = false;
//
// Button
//
this.Button.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245)))));
this.Button.ForeColor = System.Drawing.Color.White;
this.Button.Location = new System.Drawing.Point(0, 0);
this.Button.Name = "Button";
this.Button.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107)))));
this.Button.Size = new System.Drawing.Size(140, 90);
this.Button.TabIndex = 2;
this.Button.UseVisualStyleBackColor = false;
//
// identityButton
//
this.identityButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.identityButton.Font = new System.Drawing.Font("宋体", 12F);
this.identityButton.ForeColor = System.Drawing.Color.DimGray;
this.identityButton.Location = new System.Drawing.Point(0, 87);
this.identityButton.Name = "identityButton";
this.identityButton.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107)))));
this.identityButton.Size = new System.Drawing.Size(140, 55);
this.identityButton.TabIndex = 3;
this.identityButton.Text = "选择标识";
this.identityButton.UseVisualStyleBackColor = false;
//
// ButtonTag
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.identityButton);
this.Controls.Add(this.Label);
this.Controls.Add(this.Button);
this.Name = "ButtonTag";
this.Size = new System.Drawing.Size(178, 145);
this.ResumeLayout(false);
}
#endregion
public ColorButton Button;
public CircleButton Label;
}
public CircleButton Label;
public ColorButton identityButton;
}
}

+ 119
- 119
ButcherFactory.Form/Controls/UserControl1.resx View File

@ -1,120 +1,120 @@
<?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>
<?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>
</root>

+ 123
- 0
ButcherFactory.Form/SegmentProductionAuto_/IdentifySelectionDialog.Designer.cs View File

@ -0,0 +1,123 @@

namespace ButcherFactory.SegmentProductionAuto_
{
partial class IdentifySelectionDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.okBtn = new ButcherFactory.Controls.ColorButton();
this.clearBtn = new ButcherFactory.Controls.ColorButton();
this.identityRemark = new System.Windows.Forms.Label();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.goodsNameLbl = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// okBtn
//
this.okBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245)))));
this.okBtn.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.okBtn.ForeColor = System.Drawing.Color.White;
this.okBtn.Location = new System.Drawing.Point(110, 374);
this.okBtn.Name = "okBtn";
this.okBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107)))));
this.okBtn.Size = new System.Drawing.Size(140, 56);
this.okBtn.TabIndex = 0;
this.okBtn.Text = "确定";
this.okBtn.UseVisualStyleBackColor = false;
this.okBtn.Click += new System.EventHandler(this.okBtn_Click);
//
// clearBtn
//
this.clearBtn.BackColor = System.Drawing.Color.Red;
this.clearBtn.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.clearBtn.ForeColor = System.Drawing.Color.White;
this.clearBtn.Location = new System.Drawing.Point(321, 374);
this.clearBtn.Name = "clearBtn";
this.clearBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(215)))), ((int)(((byte)(107)))));
this.clearBtn.Size = new System.Drawing.Size(137, 56);
this.clearBtn.TabIndex = 1;
this.clearBtn.Text = "清除标识";
this.clearBtn.UseVisualStyleBackColor = false;
this.clearBtn.Click += new System.EventHandler(this.clearBtn_Click);
//
// identityRemark
//
this.identityRemark.AutoSize = true;
this.identityRemark.Font = new System.Drawing.Font("微软雅黑", 14F);
this.identityRemark.ForeColor = System.Drawing.Color.Red;
this.identityRemark.Location = new System.Drawing.Point(36, 314);
this.identityRemark.Name = "identityRemark";
this.identityRemark.Size = new System.Drawing.Size(88, 25);
this.identityRemark.TabIndex = 2;
this.identityRemark.Text = "标识注释";
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Location = new System.Drawing.Point(17, 90);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(529, 184);
this.flowLayoutPanel1.TabIndex = 3;
//
// goodsNameLbl
//
this.goodsNameLbl.AutoSize = true;
this.goodsNameLbl.Font = new System.Drawing.Font("微软雅黑", 17F, System.Drawing.FontStyle.Bold);
this.goodsNameLbl.ForeColor = System.Drawing.Color.DeepSkyBlue;
this.goodsNameLbl.Location = new System.Drawing.Point(24, 31);
this.goodsNameLbl.Name = "goodsNameLbl";
this.goodsNameLbl.Size = new System.Drawing.Size(83, 31);
this.goodsNameLbl.TabIndex = 4;
this.goodsNameLbl.Text = "冻带皮";
//
// IdentifySelectionDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(566, 468);
this.Controls.Add(this.goodsNameLbl);
this.Controls.Add(this.flowLayoutPanel1);
this.Controls.Add(this.identityRemark);
this.Controls.Add(this.clearBtn);
this.Controls.Add(this.okBtn);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "IdentifySelectionDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "标识选择";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private Controls.ColorButton okBtn;
private Controls.ColorButton clearBtn;
private System.Windows.Forms.Label identityRemark;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Label goodsNameLbl;
}
}

+ 51
- 0
ButcherFactory.Form/SegmentProductionAuto_/IdentifySelectionDialog.cs View File

@ -0,0 +1,51 @@
using ButcherFactory.BO;
using ButcherFactory.Controls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ButcherFactory.SegmentProductionAuto_
{
public partial class IdentifySelectionDialog : Form
{
ClientGoodsSet_Detail set;
public IdentifySelectionDialog(ClientGoodsSet_Detail clientGoodsSet)
{
this.set = clientGoodsSet;
InitializeComponent();
goodsNameLbl.Text = set.Goods_Name;
identityRemark.Text = set.SelectedIdentify == null ? "" : set.SelectedIdentify.Remark;
foreach (var item in set.Identify)
{
var btn = new ColorButton() { Width = 100, Height = 62, Text = item.Identify, Font = new Font("宋体", 15), Margin = new Padding(15, 3, 15, 0), EnableGroup = true };
btn.Tag = item;
if (set.SelectedIdentify != null && set.SelectedIdentify.Identify == item.Identify)
btn.Selected = true;
btn.Click += delegate
{
var obj = btn.Tag as GoodsIdentify;
identityRemark.Text = obj.Remark;
set.SelectedIdentify = obj;
};
flowLayoutPanel1.Controls.Add(btn);
}
}
private void okBtn_Click(object sender, EventArgs e)
{
this.Close();
}
private void clearBtn_Click(object sender, EventArgs e)
{
set.SelectedIdentify = null;
this.Close();
}
}
}

+ 120
- 0
ButcherFactory.Form/SegmentProductionAuto_/IdentifySelectionDialog.resx View File

@ -0,0 +1,120 @@
<?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>
</root>

+ 31
- 4
ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs View File

@ -43,6 +43,7 @@ namespace ButcherFactory.SegmentProductionAuto_
long? batchID;
DateTime? batchDate;
NotAuto.SegmentProductionFormConfig config;
List<GoodsIdentify> identityList;
public SegmentProductionAutoForm()
{
InitializeComponent();
@ -115,6 +116,7 @@ namespace ButcherFactory.SegmentProductionAuto_
wDic = mCache.Cache;
_freshTotalCode = SegmentProductionBL.InitFreshTotalCode();
_stayTotalCode = SegmentProductionBL.InitStayTotalCode();
identityList = SegmentProductionBL.GetGoodsIdentify();
}
void LoadBind()
@ -135,6 +137,7 @@ namespace ButcherFactory.SegmentProductionAuto_
var changed = BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.);
changed = BaseInfoSyncRpc.SyncBaseInfo<WorkUnit>() || changed;
changed = BaseInfoSyncRpc.SyncProductBatch(1) || changed;
changed = BaseInfoSyncRpc.SyncGoodsIdentify(out identityList) || changed;
ok = true;
if (changed || !bind)
BindBasicInfo();
@ -143,8 +146,9 @@ namespace ButcherFactory.SegmentProductionAuto_
msglbl.Text = string.Empty;
}));
}
catch
catch(Exception ex)
{
if (!bind)
{
BindBasicInfo();
@ -191,7 +195,6 @@ namespace ButcherFactory.SegmentProductionAuto_
var groupBtn = sender as ColorButton;
groupKey = groupBtn.Text;
var arr = goodsSetDic[groupKey];
int i = 0;
foreach (var item in arr)
{
var bTag = new ButtonTag();
@ -283,6 +286,27 @@ namespace ButcherFactory.SegmentProductionAuto_
}
bTag.Button.Tag = item;
if (item.SelectedIdentify != null) {
bTag.identityButton.Text = item.SelectedIdentify.Identify;
}
item.Identify = identityList.Where(x => x.Goods_ID == item.Goods_ID);
if (item.Identify.Any())
{
bTag.identityButton.Click += delegate
{
new IdentifySelectionDialog(item).ShowDialog();
if (item.SelectedIdentify != null)
{
bTag.identityButton.Text = item.SelectedIdentify.Identify;
}
else {
bTag.identityButton.Text = "选择标识";
}
};
}
else {
bTag.identityButton.Enabled = false;
}
bTag.Button.Text = item.Goods_Name;
bTag.Button.Font = new Font("黑体", 15, FontStyle.Bold);
bTag.Button.BackColor = Color.Black;
@ -292,7 +316,6 @@ namespace ButcherFactory.SegmentProductionAuto_
bTag.Button.Width = 140;
bTag.Button.Height = 90;
flowLayoutPanel2.Controls.Add(bTag);
i++;
}
}
@ -337,7 +360,11 @@ namespace ButcherFactory.SegmentProductionAuto_
entity.StandardPic = detail.StandardPic;
entity.GoodsType = detail.GoodsType;
entity.NoTotalCode = detail.NoTotalCode;
if (detail.SelectedIdentify != null)
{
entity.Identify = detail.SelectedIdentify.Identify;
entity.IdentifyRemark = detail.SelectedIdentify.Remark;
}
if (!string.IsNullOrEmpty(statisticNumberBox.Text))
entity.StatisticNumber = decimal.Parse(statisticNumberBox.Text);


+ 1
- 0
ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs View File

@ -40,6 +40,7 @@ namespace ButcherFactory.SegmentProduction_
var url = string.Format(AppContext.ConnectInfo.TraceBackUrl + "?code={0}", entity.BarCode);
BwpClientPrint.BwpClientWebPrint.Create2DPic(url, imgUrl, 120);
dic.Add("$ImageUrl", imgUrl);
dic.Add("$Identity", entity.Identify);
var barImgUrl = string.Format(IMGFILE, id + "_bar");
try


+ 3
- 3
ButcherFactory.Form/SegmentProduction_/SegmentSumCodePrint.cs View File

@ -23,13 +23,13 @@ namespace ButcherFactory.SegmentProduction_
var dic = new Dictionary<string, string>();
var entity = entitys.FirstOrDefault();
var groupByGoods = entitys.GroupBy(x => x.Goods_ID);
var groupByGoods = entitys.GroupBy(x =>new { x.Goods_ID, x.Identify });
var info = string.Empty;
foreach (var item in groupByGoods)
{
var f = item.FirstOrDefault();
info += string.Format("<p class='g_name'>{0}</p>", f.Goods_Name);
info += string.Format("<p class='g_number'>件数:{0}</p>", item.Count());
info += string.Format("<p class='g_name'>{0}</p>", f.Goods_Name);
info += string.Format("<p class='g_number'>件数:{0} &nbsp;&nbsp; {1}</p>", item.Count(), f.Identify);
}


Loading…
Cancel
Save