WarM/条码打印/Sc_ICMOToBarCode.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WarM/条码打印/Sc_ICMOToBarCode.designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/MoveStockBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/WebServer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
WarM/ÌõÂë´òÓ¡/Sc_ICMOToBarCode.cs
@@ -57,6 +57,9 @@ //} string HICMOBillNo = ""; HICMOBillNo = txtHICMOBillNo.Text.Trim().ToString(); //éå®è®¢åå· string HSeOrderBillNo = ""; HICMOBillNo = txtHSeOrderBillNo.Text.Trim().ToString(); //ç©æ //if (txtHMaterID.Text.Trim() != "") //{ @@ -98,7 +101,7 @@ //è¿æ»¤æ¡ä»¶ // DSet = SubCn.RunProcReturn("exec h_p_KSTMSC '" + HICMOBillNo + "' , '" + HMaterName + "' , '" + HSourceName + "' ,'" + HEmpName + "' ,'" + HBeginDate + "', '" + HEndDate + "'", "h_p_KSTMSC", ref DBUtility.ClsPub.sExeReturnInfo); DSet = SubCn.RunProcReturn("exec h_p_KSTMSC '" + HSeOrderBillNo + "' ,'" + HICMOBillNo + "' , '" + HMaterName + "' , '" + HSourceName + "' ,'" + HEmpName + "' ,'" + HBeginDate + "', '" + HEndDate + "'", "h_p_KSTMSC", ref DBUtility.ClsPub.sExeReturnInfo); //çæé¦è¡æ é¢ if (DSet == null) { @@ -757,6 +760,97 @@ private void button4_Click(object sender, EventArgs e) { //1.è·åçé¢ä¸é¢æ´ç®±æ°éæ¡è¾å ¥çæ°é èµå¼ç»åé å¹¶å·æ°ç½æ ¼ double HBarCodeQty = 0; double HZXQty = 0; HZXQty = ClsPub.isDoule(txtHZXQty.Text); if (HZXQty ==0) { MessageBox.Show("请è¾å ¥æ´ç®±æ°éï¼"); return; } Display(); //2.è·åç½æ ¼éä¸è¡ç©æID int a = grdMain.CurrentRow.Index; long HMaterID = 0; HMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[a].Cells[Fun_GetCol("HMaterID")].Value); if (HMaterID == 0) { MessageBox.Show("没æéä¸ä»»ä½è®°å½ï¼"); return; } //3.å®ä¹æ¯å¦ç»æçåé int Mul = 0; //4.æ ¹æ®åæ®ç±»åè·åæ¬æ¬¡æ¡ç 主å ç HInterID HInterID = DBUtility.ClsPub.CreateBillID_Prod(ModName, ref DBUtility.ClsPub.sExeReturnInfo); //5.ä»ç½æ ¼ç¬¬ä¸è¡å¾ªç¯è³æåä¸è¡ 夿Iè¡çç©æå ç ä¸Mæ¯å¦ä¸è´ï¼å¦æä¸ä¸è´å循ç¯ä¸ä¸è¡ï¼ for (int i = 0; i < grdMain.Rows.Count; i++) { long HGrdMaterID = 0; HGrdMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.Rows[i].Index].Cells[Fun_GetCol("HMaterID")].Value); if (HMaterID == HGrdMaterID) { double HDDQty = 0; HDDQty = DBUtility.ClsPub.isDoule(grdMain.Rows[grdMain.Rows[i].Index].Cells[Fun_GetCol("è®¢åæ°é")].Value); if (HDDQty >= HZXQty) { HBarCodeQty = HZXQty; this.Sub_SaveBill(); Display(); Mul = Mul + 1; break; } else if(HDDQty < HZXQty) { HBarCodeQty = HDDQty; HZXQty = HZXQty - HDDQty; this.Sub_SaveBill(); Mul = Mul + 1; } } } //3.å å¤æç©ææ¯å¦ä¸è´ 妿ä¸è´å¼å§å¾ªç¯ç½æ ¼ for (int i = 0; i < grdMain.Rows.Count; i++) { //long HGrdMaterID = 0; //HGrdMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.Rows[i].Index].Cells[Fun_GetCol("HMaterID")].Value); //if (HGrdMaterID == HMaterID) //{ // double HDDQty = 0; // HDDQty = DBUtility.ClsPub.isDoule(grdMain.Rows[grdMain.Rows[i].Index].Cells[Fun_GetCol("è®¢åæ°é")].Value); // //å¦æå¾ªç¯ç该è¡è®°å½çè®¢åæ°éå·²ç»å¤§äºçäºæ¬æ¬¡è£ ç®±æ°é åç´æ¥çæå¯ä¸ç å¹¶ä¸å·æ°ç½æ ¼ å·æ°æ¡ç ä¿¡æ¯é¡µ // if (HDDQty >= HZXQty) // { // double HBarCodeQty = 0; // HBarCodeQty = HZXQty; // this.Sub_SaveBill(); // Display(); // } // //妿æ¹è¡è®°å½è®¢åæ°éå°äºæ¬æ¬¡è£ ç®±æ°é åç»§ç»å¾ªç¯ èµ°çæææ¡ç æ¹æ³ // else // { // //æ¥åºç¬¦åæ¡ä»¶çéä¸è¿æ¡æ°éè·è£ ç®±æ°éçå·®å¼å¼ // double HCYQty = 0; // HCYQty = HZXQty - DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.Rows[i].Index].Cells[Fun_GetCol("è®¢åæ°é")].Value); // } //} //else //{ //} } } private void Sub_SaveBill() { HInterID = DBUtility.ClsPub.CreateBillID_Prod(ModName, ref DBUtility.ClsPub.sExeReturnInfo); string HMaterNumber = ""; string HBatchNo = ""; @@ -769,8 +863,8 @@ DataSet Ds; int LSH = 0; //æµæ°´å· string LSH2 = ""; //æµæ°´å·è½¬æ¢æå符 double HSumQty = 0; //äº§åæ°é double HMinQty = 0; //æå°å è£ æ° double HZXQty = 0; //è£ ç®±æ°é double HDDQty = 0; //è®¢åæ°é double HBQty = 0; //ç®±æ° int k = 0; int n = 0; //å䏿¹çææ¡ç ä¸çç¬¬å æ¡ @@ -788,23 +882,11 @@ HDay = "0" + ClsPub.isDate(HDate).Day.ToString(); HDay = HDay.Substring(HDay.Length - 2, 2); HOrgNumber = ClsPub.HOrgNumber; //ç®±æ°å=æ°é/æå°å è£ æ° //double sMoney = 0; //if ((DBUtility.ClsPub.isLong(grdMain.SelectedRows[j].Cells[Fun_GetCol("HMiniQty")].Value) == 0)) //{ // sMoney = 0; //} //else //{ // sMoney = ClsPub.isDoule(grdMain.SelectedRows[j].Cells[Fun_GetCol("HQty")].Value) / ClsPub.isDoule(grdMain.SelectedRows[j].Cells[Fun_GetCol("HMiniQty")].Value); //} //sMoney = Math.Ceiling(sMoney); //grdMain.SelectedRows[j].Cells[Fun_GetCol("HBQty")].Value = sMoney; HBQty = HBQty + ClsPub.isInt(txtHBQty.Text); HMinQty = ClsPub.isDoule(txtHMiniQty.Text); HSumQty = ClsPub.isDoule(txtHICMOQty.Text); //HBQty = HBQty + ClsPub.isInt(txtHBQty.Text); HZXQty = ClsPub.isDoule(txtHZXQty.Text); HDDQty = DBUtility.ClsPub.isDoule(grdMain.Rows[grdMain.SelectedRows[j].Index].Cells[Fun_GetCol("è®¢åæ°é")].Value); if (cmbHBarCodeType.Text == "å¯ä¸æ¡ç ") @@ -818,27 +900,7 @@ TM = HOrgNumber + HMaterNumber + HBatchNo; } n = 0; for (int i = k; i < HBQty; i++) { if (HSumQty - HMinQty > 0) { WeiShu = ""; HSumQty = HSumQty - HMinQty; } else { if (HSumQty == HMinQty) { WeiShu = ""; } else { WeiShu = "å°¾æ°"; } HMinQty = HSumQty; } // LSH = LSH + 1; LSH2 = LSH.ToString(); while (LSH2.Length < LSHlen) //å¦ææµæ°´å·å°äº6使°åé¢è¡¥0 { @@ -857,7 +919,7 @@ string HWei = ""; //å°¾æ° string HBarCode = ""; string HBarCodeType = ""; Int64 HMaterID = 0; Int64 HMaterID1 = 0; Int64 HAuxPropID = 0; Int64 HUnitID = 0; double HQty2 = 0; @@ -891,10 +953,10 @@ HWei = WeiShu; HBarCode = TM; HBarCodeType = ClsPub.isStrNull(cmbHBarCodeType.Text); HMaterID = ClsPub.isLong(grdMain.SelectedRows[j].Cells[Fun_GetCol("HMaterID")].Value); HMaterID1 = ClsPub.isLong(grdMain.SelectedRows[j].Cells[Fun_GetCol("HMaterID")].Value); HAuxPropID = 0; HUnitID = 0; HQty2 = HMinQty; HQty2 = HZXQty; HBatchNo2 = ClsPub.isStrNull(grdMain.SelectedRows[j].Cells[Fun_GetCol("æ¹æ¬¡")].Value); HSourceInterID = 0; HSourceEntryID = 0; @@ -925,7 +987,7 @@ ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID " + ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " + ") values (" + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID1.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString() + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HWei + "'" + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'" @@ -943,10 +1005,9 @@ oCn.RollBack(); MessageBox.Show("æ¡ç çæå¤±è´¥ï¼" + e1.Message); } } } } private void DisplayTM() @@ -1197,9 +1258,9 @@ for (int i = 0; i < grdMain.SelectedRows.Count; i++) { txtHICMOQty.Text = DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("è®¢åæ°é")].Value); txtHZXQty.Text = DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("è®¢åæ°é")].Value); } HICMOQty = DBUtility.ClsPub.isDoule(txtHICMOQty.Text.Trim()); HICMOQty = DBUtility.ClsPub.isDoule(txtHZXQty.Text.Trim()); HMiniQty = DBUtility.ClsPub.isDoule(txtHMiniQty.Text.Trim()); if (HMiniQty == 0) { @@ -1293,7 +1354,7 @@ txtHEmpID.Text = ""; txtHICMOBillNo.Text = ""; txtHICMOBillNo1.Text = ""; txtHICMOQty.Text = ""; txtHZXQty.Text = ""; txtHMaterID.Text = ""; txtHMaterID1.Text = ""; txtHMiniQty.Text = ""; WarM/ÌõÂë´òÓ¡/Sc_ICMOToBarCode.designer.cs
@@ -81,12 +81,14 @@ this.cmdHMaterID1 = new System.Windows.Forms.Button(); this.grdSub = new System.Windows.Forms.DataGridView(); this.button1 = new System.Windows.Forms.Button(); this.è®¢åæ°é = new System.Windows.Forms.Label(); this.txtHICMOQty = new System.Windows.Forms.TextBox(); this.æ´ç®±æ°é = new System.Windows.Forms.Label(); this.txtHZXQty = new System.Windows.Forms.TextBox(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.grdList = new System.Windows.Forms.DataGridView(); this.txtHSeOrderBillNo = new System.Windows.Forms.TextBox(); this.label9 = new System.Windows.Forms.Label(); this.Tool.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.grdMain)).BeginInit(); this.gbUp.SuspendLayout(); @@ -342,6 +344,8 @@ // gbUp // this.gbUp.BackColor = System.Drawing.Color.Transparent; this.gbUp.Controls.Add(this.txtHSeOrderBillNo); this.gbUp.Controls.Add(this.label9); this.gbUp.Controls.Add(this.cmbHBarCodeType); this.gbUp.Controls.Add(this.label8); this.gbUp.Controls.Add(this.cmdHSaveBill); @@ -373,7 +377,7 @@ this.cmbHBarCodeType.Items.AddRange(new object[] { "å¯ä¸æ¡ç ", "æ¹æ¬¡æ¡ç "}); this.cmbHBarCodeType.Location = new System.Drawing.Point(826, 75); this.cmbHBarCodeType.Location = new System.Drawing.Point(871, 77); this.cmbHBarCodeType.Margin = new System.Windows.Forms.Padding(2); this.cmbHBarCodeType.Name = "cmbHBarCodeType"; this.cmbHBarCodeType.Size = new System.Drawing.Size(140, 28); @@ -384,7 +388,7 @@ this.label8.AutoSize = true; this.label8.Font = new System.Drawing.Font("å®ä½", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label8.ForeColor = System.Drawing.Color.Black; this.label8.Location = new System.Drawing.Point(748, 82); this.label8.Location = new System.Drawing.Point(793, 84); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(72, 16); this.label8.TabIndex = 138; @@ -394,7 +398,7 @@ // this.cmdHSaveBill.BackColor = System.Drawing.Color.White; this.cmdHSaveBill.Font = new System.Drawing.Font("å®ä½", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.cmdHSaveBill.Location = new System.Drawing.Point(1010, 66); this.cmdHSaveBill.Location = new System.Drawing.Point(1026, 66); this.cmdHSaveBill.Margin = new System.Windows.Forms.Padding(2); this.cmdHSaveBill.Name = "cmdHSaveBill"; this.cmdHSaveBill.Size = new System.Drawing.Size(112, 50); @@ -407,10 +411,10 @@ // this.dtpHEndDate.Font = new System.Drawing.Font("å®ä½", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.dtpHEndDate.Format = System.Windows.Forms.DateTimePickerFormat.Short; this.dtpHEndDate.Location = new System.Drawing.Point(478, 75); this.dtpHEndDate.Location = new System.Drawing.Point(602, 76); this.dtpHEndDate.Margin = new System.Windows.Forms.Padding(2); this.dtpHEndDate.Name = "dtpHEndDate"; this.dtpHEndDate.Size = new System.Drawing.Size(213, 30); this.dtpHEndDate.Size = new System.Drawing.Size(154, 30); this.dtpHEndDate.TabIndex = 102; // // label5 @@ -418,7 +422,7 @@ this.label5.AutoSize = true; this.label5.Font = new System.Drawing.Font("å®ä½", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label5.ForeColor = System.Drawing.Color.Black; this.label5.Location = new System.Drawing.Point(399, 83); this.label5.Location = new System.Drawing.Point(523, 84); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(72, 16); this.label5.TabIndex = 101; @@ -428,10 +432,10 @@ // this.dtpHBeginDate.Font = new System.Drawing.Font("å®ä½", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.dtpHBeginDate.Format = System.Windows.Forms.DateTimePickerFormat.Short; this.dtpHBeginDate.Location = new System.Drawing.Point(112, 77); this.dtpHBeginDate.Location = new System.Drawing.Point(336, 77); this.dtpHBeginDate.Margin = new System.Windows.Forms.Padding(2); this.dtpHBeginDate.Name = "dtpHBeginDate"; this.dtpHBeginDate.Size = new System.Drawing.Size(213, 30); this.dtpHBeginDate.Size = new System.Drawing.Size(154, 30); this.dtpHBeginDate.TabIndex = 100; // // label6 @@ -439,7 +443,7 @@ this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("å®ä½", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label6.ForeColor = System.Drawing.Color.Black; this.label6.Location = new System.Drawing.Point(33, 85); this.label6.Location = new System.Drawing.Point(257, 85); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(72, 16); this.label6.TabIndex = 99; @@ -674,23 +678,23 @@ this.button1.UseVisualStyleBackColor = false; this.button1.Click += new System.EventHandler(this.button1_Click); // // è®¢åæ°é // æ´ç®±æ°é // this.è®¢åæ°é.AutoSize = true; this.è®¢åæ°é.Font = new System.Drawing.Font("å®ä½", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.è®¢åæ°é.Location = new System.Drawing.Point(900, 190); this.è®¢åæ°é.Name = "è®¢åæ°é"; this.è®¢åæ°é.Size = new System.Drawing.Size(120, 27); this.è®¢åæ°é.TabIndex = 148; this.è®¢åæ°é.Text = "è®¢åæ°é"; this.æ´ç®±æ°é.AutoSize = true; this.æ´ç®±æ°é.Font = new System.Drawing.Font("å®ä½", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.æ´ç®±æ°é.Location = new System.Drawing.Point(900, 190); this.æ´ç®±æ°é.Name = "æ´ç®±æ°é"; this.æ´ç®±æ°é.Size = new System.Drawing.Size(120, 27); this.æ´ç®±æ°é.TabIndex = 148; this.æ´ç®±æ°é.Text = "æ´ç®±æ°é"; // // txtHICMOQty // txtHZXQty // this.txtHICMOQty.Location = new System.Drawing.Point(900, 221); this.txtHICMOQty.Multiline = true; this.txtHICMOQty.Name = "txtHICMOQty"; this.txtHICMOQty.Size = new System.Drawing.Size(112, 42); this.txtHICMOQty.TabIndex = 147; this.txtHZXQty.Location = new System.Drawing.Point(900, 221); this.txtHZXQty.Multiline = true; this.txtHZXQty.Name = "txtHZXQty"; this.txtHZXQty.Size = new System.Drawing.Size(112, 42); this.txtHZXQty.TabIndex = 147; // // tabControl1 // @@ -738,6 +742,27 @@ this.grdList.Size = new System.Drawing.Size(866, 269); this.grdList.TabIndex = 20; // // txtHSeOrderBillNo // this.txtHSeOrderBillNo.Font = new System.Drawing.Font("å®ä½", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtHSeOrderBillNo.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.txtHSeOrderBillNo.Location = new System.Drawing.Point(112, 79); this.txtHSeOrderBillNo.Name = "txtHSeOrderBillNo"; this.txtHSeOrderBillNo.ReadOnly = true; this.txtHSeOrderBillNo.Size = new System.Drawing.Size(123, 30); this.txtHSeOrderBillNo.TabIndex = 141; // // label9 // this.label9.AutoSize = true; this.label9.Font = new System.Drawing.Font("å®ä½", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label9.ForeColor = System.Drawing.Color.Black; this.label9.Location = new System.Drawing.Point(19, 85); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(88, 16); this.label9.TabIndex = 140; this.label9.Text = "éå®è®¢åå·"; // // Sc_ICMOToBarCode // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -745,8 +770,8 @@ this.BackColor = System.Drawing.SystemColors.ActiveCaption; this.ClientSize = new System.Drawing.Size(1172, 869); this.Controls.Add(this.tabControl1); this.Controls.Add(this.è®¢åæ°é); this.Controls.Add(this.txtHICMOQty); this.Controls.Add(this.æ´ç®±æ°é); this.Controls.Add(this.txtHZXQty); this.Controls.Add(this.button1); this.Controls.Add(this.grdSub); this.Controls.Add(this.groupBox1); @@ -831,12 +856,14 @@ private System.Windows.Forms.Button cmdHMaterID1; private System.Windows.Forms.DataGridView grdSub; private System.Windows.Forms.Button button1; private System.Windows.Forms.Label è®¢åæ°é; private System.Windows.Forms.TextBox txtHICMOQty; private System.Windows.Forms.Label æ´ç®±æ°é; private System.Windows.Forms.TextBox txtHZXQty; private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.DataGridView grdList; private System.Windows.Forms.ToolStripButton cz; private System.Windows.Forms.TextBox txtHSeOrderBillNo; private System.Windows.Forms.Label label9; } } WebAPI/Controllers/MoveStockBillController.cs
@@ -605,7 +605,14 @@ // DataSet ds = new DataSet(); // WebServer webserver = new WebServer(); string sWhere = " Where åæ®å· like '%" + HSourceBillNo.Trim() + "%'"; ds = webserver.GetSc_PPBomBillList(sWhere); if (HSourceBillType == "3720") { ds = webserver.GetSc_PPBomBillList(sWhere); } else if (HSourceBillType == "1243") { ds = webserver.GetKf_MoveStockRequestBillList(sWhere); } if (ds == null || ds.Tables[0].Rows.Count <= 0) { WebAPI/WebServer.cs
@@ -1994,6 +1994,11 @@ DAL.Cls_S_IF_ProductInBill_Lite dal = new DAL.Cls_S_IF_ProductInBill_Lite(); return dal.DisSourceBillList(sWhere); } public DataSet GetKf_MoveStockRequestBillList(string sWhere) { DAL.Cls_S_IF_MoveStockRequestBill_Lite dal = new DAL.Cls_S_IF_MoveStockRequestBill_Lite(); return dal.DisSourceBillList(sWhere); } #endregion #region å ¶ä»å ¥åºï¼çº¢åï¼ *