You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

155 lines
4.0 KiB

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("修改成功!");
}
}
/// <summary>
/// 取消下发
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[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);
}
/// <summary>
/// 不调用ERP
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[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());
}
}
}