From e5e6e1546b02eeea48a46dfdda1461202fc84253 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期五, 01 四月 2022 16:43:14 +0800
Subject: [PATCH] 合并

---
 WorkM/流转卡管理/Sc_ProcessExchangeBill.cs |   70 +++++++++++++++++++++++++++++------
 1 files changed, 58 insertions(+), 12 deletions(-)

diff --git "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/Sc_ProcessExchangeBill.cs" "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/Sc_ProcessExchangeBill.cs"
index 8c3ea7e..03322e9 100644
--- "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/Sc_ProcessExchangeBill.cs"
+++ "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/Sc_ProcessExchangeBill.cs"
@@ -102,6 +102,9 @@
         public const Int16 HTechnologyParameterCol = 76;
         public const Int16 HPicNumCol = 77;
         public const Int16 HProcCheckNoteCol = 78;
+        public const Int16 HMouldNoCol = 79;
+        public const Int16 HProcWorkNumCol = 80;
+        public const Int16 HICMOEntryIDCol = 81;
 
 
 
@@ -775,6 +778,7 @@
                     xyz.Enabled = true;
                     mz.Enabled = true;
                     tc.Enabled = true;
+                    fz.Enabled = false;
                     //redblue.Enabled = false;
                     //鏈鏍�
                     if (txtHChecker.Text.Trim() == "")
@@ -895,6 +899,7 @@
                     xyz.Enabled = false;
                     mz.Enabled = false;
                     tc.Enabled = true;
+                    fz.Enabled = true;
                     Sub_LrtextStatus(true);
                     grdStatus = true;
                     //redblue.Enabled = true;
@@ -1053,6 +1058,11 @@
                 this.txtHOrderProcNO.Text = DBUtility.ClsPub.isStrNull(BillOld.omodel.HOrderProcNO);
                 this.txtHMateOutBatchNo.Text = DBUtility.ClsPub.isStrNull(BillOld.omodel.HMateOutBatchNo);
                 this.txtHProjectNum.Text = DBUtility.ClsPub.isStrNull(BillOld.omodel.HProjectNum);
+                this.textHPicNumVer.Text = DBUtility.ClsPub.isStrNull(BillOld.omodel.HPicNumVer);
+                this.textHPicNumAssemble.Text = DBUtility.ClsPub.isStrNull(BillOld.omodel.HPicNumAssemble);
+                this.textHMaterTexture.Text = DBUtility.ClsPub.isStrNull(BillOld.omodel.HMaterTexture);
+                this.textHProductNum.Text = DBUtility.ClsPub.isStrNull(BillOld.omodel.HProductNum);
+                this.textHVerNum.Text = DBUtility.ClsPub.isStrNull(BillOld.omodel.HVerNum);
                 //鍔犺浇琛ㄤ綋
                 initGrid();
                 int i = 0;
@@ -1077,6 +1087,8 @@
                     grdMain.Rows[i].Cells[HRelationQty_WWOrderCol].Value = oSub.HRelationQty_WWOrder.ToString();
                     grdMain.Rows[i].Cells[HRelationQty_BadCol].Value = oSub.HRelationQty_Bad.ToString();
                     grdMain.Rows[i].Cells[HRelationMoneyCol].Value = oSub.HRelationMoney.ToString();
+                    grdMain.Rows[i].Cells[HMouldNoCol].Value = oSub.HMouldNo.ToString();
+                    grdMain.Rows[i].Cells[HProcWorkNumCol].Value = oSub.HProcWorkNum.ToString();
                     //======================================================================================
                     //
                     grdMain.Rows[i].Cells[HProcIDCol].Value = oSub.HProcID.ToString();
@@ -1206,6 +1218,7 @@
                     //
                     grdMain.Rows[i].Cells[HICMOBillNoCol].Value = oSub.HICMOBillNo;
                     grdMain.Rows[i].Cells[HICMOInterIDCol].Value = oSub.HICMOInterID.ToString();
