Exemple #1
0
        //完成
        private void btnComplete_Click(object sender, EventArgs e)
        {
            if (CurrentBackboundStatus != Status_Record)
            {
                return;
            }

            InitUI_Complete();
            returnDetailView.SetGridEditStatus(false);
            CurrentBackboundStatus = Status_None;
            MissionAssign missionAssign = new MissionAssign();

            missionAssign.BackboundComplete(txtBackboundNo.Text);

            if (newBackBound != null)
            {
                returnMasterView.InsertBackbound(0, newBackBound);

                masterView.FocusedRowHandle = 0;

                newBackBound = null;

                this.Refresh();

                PrintRecord();
            }
        }
Exemple #2
0
        //下一步
        private void btnNext_Click(object sender, EventArgs e)
        {
            if (CurrentBackboundStatus == Status_Record)
            {
                return;
            }
            if (CanNext() == false)
            {
                return;
            }

            if (CurrentBackboundStatus == Status_Property)
            {
                InitUI_Detail();
                CurrentBackboundStatus = Status_Detail;
                return;
            }

            if (CurrentBackboundStatus == Status_Detail)
            {
                WaitingService.BeginLoading("正在分解入库明细,请稍等......");
                Cursor.Current = Cursors.WaitCursor;

                //保存明细
                SaveBackbound();

                MissionAssign missionAssign = new MissionAssign();

                //分解
                missionAssign.BackboundAssign(txtBackboundNo.Text);

                //加载明细
                returnRecordView.LoadRecord(txtBackboundNo.Text);

                InitUI_Record();

                CurrentBackboundStatus = Status_Record;

                Cursor.Current = Cursors.Default;

                WaitingService.EndLoading();
                return;
            }
        }
Exemple #3
0
        private void btnComplete_Click(object sender, EventArgs e)
        {
            //填写倒库单
            if (CurrentTranboundStatus == Status_Detail)
            {
                if (HasValitDetail() == false)
                {
                    MsgBox.Error("请填写倒库明细!");
                    return;
                }

                bool bres = SaveTranbond();


                FrmSelectOperator dlg = new FrmSelectOperator();

                if (dlg.ShowDialog() != DialogResult.Cancel)
                {
                    //修改操作人
                    UpdateOperator(NewTranboundID, dlg.OperatorName);
                    tranboundView.SetFocusedRowCellValue("Operator", dlg.OperatorName);
                }

                //分解
                MissionAssign missionAssign = new MissionAssign();
                missionAssign.TranboundAssign(NewTranboundID);

                InitUI_Complete();
                CurrentTranboundStatus         = Status_None;
                tranboundView.FocusedRowHandle = 0;

                LoadTranboundDetail(NewTranboundID);

                this.Refresh();

                PrintDetail();

                return;
            }
        }
Exemple #4
0
        private void mnuMasterDelete_Click(object sender, EventArgs e)
        {
            string inboundID = inboundView.GetFocusedRowCellValue("InboundID").ToString();

            if (string.IsNullOrEmpty(inboundID))
            {
                MsgBox.Error("请先选择要删除的入库单!");
                return;
            }

            if (MsgBox.Confirm("您确定要完成选中的入库单?(删除后将恢复库存)") == false)
            {
                return;
            }

            Object obj = inboundView.GetFocusedRowCellValue("Status").ToString();

            if (obj != null && obj.ToString() == DealStatus.PreInput)
            {
                //删除虚拟入库
                MissionAssign missionAssign = new MissionAssign();
                missionAssign.DeleteVirtualInbound(inboundID);
            }
            else if (CancelInbound(inboundID) == false)
            {
                //删除真实入库
                MsgBox.Error("删除入库单失败!");
                return;
            }

            inboundView.DeleteRow(inboundView.FocusedRowHandle);

            SwitchInbound();

            FrmTip.ShowTip("删除入库单成功!");
        }
