public JsonResult CheckAuditStatus(string sysNo) { Wlog("查看审核记录", sysNo); if (!new ApplySv().ApplyHasBegan(sysNo)) { return(Json(new { suc = false })); } ApplySv sv = new ApplySv(sysNo); return(Json(new { suc = true, nextStepName = sv.GetNextStepName(), nextAuditors = sv.GetNextStepAudiors(), result = sv.GetAuditStatus() })); }
public ActionResult ModifyBill(string sysNo, int stepVersion) { Wlog("进入单据修改视图", sysNo + ":" + stepVersion); SetBillBySysNo(sysNo); ViewData["bill"] = bill.GetBill(stepVersion); ViewData["step"] = stepVersion; if (new ApplySv().ApplyHasBegan(sysNo)) { ViewData["blockInfo"] = new ApplySv(sysNo).GetBlockInfo(); } return(View(bill.CreateViewName)); }
public JsonResult BeginCeoBatchAudit(string applyDetailIds, bool pass, string opinion) { var idArr = applyDetailIds.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); int[] idInt = new int[idArr.Length]; for (int i = 0; i < idArr.Length; i++) { idInt[i] = Int32.Parse(idArr[i]); } string result = new ApplySv().CeoBatchAudit(idInt, currentUser.userId, pass, opinion, GetIPAddr()); return(Json(new ResultModel() { suc = true, msg = result })); }
public ActionResult CheckBill(string sysNo) { Wlog("进入单据查看视图", sysNo); SetBillBySysNo(sysNo); ViewData["bill"] = bill.GetBill(0); var hasSubmited = new ApplySv().ApplyHasBegan(sysNo); if (hasSubmited) { ViewData["blockInfo"] = new ApplySv(sysNo).GetBlockInfo(); } //ViewData["hasSubmited"] = hasSubmited; //ViewData["hasFinished"] = new ApplySv().ApplyHasFinished(sysNo); return(View(bill.CheckViewName)); }
public ActionResult PrintMXReport(string sysNo) { var sv = new ApplySv(); if (!sv.ApplyHasSucceed(sysNo)) { ViewBag.tip = "此修改取消单还未审批完结,不能打印"; return(View("Error")); } ViewData["result"] = sv.GetStepAndAuditor(sysNo); ViewData["printer"] = currentUser.realName; ViewData["mx"] = new MXSv(sysNo).GetBill(0); ViewData["depName"] = new UA(currentUser.userId).GetUserDepartmentName(); return(View()); }
/// <summary> /// 反审核 /// </summary> /// <param name="applyId"></param> /// <param name="step"></param> /// <returns></returns> public JsonResult StepRollBack(int applyId, int step) { var sv = new ApplySv(applyId); try { sv.AuditStepRollBack(step, currentUser.userId); } catch (Exception ex) { Wlog(string.Format("反审核失败:applyID:{0},step:{1},ex:{2}", applyId, step, ex.Message)); return(Json(new ResultModel() { suc = false, msg = ex.Message })); } Wlog(string.Format("反审核成功:applyID:{0},step:{1}", applyId, step)); return(Json(new ResultModel() { suc = true, msg = "反审批成功" })); }
public ActionResult BeginAudit(int step, int applyId) { string info; try { info = new ApplySv().GetAuditInfo(step, applyId, currentUser.userId); } catch (Exception ex) { ViewBag.tip = ex.Message; return(View("Error")); } string[] infoArr = info.Split('|'); ViewData["canEdit"] = infoArr[0]; ViewData["sysNo"] = infoArr[1]; ViewData["step"] = step; ViewData["applyId"] = applyId; Wlog("进入审核页面,applyID:" + applyId + ";step:" + step + ";info:" + info); return(View()); }
public JsonResult BlockOrder(FormCollection fc) { int applyId = int.Parse(fc.Get("applyId")); int step = int.Parse(fc.Get("step")); string comment = fc.Get("auditor_comment"); string result = new ApplySv(applyId).BlockOrder(step, currentUser.userId, currentUser.realName, comment); Wlog(string.Format("挂起操作,applyID:{0},step:{1},comment:{2},result:{3}", applyId, step, comment, result), "", string.IsNullOrEmpty(result) ? 0 : -100); if (!string.IsNullOrEmpty(result)) { return(Json(new ResultModel() { suc = false, msg = result }, "text/html")); } return(Json(new ResultModel() { suc = true, msg = "挂起成功" }, "text/html")); }
public JsonResult HandleAudit(FormCollection fc) { int applyId = int.Parse(fc.Get("applyId")); int step = int.Parse(fc.Get("step")); string comment = fc.Get("auditor_comment"); bool isPass = bool.Parse(fc.Get("okFlag")); string result = new ApplySv(applyId).HandleAudit(step, currentUser.userId, isPass, comment, GetIPAddr()); Wlog(string.Format("审批单据,applyID:{0},step:{1},comment:{2},isPass:{3},result:{4}", applyId, step, comment, isPass, result), "", string.IsNullOrEmpty(result) ? 0 : -100); if (!string.IsNullOrEmpty(result)) { return(Json(new ResultModel() { suc = false, msg = result }, "text/html")); } return(Json(new ResultModel() { suc = true, msg = "审批成功" }, "text/html")); }