Ejemplo n.º 1
0
        public ActionResult Edit(string cid)
        {
            //默认承运商
            ViewBag.Carrier = CarrierService.GetCarrierByRule("", 1);    //只显示使用中的数据
            //默认仓库
            ViewBag.Storage = StorageService.GetStorageByRule("", 1);    //只显示使用中的数据
            //门店
            ViewBag.Goods = GoodsService.GetGoodsByRule("", 1);          //只显示使用中的数据
            //客户信息
            ViewBag.Customer = CustomerService.GetCustomerByRule("", 1); //只显示使用中的数据
            //温度
            ViewBag.TemList = BaseDataService.GetBaseDataAll().Where(t => t.PCode == "TM00" && t.Status == 1).ToList();
            //收货方类型
            ViewBag.ReceiverList = BaseDataService.GetBaseDataAll().Where(t => t.PCode == "Reveiver00" && t.Status == 1).ToList();
            //收货方
            ViewBag.DeliverList = BaseDataService.GetBaseDataAll().Where(t => t.PCode == "DeliverModel00" && t.Status == 1).ToList();
            if (!string.IsNullOrEmpty(cid))
            {
                ViewBag.PriceSet = PriceSetService.GetPriceSetEntityById(cid.ToLong(0));
            }
            else
            {
                ViewBag.PriceSet = new PriceSetEntity();
            }

            return(View());
        }
Ejemplo n.º 2
0
 public void Modify(PriceSetEntity PriceSet)
 {
     if (PriceSet != null)
     {
         PriceSet.OperatorID = CurrentUser.UserID;
     }
     PriceSetService.ModifyPriceSet(PriceSet);
     Response.Redirect("/PriceSet/");
 }
Ejemplo n.º 3
0
        public ActionResult Index(int carrierid = 0, int storageid = 0, int customerid = 0, int status = -1, int p = 1)
        {
            List <PriceSetEntity> mList = null;

            int count = PriceSetService.GetPriceSetCount("", carrierid, storageid, customerid, status);

            PagerInfo pager = new PagerInfo();

            pager.PageIndex = p;
            pager.PageSize  = PAGESIZE;
            pager.SumCount  = count;
            pager.URL       = "/PriceSet/";


            ViewBag.PriceSetModel = BaseDataService.GetBaseDataAll().Where(t => t.PCode == "PriceSetCode" && t.Status == 1).ToList();
            if (status > -1 || carrierid > 0 || storageid > 0 || customerid > 0)
            {
                mList = PriceSetService.GetPriceSetInfoByRule("", carrierid, storageid, customerid, status, pager);
            }
            else
            {
                mList = PriceSetService.GetPriceSetInfoPager(pager);
            }
            //默认承运商
            ViewBag.Carrier = CarrierService.GetCarrierByRule("", 1);    //只显示使用中的数据
            //默认仓库
            ViewBag.Storage = StorageService.GetStorageByRule("", 1);    //只显示使用中的数据
            //门店
            ViewBag.Goods = GoodsService.GetGoodsByRule("", 1);          //只显示使用中的数据
            //客户信息
            ViewBag.Customer = CustomerService.GetCustomerByRule("", 1); //只显示使用中的数据

            ViewBag.Status     = status;
            ViewBag.carrierid  = carrierid;
            ViewBag.customerid = customerid;
            ViewBag.storageid  = storageid;
            ViewBag.PriceSet   = mList;
            ViewBag.Pager      = pager;
            return(View());
        }
Ejemplo n.º 4
0
 public void Remove(string cid)
 {
     PriceSetService.Remove(long.Parse(cid));
     Response.Redirect("/PriceSet/");
 }
Ejemplo n.º 5
0
        public JsonResult GetPriceSetInfoByID(int pricesetid)
        {
            PriceSetEntity entity = PriceSetService.GetPriceSetById(pricesetid);

            return(Json(entity));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 计算价格
        /// </summary>
        /// <returns></returns>
        /// <param name="customerid">客户ID</param>
        /// <param name="receivingid">收货方ID(仓库 or 门店)</param>
        /// <param name="sendstorageid">发货/出库仓库ID</param>
        /// <param name="carrierid">承运商ID</param>
        /// <param name="ordertype">订单类型</param>
        /// <returns></returns>
        public JsonResult ComputePrice(int customerid, int receivingid, int sendstorageid, int carrierid, string ordertype)
        {
            List <PriceSetEntity> priceList = PriceSetService.GetPriceSetByRule("", customerid, receivingid, sendstorageid, carrierid, 1);

            return(Json(priceList));
        }