示例#1
0
        /// <summary>
        /// 审核报损单
        /// </summary>
        /// <param name="send"></param>
        /// <param name="e"></param>
        private void UCReportedLossBillManager_VerifyEvent(object send, EventArgs e)
        {
            try
            {
                Dictionary <string, long> OrderIDDateDic = GetVerifyRecord();//获取需要核实的记录行
                if (LossIDValuelist.Count == 0 && gvLossBillList.SelectedRows.Count == 0)
                {
                    MessageBoxEx.Show("请选择符合审核条件的单据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                UCVerify UcVerify = new UCVerify();
                UcVerify.ShowDialog();
                if (UcVerify.DialogResult == DialogResult.OK)
                {
                    string Content = UcVerify.Content;
                    DataSources.EnumAuditStatus UcVerifyStatus = UcVerify.auditStatus;//获取审核状态

                    Dictionary <string, string> ShippingBillField = new Dictionary <string, string>();
                    if (UcVerifyStatus == DataSources.EnumAuditStatus.AUDIT)
                    {
                        //获取报损单状态(已审核)
                        ShippingBillField.Add("order_status", Convert.ToInt32(DataSources.EnumAuditStatus.AUDIT).ToString());
                        ShippingBillField.Add("order_status_name", DataSources.GetDescription(DataSources.EnumAuditStatus.AUDIT, true));
                    }
                    else if (UcVerifyStatus == DataSources.EnumAuditStatus.NOTAUDIT)
                    {
                        //获取报损单状态(审核不通过)
                        ShippingBillField.Add("order_status", Convert.ToInt32(DataSources.EnumAuditStatus.NOTAUDIT).ToString());
                        ShippingBillField.Add("order_status_name", DataSources.GetDescription(DataSources.EnumAuditStatus.NOTAUDIT, true));
                    }
                    bool flag = DBHelper.BatchUpdateDataByIn(LossVerifyLogMsg, LossTable, ShippingBillField, StockLossID, LossIDValuelist.ToArray());//批量审核获取的报损单记录
                    if (flag)
                    {
                        if (UcVerifyStatus == DataSources.EnumAuditStatus.AUDIT)
                        {
                            CommonFuncCall.StatisticStock(GetLossPart(OrderIDDateDic), "报损单配件表");//同步更新报损单账面库存
                        }
                        MessageBoxEx.Show("审核成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        long   StartDate    = Common.LocalDateTimeToUtcLong(Convert.ToDateTime(DateTime.Now.AddMonths(-6).ToShortDateString())); //获取当前日期的半年前的日期
                        long   EndDate      = Common.LocalDateTimeToUtcLong(Convert.ToDateTime(DateTime.Now.ToShortDateString()));               //获取当前日期
                        string DefaultWhere = " enable_flag=1  and LsBillTb.order_date between  " + StartDate + " and " + EndDate;               //默认查询条件
                        GetRepLossBillList(DefaultWhere);                                                                                        //刷新报损单列表
                    }
                    else
                    {
                        MessageBoxEx.Show("审核失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }
        }
示例#2
0
        /// <summary>
        /// 审核操作
        /// </summary>
        /// <param name="send"></param>
        /// <param name="e"></param>
        private void UCAllocationBillManager_VerifyEvent(object send, EventArgs e)
        {
            try
            {
                Dictionary <string, long> OrderIDDateDic = GetVerifyRecord();//获取需要核实的记录行
                if (InoutIDValuelist.Count == 0)
                {
                    MessageBoxEx.Show("请选择符合审核条件的单据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                UCVerify UcVerify = new UCVerify();
                UcVerify.ShowDialog();
                string Content = UcVerify.Content;
                DataSources.EnumAuditStatus UcVerifyStatus = UcVerify.auditStatus;//获取审核状态

                Dictionary <string, string> AllocBillField = new Dictionary <string, string>();
                if (UcVerifyStatus == DataSources.EnumAuditStatus.AUDIT)
                {
                    //获取出入库单状态(已审核)
                    AllocBillField.Add("order_status", Convert.ToInt32(DataSources.EnumAuditStatus.AUDIT).ToString());
                    AllocBillField.Add("order_status_name", DataSources.GetDescription(DataSources.EnumAuditStatus.AUDIT, true));
                }
                else if (UcVerifyStatus == DataSources.EnumAuditStatus.NOTAUDIT)
                {
                    //获取出入库单状态(审核不通过)
                    AllocBillField.Add("order_status", Convert.ToInt32(DataSources.EnumAuditStatus.NOTAUDIT).ToString());
                    AllocBillField.Add("order_status_name", DataSources.GetDescription(DataSources.EnumAuditStatus.NOTAUDIT, true));
                }
                bool flag = DBHelper.BatchUpdateDataByIn(InOutVerifyLogMsg, InOutTable, AllocBillField, InOutID, InoutIDValuelist.ToArray());//批量审核获取的出入库单记录
                if (flag)
                {
                    CommonFuncCall.StatisticStock(GetInoutPart(OrderIDDateDic), "出入库单配件表");                                                                 //同步更新实际库存
                    MessageBoxEx.Show("审核成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    long   StartDate    = Common.LocalDateTimeToUtcLong(Convert.ToDateTime(DateTime.Now.AddMonths(-6).ToShortDateString()));                //获取当前日期的半年前的日期
                    long   EndDate      = Common.LocalDateTimeToUtcLong(Convert.ToDateTime(DateTime.Now.ToShortDateString()));                              //获取当前日期
                    string DefaultWhere = " enable_flag=1 and order_status_name='已审核通过' and IOBillTb.order_date between  " + StartDate + " and " + EndDate; //默认查询条件
                    GetInOutBillList(DefaultWhere);                                                                                                         //刷新出入库单列表
                }
                else
                {
                    MessageBoxEx.Show("审核失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }
        }
示例#3
0
        /// <summary>
        /// 审核操作
        /// </summary>
        /// <param name="send"></param>
        /// <param name="e"></param>
        private void UCAllocationBillManager_VerifyEvent(object send, EventArgs e)
        {
            try
            {
                Dictionary <string, long> OrderIDDateDic = GetVerifyRecord();//获取需要核实的记录行
                if (InoutIDValuelist.Count == 0)
                {
                    MessageBoxEx.Show("请选择符合审核条件的单据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                UCVerify UcVerify = new UCVerify();
                UcVerify.ShowDialog();
                string Content = UcVerify.Content;
                DataSources.EnumAuditStatus UcVerifyStatus = UcVerify.auditStatus;//获取审核状态

                Dictionary <string, string> AllocBillField = new Dictionary <string, string>();
                if (UcVerifyStatus == DataSources.EnumAuditStatus.AUDIT)
                {
                    //获取出入库单状态(已审核)
                    AllocBillField.Add("order_status", Convert.ToInt32(DataSources.EnumAuditStatus.AUDIT).ToString());
                    AllocBillField.Add("order_status_name", DataSources.GetDescription(DataSources.EnumAuditStatus.AUDIT, true));
                }
                else if (UcVerifyStatus == DataSources.EnumAuditStatus.NOTAUDIT)
                {
                    //获取出入库单状态(审核不通过)
                    AllocBillField.Add("order_status", Convert.ToInt32(DataSources.EnumAuditStatus.NOTAUDIT).ToString());
                    AllocBillField.Add("order_status_name", DataSources.GetDescription(DataSources.EnumAuditStatus.NOTAUDIT, true));
                }
                bool flag = DBHelper.BatchUpdateDataByIn(InOutVerifyLogMsg, InOutTable, AllocBillField, InOutID, InoutIDValuelist.ToArray());//批量审核获取的出入库单记录
                if (flag)
                {
                    CommonFuncCall.StatisticStock(OrderIDDateDic, InOutID, PartCount, InOutPartTable);//同步更新实际库存
                    MessageBoxEx.Show("审核成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    string QueryWhere = " order_status_name='已审核通过' ";
                    GetInOutBillList(QueryWhere);//刷新出入库单列表
                }
                else
                {
                    MessageBoxEx.Show("审核失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }
        }
示例#4
0
        void UCFMaterialReturnView_VerifyEvent(object sender, EventArgs e)
        {
            //if (MessageBoxEx.Show("确认要审核吗?", "提示", MessageBoxButtons.OKCancel) != DialogResult.OK)
            //{
            //    return;
            //}
            Dictionary <string, long> OrderIDDateDic = new Dictionary <string, long>();//获取需要核实的记录行

            verify = new UCVerify();
            if (verify.ShowDialog() == DialogResult.OK)
            {
                List <SQLObj> listSql = new List <SQLObj>();
                SQLObj        obj     = new SQLObj();
                obj.cmdType = CommandType.Text;
                Dictionary <string, ParamObj> dicParam = new Dictionary <string, ParamObj>();
                dicParam.Add("refund_id", new ParamObj("refund_id", strReturnId, SysDbType.VarChar, 40));                                                                          //单据ID
                dicParam.Add("info_status", new ParamObj("info_status", verify.auditStatus, SysDbType.VarChar, 40));                                                               //单据状态
                dicParam.Add("Verify_advice", new ParamObj("Verify_advice", verify.Content, SysDbType.VarChar, 200));                                                              //审核意见
                dicParam.Add("update_by", new ParamObj("update_by", HXCPcClient.GlobalStaticObj.UserID, SysDbType.VarChar, 40));                                                   //修改人Id
                dicParam.Add("update_name", new ParamObj("update_name", HXCPcClient.GlobalStaticObj.UserName, SysDbType.VarChar, 40));                                             //修改人姓名
                dicParam.Add("update_time", new ParamObj("update_time", Common.LocalDateTimeToUtcLong(HXCPcClient.GlobalStaticObj.CurrentDateTime).ToString(), SysDbType.BigInt)); //修改时间
                obj.sqlString = "update tb_maintain_refund_material set info_status=@info_status,Verify_advice=@Verify_advice,update_by=@update_by,update_name=@update_name,update_time=@update_time where refund_id=@refund_id";
                obj.Param     = dicParam;
                listSql.Add(obj);
                long OrdeDate = (long)Convert.ToInt64(strFetchTime);
                OrderIDDateDic.Add(strReturnId, OrdeDate);//添加已审核单据主键ID和单据日期键值对
                if (DBHelper.BatchExeSQLMultiByTrans("更新单据状态为审核", listSql))
                {
                    string strMsg = string.Empty;
                    if (verify.auditStatus == DataSources.EnumAuditStatus.AUDIT)
                    {
                        strMsg = "成功";
                        CommonFuncCall.StatisticStock(GetInoutPart(OrderIDDateDic), "领料退货单明细数据表");//同步更新实际库存
                    }
                    else
                    {
                        strMsg = "不通过";
                    }
                    MessageBoxEx.Show("审核" + strMsg + "!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    uc.BindPageData();
                    deleteMenuByTag(this.Tag.ToString(), uc.Name);
                }
            }
        }
示例#5
0
        void UCFetchMaterialManager_VerifyEvent(object sender, EventArgs e)
        {
            List <string> listField = new List <string>();

            foreach (DataGridViewRow dr in dgvRData.Rows)
            {
                object isCheck = dr.Cells["colCheck"].EditedFormattedValue;
                if (isCheck != null && (bool)isCheck)
                {
                    listField.Add(dr.Cells["fetch_id"].Value.ToString());
                }
            }
            if (listField.Count <= 0)
            {
                MessageBoxEx.Show("请选择需要审核的记录!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (MessageBoxEx.Show("确认要审核吗?", "提示", MessageBoxButtons.OKCancel) != DialogResult.OK)
            {
                return;
            }
            Dictionary <string, long> OrderIDDateDic = new Dictionary <string, long>();//获取需要核实的记录行

            verify = new UCVerify();
            if (verify.ShowDialog() == DialogResult.OK)
            {
                List <SQLObj> listSql = new List <SQLObj>();
                foreach (DataGridViewRow dr in dgvRData.Rows)
                {
                    object isCheck = dr.Cells["colCheck"].EditedFormattedValue;
                    if (isCheck != null && (bool)isCheck)
                    {
                        SQLObj obj = new SQLObj();
                        obj.cmdType = CommandType.Text;
                        Dictionary <string, ParamObj> dicParam = new Dictionary <string, ParamObj>();
                        dicParam.Add("fetch_id", new ParamObj("fetch_id", dr.Cells["fetch_id"].Value, SysDbType.VarChar, 40));                                                             //单据ID
                        dicParam.Add("info_status", new ParamObj("info_status", verify.auditStatus, SysDbType.VarChar, 40));                                                               //单据状态
                        dicParam.Add("Verify_advice", new ParamObj("Verify_advice", verify.Content, SysDbType.VarChar, 200));                                                              //审核意见
                        dicParam.Add("update_by", new ParamObj("update_by", HXCPcClient.GlobalStaticObj.UserID, SysDbType.VarChar, 40));                                                   //修改人Id
                        dicParam.Add("update_name", new ParamObj("update_name", HXCPcClient.GlobalStaticObj.UserName, SysDbType.VarChar, 40));                                             //修改人姓名
                        dicParam.Add("update_time", new ParamObj("update_time", Common.LocalDateTimeToUtcLong(HXCPcClient.GlobalStaticObj.CurrentDateTime).ToString(), SysDbType.BigInt)); //修改时间
                        obj.sqlString = "update tb_maintain_fetch_material set info_status=@info_status,Verify_advice=@Verify_advice,update_by=@update_by,update_name=@update_name,update_time=@update_time where fetch_id=@fetch_id";
                        obj.Param     = dicParam;
                        listSql.Add(obj);
                        long OrdeDate = (long)dr.Cells["fetch_time"].Value;
                        OrderIDDateDic.Add(dr.Cells["fetch_id"].Value.ToString(), OrdeDate);//添加已审核单据主键ID和单据日期键值对
                    }
                }

                if (DBHelper.BatchExeSQLMultiByTrans("更新单据状态为审核", listSql))
                {
                    string strMsg = string.Empty;
                    if (verify.auditStatus == DataSources.EnumAuditStatus.AUDIT)
                    {
                        strMsg = "成功";
                        CommonFuncCall.StatisticStock(GetInoutPart(OrderIDDateDic), "领料单明细数据表");//同步更新实际库存
                    }
                    else
                    {
                        strMsg = "不通过";
                    }
                    MessageBoxEx.Show("审核" + strMsg + "!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    BindPageData();
                }
            }
        }