YL
2021-12-23 517b819913e5146cc47b80877dd557326c76246a
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
3个文件已修改
236 ■■■■ 已修改文件
DAL/源单/Cls_S_Xt_BaseBill.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_BarCodeBill.cs 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_BarCodeBill.designer.cs 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/Ô´µ¥/Cls_S_Xt_BaseBill.cs
@@ -25,7 +25,8 @@
        public string sOrderSql2 = "";
        public string sKeyCol2 = "";
        public string sShowItemSql2 = "";
        public DAL.frmHlpBillList oFrm = new DAL.frmHlpBillList();
        public frmHlpBillList oFrm;
        //public DAL.frmHlpBillList oFrm = new DAL.frmHlpBillList();
        public List<DBUtility.BillSelect> oBillSelectColl = new List<DBUtility.BillSelect>();
        public List<DBUtility.BillSelect_A3> oBillSelectColl2 = new List<DBUtility.BillSelect_A3>();
        //
@@ -53,6 +54,7 @@
            tSQL = sWhere + sCondtion + sOrderSql;
            try
            {
                oFrm = new frmHlpBillList();
                oFrm.sPrimaryCol = sKeyCol;
                oFrm.Text = mvarReportTitle;
                oFrm.lblCaption.Text = mvarReportTitle;
@@ -112,6 +114,7 @@
            tSQL = sWhere + sCondtion2 + sOrderSql2;
            try
            {
                oFrm = new frmHlpBillList();
                oFrm.sPrimaryCol = sKeyCol2;
                oFrm.Text = mvarReportTitle2;
                oFrm.lblCaption.Text = mvarReportTitle2;
@@ -168,6 +171,7 @@
            tSQL = sWhere + sCondtion2 + sOrderSql2;
            try
            {
                oFrm = new frmHlpBillList();
                oFrm.sPrimaryCol = sKeyCol2;
                oFrm.Text = mvarReportTitle2;
                oFrm.lblCaption.Text = mvarReportTitle2;
@@ -257,6 +261,7 @@
            tSQL = sWhere + sCondtion + sOrderSql;
            try
            {
                oFrm = new frmHlpBillList();
                oFrm.sPrimaryCol = sKeyCol;
                oFrm.Text = mvarReportTitle;
                oFrm.lblCaption.Text = mvarReportTitle;
@@ -295,6 +300,56 @@
            return true;
        }
        //根据源单号 æ¨¡æ‹ŸæŸ¥è¯¢æ•°æ®
        /// <summary>
        /// æ˜¾ç¤ºæ•°æ®
        /// </summary>
        /// <param name="sWhere">主SQL</param>
        /// <param name="sCondtion">过滤条件</param>
        /// <param name="sOrderSql">排序条件</param>
        /// <param name="sKeyCol">不可重复列</param>
        /// <returns></returns>
        public virtual bool RefreshBySourceBillNo(string sWhere)
        {
            string sErr = "";
            string tSQL;
            ClsCN oCn = new ClsCN();
            tSQL = " select hmainid,hsubid,单据号 from " + ViewName + sWhere + sOrderSql;
            try
            {
                DataSet ds = oCn.RunProcReturn(tSQL, ViewName, ref DBUtility.ClsPub.sExeReturnInfo);
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    return false;
                }
                //返回数据到集合中
                oBillSelectColl.Clear();
                //循环 é€‰ä¸­è¡Œ
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    BillSelect oSelect = new BillSelect();
                    oSelect.BillNo = ClsPub.isStrNull(ds.Tables[0].Rows[i]["单据号"]);
                    oSelect.BillMainID = ClsPub.isLong(ds.Tables[0].Rows[i]["hmainid"]);
                    oSelect.BillSubID = ClsPub.isLong(ds.Tables[0].Rows[i]["hsubid"]);
                    oSelect.BillTitle = mvarReportTitle;
                    oSelect.BillType = mvarItemKey;
                    oBillSelectColl.Add(oSelect);
                }
                //
                if (oBillSelectColl.Count > 0)
                    return true;
                else
                    return false;
            }
            catch (Exception e)
            {
                sErr = e.Message;
            }
            return true;
        }
    }
}
WarM/ÌõÂë´òÓ¡/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("未查询到任务数据,请确认所选组织、源单类型与源单单号是否正确!");
                        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("未查询到任务数据,请确认所选组织、源单类型与源单单号是否正确!");
                        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("未查询到任务数据,请确认所选组织、源单类型与源单单号是否正确!");
                        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("未查询到任务数据,请确认所选组织、源单类型与源单单号是否正确!");
                        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("未查询到任务数据,请确认所选组织、源单类型与源单单号是否正确!");
                        return;
                    }
                }
                else
                {
                    MessageBox.Show("所选源单类型,不支持此功能!");
                    return;
                }
            }
        }
    }
}
WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill.designer.cs
@@ -51,6 +51,8 @@
            this.tb = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
            this.gl = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
            this.BatchNo = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
            this.tc = new System.Windows.Forms.ToolStripButton();
            this.lblCaption = new System.Windows.Forms.Label();
