Browse Source

白条入库调整。

master
yibo 8 years ago
parent
commit
d6948ed27b
10 changed files with 241 additions and 164 deletions
  1. +4
    -3
      BO/Utils/AfterLoginUtil.cs
  2. +2
    -2
      ButcherManageClient/Login.cs
  3. +4
    -0
      TrunksIousOutInStore/LocalSyncBO/TrunksIousOutInStoreRecord.cs
  4. +156
    -120
      TrunksIousOutInStore/TrunksIousOutInStoreForm.Designer.cs
  5. +25
    -4
      TrunksIousOutInStore/TrunksIousOutInStoreForm.cs
  6. +12
    -12
      TrunksIousOutInStore/TrunksIousOutInStoreForm.resx
  7. +5
    -0
      WeighAndGrading/GradeFrom.cs
  8. +0
    -3
      WeighAndGrading/GradeFrom.resx
  9. +4
    -0
      WeighAndGrading/WeighAndGrading.csproj
  10. +29
    -20
      WeighAndGrading/WeightGradePrint.cs

+ 4
- 3
BO/Utils/AfterLoginUtil.cs View File

@ -22,7 +22,7 @@ namespace BO.Utils
// static List<Tuple<string, string>> roleToAssemblies = new List<Tuple<string, string>>(){new Tuple<string,string>("排宰员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), // static List<Tuple<string, string>> roleToAssemblies = new List<Tuple<string, string>>(){new Tuple<string,string>("排宰员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"),
// new Tuple<string,string>("过磅员",@"C:\B3\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), // new Tuple<string,string>("过磅员",@"C:\B3\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"),
// new Tuple<string,string>("验质员",@"C:\B3\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"), // new Tuple<string,string>("验质员",@"C:\B3\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"),
// new Tuple<string,string>("定级员",@"C:\B3\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"),
// new Tuple<string,string>("定级员",@"C:\\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"),
// new Tuple<string,string>("窒晕员",@"C:\B3\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"), // new Tuple<string,string>("窒晕员",@"C:\B3\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"),
// new Tuple<string,string>("胴体白条出入库",@"C:\B3\src\B3ButcherManageClient\TrunksIousOutInStore\bin\Debug\TrunksIousOutInStore"), // new Tuple<string,string>("胴体白条出入库",@"C:\B3\src\B3ButcherManageClient\TrunksIousOutInStore\bin\Debug\TrunksIousOutInStore"),
// new Tuple<string,string>("掉猪处理员",@"C:\B3\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"), // new Tuple<string,string>("掉猪处理员",@"C:\B3\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"),
@ -37,9 +37,9 @@ namespace BO.Utils
new Tuple<string,string>("排宰员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), new Tuple<string,string>("排宰员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"),
new Tuple<string,string>("过磅员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), new Tuple<string,string>("过磅员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"),
new Tuple<string,string>("验质员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"), new Tuple<string,string>("验质员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"),
new Tuple<string,string>("定级员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"),
new Tuple<string,string>("定级员",@"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"),
new Tuple<string,string>("窒晕员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"), new Tuple<string,string>("窒晕员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"),
new Tuple<string,string>("胴体白条入库",@"D:\BWP\BWPB3\src\B3ButcherManageClient\TrunksIousOutInStore\bin\Debug\TrunksIousOutInStore"),
new Tuple<string,string>("白条入库",@"D:\BWP\BWPB3\src\B3ButcherManageClient\TrunksIousOutInStore\bin\Debug\TrunksIousOutInStore"),
new Tuple<string,string>("掉猪处理员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"), new Tuple<string,string>("掉猪处理员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"),
new Tuple<string,string>("配货员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\Distribution\bin\Debug\Distribution"), new Tuple<string,string>("配货员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\Distribution\bin\Debug\Distribution"),
new Tuple<string,string>("分割称重",@"D:\BWP\BWPB3\src\B3ButcherManageClient\SegmentationWeight\bin\Debug\SegmentationWeight"), new Tuple<string,string>("分割称重",@"D:\BWP\BWPB3\src\B3ButcherManageClient\SegmentationWeight\bin\Debug\SegmentationWeight"),
@ -58,6 +58,7 @@ namespace BO.Utils
new Tuple<string,string>("分割称重",@"SegmentationWeight"), new Tuple<string,string>("分割称重",@"SegmentationWeight"),
new Tuple<string,string>("分割入库",@"SegmentationInStore"), new Tuple<string,string>("分割入库",@"SegmentationInStore"),
new Tuple<string,string>("定级校验",@"WeighAndGrading"), new Tuple<string,string>("定级校验",@"WeighAndGrading"),
new Tuple<string,string>("白条入库",@"TrunksIousOutInStore"),
}; };
#endif #endif


