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.
320 lines
8.3 KiB
320 lines
8.3 KiB
using NFine.Application.JHWMS;
|
|
using System.Data;
|
|
using System.Web.Mvc;
|
|
using NFine.Code;
|
|
using System.Collections.Generic;
|
|
|
|
namespace NFine.Web.Areas.JHWMS.Controllers
|
|
{
|
|
public class ProductionIssueController : ControllerBase
|
|
{
|
|
|
|
ProductionIssueApp App = new ProductionIssueApp();
|
|
// GET: WMS/ProductionIssue
|
|
public ActionResult ICSMOApplyNeg()
|
|
{
|
|
ViewBag.PageName = "ProductionIssue";
|
|
return View();
|
|
}
|
|
|
|
|
|
|
|
public ActionResult ICSMOApplyNegAdd()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
public ActionResult SeachICSMO()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult SeachInventory()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
public ActionResult ICSMOApplyNegUpdate()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
public ActionResult GetICSMOApplyNeg(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetICSMOApplyNeg(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 GetICSMOApplyNegDetail(string ApplyNegCode, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetICSMOApplyNegDetail(ApplyNegCode, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
public ActionResult GetINV(string invcode, string Code, string Invstd, string EATTRIBUTE2, string TimeFrom, string TimeArrive, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetINV(invcode, Code, Invstd, EATTRIBUTE2, TimeFrom, TimeArrive, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
public ActionResult GetICSMOPickLog(string invcode, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetICSMOPickLog(invcode, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
|
|
public ActionResult GetICSReturnTemporary(string rfqno, Pagination pagination)
|
|
{
|
|
DataTable table = App.GetICSReturnTemporary(rfqno);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = table
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetWHCode()
|
|
{
|
|
DataTable dt = App.GetWHCode();
|
|
return Content(dt.ToJson());
|
|
}
|
|
//[HttpGet]
|
|
//[HandlerAjaxOnly]
|
|
//public ActionResult GetInvCode()
|
|
//{
|
|
// DataTable dt = App.GetInvCode();
|
|
// return Content(dt.ToJson());
|
|
//}
|
|
|
|
public void AddMOApplyNegTemp(string json)
|
|
{
|
|
App.AddMOApplyNegTemp(json);
|
|
}
|
|
|
|
public ActionResult DeleteMopick(string json)
|
|
{
|
|
|
|
return Content(App.DeleteMopick(json));
|
|
|
|
}
|
|
|
|
|
|
public void ClearTemp()
|
|
{
|
|
App.ClearTemp();
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult SaveICSMOApplyNeg(string ICSASN)
|
|
{
|
|
|
|
string msg = App.SaveICSMOApplyNeg(ICSASN);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("添加成功!");
|
|
}
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult UpdateICSMOApplyNeg(string ICSASN)
|
|
{
|
|
|
|
string msg = App.UpdateICSMOApplyNeg(ICSASN);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("修改成功!");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取文本框值
|
|
/// </summary>
|
|
/// <param name="POCode"></param>
|
|
/// <param name="PORow"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetInputValue(string ID)
|
|
{
|
|
DataTable ListData = App.GetInputValue(ID);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
public ActionResult GetICSMOApplyNegDetailTemp(string ApplyNegCode, Pagination pagination)
|
|
{
|
|
DataTable table = App.GetICSMOApplyNegDetailTemp(ApplyNegCode);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = table
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
|
|
}
|
|
|
|
public void UpdateMOApplyNegTemp(string json)
|
|
{
|
|
App.UpdateMOApplyNegTemp(json);
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult AuditICSMOApplyNeg(string ICSASN)
|
|
{
|
|
|
|
string msg = App.AuditICSMOApplyNeg(ICSASN);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("操作成功!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult DeleteICSMOApplyNeg(string keyValue)
|
|
{
|
|
string msg = App.DeleteICSMOApplyNeg(keyValue);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult SaveTexts(string pageName, List<Dictionary<string, string>> texts)
|
|
{
|
|
|
|
string msg = App.SaveTexts(pageName, texts);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("操作成功!");
|
|
}
|
|
}
|
|
|
|
|
|
// 获取页面文本
|
|
[HttpGet]
|
|
public ActionResult GetTexts(string pageName)
|
|
{
|
|
var result = new Dictionary<string, Dictionary<string, string>>();
|
|
|
|
DataTable dt = App.GetTexts(pageName);
|
|
// 处理查询结果
|
|
foreach (DataRow row in dt.Rows)
|
|
{
|
|
string textKey = row["TextKey"].ToString();
|
|
|
|
// 创建每种语言的字典
|
|
var languageValues = new Dictionary<string, string>
|
|
{
|
|
{ "Chinese", row["Chinese"].ToString() },
|
|
{ "English", row["English"].ToString() },
|
|
{ "Japanese", row["Japanese"].ToString() },
|
|
{ "Vietnamese", row["Vietnamese"].ToString() },
|
|
{ "Korean", row["Korean"].ToString() },
|
|
{ "Others", row["Others"].ToString() }
|
|
};
|
|
|
|
// 添加到结果字典
|
|
result[textKey] = languageValues;
|
|
}
|
|
|
|
return Json(result, JsonRequestBehavior.AllowGet);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
public void StatementExportAll( string ID)
|
|
{
|
|
//ID = ID.Substring(0, ID.Length - 2);
|
|
DataTable dt = App.StatementExportAll(ID);
|
|
AsposeCell.Export(dt);
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|