From f2ed8e6672a5883861e89de4b1ab92483cef519c Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期四, 23 十二月 2021 14:45:36 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WarM/条码打印/Gy_BarCodeBill.cs |  118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 116 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 bf863fe..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() == "閲囪喘鍏ュ簱鍗�")
@@ -2505,6 +2519,106 @@
             }
         }
 
+        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;
+                }
+
+            }
+        }
+
+
+
+
+
 
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1