public ActionResult Edit(string cid) { //省份 ViewBag.Province = BaseDataService.GetAllProvince(); //默认承运商 ViewBag.Carrier = CarrierService.GetCarrierByRule("", 1); //只显示使用中的数据 //默认仓库 ViewBag.Storage = StorageService.GetStorageByRule("", 1); //只显示使用中的数据 //客户信息 ViewBag.Customer = CustomerService.GetCustomerByRule("", 1); //只显示使用中的数据 //收货方类型 ViewBag.ReceiverList = BaseDataService.GetBaseDataAll().Where(t => t.PCode == "Reveiver00" && t.Status == 1).ToList(); if (!string.IsNullOrEmpty(cid)) { ReceiverEntity entity = ReceiverService.GetReceiverEntityById(cid.ToLong(0)); entity.Url = UrlPar; ViewBag.Receiver = entity; } else { ViewBag.Receiver = new ReceiverEntity(); } return(View()); }
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()); }
/// <summary> /// 车辆计划报表 /// </summary> /// <returns></returns> public ActionResult OrderDeliverPlanReport(int carrierid = -1, string begindate = "", string enddate = "", int p = 1) { // 默认当月 if (string.IsNullOrEmpty(begindate) || string.IsNullOrEmpty(enddate)) { DateTime dt = DateTime.Now; begindate = dt.Year + "-" + dt.Month + "-" + "01"; enddate = DateTime.Now.ToString("yyyy-MM-dd"); } List <OrderDeliverPlanEntity> mList = null; int count = OrderDeliverPlanService.GetOrderDeliverPlanCount(carrierid, begindate, enddate); PagerInfo pager = new PagerInfo(); pager.PageIndex = p; pager.PageSize = PAGESIZE; pager.SumCount = count; pager.URL = "OrderDeliverPlanReport"; mList = OrderDeliverPlanService.GetOrderDeliverPlanInfoByRule(carrierid, begindate, enddate, pager); //默认承运商 ViewBag.Carrier = CarrierService.GetCarrierByRule("", 1);//只显示使用中的数据 ViewBag.reportList = mList; ViewBag.carrierid = carrierid; ViewBag.BeginDate = begindate; ViewBag.EndDate = enddate; ViewBag.Pager = pager; return(View()); }
/// <summary> /// 订单出库 查询未出库订单 /// </summary> /// <param name="carrierid"></param> /// <param name="storageid"></param> /// <param name="customerid"></param> /// <param name="status"></param> /// <param name="p"></param> /// <returns></returns> public ActionResult OrderOut(int carrierid = 0, int storageid = 0, int customerid = 0, int status = -1, string orderno = "", string begindate = "", string enddate = "", string orderOutStatus = "", int p = 1, int pageSize = 20) { List <OrderEntity> mList = null; orderOutStatus = !string.IsNullOrEmpty(orderOutStatus) ? orderOutStatus : "F";//默认未出库订单 // 默认当月 if (string.IsNullOrEmpty(begindate) || string.IsNullOrEmpty(enddate)) { DateTime dt = DateTime.Now; begindate = dt.Year + "-" + dt.Month + "-" + "01"; enddate = DateTime.Now.ToString("yyyy-MM-dd"); } //查询未出库 已安排运输计划订单 int count = OrderService.GetOrderCount("", carrierid, storageid, customerid, status, -1, -1, "", orderno, begindate, enddate, -1, "", "", orderOutStatus, "T", " AND OrderType!='YSDDB'"); PagerInfo pager = new PagerInfo(); pager.PageIndex = p; pager.PageSize = pageSize; pager.SumCount = count; pager.URL = "OrderOut"; //if (status > -1 || carrierid > 0 || storageid > 0 || customerid > 0 || !string.IsNullOrEmpty(orderno) || !string.IsNullOrEmpty(begindate) || !string.IsNullOrEmpty(enddate)) //{ mList = OrderService.GetOrderInfoByRule(pager, "", carrierid, storageid, customerid, status, -1, -1, "", orderno, begindate, enddate, -1, "", "", orderOutStatus, "T", " AND OrderType!='YSDDB'"); //} //else //{ // mList = OrderService.GetOrderInfoPager(pager); //} //默认承运商 ViewBag.Carrier = CarrierService.GetCarrierByRule("", 1); //只显示使用中的数据 //默认仓库 ViewBag.Storage = StorageService.GetStorageByRule("", 1); //只显示使用中的数据 //门店 ViewBag.Goods = GoodsService.GetGoodsByRule("", 1); //只显示使用中的数据 //客户信息 ViewBag.Customer = CustomerService.GetCustomerByRule("", 1); //只显示使用中的数据 ViewBag.UserID = CurrentUser != null?CurrentUser.UserID:-1; ViewBag.Status = status; ViewBag.carrierid = carrierid; ViewBag.customerid = customerid; ViewBag.storageid = storageid; ViewBag.OrderList = mList; ViewBag.PageSize = pageSize; ViewBag.BeginDate = begindate; ViewBag.OrderNo = orderno; ViewBag.EndDate = enddate; ViewBag.orderOutStatus = orderOutStatus; ViewBag.Pager = pager; return(View()); }
/// <summary> /// 利润分析表 /// </summary> /// <param name="carrierid">承运商ID</param> /// <param name="storageid">仓库ID</param> /// <param name="customerid">客户ID</param> /// <param name="receivername">收货方</param> /// <param name="ordertype">订单类型</param> /// <param name="orderno">订单编号</param> /// <param name="begindate">订单开始时间</param> /// <param name="enddate">订单结束时间</param> /// <param name="p"></param> /// <returns></returns> public ActionResult ProfitReport(int carrierid = 0, int storageid = 0, int customerid = 0, string receivername = "", string ordertype = "", string orderno = "", string begindate = "", string enddate = "", int p = 1) { // 默认当月 if (string.IsNullOrEmpty(begindate) || string.IsNullOrEmpty(enddate)) { DateTime dt = DateTime.Now; begindate = dt.Year + "-" + dt.Month + "-" + "01"; enddate = DateTime.Now.ToString("yyyy-MM-dd"); } List <OrderEntity> mList = null; OrderFeeInfo feeinfo = ReportService.GetOrderCount("", carrierid, storageid, customerid, -1, -1, -1, ordertype, orderno, begindate, enddate, -1); int count = feeinfo.count; PagerInfo pager = new PagerInfo(); pager.PageIndex = p; pager.PageSize = PAGESIZE; pager.SumCount = count; pager.URL = "ProfitReport"; mList = ReportService.GetOrderInfoByRule(pager, "", carrierid, storageid, customerid, -1, -1, -1, ordertype, orderno, begindate, enddate, -1); //默认承运商 ViewBag.Carrier = CarrierService.GetCarrierByRule("", 1); //只显示使用中的数据 //默认仓库 ViewBag.Storage = StorageService.GetStorageByRule("", 1); //只显示使用中的数据 //客户信息 ViewBag.Customer = CustomerService.GetCustomerByRule("", 1); //只显示使用中的数据 //订单类型 List <BaseDataEntity> orderTypeList = BaseDataService.GetBaseDataAll().Where(t => t.PCode == "OrderTypeList").ToList(); ReEntity report = ReportService.CreateReportList(mList); report.TotalAllPayAmount = feeinfo.TotalAllPayAmount; report.TotalllReceiverAmount = feeinfo.TotalllReceiverAmount; ViewBag.Report = report; ViewBag.GUID = System.Guid.NewGuid().ToString(); ViewBag.carrierid = carrierid; ViewBag.storageid = storageid; ViewBag.customerid = customerid; ViewBag.OrderType = ordertype; ViewBag.BeginDate = begindate; ViewBag.EndDate = enddate; ViewBag.orderTypeList = orderTypeList; ViewBag.ReceiverName = receivername; //存入缓存 Cache.Add(ViewBag.GUID, report.reportList); ViewBag.Pager = pager; return(View()); }
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()); }
/// <summary> /// 运输计划 查询已出库订单 /// </summary> /// <param name="carrierid"></param> /// <param name="storageid"></param> /// <param name="customerid"></param> /// <param name="status"></param> /// <param name="p"></param> /// <returns></returns> public ActionResult OrderDeliveryPlan(int carrierid = 0, int storageid = 0, int customerid = 0, int status = -1, string orderno = "", string begindate = "", string enddate = "", string deliveryStatus = "", string revicerids = "", int p = 1, int pageSize = 20) { List <OrderEntity> mList = null; deliveryStatus = !string.IsNullOrEmpty(deliveryStatus) ? deliveryStatus : "F";//默认未安排计划的订单 // 默认当月 if (string.IsNullOrEmpty(begindate) || string.IsNullOrEmpty(enddate)) { DateTime dt = DateTime.Now; begindate = dt.Year + "-" + dt.Month + "-" + "01"; enddate = DateTime.Now.ToString("yyyy-MM-dd"); } string orderOutStatus = "F"; if (deliveryStatus.Equals("T"))//出库状态默认未出库 如果查询已安排配送 忽视订单是否出库 { orderOutStatus = ""; } //查询未出库 未安排运输计划订单 不包含入库单 int count = OrderService.GetOrderCount("", carrierid, storageid, customerid, status, -1, -1, "", orderno, begindate, enddate, -1, "", "", orderOutStatus, deliveryStatus, " AND OrderType!='RKD'", revicerids); PagerInfo pager = new PagerInfo(); pager.PageIndex = p; pager.PageSize = pageSize; pager.SumCount = count; pager.URL = "OrderDeliveryPlan"; mList = OrderService.GetOrderInfoByRule(pager, "", carrierid, storageid, customerid, status, -1, -1, "", orderno, begindate, enddate, -1, "", "", orderOutStatus, deliveryStatus, " AND OrderType!='RKD'", revicerids); //默认承运商 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.DeliverList = BaseDataService.GetBaseDataAll().Where(t => t.PCode == "DeliverModel00" && t.Status == 1).ToList(); ViewBag.CarModel = BaseDataService.GetBaseDataAll().Where(t => t.PCode == "CarModel00" && t.Status == 1).ToList(); ViewBag.Receiver = ReceiverService.GetReceiverByRule("", "", "", 1); //承运商类型 ViewBag.CarrierModel = BaseDataService.GetBaseDataAll().Where(t => t.PCode == "Carrier00" && t.Status == 1).ToList(); ViewBag.UserID = CurrentUser != null ? CurrentUser.UserID : -1; ViewBag.Status = status; ViewBag.carrierid = carrierid; ViewBag.customerid = customerid; ViewBag.storageid = storageid; ViewBag.OrderList = mList; ViewBag.PageSize = pageSize; ViewBag.BeginDate = begindate; ViewBag.OrderNo = orderno; ViewBag.EndDate = enddate; ViewBag.deliveryStatus = deliveryStatus; ViewBag.Pager = pager; ViewBag.Revicerids = revicerids; return(View()); }
/// <summary> /// /// </summary> /// <param name="type">审核:verify[通过,拒绝] 修改:modify[修改,删除]</param> /// <param name="carrierid"></param> /// <param name="storageid"></param> /// <param name="customerid"></param> /// <param name="status"></param> /// <param name="p"></param> /// <returns></returns> public ActionResult OrderSearch_Modify(string type = "", int carrierid = 0, int storageid = 0, int customerid = 0, int status = -1, string orderno = "", string begindate = "", string enddate = "", int p = 1, int pageSize = 20) { List <OrderEntity> mList = null; // 默认当月 if (string.IsNullOrEmpty(begindate) || string.IsNullOrEmpty(enddate)) { DateTime dt = DateTime.Now; begindate = dt.Year + "-" + dt.Month + "-" + "01"; enddate = DateTime.Now.ToString("yyyy-MM-dd"); } int count = OrderService.GetOrderCount("", carrierid, storageid, customerid, status, -1, -1, "", orderno, begindate, enddate); PagerInfo pager = new PagerInfo(); pager.PageIndex = p; pager.PageSize = pageSize; pager.SumCount = count; pager.URL = "OrderSearch_Modify"; int orderstatus = 0; int uploadstatus = 0; //订单修改只能读取 未配送 未接单订单状态 if (type.Equals("modify")) { orderstatus = 0; // 未配送 uploadstatus = 0; //未接单 } else if (type.Equals("verify")) { orderstatus = 2; // 已回单 uploadstatus = 1; //已接单 } if (status > -1 || carrierid > 0 || storageid > 0 || customerid > 0 || !string.IsNullOrEmpty(orderno) || !string.IsNullOrEmpty(begindate) || !string.IsNullOrEmpty(enddate)) { mList = OrderService.GetOrderInfoByRule(pager, "", carrierid, storageid, customerid, status, -1, -1, "", orderno, begindate, enddate); } else { mList = OrderService.GetOrderInfoPager(pager); } //默认承运商 ViewBag.Carrier = CarrierService.GetCarrierByRule("", 1); //只显示使用中的数据 //默认仓库 ViewBag.Storage = StorageService.GetStorageByRule("", 1); //只显示使用中的数据 //门店 ViewBag.Goods = GoodsService.GetGoodsByRule("", 1); //只显示使用中的数据 //客户信息 ViewBag.Customer = CustomerService.GetCustomerByRule("", 1); //只显示使用中的数据 ViewBag.UserID = CurrentUser != null?CurrentUser.UserID:-1; ViewBag.TitleName = type.Equals("verify") ? "订单审核" : "订单修改"; ViewBag.PageType = type; ViewBag.Status = status; ViewBag.carrierid = carrierid; ViewBag.customerid = customerid; ViewBag.storageid = storageid; ViewBag.OrderList = mList; ViewBag.PageSize = pageSize; ViewBag.BeginDate = begindate; ViewBag.OrderNo = orderno; ViewBag.EndDate = enddate; ViewBag.Pager = pager; return(View()); }
/// <summary> /// /// </summary> /// <param name="type">页面权限控制类型 check:通过、拒绝</param> /// <param name="carrierid"></param> /// <param name="storageid"></param> /// <param name="customerid"></param> /// <param name="orderstatus"></param> /// <param name="p"></param> /// <returns></returns> public ActionResult OrderSearch(string type = "", int carrierid = 0, int storageid = 0, int customerid = 0, int orderstatus = -1, string orderno = "" , string begindate = "", string enddate = "", int operatorid = -1, string ordertype = "", string ordersource = "", string subOrderType = "", int p = 1, int pageSize = 20) { // 默认当月 if (string.IsNullOrEmpty(begindate) || string.IsNullOrEmpty(enddate)) { DateTime dt = DateTime.Now; begindate = dt.Year + "-" + dt.Month + "-" + "01"; enddate = DateTime.Now.ToString("yyyy-MM-dd"); } List <OrderEntity> mList = null; int count = OrderService.GetOrderCount("", carrierid, storageid, customerid, orderstatus, -1, -1, ordertype, orderno, begindate, enddate, operatorid, ordersource, subOrderType); PagerInfo pager = new PagerInfo(); pager.PageIndex = p; pager.PageSize = pageSize; pager.SumCount = count; pager.URL = "OrderSearch"; if (orderstatus > -1 || carrierid > 0 || storageid > 0 || customerid > 0 || operatorid > 0 || !string.IsNullOrEmpty(ordertype) || !string.IsNullOrEmpty(subOrderType) || !string.IsNullOrEmpty(ordersource) || !string.IsNullOrEmpty(orderno) || !string.IsNullOrEmpty(begindate) || !string.IsNullOrEmpty(enddate)) { mList = OrderService.GetOrderInfoByRule(pager, "", carrierid, storageid, customerid, orderstatus, -1, -1, ordertype, orderno, begindate, enddate, operatorid, ordersource, subOrderType); } else { mList = OrderService.GetOrderInfoPager(pager); } //默认承运商 ViewBag.Carrier = CarrierService.GetCarrierByRule("", 1); //只显示使用中的数据 //默认仓库 ViewBag.Storage = StorageService.GetStorageByRule("", 1); //只显示使用中的数据 //门店 ViewBag.Goods = GoodsService.GetGoodsByRule("", 1); //只显示使用中的数据 //客户信息 ViewBag.Customer = CustomerService.GetCustomerByRule("", 1); //只显示使用中的数据 //订单类型 List <BaseDataEntity> orderTypeList = BaseDataService.GetBaseDataAll().Where(t => t.PCode == "OrderTypeList").ToList(); //商超订单 导入 List <BaseDataEntity> orderSourceList = BaseDataService.GetBaseDataAll().Where(t => t.PCode == "MarketCode001").ToList(); //操作人 ViewBag.Users = UserService.GetUserAll(); ViewBag.BeginDate = begindate; ViewBag.OrderNo = orderno; ViewBag.EndDate = enddate; ViewBag.PageType = type; ViewBag.OrderType = ordertype; ViewBag.OrderSource = ordersource; ViewBag.orderSourceList = orderSourceList; ViewBag.OperatorID = operatorid; ViewBag.OrderStatus = orderstatus; ViewBag.carrierid = carrierid; ViewBag.customerid = customerid; ViewBag.storageid = storageid; ViewBag.OrderList = mList; ViewBag.orderTypeList = orderTypeList; ViewBag.PageSize = pageSize; ViewBag.SubOrderType = subOrderType; ViewBag.Pager = pager; return(View()); }