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.
325 lines
9.1 KiB
325 lines
9.1 KiB
using NFine.Application;
|
|
using NFine.Application.ProductManage;
|
|
using NFine.Code;
|
|
using NFine.Domain.Entity.ProductManage;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Web.Mvc;
|
|
using ICSSoft.SendMail;
|
|
|
|
namespace NFine.Web.Areas.SRM.Controllers
|
|
{
|
|
public class POReleaseController : ControllerBase
|
|
{
|
|
private POReleaseApp App = new POReleaseApp();
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJson(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJson(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonByBB(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonByBB(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonWeiWai(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonWeiWai(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonWeiWaiByBB(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJsonWeiWaiByBB(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJson(string POCode, Pagination pagination,string WorkPoint)
|
|
{
|
|
DataTable ListData = App.GetSubGridJson(POCode, ref pagination, WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
|
|
};
|
|
//获取当前登录人信息;
|
|
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonWW(string OOCode, Pagination pagination,string WorkPoint)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonWW(OOCode, ref pagination, WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
|
|
};
|
|
//获取当前登录人信息;
|
|
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public ActionResult IndexByBB()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
//[HttpGet]
|
|
//[HandlerAjaxOnly]
|
|
//public ActionResult GetFormJson(string keyValue)
|
|
//{
|
|
// //var data = maintainAppApp.GetForm(keyValue);
|
|
// //return Content(data.ToJson());
|
|
//}
|
|
/// <summary>
|
|
/// 发布采购订单信息
|
|
/// </summary>
|
|
/// <param name="keyValue">采购订单</param>
|
|
/// <param name="WorkPoint">多站点信息</param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitForm(string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.SubmitPoRelease(keyValue, WorkPoint);
|
|
|
|
if (i > 0)
|
|
{
|
|
return Success("发布成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("发布失败!");
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
/// 取消发布
|
|
/// </summary>
|
|
/// <param name="keyValue"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult CeanlSubmitForm(string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.CeanlSubmitForm(keyValue, WorkPoint);
|
|
|
|
if (i > 0)
|
|
{
|
|
return Success("取消发布成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("取消发布失败!");
|
|
}
|
|
|
|
}
|
|
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitFormWeiWai(string keyValue, string WorkPoint)
|
|
{
|
|
try
|
|
{
|
|
int i = App.SubmitFormWeiWai(keyValue, WorkPoint);
|
|
|
|
if (i > 0)
|
|
{
|
|
return Success("发布成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("发布失败!");
|
|
}
|
|
}
|
|
catch (System.Exception ex)
|
|
{
|
|
|
|
return Error("发布失败,"+ex.Message);
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
/// 取消发布 委外
|
|
/// </summary>
|
|
/// <param name="keyValue"></param>
|
|
/// <param name="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult CeanlSubmitFormWeiWai(string keyValue, string WorkPoint)
|
|
{
|
|
int i = App.CeanlSubmitFormWeiWai(keyValue, WorkPoint);
|
|
|
|
if (i > 0)
|
|
{
|
|
return Success("取消发布成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("发布失败!");
|
|
}
|
|
|
|
}
|
|
//[HttpPost]
|
|
//[HandlerAjaxOnly]
|
|
//[HandlerAuthorize]
|
|
//[ValidateAntiForgeryToken]
|
|
//public ActionResult DeleteForm(string keyValue)
|
|
//{
|
|
// maintainAppApp.DeleteForm(keyValue);
|
|
// return Success("Delete success.");
|
|
//}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult CheckIsAgaion(string POCode, string PORow)
|
|
{
|
|
POCode = POCode.TrimEnd(',');
|
|
PORow = PORow.TrimEnd(',');
|
|
string _result = App.CheckIsAgaion(POCode, PORow);
|
|
var JsonData = new
|
|
{
|
|
result = _result
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
public ActionResult SelectColumnName(string BeginTime, string EndTime)
|
|
{
|
|
var data = App.SelectColumnName(BeginTime, EndTime);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
public ActionResult SelectTableColumnName(string BeginTime, string EndTime)
|
|
{
|
|
var data = App.SelectTableColumnName(BeginTime, EndTime);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonBYBB(string POCode, Pagination pagination, string WorkPoint)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonBYBB(POCode, ref pagination, WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
|
|
};
|
|
//获取当前登录人信息;
|
|
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetSubGridJsonWWByBB(string OOCode, Pagination pagination, string WorkPoint)
|
|
{
|
|
DataTable ListData = App.GetSubGridJsonWWByBB(OOCode, ref pagination, WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
|
|
};
|
|
//获取当前登录人信息;
|
|
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult SaveRemark(string keyValue,string Type)
|
|
{
|
|
string msg = App.SaveRemark(keyValue, Type);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("保存成功!");
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|