Browse Source

出货单采集满足数量自动触发确认出货,新增出货单界面微调

Hcsy 8 years ago
parent
commit
2694eefdb6

+ 8 - 4
UAS-MES/FunctionCode/Warehouse/Warehouse_FinishedProductOut.cs

@@ -128,10 +128,13 @@ namespace UAS_MES.Warehouse
 
         private void newpi_clck(object sender, EventArgs e)
         {
-            pi_inoutno.Text = newpi.pi_inoutno_text;
-            LoadFormData();
-            LoadGridData();
-            newpi.Close();
+            if (newpi.generate)
+            {
+                pi_inoutno.Text = newpi.pi_inoutno_text;
+                LoadFormData();
+                LoadGridData();
+                newpi.Close();
+            }
         }
 
         private void ProdDetail_Click(object sender, EventArgs e)
@@ -331,6 +334,7 @@ namespace UAS_MES.Warehouse
                             {
                                 dh.UpdateByCondition("prodinout", "pi_pdastatus='已备货'", "pi_inoutno='" + pi_inoutno.Text + "'");
                                 OperateResult.AppendText("出货单" + pi_inoutno.Text + "已完成备货\n", Color.Black,input);
+                                ConfirmOut_Click(sender, e);
                                 return;
                             }
                         }

+ 16 - 22
UAS-MES/FunctionCode/Warehouse/Warehouse_NewPiInOut.Designer.cs

@@ -38,7 +38,7 @@
             this.label1 = new System.Windows.Forms.Label();
             this.note = new System.Windows.Forms.TextBox();
             this.cu_name = new System.Windows.Forms.TextBox();
-            this.normalButton1 = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
+            this.autogener = new System.Windows.Forms.CheckBox();
             this.SuspendLayout();
             // 
             // headBar1
@@ -115,7 +115,7 @@
             this.pi_inoutno.Location = new System.Drawing.Point(84, 50);
             this.pi_inoutno.Margin = new System.Windows.Forms.Padding(2);
             this.pi_inoutno.Name = "pi_inoutno";
-            this.pi_inoutno.Size = new System.Drawing.Size(124, 21);
+            this.pi_inoutno.Size = new System.Drawing.Size(115, 21);
             this.pi_inoutno.TabIndex = 223;
             this.pi_inoutno.TextChanged += new System.EventHandler(this.pi_inoutno_TextChanged);
             // 
@@ -145,30 +145,24 @@
             this.cu_name.Size = new System.Drawing.Size(90, 21);
             this.cu_name.TabIndex = 226;
             // 
-            // normalButton1
-            // 
-            this.normalButton1.AllPower = null;
-            this.normalButton1.BackColor = System.Drawing.Color.Transparent;
-            this.normalButton1.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.DownImage")));
-            this.normalButton1.Image = null;
-            this.normalButton1.IsShowBorder = true;
-            this.normalButton1.Location = new System.Drawing.Point(217, 45);
-            this.normalButton1.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.MoveImage")));
-            this.normalButton1.Name = "normalButton1";
-            this.normalButton1.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.NormalImage")));
-            this.normalButton1.Power = null;
-            this.normalButton1.Size = new System.Drawing.Size(75, 28);
-            this.normalButton1.TabIndex = 227;
-            this.normalButton1.Text = "生成出货单";
-            this.normalButton1.UseVisualStyleBackColor = false;
-            this.normalButton1.Click += new System.EventHandler(this.MakeButton_Click);
+            // autogener
+            // 
+            this.autogener.AutoSize = true;
+            this.autogener.Checked = true;
+            this.autogener.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.autogener.Location = new System.Drawing.Point(206, 55);
+            this.autogener.Name = "autogener";
+            this.autogener.Size = new System.Drawing.Size(96, 16);
+            this.autogener.TabIndex = 228;
+            this.autogener.Text = "自动生成单号";
+            this.autogener.UseVisualStyleBackColor = true;
             // 
             // Warehouse_NewPiInOut
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(304, 207);
-            this.Controls.Add(this.normalButton1);
+            this.Controls.Add(this.autogener);
             this.Controls.Add(this.cu_name);
             this.Controls.Add(this.note);
             this.Controls.Add(this.label1);
