From 7f3034113076f4a599ac2c6e1d14b7ddd0f57788 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期四, 22 十二月 2022 16:38:27 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WarM/条码打印/Sc_ICMOToBarCode.cs | 130 ++++++++++++++++++++++++++++++++++--------
1 files changed, 104 insertions(+), 26 deletions(-)
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs"
index 2e60eae..587564b 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs"
@@ -121,6 +121,9 @@
{
txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value);
txtHMiniQty.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["鏍囧噯瑁呯"].Value);
+ //txtHMaterID.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["鐗╂枡缂栫爜"].Value);
+ txtHMaterModel.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["瑙勬牸鍨嬪彿"].Value);
+ txtHMaterName.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["鐗╂枡鍚嶇О"].Value);
}
else
{
@@ -752,7 +755,6 @@
private void cmdHSaveBill_Click(object sender, EventArgs e)
{
-
Display();
}
@@ -875,17 +877,32 @@
long HTMaterID = 0;
HTMaterID = ClsPub.isLong(grdMain.Rows[0].Cells[Fun_GetCol("HMaterID")].Value);
string sPackStr = "ZXM" + HYear + HPeriod + HDay + HTMaterID; //澶栫鐮� 鍓嶇紑
+
+
+ //鑾峰彇澶勭悊杩囩殑鏃ユ湡璺熶粖澶╁樊鍑犲ぉ 鐒跺悗鍔犲嚑涓�+鍙�
+ TimeSpan HCY = Convert.ToDateTime(HPrdDate) - Convert.ToDateTime(DateTime.Now.ToString());
+ int a = 1;
+ while (a <= HCY.Days) //褰揳 灏忎簬 宸紓澶╂暟 寰幆鍔犱笂 + 鍙�
+ {
+ HPrdDate = HPrdDate + "+";
+ a = a + 1;
+ }
DataSet DsTM = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sPackStr + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿 //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
Int64 TTM_LSH = ClsPub.isInt(DsTM.Tables[0].Rows[0][0]) + 1;
- DataSet DSet3 = oCn.RunProcReturn("select * from Gy_FactoryDayOff Where HFactoryDayOffDate='" + HDate1.ToString() + "'", "Gy_FactoryDayOff", ref DBUtility.ClsPub.sExeReturnInfo);
- if (DSet3 == null || DSet3.Tables[0].Rows.Count == 0)
- {
- sPackBarCode = sPackStr + TTM_LSH.ToString() ;
- }
- else
- {
- sPackBarCode = sPackStr + TTM_LSH.ToString() + "+";
- }
+
+
+ sPackBarCode = sPackStr + TTM_LSH.ToString();
+ //DataSet DSet3 = oCn.RunProcReturn("select * from Gy_FactoryDayOff Where HFactoryDayOffDate='" + HDate1.ToString() + "'", "Gy_FactoryDayOff", ref DBUtility.ClsPub.sExeReturnInfo);
+ //if (DSet3 == null || DSet3.Tables[0].Rows.Count == 0)
+ //{
+ // sPackBarCode = sPackStr + TTM_LSH.ToString() ;
+ //}
+ //else
+ //{
+ // sPackBarCode = sPackStr + TTM_LSH.ToString() + "+";
+ //}
+
+
oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sPackStr + "'");
@@ -978,7 +995,7 @@
HJT = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[Fun_GetCol("璁惧")].Value);
HXH = HYear + HPeriod + HDay + HBC + HJT + HMaterNumber;
Ds99 = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HXH + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
- LSH3 = ClsPub.isInt(Ds99.Tables[0].Rows[0][0]);
+ LSH3 = ClsPub.isInt(Ds99.Tables[0].Rows[0][0]) + 1;
LSH4 = LSH3.ToString();
@@ -1197,19 +1214,70 @@
//Sub_SaveBarCode();
////
+
+
+ //bool flag = this.txtHZXQty.Text.Trim() != "";
+ //double num;
+ //double HICMOQty = 0;
+ //if (flag)
+ //{
+ // num = Pub_Class.ClsPub.isDoule(this.txtHZXQty.Text);
+ //}
+ //else
+ //{
+ // num = Pub_Class.ClsPub.isDoule(this.txtHMiniQty.Text);
+ //}
+ //bool flag2 = num <= 0.0;
+ //if (flag2)
+ //{
+ // MessageBox.Show("璇疯緭鍏ユ暣绠辨暟閲忥紒");
+ //}
+ //else
+ //{
+ // for (int i = 0; i < this.grdMain.Rows.Count; i++)
+ // {
+ // for (int i1 = 0; i1 < this.grdMain.Rows.Count; i1++)
+ // {
+
+ // HICMOQty += Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i1].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+ // }
+ // if (HICMOQty < num)
+ // {
+ // MessageBox.Show("璇风偣鍑昏秴棰濈敓浜ф寜閽敓鎴愭潯鐮侊紒");
+ // break;
+ // }
+
+ // bool flag3 = num > 0.0;
+ // if (!flag3)
+ // {
+ // break;
+ // }
+ // bool flag4 = num > Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+ // if (!flag4)
+ // {
+ // this.grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = num;
+ // break;
+ // }
+ // num -= Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+ // this.grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+ // }
+ // this.Sub_SaveBarCode();
+
bool flag = this.txtHZXQty.Text.Trim() != "";
+ double HICMOQty = 0.0;
+ bool flag5 = flag;
double num;
- double HICMOQty = 0;
- if (flag)
+ if (flag5)
{
- num = Pub_Class.ClsPub.isDoule(this.txtHZXQty.Text);
+ num = ClsPub.isDoule(this.txtHZXQty.Text);
}
else
{
- num = Pub_Class.ClsPub.isDoule(this.txtHMiniQty.Text);
+ num = ClsPub.isDoule(this.txtHMiniQty.Text);
}
bool flag2 = num <= 0.0;
- if (flag2)
+ bool flag6 = flag2;
+ if (flag6)
{
MessageBox.Show("璇疯緭鍏ユ暣绠辨暟閲忥紒");
}
@@ -1217,30 +1285,31 @@
{
for (int i = 0; i < this.grdMain.Rows.Count; i++)
{
- for (int i1 = 0; i1 < this.grdMain.Rows.Count; i1++)
+ for (int i2 = 0; i2 < this.grdMain.Rows.Count; i2++)
{
-
- HICMOQty += Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i1].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+ HICMOQty += ClsPub.isDoule(this.grdMain.Rows[i2].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
}
- if (HICMOQty < num)
+ bool flag7 = HICMOQty < num;
+ if (flag7)
{
MessageBox.Show("璇风偣鍑昏秴棰濈敓浜ф寜閽敓鎴愭潯鐮侊紒");
break;
}
-
bool flag3 = num > 0.0;
- if (!flag3)
+ bool flag8 = !flag3;
+ if (flag8)
{
break;
}
- bool flag4 = num > Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
- if (!flag4)
+ bool flag4 = num > ClsPub.isDoule(this.grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+ bool flag9 = !flag4;
+ if (flag9)
{
this.grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = num;
break;
}
- num -= Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
- this.grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = Pub_Class.ClsPub.isDoule(this.grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+ num -= ClsPub.isDoule(this.grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+ this.grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = ClsPub.isDoule(this.grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
}
this.Sub_SaveBarCode();
}
@@ -2063,6 +2132,8 @@
grdMain.DataSource = DSBefore.Tables[0].DefaultView;
txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value);
txtHMiniQty.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["鏍囧噯瑁呯"].Value);
+ txtHMaterModel.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["瑙勬牸鍨嬪彿"].Value);
+ txtHMaterName.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["鐗╂枡鍚嶇О"].Value);
}
@@ -2088,6 +2159,8 @@
grdMain.DataSource = DSBefore.Tables[0].DefaultView;
txtHMaterID.Tag = DBUtility.ClsPub.isInt(grdMain.Rows[0].Cells["HInterID"].Value);
txtHMiniQty.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["鏍囧噯瑁呯"].Value);
+ txtHMaterModel.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["瑙勬牸鍨嬪彿"].Value);
+ txtHMaterName.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["鐗╂枡鍚嶇О"].Value);
}
//txtHMaterID.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[0].Cells["HInterID"].Value);
}
@@ -2191,5 +2264,10 @@
Thread.Sleep(1000);
}
}
+
+ private void label14_Click(object sender, EventArgs e)
+ {
+
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.1