YL
2021-08-17 bd29472dea45f3fd8693473c515db37d998e2b00
WorkM/Á÷ת¿¨¹ÜÀí/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;
@@ -1055,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;
@@ -1079,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();
@@ -1208,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();
@@ -1307,6 +1318,8 @@
            }
            return true;
        }
        //保存单据
        private bool Sub_SaveBill()
        {
@@ -1400,6 +1413,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++)
@@ -1525,6 +1544,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);
@@ -1538,6 +1558,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);
                }
            }
@@ -1584,7 +1606,7 @@
        {
            //
            grdMain.ColumnCount = 79;                       //总列数
            grdMain.ColumnCount = 82;                       //总列数
            DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name);
            //
            grdMain.RowsDefaultCellStyle.WrapMode = DataGridViewTriState.True;
@@ -1650,6 +1672,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 = "销售订单单号";
@@ -1661,6 +1684,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;
            ////固定赋值=====================================================
@@ -1709,6 +1734,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;
@@ -1815,6 +1841,8 @@
                            "," + HLastProcCol.ToString() +
                            "," + HFstProcCol.ToString() +
                            "," + HRemarkCol.ToString() +
                            "," + HMouldNoCol.ToString() +
                            "," + HProcWorkNumCol.ToString() +
                            "," + HSupNameCol +
                            "," + HSupFlagCol;
            //设置合计列
@@ -3408,6 +3436,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();
@@ -3481,6 +3514,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();
@@ -3492,6 +3526,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();