private void 单据审批确认ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (lbDJZT.Text == "等待处理结果")
            {
                if (Convert.ToDecimal(txtDeclareCount.Text) !=
                    (decimal)NudSQE_BHG.Value
                    + (decimal)NudSQE_HG.Value)
                {
                    MessageBox.Show("【合格数 + 不合格数 = 挑返数】 请重新确认", "提示");
                    return;
                }

                DataForMessage();
                View_S_CheckOutInDepotBill bill = m_serverCheckOutInDepot.GetBill(m_lnqReturn.InDepotBillID);

                m_msgPromulgator.PassFlowMessage(m_lnqReturn.DJH,
                                                 string.Format("【入库单号】:{0} 【图号型号】:{1} 【物品名称】:{2} 【规格】:{3}【供货单位】:{4}【批次号】:{5}  ※※※ 等待【{6}】处理",
                                                               bill.入库单号, bill.图号型号, bill.物品名称, bill.规格, bill.供货单位, bill.批次号, CE_RoleEnum.SQE组员.ToString()),
                                                 CE_RoleEnum.SQE组员.ToString(), true);
            }
            else
            {
                MessageBox.Show("请重新确认单据状态", "提示");
            }

            PositioningRecord(m_lnqReturn.DJH);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获得报检单中的信息
        /// </summary>
        /// <param name="djh">单据号</param>
        /// <returns>返回获得报检单的信息</returns>
        public View_S_CheckOutInDepotBill GetCheckInDepotBill(string djh)
        {
            DepotManagementDataContext dataContxt = CommentParameter.DepotDataContext;

            if (djh.Substring(0, 3).ToString() != "BJD" &&
                djh.Substring(0, 3).ToString() != "HJD" &&
                djh.Substring(0, 3).ToString() != "FJD")
            {
                string strSql = "select * from View_S_CheckOutInDepotBill as a inner join " +
                                " S_IsolationManageBill as b on a.物品ID =  b.GoodsID and a.批次号 = " +
                                " b.BatchNo where b.DJH = '" + djh + "'";

                DataTable dt = GlobalObject.DatabaseServer.QueryInfo(strSql);

                if (dt.Rows.Count > 0)
                {
                    return((from a in dataContxt.View_S_CheckOutInDepotBill
                            where a.入库单号 == dt.Rows[0]["入库单号"].ToString()
                            select a).Single());
                }
                else
                {
                    strSql = "select e.物品名称 as GoodsName,e.图号型号 as GoodsCode,e.规格 as Spec,e.物品类别 as GoodsType,b.BatchNo, " +
                             " d.Date,d.Provider,b.GoodsID,d.StorageID from S_MessMessageFeedback as a " +
                             " inner join S_IsolationManageBill as b on a.IndepotBillID = b.DJH " +
                             " inner join S_Stock as d on b.GoodsID = d.GoodsID and b.BatchNo = d.BatchNo " +
                             " inner join View_F_GoodsPlanCost as e on e.序号 = b.GoodsID where b.DJH = '" + djh + "'";

                    dt = GlobalObject.DatabaseServer.QueryInfo(strSql);

                    View_S_CheckOutInDepotBill lnqCheck = new View_S_CheckOutInDepotBill();

                    lnqCheck.图号型号 = dt.Rows[0]["GoodsCode"].ToString();
                    lnqCheck.物品名称 = dt.Rows[0]["GoodsName"].ToString();
                    lnqCheck.规格   = dt.Rows[0]["Spec"].ToString();
                    lnqCheck.批次号  = dt.Rows[0]["BatchNo"].ToString();
                    lnqCheck.仓库   = dt.Rows[0]["GoodsType"].ToString();
                    lnqCheck.到货日期 = (DateTime)dt.Rows[0]["Date"];
                    lnqCheck.订单号  = "";
                    lnqCheck.供货单位 = dt.Rows[0]["Provider"].ToString();
                    lnqCheck.物品ID = Convert.ToInt32(dt.Rows[0]["GoodsID"]);
                    lnqCheck.库房代码 = dt.Rows[0]["StorageID"].ToString();

                    return(lnqCheck);
                }
            }
            else
            {
                return((from a in dataContxt.View_S_CheckOutInDepotBill
                        where a.入库单号 == djh
                        select a).Single());
            }
        }
        private void 检验结果提交ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (lbDJZT.Text == "等待检验结果")
            {
                if (Convert.ToDecimal(txtDeclareCount.Text) !=
                    (decimal)NudQC_BF.Value
                    + (decimal)NudQC_HG.Value
                    + (decimal)NudQC_RB.Value
                    + (decimal)NudQC_TH.Value)
                {
                    MessageBox.Show("【合格数 + 让步数 + 退货数 + 报废数 = 挑返数】 请重新确认", "提示");
                    return;
                }

                View_S_CheckOutInDepotBill bill = m_serverCheckOutInDepot.GetBill(m_lnqReturn.InDepotBillID);
                DataForMessage();

                #region 发送知会消息

                List <string> noticeRoles = new List <string>();
                noticeRoles.Add(CE_RoleEnum.检验员.ToString());
                noticeRoles.Add(CE_RoleEnum.采购员.ToString());
                noticeRoles.Add(CE_RoleEnum.SQE组员.ToString());

                m_msgPromulgator.EndFlowMessage(dataGridView1.CurrentRow.Cells["单据号"].Value.ToString(),
                                                string.Format("{0} 号挑选返工返修单已经处理完毕",
                                                              dataGridView1.CurrentRow.Cells["单据号"].Value.ToString()),
                                                noticeRoles, null);

                StringBuilder sb = new StringBuilder();
                sb.AppendFormat("{0} 号报检入库单已经进行挑返, 等待仓库入库, ", txtBill_ID.Text);
                sb.AppendFormat("此单据涉及物品:(图号[{0}],名称[{1}],规格[{2}]", txtCode.Text, txtName.Text, txtSpec.Text);

                m_msgPromulgatorInDept.PassFlowMessage(m_lnqReturn.InDepotBillID, sb.ToString(),
                                                       m_msgPromulgator.GetRoleStringForStorage(bill.库房代码).ToString(), true);

                #endregion 发送知会消息
            }
            else
            {
                MessageBox.Show("请重新确认单据状态", "提示");
            }

            PositioningRecord(m_lnqReturn.DJH);
        }
        private void 处理结果ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (lbDJZT.Text == "等待审批确认")
            {
                DataForMessage();
                View_S_CheckOutInDepotBill bill = m_serverCheckOutInDepot.GetBill(m_lnqReturn.InDepotBillID);

                m_msgPromulgator.PassFlowMessage(m_lnqReturn.DJH,
                                                 string.Format("【入库单号】:{0} 【图号型号】:{1} 【物品名称】:{2} 【规格】:{3}【供货单位】:{4}【批次号】:{5}  ※※※ 等待【{6}】处理",
                                                               bill.入库单号, bill.图号型号, bill.物品名称, bill.规格, bill.供货单位, bill.批次号, CE_RoleEnum.检验员.ToString()),
                                                 CE_RoleEnum.检验员.ToString(), true);
            }
            else
            {
                MessageBox.Show("请重新确认单据状态", "提示");
            }

            PositioningRecord(m_lnqReturn.DJH);
        }
