public ActionResult PrintSelectedOuterBox(string boxIds, int numPerPage = 1) { if (numPerPage < 1) { numPerPage = 1; } List <int> boxIdList = boxIds.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(b => Int32.Parse(b)).ToList(); try { var result = new ReportSv().GetOuterBoxes4Print(boxIdList); ViewData["outerData"] = result; ViewData["numPerPage"] = numPerPage; ViewData["boxIds"] = boxIds; WLog("打印外箱", "打印所有选中的外箱:" + string.Join(",", result.Select(r => r.boxNumber).ToList())); } catch (Exception ex) { ViewBag.tip = ex.Message; return(View("Error")); } return(View()); }
public ActionResult PrintSelectedInnerBox(string boxIds, string inOrOut = "out", int numPerPage = 1) { if (numPerPage < 1) { numPerPage = 1; } List <int> boxIdList = boxIds.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(b => Int32.Parse(b)).ToList(); try { List <PrintInnerBoxModel> result; if (inOrOut.Equals("out")) { result = new ReportSv().GetInnerBoxes4Print(boxIdList); } else { result = new ReportSv().GetInnerBoxesWithExtra4Print(boxIdList); } ViewData["innerData"] = result; ViewData["inOrOut"] = inOrOut; ViewData["numPerPage"] = numPerPage; ViewData["boxIds"] = boxIds; WLog("打印内箱", "打印所有选中的内箱:" + string.Join(",", result.Select(r => r.boxNumber).ToList())); } catch (Exception ex) { ViewBag.tip = ex.Message; return(View("Error")); } return(View()); }
public JsonResult GetDayNumData4Chart() { try { var result = new ReportSv().GetDayNumChartData(currentAccount); return(Json(new { suc = true, result = result })); } catch (Exception ex) { return(Json(new SRM(ex))); } }
/// <summary> /// 获取今天做的最多的前10个申请、外箱、内箱、小标签内箱对应的供应商和数量 /// </summary> /// <returns></returns> public JsonResult GetTopTenSupplier4Chart() { try { var d1 = new ReportSv().GetTopTenSupplierApplyNumToday(currentAccount); var d2 = new ReportSv().GetTopTenSupplierOBoxNumToday(currentAccount); var d3 = new ReportSv().GetTopTenSupplierIBoxNumToday(currentAccount); var d4 = new ReportSv().GetTopTenSupplierIBoxExtraNumToday(currentAccount); return(Json(new { suc = true, d1 = d1, d2 = d2, d3 = d3, d4 = d4 })); } catch (Exception ex) { return(Json(new SRM(ex))); } }
public ActionResult PrintApply(int billId, string pageNumList = null) { //先验证权限 if (!canCheckAll) { if (!new UASv().CanCheckTheDRBill(billId, currentUser.userName, currentUser.userId)) { ViewBag.tip = "单据不存在或无权限查看"; WLog("打印送货单", "无权访问:" + billId.ToString(), "", false); return(View("Error")); } } int defaultNumPerPage = 14; int totalNumToDisplay = 0; PrintApplyModels m; if (pageNumList == null) { pageNumList = defaultNumPerPage.ToString();//默认1页显示14行数据 } try { m = new ReportSv().GetData4Print(billId, currentAccount); } catch (Exception ex) { ViewBag.tip = ex.Message; return(View("Error")); } totalNumToDisplay = m.boxAndPos.Count() == 0 ? m.es.Count() : m.boxAndPos.Count(); List <int> pageNumArr = MyUtils.GetPageNumberList(defaultNumPerPage, pageNumList, totalNumToDisplay); ViewData["reportData"] = m; ViewData["pageNumList"] = pageNumList; ViewData["pageNumArr"] = pageNumArr; //ViewData["currentCompany"] = currentCompany;//不能获取当前登录账套的,因为可以在光电账套打开半导体送货单 ViewData["currentCompany"] = new ItemSv().GetCertainCompany(m.h.bill_no.Substring(0, 1)); WLog("打印送货申请单", "进入打印界面", m.h.bill_no); return(View()); }
public ActionResult PrintOuterQrcode(int billId, int numPerPage = 1) { if (numPerPage < 1) { numPerPage = 1; } try { var dr = new DRSv().GetDRBill(billId); var result = new ReportSv().GetOuterBoxes4Print(billId); ViewData["outerData"] = result; ViewData["numPerPage"] = numPerPage; ViewData["billId"] = billId; WLog("打印外箱标签", "打印送货申请关联箱子标签", dr == null ? "" : dr.bill_no); } catch (Exception ex) { ViewBag.tip = ex.Message; return(View("Error")); } return(View()); }