Exemple #5
0
        //下一步
        private void btnNext_Click(object sender, EventArgs e)
        {
            if (CurrentInboundStatus == Status_Record)
            {
                return;
            }
            if (CanNext() == false)
            {
                return;
            }

            if (CurrentInboundStatus == Status_Property)
            {
                InitUI_Detail(cbVirtual.Checked);
                CurrentInboundStatus = Status_Detail;
                AppEditStatus.InboundCurrentStatus = CurrentInboundStatus;
                return;
            }

            if (CurrentInboundStatus == Status_Detail)
            {
                //真实入库 或者 虚拟转真实
                if (cbVirtual.Checked == false || bVirtualToActual == true)
                {
                    FrmSetShelfSize dlg = new FrmSetShelfSize();
                    if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        MemoryTable.Instance.ShelfCapacity = dlg.ShelfCapacity;
                    }
                }

                WaitingService.BeginLoading("正在分解入库明细,请稍等......");
                //Cursor.Current = Cursors.WaitCursor;

                //保存明细
                SaveInbound();

                //2017-05-29客户要求随时更改入库明细并,保存新的虚拟入库。
                //首先删除原来的虚拟入库
                DeleteVirtualInvenotry(txtInboundNo.Text);

                MissionAssign missionAssign = new MissionAssign();

                //重新虚拟入库
                missionAssign.VirtualInboundAssign(txtInboundNo.Text);

                //真实入库、虚拟转真实都要分解
                //分解
                missionAssign.InboundAssign(txtInboundNo.Text);

                UpdateOperator(txtInboundNo.Text, txtDealWorker.Text);
                //加载明细
                inboundRecordView.LoadInboundRecord(txtInboundNo.Text);

                InitUI_Record();

                if (bVirtualToActual == true)
                {
                    inboundView.SetFocusedRowCellValue("Status", DealStatus.Inbound);
                }

                CurrentInboundStatus = Status_Record;
                //Cursor.Current = Cursors.Default;
                AppEditStatus.InboundCurrentStatus = CurrentInboundStatus;

                WaitingService.EndLoading();

                return;
            }
        }
Exemple #6
0
        //完成
        private void btnComplete_Click(object sender, EventArgs e)
        {
            #region 真实入库完成任务分解

            if (CurrentInboundStatus == Status_Record)
            {
                InitUI_Complete();

                AppEditStatus.InboundCurrentStatus = Status_Complete;

                CurrentInboundStatus = Status_None;
                MissionAssign missionAssign = new MissionAssign();
                missionAssign.InboundComplete(txtInboundNo.Text);

                if (newInbound != null)
                {
                    inboundMasterView.InsertInbound(0, newInbound);

                    inboundView.FocusedRowHandle = 0;

                    newInbound = null;

                    this.Refresh();

                    PrintGrid(recordGrid);
                }
                else
                {
                    //虚拟转真实
                    FocusedMasterRow(inboundView.FocusedRowHandle);
                    inboundView.SetFocusedRowCellValue("Status", DealStatus.Inbound);
                    this.Refresh();
                    PrintGrid(recordGrid);
                }
                return;
            }

            #endregion

            #region 虚拟入库,将入库明细分配到88T88

            if (CurrentInboundStatus == Status_Detail && cbVirtual.Checked == true)
            { //虚拟入库
                //保存明细
                SaveInbound();
                MissionAssign missionAssign = new MissionAssign();

                missionAssign.VirtualInboundAssign(txtInboundNo.Text);
                UpdateOperator(txtInboundNo.Text, txtDealWorker.Text);

                InitUI_Complete();

                AppEditStatus.InboundCurrentStatus = Status_Complete;

                CurrentInboundStatus = Status_None;

                if (newInbound != null)
                {
                    inboundMasterView.InsertInbound(0, newInbound);

                    inboundView.FocusedRowHandle = 0;

                    newInbound = null;

                    this.Refresh();
                }
                return;
            }
            #endregion
        }