Exemplo n.º 5
0
        public 质量信息反馈单(string strDJH)
        {
            InitializeComponent();

            if (strDJH != "")
            {
                m_lnqMess = m_serverMess.GetData(strDJH);

                m_lnqViewCheck = m_serverMess.GetCheckInDepotBill(m_lnqMess.InDepotBillID);
            }
            else
            {
                m_blFlag           = true;
                txtDJH.Text        = "系统自动生成";
                txtName.Enabled    = true;
                txtBatchNo.Enabled = true;
                groupBox4.Text     = groupBox6.Text;
                groupBox6.Text     = "";
            }
        }
        private void 编制单据提交ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (lbDJZT.Text == "新建单据")
            {
                GetAllTheMaessage();

                if (m_lnqReturn.ReturnReason.ToString().Trim() == "" ||
                    m_lnqReturn.ReturnManHour.ToString().Trim() == "" ||
                    m_lnqReturn.ReturnMeansAndAsk.ToString().Trim() == "")
                {
                    MessageBox.Show("请完整填写挑返信息", "提示");
                    return;
                }

                if (m_serverCheckReturnRepair.SubmitBill(m_lnqReturn, out m_err))
                {
                    MessageBox.Show("提交成功!", "提示");

                    View_S_CheckOutInDepotBill bill = m_serverCheckOutInDepot.GetBill(m_lnqReturn.InDepotBillID);

                    m_msgPromulgator.PassFlowMessage(m_lnqReturn.DJH,
                                                     string.Format("【入库单号】:{0} 【图号型号】:{1} 【物品名称】:{2} 【规格】:{3}【供货单位】:{4}【批次号】:{5}  ※※※ 等待【{6}】处理",
                                                                   bill.入库单号, bill.图号型号, bill.物品名称, bill.规格, bill.供货单位, bill.批次号, CE_RoleEnum.采购员.ToString()),
                                                     CE_RoleEnum.采购员.ToString(), true);
                }
                else
                {
                    MessageDialog.ShowErrorMessage(m_err);
                }

                RefreshDataGirdView(m_serverCheckReturnRepair.GetAllBill(checkBillDateAndStatus1.cmbBillStatus.Text,
                                                                         checkBillDateAndStatus1.dtpStartTime.Value, checkBillDateAndStatus1.dtpEndTime.Value));
            }
            else
            {
                MessageBox.Show("请重新确认单据状态", "提示");
            }

            PositioningRecord(m_lnqReturn.DJH);
        }
