コード例 #1
0
ファイル: UCQuickPick.cs プロジェクト: Novthirteen/sih-les
        protected override void ScanBarCode()
        {
            base.ScanBarCode();
            if (this.pickListMaster == null)
            {
                if (base.op == CodeMaster.BarCodeType.PIK.ToString())
                {
                    var pickListMaster = smartDeviceService.GetPickList(this.barCode, true);

                    if (pickListMaster == null || pickListMaster.PickListDetails == null)
                    {
                        throw new BusinessException("此拣货单没有明细");
                    }
                    if (pickListMaster.Status == PickListStatus.Cancel)
                    {
                        throw new BusinessException("此拣货单已经取消,不能拣货");
                    }
                    if (pickListMaster.Status == PickListStatus.Close)
                    {
                        throw new BusinessException("此拣货单已经关闭,不能拣货");
                    }
                    if (pickListMaster.Status == PickListStatus.Submit)
                    {
                        this.smartDeviceService.StartPickList(pickListMaster.PickListNo, this.user.Code);
                    }
                    //检查权限
                    if (!Utility.HasPermission(pickListMaster, this.user))
                    {
                        throw new BusinessException("没有此拣货单的权限");
                    }
                    foreach (var pickListDetail in pickListMaster.PickListDetails)
                    {
                        pickListDetail.CurrentQty = pickListDetail.Qty;
                    }
                    this.lblMessage.Text = "请扫描待拣的条码";
                    this.pickListMaster = pickListMaster;
                    this.gvListDataBind();
                }
                else
                {
                    throw new BusinessException("请先扫描拣货单。");
                }
            }
            else
            {
                if (base.op == CodeMaster.BarCodeType.HU.ToString())
                {
                    if (this.pickListMaster == null || this.pickListMaster.PickListDetails == null)
                    {
                        throw new BusinessException("请先扫描拣货单");
                    }
                    Hu hu = smartDeviceService.GetHu(barCode);
                    this.MatchHu(hu);
                }
                else
                {
                    throw new BusinessException("条码格式不合法");
                }
            }
        }
コード例 #2
0
ファイル: UCPickList.cs プロジェクト: zhsh1241/Sconit5_Shenya
 protected override void Reset()
 {
     this.pickListMaster = null;
     base.Reset();
     this.lblMessage.Text = "请扫描拣货单";
     this.tbBarCode.Focus();
 }
コード例 #3
0
ファイル: Utility.cs プロジェクト: Novthirteen/sih-les
 public static bool HasPermission(PickListMaster pickListMaster, User user)
 {
     return HasPermission(user.Permissions, pickListMaster.OrderType, pickListMaster.IsCheckPartyFromAuthority, pickListMaster.IsCheckPartyToAuthority, pickListMaster.PartyFrom, pickListMaster.PartyTo);
 }
コード例 #4
0
        private void Reset()
        {
            this.pickListMaster = null;
            this.lblPartyFrom.Text = string.Empty;
            this.lblPartyTo.Text = string.Empty;
            this.lblStartTime.Text = string.Empty;
            this.lblWindowTime.Text = string.Empty;
            this.lblEffectTime.Text = string.Empty;

            this.tbBarCode.Text = string.Empty;
            this.lblMessage.Text = "请扫描拣货单";
            this.tbBarCode.Focus();
            this.keyCodeDiff = Utility.GetKeyCodeDiff();
        }
コード例 #5
0
        private void ScanBarCode()
        {
            string barCode = this.tbBarCode.Text.Trim();
            this.tbBarCode.Focus();
            this.tbBarCode.Text = string.Empty;
            string op = Utility.GetBarCodeType(this.user.BarCodeTypes, barCode);
            if (barCode.Length < 3)
            {
                throw new BusinessException("条码格式不合法");
            }
            if (op == CodeMaster.BarCodeType.PIK.ToString())
            {
                PickListMaster pickListMaster = this.smartDeviceService.GetPickList(barCode, false);

                if (!Utility.HasPermission(pickListMaster, user))
                {
                    throw new BusinessException("没有操作此拣货单{0}的权限", pickListMaster.PickListNo);
                }

                this.pickListMaster = pickListMaster;
                this.lblPartyFrom.Text = pickListMaster.PartyFrom;
                this.lblPartyTo.Text = pickListMaster.PartyTo;
                this.lblStartTime.Text = pickListMaster.StartTime.ToString("yyyy-MM-dd HH:mm");
                this.lblWindowTime.Text = pickListMaster.WindowTime.ToString("yyyy-MM-dd HH:mm");
                this.lblEffectTime.Text = pickListMaster.EffectiveDate.ToString("yyyy-MM-dd HH:mm");
                this.lblMessage.Text = "请确定上线";
            }
            else
            {
                throw new BusinessException("条码格式不合法");
            }
        }
コード例 #6
0
ファイル: UCPickListShip.cs プロジェクト: druidwang/Les_parts
        private void ScanBarCode()
        {
            string barCode = this.tbBarCode.Text.Trim();
            this.tbBarCode.Text = string.Empty;
            string op = Utility.GetBarCodeType(this.user.BarCodeTypes, barCode);
            if (barCode == string.Empty)
            {
                this.btnOrder.Focus();
            }
            else if (barCode.Length < 3)
            {
                throw new BusinessException("条码格式不合法");
            }
            else if (op == CodeMaster.BarCodeType.PIK.ToString())
            {
                PickListMaster pickListMaster = this.smartDeviceService.GetPickList(barCode, false);

                if (pickListMaster.Status != PickListStatus.InProcess)
                {
                    throw new BusinessException("拣货单不是执行中状态,不可以发货。");
                }
                if (!Utility.HasPermission(pickListMaster, user))
                {
                    throw new BusinessException("没有操作此拣货单{0}的权限", pickListMaster.PickListNo);
                }
                if (!this.user.Permissions.Where(t => t.PermissionCategoryType == PermissionCategoryType.Region)
                        .Select(t => t.PermissionCode).Contains(pickListMaster.PartyFrom))
                {
                    throw new BusinessException("没有此区域权限不能发货。");
                }

                this.pickListMaster = pickListMaster;
                this.lblPartyFrom.Text = pickListMaster.PartyFrom;
                this.lblPartyTo.Text = pickListMaster.PartyTo;
                this.lblStartTime.Text = pickListMaster.StartTime.ToString("yyyy-MM-dd HH:mm");
                this.lblWindowTime.Text = pickListMaster.WindowTime.ToString("yyyy-MM-dd HH:mm");
                this.lblEffectTime.Text = pickListMaster.EffectiveDate.ToString("yyyy-MM-dd HH:mm");
                this.lblMessage.Text = "请点击发货按钮发货";
            }
            else
            {
                throw new BusinessException("条码格式不合法");
            }
        }
コード例 #7
0
ファイル: UCPickListShip.cs プロジェクト: Novthirteen/sih-les
        private void Reset()
        {
            this.pickListMaster = null;
            this.lblPartyFrom.Text = string.Empty;
            this.lblPartyTo.Text = string.Empty;
            this.lblStartTime.Text = string.Empty;
            this.lblWindowTime.Text = string.Empty;
            this.lblEffectTime.Text = string.Empty;

            this.tbBarCode.Text = string.Empty;
            this.lblMessage.Text = string.Empty;
            //this.tbBarCode.Focus();
        }