+ 2
- 2
ButcherManageClient/Login.cs View File

@ -71,10 +71,10 @@ namespace ButcherManageClient
} }
#if DEBUG #if DEBUG
var form = AfterLoginUtil.CreateForm("分割称重");
// var form = AfterLoginUtil.CreateForm("分割称重");
#endif #endif
#if !DEBUG
#if DEBUG
var form = AfterLoginUtil.CreateForm(ButcherAppContext.Context.UserConfig.Role); var form = AfterLoginUtil.CreateForm(ButcherAppContext.Context.UserConfig.Role);
#endif #endif


+ 4
- 0
TrunksIousOutInStore/LocalSyncBO/TrunksIousOutInStoreRecord.cs View File

@ -25,8 +25,12 @@ namespace TrunksIousOutInStore.LocalSyncBO
set { mNumber = value; } set { mNumber = value; }
} }
public decimal? BeforeWeight { get; set; }
public decimal? Weight { get; set; } public decimal? Weight { get; set; }
public decimal? DiscontWeight { get { return (BeforeWeight ?? 0) - (Weight ?? 0); } }
public string CarcassStatus{ get; set; }// 胴体状态 public string CarcassStatus{ get; set; }// 胴体状态
public override string GetDtoJson() public override string GetDtoJson()
{ {


+ 156
- 120
TrunksIousOutInStore/TrunksIousOutInStoreForm.Designer.cs View File

@ -28,12 +28,15 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.btnEnableWeight = new System.Windows.Forms.Button(); this.btnEnableWeight = new System.Windows.Forms.Button();
@ -51,6 +54,13 @@
this.btnWeightSet = new System.Windows.Forms.Button(); this.btnWeightSet = new System.Windows.Forms.Button();
this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.gridUnCheck = new System.Windows.Forms.DataGridView();
this.uncheck序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.uncheck条码 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.uncheck产品名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.uncheck数量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.uncheck重量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.gridChecked = new BWP.WinFormControl.UDataGridView(); this.gridChecked = new BWP.WinFormControl.UDataGridView();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn(); this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn(); this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -59,13 +69,8 @@
this. = new System.Windows.Forms.DataGridViewTextBoxColumn(); this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn(); this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn(); this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.gridUnCheck = new System.Windows.Forms.DataGridView();
this.uncheck序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.uncheck条码 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.uncheck产品名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.uncheck数量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.uncheck重量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.lbStore = new System.Windows.Forms.Label();
this.cbxBatch = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
@ -78,9 +83,9 @@
this.splitContainer2.Panel1.SuspendLayout(); this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.SuspendLayout(); this.splitContainer2.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridChecked)).BeginInit();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridUnCheck)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridUnCheck)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridChecked)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// splitContainer1 // splitContainer1
@ -152,7 +157,9 @@
// //
this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel3.Controls.Add(this.cbxBatch);
this.panel3.Controls.Add(this.cbxStore); this.panel3.Controls.Add(this.cbxStore);
this.panel3.Controls.Add(this.lbStore);
this.panel3.Controls.Add(this.label1); this.panel3.Controls.Add(this.label1);
this.panel3.Controls.Add(this.cbxWorkUnit); this.panel3.Controls.Add(this.cbxWorkUnit);
this.panel3.Controls.Add(this.label5); this.panel3.Controls.Add(this.label5);
@ -168,7 +175,7 @@
this.cbxStore.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbxStore.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbxStore.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.cbxStore.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbxStore.FormattingEnabled = true; this.cbxStore.FormattingEnabled = true;
this.cbxStore.Location = new System.Drawing.Point(75, 91);
this.cbxStore.Location = new System.Drawing.Point(75, 73);
this.cbxStore.Name = "cbxStore"; this.cbxStore.Name = "cbxStore";
this.cbxStore.Size = new System.Drawing.Size(121, 24); this.cbxStore.Size = new System.Drawing.Size(121, 24);
this.cbxStore.TabIndex = 43; this.cbxStore.TabIndex = 43;
@ -176,7 +183,7 @@
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(9, 98);
this.label1.Location = new System.Drawing.Point(9, 80);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12); this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 42; this.label1.TabIndex = 42;
@ -187,7 +194,7 @@
this.cbxWorkUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbxWorkUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbxWorkUnit.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.cbxWorkUnit.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbxWorkUnit.FormattingEnabled = true; this.cbxWorkUnit.FormattingEnabled = true;
this.cbxWorkUnit.Location = new System.Drawing.Point(75, 48);
this.cbxWorkUnit.Location = new System.Drawing.Point(75, 41);
this.cbxWorkUnit.Name = "cbxWorkUnit"; this.cbxWorkUnit.Name = "cbxWorkUnit";
this.cbxWorkUnit.Size = new System.Drawing.Size(121, 24); this.cbxWorkUnit.Size = new System.Drawing.Size(121, 24);
this.cbxWorkUnit.TabIndex = 40; this.cbxWorkUnit.TabIndex = 40;
@ -195,7 +202,7 @@
// label5 // label5
// //
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(9, 54);
this.label5.Location = new System.Drawing.Point(9, 47);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(65, 12); this.label5.Size = new System.Drawing.Size(65, 12);
this.label5.TabIndex = 37; this.label5.TabIndex = 37;
@ -275,28 +282,117 @@
this.groupBox2.Controls.Add(this.gridChecked); this.groupBox2.Controls.Add(this.gridChecked);
this.groupBox2.Location = new System.Drawing.Point(48, 252); this.groupBox2.Location = new System.Drawing.Point(48, 252);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(667, 179);
this.groupBox2.Size = new System.Drawing.Size(665, 177);
this.groupBox2.TabIndex = 3; this.groupBox2.TabIndex = 3;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "已提交"; this.groupBox2.Text = "已提交";
// //
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.gridUnCheck);
this.groupBox1.Location = new System.Drawing.Point(48, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(670, 220);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "待提交";
//
// gridUnCheck
//
this.gridUnCheck.AllowUserToAddRows = false;
this.gridUnCheck.AllowUserToDeleteRows = false;
this.gridUnCheck.AllowUserToResizeColumns = false;
this.gridUnCheck.AllowUserToResizeRows = false;
dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.gridUnCheck.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10;
this.gridUnCheck.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.gridUnCheck.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
this.gridUnCheck.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gridUnCheck.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.uncheck序号,
this.uncheck条码,
this.uncheck产品名称,
this.uncheck数量,
this.uncheck重量});
this.gridUnCheck.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridUnCheck.Location = new System.Drawing.Point(3, 17);
this.gridUnCheck.MultiSelect = false;
this.gridUnCheck.Name = "gridUnCheck";
this.gridUnCheck.ReadOnly = true;
this.gridUnCheck.RowHeadersVisible = false;
dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.gridUnCheck.RowsDefaultCellStyle = dataGridViewCellStyle12;
this.gridUnCheck.RowTemplate.Height = 23;
this.gridUnCheck.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.gridUnCheck.Size = new System.Drawing.Size(664, 200);
this.gridUnCheck.TabIndex = 3;
//
// uncheck序号
//
this.uncheck序号.DataPropertyName = "ID";
this.uncheck序号.HeaderText = "序号";
this.uncheck序号.Name = "uncheck序号";
this.uncheck序号.ReadOnly = true;
this.uncheck序号.Visible = false;
//
// uncheck条码
//
this.uncheck条码.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.uncheck条码.DataPropertyName = "BarCode";
this.uncheck条码.HeaderText = "条码";
this.uncheck条码.Name = "uncheck条码";
this.uncheck条码.ReadOnly = true;
//
// uncheck产品名称
//
this.uncheck产品名称.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.uncheck产品名称.DataPropertyName = "Goods_Name";
this.uncheck产品名称.HeaderText = "产品名称";
this.uncheck产品名称.Name = "uncheck产品名称";
this.uncheck产品名称.ReadOnly = true;
this.uncheck产品名称.Width = 97;
//
// uncheck数量
//
this.uncheck数量.DataPropertyName = "Number";
this.uncheck数量.HeaderText = "数量";
this.uncheck数量.Name = "uncheck数量";
this.uncheck数量.ReadOnly = true;
//
// uncheck重量
//
this.uncheck重量.DataPropertyName = "Weight";
this.uncheck重量.HeaderText = "重量";
this.uncheck重量.Name = "uncheck重量";
this.uncheck重量.ReadOnly = true;
//
// gridChecked // gridChecked
// //
this.gridChecked.AllowUserToAddRows = false; this.gridChecked.AllowUserToAddRows = false;
this.gridChecked.AllowUserToDeleteRows = false; this.gridChecked.AllowUserToDeleteRows = false;
this.gridChecked.AllowUserToResizeColumns = false; this.gridChecked.AllowUserToResizeColumns = false;
this.gridChecked.AllowUserToResizeRows = false; this.gridChecked.AllowUserToResizeRows = false;
dataGridViewCellStyle37.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.gridChecked.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle37;
dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.gridChecked.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13;
this.gridChecked.BackgroundColor = System.Drawing.Color.White; this.gridChecked.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle38.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle38.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle38.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle38.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle38.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle38.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle38.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.gridChecked.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle38;
dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.gridChecked.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle14;
this.gridChecked.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.gridChecked.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gridChecked.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.gridChecked.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this., this.,
@ -312,12 +408,12 @@
this.gridChecked.Name = "gridChecked"; this.gridChecked.Name = "gridChecked";
this.gridChecked.ReadOnly = true; this.gridChecked.ReadOnly = true;
this.gridChecked.RowHeadersVisible = false; this.gridChecked.RowHeadersVisible = false;
dataGridViewCellStyle39.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle39.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.gridChecked.RowsDefaultCellStyle = dataGridViewCellStyle39;
dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle18.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.gridChecked.RowsDefaultCellStyle = dataGridViewCellStyle18;
this.gridChecked.RowTemplate.Height = 23; this.gridChecked.RowTemplate.Height = 23;
this.gridChecked.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.gridChecked.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.gridChecked.Size = new System.Drawing.Size(661, 159);
this.gridChecked.Size = new System.Drawing.Size(659, 157);
this.gridChecked.TabIndex = 4; this.gridChecked.TabIndex = 4;
// //
// 序号 // 序号
@ -357,110 +453,48 @@
// 入库重量 // 入库重量
// //
this..DataPropertyName = "Weight"; this..DataPropertyName = "Weight";
dataGridViewCellStyle15.Format = "#0.######";
this..DefaultCellStyle = dataGridViewCellStyle15;
this..HeaderText = "入库重量"; this..HeaderText = "入库重量";
this..Name = "入库重量"; this..Name = "入库重量";
this..ReadOnly = true; this..ReadOnly = true;
// //
// 胴体重量 // 胴体重量
// //
this..DataPropertyName = "BeforeWeight";
dataGridViewCellStyle16.Format = "#0.######";
this..DefaultCellStyle = dataGridViewCellStyle16;
this..HeaderText = "胴体重量"; this..HeaderText = "胴体重量";
this..Name = "胴体重量"; this..Name = "胴体重量";
this..ReadOnly = true; this..ReadOnly = true;
// //
// 损耗 // 损耗
// //
this..DataPropertyName = "DiscontWeight";
dataGridViewCellStyle17.Format = "#0.######";
this..DefaultCellStyle = dataGridViewCellStyle17;
this..HeaderText = "损耗"; this..HeaderText = "损耗";
this..Name = "损耗"; this..Name = "损耗";
this..ReadOnly = true; this..ReadOnly = true;
// //
// groupBox1
// lbStore
// //
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.gridUnCheck);
this.groupBox1.Location = new System.Drawing.Point(48, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(670, 220);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "待提交";
this.lbStore.AutoSize = true;
this.lbStore.Location = new System.Drawing.Point(9, 113);
this.lbStore.Name = "lbStore";
this.lbStore.Size = new System.Drawing.Size(65, 12);
this.lbStore.TabIndex = 42;
this.lbStore.Text = "批 次:";
// //
// gridUnCheck
// cbxBatch
// //
this.gridUnCheck.AllowUserToAddRows = false;
this.gridUnCheck.AllowUserToDeleteRows = false;
this.gridUnCheck.AllowUserToResizeColumns = false;
this.gridUnCheck.AllowUserToResizeRows = false;
dataGridViewCellStyle40.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.gridUnCheck.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle40;
this.gridUnCheck.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle41.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle41.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle41.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle41.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle41.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle41.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle41.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.gridUnCheck.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle41;
this.gridUnCheck.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gridUnCheck.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.uncheck序号,
this.uncheck条码,
this.uncheck产品名称,
this.uncheck数量,
this.uncheck重量});
this.gridUnCheck.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridUnCheck.Location = new System.Drawing.Point(3, 17);
this.gridUnCheck.MultiSelect = false;
this.gridUnCheck.Name = "gridUnCheck";
this.gridUnCheck.ReadOnly = true;
this.gridUnCheck.RowHeadersVisible = false;
dataGridViewCellStyle42.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle42.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.gridUnCheck.RowsDefaultCellStyle = dataGridViewCellStyle42;
this.gridUnCheck.RowTemplate.Height = 23;
this.gridUnCheck.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.gridUnCheck.Size = new System.Drawing.Size(664, 200);
this.gridUnCheck.TabIndex = 3;
//
// uncheck序号
//
this.uncheck序号.DataPropertyName = "ID";
this.uncheck序号.HeaderText = "序号";
this.uncheck序号.Name = "uncheck序号";
this.uncheck序号.ReadOnly = true;
this.uncheck序号.Visible = false;
//
// uncheck条码
//
this.uncheck条码.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.uncheck条码.DataPropertyName = "BarCode";
this.uncheck条码.HeaderText = "条码";
this.uncheck条码.Name = "uncheck条码";
this.uncheck条码.ReadOnly = true;
//
// uncheck产品名称
//
this.uncheck产品名称.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.uncheck产品名称.DataPropertyName = "Goods_Name";
this.uncheck产品名称.HeaderText = "产品名称";
this.uncheck产品名称.Name = "uncheck产品名称";
this.uncheck产品名称.ReadOnly = true;
this.uncheck产品名称.Width = 97;
//
// uncheck数量
//
this.uncheck数量.DataPropertyName = "Number";
this.uncheck数量.HeaderText = "数量";
this.uncheck数量.Name = "uncheck数量";
this.uncheck数量.ReadOnly = true;
//
// uncheck重量
//
this.uncheck重量.DataPropertyName = "Weight";
this.uncheck重量.HeaderText = "重量";
this.uncheck重量.Name = "uncheck重量";
this.uncheck重量.ReadOnly = true;
this.cbxBatch.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbxBatch.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbxBatch.FormattingEnabled = true;
this.cbxBatch.Location = new System.Drawing.Point(75, 106);
this.cbxBatch.Name = "cbxBatch";
this.cbxBatch.Size = new System.Drawing.Size(121, 24);
this.cbxBatch.TabIndex = 43;
// //
// TrunksIousOutInStoreForm // TrunksIousOutInStoreForm
// //
@ -472,7 +506,7 @@
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "TrunksIousOutInStoreForm"; this.Name = "TrunksIousOutInStoreForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "胴体白条入库";
this.Text = "白条入库";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.TrunksIousOutInStoreForm_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.TrunksIousOutInStoreForm_FormClosing);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.TrunksIousOutInStoreForm_FormClosed); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.TrunksIousOutInStoreForm_FormClosed);
@ -492,9 +526,9 @@
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false); this.splitContainer2.ResumeLayout(false);
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridChecked)).EndInit();
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridUnCheck)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridUnCheck)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridChecked)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@ -533,5 +567,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn ; private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ; private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ; private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.ComboBox cbxBatch;
private System.Windows.Forms.Label lbStore;
} }
} }

