/// <summary> /// 根据采购订单ID查询采购订单详单【分页】 /// </summary> /// <param name="PageIndex"></param> /// <param name="SDID"></param> /// <returns></returns> public ActionResult GetPageStocks(int PageIndex, String SDID) { List <StockDetail> list = StockDetailBLL.GetAllPageBySDID(PageIndex, 10, SDID); List <object> listed = new List <object>(); foreach (StockDetail item in list) { listed.Add(new { SDetailID = item.SDetailID, ProID = item.ProID, ProName = item.Products.ProName, StockID = item.StockID, SDetailAmount = item.SDetailAmount, SDetailPrice = item.SDetailPrice, SDetailDepAmount = item.SDetailDepAmount, SDetailDesc = item.SDetailDesc }); } return(Json(listed)); }
/// <summary> /// 根据采购订单ID查询订单详情 /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult GetStockDetailByStockID(string id) { List <StockDetail> list = StockDetailBLL.GetAllPageBySDID(1, 1000, id); List <object> listed = new List <object>(); foreach (StockDetail item in list) { listed.Add(new { SDetailID = item.SDetailID, ProID = item.ProID, StockID = item.StockID, SDetailAmount = item.SDetailAmount, SDetailPrice = item.SDetailPrice, SDetailDepAmount = item.SDetailDepAmount, SDetailDesc = item.SDetailDesc, ProName = item.Products.ProName, PTName = item.Products.ProductTypes.PTName, PUName = item.Products.ProductUnit.PUName, PCName = item.Products.ProductColor.PCName, PSName = item.Products.ProductSpec.PSName }); } return(Json(listed)); }