示例#1
0
        public ActionResult Edit()
        {
            Session[CacheKey.TEMPDATA_CACHE_INSTORDETAIL] = null;
            string orderNum = WebUtil.GetQueryStringValue <string>("orderNum", string.Empty);
            Bill <InStorageEntity, InStorDetailEntity> bill = new InStorageOrder();
            InStorageEntity entity = new InStorageEntity();

            entity.OrderNum     = orderNum;
            entity              = bill.GetOrder(entity);
            entity              = entity == null ? new InStorageEntity() : entity;
            entity.InTypeLable  = EnumHelper.GetEnumDesc <EInType>(entity.InType);
            entity.StatusLable  = EnumHelper.GetEnumDesc <EAudite>(entity.Status);
            ViewBag.InStorage   = entity;
            ViewBag.InType      = EnumHelper.GetOptions <EInType>(entity.InType, "请选择入库单类型");
            ViewBag.ProductType = EnumHelper.GetOptions <EProductType>(entity.Status, "请选择入库产品类型");

            InStorDetailEntity detail = new InStorDetailEntity();

            detail.OrderNum = orderNum;
            List <InStorDetailEntity> list = bill.GetOrderDetail(detail);

            list = list == null ? new List <InStorDetailEntity>() : list;
            if (list.IsNullOrEmpty() == false)
            {
                foreach (InStorDetailEntity item in list)
                {
                    item.Size       = item.Size.IsEmpty() ? "" : item.Size;
                    item.Amount     = item.Amount == 0 ? item.InPrice * item.Num : item.Amount;
                    item.TotalPrice = item.Amount;
                }
                Session[CacheKey.TEMPDATA_CACHE_INSTORDETAIL] = list;
            }
            ViewBag.Detail = list;
            return(View());
        }
示例#2
0
        /// <summary>
        /// 根据订单唯一编号查询入库单详细
        /// </summary>
        /// <returns></returns>
        public ActionResult GetDetail()
        {
            string             SnNum     = WebUtil.GetFormValue <string>("SnNum");
            string             CompanyID = WebUtil.GetFormValue <string>("CompanyID", string.Empty);
            InStorDetailEntity entity    = new InStorDetailEntity();

            entity.OrderSnNum = SnNum;
            entity.CompanyID  = CompanyID;
            Bill <InStorageEntity, InStorDetailEntity> bill = new InStorageOrder(CompanyID);
            List <InStorDetailEntity> list = bill.GetOrderDetail(entity);

            DataResult <List <InStorDetailEntity> > dataResult = new DataResult <List <InStorDetailEntity> >();

            dataResult.Code    = (int)EResponseCode.Success;
            dataResult.Message = "响应成功";
            dataResult.Result  = list;
            return(Content(JsonHelper.SerializeObject(dataResult)));
        }
示例#3
0
        public ActionResult Detail()
        {
            string orderNum = WebUtil.GetQueryStringValue<string>("orderNum",string.Empty);
            string flag = WebUtil.GetQueryStringValue<string>("flag", "1");
            Bill<InStorageEntity, InStorDetailEntity> bill = new InStorageOrder();
            InStorageEntity entity = new InStorageEntity();
            entity.OrderNum = orderNum;
            entity = bill.GetOrder(entity);
            entity=entity==null ? new InStorageEntity(): entity;
            entity.InTypeLable = EnumHelper.GetEnumDesc<EInType>(entity.InType);
            entity.StatusLable = EnumHelper.GetEnumDesc<EAudite>(entity.Status);
            ViewBag.InStorage=entity;
            ViewBag.Flag = flag;

            InStorDetailEntity detail=new InStorDetailEntity();
            detail.OrderNum=orderNum;
            List<InStorDetailEntity> list=bill.GetOrderDetail(detail);
            list = list == null ? new List<InStorDetailEntity>() : list;
            ViewBag.Detail = list;
            return View();
        }
示例#4
0
        public ActionResult Detail()
        {
            string orderNum = WebUtil.GetQueryStringValue <string>("orderNum", string.Empty);
            string flag     = WebUtil.GetQueryStringValue <string>("flag", "1");
            Bill <InStorageEntity, InStorDetailEntity> bill = new InStorageOrder();
            InStorageEntity entity = new InStorageEntity();

            entity.OrderNum    = orderNum;
            entity             = bill.GetOrder(entity);
            entity             = entity == null ? new InStorageEntity(): entity;
            entity.InTypeLable = EnumHelper.GetEnumDesc <EInType>(entity.InType);
            entity.StatusLable = EnumHelper.GetEnumDesc <EAudite>(entity.Status);
            ViewBag.InStorage  = entity;
            ViewBag.Flag       = flag;

            InStorDetailEntity detail = new InStorDetailEntity();

            detail.OrderNum = orderNum;
            List <InStorDetailEntity> list = bill.GetOrderDetail(detail);

            list           = list == null ? new List <InStorDetailEntity>() : list;
            ViewBag.Detail = list;
            return(View());
        }
示例#5
0
        public ActionResult Edit()
        {
            Session[CacheKey.TEMPDATA_CACHE_INSTORDETAIL] = null;
            string orderNum = WebUtil.GetQueryStringValue<string>("orderNum", string.Empty);
            Bill<InStorageEntity, InStorDetailEntity> bill = new InStorageOrder();
            InStorageEntity entity = new InStorageEntity();
            entity.OrderNum = orderNum;
            entity = bill.GetOrder(entity);
            entity = entity == null ? new InStorageEntity() : entity;
            entity.InTypeLable = EnumHelper.GetEnumDesc<EInType>(entity.InType);
            entity.StatusLable = EnumHelper.GetEnumDesc<EAudite>(entity.Status);
            ViewBag.InStorage = entity;
            ViewBag.InType = EnumHelper.GetOptions<EInType>(entity.InType, "请选择入库单类型");
            ViewBag.ProductType = EnumHelper.GetOptions<EProductType>(entity.Status, "请选择入库产品类型");

            InStorDetailEntity detail = new InStorDetailEntity();
            detail.OrderNum = orderNum;
            List<InStorDetailEntity> list = bill.GetOrderDetail(detail);
            list = list == null ? new List<InStorDetailEntity>() : list;
            if (list.IsNullOrEmpty() == false)
            {
                foreach (InStorDetailEntity item in list)
                {
                    item.Size = item.Size.IsEmpty() ? "" : item.Size;
                    item.Amount = item.Amount == 0 ? item.InPrice * item.Num : item.Amount;
                    item.TotalPrice = item.Amount;
                }
                Session[CacheKey.TEMPDATA_CACHE_INSTORDETAIL] = list;
            }
            ViewBag.Detail = list;
            return View();
        }