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.
263 lines
7.1 KiB
263 lines
7.1 KiB
using NFine.Application.DHAY;
|
|
using NFine.Code;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Reflection.Emit;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
|
|
namespace NFine.Web.Areas.DHAY.Controllers
|
|
{
|
|
public class ICSSDNController : ControllerBase
|
|
{
|
|
ICSSDNApp App = new ICSSDNApp();
|
|
// GET: DHAY/ICSCustomerSuppliedReturn
|
|
public ActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult Create()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult GetInvCode()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult Update()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult GetWHCode()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult GetBatch()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetU9CodeType()
|
|
{
|
|
DataTable dt = App.GetU9CodeType();
|
|
return Content(dt.ToJson());
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult DeleteICSSDN(string keyValue)
|
|
{
|
|
string msg = App.DeleteICSSDN(keyValue);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult SaveICSSDN(string ICSASN)
|
|
{
|
|
try
|
|
{
|
|
string msg = App.SaveICSSDN(ICSASN);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("添加成功!");
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
|
|
}
|
|
[HttpGet]
|
|
public ActionResult GetICSSDN(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetICSSDN(ref pagination, queryJson);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
public ActionResult GetICSSDNBySDNCode(string SDNCode)
|
|
{
|
|
DataTable ListData = App.GetICSSDNBySDNCode(SDNCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetICSSDNDetail(string SDNCode, string queryJson, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetICSSDNDetail(SDNCode, queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult DeleteICSSDNByCode(string keyValue)
|
|
{
|
|
string msg = App.DeleteICSSDNByCode(keyValue);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult DeleteICSSDNById(string keyValue)
|
|
{
|
|
string msg = App.DeleteICSSDNById(keyValue);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
|
|
|
|
public ActionResult GetBidCode(string WorkPoint)
|
|
{
|
|
try
|
|
{
|
|
string Code = App.GetBidCode(WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
Code = Code,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
}
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult UpdateICSSDN(string ICSASN)
|
|
{
|
|
|
|
string msg = App.UpdateICSSDN(ICSASN);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("修改成功!");
|
|
}
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetItemList(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetItemList(queryJson, 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());
|
|
|
|
}
|
|
/// <summary>
|
|
/// 获取批次信息
|
|
/// </summary>
|
|
/// <param name="pagination"></param>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetBatchList(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetBatchList(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 GetU9Status(string SOCode)
|
|
{
|
|
try
|
|
{
|
|
DataTable ListData = App.GetU9Status(SOCode);
|
|
if (ListData.Rows.Count <= 0)
|
|
{
|
|
return Success("验证成功");
|
|
}
|
|
else
|
|
{
|
|
return Error("验证失败");
|
|
}
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
}
|