+                    grdMain.Rows[i].Cells[HICMOEntryIDCol].Value = oSub.HICMOEntryID.ToString();
                     grdMain.Rows[i].Cells[HSeOrderBillNoCol].Value = oSub.HSeOrderBillNo;
                     grdMain.Rows[i].Cells[HSeOrderInterIDCol].Value = oSub.HSeOrderInterID.ToString();
                     grdMain.Rows[i].Cells[HSeOrderEntryIDCol].Value = oSub.HSeOrderEntryID.ToString();
@@ -1275,11 +1288,11 @@
                     return false;
                 }
                 //txtHMateOutBatchNo
-                if (DBUtility.ClsPub.isStrNull(txtHMateOutBatchNo.Text) == "")
-                {
-                    MessageBox.Show("鍘熸枡鎵规涓嶈兘涓虹┖锛�", "鎻愮ず");
-                    return false;
-                }
+                //if (DBUtility.ClsPub.isStrNull(txtHMateOutBatchNo.Text) == "")
+                //{
+                //    MessageBox.Show("鍘熸枡鎵规涓嶈兘涓虹┖锛�", "鎻愮ず");
+                //    return false;
+                //}
 
             }
             //鍗曟嵁鍙锋槸鍚﹂噸澶�
@@ -1305,6 +1318,8 @@
             }
             return true;
         }
+
+
         //淇濆瓨鍗曟嵁
         private bool Sub_SaveBill()
         {
@@ -1332,16 +1347,19 @@
             string s = "";
             int sYear = 0;
             int sPeriod = 0;
-            if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(dtpHDate.Value, ref sYear, ref sPeriod, ref s) == false)
-            {
-                MessageBox.Show(s, "鎻愮ず");
-                return false;
-            }
+            //if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(dtpHDate.Value, ref sYear, ref sPeriod, ref s) == false)
+            //{
+            //    MessageBox.Show(s, "鎻愮ず");
+            //    return false;
+            //}
+            sYear = ClsPub.isDate(dtpHDate.Value).Year;
+            sPeriod = ClsPub.isDate(dtpHDate.Value).Month;
             //婧愬崟淇℃伅
             //BillNew.omodel.HMainSourceBillType = cmbSourceBillType.Text;
             //
             BillNew.omodel.HYear = sYear;
             BillNew.omodel.HPeriod = sPeriod;
+            BillNew.omodel.HPRDORGID = DBUtility.ClsPub.HOrgID;  //缁勭粐
             //鍥哄畾璧嬪��=================================
             BillNew.omodel.HBillNo = this.txtHBillNo.Text.Trim();  //鍦ㄨ祴鍊肩被鍓嶅氨澶勭悊濂藉瓧绗︿覆鍜屾暟瀛�
             BillNew.omodel.HDate = this.dtpHDate.Value;
@@ -1398,6 +1416,12 @@
             BillNew.omodel.HMaterIDB = ClsPub.isStrNull(this.txtHMaterIDB.Text);
             BillNew.omodel.HMaterIDC = ClsPub.isStrNull(this.txtHMaterIDC.Text);
             BillNew.omodel.HMaterIDD = ClsPub.isStrNull(this.txtHMaterIDD.Text);
+            //===================
+            BillNew.omodel.HPicNumVer = ClsPub.isStrNull(this.textHPicNumVer.Text);
+            BillNew.omodel.HPicNumAssemble = ClsPub.isStrNull(this.textHPicNumAssemble.Text);
+            BillNew.omodel.HMaterTexture = ClsPub.isStrNull(this.textHMaterTexture.Text);
+            BillNew.omodel.HProductNum = ClsPub.isStrNull(this.textHProductNum.Text);
+            BillNew.omodel.HVerNum = ClsPub.isStrNull(this.textHVerNum.Text);
             //鑾峰彇鏈�澶ц鍙�
             int MaxRowNo = 0;
             for (int n = 0; n < grdMain.Rows.Count; n++)
@@ -1523,6 +1547,7 @@
                     }
                     oSub.HICMOBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HICMOBillNoCol].Value);
                     oSub.HICMOInterID = DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HICMOInterIDCol].Value);
+                    oSub.HICMOEntryID = DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HICMOEntryIDCol].Value);
                     oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HSeOrderInterIDCol].Value);
                     oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HSeOrderEntryIDCol].Value);
                     oSub.HSeOrderBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HSeOrderBillNoCol].Value);