@@ -67,7 +69,7 @@
            this.label1 = new System.Windows.Forms.Label();
            this.cmdHEmpID = new System.Windows.Forms.Button();
            this.cmdSourceBillNo = new System.Windows.Forms.Button();
            this.textBox2 = new System.Windows.Forms.TextBox();
            this.txtHSourceBillNo = new System.Windows.Forms.TextBox();
            this.label14 = new System.Windows.Forms.Label();
            this.cmbSourceBillType = new System.Windows.Forms.ComboBox();
            this.label10 = new System.Windows.Forms.Label();
@@ -104,8 +106,6 @@
            this.grdSub = new System.Windows.Forms.DataGridView();
            this.tabPage3 = new System.Windows.Forms.TabPage();
            this.grdList = new System.Windows.Forms.DataGridView();
            this.BatchNo = new System.Windows.Forms.ToolStripButton();
            this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
            this.Tool.SuspendLayout();
            this.P1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pic1)).BeginInit();
@@ -374,6 +374,25 @@
            this.gl.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
            this.gl.Click += new System.EventHandler(this.gl_Click);
            // 
            // toolStripSeparator7
            //
            this.toolStripSeparator7.Name = "toolStripSeparator7";
            this.toolStripSeparator7.Size = new System.Drawing.Size(6, 50);
            //
            // BatchNo
            //
            this.BatchNo.AutoSize = false;
            this.BatchNo.Image = ((System.Drawing.Image)(resources.GetObject("BatchNo.Image")));
            this.BatchNo.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.BatchNo.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.BatchNo.ImageTransparentColor = System.Drawing.Color.White;
            this.BatchNo.Name = "BatchNo";
            this.BatchNo.Size = new System.Drawing.Size(36, 47);
            this.BatchNo.Text = "批次";
            this.BatchNo.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.BatchNo.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
            this.BatchNo.Click += new System.EventHandler(this.BatchNo_Click);
            //
            // toolStripSeparator3
            // 
            this.toolStripSeparator3.Name = "toolStripSeparator3";
@@ -438,7 +457,7 @@
            this.gbUp.Controls.Add(this.label1);
            this.gbUp.Controls.Add(this.cmdHEmpID);
            this.gbUp.Controls.Add(this.cmdSourceBillNo);
            this.gbUp.Controls.Add(this.textBox2);
            this.gbUp.Controls.Add(this.txtHSourceBillNo);
            this.gbUp.Controls.Add(this.label14);
            this.gbUp.Controls.Add(this.cmbSourceBillType);
            this.gbUp.Controls.Add(this.label10);
@@ -547,13 +566,14 @@
            this.cmdSourceBillNo.UseVisualStyleBackColor = true;
            this.cmdSourceBillNo.Click += new System.EventHandler(this.cmdSourceBillNo_Click);
            // 
            // textBox2
            // txtHSourceBillNo
            // 
            this.textBox2.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.textBox2.Location = new System.Drawing.Point(394, 46);
            this.textBox2.Name = "textBox2";
            this.textBox2.Size = new System.Drawing.Size(166, 21);
            this.textBox2.TabIndex = 41;
            this.txtHSourceBillNo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.txtHSourceBillNo.Location = new System.Drawing.Point(394, 46);
            this.txtHSourceBillNo.Name = "txtHSourceBillNo";
            this.txtHSourceBillNo.Size = new System.Drawing.Size(166, 21);
            this.txtHSourceBillNo.TabIndex = 41;
            this.txtHSourceBillNo.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtHSourceBillNo_KeyPress);
            // 
            // label14
            // 
@@ -965,25 +985,6 @@
            this.grdList.Size = new System.Drawing.Size(929, 288);
            this.grdList.TabIndex = 46;
            // 
            // BatchNo
            //
            this.BatchNo.AutoSize = false;
            this.BatchNo.Image = ((System.Drawing.Image)(resources.GetObject("BatchNo.Image")));
            this.BatchNo.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.BatchNo.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
            this.BatchNo.ImageTransparentColor = System.Drawing.Color.White;
            this.BatchNo.Name = "BatchNo";
            this.BatchNo.Size = new System.Drawing.Size(36, 47);
            this.BatchNo.Text = "批次";
            this.BatchNo.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            this.BatchNo.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
            this.BatchNo.Click += new System.EventHandler(this.BatchNo_Click);
            //
            // toolStripSeparator7
            //
            this.toolStripSeparator7.Name = "toolStripSeparator7";
            this.toolStripSeparator7.Size = new System.Drawing.Size(6, 50);
            //
            // Gy_BarCodeBill
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -1068,7 +1069,7 @@
        private System.Windows.Forms.Label label10;
        private System.Windows.Forms.ComboBox cmbSourceBillType;
        private System.Windows.Forms.Button cmdSourceBillNo;
        private System.Windows.Forms.TextBox textBox2;
        private System.Windows.Forms.TextBox txtHSourceBillNo;
        private System.Windows.Forms.Label label14;
        private System.Windows.Forms.ToolStripButton tc;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator12;