wtt
2024-12-13 58b51d88ad003c57e12b2567f3bbba122dde662a
WarM/ÌõÂë´òÓ¡/Kf_WeighToBarCode_StationOutBill.cs
@@ -594,6 +594,11 @@
                MessageBox.Show("工序不允许为空,请先输入流水号后回车确认!", "提示");
                return false;
            }
            else if (DBUtility.ClsPub.isInt(txtHProcNo.Text) == 0)
            {
                MessageBox.Show("请输入正确流水号!", "提示");
                return false;
            }
            else if (DBUtility.ClsPub.isLong(txtHSourceID.Tag) == 0)
            {
                MessageBox.Show("生产资源不允许为空,请先选择生产资源!", "提示");
@@ -608,6 +613,36 @@
            {
                if (MessageBox.Show("物料维护克重为:" + HMaterWeight.ToString() + ",实际克重为:" + sQty.ToString() + ",所输入实际克重超出物料维护克重的百分之二十或不足物料维护克重的百分之八十,请检查输入的数据是否正确!", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                {
                    //return true;
                }
                else
                {
                    return false;
                }
            }
            //条码生成前控制判断
            double HNowQty = 0;     //米数
            double HWeightQyt = 0;  //重量
            HNowQty = DBUtility.ClsPub.isDoule(txtHQty.Text);
            HWeightQyt = DBUtility.ClsPub.isDoule(txtHWeightQyt.Text);
            DataSet oDsCheck = oCn.RunProcReturn("exec h_p_Kf_WeighToBarCode_StationOutBill_AddBarCodeCheck " + HInterID.ToString() + "," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + "," + HProcessExchangeInterID.ToString() + "," + HProcessExchangeEntryID.ToString() + "," + HSourceQty.ToString() + "," + HNowQty.ToString() + "," + HWeightQyt.ToString(), "h_p_Kf_WeighToBarCode_StationOutBill_AddBarCodeCheck");
            //
            if (oDsCheck == null && oDsCheck.Tables[0].Rows.Count == 0)
            {
                MessageBox.Show("条码生成前判断错误!");
                return false;
            }
            else if (DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0][0]) == "1")
            {
                MessageBox.Show(DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HRemark"]), "提示");
                return false;
            }
            else if (DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0][0]) == "2")
            {
                if (MessageBox.Show(DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HRemark"]), "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                {
                    return true;
                }
                else
@@ -615,7 +650,10 @@
                    return false;
                }
            }
            return true;
            else
            {
                return true;
            }
        }
        //生成条码
@@ -973,13 +1011,13 @@
        {
            if (e.KeyCode == Keys.Return)
            {
                if (txtHProcNo.Text == "")
                if (DBUtility.ClsPub.isLong(txtHProcNo.Text) == 0)
                {
                    MessageBox.Show("流水号为空,请输入流水号!");
                    MessageBox.Show("流水号为空或所输入流水号不正确,请重新输入流水号!");
                    return;
                }
                //根据转卡主ID、流水号带出流转卡上相应工序、班组、工作中心、生产资源
                DataSet Ds = oCn.RunProcReturn("exec h_p_KF_GetBCPWeighSource_HProcNo " + HProcessExchangeInterID.ToString() + "," + txtHProcNo.Text, "h_p_KF_GetBCPWeighSource_HProcNo");
                DataSet Ds = oCn.RunProcReturn("exec h_p_KF_GetBCPWeighSource_HProcNo2 " + HProcessExchangeInterID.ToString() + "," + DBUtility.ClsPub.isLong(txtHProcNo.Text) + ",'" + DBUtility.ClsPub.CurUserID + "'", "h_p_KF_GetBCPWeighSource_HProcNo2");
                if (Ds == null || Ds.Tables[0].Rows.Count == 0)
                {
                    txtHProcNo.Text = "";
@@ -991,7 +1029,7 @@
                    txtHGroupID.Text = "";
                    txtHSourceID.Tag = 0;
                    txtHSourceID.Text = "";
                    MessageBox.Show("所输入流水号不在当前工序流转卡下,请重新输入流水号!");
                    MessageBox.Show("所输入流水号不在当前工序流转卡下或用户未关联该流水号所对应相关工序,请重新输入流水号!");
                    return;
                }
                else