using NFine.Application.OMAY; using NFine.Code; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Web; using System.Web.Mvc; namespace NFine.Web.Areas.OMAY.Controllers { public class ApsController : ControllerBase { // GET: OMAY/Aps OMAYApsApp App = new OMAYApsApp(); public ActionResult MoProducePlan() { return View(); } public ActionResult EditInstructionBill(string ids,string line) { ViewData["ids"] = ids; ViewData["line"] = line; return View(); } [HttpPost] [HandlerAjaxOnly] public ActionResult GetGridJsonChengPing(Pagination pagination, string queryJson) { DataTable ListData = App.GetGridJsonChengPing(queryJson, ref pagination); var JsonData = new { total = pagination.total, page = pagination.page, records = pagination.records, rows = ListData, }; return Content(JsonData.ToJson()); } [HttpPost] [HandlerAjaxOnly] public ActionResult UpdateMoPlan(string keyValue) { string msg = App.UpdateMoPlan(keyValue); if (!string.IsNullOrEmpty(msg)) { return Error(msg); } else { return Success("修改成功!"); } } /// /// 取消下发 /// /// /// [HttpPost] [HandlerAjaxOnly] public ActionResult CancelSendMo(string keyValue) { string msg = App.CancelSendMo(keyValue); if (!string.IsNullOrEmpty(msg)) { return Error(msg); } else { return Success("修改成功!"); } } [HttpPost] [HandlerAjaxOnly] public ActionResult UpdateMoOrderStatus(string keyValue) { string msg = App.UpdateMoOrderStatus(keyValue); if (!string.IsNullOrEmpty(msg)) { return Error(msg); } else { return Success("修改成功!"); } } [HttpGet] [HandlerAjaxOnly] public ActionResult GetOrgAName() { string value = App.GetOrgAName(); return Success(value); } /// /// 不调用ERP /// /// /// [HttpPost] [HandlerAjaxOnly] public ActionResult UpdateMoPlan2(string keyValue) { string msg = App.UpdateMoPlan2(keyValue); if (!string.IsNullOrEmpty(msg)) { return Error(msg); } else { return Success("修改成功"); } } [HttpGet] [HandlerAjaxOnly] public ActionResult GetApsPlanSubGridJsonList(string moCode,int moSeq, Pagination pagination) { DataTable ListData = App.GetApsPlanSubGridJsonList(moCode, moSeq, ref pagination); var JsonData = new { total = 1, page =1, records = 0, rows = ListData, }; return Content(JsonData.ToJson()); } [HttpPost] [HandlerAjaxOnly] public ActionResult GetApsPlanSelectSubItemList(Pagination pagination,string ids) { DataTable ListData = App.GetApsPlanSelectSubItemList(ids, ref pagination); var JsonData = new { total = 1, page = 1, records = 0, rows = ListData, }; return Content(JsonData.ToJson()); } } }