From 17378c3946c1aac0dbe3b6cd05911421a17d3b34 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期五, 08 七月 2022 19:47:26 +0800
Subject: [PATCH] 扫码记录缓存报表
---
WarM/条码打印/Sc_ICMOToBarCode.cs | 75 +++++++++++++++++++++++++++++++------
1 files changed, 63 insertions(+), 12 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 ab43982..710979b 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"
@@ -228,7 +228,7 @@
DataSet DSet;
- DSet = oCn.RunProcReturn("Select * from gy_czygl Where czymc='" + HUserName + "'", "gy_czygl", ref DBUtility.ClsPub.sExeReturnInfo);
+ DSet = oCn.RunProcReturn("Select HEmpID from gy_czygl Where czymc='" + HUserName + "'", "gy_czygl", ref DBUtility.ClsPub.sExeReturnInfo);
if (DSet == null)
//if (DSet == null|| DSet.Tables[0].Rows.Count == 0)
@@ -244,7 +244,7 @@
{
- txtHEmpID.Tag = DBUtility.ClsPub.isInt(DSet.Tables[0].Rows[0]["HEmpID"]);
+ txtHEmpID.Tag = DBUtility.ClsPub.isStrNull(DSet.Tables[0].Rows[0]["HEmpID"]);
}
else
{
@@ -807,7 +807,9 @@
//00 鍏堢敓鎴� 鍞竴鐨� 鎵樻潯鐮�
//鐢熸垚涓�涓绠辩爜
- string sPackStr = "ZXM" + HYear + HPeriod + HDay; //澶栫鐮� 鍓嶇紑
+ long HTMaterID = 0;
+ HTMaterID = ClsPub.isLong(grdMain.Rows[0].Cells[Fun_GetCol("HMaterID")].Value);
+ string sPackStr = "ZXM" + HYear + HPeriod + HDay + HTMaterID; //澶栫鐮� 鍓嶇紑
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;
string sPackBarCode = sPackStr + TTM_LSH.ToString();
@@ -1022,18 +1024,19 @@
{
if (HZXQty > DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value))
{
- //HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
- //grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
- MessageBox.Show("璇风偣鍑昏秴棰濈敓浜ф寜閽敓鎴愭潯鐮侊紒");
- return;
+ HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+ grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+
+ //MessageBox.Show("璇风偣鍑昏秴棰濈敓浜ф寜閽敓鎴愭潯鐮侊紒");
+ //return;
}
else
{
- //grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = HZXQty;
+ grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = HZXQty;
//
- HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
- grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+ //HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+ //grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
}
}
else
@@ -1700,14 +1703,17 @@
private void cmdHSourceID_Click(object sender, EventArgs e)
{
Int64 HEmpID = 0;
- HEmpID = ClsPub.isLong(txtHEmpID.Tag);
+ HEmpID = Convert.ToInt64(txtHEmpID.Tag);
+
+
+ //MessageBox.Show(ClsPub.isStrNull(HEmpID));
//string HEmpName = "";
//HEmpName = ClsPub.isStrNull(txtHEmpID.Text);
DAL.ClsGy_Source_View oSource = new DAL.ClsGy_Source_View();
if (HEmpID != 0)
{
- if (oSource.GetInfoByID(HEmpID))
+ if (oSource.GetInfoByID_AoBang(HEmpID))
{
this.txtHSourceID.Text = oSource.oModel.HName;
this.txtHSourceID.Tag = oSource.oModel.HItemID.ToString();
@@ -1925,6 +1931,7 @@
grdList.DataSource = null;
grdSub.DataSource = null;
grdMain.DataSource = null;
+ txtHEmpID.Tag = 0;
}
private void button2_Click(object sender, EventArgs e)
@@ -2038,5 +2045,49 @@
Sub_SaveBarCode();
//
}
+
+ private void cmdESOP_Click(object sender, EventArgs e)
+ {
+ Sc_MESNowWorkBill_Fast oSc_MESNowWorkBill_Fast = new Sc_MESNowWorkBill_Fast();
+ oSc_MESNowWorkBill_Fast.txtHICMOBillNo.Text = "";
+ oSc_MESNowWorkBill_Fast.txtHMaterID.Text =txtHMaterID.Text;
+ oSc_MESNowWorkBill_Fast.txtHName.Text = ClsPub.isStrNull(grdMain.Rows[0].Cells[Fun_GetCol("鐗╂枡鍚嶇О")].Value);
+ oSc_MESNowWorkBill_Fast.txtHModel.Text = ClsPub.isStrNull(grdMain.Rows[0].Cells[Fun_GetCol("瑙勬牸鍨嬪彿")].Value);
+ oSc_MESNowWorkBill_Fast.Show();
+
+ }
+
+ private void txtHBarCode_KeyDown(object sender, KeyEventArgs e)
+ {
+ if(e.KeyCode==Keys.Enter)
+ {
+ //
+ //鑾峰彇绗竴琛屾潯褰㈢爜杩涜鎵撳嵃
+ DataSet DSet = oCn.RunProcReturn("select * from h_v_IF_BarCodeBillList_CS Where 鏉$爜缂栧彿='"+ txtHBarCode.Text +"' and 鏉$爜绫诲瀷 = '鎵樼洏鏉$爜'", "h_v_IF_BarCodeBillList_CS", ref DBUtility.ClsPub.sExeReturnInfo);
+ //鐢熸垚棣栬鏍囬
+ if (DSet == null)
+ {
+ MessageBox.Show("娌℃湁杩斿洖浠讳綍缁撴灉,鏉$爜涓嶅瓨鍦紒" + DBUtility.ClsPub.sExeReturnInfo);
+ return;
+ }
+ //
+ grdList.DataSource = DSet.Tables[0].DefaultView;
+ //鍐荤粨
+ int FrCol = 0;
+ string s = "鏄�";
+ DBUtility.Xt_BaseBillFun.DisplayGrid(grdList, this.Name + "grdList", s, FrCol);
+ //
+ //鍒ゆ柇鏄惁宸茬粡鐢熸垚鏉$爜
+ if (DBUtility.ClsPub.isStrNull(grdList.Rows[0].Cells[Fun_GetColList("鏉$爜缂栧彿")].Value) == "")
+ {
+ MessageBox.Show("鏉$爜鏈敓鎴愶紝璇峰厛鐢熸垚鏉$爜鍚庡啀棰勮锛�");
+ return;
+ }
+ //閫夋嫨鎵撳嵃妯℃澘
+ Sub_SetReport("娉ㄥ鐗╂枡鏍囩");
+ Report.Print(false);
+ Thread.Sleep(1000);
+ }
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.1