@@ -1536,6 +1561,8 @@
                     oSub.HTechnologyParameter = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HTechnologyParameterCol].Value);
                     oSub.HPicNum = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HPicNumCol].Value);
                     oSub.HProcCheckNote = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HProcCheckNoteCol].Value);
+                    oSub.HMouldNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HMouldNoCol].Value);
+                    oSub.HProcWorkNum = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HProcWorkNumCol].Value);
                     BillNew.DetailColl.Add(oSub);
                 }
             }
@@ -1582,7 +1609,7 @@
         {
 
             //
-            grdMain.ColumnCount = 79;                       //鎬诲垪鏁�
+            grdMain.ColumnCount = 82;                       //鎬诲垪鏁�
             DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name);
             //
             grdMain.RowsDefaultCellStyle.WrapMode = DataGridViewTriState.True;
@@ -1648,6 +1675,7 @@
 
             grdMain.Columns[HICMOBillNoCol].HeaderText = "鐢熶骇璁㈠崟鍙�";
             grdMain.Columns[HICMOInterIDCol].HeaderText = "鐢熶骇璁㈠崟涓诲唴鐮�";
+            grdMain.Columns[HICMOEntryIDCol].HeaderText = "鐢熶骇璁㈠崟瀛愬唴鐮�";
             grdMain.Columns[HSeOrderInterIDCol].HeaderText = "閿�鍞鍗曚富鍐呯爜";
             grdMain.Columns[HSeOrderEntryIDCol].HeaderText = "閿�鍞鍗曞瓙鍐呯爜";
             grdMain.Columns[HSeOrderBillNoCol].HeaderText = "閿�鍞鍗曞崟鍙�";
@@ -1659,6 +1687,8 @@
             grdMain.Columns[HTechnologyParameterCol].HeaderText = "宸ヨ壓鍙傛暟";
             grdMain.Columns[HPicNumCol].HeaderText = "鍥剧焊缂栧彿";
             grdMain.Columns[HProcCheckNoteCol].HeaderText = "鏈伐搴忕‘璁よ褰�";
+            grdMain.Columns[HMouldNoCol].HeaderText = "妯″叿缂栧彿";
+            grdMain.Columns[HProcWorkNumCol].HeaderText = "绋嬪簭鍙�";
             // grdMain.Columns[HKeyProcCol].HeaderText = "鍏抽敭宸ュ簭";
             grdMain.Columns[HKeyProcCol].Visible = false;
             ////鍥哄畾璧嬪��=====================================================
@@ -1707,6 +1737,7 @@
             grdMain.Columns[HTagCol].Visible = false;
             grdMain.Columns[HWorkerIDCol].Visible = false;
             grdMain.Columns[HICMOInterIDCol].Visible = false;
+            grdMain.Columns[HICMOEntryIDCol].Visible = false;
             grdMain.Columns[HOutMoneyCol].Visible = false;
             grdMain.Columns[HSourceIDCol].Visible = false;
             //grdMain.Columns[HEntryIDCol].Visible = false;
@@ -1813,6 +1844,8 @@
                             "," + HLastProcCol.ToString() +
                             "," + HFstProcCol.ToString() +
                             "," + HRemarkCol.ToString() +
+                            "," + HMouldNoCol.ToString() +
+                            "," + HProcWorkNumCol.ToString() +
                             "," + HSupNameCol +
                             "," + HSupFlagCol;
             //璁剧疆鍚堣鍒�
@@ -2447,10 +2480,15 @@
                 Report.FieldByName("鍘熸枡鎵规").AsString = txtHMateOutBatchNo.Text;
                 Report.FieldByName("妯″叿璁惧").AsString = txtHEquipMentID.Text;
                 Report.FieldByName("椤圭洰鍙�").AsString = txtHProjectNum.Text;
