public ActionResult GetCheckDif()
        {
            string   OrderNum  = WebUtil.GetFormValue <string>("OrderNum", string.Empty);
            int      pageIndex = WebUtil.GetFormValue <int>("PageIndex", 1);
            int      pageSize  = WebUtil.GetFormValue <int>("PageSize", 10);
            PageInfo pageInfo  = new PageInfo()
            {
                PageIndex = pageIndex, PageSize = pageSize
            };
            CheckDataProvider      provider   = new CheckDataProvider();
            List <CheckDataEntity> listResult = provider.GetCheckDifList(OrderNum, ref pageInfo);

            listResult = listResult == null ? new List <CheckDataEntity>() : listResult;
            System.Threading.Tasks.Parallel.ForEach(listResult, item =>
            {
                item.LocalQty  = ConvertHelper.ToType <double>(item.LocalQty.ToString());
                item.FirstQty  = ConvertHelper.ToType <double>(item.FirstQty.ToString());
                item.DifQty    = ConvertHelper.ToType <double>((item.FirstQty - item.LocalQty).ToString());
                item.LocalName = LocalHelper.GetLocalNumList(this.DefaultStore, item.LocalNum);
            });
            string json = ConvertJson.ListToJson <CheckDataEntity>(listResult, "List");

            this.ReturnJson.AddProperty("Data", json);
            this.ReturnJson.AddProperty("RowCount", pageInfo.PageCount);
            return(Content(this.ReturnJson.ToString()));
        }
예제 #2
0
        public ActionResult Detail(string snNum)
        {
            ProductEntity entity = null;

            if (!snNum.IsEmpty())
            {
                ProductProvider provider = new ProductProvider();
                entity           = provider.GetProductBySn(snNum);
                ViewBag.Category = BaseHelper.GetProductCategory(entity.CateNum);
                ViewBag.Storage  = LocalHelper.GetStorageNumList(entity.StorageNum);
                ViewBag.Local    = LocalHelper.GetLocalNumList(entity.StorageNum, entity.DefaultLocal);
                ViewBag.Customer = BaseHelper.GetCustomerList(entity.CusNum);
                ViewBag.Goods    = entity;
                ViewBag.Unit     = BaseHelper.GetMeasureNameList(entity.UnitNum);
            }
            else
            {
                ViewBag.Goods    = new ProductEntity();
                ViewBag.Category = BaseHelper.GetProductCategory(string.Empty);
                ViewBag.Storage  = LocalHelper.GetStorageNumList(string.Empty);
                ViewBag.Local    = LocalHelper.GetLocalNumList(string.Empty, string.Empty);
                ViewBag.Customer = BaseHelper.GetCustomerList(string.Empty);
                ViewBag.Unit     = BaseHelper.GetMeasureNameList(string.Empty);
            }
            return(View());
        }
예제 #3
0
        public ActionResult GoodsDetail(string snNum)
        {
            ProductEntity   entity   = new ProductEntity();
            ProductProvider provider = new ProductProvider();

            entity           = provider.GetProductBySn(snNum);
            ViewBag.Category = BaseHelper.GetProductCategory(entity.CateNum);
            ViewBag.Storage  = LocalHelper.GetStorageNumList(entity.StorageNum);
            ViewBag.Local    = LocalHelper.GetLocalNumList(entity.StorageNum, entity.DefaultLocal);
            ViewBag.Customer = BaseHelper.GetCustomerList(entity.CusNum);
            ViewBag.Goods    = entity;
            //ViewBag.Unit = EnumHelper.GetOptions<EUnit>(entity.Unit, "请选择单位");
            ViewBag.Unit = BaseHelper.GetMeasureNameList(entity.UnitNum);
            return(View());
        }