+ 25
- 4
TrunksIousOutInStore/TrunksIousOutInStoreForm.cs View File

@ -369,14 +369,21 @@ namespace TrunksIousOutInStore
cbxWorkUnit.ValueMember = "Code"; cbxWorkUnit.ValueMember = "Code";
} }
var batch = mDropDownSets.Details.FirstOrDefault(x => x.Name == DropDownSets.);
if (batch != null)
var store = mDropDownSets.Details.FirstOrDefault(x => x.Name == DropDownSets.);
if (store != null)
{ {
cbxStore.DataSource = batch.Details;
cbxStore.DataSource = store.Details;
cbxStore.DisplayMember = "Name"; cbxStore.DisplayMember = "Name";
cbxStore.ValueMember = "ID"; cbxStore.ValueMember = "ID";
} }
var batch = mDropDownSets.Details.FirstOrDefault(x => x.Name == DropDownSets.);
if (batch != null)
{
cbxBatch.DataSource = batch.Details;
cbxBatch.DisplayMember = "Name";
cbxBatch.ValueMember = "ID";
}
} }
private DropDownSets GetmDropDownSets() private DropDownSets GetmDropDownSets()
@ -385,9 +392,11 @@ namespace TrunksIousOutInStore
var wrokUnitSet = GetWrokUnitSet(); var wrokUnitSet = GetWrokUnitSet();
var wrokShopSet = GetWrokShopSet(); var wrokShopSet = GetWrokShopSet();
var storeSet = GetStoreSet(); var storeSet = GetStoreSet();
var batchSet = GetBatchSet();
sets.Details.Add(wrokUnitSet); sets.Details.Add(wrokUnitSet);
sets.Details.Add(wrokShopSet); sets.Details.Add(wrokShopSet);
sets.Details.Add(storeSet); sets.Details.Add(storeSet);
sets.Details.Add(batchSet);
return sets; return sets;
} }
@ -427,6 +436,18 @@ namespace TrunksIousOutInStore
return set; return set;
} }
private DropDownSet GetBatchSet()
{
var json = RpcFacade.Call<string>("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/GetProductBatchList");
var set = new DropDownSet();
set.Name = DropDownSets.;
foreach (var detail in JsonConvert.DeserializeObject<List<DropDownSet_Detail>>(json))
{
set.Details.Add(detail);
}
return set;
}
static object _obj = new object(); static object _obj = new object();
private void doInsertUnSubmit(decimal weight) private void doInsertUnSubmit(decimal weight)
@ -467,7 +488,7 @@ namespace TrunksIousOutInStore
public string RoleName public string RoleName
{ {
get { return "胴体白条入库"; }
get { return "白条入库"; }
} }
public Form Generate() public Form Generate()
{ {


+ 12
- 12
TrunksIousOutInStore/TrunksIousOutInStoreForm.resx View File

@ -117,40 +117,40 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="序号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="uncheck序号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="条码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="uncheck条码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="产品名称.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="uncheck产品名称.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="数量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="uncheck数量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="入库重量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="uncheck重量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="胴体重量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="序号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="损耗.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="条码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="uncheck序号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="产品名称.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="uncheck条码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="数量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="uncheck产品名称.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="入库重量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="uncheck数量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="胴体重量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="uncheck重量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="损耗.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">


+ 5
- 0
WeighAndGrading/GradeFrom.cs View File

@ -427,6 +427,11 @@ namespace WeighAndGrading
{ {
WeightGradePrint.Print(entity); WeightGradePrint.Print(entity);
} }
if (string.IsNullOrEmpty(modifyDetail.BarCode))
{
modifyDetail.BarCode = entity.BarCode;
LocalGradeAndWeightBL.Update(modifyDetail, "BarCode");
}
} }