+                Report.FieldByName("鍥惧彿鐗堟湰").AsString = textHPicNumVer.Text;
+                Report.FieldByName("鎬昏鍥惧彿").AsString = textHPicNumAssemble.Text;
+                Report.FieldByName("鏉愯川").AsString = textHMaterTexture.Text;
+                Report.FieldByName("鎴愬搧缂栧彿").AsString = textHProductNum.Text;
+                Report.FieldByName("鐗堟湰").AsString = textHVerNum.Text;
             }
             catch (Exception e)
             {
-                MessageBox.Show("鎵撳嵃澶辫触锛孾椤圭洰鍙穄,[娴佽浆鍗$紪鍙穄,[娴佽浆鍗℃暟閲廬,[浜у搧浠g爜],[浜у搧鍚嶇О],[璁″垝寮�宸ユ棩鏈焆,[璁″垝瀹屽伐鏃ユ湡],[璁㈠崟璺熻釜鍙穄,[鍘熸枡鎵规],[妯″叿璁惧]." + e.Message);
+                MessageBox.Show("鎵撳嵃澶辫触锛孾椤圭洰鍙穄,[娴佽浆鍗$紪鍙穄,[娴佽浆鍗℃暟閲廬,[浜у搧浠g爜],[浜у搧鍚嶇О],[璁″垝寮�宸ユ棩鏈焆,[璁″垝瀹屽伐鏃ユ湡],[璁㈠崟璺熻釜鍙穄,[鍘熸枡鎵规],[妯″叿璁惧],[鍥惧彿鐗堟湰],[鎬昏鍥惧彿],[鏉愯川],[鎴愬搧缂栧彿],[鐗堟湰]." + e.Message);
             }
 
         }
@@ -3406,6 +3444,11 @@
             txtHCusName.Text = oTable.Rows[row]["瀹㈡埛鍚嶇О"].ToString();
             txtHWorkRemark.Text = oTable.Rows[row]["鐢熶骇澶囨敞"].ToString();
             txtHImportNote.Text = oTable.Rows[row]["閲嶈鎻愮ず"].ToString();
+            textHPicNumVer.Text = oTable.Rows[row]["鍥惧彿鐗堟湰"].ToString();
+            textHPicNumAssemble.Text = oTable.Rows[row]["鎬昏鍥惧彿"].ToString();
+            textHMaterTexture.Text = oTable.Rows[row]["鏉愯川"].ToString();
+            textHProductNum.Text = oTable.Rows[row]["鎴愬搧缂栧彿"].ToString();
+            textHVerNum.Text = oTable.Rows[row]["鐗堟湰"].ToString();
 
             // txtHWorkTypeID.Text = oTable.Rows[row]["鐢熶骇杞﹂棿鍚嶇О"].ToString();
 
@@ -3479,6 +3522,7 @@
                 //
                 grdMain.Rows[i].Cells[HICMOBillNoCol].Value = oTable.Rows[i]["鐢熶骇璁㈠崟鍙�"].ToString();
                 grdMain.Rows[i].Cells[HICMOInterIDCol].Value = oTable.Rows[i]["hmainid"].ToString();
+                grdMain.Rows[i].Cells[HICMOEntryIDCol].Value = oTable.Rows[i]["HEntryID"].ToString();
                 grdMain.Rows[i].Cells[HSourceInterIDCol].Value = oTable.Rows[i]["hmainid"].ToString();
                 grdMain.Rows[i].Cells[HSourceEntryIDCol].Value = oTable.Rows[i]["HEntryID"].ToString();
                 grdMain.Rows[i].Cells[HSourceBillTypeCol].Value = oTable.Rows[i]["HBillType"].ToString();
@@ -3490,6 +3534,8 @@
                 grdMain.Rows[i].Cells[HProcCheckNoteCol].Value = oTable.Rows[i]["鏈伐搴忕‘璁よ褰�"].ToString();
                 grdMain.Rows[i].Cells[HOverRateCol].Value = oTable.Rows[i]["瓒呴姣斾緥"].ToString();
                 grdMain.Rows[i].Cells[HMaxQtyCol].Value = oTable.Rows[i]["鏈�楂樹笂闄�"].ToString();
+                grdMain.Rows[i].Cells[HMouldNoCol].Value = oTable.Rows[i]["妯″叿缂栧彿"].ToString();
+                grdMain.Rows[i].Cells[HProcWorkNumCol].Value = oTable.Rows[i]["绋嬪簭鍙�"].ToString();
             }
 
             Sub_CountProcExchQty();

--
Gitblit v1.9.1