/// <summary> /// 其它出库 /// </summary> /// <returns></returns> public ActionResult OutOther() { List <Depots> cus = DepotsBLL.GetAll(); ViewData["dlist"] = cus; int count = OtherOutDepotBLL.GetAll().Count; int MaxPageIndex = count % 10 == 0 ? count / 10 : count / 10 + 1; ViewData["count"] = count; ViewData["MaxPageIndex"] = MaxPageIndex; //商品类别 List <ProductTypes> ptlist = ProductTypesBLL.GetAll(); //商品规格 List <ProductSpec> pslist = ProductSpecBLL.GetAll(); //商品单位 List <ProductUnit> pulist = ProductUnitBLL.GetAll(); //商品颜色 List <ProductColor> pclist = ProductColorBLL.GetAll(); ViewData["ptlist"] = ptlist; ViewData["pslist"] = pslist; ViewData["pulist"] = pulist; ViewData["pclist"] = pclist; return(View()); }
/// <summary> /// 删除销售出库单 /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult DelOtherOutDepot(string id) { if (OtherOutDepotBLL.DelStocks(id) > 0) { return(Content("del_yes")); } else { return(Content("del_no")); } }
/// <summary> /// 修改生产领料单 /// </summary> /// <param name="qp"></param> /// <param name="list"></param> /// <returns></returns> public ActionResult EditOtherOutDepot(OtherOutDepot qp, List <OtherOutDepotDetail> list) { if (OtherOutDepotBLL.EdiStocks(qp, list) > 0) { return(Content("edit_yes")); } else { return(Content("edit_no")); } }
/// <summary> /// 添加报价单 /// </summary> /// <param name="qp"></param> /// <param name="list"></param> /// <returns></returns> public ActionResult AddOtherOutDepot(OtherOutDepot qp, List <OtherOutDepotDetail> list) { qp.UserID = Convert.ToInt32(Session["uid"]); if (OtherOutDepotBLL.AddStocks(qp, list) > 0) { return(Content("add_yes")); } else { return(Content("add_no")); } }
/// <summary> /// 审核 /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult CKOtherOutDepot(string id) { try { int userid = Convert.ToInt32(Session["uid"]); if (OtherOutDepotBLL.CKInDepot(id, userid) > 0) { return(Content("ck_yes")); } else { return(Content("ck_no")); } } catch (Exception ex) { return(Content(ex.Message)); } }
/// <summary> /// 条件查询 /// </summary> /// <param name="QPID">报价单编号</param> /// <param name="CusID">客户编号</param> /// <param name="QPDate">创建时间</param> /// <param name="UsersName">创建人</param> /// <param name="QPState">状态</param> /// <param name="PageIndex">页数</param> /// <returns></returns> public ActionResult Find(string OODID, string UsersName, string DepotID, string OODDate, int OODState, int PageIndex) { int count = 0; List <OtherOutDepot> list = OtherOutDepotBLL.Find(OODID, DepotID, OODDate, UsersName, OODState, PageIndex, 10, out count); count = count % 10 == 0 ? count / 10 : count / 10 + 1; List <object> listed = new List <object>(); if (list.Count > 0) { foreach (OtherOutDepot item in list) { listed.Add(new { OODID = item.OODID, DepotID = item.DepotID, DepotName = item.Depots.DepotName, UserID = item.UserID, UsersName = item.Users.UsersName, OODDate = item.OODDate, OODState = item.OODState, OODDesc = item.OODDesc, MaxPageIndex = count }); } } else { listed.Add(new { PODID = "", MaxPageIndex = 0 }); } return(Json(listed)); }