+ 0
- 3
WeighAndGrading/GradeFrom.resx View File

@ -297,7 +297,4 @@
<metadata name="dataConfirmBtn.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="dataConfirmBtn.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root> </root>

+ 4
- 0
WeighAndGrading/WeighAndGrading.csproj View File

@ -34,6 +34,10 @@
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="BwpClientPrint, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\BwpClientPrint.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
<Reference Include="System" /> <Reference Include="System" />


+ 29
- 20
WeighAndGrading/WeightGradePrint.cs View File

@ -41,34 +41,43 @@ namespace WeighAndGrading
entity.BarCode = barcode; entity.BarCode = barcode;
} }
entity._2DQRCode = string.Format(ButcherAppContext.Context.UrlConfig.OutAddress + "?code={0}", entity.BarCode); entity._2DQRCode = string.Format(ButcherAppContext.Context.UrlConfig.OutAddress + "?code={0}", entity.BarCode);
return entity; return entity;
} }
public static void Print(PrintEntity entity)
{
PrintAPI.B_GetUSBBufferLen();
PrintAPI.B_EnumUSB(new byte[128]);
PrintAPI.B_CreateUSBPort(1);
//public static void Print(PrintEntity entity)
//{
// PrintAPI.B_GetUSBBufferLen();
// PrintAPI.B_EnumUSB(new byte[128]);
// PrintAPI.B_CreateUSBPort(1);
PrintAPI.B_Prn_Text_TrueType(110, 26, 31, "宋体", 1, 700, 0, 0, 0, "C1", entity.AccountingUnit_Name);
PrintAPI.B_Prn_Text_TrueType(42, 70, 31, "宋体", 1, 700, 0, 0, 0, "C2", "合格证");
PrintAPI.B_Prn_Text_TrueType(440, 70, 31, "宋体", 1, 700, 0, 0, 0, "C3", entity.Goods_Name);
// PrintAPI.B_Prn_Text_TrueType(110, 26, 31, "宋体", 1, 700, 0, 0, 0, "C1", entity.AccountingUnit_Name);
// PrintAPI.B_Prn_Text_TrueType(42, 70, 31, "宋体", 1, 700, 0, 0, 0, "C2", "合格证");
// PrintAPI.B_Prn_Text_TrueType(440, 70, 31, "宋体", 1, 700, 0, 0, 0, "C3", entity.Goods_Name);
PrintAPI.B_Prn_Text_TrueType(42, 120, 27, "宋体", 1, 400, 0, 0, 0, "C4", string.Format("生产日期:{0}", entity.Date.ToString("yyyy/MM/dd")));
PrintAPI.B_Prn_Text_TrueType(42, 160, 27, "宋体", 1, 400, 0, 0, 0, "C5", string.Format("检 验 员:{0}", entity.Checker));
PrintAPI.B_Prn_Text_TrueType(42, 200, 27, "宋体", 1, 400, 0, 0, 0, "C6", string.Format("保 质 期:{0}", entity.StoreCondition));
// PrintAPI.B_Prn_Text_TrueType(42, 120, 27, "宋体", 1, 400, 0, 0, 0, "C4", string.Format("生产日期:{0}", entity.Date.ToString("yyyy/MM/dd")));
// PrintAPI.B_Prn_Text_TrueType(42, 160, 27, "宋体", 1, 400, 0, 0, 0, "C5", string.Format("检 验 员:{0}", entity.Checker));
// PrintAPI.B_Prn_Text_TrueType(42, 200, 27, "宋体", 1, 400, 0, 0, 0, "C6", string.Format("保 质 期:{0}", entity.StoreCondition));
PrintAPI.B_Prn_Text_TrueType(42, 240, 23, "宋体", 1, 400, 0, 0, 0, "C7", string.Format("电话:{0}", entity.TelNumber));
PrintAPI.B_Prn_Text_TrueType(42, 280, 23, "宋体", 1, 400, 0, 0, 0, "C8", string.Format("产地:{0}", entity.Place));
// PrintAPI.B_Prn_Text_TrueType(42, 240, 23, "宋体", 1, 400, 0, 0, 0, "C7", string.Format("电话:{0}", entity.TelNumber));
// PrintAPI.B_Prn_Text_TrueType(42, 280, 23, "宋体", 1, 400, 0, 0, 0, "C8", string.Format("产地:{0}", entity.Place));
PrintAPI.B_Prn_Barcode(42, 320, 0, "1", 3, 22, 35, 'N', entity.BarCode);
PrintAPI.B_Prn_Text_TrueType(173, 360, 25, "宋体", 1, 500, 0, 0, 0, "C9", entity.BarCode);
PrintAPI.B_Bar2d_QR(430, 105, 2, 6, 'M', 'A', 0, 0, 0, entity._2DQRCode);
// PrintAPI.B_Prn_Barcode(42, 320, 0, "1", 3, 22, 35, 'N', entity.BarCode);
// PrintAPI.B_Prn_Text_TrueType(173, 360, 25, "宋体", 1, 500, 0, 0, 0, "C9", entity.BarCode);
// PrintAPI.B_Bar2d_QR(430, 105, 2, 6, 'M', 'A', 0, 0, 0, entity._2DQRCode);
PrintAPI.B_Set_Direction('B');
PrintAPI.B_Print_Out(1);
PrintAPI.B_ClosePrn();
// PrintAPI.B_Set_Direction('B');
// PrintAPI.B_Print_Out(1);
// PrintAPI.B_ClosePrn();
//}
public static void Print(PrintEntity entity)
{
var dic = new Dictionary<string, string>();
dic.Add("$Goods_Name",entity.Goods_Name);
dic.Add("$Date", entity.Date.ToString("yyyy/MM/dd"));
BwpClientPrint.BwpClientWebPrint.Create2DPic(entity._2DQRCode, "ImageUrl.png", 120);
dic.Add("$ImageUrl", "ImageUrl.png");
BwpClientPrint.BwpClientWebPrint.Print("GradeWeightPrint.html", dic);
} }
} }


Loading…
Cancel
Save