From c6cef8f7a94d1c2051e7d594167e6177a8c18fc2 Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期三, 29 十二月 2021 23:55:43 +0800
Subject: [PATCH] 博日扫码线
---
WarM/条码打印/Gy_BarCodeBill.cs | 150 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 148 insertions(+), 2 deletions(-)
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
index 580f92b..7987c2b 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
@@ -1832,7 +1832,14 @@
//grdMain.Rows[i].Cells[HSourceNumberCol].Value = oTable.Rows[0]["鐢熶骇绾夸唬鐮�"].ToString();
grdMain.Rows[i].Cells[HSourceNameCol].Value = oTable.Rows[0]["鐢熶骇绾�"].ToString();
grdMain.Rows[i].Cells[HEndDateCol].Value = oTable.Rows[0]["璁″垝瀹屽伐鏃ユ湡"].ToString();
- grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["鏈�灏忓寘瑁呮暟"].ToString();
+ if (cmbHBarCodeType.Text == "鎵规鏉$爜" && CampanyName == "鍗氭棩绉戞妧")
+ {
+ grdMain.Rows[i].Cells[HMinQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["鏈敓鎴愭潯鐮佹暟閲�"]);
+ }
+ else
+ {
+ grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["鏈�灏忓寘瑁呮暟"].ToString();
+ }
//--
//璁剧疆鍙紪杈戝垪
string sAllowCol = HQtyCol.ToString() +
@@ -1882,7 +1889,14 @@
grdMain.Rows[i].Cells[HUnitNameCol].Value = oTable.Rows[0]["璁¢噺鍗曚綅"].ToString();
grdMain.Rows[i].Cells[HRemarkCol].Value = oTable.Rows[0]["澶囨敞"].ToString();
grdMain.Rows[i].Cells[HMTONoCol].Value = oTable.Rows[0]["璁″垝璺熻釜鍙�"].ToString();
- grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["鏈�灏忓寘瑁呮暟"].ToString();
+ if (cmbHBarCodeType.Text == "鎵规鏉$爜" && CampanyName == "鍗氭棩绉戞妧")
+ {
+ grdMain.Rows[i].Cells[HMinQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["鏈敓鎴愭潯鐮佹暟閲�"]);
+ }
+ else
+ {
+ grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["鏈�灏忓寘瑁呮暟"].ToString();
+ }
grdMain.Rows[i].Cells[HMakerCol].Value = ClsPub.CurUserName;
if (cmbSourceBillType.Text.Trim() == "鏀舵枡閫氱煡鍗�"|| cmbSourceBillType.Text.Trim() == "閲囪喘璁㈠崟"
|| cmbSourceBillType.Text.Trim() == "濮斿璁㈠崟" || cmbSourceBillType.Text.Trim() == "閲囪喘鍏ュ簱鍗�")
@@ -2471,6 +2485,138 @@
}
}
+ //鎵规鎸夐挳
+ private void BatchNo_Click(object sender, EventArgs e)
+ {
+ lblCaption.Focus();
+ bool b = false;
+ for (int i = 0; i < grdMain.RowCount; i++)
+ {
+ long HMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HMaterIDCol].Value); // 鐗╂枡鍐呯爜
+ string HBatchNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HBatchNoCol].Value); // 鎵瑰彿
+
+ if (HMaterID != 0)
+ {
+ DataSet oDs = oCn.RunProcReturn("exec h_p_Gy_BarCodeBill_GetBatchNo " + HMaterID.ToString() + ",'" + HBatchNo + "','" + dtpHDate.Value.ToShortDateString() + "','" + CampanyName + "'", "h_p_Gy_BarCodeBill_GetBatchNo");
+ //
+ if (oDs == null && oDs.Tables[0].Rows.Count == 0)
+ {
+ MessageBox.Show("鐢熸垚鎵规澶辫触锛�");
+ return;
+ }
+ else if (DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0][0]) == "1")
+ {
+ grdMain.Rows[i].Cells[HBatchNoCol].Value = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["HBatchNo"]);
+ b = true;
+ }
+ }
+ }
+ //鏄庣粏琛ㄦ槸鍚︿负闆惰
+ if (b == false)
+ {
+ MessageBox.Show("娌℃湁闇�瑕佺敓鎴愭壒娆$殑鏄庣粏琛岋紒", "鎻愮ず");
+ return;
+ }
+ }
+
+ private void txtHSourceBillNo_KeyPress(object sender, KeyPressEventArgs e)
+ {
+ if (e.KeyChar == (char)Keys.Return)//鍥炶溅甯﹀嚭婧愬崟淇℃伅
+ {
+ long sHOrgID = -1;
+ DAL.ClsGy_ORGANIZATIONS_View oClsGy_ORGANIZATIONS_View = new DAL.ClsGy_ORGANIZATIONS_View();
+ if (oClsGy_ORGANIZATIONS_View.GetInfoByName(cmbHOrgID.Text))
+ {
+ sHOrgID = oClsGy_ORGANIZATIONS_View.omodel.HItemID;
+ }
+
+ if (txtHSourceBillNo.Text.Length < 4)
+ {
+ MessageBox.Show("璇疯緭鍏�4浣嶄互涓婃暟鎹紒");
+ return;
+ }
+ //鏍规嵁婧愬崟绫诲瀷 鍜屾簮鍗曞彿 鑾峰彇淇℃伅
+ if (cmbSourceBillType.Text.Trim() == "鐢熶骇璁㈠崟")
+ {
+ DAL.Cls_S_IFCLD_ICMOList oIFCLD_ICMOList = new DAL.Cls_S_IFCLD_ICMOList();
+ if (oIFCLD_ICMOList.RefreshBySourceBillNo(" Where 鍗曟嵁鍙� like '%" + txtHSourceBillNo.Text + "' and HOrgID =" + sHOrgID.ToString())) //閫夋嫨鍘熷崟
+ {
+ FillSelectData(oIFCLD_ICMOList.oBillSelectColl);
+ txtHSourceBillNo.Text = "";
+ }
+ else
+ {
+ MessageBox.Show("鏈煡璇㈠埌浠诲姟鏁版嵁锛岃纭鎵�閫夌粍缁囥�佹簮鍗曠被鍨嬩笌婧愬崟鍗曞彿鏄惁姝g‘锛�");
+ return;
+ }
+ }
+ else if (cmbSourceBillType.Text.Trim() == "鐢熶骇姹囨姤鍗�")
+ {
+ DAL.Cls_S_IF_ICMOReportBillList oIF_ICMOReportBillList = new DAL.Cls_S_IF_ICMOReportBillList();
+ if (oIF_ICMOReportBillList.RefreshBySourceBillNo(" Where 鍗曟嵁鍙� like '%" + txtHSourceBillNo.Text + "' ")) //閫夋嫨鍘熷崟
+ {
+ FillSelectData(oIF_ICMOReportBillList.oBillSelectColl);
+ txtHSourceBillNo.Text = "";
+ }
+ else
+ {
+ MessageBox.Show("鏈煡璇㈠埌浠诲姟鏁版嵁锛岃纭鎵�閫夌粍缁囥�佹簮鍗曠被鍨嬩笌婧愬崟鍗曞彿鏄惁姝g‘锛�");
+ return;
+ }
+ }
+ else if (cmbSourceBillType.Text.Trim() == "鏀舵枡閫氱煡鍗�")
+ {
+ DAL.Cls_S_IF_POInStockBillList oIF_POInStockBillList = new DAL.Cls_S_IF_POInStockBillList();
+ if (oIF_POInStockBillList.RefreshBySourceBillNo(" Where 鍗曟嵁鍙� like '%" + txtHSourceBillNo.Text + "' ")) //閫夋嫨鍘熷崟
+ {
+ FillSelectData(oIF_POInStockBillList.oBillSelectColl);
+ txtHSourceBillNo.Text = "";
+ }
+ else
+ {
+ MessageBox.Show("鏈煡璇㈠埌浠诲姟鏁版嵁锛岃纭鎵�閫夌粍缁囥�佹簮鍗曠被鍨嬩笌婧愬崟鍗曞彿鏄惁姝g‘锛�");
+ return;
+ }
+ }
+ else if (cmbSourceBillType.Text.Trim() == "閲囪喘璁㈠崟")
+ {
+ DAL.Cls_S_IF_POOrderBillList oIF_POOrderBillList = new DAL.Cls_S_IF_POOrderBillList();
+ if (oIF_POOrderBillList.RefreshBySourceBillNo(" Where 鍗曟嵁鍙� like '%" + txtHSourceBillNo.Text + "' ")) //閫夋嫨鍘熷崟
+ {
+ FillSelectData(oIF_POOrderBillList.oBillSelectColl);
+ txtHSourceBillNo.Text = "";
+ }
+ else
+ {
+ MessageBox.Show("鏈煡璇㈠埌浠诲姟鏁版嵁锛岃纭鎵�閫夌粍缁囥�佹簮鍗曠被鍨嬩笌婧愬崟鍗曞彿鏄惁姝g‘锛�");
+ return;
+ }
+ }
+ else if (cmbSourceBillType.Text.Trim() == "濮斿璁㈠崟")
+ {
+ DAL.Cls_S_IF_EntrustOrderBillList oIF_EntrustOrderBillList = new DAL.Cls_S_IF_EntrustOrderBillList();
+ if (oIF_EntrustOrderBillList.RefreshBySourceBillNo(" Where 鍗曟嵁鍙� like '%" + txtHSourceBillNo.Text + "' ")) //閫夋嫨鍘熷崟
+ {
+ FillSelectData(oIF_EntrustOrderBillList.oBillSelectColl);
+ txtHSourceBillNo.Text = "";
+ }
+ else
+ {
+ MessageBox.Show("鏈煡璇㈠埌浠诲姟鏁版嵁锛岃纭鎵�閫夌粍缁囥�佹簮鍗曠被鍨嬩笌婧愬崟鍗曞彿鏄惁姝g‘锛�");
+ return;
+ }
+ }
+ else
+ {
+ MessageBox.Show("鎵�閫夋簮鍗曠被鍨嬶紝涓嶆敮鎸佹鍔熻兘锛�");
+ return;
+ }
+
+ }
+ }
+
+
+
--
Gitblit v1.9.1