From a905b3df0d0c9ae045b51d1299fbb2f2dcbc2e2d Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期一, 21 二月 2022 10:14:00 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 /dev/null                                                        |    0 
 WarM/仓库管理/Gy_BarCodeBill_ChaiMa.Designer.cs                      |    2 
 WarM/仓库管理/Gy_BarCodeBill_ChaiMa.cs                               |  136 ++++++++++++++++++++++++++
 WebAPI/Controllers/仓存管理/条码出入库记录/Kf_ICStockInOutBillController.cs |  109 +++++++++++++++++++++
 DAL/仓库管理/条码管理/ClsGy_BarCodeBill_ChaiMa.cs                        |    5 
 5 files changed, 247 insertions(+), 5 deletions(-)

diff --git "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/\346\235\241\347\240\201\347\256\241\347\220\206/ClsGy_BarCodeBill_ChaiMa.cs" "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/\346\235\241\347\240\201\347\256\241\347\220\206/ClsGy_BarCodeBill_ChaiMa.cs"
index 8e8333f..d49354e 100644
--- "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/\346\235\241\347\240\201\347\256\241\347\220\206/ClsGy_BarCodeBill_ChaiMa.cs"
+++ "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/\346\235\241\347\240\201\347\256\241\347\220\206/ClsGy_BarCodeBill_ChaiMa.cs"
@@ -1,4 +1,5 @@
-锘縰sing System;
+锘縰sing DBUtility;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -18,7 +19,7 @@
             {
                 //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
                 oCn.BeginTran();
-                string sql = "delete Gy_BarCodeBill where HBarCode='" + HBillNo + "'";
+                string sql = "update Gy_BarCodeBill set HStopflag=1,HStopMan='"+ ClsPub.CurUserName + "',HStopManDate=getdate() where HBarCode='" + HBillNo + "'";
                 oCn.RunProc(sql);
                 ////鎻掑叆瀛愯〃
                 foreach (Model.ClsGy_BarCodeEdit_Model oSub in DetailColl_Mater)
diff --git a/LMES/bin/x86/Debug.zip b/LMES/bin/x86/Debug.zip
deleted file mode 100644
index 7ee6064..0000000
--- a/LMES/bin/x86/Debug.zip
+++ /dev/null
Binary files differ
diff --git "a/WarM/\344\273\223\345\272\223\347\256\241\347\220\206/Gy_BarCodeBill_ChaiMa.Designer.cs" "b/WarM/\344\273\223\345\272\223\347\256\241\347\220\206/Gy_BarCodeBill_ChaiMa.Designer.cs"
index 9600db4..7553f77 100644
--- "a/WarM/\344\273\223\345\272\223\347\256\241\347\220\206/Gy_BarCodeBill_ChaiMa.Designer.cs"
+++ "b/WarM/\344\273\223\345\272\223\347\256\241\347\220\206/Gy_BarCodeBill_ChaiMa.Designer.cs"
@@ -300,6 +300,7 @@
             this.dy.Text = "鎵撳嵃";
             this.dy.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
             this.dy.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+            this.dy.Click += new System.EventHandler(this.dy_Click);
             // 
             // tc
             // 
@@ -327,6 +328,7 @@
             this.yl.Text = "棰勮";
             this.yl.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
             this.yl.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+            this.yl.Click += new System.EventHandler(this.yl_Click);
             // 
             // timer1
             // 
diff --git "a/WarM/\344\273\223\345\272\223\347\256\241\347\220\206/Gy_BarCodeBill_ChaiMa.cs" "b/WarM/\344\273\223\345\272\223\347\256\241\347\220\206/Gy_BarCodeBill_ChaiMa.cs"
index dae9858..171d557 100644
--- "a/WarM/\344\273\223\345\272\223\347\256\241\347\220\206/Gy_BarCodeBill_ChaiMa.cs"
+++ "b/WarM/\344\273\223\345\272\223\347\256\241\347\220\206/Gy_BarCodeBill_ChaiMa.cs"
@@ -1,4 +1,5 @@
-锘縰sing Pub_Class;
+锘縰sing gregn6Lib;
+using Pub_Class;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -6,6 +7,7 @@
 using System.Drawing;
 using System.Linq;
 using System.Text;
+using System.Threading;
 using System.Windows.Forms;
 
 namespace WarM
@@ -40,7 +42,7 @@
         public const Int16 HMaterMould2 = 8;
         public const Int16 HBatchNo2 = 9;
 
-        public const string ModName = "";                   //鍗曟嵁绫诲瀷
+        public const string ModName = "3302";                   //鍗曟嵁绫诲瀷
         public const string ModCaption = "鏉$爜鎷嗙爜";          //鍗曟嵁鍚嶇О
         public const string ModRightName = "Gy_BarCodeBill_ChaiMa";
         public DBUtility.ClsPub.Enum_BillStatus BillStatus;     //鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛�
@@ -99,7 +101,14 @@
             ////闅愯棌鍒�
             grdMain.Columns[HTagCol].Visible = false;
             grdMain.Columns[HInterID].Visible = false;
-            
+            //缃伆
+            grdMain.Columns[HSnoCol].ReadOnly = true;
+            grdMain.Columns[HBarCode].ReadOnly = true;
+            grdMain.Columns[HQty].ReadOnly = true;
+            grdMain.Columns[HMaterCol].ReadOnly = true;
+            grdMain.Columns[HMaterName].ReadOnly = true;
+            grdMain.Columns[HMaterMould].ReadOnly = true;
+            grdMain.Columns[HBatchNo].ReadOnly = true;
             //intoDate();
             //鏍煎紡鍖栫綉鏍�
             //DBUtility.Xt_BaseBillFun.initGridLast(sAllowCol, sTotalCol, oSumGrid_Mater);
@@ -123,6 +132,14 @@
             ////闅愯棌鍒�
             grdMain_Pay.Columns[HTagCol].Visible = false;
             grdMain_Pay.Columns[HInterID].Visible = false;
+            //缃伆
+            grdMain_Pay.Columns[HSnoCol].ReadOnly = true;
+            grdMain_Pay.Columns[HBarCode].ReadOnly = true;
+            grdMain_Pay.Columns[HQty].ReadOnly = true;
+            grdMain_Pay.Columns[HMaterCol].ReadOnly = true;
+            grdMain_Pay.Columns[HMaterName].ReadOnly = true;
+            grdMain_Pay.Columns[HMaterMould].ReadOnly = true;
+            grdMain_Pay.Columns[HBatchNo].ReadOnly = true;
             //璁剧疆鍙紪杈戝垪
             string sAllowCol = HNum2.ToString();
             //璁剧疆鍚堣鍒�
@@ -316,5 +333,118 @@
         {
             this.Close();
         }
+
+        GridppReport Report;
+        private void yl_Click(object sender, EventArgs e)
+        {
+            //閫夋嫨鎵撳嵃妯℃澘
+            BLL.Gy_OpenTmp oFrm = new BLL.Gy_OpenTmp();
+            oFrm.sBillName = ModName;
+            oFrm.sBillModel = "鏉$爜妗f鍒楄〃";
+            oFrm.ShowDialog();
+            if (oFrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK)
+            {
+                Sub_SetReport(oFrm.sOpenTmp);
+                Report.PrintPreview(false);
+                Thread.Sleep(1000);
+            }
+        }
+
+        private void dy_Click(object sender, EventArgs e)
+        {
+            //鎵撳嵃鍓嶅垽鏂潯鐮佹槸鍚﹀凡鎵撳嵃杩�
+            string sBarCode = "";
+            string sRelQty = "";
+            int i = 0;
+            DAL.ClsGy_BarCodeBill_Ctl oBar = new DAL.ClsGy_BarCodeBill_Ctl();
+
+            if (ClsPub.isLong(grdMain_Pay.Rows[0].Cells[HSnoCol2].Value) == 0)
+            {
+                MessageBox.Show("璇峰厛鐢熸垚鎷嗙爜鏉$爜锛�");
+            }
+
+            while (ClsPub.isLong(grdMain_Pay.Rows[i].Cells[HSnoCol2].Value) != 0)
+            {
+                sBarCode = sBarCode + "," + DBUtility.ClsPub.isStrNull(grdMain_Pay.Rows[i].Cells[HBarCode2].Value);
+                i++;
+            }
+           
+            //閫夋嫨鎵撳嵃妯℃澘
+            BLL.Gy_OpenTmp oFrm = new BLL.Gy_OpenTmp();
+            oFrm.sBillName = ModName;
+            oFrm.sBillModel = "鏉$爜妗f鍒楄〃";
+            oFrm.ShowDialog();
+            if (oFrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK)
+            {
+                Sub_SetReport(oFrm.sOpenTmp);
+                Report.Print(false);
+                //oBar.Set_PrintQty(DBUtility.ClsPub.isStrNull(grdMain.Rows[CurRows].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value));
+                Thread.Sleep(1000);
+            }
+
+            //鎵归噺鏇存柊鏉$爜鎵撳嵃娆℃暟
+            oBar.Set_EPrintQty(sBarCode.Substring(1));
+        }
+
+        private void Sub_SetReport(string sOpenTmp)
+        {
+            //鍒ゆ柇琛屾暟
+            for (int i = 0; i < grdMain_Pay.Rows.Count; i++)
+            {
+                grdMain_Pay.Rows[i].Cells[0].Value = "";
+            }
+            for (int i = 0; i < grdMain_Pay.SelectedRows.Count; i++)
+            {
+                grdMain_Pay.Rows[grdMain_Pay.SelectedRows[i].Index].Cells[0].Value = "*";
+            }
+            //
+            Report = new GridppReport();
+            Report.LoadFromFile(DBUtility.ClsPub.AppPath + @"\" + sOpenTmp + ".grf");  //here .
+            Report.BeforePostRecord += new _IGridppReportEvents_BeforePostRecordEventHandler(ReportBeforePostRecord);
+            Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReportFetchRecordByDataTable);
+        }
+        //濉叆鍗曟嵁琛ㄥご淇℃伅
+        private void ReportBeforePostRecord()//your report?kao
+        {
+            try
+            {
+                //Report.FieldByName("鐗╂枡浠g爜").AsString = grdMain.Rows[CurRows].Cells[Fun_GetCol("鐗╂枡浠g爜")].Value.ToString();
+                //Report.FieldByName("鐗╂枡鍚嶇О").AsString = grdMain.Rows[CurRows].Cells[Fun_GetCol("鐗╂枡鍚嶇О")].Value.ToString();
+                //Report.FieldByName("瑙勬牸鍨嬪彿").AsString = grdMain.Rows[CurRows].Cells[Fun_GetCol("瑙勬牸鍨嬪彿")].Value.ToString();
+                //Report.FieldByName("鑷畾涔夎鏍�").AsString = grdMain.Rows[CurRows].Cells[Fun_GetCol("鑷畾涔夎鏍�")].Value.ToString();
+                //Report.FieldByName("鏉$爜缂栧彿").AsString = grdMain.Rows[CurRows].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value.ToString();
+                //Report.FieldByName("鏁伴噺").AsString = grdMain.Rows[CurRows].Cells[Fun_GetCol("鏁伴噺")].Value.ToString();
+                //Report.FieldByName("鎵规").AsString = grdMain.Rows[CurRows].Cells[Fun_GetCol("鎵瑰彿")].Value.ToString();
+                //Report.FieldByName("婧愬崟鍗曞彿").AsString = grdMain.Rows[CurRows].Cells[Fun_GetCol("婧愬崟鍗曞彿")].Value.ToString();
+                //Report.FieldByName("閿�鍞鍗曞彿").AsString = grdMain.Rows[CurRows].Cells[Fun_GetCol("閿�鍞鍗曞彿")].Value.ToString();
+                //Report.FieldByName("閲囪喘璁㈠崟鍙�").AsString = grdMain.Rows[CurRows].Cells[Fun_GetCol("閲囪喘璁㈠崟鍙�")].Value.ToString();
+                //Report.FieldByName("渚涘簲鍟�").AsString = grdMain.Rows[CurRows].Cells[Fun_GetCol("寰�鏉ュ崟浣�")].Value.ToString();
+                //Report.FieldByName("鐢熶骇杞﹂棿").AsString = grdMain.Rows[CurRows].Cells[Fun_GetCol("鐢熶骇杞﹂棿")].Value.ToString();
+                //Report.FieldByName("澶囨敞").AsString = grdMain.Rows[CurRows].Cells[Fun_GetCol("澶囨敞")].Value.ToString();
+                //Report.FieldByName("鎬绘墭鏁�").AsString = grdMain.Rows[CurRows].Cells[Fun_GetCol("鎬绘墭鏁�")].Value.ToString();
+                //Report.FieldByName("鎵樺彿").AsString = grdMain.Rows[CurRows].Cells[Fun_GetCol("鎵樺彿")].Value.ToString();
+            }
+            catch (Exception e)
+            {
+                MessageBox.Show("鎵撳嵃澶辫触!琛ㄥご锛�" + e.Message);
+            }
+            //CurRows = CurRows + 1;
+        }
+        private void ReportFetchRecordByDataTable()
+        {
+            try
+            {
+                DataTable ds = new DataTable();
+                BLL.Utility.FillRecordToReport_Sel(Report, grdMain_Pay, ds, Fun_GetCol("搴忓彿"));
+            }
+            catch (Exception e)
+            {
+                MessageBox.Show("鎵撳嵃澶辫触!琛ㄤ綋锛�" + e.Message);
+            }
+        }
+        private Int32 Fun_GetCol(string sCol)
+        {
+            return DBUtility.Xt_BaseBillFun.Fun_GetCol(sCol, grdMain_Pay);
+        }
     }
 }
diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\207\272\345\205\245\345\272\223\350\256\260\345\275\225/Kf_ICStockInOutBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\207\272\345\205\245\345\272\223\350\256\260\345\275\225/Kf_ICStockInOutBillController.cs"
index 6b331dc..b3cf4b8 100644
--- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\207\272\345\205\245\345\272\223\350\256\260\345\275\225/Kf_ICStockInOutBillController.cs"
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\207\272\345\205\245\345\272\223\350\256\260\345\275\225/Kf_ICStockInOutBillController.cs"
@@ -93,5 +93,114 @@
             return objJsonResult;
         }
         #endregion
+
+        #region 鏉$爜鍑哄叆搴撶紦瀛�
+        #region 鏉$爜鍑哄叆搴撶紦瀛樺垪琛�
+        [Route("Kf_ICStockInOutBill/GetPonderationBillMain_Temp")]
+        [HttpGet]
+        public object GetPonderationBillMain_Temp(string sWhere,string user)
+        {
+            try
+            {
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_BarCodeBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                DataSet ds = new DataSet();
+                string sql1 = string.Format(@"select * from h_v_KF_PonderationBillMain_Temp2 where 1=1 ");
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds= oCN.RunProcReturn(sql1 + "order by HInterID desc", "h_v_KF_PonderationBillMain_Temp2");
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn(sql1 + sWhere + "order by HInterID desc", "h_v_KF_PonderationBillMain_Temp2");
+                }
+                if (ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = e.Message.ToString();
+                objJsonResult.data = null;
+            }
+            return objJsonResult;
+        }
+        #endregion
+
+        #region 鏉$爜鍑哄叆搴撶紦瀛樺垹闄�
+        [Route("Kf_ICStockInOutBill/DelectPonderationBillMain_TempByID")]
+        [HttpGet]
+        public object DelectPonderationBillMain_TempByID(string HInterID, string user)
+        {
+            //缂栬緫鏉冮檺
+            if (!DBUtility.ClsPub.Security_Log_second("Gy_BarCodeBillList_Delete", 1, false, user))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+            string s = "";
+            Int64 lngBillKey = 0;
+            lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+            if (lngBillKey == 0)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            DataSet ds = new DataSet();
+            DataSet ds1 = new DataSet();
+            ds = oCN.RunProcReturn("select * from KF_PonderationBillMain_Temp where HInterID="+ HInterID, "KF_PonderationBillMain_Temp");
+            if (ds.Tables[0].Rows.Count!=0)
+            {
+                oCN.BeginTran();
+                oCN.RunProc("delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID);
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛";
+                objJsonResult.data = null;
+                oCN.Commit();
+                return objJsonResult;
+            }
+            else
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+        #endregion
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1