From 8ce597d937ebd43bd121f316d10581ff585571b0 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期六, 14 九月 2024 16:49:25 +0800
Subject: [PATCH] 凯贝浪潮客户条码生成批次获取修改,工资结算单(集体)网页模块调用方法新增、修改

---
 WarM/条码打印/Gy_PackBarCodeBill_automaticallyByPLC.cs |   27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 deletions(-)

diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_PackBarCodeBill_automaticallyByPLC.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_PackBarCodeBill_automaticallyByPLC.cs"
index 6628701..b7698c4 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_PackBarCodeBill_automaticallyByPLC.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_PackBarCodeBill_automaticallyByPLC.cs"
@@ -10,6 +10,7 @@
 using System.Linq;
 using System.Text;
 using System.Windows.Forms;
+using Microsoft.VisualBasic;
 
 namespace WarM.鏉$爜鎵撳嵃
 {
@@ -480,6 +481,8 @@
                 return true;
             }catch(Exception ex)
             {
+                string sql = "exec h_p_WMS_PackBarCodeBill_dealDataWhenError '" + textBox_HPackBarCode + "'";
+                oCn.RunProc(sql);
                 throw new Exception(ex.Message);
             }
             
@@ -765,6 +768,7 @@
                     //闃查敊鍒ゆ柇
                     if(!judgeIsSameSourceBill(textBox_HBarCode.Text.Trim()))
                     {
+                        textBox_HBarCode.Text = "";
                         return;
                     }
 
@@ -1177,14 +1181,29 @@
         {
             if (grdMain.SelectedRows != null && grdMain.SelectedRows.Count==1)
             {
-                if (MessageBox.Show("纭畾瑕佸垹闄わ紵", "鎻愮ず", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
+                //if (MessageBox.Show("纭畾瑕佸垹闄わ紵", "鎻愮ず", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
+                //{
+                //    return;
+                //}
+                //if (MessageBox.Show("鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛岀‘瀹氳缁х画鎿嶄綔锛�", "鎻愮ず", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
+                //{
+                //    return;
+                //}
+
+                string pwd = Interaction.InputBox("璇疯緭鍏ュ瘑鐮�", "鍒犻櫎纭锛�", "", 100, 100);
+
+                //鐐瑰嚮鍙栨秷
+                if(pwd == "")
                 {
                     return;
                 }
-                if (MessageBox.Show("鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛岀‘瀹氳缁х画鎿嶄綔锛�", "鎻愮ず", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
+
+                if(pwd != "123456")
                 {
+                    MessageBox.Show("瀵嗙爜閿欒锛�");
                     return;
                 }
+
                 Delete();
             }
             else
@@ -1402,6 +1421,7 @@
 
                 //鑾峰彇缂撳瓨鍒楄〃涓� 鎵樻潯鐮� 瀵瑰簲鐨� 缁勬墭璁板綍
                 sql = "select top(1) a.* from Sc_PackUnionBill_Temp as a inner join Gy_BarCodeBill as b on a.HBarCode = b.HBarCode where a.HBarCode_Pack = '" + HPackBarCode + "' and b.HSourceID = " + HSourceID + " and a.HStockorgID = " + HOrgID;
+                //sql = "select top(1) a.* from Sc_PackUnionBill_Temp as a where a.HBarCode_Pack = '" + HPackBarCode + "' and a.HStockorgID = " + HOrgID;
                 ds = oCn.RunProcReturn(sql, "Sc_PackUnionBill_Temp");
                 if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
@@ -1444,11 +1464,12 @@
                 HSourceEntryID_ICMO = 0;
 
                 textBox_PackQty.Text = "";
+                return;
             }
 
             HSourceInterID_ICMO = int.Parse(ds_getPackQty.Tables[0].Rows[0]["HSourceInterID"].ToString());
             HSourceEntryID_ICMO = int.Parse(ds_getPackQty.Tables[0].Rows[0]["HSourceEntryID"].ToString());
-            textBox_PackQty.Text = ds_getPackQty.Tables[0].Rows[0]["缁勬墭鏁伴噺"].ToString();
+            textBox_PackQty.Text = Double.Parse(ds_getPackQty.Tables[0].Rows[0]["缁勬墭鏁伴噺"].ToString()).ToString();
         }
         #endregion
 

--
Gitblit v1.9.1