Exemplo n.º 7
0
        void txtBatchNo_OnCompleteSearch()
        {
            if (txtName.Tag == null)
            {
                MessageDialog.ShowPromptMessage("请选择物品名称");
                return;
            }

            string strDJH = m_serverCheckOutInDepot.GetBillNo(
                Convert.ToInt32(txtName.Tag), txtBatchNo.Text);

            if (strDJH != "")
            {
                txtBatchNo.Text         = txtBatchNo.DataResult["批次号"].ToString();
                m_lnqMess.InDepotBillID = strDJH;
                m_lnqViewCheck          = m_serverMess.GetCheckInDepotBill(m_lnqMess.InDepotBillID);

                ShowAllMessage();
                ShowElesMessage();
            }

            txtDJZT.Text = "等待STA验证";
            txtDJH.Text  = m_serverMess.GetBillID();
        }
        private void dataGridView1_CellEnter(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridView1.RowCount == 0)
            {
                return;
            }

            #region 挑返单信息
            lbCJ.Text         = dataGridView1.CurrentRow.Cells["创建人"].Value.ToString();
            lbBZ.Text         = dataGridView1.CurrentRow.Cells["编制人"].Value.ToString();
            lbSH.Text         = dataGridView1.CurrentRow.Cells["审核人"].Value.ToString();
            lbCLJG.Text       = dataGridView1.CurrentRow.Cells["处理人"].Value.ToString();
            lbJYJG.Text       = dataGridView1.CurrentRow.Cells["检验人"].Value.ToString();
            NudQC_BF.Value    = (decimal)dataGridView1.CurrentRow.Cells["QC报废数"].Value;
            NudQC_HG.Value    = (decimal)dataGridView1.CurrentRow.Cells["QC合格数"].Value;
            NudQC_RB.Value    = (decimal)dataGridView1.CurrentRow.Cells["QC让步数"].Value;
            NudQC_TH.Value    = (decimal)dataGridView1.CurrentRow.Cells["QC退货数"].Value;
            NudSQE_BHG.Value  = (decimal)dataGridView1.CurrentRow.Cells["采购工程师不合格数"].Value;
            NudSQE_HG.Value   = (decimal)dataGridView1.CurrentRow.Cells["采购工程师合格数"].Value;
            NudSQE_TFGS.Value = (decimal)dataGridView1.CurrentRow.Cells["SQE工时"].Value;
            lbDJZT.Text       = dataGridView1.CurrentRow.Cells["单据状态"].Value.ToString();
            m_strDJH          = dataGridView1.CurrentRow.Cells["单据号"].Value.ToString();
            lbDJH.Text        = m_strDJH;

            m_drSQE["挑返原因"]    = dataGridView1.CurrentRow.Cells["挑返原因"].Value.ToString();
            m_drSQE["挑返方法及要求"] = dataGridView1.CurrentRow.Cells["挑返方法及要求"].Value.ToString();
            m_drSQE["挑返损耗及工时"] = dataGridView1.CurrentRow.Cells["挑返损耗及工时"].Value.ToString();
            #endregion

            #region 获取报检单信息

            View_S_CheckOutInDepotBill bill = m_serverCheckOutInDepot.GetBill(dataGridView1.CurrentRow.Cells["关联入库单号"].Value.ToString());

            if (bill == null)
            {
                return;
            }

            txtBill_ID.Text         = bill.入库单号;
            txtOrderFormNumber.Text = bill.订单号;
            txtBatchNo.Text         = bill.批次号;

            if (bill.供方批次号 != null)
            {
                txtProviderBatchNo.Text = bill.供方批次号;
            }
            else
            {
                txtProviderBatchNo.Text = "";
            }

            if (!GlobalObject.GeneralFunction.IsNullOrEmpty(bill.备注))
            {
                txtRemark.Text = bill.备注;
            }
            else
            {
                txtRemark.Text = "";
            }

            txtDeclareCount.Text = bill.报检数量.ToString();
            txtName.Text         = bill.物品名称;
            txtCode.Text         = bill.图号型号;
            txtCode.Tag          = bill.物品ID;
            txtSpec.Text         = bill.规格;
            lbdw.Text            = bill.单位;
            txtMaterialType.Text = bill.仓库;
            txtProvider.Text     = bill.供货单位;
            txtStorage.Text      = UniversalFunction.GetStorageName(bill.库房代码.ToString());

            #endregion
        }