@@ -184,7 +178,7 @@
             this.Tag = "ShowDialogWindow";
             this.Text = "Warehouse_NewPiInOut";
             this.Load += new System.EventHandler(this.Warehouse_NewPiInOut_Load);
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }
@@ -200,6 +194,6 @@
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.TextBox note;
         private System.Windows.Forms.TextBox cu_name;
-        private CustomControl.ButtonUtil.NormalButton normalButton1;
+        private System.Windows.Forms.CheckBox autogener;
     }
 }

+ 17 - 10
UAS-MES/FunctionCode/Warehouse/Warehouse_NewPiInOut.cs

@@ -47,6 +47,9 @@ namespace UAS_MES.Warehouse
             }
         }
 
+        public Boolean generate;
+
+
         public Warehouse_NewPiInOut()
         {
             InitializeComponent();
@@ -54,9 +57,20 @@ namespace UAS_MES.Warehouse
 
         private void Confirm_Click(object sender, EventArgs e)
         {
+            generate = false;
             if (pi_inoutno.Text == "")
             {
-                MakeButton_Click(sender, e);
+                if (autogener.Checked)
+                {
+                    string _macode = "";
+                    string[] param = new string[] { caller, "2", _macode };
+                    dh.CallProcedure("SP_GETMAXNUMBER", ref param);
+                    pi_inoutno.Text = param[2];
+                }
+                else {
+                    MessageBox.Show("出货单号" + pi_inoutno.Text + "未填");
+                    return;
+                }
             }
             if (int.Parse(dh.getFieldDataByCondition("prodinout", "count(1)cn", "pi_inoutno='" + pi_inoutno.Text + "'").ToString()) > 0)
             {
@@ -68,7 +82,6 @@ namespace UAS_MES.Warehouse
                 MessageBox.Show("客户编号未填");
                 return;
             }
-
             sql.Clear();
             sql.Append("insert into prodinout (pi_id,pi_class,pi_inoutno,pi_pdastatus,pi_type,pi_cardcode,pi_title,pi_recordman,");
             sql.Append("pi_recordcode,pi_recorddate,pi_remark)values(prodinout_seq.nextval,'出货单','" + pi_inoutno.Text + "','未备货',");
@@ -76,6 +89,7 @@ namespace UAS_MES.Warehouse
             sql.Append("'" + User.UserCode + "',sysdate,'" + note.Text + "')");
             dh.ExecuteSql(sql.GetString(), "insert");
             MessageBox.Show("添加出货单成功");
+            generate = true;
         }
 
         private void Warehouse_NewPiInOut_Load(object sender, EventArgs e)
@@ -88,6 +102,7 @@ namespace UAS_MES.Warehouse
             cu_code.SetValueField = new string[] { "cu_code", "cu_name" };
             cu_code.FormName = Name;
             cu_code.DbChange += Cu_code_DbChange;
+            generate = false;
         }
 
         private void Cu_code_DbChange(object sender, EventArgs e)
@@ -96,14 +111,6 @@ namespace UAS_MES.Warehouse
             BaseUtil.SetFormValue(this.Controls, dbfind);
         }
 
-        private void MakeButton_Click(object sender, EventArgs e)
-        {
-            string _macode = "";
-            string[] param = new string[] { caller, "2", _macode };
-            dh.CallProcedure("SP_GETMAXNUMBER", ref param);
-            pi_inoutno.Text = param[2];
-        }
-
         private void pi_inoutno_TextChanged(object sender, EventArgs e)
         {
             pi_inoutno1 = pi_inoutno.Text;

+ 0 - 38
UAS-MES/FunctionCode/Warehouse/Warehouse_NewPiInOut.resx

@@ -154,44 +154,6 @@
         2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
         zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
-</value>
-  </data>
-  <data name="normalButton1.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-    <value>
-        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
-        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
-        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
-        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
-        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
-        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
-        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
-        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
-</value>
-  </data>
-  <data name="normalButton1.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-    <value>
-        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
-        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
-        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
-        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
-        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
-        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
-        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
-        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
-        gg==
-</value>
-  </data>
-  <data name="normalButton1.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-    <value>
-        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
-        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
-        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
-        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
-        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
-        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
-        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
-        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
-        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
 </root>